/* ==========================================================================
   unbreach.io

   Design read: B2B landing for a security model API sold per token, for
   developers and security leads. Precise, engineered, no AI-glow.
   Dials: DESIGN_VARIANCE 7 / MOTION_INTENSITY 6 / VISUAL_DENSITY 4.

   Palette: dark zinc neutrals + one signal-orange accent. Dark mode only.
   Shape:   radius 0 everywhere (buttons, inputs, panels, tabs).
   Type:    Satoshi (display + text, same-family italic for emphasis),
            JetBrains Mono for code, model ids and numbers in UI.
   ========================================================================== */

:root {
  /* Dark only */
  --bg: #111113;
  --bg-2: #18181b;
  --surface: #18181b;
  --ink: #ececee;
  --muted: #a1a1aa;
  --line: #2a2a2f;
  --line-strong: #ececee;
  --accent: #ef7b4c;
  --accent-hover: #f48d63;
  --accent-ink: #f08a5d;
  --on-accent: #141416;
  --code-bg: #0b0b0d;
  --code-line: #25252a;
  --code-text: #b4b4bc;
  --code-strong: #f4f4f5;
  --code-dim: #8a8a93;

  --font: 'Satoshi', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --gutter: clamp(16px, 4vw, 32px);
  --nav-h: 60px;
  --nav-gap: 12px;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + var(--nav-gap) + 20px);
  overflow-x: clip;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  transition: background-color .3s, color .3s;
}

[hidden] { display: none !important; }
svg { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; border-radius: 0; cursor: pointer; }
ul { list-style: none; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 14px;
  background: var(--ink); color: var(--bg);
}
.skip:focus { top: 12px; }

.container { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(88px, 11vw, 140px); }

h1, h2, h3 { font-weight: 700; letter-spacing: -.035em; line-height: 1.05; text-wrap: balance; }
.h2 { font-size: clamp(2rem, 3.6vw, 3.1rem); max-width: 22ch; }
.lead {
  margin-top: 16px;
  font-size: clamp(1.02rem, 1.25vw, 1.15rem);
  color: var(--muted);
  max-width: 58ch;
  text-wrap: pretty;
}
.eyebrow {
  display: inline-block;
  margin-bottom: 16px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.lead__link { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--accent) 70%, transparent); white-space: nowrap; }
.lead__link i { font-size: .9em; transition: transform .3s var(--ease); }
.lead__link:hover i { transform: translateX(3px); }
p code, .lead code {
  font-family: var(--mono);
  font-size: .88em;
  padding: .1em .35em;
  background: var(--bg-2);
  color: var(--ink);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 22px;
  font-size: 15.5px;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background-color .2s var(--ease), color .2s, border-color .2s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn--sm { height: 40px; padding: 0 16px; font-size: 14.5px; }
.btn--accent { background: var(--accent); color: var(--on-accent); }
.btn--accent:hover { background: var(--accent-hover); }
.btn--line { border-color: var(--line-strong); color: var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--bg); }
.btn i { font-size: 17px; transition: transform .3s var(--ease); }
.btn:hover .ph-arrow-right { transform: translateX(3px); }

.icon-btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 18px;
  transition: border-color .2s, background-color .2s;
}
.icon-btn:hover { border-color: var(--ink); }

/* ==========================================================================
   Navigation
   ========================================================================== */

/* Floating glass bar: a capsule as wide as its content, centered, hovering
   over the page and blurring what scrolls under it. Plain transparency, a
   hairline edge, no reflections.
   The one rounded shape on the site: a capsule, with its buttons and the
   mobile menu rounded to match (concentric corners). */
