:root {
  color-scheme: light;
  --bg: #f4efe5;
  --bg-soft: #ebe3d4;
  --surface: rgba(255, 252, 246, 0.86);
  --surface-strong: #fffdf9;
  --surface-muted: rgba(247, 242, 233, 0.92);
  --ink: #20304a;
  --muted: #627187;
  --line: rgba(32, 48, 74, 0.12);
  --primary: #2b5ea0;
  --primary-strong: #224c83;
  --primary-soft: rgba(43, 94, 160, 0.1);
  --accent: #ab7a3d;
  --ok: #1c7b63;
  --shadow: 0 22px 54px rgba(23, 34, 49, 0.1);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1725;
  --bg-soft: #162134;
  --surface: rgba(16, 24, 39, 0.88);
  --surface-strong: #111b2d;
  --surface-muted: rgba(24, 35, 54, 0.92);
  --ink: #e7edf8;
  --muted: #a2b1c8;
  --line: rgba(181, 201, 231, 0.12);
  --primary: #8ab4ff;
  --primary-strong: #a9c7ff;
  --primary-soft: rgba(138, 180, 255, 0.16);
  --accent: #d2a362;
  --ok: #68d0aa;
  --shadow: 0 26px 60px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Segoe UI Variable Text", "Segoe UI", "Helvetica Neue", sans-serif;
  line-height: 1.68;
  background:
    radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--primary) 18%, transparent), transparent 28%),
    radial-gradient(circle at 100% 100%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 32%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
  transition: background 180ms ease, color 180ms ease;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  letter-spacing: -0.025em;
}

h1 {
  font-size: clamp(2.25rem, 4vw, 4rem);
  line-height: 0.98;
}

h2 {
  font-size: clamp(1.45rem, 2.2vw, 2.1rem);
  line-height: 1.05;
}

h3 {
  font-size: 1.18rem;
  line-height: 1.18;
}

p {
  margin: 0;
}

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

.mono {
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
}

.shell {
  width: min(1020px, calc(100% - 36px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
}

.topbar-row,
.footer-row,
.topbar-tools {
  display: flex;
  align-items: center;
}

.topbar-row,
.footer-row {
  justify-content: space-between;
  gap: 18px;
}

.topbar {
  padding: 16px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
  font-weight: 700;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: url('/assets/favicon.svg?v=20260329-edge3') center / cover no-repeat;
  box-shadow: 0 8px 18px rgba(11, 19, 33, 0.22);
  position: relative;
  flex: 0 0 40px;
}

.brand-mark::before,
.brand-mark::after {
  content: none;
}

.topbar-tools {
  gap: 16px;
}

.nav,
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 0.95rem;
}

.nav a,
.footer-nav a,
.footer-row {
  color: var(--muted);
}

.nav a:hover,
.footer-nav a:hover,
.text-link:hover,
.table a:hover,
.list-clean a:hover {
  color: var(--primary);
  text-decoration: none;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 132px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface-strong) 84%, var(--primary-soft)), var(--surface-strong));
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(15, 24, 38, 0.14);
  transition: transform 160ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--primary) 42%, var(--line));
  box-shadow: 0 12px 28px rgba(15, 24, 38, 0.18);
}

.theme-toggle:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--primary) 68%, transparent);
  outline-offset: 2px;
}

.theme-toggle-glyph {
  width: 17px;
  height: 17px;
  border-radius: 999px;
  border: 1.5px solid currentColor;
  display: inline-block;
  position: relative;
  overflow: hidden;
}

.theme-toggle-glyph::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 999px;
  background: currentColor;
  clip-path: inset(0 0 0 45%);
}

:root[data-theme="dark"] .theme-toggle {
  border-color: color-mix(in srgb, var(--primary) 36%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary-soft) 62%, var(--surface-strong)), var(--surface-strong));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
}
.hero,
.section,
.page-body,
.page-hero {
  padding: 22px 0;
}

.hero-home {
  padding-top: 28px;
}

.home-hero-grid,
.hero-grid,
.two-col,
.home-lower-grid {
  display: grid;
  gap: 20px;
}

.home-hero-grid,
.hero-grid,
.two-col {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.hero-copy,
.page-hero .card,
.page-body .card,
.summary-card,
.timeline-card,
.panel-card {
  padding: 28px;
}

.hero-copy,
.page-hero .card,
.page-body .card,
.summary-card,
.timeline-card,
.panel-card,
.compact-feature {
  animation: rise 480ms ease both;
}

.hero-copy-home {
  display: grid;
  gap: 20px;
}

.eyebrow-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.eyebrow,
.kicker,
.highlight-label,
.mini-kicker {
  color: var(--primary);
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--primary-soft);
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  border: 1px solid var(--line);
  font-size: 0.88rem;
}

.lead,
.muted,
.highlight p,
.table td:first-child,
.list-clean li,
.footer-row,
.mini-card span,
.panel-card p,
.timeline-item p,
.feature-card p {
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 600;
  transition: transform 160ms ease, background 160ms ease;
}

