/* VoxInvoice site. Palette is the app's: ink navy, bank blue, signal blue, one crimson that only ever means "live". */

@font-face { font-family: "Sora"; src: url("/fonts/sora-600.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Sora"; src: url("/fonts/sora-700.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Sora"; src: url("/fonts/sora-800.ttf") format("truetype"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Albert Sans"; src: url("/fonts/albert-400.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Albert Sans"; src: url("/fonts/albert-500.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Albert Sans"; src: url("/fonts/albert-600.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Albert Sans"; src: url("/fonts/albert-700.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --ink: #0b1f3a;
  --ink-2: #16335c;
  --blue: #1a4b8f;
  --blue-d: #143b72;
  --wave: #7fa9e8;
  --wave-deep: #6fa8ff;
  --ground: #f7fafe;
  --tint: #edf3fb;
  --paper: #ffffff;
  --line: #d5e0ef;
  --line-strong: #b4c6e0;
  --text: #0b1f3a;
  --muted: #465569;
  --on-ink: #ffffff;
  --on-ink-muted: #c3d0e2;
  --live: #c0354a;
  --ok: #0b6b4f;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --display: "Sora", "Albert Sans", system-ui, sans-serif;
  --body: "Albert Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(20px, 5vw, 56px);
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--ground); color: var(--text);
  font: 400 18px/1.6 var(--body); font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--blue); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--blue-d); text-decoration-thickness: 2px; }
::selection { background: var(--wave); color: var(--ink); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.on-ink :focus-visible, .footer :focus-visible { outline-color: var(--wave); }
html { scrollbar-color: var(--line-strong) var(--ground); }

h1, h2, h3 { font-family: var(--display); word-spacing: 0.06em; margin: 0; text-wrap: balance; letter-spacing: -0.025em; line-height: 1.08; }
h1 { font-weight: 800; font-size: clamp(2.4rem, 4.6vw, 4rem); letter-spacing: -0.03em; line-height: 1.04; }
h2 { font-weight: 800; font-size: clamp(2rem, 4.2vw, 3.25rem); }
h3 { font-weight: 700; font-size: 1.3rem; letter-spacing: -0.015em; line-height: 1.2; }
p { margin: 0; text-wrap: pretty; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.55; color: var(--muted); max-width: 34em; }
.on-ink .lead, .on-ink p { color: var(--on-ink-muted); }

.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Header ---------- */
.header { position: sticky; top: 0; z-index: 50; background: var(--ground); border-bottom: 1px solid transparent; transition: border-color 0.3s; }
.header.scrolled { border-bottom-color: var(--line); }
.header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font: 800 1.35rem/1 var(--display); letter-spacing: -0.03em; color: var(--ink); }
.brand img { width: 38px; height: 38px; border-radius: 11px; }
.brand b { color: var(--blue); font-weight: 800; }
.brand:hover { color: var(--ink); }
.nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 36px); }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.98rem; padding: 8px 0; }
.nav a:hover { color: var(--ink); text-decoration: none; }
.nav .pill { color: var(--ink); background: var(--tint); border: 1px solid var(--line); padding: 8px 16px; border-radius: 999px; font-size: 0.92rem; }


