/* ─────────────────────────────────────────────────────────────────────────────
   Dovilo design system — one theme for every page on dovilo.app.

   Every page links this file first, then adds only what is specific to it.
   Before writing page CSS, look here: if a button, card, pill, code block or
   prose block already exists, use it rather than redefining it two pixels off.

   Layers, in order:
     1. Font            Inter, self-hosted, no third-party request
     2. Reset
     3. Tokens          colour, ink, type ramp, space, radius, shadow
     4. Elements        html, body, headings, links, media, focus
     5. Layout          .wrap, sections, the rhythm between them
     6. Chrome          nav, footer — identical on every page
     7. Components      buttons, cards, pills, code, steps, prose, FAQ
     8. Utilities
     9. Motion

   Palette mirrors the mobile app's src/theme/tokens.ts (Mist / Amber). Dark is
   the default; light mirrors lightTokens. An explicit data-theme on <html>
   always beats the OS preference, and is set before first paint so nothing
   flashes.
   ───────────────────────────────────────────────────────────────────────────── */

/* ─── 1. FONT ───
   Inter as the variable woff2 Google serves, self-hosted so the first paint
   waits on nobody. latin-ext only downloads when a page actually uses it. */
@font-face{
  font-family:'Inter';font-style:normal;font-weight:100 900;font-display:swap;
  src:url('/fonts/inter-latin.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face{
  font-family:'Inter';font-style:normal;font-weight:100 900;font-display:swap;
  src:url('/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

/* ─── 2. RESET ─── */
*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}

/* ─── 3. TOKENS ─── */
:root{
  color-scheme:dark;

  /* Surfaces */
  --bg:#161B1D;
  --bg-2:#1F2426;
  --fg:#E8EAEB;
  --accent:#D4880A;
  --muted:#E8A832;
  --on-accent:#161B1D;
  --bg-rgb:22,27,29;
  --fg-rgb:232,234,235;
  --accent-rgb:212,136,10;

  /* Text alpha multiplier — light ink on dark needs no boost, dark ink on
     light does (.35 alpha of near-black is unreadably pale). */
  --fa:1;
  /* Accent glow multiplier — a wash that reads on dark blows out on light. */
  --ga:1;

  /* Ink scale. Four steps, and only four: full for headings, -1 for body
     copy, -2 for support, -3 for meta. Every page uses these names instead
     of inventing another alpha. */
  --ink:var(--fg);
  --ink-1:rgba(var(--fg-rgb),calc(.72 * var(--fa)));
  --ink-2:rgba(var(--fg-rgb),calc(.55 * var(--fa)));
  --ink-3:rgba(var(--fg-rgb),calc(.42 * var(--fa)));

  /* Lines and fills */
  --dim2:rgba(var(--fg-rgb),.06);
  --card:rgba(var(--fg-rgb),.06);
  --hover:rgba(var(--fg-rgb),.12);
  --line:rgba(var(--fg-rgb),.06);
  --line-strong:rgba(var(--fg-rgb),.12);
  --shadow-1:rgba(0,0,0,.7);
  --shadow-2:rgba(0,0,0,.45);
  --ring:rgba(255,255,255,.05);
  --accent-wash:rgba(var(--accent-rgb),calc(.12 * var(--ga)));
  --accent-edge:rgba(var(--accent-rgb),calc(.28 * var(--ga)));

  /* Type ramp. One ladder for the whole site: a page picks a rung, it does not
     invent a size. t-6 is the largest: the home hero caps lower still, because
     its headline names four things and needs the room to wrap. */
  --t-6:clamp(2rem,4.4vw,3rem);
  --t-5:clamp(1.75rem,3.5vw,2.5rem);
  --t-4:clamp(1.5rem,3vw,2rem);
  --t-3:1.125rem;
  --t-2:1rem;
  --t-1:.9375rem;
  --t-0:.875rem;
  --t--1:.8125rem;
  --t--2:.75rem;
  --t--3:.6875rem;

  /* Line heights */
  --lh-tight:1.15;
  --lh-head:1.3;
  --lh-body:1.65;
  --lh-prose:1.75;

  /* Space — an 8px rhythm, named so sections space themselves the same way. */
  --s-1:4px;
  --s-2:8px;
  --s-3:12px;
  --s-4:16px;
  --s-5:24px;
  --s-6:32px;
  --s-7:48px;
  --s-8:64px;
  --s-9:96px;
  --section-y:clamp(64px,9vw,112px);
  --gutter:clamp(20px,5vw,64px);

  /* Shape */
  --radius-sm:8px;
  --radius:12px;
  --radius-lg:16px;
  --radius-pill:100px;

  /* Widths. --max is the page's own content width. */
  --max:1120px;
  --max-prose:760px;

  /* Chrome */
  --nav-h:68px;
}

:root[data-theme="light"]{
  color-scheme:light;
  --bg:#F7F8F8;
  --bg-2:#FFFFFF;
  --fg:#161B1D;
  --accent:#D97706;
  --muted:#B45309;
  --on-accent:#FFFFFF;
  --bg-rgb:247,248,248;
  --fg-rgb:22,27,29;
  --accent-rgb:217,119,6;
  --fa:1.55;
  --ga:.5;
  --dim2:rgba(var(--fg-rgb),.05);
  --card:#FFFFFF;
  --hover:#EEF0F1;
  --line:#E4E7E8;
  --line-strong:#D7DADB;
  --shadow-1:rgba(22,27,29,.16);
  --shadow-2:rgba(22,27,29,.09);
  --ring:rgba(22,27,29,.08);
}

@media (prefers-color-scheme:light){
  :root:not([data-theme="dark"]){
    color-scheme:light;
    --bg:#F7F8F8;
    --bg-2:#FFFFFF;
    --fg:#161B1D;
    --accent:#D97706;
    --muted:#B45309;
    --on-accent:#FFFFFF;
    --bg-rgb:247,248,248;
    --fg-rgb:22,27,29;
    --accent-rgb:217,119,6;
    --fa:1.55;
    --ga:.5;
    --dim2:rgba(var(--fg-rgb),.05);
    --card:#FFFFFF;
    --hover:#EEF0F1;
    --line:#E4E7E8;
    --line-strong:#D7DADB;
    --shadow-1:rgba(22,27,29,.16);
    --shadow-2:rgba(22,27,29,.09);
    --ring:rgba(22,27,29,.08);
  }
}

/* Surfaces that stay dark in BOTH themes — a terminal is a terminal, and a
   focus scene is content, not a theme variant (the same call the app makes for
   its Midnight scene). Re-declaring the palette is enough: the token formulas
   resolve against the element that uses them. */
.keep-dark{
  color-scheme:dark;
  --bg:#161B1D;
  --bg-2:#1F2426;
  --fg:#E8EAEB;
  --accent:#D4880A;
  --muted:#E8A832;
  --on-accent:#161B1D;
  --bg-rgb:22,27,29;
  --fg-rgb:232,234,235;
  --accent-rgb:212,136,10;
  --fa:1;
  --ga:1;
  --ink:var(--fg);
  --ink-1:rgba(var(--fg-rgb),.72);
  --ink-2:rgba(var(--fg-rgb),.55);
  --ink-3:rgba(var(--fg-rgb),.42);
  --accent-wash:rgba(212,136,10,.12);
  --accent-edge:rgba(212,136,10,.28);
  --dim2:rgba(var(--fg-rgb),.06);
  --card:rgba(var(--fg-rgb),.06);
  --hover:rgba(var(--fg-rgb),.12);
  --line:rgba(var(--fg-rgb),.06);
  --line-strong:rgba(var(--fg-rgb),.12);
  --shadow-1:rgba(0,0,0,.7);
  --shadow-2:rgba(0,0,0,.45);
  --ring:rgba(255,255,255,.05);
  color:var(--fg);
}

/* ─── 4. ELEMENTS ─── */
html{
  scroll-behavior:smooth;
  /* Anchors land below the sticky nav, not under it. */
  scroll-padding-top:calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust:100%;
}

body{
  font-family:'Inter',system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
  background:var(--bg);
  color:var(--ink-1);
  line-height:var(--lh-body);
  font-size:var(--t-2);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  overflow-x:hidden;
}

h1,h2,h3,h4,h5,h6{color:var(--ink);line-height:var(--lh-head);font-weight:700}
h1{font-size:var(--t-6);font-weight:800;letter-spacing:-.03em;line-height:var(--lh-tight)}
h2{font-size:var(--t-4);letter-spacing:-.02em}
h3{font-size:var(--t-3);letter-spacing:-.01em}
h4{font-size:var(--t-1)}
/* An <em> inside a heading is the accent phrase, not italics — the site's one
   typographic idiom, and it is the same on every page. */
h1 em,h2 em,h3 em{font-style:normal;color:var(--accent)}

a{color:var(--accent);text-decoration:none}
a:hover{color:var(--muted)}
/* A link sitting inside running text is underlined, so it is not identified by
   colour alone (WCAG 1.4.1). Links that are already their own affordance —
   buttons, cards, nav, footer, chips — opt out below. */
p a,li a{text-decoration:underline;text-underline-offset:2px;text-decoration-thickness:.06em}
p a.btn,li a.btn,
.site-nav a,footer a,.footer-links a,.page-jump a,
.card a,a.card,.pick a,.meta a,.tag,.pill a{text-decoration:none}
strong,b{color:var(--ink);font-weight:600}
img,svg,video{max-width:100%}
img{height:auto}

::selection{background:rgba(var(--accent-rgb),.28);color:var(--fg)}

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

/* ─── 5. LAYOUT ───
   .wrap is the one container. .container and .page are kept as aliases so the
   pages that already use those names keep working. */
.wrap,.page{width:100%;max-width:var(--max);margin-inline:auto;padding-inline:var(--gutter)}
.wrap-prose{max-width:var(--max-prose)}


/* ─── 6. CHROME ───
   The header is .site-nav, not the bare <nav> element: a page may legitimately
   carry other navs — a table of contents, a prev/next row, an on-this-page
   list — and none of them should inherit a sticky blurred masthead.
   Sticky, not fixed: it stays in flow, so no page has to reserve space for it
   with a magic padding-top. Every page carries the same markup. */
.site-nav{
  position:sticky;top:0;z-index:100;
  display:flex;align-items:center;justify-content:space-between;gap:var(--s-4);
  min-height:var(--nav-h);
  padding:var(--s-3) var(--gutter);
  background:rgba(var(--bg-rgb),.82);
  backdrop-filter:blur(24px);
  -webkit-backdrop-filter:blur(24px);
  border-bottom:1px solid var(--line);
}
.logo{
  display:flex;align-items:center;gap:10px;
  font-size:1.125rem;font-weight:700;letter-spacing:-.02em;
  color:var(--fg);text-decoration:none;white-space:nowrap;
}
.logo:hover{color:var(--fg)}
.logo img{width:32px;height:32px;border-radius:var(--radius-sm)}
.logo span{color:var(--accent)}

.site-nav ul{
  list-style:none;display:flex;gap:clamp(18px,2.4vw,32px);
  position:absolute;left:50%;transform:translateX(-50%);
}
.site-nav ul a{
  color:var(--ink-2);text-decoration:none;
  font-size:var(--t-0);font-weight:500;letter-spacing:.01em;
  transition:color .2s;
}
.site-nav ul a:hover,.site-nav ul a[aria-current="page"]{color:var(--fg)}
.site-nav ul a[aria-current="page"]{font-weight:600}

/* The AI entry carries a live dot, because it is the newest surface and the
   one the site most wants a developer to notice. */
.nav-ai{display:inline-flex;align-items:center;gap:5px}
.nav-dot{
  width:5px;height:5px;border-radius:50%;background:var(--accent);
  animation:nav-dot-pulse 2s ease-in-out infinite;
}
@keyframes nav-dot-pulse{0%,100%{opacity:1}50%{opacity:.35}}

.nav-actions,.nav-stores{display:flex;gap:var(--s-3);align-items:center}
.nav-store-link,.nav-icon{
  display:flex;align-items:center;justify-content:center;
  width:36px;height:36px;border-radius:var(--radius-sm);
  background:var(--card);border:1px solid var(--line);
  color:var(--ink-2);
  transition:background .2s,border-color .2s,color .2s;
}
.nav-icon:hover,.nav-store-link:hover{background:var(--hover);border-color:var(--line-strong);color:var(--fg)}
.nav-icon svg,.nav-store-link svg{width:18px;height:18px;fill:currentColor}
/* The GitHub and theme glyphs are strokes, not fills. */
.nav-icon.stroke svg,.theme-toggle svg{fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

.theme-toggle{cursor:pointer;padding:0;font-family:inherit}
.theme-toggle svg{width:17px;height:17px}
.theme-toggle .icon-sun{display:none}
:root[data-theme="light"] .theme-toggle .icon-moon{display:none}
:root[data-theme="light"] .theme-toggle .icon-sun{display:block}
@media (prefers-color-scheme:light){
  :root:not([data-theme="dark"]) .theme-toggle .icon-moon{display:none}
  :root:not([data-theme="dark"]) .theme-toggle .icon-sun{display:block}
}

.hamburger{
  display:none;
  background:var(--card);border:1px solid var(--line);cursor:pointer;
  width:36px;height:36px;border-radius:var(--radius-sm);
  align-items:center;justify-content:center;
  color:var(--fg);
}
.hamburger svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

.menu-overlay{
  display:none;position:fixed;inset:0;z-index:98;
  background:rgba(0,0,0,.5);
  backdrop-filter:blur(2px);
}
.menu-overlay.open{display:block}

@media (max-width:900px){
  .site-nav ul{
    position:fixed;left:auto;right:0;top:0;transform:translateX(100%);
    flex-direction:column;align-items:flex-start;gap:var(--s-5);
    width:min(280px,80vw);height:100dvh;z-index:99;
    padding:calc(var(--nav-h) + 24px) var(--s-6) var(--s-6);
    background:var(--bg-2);border-left:1px solid var(--line);
    /* visibility, not just transform: a fixed element parked past the right
       edge still counts toward the scrollable area, and body{overflow-x:hidden}
       does not clip it — the page ends up scrolling sideways into empty space. */
    visibility:hidden;
    transition:transform .25s ease,visibility 0s linear .25s;
  }
  .site-nav ul.open{transform:translateX(0);visibility:visible;transition:transform .25s ease}
  .site-nav ul a{font-size:1.0625rem}
  .hamburger{display:flex}
}

/* ─── FOOTER ─── */
footer{
  border-top:1px solid var(--line);
  margin-top:var(--section-y);
  padding:var(--s-7) var(--gutter);
  display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;
  gap:var(--s-5);
  font-size:var(--t-0);color:var(--ink-3);
}
.footer-left{display:flex;align-items:center;gap:var(--s-2)}
.footer-socials{list-style:none;display:flex;gap:var(--s-3);order:3}
.footer-socials a{
  display:flex;align-items:center;justify-content:center;
  width:32px;height:32px;border-radius:var(--radius-sm);
  background:var(--card);border:1px solid var(--line);
  transition:background .2s,border-color .2s;
}
.footer-socials a:hover{background:var(--hover);border-color:var(--line-strong)}
.footer-socials svg{width:15px;height:15px;fill:var(--ink-2)}
.footer-socials a:hover svg{fill:var(--fg)}
.footer-links{list-style:none;display:flex;flex-wrap:wrap;gap:var(--s-3) var(--s-5);order:2}
.footer-links a,.footer-links button{
  color:var(--ink-2);text-decoration:none;font-size:var(--t-0);
  background:none;border:0;padding:0;cursor:pointer;font-family:inherit;
}
.footer-links a:hover,.footer-links button:hover{color:var(--accent)}

@media (max-width:768px){
  footer{flex-direction:column;align-items:flex-start;text-align:left}
  .footer-socials{order:2}
  .footer-links{order:3}
}

/* ─── 7. COMPONENTS ─── */

/* Section headers — .eyebrow is canonical, .section-label is the older name
   the homepage uses; both render identically. */
.eyebrow,.section-label{
  font-size:var(--t--2);font-weight:700;letter-spacing:.12em;text-transform:uppercase;
  color:var(--accent);margin-bottom:var(--s-3);
}
.section-title{
  font-size:var(--t-5);font-weight:800;letter-spacing:-.02em;line-height:1.15;
  color:var(--ink);
}
.lede{font-size:var(--t-2);color:var(--ink-2);max-width:66ch;line-height:var(--lh-body)}

/* Buttons */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:var(--s-2);
  padding:12px 22px;border-radius:var(--radius-pill);
  font-size:var(--t-0);font-weight:600;font-family:inherit;
  text-decoration:none;cursor:pointer;border:1px solid transparent;
  transition:background .2s,border-color .2s,color .2s,transform .15s;
  white-space:nowrap;
}
.btn svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.btn-primary{background:var(--accent);color:var(--on-accent);border-color:var(--accent)}
.btn-primary:hover{background:var(--muted);border-color:var(--muted);color:var(--on-accent)}
.btn-ghost{background:var(--card);color:var(--ink);border-color:var(--line-strong)}
.btn-ghost:hover{background:var(--hover);border-color:var(--accent);color:var(--ink)}

/* Store buttons — the App Store / Play lockups. Solid on purpose: these are the
   site's primary download action, and a ghost chip reads as secondary next to
   the quiet .desktop-btn that sits beside them. .store-btn is the download
   section's size, .store-btn-sm the hero's. */
.store-btn,.store-btn-sm{
  display:inline-flex;align-items:center;gap:10px;
  padding:10px 20px;border-radius:var(--radius);
  background:var(--fg);color:var(--bg);border:1px solid transparent;
  text-decoration:none;cursor:pointer;font-family:inherit;
  transition:opacity .2s,transform .15s;
}
.store-btn{gap:14px;padding:14px 28px}
.store-btn:hover,.store-btn-sm:hover{color:var(--bg);opacity:.88;transform:translateY(-1px)}
.store-btn svg,.store-btn-sm svg{fill:var(--bg)}
.store-btn svg,.store-btn-sm svg{width:22px;height:22px;fill:currentColor;flex:none}
.store-btn-text{display:flex;flex-direction:column;line-height:1.15;text-align:left}
.store-btn-text small{font-size:var(--t--3);opacity:.7}
.store-btn-text strong{font-size:var(--t-1);font-weight:700;color:inherit}

/* Pills, badges, tags — the same shape at three jobs. */
.pill,.badge{
  display:inline-flex;align-items:center;gap:var(--s-2);
  padding:6px 14px;border-radius:var(--radius-pill);
  font-size:var(--t--1);font-weight:600;
  color:var(--muted);
  background:var(--accent-wash);
  border:1px solid var(--accent-edge);
}
.pill svg,.badge svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.tag{
  display:inline-block;
  font-size:var(--t--3);font-weight:700;letter-spacing:.06em;text-transform:uppercase;
  color:var(--muted);background:var(--accent-wash);
  border:1px solid var(--accent-edge);
  padding:2px 9px;border-radius:var(--radius-pill);
}
.pro-pill{
  display:inline-block;font-size:var(--t--3);font-weight:800;letter-spacing:.08em;
  color:var(--on-accent);background:var(--accent);
  padding:2px 8px;border-radius:var(--radius-sm);
}

/* Cards */
.card{
  background:var(--bg-2);
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  padding:var(--s-5);
}
a.card{display:block;color:inherit;text-decoration:none;transition:border-color .15s ease,transform .15s ease}
a.card:hover{border-color:rgba(var(--accent-rgb),.45);transform:translateY(-1px);color:inherit}


/* Numbered steps */
.steps{display:grid;gap:var(--s-5)}
.step{
  display:grid;grid-template-columns:auto 1fr;gap:var(--s-4);
  background:var(--bg-2);border:1px solid var(--line);border-radius:var(--radius-lg);
  padding:var(--s-5);
}
.step-num{
  display:flex;align-items:center;justify-content:center;
  width:30px;height:30px;border-radius:50%;
  background:var(--accent);color:var(--on-accent);
  font-size:var(--t-0);font-weight:700;flex:none;
}
.step h3{margin-bottom:var(--s-2)}
.step p{color:var(--ink-2);font-size:var(--t-1)}
.step p + p{margin-top:var(--s-3)}

/* Code — the terminal stays dark in both themes (see .keep-dark). */
.code-block{
  border:1px solid var(--line-strong);border-radius:var(--radius);
  overflow:hidden;background:#0f1214;
  font-family:ui-monospace,SFMono-Regular,'SF Mono',Menlo,Monaco,Consolas,monospace;
}
.code-head{
  display:flex;align-items:center;gap:6px;
  padding:9px 14px;background:#161B1D;border-bottom:1px solid rgba(232,234,235,.08);
}
.code-dot{width:10px;height:10px;border-radius:50%;background:#3a4145}
.code-dot.r{background:#ff5f57}
.code-dot.y{background:#febc2e}
.code-dot.g{background:#28c840}
.code-title{
  margin-left:6px;font-size:var(--t--2);color:rgba(232,234,235,.45);
  font-family:'Inter',system-ui,sans-serif;
}
.code-body{
  padding:16px 18px;font-size:var(--t--1);line-height:1.7;
  color:rgba(232,234,235,.82);white-space:pre;overflow-x:auto;
}
.code-body .c{color:rgba(232,234,235,.4)}         /* comment */
.code-body .cmd{color:#E8A832}                    /* command the reader types */
.code-body .out{color:rgba(232,234,235,.6)}       /* program output */
/* Inline code only. A <code> inside a <pre> keeps the block's own background —
   /docs/webhooks inlines the highlight.js theme in its page <style>, which
   loads after this file, so anything painted here would be overridden there
   anyway and the two would fight over every token. */
code{
  font-family:ui-monospace,SFMono-Regular,'SF Mono',Menlo,Consolas,monospace;
  font-size:.875em;background:var(--card);border:1px solid var(--line);
  border-radius:5px;padding:1px 5px;color:var(--ink);
}
pre code{background:none;border:0;padding:0;color:inherit}

/* Prose — legal pages, docs and blog posts all read the same way. */
.prose{font-size:var(--t-2);line-height:var(--lh-prose);color:var(--ink-1)}
.prose > * + *{margin-top:20px}
.prose h2{font-size:1.375rem;margin-top:var(--s-7);scroll-margin-top:calc(var(--nav-h) + 16px)}
.prose h3{font-size:1.0625rem;margin-top:var(--s-6);scroll-margin-top:calc(var(--nav-h) + 16px)}
.prose h4{font-size:var(--t-1);margin-top:var(--s-5)}
.prose a{text-decoration:underline;text-underline-offset:2px;text-decoration-thickness:.06em}
.prose ul,.prose ol{margin-left:22px}
.prose li{margin-bottom:var(--s-2)}
.prose li > ul,.prose li > ol{margin-top:var(--s-2)}
.prose blockquote{
  border-left:2px solid rgba(var(--accent-rgb),.5);padding:2px 0 2px 18px;
  color:var(--ink-2);font-style:italic;
}
.prose pre{
  background:var(--bg-2);border:1px solid var(--line);border-radius:var(--radius);
  padding:18px 20px;overflow-x:auto;line-height:1.65;
}
.prose pre code{background:none;border:0;padding:0;font-size:var(--t--1);color:var(--ink-1)}
.prose img,.prose figure img{width:100%;height:auto;border-radius:var(--radius);border:1px solid var(--line);display:block}
.prose hr{border:0;border-top:1px solid var(--line);margin:var(--s-7) 0}
.prose table{width:100%;border-collapse:collapse;font-size:var(--t-0);display:block;overflow-x:auto}
.prose th,.prose td{border:1px solid var(--line);padding:8px 12px;text-align:left}
.prose th{color:var(--ink);font-weight:600;background:var(--card)}

/* Tables outside prose (tool references, comparison grids). */
.table{width:100%;border-collapse:collapse;font-size:var(--t-0)}
.table th,.table td{border-bottom:1px solid var(--line);padding:10px 12px;text-align:left;vertical-align:top}
.table th{color:var(--ink);font-weight:600;font-size:var(--t--1);letter-spacing:.04em;text-transform:uppercase}
.table td{color:var(--ink-2)}

/* FAQ accordion — one behaviour, one look, wherever questions appear. */
.faq-list{border-top:1px solid var(--line)}
.faq-item{border-bottom:1px solid var(--line)}
.faq-q{
  display:flex;align-items:center;justify-content:space-between;gap:var(--s-4);
  width:100%;padding:20px 0;cursor:pointer;
  background:none;border:0;text-align:left;font-family:inherit;color:inherit;
}
.faq-q h3{font-size:var(--t-2);font-weight:600}
.faq-q .chevron{width:18px;height:18px;flex:none;stroke:var(--ink-3);fill:none;stroke-width:2;transition:transform .2s}
.faq-item.open .faq-q .chevron{transform:rotate(180deg)}
/* Open/close animates the real height, so no page has to guess a max-height
   that is tall enough for its longest answer (get that wrong and an answer
   carrying FAQPage structured data is visibly clipped). */
.faq-a{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s ease}
.faq-a > *{overflow:hidden}
.faq-item.open .faq-a{grid-template-rows:1fr}
.faq-a p{font-size:var(--t-1);color:var(--ink-2);line-height:var(--lh-prose);padding-bottom:20px}

/* Back link, for pages that are read as documents. Written as a.back too,
   because five pages style it that way today and an element+class selector
   out-specifies a bare class — matching it here means a page can drop its own
   rule without the link silently reverting to default link styling. */
.back,a.back{
  display:inline-flex;align-items:center;gap:6px;
  color:var(--ink-2);font-size:var(--t-0);font-weight:500;text-decoration:none;
}
.back:hover,a.back:hover{color:var(--accent)}

/* Page head — the title block every inner page opens with. */
.page-head{padding-block:var(--s-7) var(--s-6)}
.page-head h1{font-size:var(--t-6)}
.page-head .lede,.page-head .meta{margin-top:var(--s-3)}

/* Meta row (dates, reading time, authorship). */
.meta{
  display:flex;align-items:center;gap:10px;flex-wrap:wrap;
  font-size:var(--t--1);color:var(--ink-3);
}
.meta .sep{opacity:.5}
.meta a{color:var(--ink-2)}
.meta a:hover{color:var(--accent)}

/* ─── 8. UTILITIES ─── */
.sr-only{
  position:absolute;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:-9999px;top:0;z-index:200;
  background:var(--accent);color:var(--on-accent);
  padding:10px 16px;border-radius:0 0 var(--radius-sm) 0;font-weight:600;
}
.skip-link:focus{left:0}

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