/* =============================================================================
   Download + docs site — one stylesheet, no external fonts or assets.
   Tokens on :root; dark theme via prefers-color-scheme or [data-theme="dark"]
   (set by /js/theme.js from the toggle). Mobile-first.
   ========================================================================== */

:root {
  --bg: #fbfaf7;
  --bg-elev: #ffffff;
  --bg-sunk: #f3f1ec;
  --ink: #17161c;
  --ink-2: #44424c;
  --ink-3: #66636e;
  --line: #e7e3db;
  --line-strong: #d2cdc3;
  --accent: #f2602a;
  --accent-2: #ffb347;
  --accent-ink: #ad3a0b;
  --accent-soft: #fde8de;
  --btn-bg: #17161c;
  --btn-ink: #ffffff;
  --btn-bg-hover: #2c2a33;
  --ok: #187a43;
  --ok-soft: #e1f3e8;
  --warn: #8a5300;
  --warn-soft: #fff1d6;
  --code-bg: #17161c;
  --code-ink: #ecE9e2;
  --code-line: #2c2a33;
  --shadow-sm: 0 1px 2px rgb(23 22 28 / 0.06);
  --shadow: 0 1px 2px rgb(23 22 28 / 0.05), 0 12px 32px -8px rgb(23 22 28 / 0.14);
  --shadow-lg: 0 2px 4px rgb(23 22 28 / 0.04), 0 30px 70px -20px rgb(23 22 28 / 0.28);
  --glow: rgb(242 96 42 / 0.16);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --gutter: 16px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101014;
    --bg-elev: #18181e;
    --bg-sunk: #0b0b0e;
    --ink: #f3f1ec;
    --ink-2: #cfccd5;
    --ink-3: #a19dab;
    --line: #27262e;
    --line-strong: #393842;
    --accent: #ff7a45;
    --accent-2: #ffc06b;
    --accent-ink: #ff9d73;
    --accent-soft: #2b1911;
    --btn-bg: #ff7a45;
    --btn-ink: #1b0d06;
    --btn-bg-hover: #ff8f60;
    --ok: #5fd68f;
    --ok-soft: #12261a;
    --warn: #ffc56b;
    --warn-soft: #2a1f0c;
    --code-bg: #0a0a0d;
    --code-ink: #e9e6df;
    --code-line: #23222a;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 12px 32px -8px rgb(0 0 0 / 0.55);
    --shadow-lg: 0 2px 4px rgb(0 0 0 / 0.3), 0 30px 70px -20px rgb(0 0 0 / 0.7);
    --glow: rgb(255 122 69 / 0.13);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #101014;
  --bg-elev: #18181e;
  --bg-sunk: #0b0b0e;
  --ink: #f3f1ec;
  --ink-2: #cfccd5;
  --ink-3: #a19dab;
  --line: #27262e;
  --line-strong: #393842;
  --accent: #ff7a45;
  --accent-2: #ffc06b;
  --accent-ink: #ff9d73;
  --accent-soft: #2b1911;
  --btn-bg: #ff7a45;
  --btn-ink: #1b0d06;
  --btn-bg-hover: #ff8f60;
  --ok: #5fd68f;
  --ok-soft: #12261a;
  --warn: #ffc56b;
  --warn-soft: #2a1f0c;
  --code-bg: #0a0a0d;
  --code-ink: #e9e6df;
  --code-line: #23222a;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 12px 32px -8px rgb(0 0 0 / 0.55);
  --shadow-lg: 0 2px 4px rgb(0 0 0 / 0.3), 0 30px 70px -20px rgb(0 0 0 / 0.7);
  --glow: rgb(255 122 69 / 0.13);
  color-scheme: dark;
}