.nav {
  position: sticky; top: 0; z-index: 40;
  padding: var(--nav-gap) var(--nav-gap) 0;
  pointer-events: none; /* only the bar and the menu take clicks */
  transition: opacity .5s var(--ease);
}
.nav .nav__inner {
  width: max-content;
  max-width: 100%;
  height: var(--nav-h);
  margin-inline: auto;
  padding-inline: 24px 9px;
  display: flex; align-items: center; gap: 32px;
  pointer-events: auto;
  border-radius: calc(var(--nav-h) / 2);
  background: color-mix(in srgb, var(--bg) 60%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 12px 32px -18px rgba(0, 0, 0, .6);
  transition: background-color .4s;
}
.nav.is-stuck .nav__inner { background: color-mix(in srgb, var(--bg) 72%, transparent); }
.nav .nav__inner .btn, .nav .menu .btn { border-radius: 999px; }
.nav .nav__burger { border-radius: 50%; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav .nav__inner { background: var(--bg-2); }
}
@media (prefers-reduced-transparency: reduce) {
  .nav .nav__inner, .nav .menu { background: var(--bg-2); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; letter-spacing: -.035em; }
.brand__logo { display: block; width: 122px; height: 22px; }

.nav__links { display: flex; gap: 28px; }
.nav__links a, .nav__login { font-size: 15px; color: var(--muted); transition: color .2s; }
.nav__links a:hover, .nav__login:hover { color: var(--ink); }
.nav__right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.nav__burger { display: none; }

.nav .menu {
  max-width: 440px;
  margin: 8px auto 0;
  pointer-events: auto;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 20px 40px -18px rgba(0, 0, 0, .7);
  border-radius: 26px;
  overflow: hidden;
  animation: menu-in .3s var(--ease);
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px); } }
.menu__links { display: grid; padding-block: 4px 16px; padding-inline: 24px 16px; }
.menu__links a:not(.btn) {
  padding: 14px 0;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -.03em;
  border-bottom: 1px solid var(--line);
}
.menu__links .btn { margin-top: 12px; }
.menu__links .btn:first-of-type { margin-top: 20px; }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero { padding-block: clamp(32px, 5vw, 72px) clamp(56px, 6vw, 80px); }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero__title {
  font-size: clamp(2.5rem, 4.5vw, 4.1rem);
  line-height: 1.02;
  letter-spacing: -.045em;
  max-width: 18ch;
}
.hero__sub {
  margin-top: 24px;
  font-size: clamp(1.05rem, 1.35vw, 1.22rem);
  color: var(--muted);
  max-width: 44ch;
  text-wrap: pretty;
}
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* ---------- Patch panel (hero): the model reads code, finds the flaw, writes the fix ---------- */
.patch { width: 100%; max-width: 560px; justify-self: end; margin: 0; container-type: inline-size; }
.patch__panel {
  display: flex; flex-direction: column;
  height: max(460px, 100cqi); /* square on desktop, never too short for the longest file */
  background: var(--code-bg); border: 1px solid var(--code-line);
}
.patch__tabs { display: flex; flex: none; border-bottom: 1px solid var(--code-line); }
.patch__tabs button {
  height: 44px; padding: 0 16px;
  font-family: var(--mono); font-size: 12.5px; color: var(--code-dim);
  border-right: 1px solid var(--code-line);
  transition: color .2s, background-color .2s;
}
.patch__tabs button:hover { color: var(--ink); }
.patch__tabs button[aria-pressed="true"] { color: var(--ink); background: var(--bg-2); box-shadow: inset 0 2px var(--accent); }
.patch__code {
  flex: 1; overflow: hidden; padding: 16px 0;
  font-family: var(--mono); font-size: clamp(11px, 2.35cqi, 12.5px); line-height: 1.8;
  color: var(--code-text); tab-size: 4;
  font-variant-ligatures: none; /* keep != and := as typed */
}
.patch__line { display: grid; grid-template-columns: 3.4em minmax(0, 1fr); white-space: pre-wrap; overflow-wrap: anywhere; transition: background-color .15s; }
.patch__line .no { padding-right: 1.1em; text-align: right; color: #55555d; user-select: none; }
.patch__line .tx { padding-right: 1.1em; }
.patch__line .s { color: var(--code-strong); }
.patch__line .c { color: var(--code-dim); }
.patch__line.is-scan { background: #1b1b20; }
.patch__line.is-bad { background: color-mix(in srgb, var(--accent) 14%, transparent); box-shadow: inset 2px 0 var(--accent); }
.patch__line.is-old { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.patch__line.is-old .tx, .patch__line.is-old .tx span { color: #6b6b74; text-decoration: line-through; }
.patch__line.is-new { background: #19191e; box-shadow: inset 2px 0 var(--ink); }
.patch__line.is-new .no { color: var(--ink); }
.patch__line.is-note .tx { color: var(--accent-ink); }
.patch__cap { display: flex; justify-content: space-between; gap: 16px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.patch__cap #patch-status { color: var(--ink); text-align: right; }

/* ---------- Arrival intro: the brackets open onto the name, the logo docks in the nav ---------- */
.intro { display: none; position: fixed; inset: 0; z-index: 70; pointer-events: none; }
.intro-pending .intro, .intro.is-on { display: block; }
.intro__br { position: fixed; top: calc(50vh - 80px); width: 34px; height: 160px; border: 12px solid var(--accent); }
.intro__br--l { left: calc(50vw - 56px); border-right: 0; }
.intro__br--r { left: calc(50vw + 22px); border-left: 0; }
.intro__cur { position: fixed; left: calc(50vw - 11px); top: calc(50vh + 36px); width: 22px; height: 10px; background: var(--accent); animation: blink 1s steps(2) infinite; }
.intro__logo { position: fixed; left: 0; top: 0; width: 0; height: 0; overflow: visible; }
.intro__letters { color: var(--ink); }
.intro-pending .nav, .intro-pending .hero__copy, .intro-pending .patch { opacity: 0; }
.intro-logo .nav .brand__logo { visibility: hidden; }

/* ==========================================================================
   Tools marquee (the only marquee on the page)
   ========================================================================== */

.tools { padding-block: 28px 32px; border-block: 1px solid var(--line); }
.tools__title { font-size: 14px; color: var(--muted); margin-bottom: 22px; }
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track { display: flex; width: max-content; animation: marquee 44s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group { display: flex; align-items: center; gap: clamp(48px, 6vw, 88px); padding-right: clamp(48px, 6vw, 88px); }
.tool {
  width: 34px; height: 34px;
  background-color: var(--muted);
  -webkit-mask: var(--i) center / contain no-repeat;
  mask: var(--i) center / contain no-repeat;
  transition: background-color .2s;
}
.tool--wide { width: 72px; }
.tool:hover { background-color: var(--ink); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ==========================================================================
   Statement
   ========================================================================== */

.statement { padding-block: clamp(96px, 13vw, 180px); }
.statement__text {
  font-size: clamp(1.8rem, 3.9vw, 3.4rem);
  line-height: 1.16;
  letter-spacing: -.035em;
  font-weight: 500;
  max-width: 24ch;
  margin-left: clamp(0px, 14vw, 220px);
  text-wrap: pretty;
}
.statement__text em { font-style: italic; }
.statement__text .word { transition: opacity .2s linear; }

/* ==========================================================================
   Models (master / detail)
   ========================================================================== */

.models__ui {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  margin-top: 56px;
  border-top: 1px solid var(--line-strong);
}
.models__list { display: flex; flex-direction: column; }
.model-tab {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 26px 24px 26px 22px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  transition: background-color .25s;
}
.model-tab::before {
  content: '';
  position: absolute; left: 0; top: -1px; bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .45s var(--ease);
}
.model-tab[aria-selected="true"]::before { transform: scaleY(1); }
.model-tab[aria-selected="true"] { background: var(--surface); }
.model-tab__id {
  font-family: var(--mono);
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  font-weight: 500;
  letter-spacing: -.02em;
  color: var(--muted);
  transition: color .25s;
}
.model-tab:hover .model-tab__id,
.model-tab[aria-selected="true"] .model-tab__id { color: var(--ink); }
.model-tab__role { font-size: 15px; color: var(--muted); }

.models__panels { border-left: 1px solid var(--line); padding: 32px 0 32px clamp(24px, 4vw, 56px); }
.model-panel:not([hidden]) { animation: rise .55s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.model-panel__desc {
  font-size: clamp(1.15rem, 1.6vw, 1.4rem);
  line-height: 1.45;
  letter-spacing: -.015em;
  max-width: 40ch;
  text-wrap: pretty;
}
.specs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 36px; border-top: 1px solid var(--line); }
.specs div { padding: 18px 16px 0 0; }
.specs dt { font-size: 13.5px; color: var(--muted); }
.specs dd {
  margin-top: 6px;
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.specs dd small { display: block; margin-top: 4px; font-size: 12.5px; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.uses { display: grid; gap: 10px; margin-top: 36px; }
.uses li { display: flex; gap: 10px; align-items: baseline; }
.uses i { color: var(--accent-ink); font-size: 16px; transform: translateY(2px); }

/* ==========================================================================
   API code component
   ========================================================================== */

.code { margin-top: 48px; background: var(--code-bg); color: var(--code-text); border: 1px solid var(--code-line); }
.code__bar { display: flex; justify-content: space-between; border-bottom: 1px solid var(--code-line); }
.code__tabs { display: flex; }
.code__tabs button {
  position: relative;
  height: 48px;
  padding: 0 20px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--code-dim);
  border-right: 1px solid var(--code-line);
  transition: color .2s;
}
.code__tabs button:hover { color: var(--code-strong); }
.code__tabs button[aria-selected="true"] { color: var(--code-strong); }
.code__tabs button[aria-selected="true"]::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--accent);
}
.code__copy {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0 18px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--code-dim);
  border-left: 1px solid var(--code-line);
  transition: color .2s;
}
.code__copy:hover { color: var(--code-strong); }
.code__copy.is-done { color: var(--accent); }
.code :focus-visible { outline-color: var(--accent); }

.code__body { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.code__req { min-width: 0; }
.code__req pre {
  margin: 0;
  padding: 24px;
  overflow-x: auto;
  font: 13.5px/1.7 var(--mono);
  tab-size: 4;
}
.t-k, .t-n { color: var(--accent); }
.t-s, .t-f { color: var(--code-strong); }

.code__res { display: flex; flex-direction: column; min-width: 0; border-left: 1px solid var(--code-line); }
.code__res-head {
  display: flex; align-items: center; justify-content: space-between;
  height: 44px;
  padding: 0 8px 0 24px;
  border-bottom: 1px solid var(--code-line);
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--code-dim);
}
.code__replay { width: 32px; height: 32px; display: grid; place-items: center; font-size: 16px; color: var(--code-dim); transition: color .2s, transform .4s var(--ease); }
.code__replay:hover { color: var(--code-strong); transform: rotate(-90deg); }
.code__out {
  flex: 1;
  margin: 0;
  padding: 22px 24px;
  min-height: 15.5em;
  font: 13.5px/1.7 var(--mono);
  color: var(--code-strong);
  white-space: pre-wrap;
}
.caret { display: inline-block; width: .55em; height: 1.1em; margin-left: 1px; vertical-align: -.2em; background: var(--accent); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.code__usage { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--code-line); }
.code__usage div { padding: 12px 24px 14px; border-left: 1px solid var(--code-line); }
.code__usage div:first-child { border-left: 0; }
.code__usage dt { font-family: var(--mono); font-size: 11.5px; color: var(--code-dim); }
.code__usage dd { font-family: var(--mono); font-size: 14px; color: var(--code-strong); font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Zero data retention
   ========================================================================== */

.zdr__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 96px); align-items: end; }
.zdr__big {
  margin-bottom: 28px;
  font-size: clamp(7rem, 15vw, 12rem);
  font-weight: 700;
  line-height: .8;
  letter-spacing: -.06em;
  color: var(--accent-ink);
}
.zdr__big small { display: block; margin-top: 14px; font-family: var(--font); font-size: 15px; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.zdr__link { display: inline-flex; align-items: center; gap: 6px; margin-top: 24px; font-weight: 500; color: var(--accent-ink); }
.zdr__link:hover { text-decoration: underline; text-underline-offset: 4px; }
.zdr__lists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line-strong); }
.zdr__col { padding: 24px 24px 0 0; }
.zdr__col + .zdr__col { padding-left: 24px; border-left: 1px solid var(--line); }
.zdr__col h3 { font-size: 1.15rem; letter-spacing: -.02em; }
.zdr__col ul { display: grid; gap: 12px; margin-top: 18px; }
.zdr__col li { display: flex; gap: 10px; align-items: baseline; }
.zdr__col i { flex-shrink: 0; transform: translateY(2px); }
.zdr__col--never i { color: var(--accent-ink); }
.zdr__col--kept i { color: var(--muted); }
.zdr__col--kept li { color: var(--muted); }

/* ==========================================================================
   Use cases (gapless bento, 5 cells)
   ========================================================================== */

.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1px;
  margin-top: 56px;
  background: var(--line);
  border: 1px solid var(--line);
}
.case {
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  min-height: 300px;
  padding: clamp(24px, 2.6vw, 36px);
  background: var(--bg);
  transition: background-color .3s;
}
.case > i { font-size: 28px; }
.case h3 { font-size: clamp(1.2rem, 1.6vw, 1.45rem); letter-spacing: -.03em; }
.case p { margin-top: 8px; font-size: 15.5px; color: var(--muted); max-width: 40ch; }

.case--a { grid-column: span 7; background: var(--accent); color: var(--on-accent); }
.case--a h3 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
.case--a p { color: var(--on-accent); opacity: .88; font-size: 16.5px; }
.case--b { grid-column: span 5; }
.case--c { grid-column: span 5; }
.case--d { grid-column: span 3; }
.case--e { grid-column: span 4; }
.case--e::before {
  content: '';
  position: absolute; inset: 0 0 50% 0;
  background-image: repeating-linear-gradient(135deg, var(--line) 0 1px, transparent 1px 9px);
  pointer-events: none;
}
.case--e > * { position: relative; }

.snippet { padding: 16px 18px; background: var(--code-bg); border: 1px solid var(--code-line); font-family: var(--mono); font-size: 12.5px; line-height: 1.6; color: var(--code-strong); }
.snippet code { display: block; white-space: pre-wrap; word-break: break-word; }
.case .snippet__flag { font-size: 12.5px; max-width: none; }
.snippet__flag { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--code-line); color: var(--accent); }
.snippet__flag i { flex-shrink: 0; font-size: 15px; transform: translateY(2px); }

/* ==========================================================================
   Pricing
   ========================================================================== */

.pricing__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 28px 48px; }
.audience { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); min-width: 280px; border: 1px solid var(--line-strong); }
.audience button { height: 46px; padding: 0 22px; font-size: 15px; font-weight: 500; color: var(--muted); transition: background-color .2s, color .2s; }
.audience button:hover { color: var(--ink); }
.audience button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.pricing__panel { margin-top: 56px; }
.pricing__panel:not([hidden]) { animation: rise .5s var(--ease) both; }
.pricing__title { font-size: clamp(1.5rem, 2.4vw, 2rem); letter-spacing: -.035em; }

