/* Hallmark · genre: modern-minimal · macrostructure: Workbench · theme: Lantern instrument (custom, shared) + data-ln-style=soft
 * nav: N1b · footer: Ft2 · signature: accent wordmark in --ln-font-mono · enrichment: none (real request/response)
 * pre-emit critique: P4 H4 E4 S5 R4 V4 · contrast: pass (40–41, theme-verified) · mobile: pass (34, 49, 50–57)
 */
/* The instrument theme owns colour and type. These names only alias its tokens
   for the older rules in styles.css and portal.css; none of them is a new value. */
.api-site {
  --wrap: 66rem;
  --bg: var(--ln-canvas);
  --surface: var(--ln-surface);
  --bg-band: var(--ln-surface-quiet);
  --well: var(--ln-well);
  --fg: var(--ln-ink);
  --fg-muted: var(--ln-ink-secondary);
  --accent: var(--ln-accent);
  --accent-fg: var(--ln-on-accent);
  --accent-soft: var(--ln-accent-wash);
  --line: var(--ln-hairline);
  --ok: var(--ln-positive);
  --warn: var(--ln-caution);
  --critical: var(--ln-critical);
  --ember: var(--ln-ember);
  font-family: var(--ln-font);
  background: var(--ln-canvas);
  color: var(--ln-ink);
}
html[lang="ar"] .api-site { font-family: var(--ln-font-ar); }
.api-site h1, .api-site h2, .api-site h3 { font-weight: 600; }
/* Kalemio's secondary buttons sit on the surface colour, not Lantern's quieter fill. */
.api-site .ln-secondary-btn { --ln-btn-fill: var(--surface); }
.api-site .ln-input:focus-visible { outline: 2px solid var(--ln-focus); outline-offset: 3px; }
.api-site .ln-input { background: var(--ln-surface); color: var(--fg); border: 1px solid var(--ln-control-edge); }
/* The header is a Lantern site bar, aligned to the page column and solid like the old one. */
.api-site .site-header { padding-inline: max(var(--step), calc((100% - var(--wrap)) / 2 + var(--step))); background: var(--bg); backdrop-filter: none; border-block-end: 1px solid var(--line); }
.api-site .ln-bar > .ln-bar-brand { margin-inline-end: auto; font-size: 1.15rem; font-weight: 600; }
.api-site .ln-bar > .ln-bar-actions { margin-inline-start: 0; }
@media (scripting: none) { .api-site .ln-bar > noscript { display: contents; } }
.noscript-nav { display: none; }
@media (max-width: 720px) {
  .noscript-nav { position: absolute; inset-block-start: 100%; inset-inline: 0; display: flex; flex-wrap: wrap; gap: .25rem 1rem; padding: .5rem var(--step); background: var(--bg); border-block-end: 1px solid var(--line); }
  .noscript-nav a { display: inline-flex; align-items: center; min-height: 44px; }
}
.api-site .lang-switch { border-radius: var(--ln-radius-control); }
.api-site .text-link { align-self: center; font-size: .9375rem; }
.api-site .developer-actions { align-items: center; }
.api-hero h1 { max-width: 19ch; font-size: clamp(2.3rem, 4vw, 3.1rem); font-weight: 550; line-height: 1.15; letter-spacing: -.035em; text-wrap: initial; }
.api-information section { padding-block: 1rem; }
.api-information section h2 { margin-block-start: 0; }
.developer-split > * { min-width: 0; }
.currency-selector { display: flex; align-items: center; gap: .75rem; font-size: .9rem; white-space: nowrap; }
.page-developers .currency-selector .ln-input { width: auto; min-width: 5.5rem; }
.account-heading h2 { margin: 0; }
.developer-nav { max-width: var(--wrap); margin: 0 auto; padding: 1.25rem 1.5rem; display: flex; gap: 1.75rem; border-block-end: 1px solid var(--line); flex-wrap: wrap; font-size: .9375rem; }
.developer-nav a { color: var(--fg-muted); text-decoration: none; }
.developer-nav a[aria-current] { color: var(--accent); font-weight: 650; }
.developer-split { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; align-items: start; }
.developer-split p { max-width: 54ch; }
.developer-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-block: 1rem; }
.page-developers .ln-surface { padding: 1.5rem; }
/* Size only: Lantern's finish comes through the tokens above, and it has no size tokens. */
.page-developers .ln-btn { font: inherit; font-size: .9375rem; min-height: 44px; padding: .65rem 1rem; }
.page-developers pre { overflow-x: auto; white-space: pre; font-size: .875rem; line-height: 1.8; max-width: 100%; }
.developer-code { margin-block-start: 1rem; }
.developer-packs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-block: 1.5rem; }
.developer-packs > article { display: flex; flex-direction: column; align-items: start; }
.developer-packs > article > :first-child { margin-block-start: 0; }
.developer-packs > article > .ln-btn { margin-block-start: auto; width: 100%; }
.pack-price { font-size: 1.8rem; font-weight: 550; margin-block: .5rem; }
.pack-price span { font-size: 1rem; font-weight: 400; }
.portal-notice { border: 1px solid var(--ember); border-radius: var(--ln-r-xs); padding: var(--ln-md) var(--ln-lg); font-size: .9375rem; margin-block-end: 2rem; }
.page-developers .ln-input { border-radius: var(--ln-r-sm); min-height: 44px; padding: .6rem .75rem; }
.api-site .page-head { padding-block: 2.5rem 1.5rem; }
.api-site .page-head h1 { font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 550; }
.api-site .page-head .lede { font-size: 1.05rem; }
.page-developers .ln-input { font: inherit; width: 100%; min-width: 0; }
.account-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-block-end: 1.5rem; }
.account-heading button { white-space: nowrap; flex-shrink: 0; }
.docs-layout { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 3rem; }
.docs-layout > * { min-width: 0; }
.docs-body { overflow-wrap: anywhere; }
/* Keys such as verbose_json stay whole; .table-scroll takes any overflow on narrow screens. */
.docs-body .ln-table :is(th, td):first-child { overflow-wrap: normal; }
/* Model ids read as one token; a break at their hyphen looks like two names. */
.api-site code.nowrap { white-space: nowrap; }
.docs-layout aside nav { display: grid; gap: .25rem; font-size: .875rem; position: sticky; top: 6rem; }
.docs-layout aside a { padding-block: .4rem; color: var(--fg-muted); text-decoration: none; }
.docs-layout aside a:hover { color: var(--accent); }
.docs-body h2 { margin-block-start: 2.5rem; scroll-margin-top: 6rem; }
.docs-body p { max-width: 70ch; }
.docs-body pre { padding: 1.25rem !important; }
.status-overview { margin-block-end: 2rem; }
.status-component { margin-block: 2rem; }
.status-bars { display: grid; grid-template-columns: repeat(30, 1fr); gap: 4px; margin-block: 1rem .5rem; }
.status-day { position: relative; height: 2.5rem; overflow: hidden; border-radius: 3px; background: var(--line); }
.status-day.good { background: var(--ok); }
.status-day.bad { background: var(--critical); }
.status-day.degraded { background: var(--ok); }
.status-day-failure { position: absolute; inset-block: 0; inset-inline-start: calc(var(--failure-position) * 1%); width: 2px; transform: translateX(-50%); border-radius: 1px; background: var(--critical); }
.status-day.partial { background: var(--warn); }
.status-legend { display: flex; justify-content: space-between; font-size: .8rem; color: var(--fg-muted); }
.status-recent { margin-block: 1.25rem 1.5rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--ln-r-sm); background: var(--bg-band); }
.status-recent h3 { margin: 0 0 .75rem; font-size: 1rem; }
.status-recent-bars { display: grid; grid-template-columns: repeat(288, minmax(0, 1fr)); gap: 1px; min-height: 2.25rem; }
.status-recent-check { min-width: 0; border-radius: 2px; background: var(--line); }
.status-recent-check.good { background: var(--ok); }
.status-recent-check.bad { background: var(--critical); }
.status-recent-check.unknown { opacity: .65; }
.status-recent-legend { display: flex; justify-content: space-between; margin-block-start: .45rem; font-size: .8rem; color: var(--fg-muted); }
.status-incidents { margin-block-start: 1rem; }
.status-incidents ul { margin: .5rem 0 0; padding-inline-start: 1.25rem; }
.status-incidents li + li { margin-block-start: .4rem; }
.page-developers [hidden] { display: none !important; }
/* Site rhythm: content is primary; material is reserved for controls and groups. */
.api-site { font-size: 1rem; }
.api-site h2 { font-size: clamp(1.25rem, 2.5vw, 1.6rem); letter-spacing: -.015em; }
.api-site section > .wrap > h2:first-child,
.api-site .developer-split > div > h2:first-child,
.status-overview h2 { margin-block-start: 0; }
.api-site .lede { font-size: 1.0625rem; line-height: 1.75; max-width: 47ch; }
.api-site .site-footer { margin-block-start: 0; padding-block: 2rem; font-size: .875rem; }
.api-site .brand .app-icon { width: 32px; height: 32px; }
.api-site .page-head + section { padding-block-start: 1.5rem; }
.api-site .page-head p { margin-block-end: 0; }
.api-site .ln-input { font-size: 1rem; }
.api-site :is(section[id], h2[id]) { scroll-margin-block-start: 6rem; }
.developer-packs > article { gap: .25rem; }
.developer-packs > article p:not(.pack-price) { color: var(--fg-muted); margin-block-end: 1.25rem; }
.api-site .docs-body .portal-notice { border: 0; background: none; box-shadow: none; padding: 0; margin-block-end: .75rem; }
.docs-body .portal-notice::before { display: none; }
.docs-body .developer-actions { align-items: center; font-size: .875rem; }
.docs-body .table-scroll { border: 1px solid var(--line); border-radius: var(--ln-r-sm); }
.docs-body :not(pre) > code { font-size: .875em; background: var(--well); padding: .1em .3em; border-radius: 4px; }
.status-component { padding-block: 1.5rem; margin: 0; border-block-end: 1px solid var(--line); }
.status-component h2 { margin: 0; }
.status-component > p:last-child { margin-block-end: 0; }
.status-component-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.status-component-heading p { margin: 0; font-size: .875rem; }
.status-overview > :last-child { margin-block-end: 0; }
.status-bars { gap: 3px; }
.status-day { height: 2rem; }
html[lang="ar"] .api-hero h1 { letter-spacing: normal; line-height: 1.45; }
@media(max-width: 700px) { .developer-split, .developer-packs, .docs-layout { grid-template-columns: 1fr; gap: 1.5rem; } .docs-layout aside { display: none; } .developer-nav { gap: .75rem 1.25rem; } .page-developers .ln-surface { padding: 1.1rem; } }
@media(max-width: 700px) {
  .docs-layout aside { display: block; padding-block-end: 1rem; border-block-end: 1px solid var(--line); }
  .docs-layout aside nav { position: static; display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
  .account-heading { flex-wrap: wrap; }
  .api-hero h1 { max-width: 18ch; }
  .status-component-heading { align-items: start; }
}
/* The transcript is the visual focus: spoken Arabic and its timing together. */
.api-hero-copy .developer-actions { gap: 1.25rem; margin-block: 1.5rem 1rem; }
.hero-plan-note { max-width: 44ch; font-size: .8rem; }
.transcript-sentence { margin: 2rem 0 .25rem; font-family: var(--ln-font-ar); font-size: clamp(1.9rem, 3vw, 2.5rem); line-height: 1.65; text-align: center; }
.transcript-translation { color: var(--fg-muted); text-align: center; font-size: .875rem; }
.timed-words { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; list-style: none; margin: 1.75rem 0 .75rem; padding: 0; }
.timed-words li { display: grid; gap: .65rem; justify-items: center; padding-block: .5rem .75rem; border-block-end: 2px solid var(--accent); min-width: 0; }
.timed-words li > span:first-child { font-family: var(--ln-font-ar); font-size: 1.5rem; }
.word-time { font-size: .7rem; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--accent); }
.benchmark-note { margin: 2rem 0 0; padding-block-start: 1.25rem; border-block-start: 1px solid var(--line); font-size: .85rem; max-width: 100%; }
.api-pricing .account-heading { align-items: start; gap: 2rem; }
.api-pricing .account-heading p { margin: .75rem 0 0; max-width: 54ch; color: var(--fg-muted); }
.api-pricing .currency-selector { margin-block-start: .15rem; }
.api-site .plan-option { background: var(--bg); }
.pricing-terms { max-width: 80ch; }
.api-site .site-footer { padding-block: 2.5rem; border-block-start: 1px solid var(--line); }
.docs-fields { margin-block: 1.5rem; }
.docs-fields > div { display: grid; grid-template-columns: 10rem minmax(0, 1fr); gap: 1.5rem; padding-block: .85rem; border-block-end: 1px solid var(--line); font-size: .9375rem; }
.docs-fields dd { margin: 0; color: var(--fg-muted); }
@media (max-width: 700px) {
  .api-hero h1 { font-size: 2.35rem; }
  .api-hero-copy .developer-actions { gap: 1rem; }
  .transcript-sentence { margin-block-start: 1.25rem; }
  .timed-words { gap: .35rem; }
  .api-pricing .account-heading { gap: 1rem; }
  .api-site .site-footer { padding-block: 2rem; }
  .docs-fields > div { grid-template-columns: 1fr; gap: .5rem; }
}
html[lang="ar"] .api-hero h1 { font-size: clamp(2.1rem, 3.7vw, 2.9rem); }
.word-time { font-family: var(--ln-font-mono); }
/* Provider comparison: a shared zero baseline and a fixed 30% scale. */
.hero-benchmark { margin: 0; padding: 1.6rem 1.75rem; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.hero-benchmark figcaption p { margin: 0; color: var(--fg-muted); font-size: .8rem; line-height: 1.5; }
.hero-benchmark figcaption p span { display: block; }
.benchmark-bars { list-style: none; padding: 0; margin: 1.4rem 0; display: grid; gap: .9rem; }
.benchmark-bars li { margin: 0; padding: 0; }
.benchmark-row { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; margin-block-end: .35rem; font-size: .8rem; }
.benchmark-row strong { font-size: .9rem; font-weight: 550; font-variant-numeric: tabular-nums; }
.benchmark-track { height: 7px; background: var(--bg-band); border-radius: 2px; overflow: hidden; }
.benchmark-track span { display: block; height: 100%; background: var(--fg-muted); opacity: .45; border-radius: 2px; }
.benchmark-ours .benchmark-row { color: var(--accent); font-weight: 650; }
.benchmark-ours .benchmark-row strong { font-weight: 700; }
.benchmark-ours .benchmark-track span { background: var(--accent); opacity: 1; }
.hero-benchmark .benchmark-caption { margin: 0; padding-block-start: 1rem; border-block-start: 1px solid var(--line); color: var(--fg-muted); font-size: .72rem; line-height: 1.6; }
@media (max-width: 700px) { .hero-benchmark { padding: 1.25rem; } }
.benchmark-track .benchmark-bar-0 { width: 15.3333%; }
.benchmark-track .benchmark-bar-1 { width: 21.0000%; }
.benchmark-track .benchmark-bar-2 { width: 24.6667%; }
.benchmark-track .benchmark-bar-3 { width: 24.6667%; }
.benchmark-track .benchmark-bar-4 { width: 56.6667%; }
.benchmark-track .benchmark-bar-5 { width: 83.6667%; }

/* ---- Hallmark pass: Workbench structure ---------------------------------- */
/* Section rhythm steps, all multiples of Lantern's 4px spacing. */
.api-site {
  --k-space-2xl: calc(var(--ln-xxl) * 1.5); /* 48px */
  --k-space-3xl: calc(var(--ln-xxl) * 2);   /* 64px */
  --k-space-4xl: calc(var(--ln-xxl) * 3);   /* 96px */
  --k-bar-height: 64px;
}
html, body { overflow-x: clip; }
.api-site h1, .api-site h2 { overflow-wrap: anywhere; min-width: 0; }

/* N1b bar: links, then the console as Lantern's bar CTA; the language switch last. */
@media (min-width: 721px) {
  .api-site .ln-bar > .ln-bar-actions { order: 3; margin-inline-start: var(--ln-md); }
  .api-site .ln-bar > .ln-bar-nav { order: 2; }
}
.api-site .ln-bar-nav > a, .api-site .ln-sheet-nav > a, .api-site .lang-switch { white-space: nowrap; }

/* Hero sits into the page: more room below than above. */
.api-hero { padding-block: clamp(2.5rem, 5vw, 4rem) clamp(3.5rem, 7vw, 5.5rem); }

/* Workbench: the claims annotate one request and its response. */
.workbench { display: grid; gap: var(--ln-lg); min-width: 0; }
.workbench .ln-code > pre { font-size: .8125rem; line-height: 1.7; }
.workbench-response { display: flex; flex-direction: column; }
.workbench-response > [role="tabpanel"] { min-height: 15rem; }
.workbench-response > pre[role="tabpanel"] { margin: 0; }
.workbench-note { padding: var(--ln-sm) var(--ln-md) var(--ln-md); color: var(--fg-muted); font-size: .75rem; }
/* The upload's own answer sits under it: a job to poll, before any transcript exists. */
.workbench-accepted { border-block-start: 1px solid var(--ln-hairline-faint); }
.workbench-status { display: flex; align-items: center; gap: var(--ln-sm); min-height: 40px; margin: 0; padding-inline: var(--ln-md); }
.workbench-status .ln-code-lang { font-size: var(--ln-fs-micro); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ln-ink-quiet); }
.workbench-status code { padding: 1px var(--ln-sm); border-radius: var(--ln-r-xs); background: var(--bg-band); color: var(--ok); font-size: .75rem; font-weight: 600; }
.workbench-accepted > pre { margin: 0; padding: 0 var(--ln-md) var(--ln-md); overflow-x: auto; direction: ltr; text-align: left; font-size: .8125rem; line-height: 1.7; color: var(--fg-muted); }
.workbench-next { margin: 0; padding-inline: var(--ln-xs); color: var(--fg-muted); font-size: .8125rem; line-height: 1.6; }
.workbench-next a { white-space: nowrap; }
.transcript-example { padding: var(--ln-lg) var(--ln-xl) var(--ln-sm); min-width: 0; }
.transcript-dialect { margin: 0; color: var(--fg-muted); font-size: .8125rem; }
.transcript-sentence { margin-block-start: var(--ln-lg); }