/* ---------- base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 84px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

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

img {
  height: auto;
}

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

a:hover {
  text-decoration-thickness: 2px;
}

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

main:focus {
  outline: none;
}

h1,
h2,
h3,
h4 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

p {
  margin: 0 0 1em;
}

code,
kbd,
pre {
  font-family: var(--mono);
  font-size: 0.9em;
}

kbd {
  display: inline-block;
  min-width: 1.7em;
  padding: 0.05em 0.45em;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--bg-elev);
  color: var(--ink);
  font-size: 0.82em;
  text-align: center;
  line-height: 1.5;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 0.6em 1em;
  border-radius: var(--radius-sm);
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

@media (min-width: 768px) {
  :root {
    --gutter: 28px;
  }
}

.muted {
  color: var(--ink-3);
}

.small {
  font-size: 0.875rem;
}

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- buttons ---------- */

.btn {
  --btn-pad: 0.78em 1.25em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: var(--btn-pad);
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 160ms var(--ease),
    background-color 160ms var(--ease),
    box-shadow 160ms var(--ease),
    border-color 160ms var(--ease);
}

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

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: var(--btn-bg);
  color: var(--btn-ink);
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  background: var(--btn-bg-hover);
  box-shadow: 0 10px 24px -10px var(--accent);
}

.btn--ghost {
  border-color: var(--line-strong);
  background: var(--bg-elev);
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--ink-3);
}

.btn--sm {
  --btn-pad: 0.45em 0.95em;
  font-size: 0.9rem;
}

.btn .icon {
  width: 18px;
  height: 18px;
}

.copy-btn {
  padding: 0.3em 0.75em;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg-elev);
  color: var(--ink-2);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.copy-btn:hover {
  color: var(--ink);
  border-color: var(--ink-3);
}

.copy-btn.is-done {
  border-color: var(--ok);
  color: var(--ok);
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand__mark {
  width: 32px;
  height: 32px;
  flex: none;
}

/* The goose mark (header, Gooseplicant) and the Gosling mark (a goose peeking out of an open folder, on the
   product's navy tile; same drawing as ats/packages/ui/src/lite/file-browser.svg). Fixed colors; the goose
   tile lifts a little in dark. */
.goose-mark__tile {
  fill: #17161c;
}

.goose-mark__body {
  fill: #fbfaf7;
}

.goose-mark__tail {
  fill: #fbfaf7;
  stroke: #fbfaf7;
  stroke-width: 0.8;
  stroke-linejoin: round;
}

.goose-mark__neck {
  fill: none;
  stroke: #fbfaf7;
  stroke-width: 3.9;
  stroke-linecap: round;
}

.goose-mark__beak {
  fill: #f2602a;
  stroke: #f2602a;
  stroke-width: 0.8;
  stroke-linejoin: round;
}

.goose-mark__eye {
  fill: #17161c;
}

.goose-mark__wing {
  fill: none;
  stroke: #d2cdc3;
  stroke-width: 1.1;
  stroke-linecap: round;
}

.fb-mark__tile,
.fb-mark__ink {
  fill: #0b1f3a;
}

.fb-mark__back {
  fill: #e3ac12;
}

.fb-mark__front {
  fill: #ffd23f;
}

.fb-mark__halo,
.fb-mark__neck {
  fill: none;
  stroke: #0b1f3a;
  stroke-width: 6.4;
  stroke-linecap: round;
}

.fb-mark__neck {
  stroke: #fbfaf7;
  stroke-width: 4.8;
}

.fb-mark__head {
  fill: #fbfaf7;
}

.fb-mark__beak {
  fill: #ff8a3d;
  stroke: #ff8a3d;
  stroke-width: 1;
  stroke-linejoin: round;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .goose-mark__tile {
    fill: #2a2931;
  }
}

:root[data-theme="dark"] .goose-mark__tile {
  fill: #2a2931;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav ul {
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: block;
  padding: 0.45em 0.7em;
  border-radius: 999px;
  color: var(--ink-2);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--ink);
  background: var(--bg-sunk);
}

.site-nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--bg-sunk);
}

.site-nav__wide {
  display: none;
}

@media (max-width: 400px) {
  .brand {
    gap: 8px;
    font-size: 1.04rem;
  }
  .site-nav a {
    padding-inline: 0.5em;
  }
}

