:root {
  --accent: #456347;
  --pill-bg: #eaf0df;
  --pill-ink: #38543d;
  --surface-soft: #eaf0e2;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e7eee8;
  --muted: #b6c1b6;
  --blue: #a8d7b5;
  --accent: #9bd3a5;
  --pill-bg: #304b38;
  --pill-ink: #e0eee2;
  --surface-soft: #293a30;
  --bg: #151f19;
  --line: #3b4b40;
  --card: #202d25;
  --danger: #ff9da2;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    color-scheme: dark;
    --ink: #e7eee8;
    --muted: #b6c1b6;
    --blue: #a8d7b5;
    --accent: #9bd3a5;
    --pill-bg: #304b38;
    --pill-ink: #e0eee2;
    --surface-soft: #293a30;
    --bg: #151f19;
    --line: #3b4b40;
    --card: #202d25;
    --danger: #ff9da2;
  }
}

.project-banner,
.fiction-label,
.card:first-child,
.card-media,
.footer,
.article-media-item img,
.article-media-item video {
  background-color: var(--surface-soft);
}

.theme-control {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.theme-control select {
  min-width: 112px;
  padding: 7px 28px 7px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--card);
  color: var(--ink);
  font-size: 13px;
}

.login-page > .theme-control {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  margin-bottom: 14px;
}

@media (max-width: 600px) {
  .topbar nav {
    flex-wrap: wrap;
    justify-content: space-between;
    row-gap: 10px;
  }

  .topbar .theme-control {
    margin-left: auto;
  }

  .theme-control select {
    min-width: 100px;
    padding: 6px 22px 6px 8px;
    font-size: 12px;
  }
}

.shell {
  width: min(1280px, calc(100% - 96px));
}

body {
  line-height: 1.7;
}

.eyebrow,
.hero h1 em,
.hero-note > span,
.dot {
  color: var(--accent);
}

.dot {
  background: var(--accent);
}

.fiction-label {
  color: var(--pill-ink);
}

.card-number {
  color: var(--muted);
}

.eyebrow {
  font-size: 11px;
}

.small {
  font-size: 13px;
  line-height: 1.55;
}

.project-banner {
  font-size: 11px;
}

.project-banner span {
  font-size: 13px;
}

.hero {
  gap: clamp(44px, 5vw, 76px);
  padding-top: 76px;
  padding-bottom: 82px;
}

.hero h1 {
  font-size: 62px;
  line-height: 1.08;
  letter-spacing: 0;
}

.hero p {
  font-size: 18px;
  line-height: 1.6;
}

.hero-note {
  font-size: 13px;
}

.news {
  padding-top: 42px;
}

.section-head h2 {
  margin-top: 8px;
  font-size: 36px;
  line-height: 1.2;
  letter-spacing: 0;
}

.filter {
  padding: 9px 16px;
  font-size: 13px;
}

.filter.active {
  background: var(--ink);
  color: var(--bg);
}

.filter:not(.active):hover {
  background: var(--surface-soft);
}

.pill {
  background: var(--pill-bg);
  color: var(--pill-ink);
  font-size: 12px;
}

.card {
  min-height: 290px;
  padding: 28px;
  border-radius: 8px;
}

.panel {
  border-radius: 8px;
}

.card h3 {
  margin: 22px 0 12px;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: 0;
}

.card p {
  font-size: 15px;
  line-height: 1.6;
}

.meta {
  font-size: 12px;
}

.search input {
  font-size: 14px;
}

.button {
  padding: 14px 22px;
  font-size: 14px;
}

.footer p {
  font-size: 13px;
}

.footer nav a {
  font-size: 13px;
}

.footer .footer-bottom {
  border-top-color: var(--line);
  font-size: 12px;
}

.footer-brand span {
  color: var(--accent);
}

:root[data-theme="dark"] .filter.active {
  background: var(--accent);
  color: #14221a;
}

:root[data-theme="dark"] .button {
  background: var(--accent);
  color: #14221a;
}

:root[data-theme="dark"] .button:hover {
  background: #b7e5bf;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] .filter.active {
    background: var(--accent);
    color: #14221a;
  }

  :root[data-theme="system"] .button {
    background: var(--accent);
    color: #14221a;
  }

  :root[data-theme="system"] .button:hover {
    background: #b7e5bf;
  }
}

@media (max-width: 900px) {
  .shell {
    width: calc(100% - 56px);
  }

  .hero {
    padding-top: 56px;
    padding-bottom: 64px;
  }

  .hero h1 {
    font-size: 52px;
  }
}

@media (max-width: 600px) {
  .shell {
    width: calc(100% - 36px);
  }

  .hero {
    padding-top: 38px;
    padding-bottom: 44px;
    gap: 28px;
  }

  .hero h1 {
    font-size: 40px;
    line-height: 1.12;
  }

  .hero p {
    font-size: 16px;
  }

  .section-head h2 {
    font-size: 30px;
  }

  .card {
    min-height: 0;
    padding: 22px;
  }
}

.featured-news {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: stretch;
  margin-top: clamp(28px, 5vw, 64px);
  margin-bottom: clamp(48px, 7vw, 88px);
  padding: clamp(22px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}

.featured-visual {
  position: relative;
  min-width: 0;
  min-height: 360px;
  aspect-ratio: 1.2;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface-soft);
}

.featured-visual img,
.featured-visual video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-story {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 12px 0;
}

.featured-story .eyebrow {
  margin: 0 0 18px;
}

.featured-story .pill {
  margin: 0 0 18px;
}

.featured-story h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 4vw, 58px);
  font-weight: 500;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.featured-story h1 a {
  color: var(--ink);
}

.featured-excerpt {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.featured-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 30px;
}

.slide-arrow,
.slide-pause {
  display: inline-flex;
  min-width: 40px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
}

.slide-arrow {
  font-size: 20px;
}

.slide-pause {
  width: auto;
  padding: 0 13px;
  border-radius: 20px;
  font-size: 12px;
}

.featured-dots {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.featured-dot {
  width: 10px;
  height: 10px;
  min-height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--line);
}

.featured-dot.active {
  background: var(--accent);
}

.featured-story > .small {
  margin: 10px 0 0;
}

.featured-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 8px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--ink);
  font-weight: 600;
}

.featured-toggle input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  accent-color: var(--accent);
}

@media (max-width: 900px) {
  .featured-news {
    grid-template-columns: minmax(0, 1fr) minmax(260px, .9fr);
    gap: 28px;
    padding: 28px;
  }

  .featured-visual {
    min-height: 300px;
  }
}

@media (max-width: 650px) {
  .featured-news {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    margin-top: 24px;
    margin-bottom: 44px;
    padding: 18px;
  }

  .featured-visual {
    min-height: 0;
    aspect-ratio: 1.35;
  }

  .featured-story {
    padding: 4px 0 0;
  }

  .featured-story h1 {
    font-size: 36px;
  }

  .featured-excerpt {
    font-size: 16px;
  }

  .featured-controls {
    margin-top: 20px;
  }
}