/* Plans (individuals): usage is described relatively, never as token counts */
.plans__bar { display: flex; justify-content: flex-end; }
.seg.period { grid-template-columns: repeat(2, minmax(0, 1fr)); width: min(320px, 100%); margin-top: 0; }
.seg.period button { font-family: var(--font); font-size: 14.5px; font-weight: 500; white-space: nowrap; }
.period em { font-family: var(--font); font-style: normal; font-size: 12.5px; color: var(--accent-ink); margin-left: 4px; }
.period button[aria-pressed="true"] em { color: inherit; opacity: .8; }
.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 20px;
  background: var(--line);
  border: 1px solid var(--line);
}
.plan { position: relative; display: flex; flex-direction: column; padding: clamp(24px, 2.6vw, 36px); background: var(--bg); transition: background-color .3s; }
.plan--featured { background: var(--surface); box-shadow: inset 0 3px 0 var(--accent); }
.plan__name { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; font-size: 1.6rem; letter-spacing: -.03em; }
.plan__tag { font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--accent-ink); }
.plan__desc { min-height: 3.2em; margin-top: 6px; font-size: 15.5px; color: var(--muted); }
.plan__price { margin-top: 24px; white-space: nowrap; }
.plan__price b { font-size: 2.8rem; font-weight: 700; letter-spacing: -.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.plan__price small { font-size: 15px; color: var(--muted); }
.plan__billing { min-height: 1.5em; margin-top: 6px; font-size: 14px; color: var(--muted); }
.btn--block { width: 100%; }
.plan .btn--block { margin-top: 24px; }
.plan__lead { margin-top: 28px; font-size: 14.5px; font-weight: 500; }
.plan__feats { display: grid; gap: 10px; margin-top: 12px; font-size: 15.5px; }
.plan__feats li { display: flex; gap: 10px; align-items: baseline; }
.plan__feats i { color: var(--accent-ink); transform: translateY(2px); }
.plans__note { margin-top: 20px; font-size: 14px; color: var(--muted); }

.pricing__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: start; }