@media (max-width: 340px) {
  .site-nav a {
    padding-inline: 0.4em;
    font-size: 0.9rem;
  }
  .theme-toggle {
    margin-left: 0;
  }
}

@media (min-width: 560px) {
  .site-nav__wide {
    display: block;
  }
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-left: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg-elev);
  color: var(--ink);
  cursor: pointer;
}

.theme-toggle[hidden] {
  display: none;
}

.theme-toggle .icon {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon--moon {
  display: none;
}

.theme-toggle[aria-pressed="true"] .icon--moon {
  display: block;
}

.theme-toggle[aria-pressed="true"] .icon--sun {
  display: none;
}

/* ---------- landing: hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 24px;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto;
  height: 720px;
  z-index: -1;
  background:
    radial-gradient(40% 50% at 70% 30%, var(--glow), transparent 70%),
    radial-gradient(30% 40% at 15% 10%, rgb(255 179 71 / 0.12), transparent 70%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(var(--line-strong) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, rgb(0 0 0 / 0.5), transparent 60%);
  -webkit-mask-image: linear-gradient(to bottom, rgb(0 0 0 / 0.5), transparent 60%);
}

@media (min-width: 900px) {
  .hero {
    padding: 96px 0 40px;
  }
}

.hero__copy {
  max-width: 820px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  padding: 0.35em 0.85em 0.35em 0.4em;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg-elev);
  color: var(--ink-2);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.eyebrow__dot {
  display: inline-block;
  padding: 0.1em 0.55em;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 0.78rem;
  font-weight: 700;
}

.hero h1 {
  font-size: clamp(2.35rem, 7.2vw, 4.6rem);
  font-weight: 820;
  letter-spacing: -0.045em;
  line-height: 1.02;
  margin-bottom: 20px;
}

.mark {
  position: relative;
  white-space: nowrap;
  background: linear-gradient(transparent 62%, color-mix(in srgb, var(--accent) 34%, transparent) 62%);
  border-radius: 4px;
}

.lede {
  max-width: 680px;
  color: var(--ink-2);
  font-size: clamp(1.08rem, 2.2vw, 1.3rem);
  line-height: 1.55;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.cta-meta {
  margin-top: 14px;
  color: var(--ink-3);
  font-size: 0.875rem;
}

.hero__shot {
  position: relative;
  margin-top: 48px;
}

@media (min-width: 900px) {
  .hero__shot {
    margin-top: 64px;
  }
}

.frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  box-shadow: var(--shadow-lg);
}

.frame__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-sunk);
}

.frame__bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-strong);
}

.frame__url {
  display: none;
  margin-left: 10px;
  padding: 2px 12px;
  border-radius: 999px;
  background: var(--bg-elev);
  color: var(--ink-3);
  font-size: 0.72rem;
  font-family: var(--mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.frame img {
  width: 100%;
}

@media (min-width: 560px) {
  .frame__url {
    display: block;
  }
}

.theme-shot--dark {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-shot--light {
    display: none;
  }
  :root:not([data-theme="light"]) .theme-shot--dark {
    display: block;
  }
}

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

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

.chip {
  position: absolute;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 0.55em 0.95em;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg-elev);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 650;
  box-shadow: var(--shadow);
}

.chip .icon {
  width: 16px;
  height: 16px;
  color: var(--ok);
}

.chip--a {
  left: -18px;
  top: 22%;
}

.chip--b {
  right: -14px;
  bottom: 16%;
}

.chip--b .icon {
  color: var(--accent-ink);
}

@media (min-width: 1100px) {
  .chip {
    display: inline-flex;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .chip--a {
    animation: float 6s ease-in-out infinite;
  }
  .chip--b {
    animation: float 7s ease-in-out -2s infinite;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* ---------- landing: sections ---------- */

.section {
  padding: 72px 0;
}

@media (min-width: 900px) {
  .section {
    padding: 112px 0;
  }
}

.section--sunk {
  border-block: 1px solid var(--line);
  background: var(--bg-sunk);
}

.section__head {
  max-width: 720px;
  margin-bottom: 44px;
}

.kicker {
  margin: 0 0 12px;
  color: var(--accent-ink);
  font-size: 0.8rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section h2 {
  font-size: clamp(1.85rem, 4.4vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.section__head p {
  color: var(--ink-2);
  font-size: 1.1rem;
}

.feature-row {
  display: grid;
  gap: 32px;
  align-items: center;
}

.feature-row + .feature-row {
  margin-top: 72px;
}

@media (min-width: 960px) {
  .feature-row {
    grid-template-columns: 5fr 7fr;
    gap: 56px;
  }
  .feature-row--flip {
    grid-template-columns: 7fr 5fr;
  }
  .feature-row--flip .feature-row__text {
    order: 2;
  }
}

.feature-row h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 780;
  letter-spacing: -0.03em;
}

.feature-row p {
  color: var(--ink-2);
}

.ticks {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.ticks li {
  position: relative;
  margin: 0 0 10px;
  padding-left: 30px;
  color: var(--ink-2);
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.32em;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.4l2.6 2.6L13 6.6' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
      center / 18px no-repeat,
    var(--accent);
}

.cards {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.card {
  position: relative;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  box-shadow: var(--shadow-sm);
  transition:
    transform 220ms var(--ease),
    box-shadow 220ms var(--ease),
    border-color 220ms var(--ease);
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.card h3 {
  font-size: 1.15rem;
  font-weight: 720;
  letter-spacing: -0.015em;
}

.card p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.97rem;
}

.card__icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.card__icon .icon {
  width: 22px;
  height: 22px;
}

/* light/dark comparison */
.compare {
  --split: 50%;
  position: relative;
}

.compare__stage {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.compare__stage img {
  width: 100%;
}

.compare__top {
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 var(--split));
}

.compare__top img {
  height: 100%;
  object-fit: cover;
}

.compare__line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--split);
  width: 2px;
  margin-left: -1px;
  background: var(--accent);
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.08);
}

.compare__line::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 3px solid var(--accent);
  border-radius: 50%;
  background: var(--bg-elev);
}

.compare__labels {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  color: var(--ink-3);
  font-size: 0.85rem;
  font-weight: 600;
}

.compare__range {
  display: block;
  width: 100%;
  margin: 14px 0 0;
  accent-color: var(--accent);
}

.compare:not(.is-live) .compare__range {
  display: none;
}

/* phones */
.phones {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  margin-top: 56px;
  gap: 18px;
}

.phone {
  width: min(46%, 260px);
  padding: 8px;
  border-radius: 34px;
  background: #0d0d10;
  box-shadow: 0 0 0 1px var(--line-strong), var(--shadow-lg);
}

.phone img {
  border-radius: 27px;
}

.phone:nth-child(2) {
  margin-top: 40px;
}

/* runtimes table */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
}

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

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

