/* Runemic — site styles
   Neutral, crisp UI (white, near-black ink, grey hairlines, 6px corners); deep teal is the brand/action colour and
   warm gold lives in the illustrations. Light is the default; dark via [data-theme="dark"]. */

/* Fonts are self-hosted (no requests to Google): IBM Plex Sans, IBM Plex Sans Arabic and Devanagari (only downloaded when a page shows
   those scripts) and IBM Plex Mono, SIL Open Font License */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-display: swap; font-weight: 100 700;
  src: url("/assets/fonts/ibm-plex-sans-latin-ext-wght-normal.woff2") format("woff2-variations"); 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; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-display: swap; font-weight: 100 700;
  src: url("/assets/fonts/ibm-plex-sans-latin-wght-normal.woff2") format("woff2-variations"); 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: "IBM Plex Sans Arabic"; font-style: normal; font-display: swap; font-weight: 400;
  src: url("/assets/fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2") format("woff2"); unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC,U+102E0-102FB,U+10E60-10E7E,U+10EC2-10EC4,U+10EFC-10EFF,U+1EE00-1EE03,U+1EE05-1EE1F,U+1EE21-1EE22,U+1EE24,U+1EE27,U+1EE29-1EE32,U+1EE34-1EE37,U+1EE39,U+1EE3B,U+1EE42,U+1EE47,U+1EE49,U+1EE4B,U+1EE4D-1EE4F,U+1EE51-1EE52,U+1EE54,U+1EE57,U+1EE59,U+1EE5B,U+1EE5D,U+1EE5F,U+1EE61-1EE62,U+1EE64,U+1EE67-1EE6A,U+1EE6C-1EE72,U+1EE74-1EE77,U+1EE79-1EE7C,U+1EE7E,U+1EE80-1EE89,U+1EE8B-1EE9B,U+1EEA1-1EEA3,U+1EEA5-1EEA9,U+1EEAB-1EEBB,U+1EEF0-1EEF1; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-display: swap; font-weight: 600;
  src: url("/assets/fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2") format("woff2"); unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC,U+102E0-102FB,U+10E60-10E7E,U+10EC2-10EC4,U+10EFC-10EFF,U+1EE00-1EE03,U+1EE05-1EE1F,U+1EE21-1EE22,U+1EE24,U+1EE27,U+1EE29-1EE32,U+1EE34-1EE37,U+1EE39,U+1EE3B,U+1EE42,U+1EE47,U+1EE49,U+1EE4B,U+1EE4D-1EE4F,U+1EE51-1EE52,U+1EE54,U+1EE57,U+1EE59,U+1EE5B,U+1EE5D,U+1EE5F,U+1EE61-1EE62,U+1EE64,U+1EE67-1EE6A,U+1EE6C-1EE72,U+1EE74-1EE77,U+1EE79-1EE7C,U+1EE7E,U+1EE80-1EE89,U+1EE8B-1EE9B,U+1EEA1-1EEA3,U+1EEA5-1EEA9,U+1EEAB-1EEBB,U+1EEF0-1EEF1; }
@font-face { font-family: "IBM Plex Sans Devanagari"; font-style: normal; font-display: swap; font-weight: 400;
  src: url("/assets/fonts/ibm-plex-sans-devanagari-devanagari-400-normal.woff2") format("woff2"); unicode-range: U+0900-097F,U+1CD0-1CF9,U+200C-200D,U+20A8,U+20B9,U+20F0,U+25CC,U+A830-A839,U+A8E0-A8FF,U+11B00-11B09; }