/* Use cases are rows keyed to the response field they rely on. */

/* The separate subtitle product: one quiet aside, not another feature pair. */
.api-subtitle-discovery { padding-block: 0 var(--k-space-3xl); }
.subtitle-aside { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--ln-xl) var(--k-space-2xl); padding: var(--ln-xl); border: 1px solid var(--line); border-radius: var(--ln-r-xs); }
.subtitle-aside > div { flex: 1 1 26rem; min-width: 0; }
.subtitle-aside h2 { margin: 0 0 var(--ln-sm); font-size: 1.15rem; }
.subtitle-aside p { margin: 0 0 var(--ln-sm); color: var(--fg-muted); font-size: .9375rem; max-width: 60ch; }
.subtitle-aside p:last-child { margin: 0; }
.subtitle-aside nav { flex: 0 1 18rem; }
.subtitle-aside h3 { margin: 0 0 var(--ln-sm); font-size: .875rem; color: var(--fg-muted); font-weight: 600; }
.subtitle-aside ul { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--ln-xs); font-size: .9375rem; }
.subtitle-aside li a { display: inline-flex; min-height: 32px; align-items: center; }

/* Pricing as a spec sheet: one row per plan, tabular figures. */
.api-pricing { padding-block: var(--k-space-3xl); }
.plan-sheet { width: 100%; margin-block: var(--ln-xl) var(--ln-lg); border-collapse: collapse; font-variant-numeric: tabular-nums; }
.plan-sheet th, .plan-sheet td { padding: var(--ln-lg) var(--ln-md); text-align: start; vertical-align: middle; border-block-end: 1px solid var(--line); }
.plan-sheet thead th { padding-block: 0 var(--ln-sm); color: var(--fg-muted); font-size: .8125rem; font-weight: 500; }
.plan-sheet th:first-child, .plan-sheet td:first-child { padding-inline-start: 0; }
.plan-sheet tbody th { font-size: 1.05rem; font-weight: 600; }
.plan-minutes, .plan-price { white-space: nowrap; }
.plan-minutes span, .plan-price span { color: var(--fg-muted); font-size: .875rem; }
.plan-price bdi { font-size: 1.25rem; font-weight: 600; }
.plan-action { text-align: end !important; padding-inline-end: 0 !important; width: 1%; }
.plan-action .ln-btn { white-space: nowrap; }
.plan-topup th, .plan-topup td { border-block-end: 0; }
.plan-topup .plan-price bdi { font-size: 1rem; }
.plan-speed { display: block; margin-block-start: 2px; color: var(--fg-muted); font-size: .8125rem; font-weight: 400; }
/* The row already says "Billed yearly"; the narrowest phones drop the repeat so the button fits. */
@media (max-width: 360px) { .plan-annual-word { display: none; } }
.plan-note { color: var(--fg-muted); font-size: .8125rem; max-width: 36ch; padding-inline-end: 0 !important; }
.pricing-terms { max-width: 78ch; margin: 0; }