.button:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.button-primary {
  background: var(--ink);
  color: var(--surface-strong);
}

.button-secondary {
  background: var(--surface-strong);
  color: var(--ink);
  border-color: var(--line);
}

.hero-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.mini-card {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 16px;
  border-radius: 20px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  color: var(--ink);
}

.mini-card:hover {
  text-decoration: none;
  border-color: color-mix(in srgb, var(--primary) 26%, var(--line));
}

.hero-aside {
  display: grid;
  gap: 16px;
}

.panel-card {
  display: grid;
  gap: 12px;
}

.panel-card-accent {
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary-soft) 62%, var(--surface)), var(--surface));
}

.panel-split {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ok) 16%, var(--surface-strong));
  color: var(--ok);
  font-size: 0.85rem;
  font-weight: 700;
}

.text-link {
  color: var(--primary);
  font-weight: 600;
}

.section-tight {
  padding-top: 10px;
}

.section-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.split-heading {
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  align-items: end;
}

.section-heading-tight {
  margin-bottom: 18px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.feature-grid-home {
  align-items: stretch;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.feature-card {
  display: grid;
  gap: 16px;
}

.compact-feature {
  padding: 18px;
}

.feature-list-card {
  display: grid;
  width: 100%;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
}

.feature-thumb-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 220px;
  min-height: 150px;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid var(--line);
  overflow: hidden;
}

.feature-thumb {
  width: 100%;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.72);
}

.feature-thumb-list {
  max-height: 122px;
  object-fit: contain;
  border: 0;
  background: transparent;
  border-radius: 16px;
  filter: saturate(0.96) contrast(1.02);
}

.feature-copy {
  display: grid;
  gap: 8px;
}

.feature-list-card h3 a {
  color: var(--ink);
}

.feature-list-card:hover {
  border-color: color-mix(in srgb, var(--primary) 22%, var(--line));
}

.tone-blue .feature-thumb-frame {
  background: linear-gradient(135deg, rgba(103, 145, 214, 0.18), rgba(255, 252, 246, 0.9));
}

.tone-sand .feature-thumb-frame {
  background: linear-gradient(135deg, rgba(201, 165, 112, 0.2), rgba(248, 242, 232, 0.9));
}

.tone-green .feature-thumb-frame {
  background: linear-gradient(135deg, rgba(71, 152, 125, 0.22), rgba(244, 247, 241, 0.92));
}

:root[data-theme="dark"] .tone-blue .feature-thumb-frame {
  background: linear-gradient(135deg, rgba(71, 122, 211, 0.28), rgba(22, 33, 52, 0.9));
}

:root[data-theme="dark"] .tone-sand .feature-thumb-frame {
  background: linear-gradient(135deg, rgba(165, 118, 62, 0.28), rgba(26, 35, 49, 0.92));
}

:root[data-theme="dark"] .tone-green .feature-thumb-frame {
  background: linear-gradient(135deg, rgba(52, 144, 116, 0.3), rgba(20, 34, 49, 0.92));
}

.timeline-card,
.summary-card {
  align-self: start;
}

