:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f5f0;
  --text: #181916;
  --muted: #666b62;
  --line: #dfe2d7;
  --accent: #e5ff00;
  --accent-strong: #c8e600;
  --shadow: 0 14px 34px rgba(24, 25, 22, 0.07);
  --max: 1180px;
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #11120f;
  --surface: #181a16;
  --surface-2: #20231b;
  --text: #f4f7eb;
  --muted: #a8afa0;
  --line: #303529;
  --accent: #e5ff00;
  --accent-strong: #eeff57;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.shell {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.header-shell {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  flex-shrink: 0;
}

.brand img {
  border-radius: 4px;
  border: 1px solid var(--text);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  margin-left: auto;
}

.main-nav a:hover,
.rail-box a:hover,
.source-link:hover {
  color: var(--text);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--accent);
  text-underline-offset: 4px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.subscribe-short {
  display: none;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 15px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.1;
}

.button-primary {
  background: var(--accent);
  border-color: #161713;
  color: #11120f;
  box-shadow: 4px 4px 0 #161713;
}

.button-primary:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 #161713;
}

.button-wide {
  width: 100%;
}

.theme-toggle {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.theme-toggle span {
  display: block;
  width: 18px;
  height: 18px;
  margin: 0 auto;
  border: 2px solid currentColor;
  border-radius: 50%;
  box-shadow: inset -6px -2px 0 currentColor;
}

.hero-feed {
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, transparent 0 22px, color-mix(in srgb, var(--line) 45%, transparent) 22px 23px, transparent 23px 46px),
    var(--surface);
}

.hero-grid {
  min-height: 168px;
  display: grid;
  grid-template-columns: 1fr 390px;
  gap: 30px;
  align-items: end;
  padding: 24px 0;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 68px);
  line-height: 0.92;
  font-weight: 950;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 680px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.hero-copy,
.schedule-panel {
  min-width: 0;
}

.schedule-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}

.panel-title {
  margin-bottom: 10px;
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 900;
  color: var(--muted);
}

.schedule-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.schedule-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 13px;
  font-weight: 750;
  background: var(--surface-2);
}

.schedule-chip b {
  color: var(--muted);
  font-weight: 700;
}

.schedule-chip.is-next {
  background: var(--accent);
  color: #11120f;
  border-color: #11120f;
}

.schedule-chip.is-next b {
  color: #11120f;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 34px;
  padding: 28px 0 54px;
  align-items: start;
}

.feed-list {
  display: grid;
  gap: 14px;
}

.article-card {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 18px;
  min-height: 144px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.article-card:hover {
  border-color: color-mix(in srgb, var(--text) 46%, var(--line));
}

.article-card-lead {
  grid-template-columns: minmax(220px, 0.74fr) minmax(0, 1fr);
  min-height: 214px;
  border-color: color-mix(in srgb, var(--text) 55%, var(--line));
  box-shadow: var(--shadow);
}

.article-card-lead:not(:has(.article-image)) {
  min-height: 174px;
}

.article-image {
  min-height: 112px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface-2);
  display: grid;
  place-items: center;
}

.article-card-lead .article-image {
  min-height: 210px;
}

.article-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.article-card:not(:has(.article-image)) {
  grid-template-columns: 1fr;
}

.article-card-body {
  min-width: 0;
}

.article-card time,
.article-header time {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.article-card h2 {
  margin: 0;
  font-size: clamp(21px, 2.2vw, 31px);
  line-height: 1.08;
  letter-spacing: 0;
}

.article-card:not(.article-card-lead) h2 {
  font-size: 21px;
  line-height: 1.14;
}

.article-card h2 a:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}

.article-card p {
  margin: 12px 0 0;
  color: var(--muted);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.card-meta a {
  margin-left: auto;
  color: var(--text);
}

.side-rail {
  position: sticky;
  top: 94px;
  display: grid;
  gap: 14px;
}

.subscribe-box,
.rail-box,
.empty-state {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 20px;
}

.subscribe-box {
  background:
    linear-gradient(135deg, var(--accent) 0 10px, transparent 10px 100%),
    var(--surface);
  box-shadow: var(--shadow);
}

.subscribe-box h2,
.rail-box h2,
.related-list h2 {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.15;
}

.subscribe-box p,
.empty-state p,
.rail-box p {
  color: var(--muted);
}

.rail-box {
  display: grid;
  gap: 10px;
}

.rail-box a {
  color: var(--muted);
  font-weight: 750;
}

.listing-page,
.article-shell {
  padding: 34px 0 60px;
}

.page-head {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.page-head h1,
.article-page > h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 0.96;
  letter-spacing: 0;
}

.article-header h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(36px, 5.2vw, 62px);
  line-height: 0.98;
  letter-spacing: 0;
}