/* Limits and data: short spec sheets. */
.spec-sheet { margin: 0; border-block-start: 1px solid var(--line); }
.spec-sheet > div { display: grid; grid-template-columns: minmax(0, 7.5rem) minmax(0, 1fr); gap: var(--ln-lg); padding-block: var(--ln-md); border-block-end: 1px solid var(--line); font-size: .9375rem; }
.spec-sheet dt { color: var(--fg-muted); }
.spec-sheet dd { margin: 0; }
.practical-links { display: flex; flex-wrap: wrap; gap: var(--ln-xs) var(--ln-xl); margin: var(--ln-lg) 0 0; font-size: .9375rem; }


/* Ft2 footer: brand and links on one line, then the colophon. */
.api-footer { display: grid; gap: var(--ln-xl); }
.footer-line { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--ln-md) var(--ln-xxl); }
.footer-line .footer-brand { margin: 0; font-weight: 600; }
.footer-line .footer-brand span { margin-inline-start: var(--ln-sm); color: var(--fg-muted); font-weight: 400; }
.footer-line nav { display: flex; flex-wrap: wrap; gap: var(--ln-xs) var(--ln-lg); }
.footer-line nav a, .footer-colophon a, .footer-colophon button { white-space: nowrap; font-size: .875rem; }
.footer-colophon { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ln-xs) var(--ln-xl); padding-block-start: var(--ln-lg); border-block-start: 1px solid var(--line); color: var(--fg-muted); font-size: .8125rem; }
.footer-colophon .api-company { margin: 0; margin-inline-end: auto; }