.tiers { margin-top: 44px; border-top: 1px solid var(--line-strong); }
.tier { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.tier h3 { font-size: 1.15rem; letter-spacing: -.02em; line-height: 1.3; }
.tier p { grid-column: 1; margin-top: 4px; font-size: 15px; color: var(--muted); max-width: 42ch; }
.tier__price { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tier__link { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; color: var(--accent-ink); }
.tier__link:hover { text-decoration: underline; text-underline-offset: 4px; }

.calc { padding: clamp(24px, 3vw, 40px); background: var(--surface); border: 1px solid var(--line-strong); transition: background-color .3s; }
.calc__label { display: block; font-size: 14px; color: var(--muted); }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 10px; border: 1px solid var(--line); }
.seg button {
  height: 44px;
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--muted);
  border-left: 1px solid var(--line);
  transition: background-color .2s, color .2s;
}
.seg button:first-child { border-left: 0; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.calc__row { display: flex; justify-content: space-between; align-items: baseline; margin-top: 32px; }
.calc__volume { font-family: var(--mono); font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }

.range { --fill: 50%; -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 28px; margin-top: 8px; background: transparent; cursor: pointer; }
.range::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(var(--ink), var(--ink)) 0 0 / var(--fill) 100% no-repeat, var(--line); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -8px; background: var(--accent); border: 0; border-radius: 0; transition: transform .15s; }
.range:active::-webkit-slider-thumb { transform: scale(1.15); }
.range::-moz-range-track { height: 2px; background: var(--line); }
.range::-moz-range-progress { height: 2px; background: var(--ink); }
.range::-moz-range-thumb { width: 18px; height: 18px; background: var(--accent); border: 0; border-radius: 0; }
.range:focus-visible { outline-offset: 4px; }
.range__scale { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 12px; color: var(--muted); }