@font-face { font-family: "IBM Plex Sans Devanagari"; font-style: normal; font-display: swap; font-weight: 600;
  src: url("/assets/fonts/ibm-plex-sans-devanagari-devanagari-600-normal.woff2") format("woff2"); unicode-range: U+0900-097F,U+1CD0-1CF9,U+200C-200D,U+20A8,U+20B9,U+20F0,U+25CC,U+A830-A839,U+A8E0-A8FF,U+11B00-11B09; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-display: swap; font-weight: 400;
  src: url("/assets/fonts/ibm-plex-mono-latin-400-normal.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: "IBM Plex Mono"; font-style: normal; font-display: swap; font-weight: 500;
  src: url("/assets/fonts/ibm-plex-mono-latin-500-normal.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: "IBM Plex Mono"; font-style: normal; font-display: swap; font-weight: 600;
  src: url("/assets/fonts/ibm-plex-mono-latin-600-normal.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: "Geist"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("/assets/fonts/geist-latin-wght-normal.woff2") format("woff2-variations"); unicode-range: U+0000-024F,U+0259,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+1E00-1EFF,U+2000-206F,U+20AC,U+2122,U+2190-2199,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url("/assets/fonts/geist-mono-latin-wght-normal.woff2") format("woff2-variations"); unicode-range: U+0000-024F,U+2000-206F,U+20AC,U+2122,U+2190-2199,U+2212,U+FEFF,U+FFFD; }

/* Design language: shadcn/ui ("new york"): neutral greys, near-black primary, 1px borders, small radii, soft
   shadows, Geist. Runemic teal and gold live in the logo, illustrations and charts only.
   Token names are ours; the values follow shadcn's default theme. */
:root {
  --bg: #ffffff;           /* background */
  --surface: #ffffff;      /* card */
  --surface-2: #f5f5f5;    /* muted / secondary / accent */
  --sidebar: #fafafa;
  --ink: #0a0a0a;          /* foreground */
  --ink-2: #404040;        /* body copy on marketing pages */
  --muted: #6b6b6b;        /* muted-foreground (a touch darker than shadcn's #737373 for 4.5:1 on grey) */
  --line: #e5e5e5;         /* border / input */
  --line-strong: #d4d4d4;
  --brand: #171717;        /* primary: main buttons, links, selection */
  --brand-strong: #0a0a0a;
  --brand-soft: #f5f5f5;   /* accent (hover, active nav) */
  --on-brand: #fafafa;     /* primary-foreground */
  --teal: #0f5257;         /* Runemic teal: logo, charts, small brand touches */
  --accent: #d9a23b;       /* gold (illustrations) */
  --accent-soft: #f6e7c6;
  --danger: #dc2626;
  --ring: #a1a1a1;
  --focus: #a1a1a1;
  --chart: #2a78d6;

  --radius-sm: 6px; --radius-md: 8px; --radius: 10px; --radius-xl: 14px;
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / .05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);

  --font: "Geist", "IBM Plex Sans Arabic", "IBM Plex Sans Devanagari", "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --max: 1160px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0a0a0a;
  --surface: #171717;
  --surface-2: #262626;
  --sidebar: #171717;
  --ink: #fafafa;
  --ink-2: #d4d4d4;
  --muted: #a1a1a1;
  --line: rgb(255 255 255 / .1);
  --line-strong: rgb(255 255 255 / .18);
  --brand: #e5e5e5;
  --brand-strong: #fafafa;
  --brand-soft: #262626;
  --on-brand: #171717;
  --teal: #8cc3c0;
  --accent: #e3b457;
  --accent-soft: #3d321d;
  --danger: #f87171;
  --ring: #737373;
  --focus: #737373;
  --chart: #3987e5;
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / .3);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / .4), 0 1px 2px -1px rgb(0 0 0 / .4);
  color-scheme: dark;
}

/* ───────── base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-strong); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { color: var(--ink); line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(2.3rem, 4.4vw, 3.4rem); letter-spacing: -0.03em; line-height: 1.06; }
h2 { font-size: clamp(1.55rem, 2.8vw, 2.1rem); letter-spacing: -0.025em; }
h3 { font-size: 1.125rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
code, pre { font-family: var(--mono); font-size: .875em; }
[hidden] { display: none !important; } /* the hidden attribute always wins over display rules */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip { position: absolute; left: 12px; top: -48px; z-index: 50; background: var(--brand-strong); color: var(--on-brand); padding: 8px 16px; border-radius: 6px; }
.skip:focus { top: 12px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ───────── illustrations: light/dark pair, the page shows one */
.ill--dark { display: none; }
[data-theme="dark"] .ill--light { display: none; }
[data-theme="dark"] .ill--dark { display: block; }
.figure { margin: 0; }
.figure img { width: 100%; }
.figure figcaption { margin-top: 12px; color: var(--muted); font-size: .9rem; }

/* ───────── header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 1.15rem; letter-spacing: -0.02em; }
.brand img { width: 28px; height: 28px; }
.brand:hover { color: var(--ink); }

.tabs { display: flex; gap: 4px; margin-right: auto; }
.tabs a {
  position: relative; padding: 6px 8px; border-radius: 6px;
  color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: .9375rem; white-space: nowrap;
}
.tabs a:hover { color: var(--ink); background: var(--surface-2); }
.tabs a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.tabs a[aria-current="page"]::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: -15px; height: 2px;
  background: var(--accent);
}
.header-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0;
  border: 1px solid var(--line); border-radius: 6px; background: var(--surface);
  color: var(--ink-2); cursor: pointer; text-decoration: none;
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-strong); background: var(--surface-2); }
.icon-btn svg { width: 17px; height: 17px; }
.theme-toggle .moon { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: block; }

/* ───────── buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px;
  border-radius: 6px; border: 1px solid transparent; font: 600 .9375rem/1.25 var(--font);
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn--primary { background: var(--brand); border-color: var(--brand-strong); color: var(--on-brand); }
.btn--primary:hover { background: var(--brand-strong); color: var(--on-brand); }
[data-theme="dark"] .btn--primary { border-color: var(--brand); }
[data-theme="dark"] .btn--primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
.btn--ghost { border-color: var(--line); color: var(--ink); background: var(--surface-2); }
.btn--ghost:hover { border-color: var(--line-strong); color: var(--ink); background: var(--surface); }
.btn--sm { padding: 6px 12px; font-size: .875rem; }
.btn:disabled, .btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn--primary:disabled:hover { background: var(--brand); }
.arrow::after { content: "→"; transition: transform .15s; }
.btn:hover .arrow::after, a:hover > .arrow::after { transform: translateX(3px); }

/* ───────── page heads + sections
   Spacing follows an 8px scale (2 4 6 8 12 16 20 24 32 40 48 64 80). Between page blocks: 80px on desktop, 64px on phones. */
.eyebrow {
  display: inline-block; margin-bottom: 12px; font: 500 .9375rem/1.2 var(--font); color: var(--brand);
}
.lede { font-size: 1.1875rem; line-height: 1.55; color: var(--ink-2); max-width: 38em; }
.page-head { padding: 48px 0 8px; }
.section { padding: 40px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section__head { max-width: 46em; margin-bottom: 24px; }
.section__head p { color: var(--ink-2); }
.muted { color: var(--muted); }

/* ───────── home hero */
.hero { display: grid; grid-template-columns: 1fr 1.05fr; gap: 48px; align-items: center; padding: 64px 0 40px; }
.hero h1 { margin-bottom: 20px; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 20px; }
.hero__note { font-size: .92rem; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ───────── status pills */
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 1px 9px; border-radius: 999px;
  font: 500 .8125rem/1.5 var(--font); white-space: nowrap;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #1f883d; }
[data-theme="dark"] .pill::before { background: #3fb950; }
.pill--dev::before { background: var(--accent); }
.pill--research { background: transparent; border: 1px dashed var(--line); color: var(--muted); }
.pill--open::before { background: var(--accent); }

/* ───────── cards */
.grid { display: grid; gap: 16px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.card {
  position: relative; display: flex; flex-direction: column; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
}
.card h3 { margin: 4px 0 0; }
.card p { color: var(--ink-2); margin: 0; }
.card__icon { width: 56px; height: 56px; margin-bottom: 8px; }
.card__icon img { width: 56px; height: 56px; }
.card__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card__link { margin-top: auto; padding-top: 12px; font-weight: 600; font-size: .9375rem; text-decoration: none; display: inline-flex; gap: 6px; }
a.card { text-decoration: none; color: inherit; transition: border-color .12s; }
a.card:hover { border-color: var(--line-strong); color: inherit; }
.card--featured { border-color: var(--brand); }

.ticks { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 8px; color: var(--ink-2); font-size: .9375rem; }
.ticks li { position: relative; padding-left: 24px; }
.ticks li::before {
  content: ""; position: absolute; left: 3px; top: .38em; width: 5px; height: 10px;
  border: solid var(--brand); border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* ───────── split rows (text + figure) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split--flip > :first-child { order: 2; }
.split h2 { margin-top: 0; }
.split .ticks { margin: 16px 0 24px; }
.split__fig { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.split__fig--plain { background: none; padding: 0; }
.product-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.product-head img { width: 44px; height: 44px; }

/* ───────── band */
.band {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center;
  background: #0b3b3e; color: #f4f8f8; border-radius: var(--radius); padding: 48px;
}
[data-theme="dark"] .band { background: #173c3d; }
[data-theme="dark"] .code { border-color: var(--line); }
.band h2 { color: #ffffff; }
.band p { color: #cfe0dd; }
.band a:not(.btn) { color: inherit; }
.band .btn--primary { background: var(--accent); color: #1b1407; }
.band .btn--primary:hover { background: var(--accent-soft); color: #1b1407; }
.band__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.band__list li { display: flex; gap: 16px; align-items: baseline; font-weight: 500; }
.band__list b { font: 500 .8125rem var(--mono); color: var(--accent); min-width: 28px; }

/* ───────── pricing */
.plan__price { font-size: 1.6rem; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); line-height: 1.1; margin: 6px 0 2px; }
.plan__unit { font-size: .9rem; color: var(--muted); }
.plan .btn { margin-top: auto; align-self: flex-start; }
.plan .ticks { margin: 12px 0 16px; }
.note { font-size: .9rem; color: var(--muted); margin-top: 20px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 36px 1fr; gap: 16px; }
.steps li::before {
  content: counter(s); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 6px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: 500 .8125rem var(--mono);
}
.steps h3 { margin: 3px 0 4px; font-size: 1.05rem; }
.steps p { color: var(--ink-2); margin: 0; }

.faq { display: grid; gap: 0; max-width: 820px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 0 4px; }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 1.25rem/1 var(--mono); color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--ink-2); padding-bottom: 16px; margin: 0; }

/* ───────── code block */
.code {
  background: #0f1619; color: #d9e2e4; border-radius: var(--radius); padding: 20px 24px; overflow-x: auto;
  font: 400 .84rem/1.7 var(--mono); border: 1px solid #0f1619;
}
.code .c { color: #7d8b90; }
.code .k { color: #e3b457; }
.code .s { color: #8cc3c0; }

/* ───────── footer */
.site-footer { margin-top: 40px; border-top: 1px solid var(--line); background: var(--bg); }
.site-footer__inner { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; padding-top: 48px; padding-bottom: 40px; }
.site-footer p { color: var(--muted); font-size: .875rem; max-width: 22em; margin-top: 16px; }
.site-footer__h { font: 600 .875rem/1 var(--font); color: var(--ink); margin: 6px 0 16px; }
.site-footer nav a { display: block; color: var(--muted); text-decoration: none; padding: 4px 0; font-size: .875rem; }
.site-footer nav a:hover { color: var(--brand); text-decoration: underline; }
.site-footer__base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 20px; padding-bottom: 24px; border-top: 1px solid var(--line); color: var(--muted); font: 400 .8125rem var(--font); }

/* ───────── responsive */
@media (max-width: 960px) {
  .hero, .split, .band { grid-template-columns: 1fr; gap: 32px; }
  .split--flip > :first-child { order: 0; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: 1fr; }
  .site-footer__inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .wrap { padding-left: 16px; padding-right: 16px; }
  .site-header__inner { flex-wrap: wrap; height: auto; padding-top: 12px; gap: 0; }
  .brand { margin-right: auto; }
  .tabs { order: 3; width: 100%; margin: 8px -8px 0; overflow-x: auto; scrollbar-width: none; }
  .tabs a[aria-current="page"]::after { bottom: 0; }
  .header-actions .btn { display: none; }
  .page-head, .hero { padding-top: 32px; }
  .section { padding: 32px 0; }
  .grid--2, .grid--4 { grid-template-columns: 1fr; }
  .band { padding: 32px 24px; }
  .split__fig { padding: 16px; }
  .site-footer__inner { grid-template-columns: 1fr 1fr; }
  .site-footer__brand { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
.split .muted, .section__head p { color: var(--ink-2); }
.site-footer__base { border-top: 0; background: linear-gradient(var(--line), var(--line)) center top / calc(100% - 48px) 1px no-repeat; }
@media (max-width: 720px) { .site-footer__base { background-size: calc(100% - 32px) 1px; } }
@media (max-width: 720px) {
  .tabs { margin: 8px 0 0; gap: 0; }
  .tabs a { padding: 8px 5px; font-size: .875rem; }
  .tabs a[aria-current="page"]::after { left: 5px; right: 5px; }
  /* wide diagrams: keep them readable and let them scroll sideways */
  .figure--wide { overflow-x: auto; margin: 0 -16px; padding: 0 16px 6px; scrollbar-width: thin; }
  .figure--wide img { min-width: 620px; }
}

/* ───────── layout safety + small-screen polish */
.hero > *, .split > *, .grid > *, .band > * { min-width: 0; }
.hero--404 { grid-template-columns: 1fr 280px; }
@media (max-width: 960px) { .hero--404 { grid-template-columns: 1fr; } .hero--404 .figure { max-width: 240px; } }
@media (max-width: 720px) {
  h1 { font-size: 2.15rem; }
  h2 { font-size: 1.55rem; }
  .lede { font-size: 1.06rem; }
  .card { padding: 24px; }
  .page-head { padding-bottom: 8px; }
  .hero__cta .btn { flex: 1 1 auto; justify-content: center; }
  .plan__price { font-size: 1.45rem; }
  .code { font-size: .78rem; padding: 16px; }
  .faq details { padding: 0 16px; }
}

/* ───────── forms */
.split--form { align-items: start; }
.form { gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; color: var(--ink); font-size: .875rem; }
.field input, .field select, .field textarea {
  font: inherit; font-size: .9375rem; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 6px; padding: 8px 12px; min-height: 40px; width: 100%;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--focus); outline-offset: 1px; border-color: transparent; }
.form .btn { align-self: flex-start; min-height: 40px; }
.form__status { margin: 0; font-weight: 600; min-height: 1.4em; }
.form__status[data-kind="ok"] { color: var(--brand); }
.form__status[data-kind="error"] { color: #b3261e; }
[data-theme="dark"] .form__status[data-kind="error"] { color: #f2a19a; }
.form__note { margin: 0; font-size: .85rem; color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ───────── long-form legal pages */
.prose .section { max-width: 780px; }
.prose h2 { font-size: 1.25rem; margin-top: 32px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--ink-2); }
.site-footer__base a:hover { color: var(--brand-strong); }
.prose .ticks { margin-bottom: 16px; }

/* ───────── try-it-free block */
.try-card { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: center; padding: 40px; background: var(--surface-2); }
.try-card h2 { margin-top: 0; }
.try-card .ticks { margin: 16px 0 24px; }
.try-card__code { margin: 0; white-space: pre; }
@media (max-width: 900px) { .try-card { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 24px 20px; } }
.is-signed-in .header-signin { display: none; }

/* ───────── docs */
.docs-layout { display: grid; grid-template-columns: 208px minmax(0, 1fr); gap: 48px; align-items: start; padding-bottom: 40px; }
.docs-toc { position: sticky; top: 92px; display: grid; gap: 2px; font-size: .93rem; }
.docs-toc__h { font: 600 .875rem/1 var(--font); color: var(--ink); margin: 0 0 8px 8px; }
.docs-toc a { padding: 6px 8px; border-radius: 6px; color: var(--ink-2); text-decoration: none; font-weight: 500; }
.docs-toc a:hover { background: var(--surface-2); color: var(--ink); }
.docs-body { display: grid; gap: 8px; max-width: 860px; }
.docs-body section { padding: 24px 0 24px; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
.docs-body section:first-child { padding-top: 0; }
.docs-body h2 { font-size: 1.55rem; display: flex; align-items: center; gap: 12px; }
.docs-body h3 { font-size: 1.02rem; margin: 24px 0 8px; }
.docs-body .code { margin: 0; white-space: pre; }
.docs-body .steps { margin-bottom: 8px; }
.docs-body .steps h3 { margin: 3px 0 4px; }
.method { font: 600 .75rem/1 var(--mono); padding: 5px 8px; border-radius: 4px; background: var(--accent-soft); color: var(--brand-strong); }
.method--get { background: var(--brand-soft); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin: 8px 0 16px; }
.doc-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.doc-table th { text-align: left; font: 600 .8125rem/1.2 var(--font); color: var(--ink); background: var(--surface-2); padding: 8px 16px; border-bottom: 1px solid var(--line); }
.doc-table td { padding: 8px 16px; border-bottom: 1px solid var(--line); color: var(--ink-2); vertical-align: top; }
.doc-table tr:last-child td { border-bottom: 0; }
.doc-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.small-note { font-size: .8rem; }
.try-card--slim { grid-template-columns: 1fr auto; padding: 24px 32px; margin-top: 24px; }
.try-card--slim h2 { margin: 0 0 4px; font-size: 1.3rem; }
.try-card--slim p { margin: 0; }
@media (max-width: 960px) {
  .docs-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .docs-toc { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
  .docs-toc__h { width: 100%; margin-left: 0; }
  .docs-toc a { background: var(--surface); border: 1px solid var(--line); padding: 5px 8px; font-size: .85rem; }
}
@media (max-width: 720px) { .try-card--slim { grid-template-columns: minmax(0, 1fr); } }
.docs-layout > *, .docs-body > * { min-width: 0; }

/* ───────── free OCR tool (/try): a big drop zone, then a full-screen workspace (image | live text) */
.tool-section { padding-top: 16px; }
.tool { display: grid; gap: 20px; }
.drop {
  display: grid; place-items: center; min-height: 280px; padding: 16px; cursor: pointer; text-align: center;
  border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface-2); color: var(--ink-2);
}
.drop--big { min-height: 320px; border-width: 2px; border-radius: 12px; }
.drop:hover, .drop.is-over { border-color: var(--brand); background: var(--brand-soft); }
.drop:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.drop__empty { display: grid; justify-items: center; gap: 4px; }
.drop__icon {
  width: 56px; height: 56px; padding: 14px; margin-bottom: 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); fill: none; stroke: var(--brand); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.drop:hover .drop__icon, .drop.is-over .drop__icon { border-color: var(--brand); }
.drop__empty strong { color: var(--ink); font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }
.drop__or { font-size: 1rem; }
.drop__empty small { display: block; margin-top: 8px; color: var(--muted); font-size: .8125rem; max-width: 30em; }
.drop__link { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }

.samples__label { display: block; margin-bottom: 8px; font-size: .875rem; color: var(--muted); }
.samples__row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.sample {
  display: flex; flex-direction: column; padding: 0; overflow: hidden; cursor: pointer; text-align: start;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit;
}
.sample img { width: 100%; height: 110px; object-fit: cover; object-position: top; background: #faf8f4; border-bottom: 1px solid var(--line); }
.sample span { padding: 8px 10px; font-weight: 500; font-size: .8125rem; }
.sample:hover { border-color: var(--line-strong); }
.sample:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.seg { display: inline-flex; padding: 2px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span, .seg button { display: block; padding: 6px 12px; border: 0; border-radius: 4px; background: none; font: 500 .875rem var(--font); color: var(--ink-2); cursor: pointer; }
.seg input:checked + span, .seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.seg input:focus-visible + span { outline: 2px solid var(--focus); }
.tool__left { margin: 0; font-size: .875rem; color: var(--muted); min-height: 1.4em; }
.tool__text {
  margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; unicode-bidi: plaintext;
  font: 400 1rem/1.7 var(--font); color: var(--ink);
}
.tool__text.is-empty { color: var(--muted); }
.tool__gate { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; margin-top: 16px; border-color: var(--brand); }
.tool__gate h2 { font-size: 1.3rem; margin-bottom: 8px; }
.tool__gate p { margin: 0 0 8px; }
.tool__gate-actions { display: grid; gap: 8px; }

/* the workspace */
body.ws-open { overflow: hidden; }
.ws { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; background: var(--bg); }
.ws[hidden] { display: none !important; }
.ws__top { display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 12px; border-bottom: 1px solid var(--line); flex: none; }
.ws__icon {
  display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink-2);
}
.ws__icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.ws__icon:hover { color: var(--ink); border-color: var(--line-strong); }
.ws__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: .9375rem; }
.ws__left { font-size: .8125rem; color: var(--muted); text-align: end; }
.ws__left a { color: var(--brand); }
.ws__tabs { display: none; }
.ws__split { flex: 1; min-height: 0; display: grid; grid-template-columns: var(--split, 50%) 9px minmax(0, 1fr); }
.ws__pane { min-width: 0; min-height: 0; overflow: auto; }
.ws__pane--img {
  display: grid; place-items: center; padding: 24px 24px 96px;
  background: var(--surface-2) radial-gradient(circle, var(--line) 1px, transparent 1px) 0 0 / 16px 16px;
}
.ws__pane--img img { max-width: 100%; max-height: 100%; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 6px 24px rgba(0, 0, 0, .08); cursor: zoom-in; }
.ws__pane--img.is-zoomed { place-items: start; }
.ws__pane--img.is-zoomed img { max-width: none; max-height: none; cursor: zoom-out; }
.ws__divider {
  position: relative; cursor: col-resize; touch-action: none;
  background: linear-gradient(var(--line), var(--line)) center / 1px 100% no-repeat;
}
.ws__divider::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 5px; height: 40px; transform: translate(-50%, -50%);
  border-radius: 999px; background: var(--line-strong);
}
.ws__divider:hover::after, .ws__divider:focus-visible::after, .ws__divider.is-dragging::after { background: var(--brand); }
.ws__divider:focus-visible { outline: none; }
.ws__pane--txt { padding: 28px 32px 112px; }
.ws__pane--txt .form__status { margin-top: 12px; }
.ws__dock {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 2;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; max-width: calc(100% - 24px);
  padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  box-shadow: var(--shadow-md);
}
[data-theme="dark"] .ws__dock { box-shadow: 0 4px 12px rgb(0 0 0 / .5); }
.dropall {
  position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; pointer-events: none;
  background: color-mix(in srgb, var(--brand) 14%, transparent); border: 3px dashed var(--brand);
}
.dropall[hidden] { display: none !important; }
.dropall span { display: grid; justify-items: center; gap: 4px; padding: 24px 32px; border-radius: 12px; background: var(--surface); font-weight: 600; font-size: 1.125rem; color: var(--ink); box-shadow: var(--shadow-md); }
@media (max-width: 900px) {
  .tool__gate { grid-template-columns: minmax(0, 1fr); }
  .drop--big { min-height: 220px; }
  .ws__tabs { display: inline-flex; }
  .ws__name { display: none; }
  .ws__left { flex: 1; font-size: .75rem; }
  .ws__split { grid-template-columns: minmax(0, 1fr); }
  .ws__divider { display: none; }
  .ws--img .ws__pane--txt, .ws--txt .ws__pane--img { display: none; }
  .ws__pane--img { padding: 16px 16px 120px; }
  .ws__pane--txt { padding: 20px 16px 140px; }
  .ws__dock { bottom: 10px; gap: 6px; padding: 6px; }
  .ws__dock .btn { padding: 7px 10px; font-size: .875rem; }
}

/* OCR-by-language links, tips */
.lang-links { margin: 16px 0 0; font-size: .9375rem; }
.lang-links .muted { margin-inline-end: 4px; }
.lang-links a { unicode-bidi: isolate; } /* keeps names in right-to-left scripts in their listed order */
.tips { max-width: 46em; gap: 12px; font-size: 1rem; }

/* right-to-left pages (/fa/…) */
:is([lang="fa"], [lang="ar"], [lang="ur"], [lang="hi"]) :is(h1, h2, h3) { letter-spacing: 0; line-height: 1.4; } /* negative spacing breaks joined letters */
[lang="ur"] .lede, [lang="ur"] .faq p, [lang="ur"] .ticks { line-height: 1.9; }
[dir="rtl"] .ticks li { padding-left: 0; padding-right: 24px; }
[dir="rtl"] .ticks li::before { left: auto; right: 3px; }
[dir="rtl"] .faq summary::after { margin-right: auto; }

/* text arriving live: a blinking cursor at the end */
#try-out.is-streaming::after, .tool__text.is-streaming::after {
  content: ""; display: inline-block; width: .5em; height: 1.1em; margin-inline-start: 2px; vertical-align: text-bottom;
  background: var(--brand); animation: caret 1s steps(2, start) infinite;
}
@keyframes caret { to { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { #try-out.is-streaming::after, .tool__text.is-streaming::after { animation: none; } }

/* formatted Markdown (OCR results on /try and in the console) */
.md { color: var(--ink); font-size: .97rem; line-height: 1.7; }
.md > :first-child { margin-top: 0; }
.md h1, .md h2, .md h3, .md h4 { margin: 1em 0 .4em; line-height: 1.25; }
.md h1 { font-size: 1.45rem; } .md h2 { font-size: 1.25rem; } .md h3 { font-size: 1.08rem; } .md h4 { font-size: 1rem; }
.md p { margin: 0 0 .8em; }
.md ul, .md ol { margin: 0 0 .8em; padding-inline-start: 1.4em; }
.md table { border-collapse: collapse; margin: 0 0 1em; font-size: .9rem; display: block; overflow-x: auto; max-width: 100%; }
.md th, .md td { border: 1px solid var(--line); padding: 6px 10px; text-align: start; vertical-align: top; }
.md th { background: var(--surface-2); font-weight: 600; }
.md code { background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
.md pre { background: var(--surface-2); padding: 12px; border-radius: 6px; overflow-x: auto; }
.md blockquote { margin: 0 0 .8em; padding-inline-start: 12px; border-inline-start: 2px solid var(--line); color: var(--muted); }
.md hr { margin: 1em 0; }

/* workspace: formatted / Markdown switch, icon buttons in the floating bar */
.ws__view { margin-bottom: 16px; }
.ws__view[hidden], #try-md[hidden], #try-out[hidden] { display: none !important; }
.btn--i svg { flex: none; max-width: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.seg span, .seg button { white-space: nowrap; }
@media (max-width: 900px) {
  .ws__dock { flex-wrap: nowrap; }
  .ws__dock .btn--i { padding: 8px; }
  .ws__dock .btn--i span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ws__dock .seg span { padding: 6px 8px; }
}

/* ═════════ shadcn/ui components (overrides the older rules above) ═════════ */
body { font-size: 15px; line-height: 1.6; font-synthesis-weight: none; text-rendering: optimizeLegibility; }
::selection { background: var(--brand); color: var(--on-brand); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--ring) 50%, transparent); outline-offset: 1px; border-radius: var(--radius-md); }
a { color: var(--ink); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
h1, h2, h3 { color: var(--ink); font-weight: 600; letter-spacing: -0.025em; }
h1 { font-size: clamp(2.25rem, 4.2vw, 3.25rem); line-height: 1.08; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 1.875rem); line-height: 1.2; letter-spacing: -0.03em; }
h3 { font-size: 1rem; line-height: 1.4; letter-spacing: -0.01em; }
.lede { font-size: 1.125rem; line-height: 1.6; color: var(--muted); }
.muted, .section__head p, .split .muted { color: var(--muted); }
.hero h1 em { color: var(--muted); }
.eyebrow { color: var(--muted); font-size: .875rem; }
html { scrollbar-color: var(--line-strong) transparent; }
input, textarea, select, button { caret-color: var(--ink); }

/* header: 56px, background with a soft hairline */
.site-header { background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.site-header__inner { height: 56px; gap: 20px; }
.brand { font-size: 1rem; font-weight: 600; letter-spacing: -0.02em; }
.brand img { width: 24px; height: 24px; }
.tabs { gap: 0; }
.tabs a { padding: 6px 10px; border-radius: var(--radius-md); color: var(--muted); font-size: .875rem; font-weight: 500; transition: color .15s; }
.tabs a:hover { color: var(--ink); background: none; }
.tabs a[aria-current="page"] { color: var(--ink); font-weight: 500; }
.tabs a[aria-current="page"]::after { display: none; }

/* buttons: 36px default, 32px small, 6/8px radius */
.btn { height: 36px; padding: 0 16px; gap: 8px; border-radius: var(--radius-md); border: 1px solid transparent; font: 500 .875rem/1 var(--font); justify-content: center; transition: background-color .15s, color .15s, border-color .15s, box-shadow .15s; }
.btn:active { transform: translateY(0.5px); }
.btn--primary, [data-theme="dark"] .btn--primary { background: var(--brand); border-color: transparent; color: var(--on-brand); box-shadow: var(--shadow-xs); }
.btn--primary:hover, [data-theme="dark"] .btn--primary:hover { background: color-mix(in srgb, var(--brand) 90%, var(--bg)); border-color: transparent; color: var(--on-brand); }
.btn--primary:disabled:hover { background: var(--brand); }
.btn--ghost { background: var(--bg); border-color: var(--line); color: var(--ink); box-shadow: var(--shadow-xs); }
.btn--ghost:hover { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
[data-theme="dark"] .btn--ghost { background: rgb(255 255 255 / .045); border-color: rgb(255 255 255 / .15); }
[data-theme="dark"] .btn--ghost:hover { background: rgb(255 255 255 / .09); }
.btn--sm { height: 32px; padding: 0 12px; font-size: .8125rem; gap: 6px; }
.btn:disabled, .btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn { width: 36px; height: 36px; border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--bg); color: var(--ink); box-shadow: var(--shadow-xs); transition: background-color .15s; }
.icon-btn:hover { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
.icon-btn svg { width: 16px; height: 16px; }
[data-theme="dark"] .icon-btn { background: rgb(255 255 255 / .045); border-color: rgb(255 255 255 / .15); }

/* cards: 14px radius, 1px border, small shadow */
.card { border-radius: var(--radius-xl); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm); }
.card p { color: var(--muted); }
.card__link { font-weight: 500; font-size: .875rem; }
a.card { transition: background-color .15s, border-color .15s; }
a.card:hover { border-color: var(--line-strong); background: color-mix(in srgb, var(--surface-2) 40%, var(--surface)); }
.card--featured { border-color: var(--ink); }
.split__fig { border-radius: var(--radius-xl); background: var(--surface-2); }
.ticks { color: var(--muted); font-size: .9375rem; }
.ticks li::before { border-color: var(--ink); }

/* badges */
.pill { padding: 2px 8px; border-radius: 999px; font: 500 .75rem/1.4 var(--font); border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.pill::before { width: 6px; height: 6px; }
.pill--research { border-style: dashed; color: var(--muted); }

/* inputs: 36px, 8px radius, ring on focus */
.field { gap: 8px; }
.field label { font-weight: 500; font-size: .875rem; color: var(--ink); }
.field input, .field select, .field textarea {
  border-radius: var(--radius-md); border: 1px solid var(--line); background: transparent; color: var(--ink);
  font-size: .875rem; box-shadow: var(--shadow-xs); transition: border-color .15s, box-shadow .15s;
}
.field input, .field select { height: 36px; padding: 0 12px; }
.field textarea { padding: 8px 12px; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 50%, transparent); }
[data-theme="dark"] .field input, [data-theme="dark"] .field select, [data-theme="dark"] .field textarea { background: rgb(255 255 255 / .045); border-color: rgb(255 255 255 / .15); }

/* segmented control = shadcn tabs list */
.seg { padding: 3px; gap: 0; border: 0; border-radius: var(--radius); background: var(--surface-2); }
.seg button { height: 30px; padding: 0 12px; border: 1px solid transparent; border-radius: var(--radius-md); font: 500 .8125rem/1 var(--font); color: var(--muted); transition: color .15s; }
.seg button:hover { color: var(--ink); }
.seg button[aria-selected="true"], .seg button[aria-checked="true"] { background: var(--bg); color: var(--ink); box-shadow: var(--shadow-sm); }
[data-theme="dark"] .seg button[aria-selected="true"], [data-theme="dark"] .seg button[aria-checked="true"] { background: rgb(255 255 255 / .1); border-color: rgb(255 255 255 / .15); }

/* code */
.code { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-xl); font: 400 .8125rem/1.7 var(--mono); }
.code .c { color: var(--muted); }
.code .k { color: #b45309; }
.code .s { color: #0f766e; }
[data-theme="dark"] .code { background: #111111; border-color: var(--line); }
[data-theme="dark"] .code .k { color: #fbbf24; }
[data-theme="dark"] .code .s { color: #5eead4; }
code { font-family: var(--mono); }

/* sections, band, steps, faq */
.section + .section { border-top: 1px solid var(--line); }
.band, [data-theme="dark"] .band { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-xl); }
.band h2 { color: var(--ink); }
.band p { color: var(--muted); }
.band .btn--primary { background: var(--brand); color: var(--on-brand); }
.band .btn--primary:hover { background: color-mix(in srgb, var(--brand) 90%, var(--bg)); color: var(--on-brand); }
.band__list b { color: var(--muted); }
.steps li::before { border-radius: 999px; border-color: var(--line); background: var(--surface-2); font: 500 .75rem var(--mono); }
.faq summary { font-weight: 500; }
.faq summary::after { color: var(--muted); }
.faq details p { color: var(--muted); }
.plan__price { font-size: 1.875rem; letter-spacing: -0.03em; }
.note, .plan__unit { color: var(--muted); }

/* footer */
.site-footer { background: var(--bg); }
.site-footer__h { font-weight: 500; }
.site-footer nav a { color: var(--muted); }
.site-footer nav a:hover { color: var(--ink); text-decoration: none; }

/* docs + tables */
.table-wrap { border-radius: var(--radius-xl); border: 1px solid var(--line); box-shadow: var(--shadow-xs); }
.doc-table th { font-weight: 500; color: var(--muted); }
.docs-toc a { border-radius: var(--radius-md); }
.method { border-radius: var(--radius-sm); background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.method--get { background: var(--surface-2); }

/* free tool */
.drop { border-radius: var(--radius-xl); border-color: var(--line-strong); background: var(--bg); }
.drop:hover, .drop.is-over { border-color: var(--ink); background: var(--surface-2); }
.try-card { border-radius: var(--radius-xl); background: var(--surface-2); border: 1px solid var(--line); }
.skip { background: var(--brand); color: var(--on-brand); border-radius: var(--radius-md); }
.drop__icon { background: var(--bg); stroke: var(--ink); box-shadow: var(--shadow-xs); }
.drop:hover .drop__icon, .drop.is-over .drop__icon { border-color: var(--line-strong); }
.drop:focus-within { outline: 3px solid color-mix(in srgb, var(--ring) 50%, transparent); outline-offset: 1px; }

/* phones and tablets: the header wraps (logo + actions, then the scrollable menu), so its height follows the content */
@media (max-width: 960px) {
  .site-header__inner { height: auto; min-height: 56px; flex-wrap: wrap; gap: 0 8px; padding-top: 10px; padding-bottom: 0; }
  .brand { margin-right: auto; }
  .tabs { order: 3; width: 100%; margin: 6px 0 0; padding-bottom: 6px; gap: 0; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { padding: 8px 10px; flex: none; }
  .tabs a:first-child { padding-left: 0; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  h1 { font-size: 2.125rem; }
  .lede { font-size: 1.0625rem; }
}
.docs-body .code + .code { margin-top: 12px; }

/* docs sidebar (same vocabulary as the console sidebar) */
.docs-layout { grid-template-columns: 224px minmax(0, 1fr); gap: 48px; }
.docs-toc { top: 80px; gap: 1px; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--sidebar); font-size: .875rem; }
.docs-toc__console { width: 100%; margin-bottom: 8px; }
.docs-toc__h { display: flex; align-items: center; height: 32px; margin: 4px 0 0; padding: 0 8px; font: 500 .75rem/1 var(--font); color: var(--muted); }
.docs-toc a:not(.btn) { display: flex; align-items: center; height: 32px; padding: 0 8px; border-radius: var(--radius-md); color: var(--ink); font-weight: 400; text-decoration: none; transition: background-color .15s; }
.docs-toc a:not(.btn):hover { background: var(--surface-2); color: var(--ink); }
.docs-toc a[aria-current] { background: var(--surface-2); font-weight: 500; }
@media (max-width: 960px) {
  .docs-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .docs-toc { position: static; display: flex; flex-wrap: wrap; gap: 4px; padding: 12px; }
  .docs-toc__console { width: auto; margin: 0 0 4px; flex-basis: 100%; justify-content: center; }
  .docs-toc__h { display: none; }
  .docs-toc a:not(.btn) { height: 32px; border: 1px solid var(--line); background: var(--bg); padding: 0 10px; font-size: .8125rem; }
}
.docs-toc a.btn--primary, .docs-toc a.btn--primary:hover { color: var(--on-brand); background: var(--brand); border: 1px solid transparent; font-size: .8125rem; font-weight: 500; }
.docs-toc a.btn--primary:hover { background: color-mix(in srgb, var(--brand) 90%, var(--bg)); }

/* phones and tablets: logo, theme, ☰; the menu opens as a panel under the header (no sideways-scrolling row) */
.nav-toggle, .tabs__actions { display: none; }
.nav-toggle .menu-close { display: none; }
.site-header.is-open .nav-toggle .menu-open { display: none; }
.site-header.is-open .nav-toggle .menu-close { display: block; }
@media (max-width: 960px) {
  .site-header__inner { height: 56px; min-height: 0; flex-wrap: nowrap; gap: 8px; padding-top: 0; padding-bottom: 0; }
  .brand { margin-right: auto; }
  .nav-toggle { display: inline-grid; }
  .header-actions .btn { display: none; }
  .tabs { display: none; }
  .site-header.is-open .tabs {
    display: flex; flex-direction: column; gap: 0; position: fixed; top: 57px; left: 0; right: 0; bottom: 0; z-index: 30;
    margin: 0; padding: 8px 16px calc(24px + env(safe-area-inset-bottom)); overflow-y: auto; background: var(--bg); width: auto;
  }
  .site-header.is-open .tabs a:not(.btn) { display: flex; align-items: center; height: 52px; padding: 0 4px; border-radius: 0; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 1.0625rem; font-weight: 500; }
  .site-header.is-open .tabs a[aria-current="page"] { color: var(--ink); font-weight: 600; }
  .site-header.is-open .tabs__actions { display: grid; gap: 8px; margin-top: 24px; }
  .tabs__actions .btn { height: 44px; font-size: .9375rem; }
  html.nav-open { overflow: hidden; }
}
@media (max-width: 960px) and (min-width: 721px) { .site-header.is-open .tabs { left: auto; width: 360px; border-left: 1px solid var(--line); box-shadow: var(--shadow-md); } }
@media (max-width: 960px) {
  /* the header's backdrop blur would make the fixed panel size itself to the 56px header */
  .site-header.is-open { backdrop-filter: none; background: var(--bg); }
  .site-header.is-open .tabs { height: calc(100dvh - 57px); bottom: auto; }
}
.tabs .tabs__actions .btn--primary, .tabs .tabs__actions .btn--primary:hover { color: var(--on-brand); }
.tabs .tabs__actions .btn--ghost, .tabs .tabs__actions .btn--ghost:hover { color: var(--ink); }

/* footer: consistent rhythm (brand, then link groups, then the base line) */
.site-footer { margin-top: 64px; }
.site-footer__inner { padding-top: 48px; padding-bottom: 40px; row-gap: 32px; }
.site-footer p { margin: 12px 0 0; }
.site-footer__h { margin: 0 0 12px; font-size: .875rem; color: var(--ink); }
.site-footer nav a { padding: 5px 0; }
.site-footer__base { padding-top: 20px; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
@media (max-width: 720px) {
  .site-footer { margin-top: 48px; }
  .site-footer__inner { padding-top: 32px; padding-bottom: 32px; grid-template-columns: 1fr 1fr; column-gap: 24px; row-gap: 28px; }
  .site-footer__brand { grid-column: 1 / -1; }
  .site-footer nav a { padding: 7px 0; font-size: .9375rem; }
  .site-footer__base { padding-top: 16px; flex-direction: column; gap: 8px; background-size: calc(100% - 32px) 1px; }
}
.site-footer .site-footer__h { margin: 0 0 10px; max-width: none; }