/* Policies: a sticky index beside a measured column, on the site column. */
.api-information { padding-block-end: var(--k-space-3xl); }
.info-body { max-width: 44rem; min-width: 0; }
.api-information.has-index { display: grid; grid-template-columns: 12rem minmax(0, 44rem); gap: var(--k-space-2xl); }
.info-index nav { position: sticky; top: calc(var(--k-bar-height) + var(--ln-xl)); display: grid; gap: 2px; font-size: .875rem; }
.info-index a, .docs-layout aside a { display: block; padding: 6px var(--ln-sm); margin-inline-start: calc(-1 * var(--ln-sm)); border-radius: var(--ln-r-xs); color: var(--fg-muted); text-decoration: none; }
.info-index a:hover, .docs-layout aside a:hover { color: var(--fg); background: var(--bg-band); }
.info-index a[aria-current], .docs-layout aside a[aria-current] { color: var(--accent); font-weight: 600; }
.info-index a:focus-visible, .docs-layout aside a:focus-visible { outline: 2px solid var(--ln-focus); outline-offset: 0; }
.docs-layout aside nav { top: calc(var(--k-bar-height) + var(--ln-xl)); gap: 2px; }
.docs-code, .api-information .ln-code { margin-block: var(--ln-lg); }
.docs-body .docs-code > pre { padding: var(--ln-lg) !important; }
/* Language tabs and Copy share the head while they fit; on narrower screens Copy wraps below. */
.docs-code > .ln-code-head:has(> .ln-segmented) { flex-wrap: wrap; padding-block: var(--ln-xs); }
.docs-code > .ln-code-head > .ln-segmented ~ .ln-code-copy { margin-inline-start: auto; }
@media (max-width: 360px) { .docs-code > .ln-code-head > .ln-segmented > button { padding-inline: 8px; } }