.calc__total { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.calc__total > p:first-of-type { margin-top: 4px; font-size: 1.4rem; font-weight: 500; line-height: 1.1; }
.calc__total b { font-size: clamp(3rem, 5.4vw, 4.4rem); font-weight: 700; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.calc__total small { font-size: 1rem; font-weight: 400; color: var(--muted); }
.calc__words { margin-top: 12px; font-size: 15px; color: var(--muted); }
.calc__discount { margin-top: 4px; font-size: 14px; font-weight: 500; color: var(--accent-ink); }
.calc__note { margin-top: 24px; font-size: 13px; color: var(--muted); }

/* ==========================================================================
   FAQ
   ========================================================================== */

.faq__inner { max-width: 1280px; }
.faq__list { max-width: 880px; margin-top: 48px; border-top: 1px solid var(--line-strong); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item h3 { font: inherit; letter-spacing: normal; }
.faq__q {
  width: 100%;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 24px 0;
  text-align: left;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  font-weight: 500;
  letter-spacing: -.02em;
}
.faq__q i { flex-shrink: 0; font-size: 20px; transition: transform .4s var(--ease); }
.faq__item.is-open .faq__q i { transform: rotate(45deg); }
.faq__a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease); }
.faq__a > div { overflow: hidden; visibility: hidden; transition: visibility 0s .5s; }
.faq__a p { padding-bottom: 24px; color: var(--muted); max-width: 64ch; }
.faq__a a, .cta__error a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.faq__item.is-open .faq__a { grid-template-rows: 1fr; }
.faq__item.is-open .faq__a > div { visibility: visible; transition-delay: 0s; }

/* ==========================================================================
   CTA
   ========================================================================== */

.cta { padding-block: clamp(96px, 12vw, 160px); background: var(--bg-2); border-top: 1px solid var(--line); transition: background-color .3s; }
.cta__title { font-size: clamp(2.4rem, 5.6vw, 4.8rem); line-height: 1.02; letter-spacing: -.045em; max-width: 15ch; }
.cta__form { width: min(720px, 100%); margin-top: 40px; }
.cta__form label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500; }
.select { position: relative; margin-bottom: 20px; }
.select select {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 52px;
  padding: 0 44px 0 16px;
  font: inherit; font-size: 16px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  cursor: pointer;
}
.select select:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
.select i { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.cta__lead { margin-top: 18px; max-width: 54ch; font-size: clamp(1.02rem, 1.25vw, 1.15rem); color: var(--muted); }
.cta__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
.cta__grid .select { margin-bottom: 0; }
.cta__input {
  width: 100%; height: 52px;
  padding: 0 16px;
  font: inherit; font-size: 16px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  outline: none;
}
.cta__input::placeholder { color: var(--muted); }
.cta__input:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.cta__input[aria-invalid="true"] { border-color: var(--accent-ink); box-shadow: inset 0 0 0 1px var(--accent-ink); }
.cta__submit { margin-top: 24px; height: 52px; padding: 0 28px; }
.nav__signin { white-space: nowrap; }
.cta__row { display: flex; }
.cta__row input {
  flex: 1; min-width: 0;
  height: 52px;
  padding: 0 16px;
  font: inherit; font-size: 16px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-right: 0;
  border-radius: 0;
  outline: none;
}
.cta__row input:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.cta__row input[aria-invalid="true"] { border-color: var(--accent-ink); box-shadow: inset 0 0 0 1px var(--accent-ink); }
.cta__row .btn { height: 52px; }
.cta__alt { margin-top: 18px; font-size: 14px; color: var(--muted); }
.cta__alt a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.cta__alt a:hover { color: var(--accent-ink); }
.cta__help { margin-top: 10px; font-size: 14px; color: var(--muted); }
.cta__error { margin-top: 8px; font-size: 14px; font-weight: 500; color: var(--accent-ink); }
.cta__success { display: flex; gap: 12px; align-items: baseline; margin-top: 40px; font-size: 1.2rem; max-width: 40ch; }
.cta__success i { color: var(--accent-ink); }

/* ==========================================================================
   Footer
   ========================================================================== */

.footer { padding-top: 72px; border-top: 1px solid var(--line); overflow: hidden; }
.footer__top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 48px; }
.footer__brand p { margin-top: 14px; font-size: 15px; color: var(--muted); max-width: 32ch; }
.footer__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.footer__cols h2 { margin-bottom: 12px; font-size: 14px; font-weight: 500; letter-spacing: 0; }
.footer__cols a { display: block; padding: 5px 0; font-size: 15px; color: var(--muted); transition: color .2s; }
.footer__cols a:hover { color: var(--ink); }
.footer__mark { max-width: 1280px; margin: 80px auto 0; padding: 0 var(--gutter) clamp(20px, 3vw, 40px); }
.footer__mark svg { display: block; width: 100%; height: auto; aspect-ratio: 521 / 94; }
.footer__bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding-block: 24px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}

.footer__link { display: block; padding: 5px 0; font-size: 15px; color: var(--muted); text-align: left; transition: color .2s; }
.footer__link:hover { color: var(--ink); }
.footer--slim { padding-top: 0; }
.footer__bottom a { transition: color .2s; }
.footer__bottom a:hover { color: var(--ink); }
.link-btn { display: inline; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================================
   Form loading state
   ========================================================================== */

.spinner {
  display: none;
  width: 14px; height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin .7s linear infinite;
}
.btn.is-loading .spinner { display: inline-block; }
.btn:disabled { cursor: progress; opacity: .85; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   Cookie consent + mobile sticky CTA
   ========================================================================== */

.consent {
  position: fixed; left: 16px; bottom: 16px; z-index: 60;
  width: min(420px, calc(100% - 32px));
  padding: 18px 18px 16px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .6);
  font-size: 14.5px;
  line-height: 1.5;
}
.consent[hidden] { display: none; }
.consent:not([hidden]) { animation: consent-in .6s var(--ease); }
@keyframes consent-in { from { opacity: 0; transform: translateY(14px); } }
.consent a { text-decoration: underline; text-underline-offset: 3px; }
.consent__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }

