@font-face {
  font-family: "Quinn Display";
  src: url("fonts/QuinnDisplay-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Quinn Display";
  src: url("fonts/QuinnDisplay-Bold.woff2") format("woff2");
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/IBMPlexMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/IBMPlexMono-SemiBold.woff2") format("woff2");
  font-weight: 600 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --text: #171a1f;
  --muted: #6e7480;
  --line: #e5e8ee;
  --accent: #d71920;
  --accent-dark: #ae1117;
  --radius: 18px;
  --shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
  --font-display: "Quinn Display", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: var(--font-mono);
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  letter-spacing: -0.01em;
}

img {
  display: block;
  max-width: 100%;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.container {
  width: min(100% - 28px, 760px);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.logo {
  font-family: var(--font-display);
  color: var(--text);
  text-decoration: none;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.header-badge {
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.hero {
  padding: 20px 0 12px;
}

.hero h1 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(28px, 8vw, 42px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.news-list {
  display: grid;
  gap: 14px;
  padding: 10px 0 28px;
}

.news-card {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 12px;
  min-height: 116px;
  padding: 10px;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.news-card:active {
  transform: scale(0.985);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
}

.news-card__image {
  width: 116px;
  height: 116px;
  object-fit: cover;
  border-radius: 14px;
  background: #ddd;
}

.news-card__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
}


.news-card h2 {
  margin: 0 0 7px;
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.1;
  letter-spacing: -0.025em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article {
  padding: 16px 0 34px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
  color: var(--accent);
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
}

.article-card {
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.article-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #ddd;
}

.article-content {
  padding: 18px 16px 22px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.article h1 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(27px, 7vw, 42px);
  line-height: 1.03;
  letter-spacing: -0.055em;
}

.article-subtitle {
  margin: 0 0 18px;
  color: #383e49;
  font-size: 18px;
  line-height: 1.32;
  font-weight: 650;
}

.article-text p {
  margin: 0 0 15px;
  color: #252a33;
  font-size: 17px;
  line-height: 1.58;
}

.article-ad {
  width: 100%;
  margin: 18px 0;
  overflow: hidden;
}

.article-ad--text {
  margin: 18px 0 20px;
}

.article-ad--slider {
  margin: 18px 0 0;
}

.article-text p:last-child {
  margin-bottom: 0;
}

.error-box {
  margin: 28px 0;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.error-box h1 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 25px;
}

.error-box p {
  margin: 0 0 14px;
  color: var(--muted);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  color: #fff;
  background: var(--accent);
  border-radius: 12px;
  text-decoration: none;
  font-weight: 800;
}

.button:active {
  background: var(--accent-dark);
}

.site-footer {
  padding: 22px 0 max(22px, env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

@media (min-width: 640px) {
  .container {
    width: min(100% - 44px, 880px);
  }

  .news-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .news-card {
    grid-template-columns: 1fr;
  }

  .news-card__image {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .article-content {
    padding: 26px 28px 32px;
  }
}