/* Status: summary, a key, then per service the 30-day history and the last day. */
.status-overview h2[data-state]::before { content: ''; display: inline-block; width: .6em; height: .6em; margin-inline-end: .5em; border-radius: 50%; background: var(--line); vertical-align: .1em; }
.status-overview h2[data-state="good"]::before { background: var(--ok); }
.status-overview h2[data-state="bad"]::before { background: var(--critical); }
.status-overview h2[data-state="unknown"]::before { background: var(--warn); }
.status-key { display: flex; flex-wrap: wrap; gap: var(--ln-xs) var(--ln-xl); margin: var(--ln-lg) 0 0; padding: 0; list-style: none; font-size: .8125rem; color: var(--fg-muted); }
.status-key li { display: inline-flex; align-items: center; gap: var(--ln-sm); }
.status-swatch { width: 12px; height: 12px; border-radius: 3px; background: var(--line); }
.status-swatch.good { background: var(--ok); }
.status-swatch.partial { background: var(--warn); }
.status-swatch.bad { background: var(--critical); }
.status-history h3 { margin: var(--ln-xl) 0 0; font-size: 1rem; }
.status-component-heading .ln-pill { flex-shrink: 0; }

/* Controls that aren't Lantern buttons still show every state. */
.api-site .text-button:hover { text-decoration-thickness: 2px; }
.api-site .text-button:active { opacity: .75; }
.api-site .text-button:focus-visible, .api-site .analytics-settings:focus-visible, .api-site .lang-switch:focus-visible { outline: 2px solid var(--ln-focus); outline-offset: 2px; }
.api-site button:disabled:not(.ln-btn) { opacity: .55; cursor: not-allowed; }