tr:last-child > * {
  border-bottom: 0;
}

thead th {
  background: var(--bg-sunk);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

tbody th {
  color: var(--ink-3);
  font-weight: 600;
  white-space: nowrap;
}

.runtime-table td {
  min-width: 150px;
}

.runtime-links {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

@media (min-width: 720px) {
  .runtime-links {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.runtime-link {
  display: block;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  color: var(--ink);
  text-decoration: none;
  transition:
    border-color 160ms var(--ease),
    transform 160ms var(--ease);
}

.runtime-link:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.runtime-link strong {
  display: block;
  margin-bottom: 2px;
}

.runtime-link span {
  color: var(--ink-3);
  font-size: 0.9rem;
}

/* diagram */
.diagram {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  box-shadow: var(--shadow-sm);
}

.diagram svg {
  width: 100%;
  height: auto;
}

.diagram--wide {
  display: none;
}

@media (min-width: 760px) {
  .diagram--wide {
    display: block;
  }
  .diagram--tall {
    display: none;
  }
}

.diagram--tall svg {
  max-width: 340px;
  margin-inline: auto;
}

.dg-box {
  fill: var(--bg-sunk);
  stroke: var(--line-strong);
  stroke-width: 1.5;
}

.dg-box--accent {
  fill: var(--accent-soft);
  stroke: var(--accent);
}

.dg-title {
  fill: var(--ink);
  font: 700 15px var(--font);
}

.dg-text {
  fill: var(--ink-3);
  font: 500 12.5px var(--font);
}

.dg-mono {
  fill: var(--accent-ink);
  font: 600 12px var(--mono);
}

.dg-line {
  fill: none;
  stroke: var(--ink-3);
  stroke-width: 1.6;
}

.dg-line--accent {
  stroke: var(--accent);
  stroke-width: 2.2;
}

.dg-dash {
  stroke-dasharray: 5 5;
}

.dg-zone {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 1.5;
  stroke-dasharray: 6 6;
}

.dg-label {
  fill: var(--ink-3);
  font: 700 11px var(--font);
  letter-spacing: 0.08em;
}

.dg-arrow {
  fill: var(--ink-3);
}

.dg-arrow--accent {
  fill: var(--accent);
}

@media (prefers-reduced-motion: no-preference) {
  .dg-flow {
    stroke-dasharray: 7 7;
    animation: flow 1.4s linear infinite;
  }
}

@keyframes flow {
  to {
    stroke-dashoffset: -28;
  }
}

.steps-inline {
  display: grid;
  gap: 16px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: s;
}

@media (min-width: 760px) {
  .steps-inline {
    grid-template-columns: repeat(3, 1fr);
  }
}

.steps-inline li {
  counter-increment: s;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.95rem;
}

.steps-inline li::before {
  content: counter(s);
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.8rem;
  font-weight: 800;
}

.steps-inline strong {
  display: block;
  color: var(--ink);
}

/* FAQ */
.faq {
  max-width: 820px;
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  position: relative;
  padding: 20px 40px 20px 0;
  font-weight: 680;
  font-size: 1.08rem;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -7px;
  border-right: 2px solid var(--ink-3);
  border-bottom: 2px solid var(--ink-3);
  transform: rotate(45deg);
  transition: transform 200ms var(--ease);
}

.faq details[open] summary::after {
  transform: rotate(225deg);
  margin-top: -2px;
}

.faq details > div {
  padding: 0 0 20px;
  color: var(--ink-2);
}

/* closing CTA */
.cta-band {
  position: relative;
  overflow: hidden;
  padding: 48px 28px;
  border-radius: var(--radius-lg);
  background: var(--ink);
  color: var(--bg);
  isolation: isolate;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: auto -20% -60% 30%;
  height: 120%;
  z-index: -1;
  background: radial-gradient(closest-side, var(--accent), transparent);
  opacity: 0.55;
}

.cta-band h2 {
  color: var(--bg);
}

.cta-band p {
  max-width: 560px;
  color: color-mix(in srgb, var(--bg) 78%, transparent);
}

.cta-band .btn--primary {
  background: var(--accent);
  color: #1b0d06;
}

.cta-band .btn--ghost {
  background: transparent;
  border-color: color-mix(in srgb, var(--bg) 40%, transparent);
  color: var(--bg);
}

@media (min-width: 900px) {
  .cta-band {
    padding: 72px 64px;
  }
}

/* reveal */
.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 700ms var(--ease),
    transform 700ms var(--ease);
}

.js-reveal [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- page header (downloads, docs index) ---------- */

.page-head {
  padding: 56px 0 32px;
}

.page-head h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.4rem);
  font-weight: 820;
  letter-spacing: -0.04em;
}

.page-head p {
  max-width: 680px;
  color: var(--ink-2);
  font-size: 1.12rem;
}

/* ---------- downloads ---------- */

.release {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  box-shadow: var(--shadow);
}

@media (min-width: 760px) {
  .release {
    padding: 36px;
  }
}

.release__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 16px;
  margin-bottom: 22px;
}

.release__version {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 820;
  letter-spacing: -0.03em;
}

.badge {
  display: inline-block;
  padding: 0.18em 0.7em;
  border-radius: 999px;
  background: var(--ok-soft);
  color: var(--ok);
  font-size: 0.8rem;
  font-weight: 700;
}

.files {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.file {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.file__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.file__kind {
  padding: 0.15em 0.6em;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.file__name {
  color: var(--ink);
  font-family: var(--mono);
  font-weight: 600;
  text-decoration: none;
}

.file__name:hover {
  text-decoration: underline;
}

.file__size {
  color: var(--ink-3);
  font-size: 0.9rem;
}

.file__dl {
  margin-left: auto;
}

.file__sha {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-top: 12px;
}

.file__label {
  color: var(--ink-3);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.sha {
  flex: 1 1 260px;
  min-width: 0;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--bg-sunk);
  color: var(--ink-2);
  font-size: 0.8rem;
  word-break: break-all;
}

.empty-state {
  padding: 32px;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  text-align: center;
}

.empty-state h2 {
  font-size: 1.5rem;
}

.grid-2 {
  display: grid;
  gap: 20px;
}

@media (min-width: 860px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.older {
  margin: 0;
  padding-left: 1.2em;
}

.older li {
  margin-bottom: 6px;
}

/* ---------- docs ---------- */

.docs {
  display: grid;
  gap: 8px;
  padding-top: 20px;
  padding-bottom: 80px;
}

@media (min-width: 900px) {
  .docs {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 48px;
    padding-top: 40px;
  }
}

@media (min-width: 1240px) {
  .docs {
    grid-template-columns: 220px minmax(0, 1fr) 200px;
  }
}

.docs__side {
  min-width: 0;
}

.docs-side-sticky {
  display: none;
}

@media (min-width: 900px) {
  .docs-menu {
    display: none;
  }
  .docs-side-sticky {
    display: block;
    position: sticky;
    top: 88px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
  }
}

.docs-menu {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
}

.docs-menu summary {
  padding: 12px 16px;
  font-weight: 650;
  cursor: pointer;
}

.docs-menu .docs-nav {
  padding: 0 16px 12px;
}

.docs-nav__group {
  margin: 18px 0 6px;
  color: var(--ink-3);
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.docs-nav__group:first-child {
  margin-top: 0;
}

.docs-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.docs-nav a {
  display: block;
  margin-left: -10px;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--ink-2);
  font-size: 0.95rem;
  text-decoration: none;
}

.docs-nav a:hover {
  background: var(--bg-sunk);
  color: var(--ink);
}

.docs-nav a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 650;
}

.docs__toc {
  display: none;
}

@media (min-width: 1240px) {
  .docs__toc {
    display: block;
  }
  .toc {
    position: sticky;
    top: 88px;
  }
}

.toc__title {
  margin-bottom: 8px;
  color: var(--ink-3);
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 1px solid var(--line);
}

.toc a {
  display: block;
  padding: 4px 0 4px 14px;
  color: var(--ink-3);
  font-size: 0.875rem;
  text-decoration: none;
}

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

/* prose */
.prose {
  min-width: 0;
  max-width: 760px;
}

.prose > h1 {
  font-size: clamp(2rem, 5vw, 2.7rem);
  font-weight: 820;
  letter-spacing: -0.035em;
  margin-top: 8px;
}

.prose .intro {
  color: var(--ink-2);
  font-size: 1.15rem;
}

.prose h2 {
  margin-top: 2.4em;
  padding-top: 0.2em;
  font-size: 1.55rem;
  font-weight: 760;
}

.prose h3 {
  margin-top: 1.8em;
  font-size: 1.18rem;
  font-weight: 720;
}

.prose h2,
.prose h3 {
  position: relative;
}

.anchor {
  margin-left: 0.35em;
  color: var(--ink-3);
  font-weight: 500;
  text-decoration: none;
  opacity: 0;
  transition: opacity 120ms;
}

h2:hover .anchor,
h3:hover .anchor,
.anchor:focus-visible {
  opacity: 1;
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
}

.prose li {
  margin-bottom: 0.4em;
}

.prose :not(pre) > code {
  padding: 0.12em 0.4em;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-sunk);
  color: var(--ink);
  font-size: 0.86em;
  overflow-wrap: anywhere;
}

.prose table {
  font-size: 0.9rem;
}

.prose td:first-child code {
  white-space: nowrap;
}

.prose td code {
  overflow-wrap: anywhere;
}

.prose .table-wrap {
  margin: 1.2em 0 1.6em;
}

/* numbered steps */
ol.steps {
  margin: 1.4em 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

ol.steps > li {
  position: relative;
  margin: 0;
  padding: 0 0 1.6em 48px;
  counter-increment: step;
}

ol.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.05em;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.85rem;
  font-weight: 800;
}

ol.steps > li::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 36px;
  bottom: 6px;
  width: 2px;
  background: var(--line);
}

ol.steps > li:last-child::after {
  display: none;
}

ol.steps > li > strong:first-child {
  display: block;
  margin-bottom: 0.3em;
  font-size: 1.05rem;
}

/* callouts */
.callout {
  margin: 1.4em 0;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  color: var(--ink-2);
  font-size: 0.97rem;
}

.callout p:last-child {
  margin-bottom: 0;
}

.callout strong:first-child {
  color: var(--ink);
}

.callout--warn {
  border-left-color: var(--warn);
  background: var(--warn-soft);
}

.callout--ok {
  border-left-color: var(--ok);
  background: var(--ok-soft);
}

/* code blocks */
.code {
  position: relative;
  margin: 1em 0 1.4em;
  border-radius: var(--radius);
  background: var(--code-bg);
  box-shadow: var(--shadow-sm);
}

.code__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  padding: 4px 6px 4px 16px;
  border-bottom: 1px solid var(--code-line);
}

.code__title {
  color: #a9a5b0;
  font-family: var(--mono);
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.code pre {
  margin: 0;
  padding: 14px 18px 16px;
  overflow-x: auto;
  color: var(--code-ink);
  font-size: 0.84rem;
  line-height: 1.65;
  tab-size: 2;
}

.code pre:focus-visible {
  outline-offset: -3px;
}

.copy-btn--code {
  flex: none;
  padding-block: 0.2em;
  border-color: #3a3842;
  background: #24232b;
  color: #d8d4dd;
}

.copy-btn--code:hover {
  border-color: #5a5763;
  color: #fff;
}

/* pager */
.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 56px;
}

.pager__link {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
}

.pager__link:hover {
  border-color: var(--accent);
}

.pager__link--next {
  text-align: right;
}

.pager__dir {
  display: block;
  color: var(--ink-3);
  font-size: 0.8rem;
}

.pager__title {
  font-weight: 650;
}

.doc-cards {
  display: grid;
  gap: 14px;
  margin: 1.4em 0;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.doc-card {
  display: block;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
  color: var(--ink);
  text-decoration: none;
}

.doc-card:hover {
  border-color: var(--accent);
}

.doc-card strong {
  display: block;
  margin-bottom: 4px;
}

.doc-card span {
  color: var(--ink-3);
  font-size: 0.92rem;
}

/* ---------- footer ---------- */

.site-footer {
  margin-top: 40px;
  padding: 56px 0 32px;
  border-top: 1px solid var(--line);
  background: var(--bg-sunk);
}

.site-footer__inner {
  display: grid;
  gap: 32px;
}

@media (min-width: 860px) {
  .site-footer__inner {
    grid-template-columns: 1.2fr 2fr;
  }
}

.site-footer__name {
  margin-bottom: 4px;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.site-footer__nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 24px;
}

.site-footer__heading {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 750;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li {
  margin-bottom: 6px;
}

.site-footer__nav a {
  color: var(--ink-2);
  font-size: 0.95rem;
  text-decoration: none;
}

.site-footer__nav a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  position: relative;
  margin-top: 40px;
  padding-top: 20px;
}

.site-footer__base::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  border-top: 1px solid var(--line);
}

.site-footer__base p {
  margin: 0;
}

.credit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.35em 0.8em 0.35em 0.5em;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg-elev);
  color: var(--ink-2);
  font-size: 0.85rem;
  font-weight: 650;
  text-decoration: none;
}