.page-head p,
.article-lead {
  max-width: 760px;
  color: var(--muted);
  font-size: 20px;
}

.article-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 34px;
}

.article-page {
  min-width: 0;
}

.article-header {
  margin-bottom: 24px;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.article-figure {
  margin: 0 0 26px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.article-figure img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.article-content {
  max-width: 780px;
  font-size: 19px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.page-summary {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.page-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  justify-content: flex-end;
}

.page-link,
.page-step,
.page-gap {
  min-width: 34px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 850;
}

.page-link.is-current {
  background: var(--accent);
  border-color: #11120f;
  color: #11120f;
}

.page-step.is-disabled,
.page-gap {
  color: var(--muted);
}

.article-content p {
  margin: 0 0 20px;
}

.article-content a {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}

.article-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.source-link {
  color: var(--muted);
  font-weight: 800;
}

.related-list {
  display: grid;
  gap: 12px;
  align-content: start;
}

.related-list .article-card {
  grid-template-columns: 1fr;
  min-height: 0;
}

.related-list .article-image {
  display: none;
}

.related-list .article-card h2 {
  font-size: 18px;
}

.related-list .article-card p,
.related-list .card-meta {
  display: none;
}

.footer {
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 32px 0;
}

.footer p {
  max-width: 520px;
  color: var(--muted);
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-content: center;
  font-weight: 800;
}

@media (max-width: 980px) {
  .header-shell {
    gap: 14px;
  }

  .main-nav {
    display: none;
  }

  .hero-grid,
  .content-grid,
  .article-shell {
    grid-template-columns: 1fr;
  }

  .side-rail,
  .related-list {
    position: static;
  }

  .hero-grid {
    gap: 18px;
    padding: 22px 0;
  }

  .hero-copy {
    max-width: 720px;
  }
}

@media (max-width: 700px) {
  .shell {
    width: min(var(--max), calc(100% - 32px));
  }

  .site-header {
    position: static;
  }

  .header-shell {
    min-height: 62px;
    gap: 8px;
  }

  .brand span {
    font-size: 14px;
  }

  .header-actions .button {
    max-width: 136px;
    padding: 8px 10px;
    font-size: 12px;
    box-shadow: 3px 3px 0 #161713;
  }

  .theme-toggle {
    width: 38px;
    height: 38px;
  }

  .hero-copy h1 {
    font-size: 44px;
  }

  .hero-grid {
    padding: 22px 0 20px;
  }

  .hero-copy p,
  .page-head p,
  .article-lead,
  .article-content {
    font-size: 17px;
  }

  .schedule-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    max-width: 100%;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .schedule-strip::-webkit-scrollbar {
    display: none;
  }

  .schedule-chip {
    flex: 0 0 118px;
    min-width: 118px;
  }

  .schedule-panel {
    padding: 12px;
  }

  .content-grid {
    padding-top: 24px;
  }

  .article-card,
  .article-card-lead {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 13px;
  }

  .article-image,
  .article-card-lead .article-image {
    aspect-ratio: 16 / 9;
    min-height: 0;
  }

  .article-card h2,
  .article-card:not(.article-card-lead) h2 {
    font-size: 21px;
  }

  .page-head h1,
  .article-page h1 {
    font-size: 40px;
  }

  .article-header h1 {
    font-size: 34px;
    line-height: 1.02;
  }

  .article-shell {
    padding-top: 28px;
  }

  .article-header {
    margin-bottom: 20px;
  }

  .pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .page-controls {
    justify-content: flex-start;
  }

  .article-footer,
  .footer-grid {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 430px) {
  .brand span {
    display: none;
  }

  .subscribe-full {
    display: none;
  }

  .subscribe-short {
    display: inline;
  }

  .header-actions .button {
    max-width: none;
    min-width: 74px;
  }
}