@media (max-width: 900px) {
}
@media (max-width: 760px) {
  .api-information.has-index { grid-template-columns: minmax(0, 1fr); gap: var(--ln-lg); }
  .info-index { padding-block-end: var(--ln-md); border-block-end: 1px solid var(--line); }
  .info-index nav { position: static; display: flex; flex-wrap: wrap; gap: 0 var(--ln-md); }
  .info-index a { margin-inline-start: 0; padding-inline: 0; }
}
@media (max-width: 700px) {
  .api-hero { padding-block: var(--ln-xxl) var(--k-space-2xl); }
  .transcript-example { padding-inline: var(--ln-lg); }
  .subtitle-aside { padding: var(--ln-lg); }
  /* Plan rows become two-line blocks: name and price, then minutes and the action. */
  .plan-sheet, .plan-sheet tbody { display: block; min-width: 0; min-inline-size: 0; }
  .plan-sheet thead { display: none; }
  .plan-sheet tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--ln-xs) var(--ln-md); align-items: center; padding-block: var(--ln-lg); border-block-end: 1px solid var(--line); }
  .plan-sheet tr.plan-topup { border-block-end: 0; }
  .plan-sheet th, .plan-sheet td { padding: 0 !important; border: 0; }
  .plan-sheet .plan-price { grid-column: 2; grid-row: 1; text-align: end; }
  .plan-sheet .plan-minutes { grid-column: 1; grid-row: 2; }
  .plan-sheet .plan-action, .plan-sheet .plan-note { grid-column: 2; grid-row: 2; width: auto; }
  .plan-sheet .plan-note { grid-column: 1 / -1; grid-row: 3; max-width: none; }
  .footer-colophon .api-company { flex-basis: 100%; }
}
@media (max-width: 400px) {
  .spec-sheet > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
.footer-colophon button { padding: 0; line-height: inherit; }

/* Home: the Workbench leads, then the benchmark, the price, the privacy facts. */
/* The workbench runs long (upload, its 202 job, then the result), so the copy keeps to the top. */
.hero-workbench { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 7fr); gap: var(--k-space-2xl); align-items: start; }
.api-hero-copy { padding-block-start: var(--k-space-3xl); }
@media (max-width: 900px) { .api-hero-copy { padding-block-start: 0; } }
.api-hero h1 { max-width: 14ch; }
.api-benchmark { padding-block: var(--k-space-3xl); border-block-start: 1px solid var(--line); }
.benchmark-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--k-space-2xl); align-items: center; }
.benchmark-copy h2 { margin-block: 0 var(--ln-md); }
.benchmark-copy p { margin-block: 0 var(--ln-md); color: var(--fg-muted); max-width: 52ch; }
.benchmark-copy a { font-size: .9375rem; }
.hero-benchmark h2 { margin: 0 0 var(--ln-sm); font-size: 1.15rem; letter-spacing: -.015em; }
.pricing-facts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--ln-xl) var(--k-space-2xl); align-items: start; margin-block-start: var(--ln-xl); }
.pricing-facts h3 { margin: 0 0 var(--ln-md); font-size: 1rem; }
.api-privacy { padding-block: var(--k-space-3xl) var(--k-space-2xl); }
.api-privacy h2 { margin-block: 0 var(--ln-lg); }
.api-privacy .spec-sheet { max-width: 44rem; }
@media (max-width: 900px) {
  .hero-workbench, .benchmark-layout { grid-template-columns: minmax(0, 1fr); gap: var(--ln-xxl); }
  .api-hero h1 { max-width: 18ch; }
}
@media (max-width: 700px) {
  .pricing-facts { grid-template-columns: minmax(0, 1fr); }
}