.sticky-cta { display: none; }

/* ==========================================================================
   Secondary pages: legal, 404, thank-you
   ========================================================================== */

.page { padding-block: clamp(56px, 8vw, 104px) clamp(88px, 10vw, 140px); }
.page__title { font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1.02; letter-spacing: -.045em; max-width: 18ch; }
.page__meta { margin-top: 16px; font-size: 15px; color: var(--muted); }
.toc { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 15px; }
.toc a { color: var(--muted); transition: color .2s; }
.toc a:hover { color: var(--ink); }
.prose { max-width: 72ch; margin-top: 40px; }
.prose h2 { margin: 48px 0 12px; font-size: clamp(1.3rem, 2vw, 1.6rem); letter-spacing: -.025em; scroll-margin-top: calc(var(--nav-h) + 24px); }
.prose h3 { margin: 28px 0 8px; font-size: 1.1rem; letter-spacing: -.015em; }
.prose p { margin-top: 12px; }
.prose ul { list-style: square; display: grid; gap: 6px; margin-top: 12px; padding-left: 1.2em; }
.prose li::marker { color: var(--accent-ink); }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose strong { font-weight: 500; }
.table-wrap { overflow-x: auto; margin-top: 16px; }
.prose table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { padding: 12px 16px 12px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose th { font-weight: 500; border-bottom-color: var(--line-strong); }

.status-page { display: flex; align-items: center; min-height: calc(100dvh - var(--nav-h) - 200px); padding-block: clamp(64px, 10vw, 120px); }
.status-page__code { font-family: var(--mono); font-size: clamp(4rem, 13vw, 9rem); font-weight: 500; line-height: .9; letter-spacing: -.06em; color: var(--accent-ink); }
.status-page__title { margin-top: 24px; font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1.04; letter-spacing: -.045em; max-width: 18ch; }
.status-page__text { margin-top: 16px; max-width: 52ch; font-size: 1.1rem; color: var(--muted); }
.status-page__text b { font-weight: 500; color: var(--ink); }
.status-page__text a { text-decoration: underline; text-underline-offset: 3px; }
.status-page__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.next { max-width: 760px; margin-top: 56px; border-top: 1px solid var(--line-strong); }
.next a { display: flex; justify-content: flex-start; align-items: center; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); font-size: 1.1rem; font-weight: 500; }
.next a span { margin-left: auto; font-size: 15px; font-weight: 400; color: var(--muted); }
.next a i { transition: transform .3s var(--ease); }
.next a:hover i { transform: translateX(4px); }

/* ==========================================================================
   Responsive (explicit collapse per section)
   ========================================================================== */

