:root {
  color-scheme: light;
  --bg: #f7f7f7;
  --ink: #0a0a0a;
  --muted: #666666;
  --line: #d8d8d8;
  --surface: #ffffff;
  --surface-strong: #eeeeee;
  --surface-muted: #e6e6e6;
  --inverse: #ffffff;
  --code-bg: #111111;
  --code-ink: #f6f6f6;
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.06);
  --card-line: #c7c7c7;
  --card-shadow: 0 16px 36px rgba(0, 0, 0, 0.09), 0 2px 7px rgba(0, 0, 0, 0.05);
  --card-shadow-hover: 0 20px 42px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.06);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #050505;
  --ink: #f5f5f5;
  --muted: #a6a6a6;
  --line: #2a2a2a;
  --surface: #0d0d0d;
  --surface-strong: #171717;
  --surface-muted: #222222;
  --inverse: #050505;
  --code-bg: #f5f5f5;
  --code-ink: #080808;
  --shadow: none;
  --card-line: #353535;
  --card-shadow: 0 18px 42px rgba(0, 0, 0, 0.48), 0 1px 0 rgba(255, 255, 255, 0.04);
  --card-shadow-hover: 0 22px 48px rgba(0, 0, 0, 0.58), 0 1px 0 rgba(255, 255, 255, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

.site-header {
  padding: 24px 28px 0;
}

.top-nav {
  width: min(1080px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}

.brand {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  font-size: 1.05rem;
  font-weight: 800;
  gap: 9px;
  text-decoration: none;
}

.brand-icon {
  fill: none;
  flex: 0 0 19px;
  height: 19px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
  width: 19px;
}

.nav-links {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
}

.nav-links a {
  border-radius: 6px;
  color: var(--muted);
  padding: 8px 10px;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease;
}

.nav-controls {
  display: flex;
  gap: 8px;
}

.theme-toggle,
.menu-toggle,
.action,
.download-link,
.minor-link,
.source-link {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 12px;
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.theme-toggle {
  cursor: pointer;
  flex: 0 0 38px;
  padding: 0;
  width: 38px;
}

.menu-toggle {
  cursor: pointer;
  display: none;
  flex: 0 0 38px;
  padding: 0;
  width: 38px;
}

.theme-icon,
.menu-icon {
  display: block;
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 18px;
}

.menu-icon-close {
  display: none;
}

.menu-toggle.is-open .menu-icon-open {
  display: none;
}

.menu-toggle.is-open .menu-icon-close {
  display: block;
}

.theme-icon-sun {
  display: none;
}

:root[data-theme="dark"] .theme-icon-moon {
  display: none;
}

:root[data-theme="dark"] .theme-icon-sun {
  display: block;
}

.nav-links a:hover {
  background: var(--surface-strong);
  color: var(--ink);
}

.theme-toggle:hover,
.menu-toggle:hover,
.action:hover,
.download-link:hover,
.minor-link:hover,
.source-link:hover {
  border-color: var(--ink);
  background: var(--surface-strong);
}

.nav-links a:focus-visible,
.theme-toggle:focus-visible,
.menu-toggle:focus-visible,
.action:focus-visible,
.download-link:focus-visible,
.minor-link:focus-visible,
.source-link:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.hero {
  width: min(1080px, 100%);
  min-height: auto;
  margin: 0 auto;
  padding: 64px 0 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.archive-hero {
  min-height: auto;
  padding-bottom: 72px;
}

.eyebrow,
.meta-label {
  color: var(--muted);
  display: block;
  font-size: 0.82rem;
  font-weight: 750;
  margin: 0 0 10px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 920px;
  font-size: 3.65rem;
  line-height: 1.04;
  margin-bottom: 20px;
}

.hero-text {
  color: var(--muted);
  font-size: 1.18rem;
  line-height: 1.65;
  max-width: 620px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.action.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--inverse);
}

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

main {
  width: min(1080px, calc(100% - 56px));
  margin: 0 auto 48px;
}

.status-band,
.intro-grid,
.info-section {
  border-top: 1px solid var(--line);
  padding: 28px 0;
}

.status-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 20px 0;
}

.status-band strong {
  display: block;
  font-size: 1rem;
  line-height: 1.35;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 32px;
  align-items: start;
}

.intro-grid h2,
.section-heading h2,
.info-section h2 {
  font-size: 1.65rem;
  line-height: 1.2;
  margin-bottom: 10px;
}

.intro-grid p,
.section-heading p,
.info-section p,
.history-item p {
  color: var(--muted);
  line-height: 1.6;
}

.api-callout {
  border-left: 4px solid var(--ink);
  padding-left: 18px;
}

.api-callout a {
  color: var(--ink);
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}

.section-heading {
  border-top: 1px solid var(--line);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 48px 0 18px;
}

.model-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 48px;
}

.model-card {
  background: var(--surface);
  border: 1px solid var(--card-line);
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 20px;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.model-title {
  margin-bottom: 14px;
}

.model-summary {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.category {
  color: var(--muted);
  display: block;
  font-size: 0.92rem;
  font-weight: 750;
  line-height: 1.3;
  margin-bottom: 8px;
}

@media (hover: hover) {
  .model-card:hover {
    border-color: var(--ink);
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-2px);
  }
}

.model-card h3 {
  font-size: 1.28rem;
  line-height: 1.25;
  margin-bottom: 0;
}

.why {
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 16px;
}

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

.facts div {
  min-width: 0;
  padding: 0;
}

.facts span {
  color: var(--muted);
  display: block;
  font-size: 0.78rem;
  margin-bottom: 4px;
}

.facts strong {
  display: block;
  font-size: 0.88rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.evidence-list,
#selection-notes {
  color: var(--muted);
  line-height: 1.55;
  padding-left: 20px;
}

.evidence-list li + li,
#selection-notes li + li {
  margin-top: 8px;
}

.download-row,
.companion-links,
.history-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0;
}