.timeline-list {
  display: grid;
  gap: 16px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.timeline-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.timeline-date {
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 78px;
  border-radius: 18px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  color: var(--ink);
}

.timeline-date span {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.timeline-date strong {
  font-size: 1.6rem;
  line-height: 1;
}

.page-hero .card {
  display: grid;
  gap: 14px;
}

.subtle {
  background: var(--surface-muted);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.96rem;
}

.table td {
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.table tr:last-child td {
  border-bottom: 0;
}

.table td:first-child {
  width: 38%;
}

.article-list,
.update-list {
  display: grid;
  gap: 14px;
}

.article-card {
  display: grid;
  gap: 10px;
  border-radius: 22px;
}

.article-meta {
  color: var(--primary);
  font-size: 0.82rem;
}

.update-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.update-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.list-clean {
  margin: 0;
  padding-left: 18px;
}

.list-clean li {
  margin-bottom: 10px;
}

.footer {
  margin-top: 26px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
}

.footer-row {
  min-height: 70px;
  font-size: 0.92rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1040px) {
  .home-hero-grid,
  .hero-grid,
  .two-col,
  .split-heading,
  .home-lower-grid {
    grid-template-columns: 1fr;
  }

  .hero-mini-grid {
    grid-template-columns: 1fr;
  }

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

  .feature-grid-home {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .topbar-row,
  .topbar-tools,
  .footer-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .theme-toggle {
    min-width: 124px;
  }

  .hero-copy,
  .page-hero .card,
  .page-body .card,
  .summary-card,
  .timeline-card,
  .panel-card,
  .compact-feature,
  .feature-list-card {
    padding: 22px;
  }

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

  .feature-thumb-frame {
    width: 100%;
    min-height: 0;
  }

  .feature-thumb-list {
    max-height: 140px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }

  .timeline-date {
    width: 84px;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 20px, 1020px);
  }

  h1 {
    font-size: 2.3rem;
  }

  .nav,
  .footer-nav {
    gap: 12px;
    font-size: 0.92rem;
  }

  .button {
    width: 100%;
  }
}





/* Homepage list width correction */
.section-tight .section-heading,
.feature-grid-home {
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}

.feature-list-card {
  display: grid;
  width: 100%;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 18px;
}

.feature-thumb-frame {
  width: 180px;
  min-height: 122px;
  padding: 12px;
  border-radius: 20px;
}

.feature-thumb-list {
  max-height: 98px;
  border-radius: 14px;
}

@media (max-width: 760px) {
  .section-tight .section-heading,
  .feature-grid-home {
    max-width: none;
  }

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

  .feature-thumb-frame {
    width: 100%;
    min-height: 0;
  }

  .feature-thumb-list {
    max-height: 140px;
  }
}

/* Link decoration reset */
a,
a:visited,
a:hover,
a:focus,
a:active {
  text-decoration: none;
}

.button,
.button:visited,
.mini-card,
.mini-card:visited,
.feature-list-card h3 a,
.feature-list-card h3 a:visited,
.text-link,
.text-link:visited {
  text-decoration: none;
}

.button-primary,
.button-primary:visited {
  color: var(--surface-strong);
}

.button-secondary,
.button-secondary:visited,
.mini-card,
.mini-card:visited,
.feature-list-card h3 a,
.feature-list-card h3 a:visited {
  color: var(--ink);
}

/* Media enrichment */
.media-frame {
  margin: 18px 0 20px;
  display: grid;
  gap: 9px;
}

.media-frame img {
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--surface-muted);
  filter: saturate(0.92) contrast(1.03) brightness(0.96);
}

:root[data-theme="dark"] .media-frame img {
  filter: saturate(0.88) contrast(1.05) brightness(0.9);
}

.media-frame figcaption {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.timeline-item {
  grid-template-columns: 84px 168px minmax(0, 1fr);
  align-items: start;
}

.timeline-media {
  margin: 0;
}

.timeline-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--surface-muted);
  filter: saturate(0.9) contrast(1.03) brightness(0.95);
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(280px, 0.94fr);
  gap: 20px;
}

.about-layout .card {
  padding: 26px;
}

.about-profile {
  display: grid;
  gap: 14px;
}

.about-profile .chip {
  width: fit-content;
}

@media (max-width: 760px) {
  .timeline-item {
    grid-template-columns: 1fr;
  }

  .timeline-media img {
    max-width: 360px;
  }

  .about-layout {
    grid-template-columns: 1fr;
  }
}
/* Deep updates readability */
.update-deep {
  gap: 12px;
}

.update-deep h4 {
  margin: 2px 0 0;
  font-size: 1rem;
  line-height: 1.3;
  letter-spacing: 0;
  font-family: "Segoe UI Variable Text", "Segoe UI", "Helvetica Neue", sans-serif;
  color: var(--ink);
}

.update-deep p {
  line-height: 1.74;
}

.update-deep .list-clean {
  margin-top: 0;
}

.update-deep .table {
  margin-top: 2px;
}

/* Visual density pass */
.media-frame-tight {
  margin: 10px 0 16px;
}

.media-frame-end {
  margin-top: 20px;
}

.u-m0 {
  margin: 0;
}

.u-mt-10 {
  margin-top: 10px;
}

.u-mt-16 {
  margin-top: 16px;
}

.u-mt-20 {
  margin-top: 20px;
}

.u-mt-1-2 {
  margin-top: 1.2rem;
}

.update-deep .media-frame img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.about-profile .media-frame img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}


.media-frame img {
  display: block;
  width: 100%;
  height: auto;
}

.media-frame figcaption {
  margin-top: 10px;
  color: var(--muted, #8ea3b8);
  font-size: 0.92rem;
  line-height: 1.5;
}

.nav a[aria-current="page"] {
  color: var(--text, #eef4fb);
}

/* codex-real-library-refresh */
.stat-strip,
.download-grid,
.support-grid,
.timeline-grid {
  display: grid;
  gap: 18px;
}

.stat-strip {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 22px;
}

.stat-card,
.download-card,
.timeline-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-strong) 92%, transparent), var(--surface));
  box-shadow: var(--shadow);
}

.stat-card {
  padding: 18px 20px;
}

.stat-value {
  display: block;
  font: 700 1.9rem/1 "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  margin-bottom: 6px;
}

.download-grid,
.timeline-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.download-card,
.timeline-card {
  padding: 22px;
}

.download-card h3,
.timeline-card h3 {
  margin-bottom: 10px;
}

.download-card p,
.timeline-card p {
  color: var(--muted);
}

.download-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.download-meta,
.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-top: 14px;
  font-size: 0.92rem;
  color: var(--muted);
}

.download-meta strong,
.timeline-meta strong {
  color: var(--ink);
}

.support-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 18px;
}

.support-card {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-muted) 88%, transparent);
}

.section-stack {
  display: grid;
  gap: 20px;
}

.timeline-month + .timeline-month {
  margin-top: 24px;
}

@media (max-width: 720px) {
  .download-card,
  .timeline-card,
  .stat-card {
    padding: 18px;
  }
}