@media (max-width: 1024px) {
  .nav__links, .nav__login { display: none; }
  .nav__burger { display: grid; }
}

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .patch { justify-self: start; max-width: 560px; }

  .models__ui { grid-template-columns: 1fr; }
  .models__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .model-tab { padding: 18px 14px; border-right: 1px solid var(--line); }
  .model-tab:last-child { border-right: 0; }
  .model-tab::before { top: auto; bottom: -1px; left: 0; right: 0; width: auto; height: 3px; transform: scaleX(0); transform-origin: left; }
  .model-tab[aria-selected="true"]::before { transform: scaleX(1); }
  .models__panels { border-left: 0; padding: 32px 0 0; }

  .code__body { grid-template-columns: 1fr; }
  .code__res { border-left: 0; border-top: 1px solid var(--code-line); }

  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case--a { grid-column: span 2; }
  .case--b, .case--c, .case--d, .case--e { grid-column: span 1; }

  .pricing__grid { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; }
  .zdr__grid { grid-template-columns: 1fr; align-items: start; }
  .plans__bar { justify-content: stretch; }
  .seg.period { width: 100%; }
  .footer__top { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav__cta { display: none; }
  :root { --nav-gap: 8px; --nav-h: 56px; }
  .nav .nav__inner { width: auto; padding-inline: 20px 6px; }
  .nav .menu { max-width: none; }
  .hero__title { font-size: clamp(2rem, 9.2vw, 2.5rem); }
  .hero__ctas .btn { flex: 1 1 100%; }
  .statement__text { margin-left: 0; }

  .model-tab__id { font-size: 15px; }
  .model-tab__role { display: none; }
  .specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .specs div:nth-child(n+3) { margin-top: 8px; }

  .code__tabs button { padding: 0 14px; }
  .code__copy span { display: none; }
  .code__req pre, .code__out { padding: 18px 16px; font-size: 12.5px; }
  .code__res-head { padding-left: 16px; }
  .code__usage div { padding: 12px 16px; }

  .bento { grid-template-columns: 1fr; }
  .case--a, .case--b, .case--c, .case--d, .case--e { grid-column: auto; min-height: 0; }

  .tier { grid-template-columns: 1fr; }
  .audience { width: 100%; min-width: 0; }
  .audience button { height: 48px; font-size: 16px; }
  .plan { padding: 24px 16px; }
  .zdr__lists { grid-template-columns: 1fr; }
  .zdr__col + .zdr__col { padding-left: 0; border-left: 0; margin-top: 24px; border-top: 1px solid var(--line); }
  .zdr__big small { font-size: 16px; }
  .plan__desc, .plan__feats, .plans__note, .plan__billing, .plan__lead { font-size: 16px; }
  .plan__desc { min-height: 0; }
  .tier__price { grid-column: 1; grid-row: auto; margin-top: 10px; }

  .cta__row { flex-direction: column; gap: 10px; }
  .cta__grid { grid-template-columns: minmax(0, 1fr); }
  .cta__submit { width: 100%; }
  .nav__signin { display: none; }
  .cta__row input { flex: none; height: 52px; border-right: 1px solid var(--line-strong); }
  .eyebrow { font-size: 16px; }
  .footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* 390px pass: body copy >= 16px, tap targets >= 44px */
  .lead, .case p, .tier p, .faq__a p, .uses li, .calc__words, .cta__help, .cta__alt, .cta__lead, .cta__error,
  .footer__brand p, .model-panel__desc, .consent, .toc, .prose table, .next a span { font-size: 16px; }
  .specs dt, .calc__label, .tools__title, .calc__note, .cta__form label, .footer__bottom,
  .btn, .model-tab__id, .seg button, .calc__volume { font-size: 16px; }
  .brand { min-height: 44px; }
  .patch__cap { font-size: 13px; }
  .icon-btn, .code__replay { width: 44px; height: 44px; }
  .btn--sm { height: 44px; }
  .range { height: 44px; }
  .tier__link { min-height: 44px; }
  .footer__cols a, .footer__link { display: flex; align-items: center; min-height: 44px; padding: 0; font-size: 16px; }

  .consent { left: 0; right: 0; bottom: 0; width: 100%; border-inline: 0; border-bottom: 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }

  .sticky-cta {
    display: block;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
    transform: translateY(110%);
    transition: transform .4s var(--ease);
  }
  .sticky-cta.is-visible { transform: none; }
  .sticky-cta .btn { width: 100%; }
  .footer { padding-bottom: 76px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .marquee__track { animation: none; }
}

/* ==========================================================================
   API documentation (docs.html): sidebar, reference blocks, tables
   ========================================================================== */

.docs-page { --text-2: #c9c9d0; --good: #5bbf7a; --warn: #fab219; --bad: #f07c7c; }
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(40px, 6vw, 88px); padding-block: 40px 120px; }

/* Sidebar */
.docs__side {
  position: sticky; top: calc(var(--nav-h) + var(--nav-gap) + 28px); align-self: start;
  max-height: calc(100dvh - var(--nav-h) - var(--nav-gap) - 56px); overflow-y: auto;
}
/* The contents scroll on their own (js/docs.js follows the page): no bar beside them. */
.docs__side, .docs__nav { scrollbar-width: none; }
.docs__side::-webkit-scrollbar, .docs__nav::-webkit-scrollbar { display: none; }
.docs__toggle { display: none; }
.docs__group { margin: 26px 0 8px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.docs__group:first-child { margin-top: 0; }
.docs__nav a {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0 6px 14px; font-size: 14.5px; color: var(--muted);
  border-left: 1px solid var(--line); transition: color .2s, border-color .2s;
}
.docs__nav a:hover { color: var(--ink); }
.docs__nav a.is-on { color: var(--ink); border-left-color: var(--accent); }
.method {
  display: inline-block; padding: 1px 5px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .04em; line-height: 1.5;
  color: var(--muted); border: 1px solid var(--line);
}
.method--post { color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }

/* Reading column */
.docs__main { min-width: 0; max-width: 800px; }
.docs__title { font-size: clamp(2.4rem, 5vw, 3.8rem); line-height: 1.02; letter-spacing: -.045em; max-width: 15ch; }
.docs__section { margin-top: 72px; padding-top: 56px; border-top: 1px solid var(--line); }
.docs__section h2 { font-size: clamp(1.75rem, 3vw, 2.3rem); letter-spacing: -.035em; }
.docs__section h3 { margin: 36px 0 4px; font-size: 1.15rem; letter-spacing: -.02em; }
.docs__main p { margin-top: 14px; color: var(--text-2); text-wrap: pretty; }
.docs__main p b, .docs__main li b { font-weight: 500; color: var(--ink); }
.docs__main p a, .docs__main li a, .docs__main td a {
  color: var(--ink); text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--accent) 70%, transparent); transition: text-decoration-color .2s;
}
.docs__main p a:hover, .docs__main li a:hover, .docs__main td a:hover { text-decoration-color: var(--accent); }
.docs__main li code, .docs__main td code, .param p code {
  font-family: var(--mono); font-size: .86em; padding: .1em .35em; background: var(--bg-2); color: var(--ink);
}
.small-note { font-size: 14.5px; }
.docs__main .small-note { color: var(--muted); }

/* Key facts under the title */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 40px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.facts > div { padding: 16px 20px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.facts dt { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.facts dd { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 15.5px; min-width: 0; }
.facts code { font-family: var(--mono); font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }
.facts__copy { flex: none; width: 30px; height: 30px; display: inline-grid; place-items: center; font-size: 15px; color: var(--muted); transition: color .2s; }
.facts__copy:hover, .facts__copy.is-done { color: var(--accent); }

.callout { display: flex; gap: 14px; margin-top: 28px; padding: 16px 20px; background: var(--bg-2); border-left: 2px solid var(--accent); }
.callout > i { flex: none; margin-top: 3px; font-size: 20px; color: var(--accent-ink); }
.callout p { margin: 0 !important; font-size: 15.5px; }
.callout--warn { border-left-color: var(--warn); }
.callout--warn > i { color: var(--warn); }

/* Quickstart steps */
.steps-list { display: grid; gap: 28px; margin-top: 28px; }
.steps-list > li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 18px; }
.steps-list__n { width: 32px; height: 32px; display: grid; place-items: center; font-family: var(--mono); font-size: 13.5px; color: var(--accent-ink); border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); }
.steps-list h3 { margin: 3px 0 0; }
.steps-list p { margin-top: 6px; }