.model-card .download-row {
  margin-top: 18px;
}

.model-card .download-link {
  min-height: 34px;
  padding: 6px 10px;
}

.download-link,
.minor-link,
.source-link {
  font-size: 0.9rem;
}

.download-link.quiet {
  color: var(--muted);
}

.minor-link {
  min-height: 34px;
  padding: 6px 10px;
}

.companion-links {
  margin-top: 8px;
}

.runtime-note {
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
  margin: 18px 0 0;
  padding-top: 14px;
}

.history-list {
  display: grid;
}

.history-item {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 0;
}

.history-item p {
  margin-bottom: 0;
}

.blog-teaser,
.blog-card {
  align-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 0;
}

.blog-teaser h3,
.blog-card h2 {
  font-size: 1.25rem;
  line-height: 1.25;
  margin-bottom: 8px;
}

.title-link {
  color: var(--ink);
  text-decoration: none;
}

.title-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.blog-teaser p,
.blog-card p,
.post-meta,
.post-deck,
.article-body p,
.article-body li {
  color: var(--muted);
  line-height: 1.65;
}

.blog-list {
  display: grid;
  gap: 12px;
}

.post-hero {
  min-height: auto;
  padding-bottom: 58px;
}

.post-meta {
  font-size: 0.92rem;
  margin-bottom: 18px;
}

.post-deck {
  font-size: 1.16rem;
  max-width: 760px;
}

.article-body {
  border-top: 1px solid var(--line);
  margin: 0 auto 48px;
  max-width: 820px;
  padding-top: 30px;
}

.article-body h2 {
  font-size: 1.45rem;
  line-height: 1.25;
  margin: 34px 0 10px;
}

.article-body p,
.article-body ul {
  margin-bottom: 18px;
}

.article-body ul {
  padding-left: 20px;
}

.source-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  margin: 0 auto;
  padding: 24px 28px 36px;
  width: min(1080px, 100%);
}

footer p {
  margin-bottom: 0;
}

footer p + p {
  margin-top: 8px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.api-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.api-doc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  max-width: 680px;
  padding: 28px;
}

.api-doc h1 {
  font-size: 2.4rem;
  margin-top: 24px;
}

pre {
  background: var(--code-bg);
  border-radius: 8px;
  color: var(--code-ink);
  overflow-x: auto;
  padding: 16px;
}

.error-card {
  border-color: var(--ink);
  grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 900px) {
  .intro-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 3rem;
  }

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

  .model-card .download-row {
    flex-direction: row;
  }

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

@media (max-width: 620px) {
  .site-header {
    padding: 18px 20px 0;
  }

  .top-nav {
    grid-template-columns: 1fr auto;
    gap: 14px;
  }

  .nav-controls {
    justify-self: end;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav-links {
    border-top: 1px solid var(--line);
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    padding-top: 6px;
    width: 100%;
  }

  body.nav-ready .nav-links {
    display: none;
  }

  body.nav-ready .nav-links.is-open {
    display: grid;
  }

  .nav-links a {
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    padding: 12px 4px;
  }

  .hero {
    padding-top: 44px;
    padding-bottom: 52px;
  }

  .archive-hero,
  .post-hero {
    padding-bottom: 52px;
  }

  h1 {
    font-size: 2.15rem;
  }

  main {
    width: min(100% - 40px, 1080px);
  }

  .status-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .status-band div:nth-child(2) {
    grid-column: 1 / -1;
    order: 3;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 38px;
  }

  .model-card {
    padding: 18px;
  }

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

  .facts div:nth-child(2) {
    grid-column: 1 / -1;
    order: 3;
  }

  .facts div:nth-child(3) {
    order: 2;
  }

  .history-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .blog-teaser,
  .blog-card {
    align-items: flex-start;
    flex-direction: column;
  }
}