.credit svg {
  width: 18px;
  height: 18px;
  fill: #8fb36a;
}

.credit:hover {
  color: var(--ink);
  border-color: #8fb36a;
}

/* ---------- 404 ---------- */

.notfound {
  padding: 96px 0 64px;
  text-align: center;
}

.notfound h1 {
  font-size: clamp(3rem, 12vw, 6rem);
  font-weight: 850;
  letter-spacing: -0.06em;
  margin-bottom: 0.1em;
}

.notfound .cta-row {
  justify-content: center;
}

/* ---------- editions table (landing, Gosling page) ---------- */

.editions {
  margin-top: 56px;
}

.edition-table {
  table-layout: fixed;
}

.edition-table col.edition-table__label {
  width: 30%;
}

.edition-table thead th {
  vertical-align: bottom;
}

.edition-table thead code {
  display: block;
  margin-top: 4px;
  color: var(--ink-3);
  font-size: 0.78rem;
  font-weight: 500;
}

.edition-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 780;
  letter-spacing: -0.01em;
}

.edition-head__mark {
  width: 26px;
  height: 26px;
  flex: none;
}

.edition-table tbody th {
  white-space: normal;
}

@media (max-width: 559px) {
  .edition-table {
    font-size: 0.86rem;
  }
  .edition-table th,
  .edition-table td {
    padding: 10px 8px;
  }
  .edition-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    font-size: 0.9rem;
  }
  .edition-table tbody th {
    min-width: 0;
  }
  .edition-table code {
    overflow-wrap: anywhere;
  }
}