/* Code blocks */
.code--doc { margin-top: 20px; }
.code--doc pre { margin: 0; padding: 20px 24px; overflow-x: auto; font: 13.5px/1.7 var(--mono); tab-size: 4; white-space: pre; }
.code__label { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 20px; font-family: var(--mono); font-size: 13px; color: var(--code-strong); }
.code__meta { color: var(--good); }
.t-c { color: var(--code-dim); }
.t-p { color: var(--code-text); }

/* Endpoint line and parameters */
.endpoint { display: inline-flex; align-items: center; gap: 12px; max-width: 100%; margin-top: 18px; padding: 8px 8px 8px 14px; background: var(--code-bg); border: 1px solid var(--code-line); }
.endpoint code { font-family: var(--mono); font-size: 15px; color: var(--code-strong); overflow-wrap: anywhere; }
.endpoint .method { font-size: 12px; }
.params { margin-top: 14px; border-top: 1px solid var(--line-strong); }
.param { padding: 16px 0; border-bottom: 1px solid var(--line); }
.param__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.param__head > code { font-family: var(--mono); font-size: 14.5px; font-weight: 500; color: var(--ink); }
.param__type { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.param__req, .param__opt { font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; }
.param__req { color: var(--accent-ink); }
.param__opt { color: var(--muted); }
.param p { margin-top: 6px !important; font-size: 15.5px; }

/* Tables */
.dtable { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; }
.dtable th, .dtable td { padding: 12px 16px 12px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.dtable th { font-family: var(--mono); font-size: 11.5px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-bottom-color: var(--line-strong); }
.dtable td { color: var(--text-2); }
.dtable td:first-child { color: var(--ink); }
.dtable .r { text-align: right; font-variant-numeric: tabular-nums; }
.dtable th:last-child, .dtable td:last-child { padding-right: 0; }
.dtable--errors td:nth-child(2) { white-space: nowrap; }
.http { display: inline-block; padding: 1px 6px; font-family: var(--mono); font-size: 12.5px; border: 1px solid; }
.http--4 { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.http--5 { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }

/* Model lifecycle, features */
.stages, .feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: 24px; background: var(--line); border: 1px solid var(--line); }
.stage, .feature { padding: 20px 22px 22px; background: var(--bg); }
.stage p { margin-top: 12px !important; font-size: 15px; }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; font-family: var(--mono); font-size: 12px; border: 1px solid; }
.badge i { font-size: 14px; }
.badge--accent { color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.badge--good { color: var(--good); border-color: color-mix(in srgb, var(--good) 45%, transparent); }
.badge--warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.badge--muted { color: var(--muted); border-color: var(--line); }
.feature > i { font-size: 22px; color: var(--accent-ink); }
.feature h3 { margin: 14px 0 0; font-size: 1.05rem; }
.feature p { margin-top: 6px !important; font-size: 15px; }

/* Lists */
.ticks { display: grid; gap: 12px; margin-top: 16px; }
.ticks li { position: relative; padding-left: 24px; color: var(--text-2); }
.ticks li::before { content: ''; position: absolute; left: 2px; top: .66em; width: 7px; height: 7px; background: var(--accent); }
.checklist-doc { display: grid; gap: 14px; margin-top: 20px; }
.checklist-doc li { display: flex; gap: 12px; color: var(--text-2); }
.checklist-doc i { flex: none; margin-top: 3px; font-size: 20px; color: var(--accent-ink); }
.checklist-doc b { font-weight: 500; color: var(--ink); }

.calc-mini { margin-top: 24px; padding: 18px 22px 20px; background: var(--bg-2); border: 1px solid var(--line); }
.calc-mini__label { margin: 0 !important; font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink) !important; }
.calc-mini p + p { margin-top: 6px; }

.docs__cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; margin-top: 56px; padding: 28px 32px; border: 1px solid var(--line); background: var(--bg-2); }
.docs__cta h3 { margin: 0; font-size: 1.4rem; }
.docs__cta p { margin-top: 6px; }
.docs__cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

@media (max-width: 1024px) {
  :root:has(.docs-page) { scroll-padding-top: calc(var(--nav-h) + var(--nav-gap) + 76px); }
  .docs { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 12px; }
  .docs__side {
    top: calc(var(--nav-h) + var(--nav-gap) + 8px); z-index: 30; max-height: none; overflow: visible;
    margin-inline: calc(-1 * var(--gutter)); padding: 8px var(--gutter);
    background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  }
  .docs__toggle {
    display: flex; align-items: center; gap: 10px; width: 100%; height: 44px; padding: 0 14px;
    font-size: 14.5px; border: 1px solid var(--line); background: var(--bg-2);
  }
  .docs__toggle span { flex: 1; text-align: left; }
  .docs__toggle .ph-caret-down { transition: transform .25s var(--ease); }
  .docs__side.is-open .ph-caret-down { transform: rotate(180deg); }
  /* Floats over the page: opening or closing it never moves the content. */
  .docs__nav {
    display: none; position: absolute; left: var(--gutter); right: var(--gutter); top: calc(100% - 2px);
    max-height: min(64vh, 520px); overflow-y: auto; padding: 6px 14px 14px;
    border: 1px solid var(--line); background: var(--bg-2); box-shadow: 0 24px 48px -24px rgba(0, 0, 0, .8);
  }
  .docs__side.is-open .docs__nav { display: block; }
  .docs__group { margin-top: 18px; }
  .docs__hero { padding-top: 28px; }
}
@media (max-width: 640px) {
  .facts, .stages, .feature-grid { grid-template-columns: minmax(0, 1fr); }
  .docs__section { margin-top: 56px; padding-top: 44px; }
  .code--doc pre { padding: 16px; font-size: 12.5px; }
  .code--doc .code__tabs button { padding: 0 14px; }
  .code--doc .code__copy span { display: none; }
  .docs__cta { padding: 22px; }
  .steps-list > li { gap: 14px; }
}
