:root {
  color-scheme: dark;
  --bg: #0b0b0b;
  --card: #161615;
  --card-2: #1f1f1d;
  --line: #2a2a28;
  --line-strong: #4f4e49;
  --ink: #f0efec;
  --ink-2: #c3c2b7;
  --ink-3: #8f8e86;
  --grey: #4a4945;
  --radius: 16px;
  --radius-btn: 12px;
  --strip-height: 52px;
  --measure: 62ch;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--ink);
  text-decoration-color: var(--ink-3);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: #fff;
  text-decoration-color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 16px;
  top: 8px;
  z-index: 10;
  background: var(--card);
  padding: 8px 12px;
}

/* Layout: phone first, rail from 960px */

.layout {
  max-width: 1120px;
  margin: 0 auto;
}

nav.contents {
  position: sticky;
  top: 0;
  z-index: 5;
  height: var(--strip-height);
  background: rgba(11, 11, 11, 0.94);
  border-bottom: 1px solid var(--line);
}

nav.contents p {
  display: none;
}

nav.contents ol {
  display: flex;
  gap: 4px;
  height: 100%;
  margin: 0;
  padding: 0 12px;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  align-items: center;
}

nav.contents ol::-webkit-scrollbar {
  display: none;
}

nav.contents a {
  display: block;
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--ink-3);
  font-size: 14px;
  line-height: 1.3;
  text-decoration: none;
}

nav.contents a:hover {
  color: var(--ink);
}

nav.contents a[aria-current="true"] {
  color: var(--ink);
  background: var(--card-2);
}

main {
  padding: 0 16px 64px;
  min-width: 0;
}

section[id] {
  scroll-margin-top: 68px;
  padding-top: 64px;
}

section#overview {
  padding-top: 40px;
}

.measure {
  max-width: var(--measure);
}

@media (min-width: 960px) {
  .layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 56px;
    padding: 0 32px;
  }

  nav.contents {
    top: 40px;
    align-self: start;
    height: auto;
    margin-top: 72px;
    background: none;
    border: 0;
  }

  nav.contents p {
    display: block;
    margin: 0 0 10px 12px;
    color: var(--ink-3);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1.4;
    text-transform: uppercase;
  }

  nav.contents ol {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 0;
    overflow: visible;
  }

  nav.contents a {
    white-space: normal;
    padding: 7px 12px;
    border-radius: 8px;
  }

  main {
    padding: 0 0 96px;
  }

  section[id] {
    scroll-margin-top: 32px;
    padding-top: 96px;
  }

  section#overview {
    padding-top: 72px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn {
    transition: none;
  }
}

/* Type */

.eyebrow {
  margin: 0 0 14px;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 16px;
  font-size: clamp(2.5rem, 9vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
  font-weight: 700;
  text-wrap: balance;
}

h2 {
  margin: 0 0 18px;
  font-size: clamp(1.75rem, 5vw, 2.375rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 700;
  text-wrap: balance;
}

h3 {
  margin: 0 0 8px;
  font-size: 1.125rem;
  line-height: 1.35;
  font-weight: 600;
}

p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

.lead {
  color: var(--ink-2);
  font-size: clamp(1.125rem, 2.4vw, 1.25rem);
  line-height: 1.5;
}

.muted {
  color: var(--ink-3);
  font-size: 15px;
  line-height: 1.55;
}

strong {
  font-weight: 600;
  color: var(--ink);
}

/* Cards */

figure.card {
  margin: 28px 0 32px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

figure.card .chart svg {
  display: block;
  width: 100%;
  height: auto;
}

figure.card figcaption {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.55;
  text-wrap: pretty;
}

figure.card .chart:empty + figcaption {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

@media (max-width: 599px) {
  figure.card {
    padding: 12px;
  }

  figure.card figcaption {
    padding: 12px 4px 4px;
  }
}

/* Buttons: every call to action carries the same visual weight */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 32px 0 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-btn);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    transform 0.1s ease;
}

.actions .btn::after {
  content: "\2192";
  color: var(--ink-3);
  font-weight: 400;
  transition: transform 0.15s ease, color 0.15s ease;
}

.btn:hover {
  background: var(--card-2);
  border-color: var(--ink-3);
  color: var(--ink);
}

.actions .btn:hover::after {
  color: var(--ink);
  transform: translateX(2px);
}

.btn:active {
  transform: translateY(1px);
}

.btn.small {
  min-height: 40px;
  padding: 0 16px;
  font-size: 15px;
  border-radius: 10px;
}

@media (max-width: 480px) {
  .actions {
    flex-direction: column;
  }

  .actions .btn {
    justify-content: space-between;
    width: 100%;
  }
}

/* Prompt */

.prompt {
  margin: 28px 0 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.prompt pre {
  margin: 0;
  padding: 20px;
  max-height: 420px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink-2);
}

.prompt .copy-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: #121211;
}

.prompt [data-copy-status] {
  color: var(--ink-3);
  font-size: 14px;
  line-height: 1.4;
}

/* Lists, facts, cite */

ul.plain {
  margin: 0 0 1.25em;
  padding-left: 1.1em;
}

ul.plain li {
  margin-bottom: 0.5em;
  line-height: 1.55;
  padding-left: 0.2em;
}

ul.plain li::marker {
  color: var(--ink-3);
}

blockquote.cite {
  margin: 12px 0 20px;
  padding: 16px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
  border-radius: 10px;
  font-size: 15.5px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

dl.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 20px;
  margin: 0 0 1.5em;
  line-height: 1.5;
}

dl.facts dt {
  color: var(--ink-3);
}

dl.facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

footer.page-footer {
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 14px;
  line-height: 1.5;
}