.edition-table .yes::before,
.edition-table .no::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 8px;
  vertical-align: -5px;
  border-radius: 50%;
}

.edition-table .yes::before {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.4l2.6 2.6L13 6.6' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
      center / 20px no-repeat,
    var(--ok);
}

.edition-table .no::before {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M6 9h6' fill='none' stroke='%2366636e' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E")
      center / 20px no-repeat,
    var(--bg-sunk);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

/* ---------- Gosling page ---------- */

.lite-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 56px 0 24px;
}

.lite-hero::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto 40%;
  height: 520px;
  z-index: -1;
  background: radial-gradient(closest-side, rgb(255 210 63 / 0.22), transparent);
  pointer-events: none;
}

.lite-hero__mark {
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
}

.lite-hero h1 {
  max-width: 820px;
  font-size: clamp(2.3rem, 6.5vw, 4rem);
  font-weight: 830;
  letter-spacing: -0.045em;
}

.lite-hero .lede {
  max-width: 700px;
}

.lite-shot {
  margin-top: 40px;
}

.zip-tree {
  margin: 0;
}

.mini-steps {
  display: grid;
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: mini;
}

.mini-steps li {
  position: relative;
  padding-left: 40px;
  color: var(--ink-2);
  counter-increment: mini;
}

.mini-steps li::before {
  content: counter(mini);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 0.85rem;
  font-weight: 800;
}

.mini-steps strong {
  color: var(--ink);
}

.run-modes {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

.run-mode {
  min-width: 0;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
}

.run-mode h3 {
  font-size: 1.3rem;
}

.run-mode p {
  color: var(--ink-2);
}

.run-mode .code {
  margin-bottom: 0;
}

.illustration-note {
  margin-top: 10px;
  color: var(--ink-3);
  font-size: 0.85rem;
}

/* screenshots inside docs */
.figure {
  margin: 1.4em 0 1.8em;
}

.figure img {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.figure figcaption {
  margin-top: 8px;
  color: var(--ink-3);
  font-size: 0.85rem;
}