/* Kalemio's one signature: the wordmark in the theme's mono, in the accent. */
.api-site .ln-bar-brand { font-family: var(--ln-font-mono); font-weight: 600; letter-spacing: -.01em; color: var(--ln-accent); }
html[lang="ar"] .api-site .ln-bar-brand { font-family: var(--ln-font-ar); }
.api-site code, .api-site pre, .api-site kbd { font-family: var(--ln-font-mono); }
.benchmark-row strong, .plan-price bdi, .spec-sheet dd bdi { font-variant-numeric: tabular-nums; }
.api-hero h1 { max-width: none; text-wrap: balance; }
.plan-topup .plan-note { min-width: 18rem; max-width: 24rem; }
@media (max-width: 700px) { .plan-topup .plan-note { min-width: 0; max-width: none; } }
.api-hero h1 { font-size: clamp(2.2rem, 3.6vw, 2.9rem); }
.workspace-next[hidden] { display: none; }
@media (max-width: 480px) {
  /* 288 five-minute checks don't fit a 1px gap each on a phone. */
  .status-recent-bars { gap: 0; }
}
@media (max-width: 400px) {
  .transcript-example { padding-inline: var(--ln-md); }
  .transcript-sentence { font-size: 1.6rem; }
  .timed-words { gap: var(--ln-xs); }
  .timed-words li > span:first-child { font-size: 1.15rem; }
  .word-time { font-size: .625rem; }
}