/* ---------- Store badges (not links: the apps are not published yet) ---------- */
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store { display: inline-flex; align-items: center; gap: 12px; background: var(--ink); color: #fff; border-radius: 14px; padding: 10px 18px 10px 14px; min-height: 60px; cursor: default; border: 1px solid var(--ink-2); user-select: none; }
.store svg { width: 28px; height: 28px; flex: none; }
.store small { display: block; font-size: 0.72rem; line-height: 1.2; color: var(--on-ink-muted); letter-spacing: 0.01em; }
.store strong { display: block; font: 700 1.15rem/1.15 var(--display); letter-spacing: -0.02em; }
.soon { margin-left: 6px; font: 700 0.7rem/1 var(--body); text-transform: none; letter-spacing: 0.02em; background: var(--wave); color: var(--ink); padding: 5px 9px; border-radius: 999px; white-space: nowrap; }
.stores-note { margin-top: 14px; font-size: 0.95rem; color: var(--muted); }
.on-ink .stores-note { color: var(--on-ink-muted); }

/* ---------- Hero ---------- */
.hero { padding: clamp(32px, 6vw, 72px) 0 clamp(72px, 9vw, 120px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: clamp(40px, 5vw, 80px); align-items: center; }
.hero h1 span { color: var(--blue); }
.hero .lead { margin-top: 28px; }
.hero .stores { margin-top: 36px; }
@media (max-width: 920px) { .hero-grid { grid-template-columns: 1fr; } }

/* The stage: a voice strip that settles into an invoice. Final state is the default; JS arms the animation. */
.stage { position: relative; }
.voice { background: var(--ink); color: #fff; border-radius: 22px; padding: 20px 22px 22px; position: relative; z-index: 2; box-shadow: 0 24px 48px -24px rgba(11, 31, 58, 0.55); }
.voice-head { display: flex; align-items: center; gap: 10px; font: 600 0.88rem/1 var(--body); color: var(--on-ink-muted); }
.voice-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--wave); transition: background 0.4s; }
.stage[data-phase="listen"] .voice-dot { background: var(--live); animation: pulse 1.2s var(--ease) infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(192, 53, 74, 0.6); } 100% { box-shadow: 0 0 0 10px rgba(192, 53, 74, 0); } }
.wave { display: flex; align-items: center; justify-content: space-between; height: 64px; margin: 16px 0 14px; gap: 3px; }
.wave i { display: block; flex: 1; max-width: 7px; height: 100%; border-radius: 4px; background: #fff; transform: scaleY(var(--rest, 0.2)); transform-origin: center; transition: transform 0.9s var(--ease), background 0.9s; }
.wave i.late { background: var(--wave); }
.stage[data-phase="listen"] .wave i { animation: bar var(--d, 0.9s) ease-in-out infinite alternate; animation-delay: var(--delay, 0s); }
@keyframes bar { from { transform: scaleY(0.14); } to { transform: scaleY(var(--h, 0.8)); } }
.said { font-size: 1.06rem; line-height: 1.5; color: #fff; min-height: 3.1em; }
.said .w { transition: opacity 0.3s, color 0.5s; }
.js .said .w { opacity: 0; }
.js .said .w.on { opacity: 1; }
.said.marked .k { color: var(--wave); font-weight: 600; }
.said-en { margin-top: 8px; font-size: 0.88rem; color: var(--on-ink-muted); }

.paper { position: relative; z-index: 1; margin: -14px 14px 0; background: var(--paper); border: 1px solid var(--line); border-radius: 4px 4px 14px 14px; padding: 40px 28px 22px; box-shadow: 0 40px 70px -34px rgba(11, 31, 58, 0.45); }
.paper-top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.paper-client small, .paper-num small { display: block; font-size: 0.74rem; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; }
.paper-client strong { display: block; font: 700 1.1rem/1.3 var(--display); letter-spacing: -0.015em; }
.paper-num { text-align: right; }
.paper-num strong { display: block; font: 600 0.9rem/1.4 var(--body); color: var(--blue); }
.lines { list-style: none; margin: 0; padding: 0; }
.lines li { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
.lines li span:first-child small { display: block; color: var(--muted); font-size: 0.82rem; }
.lines .amt, .tot .amt { font-weight: 700; text-align: right; white-space: nowrap; }
.tot { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding-top: 14px; font-size: 0.95rem; color: var(--muted); }
.tot .grand { font: 800 1.35rem/1.2 var(--display); color: var(--ink); letter-spacing: -0.02em; margin-top: 6px; }
.paper-foot { margin-top: 16px; display: flex; align-items: center; gap: 8px; font-size: 0.86rem; font-weight: 600; color: var(--ok); }
.paper-foot svg { width: 18px; height: 18px; }
.example { margin-top: 14px; font-size: 0.8rem; color: var(--muted); text-align: center; }

.js .paper .reveal { opacity: 0; transform: translateY(10px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.js .paper .reveal.on { opacity: 1; transform: none; }

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 10vw, 140px) 0; }
.section-head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head p { margin-top: 20px; }
.on-ink { background: var(--ink); color: var(--on-ink); }
.on-ink h2, .on-ink h3 { color: #fff; }
.on-ink a { color: var(--wave); }

/* How it works */
.step { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 6vw, 96px); align-items: center; padding: clamp(40px, 6vw, 72px) 0; border-top: 1px solid var(--ink-2); }
.step:first-of-type { border-top: 0; padding-top: 0; }
.step-no { font: 800 0.95rem/1 var(--display); color: var(--wave); margin-bottom: 18px; display: flex; align-items: center; gap: 12px; }
.step-no::after { content: ""; height: 1px; width: 48px; background: var(--wave); opacity: 0.5; }
.step h3 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); letter-spacing: -0.025em; margin-bottom: 16px; }
.step p + p { margin-top: 12px; }
.step-copy p { font-size: 1.06rem; max-width: 30em; }
@media (max-width: 920px) { .step { grid-template-columns: 1fr; } }

.vis { background: var(--ground); color: var(--text); border-radius: 22px; padding: clamp(18px, 3vw, 30px); position: relative; overflow: hidden; min-height: 300px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.vis p { color: var(--muted); }
.cap { font-size: 0.8rem; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 8px; font: 600 0.82rem/1 var(--body); padding: 7px 12px; border-radius: 999px; background: var(--tint); border: 1px solid var(--line); color: var(--ink); width: fit-content; }
.chip.ok { background: #e2f4ec; border-color: #b9e1d0; color: var(--ok); }
.chip svg { width: 14px; height: 14px; }

/* v1 new job */
.v1 { align-items: center; text-align: center; gap: 22px; }
.mic { width: 108px; height: 108px; border-radius: 50%; background: var(--blue); display: grid; place-items: center; position: relative; transition: background 0.5s; }
.mic svg { width: 44px; height: 44px; color: #fff; }
.mic::before, .mic::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--live); opacity: 0; }
.in .mic { background: var(--live); transition-delay: 0.9s; }
.in .mic::before { animation: ring 2.4s var(--ease) 1s infinite; }
.in .mic::after { animation: ring 2.4s var(--ease) 2.2s infinite; }
@keyframes ring { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(1.8); opacity: 0; } }
.field { width: 100%; max-width: 340px; text-align: left; background: #fff; border: 1.5px solid var(--line-strong); border-radius: 12px; padding: 10px 14px; }
.field small { display: block; font-size: 0.74rem; font-weight: 600; color: var(--muted); }
.field span { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; }
.js .v1 .field span { width: 0; }
.js .v1.in .field span { width: 100%; transition: width 1.6s steps(24) 1.2s; }

/* v2 notes */
.notes { display: grid; gap: 10px; }
.note { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 0.95rem; }
.note .t { font-size: 0.76rem; color: var(--muted); font-weight: 600; }
.note .mini { display: flex; gap: 2px; align-items: center; height: 22px; }
.note .mini i { width: 3px; border-radius: 2px; background: var(--blue); display: block; }
.note .st { font-size: 0.78rem; font-weight: 600; color: var(--ok); white-space: nowrap; }
.note .st.q { color: #5c4000; }
.js .v2 .note { opacity: 0; transform: translateY(10px); }
.js .v2.in .note { opacity: 1; transform: none; transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.js .v2.in .note:nth-child(2) { transition-delay: 0.35s; }
.js .v2.in .note:nth-child(3) { transition-delay: 0.7s; }
.merge { display: grid; gap: 6px; background: var(--ink); color: #fff; border-radius: 14px; padding: 14px 16px; font-size: 0.92rem; }
.merge div { display: flex; justify-content: space-between; gap: 12px; }
.merge .h { color: var(--on-ink-muted); font-size: 0.78rem; font-weight: 600; }
.js .v2 .merge div + div { opacity: 0; }
.js .v2.in .merge div + div { opacity: 1; transition: opacity 0.6s var(--ease) 1.2s; }
.js .v2.in .merge div + div + div { transition-delay: 1.6s; }

/* v3 receipt */
.v3 { flex-direction: row; align-items: center; gap: 18px; }
.receipt { flex: 0 0 44%; background: #fff; border: 1px solid var(--line); padding: 16px 14px 20px; font: 500 0.82rem/1.6 var(--body); color: #333; position: relative; --j: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 12px 100%; -webkit-mask: var(--j); mask: var(--j); transform: rotate(-1.5deg); }
.receipt b { display: block; text-align: center; font-weight: 700; margin-bottom: 6px; }
.receipt div { display: flex; justify-content: space-between; gap: 8px; }
.arrow { flex: none; width: 28px; color: var(--blue); }
.mat { flex: 1; display: grid; gap: 8px; font-size: 0.88rem; }
.mat div { display: flex; justify-content: space-between; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; }
.mat .tag { background: var(--wave); color: var(--ink); font-size: 0.72rem; font-weight: 700; border-radius: 999px; padding: 4px 9px; width: fit-content; border: 0; }
.js .v3 .mat div, .js .v3 .arrow { opacity: 0; transform: translateX(-8px); }
.js .v3.in .mat div, .js .v3.in .arrow { opacity: 1; transform: none; transition: opacity 0.6s var(--ease) 0.5s, transform 0.6s var(--ease) 0.5s; }
.js .v3.in .mat div:nth-child(2) { transition-delay: 0.75s; }
.js .v3.in .mat div:nth-child(3) { transition-delay: 1s; }
.js .v3.in .mat div:nth-child(4) { transition-delay: 1.25s; }
@media (max-width: 520px) { .v3 { flex-direction: column; align-items: stretch; } .receipt { flex: none; } .arrow { transform: rotate(90deg); align-self: center; } }

/* v4 voice edit */
.say { align-self: flex-end; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 16px 16px 4px 16px; font-weight: 500; max-width: 82%; }
.edit-line { display: grid; grid-template-columns: 1fr auto; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.swap { display: inline-grid; text-align: right; font-weight: 700; }
.swap > span { grid-area: 1 / 1; transition: opacity 0.5s, transform 0.6s var(--ease); }
.swap .old { opacity: 0; transform: translateY(-8px); text-decoration: line-through; color: var(--muted); font-weight: 500; }
.swap .new { color: var(--blue); }
.js .v4:not(.in) .swap .old { opacity: 1; transform: none; }
.js .v4:not(.in) .swap .new { opacity: 0; transform: translateY(8px); }
.js .v4.in .swap .old { transition-delay: 1.4s; }
.js .v4.in .swap .new { transition-delay: 1.5s; }
.js .v4 .say, .js .v4 .edit-line, .js .v4 .tot2 { opacity: 0; transform: translateY(10px); }
.js .v4.in .say { opacity: 1; transform: none; transition: all 0.6s var(--ease) 0.2s; }
.js .v4.in .edit-line, .js .v4.in .tot2 { opacity: 1; transform: none; transition: all 0.6s var(--ease) 0.9s; }
.tot2 { display: flex; justify-content: space-between; font: 800 1.2rem/1.2 var(--display); padding: 4px 4px 0; letter-spacing: -0.02em; }

/* v5 handoff */
.plats { display: flex; flex-wrap: wrap; gap: 8px; }
.plats span { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; font-weight: 600; font-size: 0.9rem; }
.plats .act { background: var(--blue); border-color: var(--blue); color: #fff; }
.result { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: grid; gap: 6px; }
.result .no { font: 800 1.5rem/1.1 var(--display); letter-spacing: -0.02em; color: var(--ink); }
.result .meta { font-size: 0.88rem; color: var(--muted); }
.flow { height: 34px; display: grid; place-items: center; }
.flow svg { width: 20px; height: 34px; color: var(--blue); }
.js .v5 .flow, .js .v5 .result { opacity: 0; transform: translateY(10px); }
.js .v5.in .flow { opacity: 1; transform: none; transition: all 0.6s var(--ease) 0.4s; }
.js .v5.in .result { opacity: 1; transform: none; transition: all 0.6s var(--ease) 0.9s; }

/* Feature list */
.feat { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(32px, 6vw, 96px); }
.feat div { padding: 26px 0; border-top: 1px solid var(--line); }
.feat h3 { font-size: 1.15rem; margin-bottom: 8px; }
.feat p { color: var(--muted); font-size: 1.02rem; }
@media (max-width: 760px) { .feat { grid-template-columns: 1fr; } }

/* Integrations */
.plat-list { border-top: 2px solid var(--ink); }
.plat { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 2fr); gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.plat h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.plat p { color: var(--muted); font-size: 1.02rem; }
@media (max-width: 700px) { .plat { grid-template-columns: 1fr; gap: 6px; } }
.rules { margin-top: clamp(48px, 7vw, 88px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); }
.rules h3 { font-size: 1.2rem; margin-bottom: 10px; }
.rules p { color: var(--muted); font-size: 1.02rem; }
.rules > div { padding-top: 22px; border-top: 3px solid var(--blue); }
@media (max-width: 920px) { .rules { grid-template-columns: 1fr; } }
.fine { margin-top: 36px; font-size: 0.92rem; color: var(--muted); max-width: 50em; }

/* Privacy glance */
.glance { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 6vw, 96px); }
.glance h3 { font-size: 1.6rem; margin-bottom: 20px; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.ticks li { display: grid; grid-template-columns: 26px 1fr; gap: 14px; font-size: 1.04rem; color: var(--on-ink-muted); }
.ticks li strong { color: #fff; font-weight: 600; }
.ticks svg { width: 26px; height: 26px; margin-top: 1px; }
.ticks .yes svg { color: var(--wave); }
.ticks .no svg { color: #ff9aa7; }
@media (max-width: 820px) { .glance { grid-template-columns: 1fr; } }
.more { margin-top: 48px; font-weight: 600; }

/* FAQ */
.faq { max-width: 860px; border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 22px 40px 22px 0; font: 700 1.15rem/1.35 var(--display); letter-spacing: -0.015em; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 11px; height: 11px; border-right: 2.5px solid var(--blue); border-bottom: 2.5px solid var(--blue); transform: translateY(-70%) rotate(45deg); transition: transform 0.3s var(--ease); }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { padding: 0 40px 24px 0; color: var(--muted); max-width: 40em; }

/* Closing CTA */
.cta { text-align: center; }
.cta h2 { max-width: 14em; margin: 0 auto; }
.cta .lead { margin: 20px auto 0; }
.cta .stores { justify-content: center; margin-top: 36px; }

/* Footer */
.footer { background: var(--ink); color: var(--on-ink-muted); padding: 56px 0 40px; border-top: 1px solid var(--ink-2); font-size: 0.95rem; }
.footer .wrap { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: start; }
.footer .brand { color: #fff; }
.footer .brand b { color: var(--wave); }
.footer .brand:hover { color: #fff; }
.footer p { margin-top: 14px; max-width: 32em; }
.footer nav { display: flex; gap: 28px; flex-wrap: wrap; }
.footer a { color: #fff; text-decoration: none; font-weight: 600; }
.footer a:hover { color: var(--wave); text-decoration: underline; }
.footer .legal { grid-column: 1 / -1; padding-top: 28px; border-top: 1px solid var(--ink-2); font-size: 0.86rem; }
@media (max-width: 700px) { .footer .wrap { grid-template-columns: 1fr; } }

/* Legal / long reading pages */
.doc-head { padding: clamp(40px, 7vw, 88px) 0 clamp(24px, 4vw, 40px); border-bottom: 1px solid var(--line); }
.doc-head h1 { font-size: clamp(2.4rem, 5vw, 3.75rem); }
.doc-head p { margin-top: 18px; color: var(--muted); max-width: 40em; font-size: 1.15rem; }
.doc-head .meta { font-size: 0.95rem; margin-top: 14px; }
.doc { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); padding: clamp(32px, 5vw, 64px) 0 clamp(72px, 9vw, 120px); }
.toc { position: sticky; top: 96px; align-self: start; font-size: 0.95rem; }
.toc strong { display: block; font: 700 0.82rem/1 var(--body); color: var(--muted); margin-bottom: 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; counter-reset: t; }
.toc a { display: block; padding: 6px 0 6px 14px; border-left: 2px solid var(--line); color: var(--muted); text-decoration: none; font-weight: 500; }
.toc a:hover, .toc a.cur { color: var(--ink); border-left-color: var(--blue); }
@media (max-width: 900px) { .doc { grid-template-columns: 1fr; } .toc { position: static; } }
.prose { max-width: 70ch; }
.prose h2 { font-size: clamp(1.5rem, 2.4vw, 1.9rem); margin: 56px 0 16px; letter-spacing: -0.02em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.15rem; margin: 30px 0 10px; }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 8px; padding-left: 4px; }
.prose li::marker { color: var(--blue); }
.prose strong { font-weight: 700; }
.table-wrap { overflow-x: auto; margin: 8px 0 24px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.prose table { border-collapse: collapse; width: 100%; font-size: 0.95rem; min-width: 560px; }
.prose th, .prose td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-size: 0.8rem; font-weight: 700; color: var(--muted); background: var(--tint); }
.prose tr:last-child td { border-bottom: 0; }
.callout { background: var(--tint); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin: 0 0 24px; }
.callout p:last-child { margin-bottom: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Language switch */
.lang { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px; background: var(--paper); }
.lang a { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 9px; border-radius: 999px; font-weight: 700; font-size: 0.85rem; color: var(--muted); text-decoration: none; }
.lang a svg { width: 20px; height: 14px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(11, 31, 58, 0.18); }
.lang a:hover { color: var(--ink); text-decoration: none; }
.lang a[aria-current] { background: var(--ink); color: #fff; }
@media (max-width: 760px) { .nav > a:not(.pill) { display: none; } .nav .pill { display: none; } }
@media (max-width: 760px) { .header .wrap { gap: 12px; } }
