/* Styles for the guide and comparison pages build.mjs generates (/voice-to-text/, /tr/…, /de/…).
   A trimmed copy of the home page's look: the colour tokens mirror the :root in
   index.html, which keeps its own inline styles so it renders without this
   request. Change a token in both places. Mobile first, no JavaScript. */
:root {
  --stage: #5532BD;
  --on-stage: #FFFFFF;
  --on-stage-2: #E4DEF7;
  --stage-rule: rgba(255, 255, 255, .34);

  --paper: #FBFAFE;
  --surface: #FFFFFF;
  --ink: #1D1436;
  --ink-2: #5B5474;
  --rule: #E4DFF2;
  --accent: #5532BD;
  --seg-bg: #EFEBF8;
  --focus: var(--accent);
  --sheet-shadow: 0 1px 0 rgba(29, 20, 54, .03), 0 40px 80px -48px rgba(29, 20, 54, .38);

  --font: "Host Grotesk", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --t-14: .875rem; --t-16: 1rem; --t-18: 1.125rem; --t-21: 1.3125rem; --t-24: 1.5rem;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --measure: 720px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --stage: #4B2BB0; --on-stage-2: #E2DCF6;
    --paper: #130E25; --surface: #1C1535; --ink: #EEEAF9; --ink-2: #A9A1C6; --rule: #2D2550;
    --accent: #B7A2FF; --seg-bg: #231B40;
    --sheet-shadow: 0 40px 80px -48px rgba(0, 0, 0, .75);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --stage: #4B2BB0; --on-stage-2: #E2DCF6;
  --paper: #130E25; --surface: #1C1535; --ink: #EEEAF9; --ink-2: #A9A1C6; --rule: #2D2550;
  --accent: #B7A2FF; --seg-bg: #231B40;
  --sheet-shadow: 0 40px 80px -48px rgba(0, 0, 0, .75);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--t-18)/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { text-wrap: balance; overflow-wrap: break-word; -webkit-hyphens: manual; hyphens: manual; }
:lang(de) h1, :lang(de) h2, :lang(de) h3 { -webkit-hyphens: auto; hyphens: auto; }
/* Scripts Host Grotesk does not cover (D-201): installed system fonts, ordered per language so Han
   characters take their regional shapes. No web font is downloaded for them. */
:root:lang(ar) { --font: "Host Grotesk", "Geeza Pro", "Noto Sans Arabic", "Segoe UI", Tahoma, ui-sans-serif, system-ui, sans-serif; }
:root:lang(ja) { --font: "Host Grotesk", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Noto Sans JP", Meiryo, ui-sans-serif, system-ui, sans-serif; }
:root:lang(ko) { --font: "Host Grotesk", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", ui-sans-serif, system-ui, sans-serif; }
:root:lang(zh) { --font: "Host Grotesk", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", ui-sans-serif, system-ui, sans-serif; }
/* Tight tracking is a Latin habit: it breaks Arabic's joined letters and crowds CJK. */
:root:is(:lang(ar), :lang(ja), :lang(ko), :lang(zh)) :is(h1, h2, h3, h4, p, summary, .headline, .headline-measure) { letter-spacing: 0; }
:lang(ja) :is(h1, h2, h3, p, li, dd, summary) { word-break: auto-phrase; line-break: strict; }
:is(:lang(zh), :lang(ko)) :is(h1, h2, h3, p, li, dd, summary) { line-break: strict; }
:lang(ko) :is(h1, h2, h3, p, li, dd, summary) { word-break: keep-all; overflow-wrap: break-word; }
p, li { text-wrap: pretty; }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- violet stage: header and closing call ---------- */
.stage { position: relative; isolation: isolate; background: var(--stage); color: var(--on-stage); --focus: var(--on-stage); overflow-x: clip; }
.stage::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px; opacity: .3; mix-blend-mode: overlay;
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; }
.wordmark { font-size: var(--t-24); font-weight: 760; letter-spacing: -.035em; color: inherit; text-decoration: none; }
.lang { display: flex; gap: 4px; }
.lang a {
  display: inline-grid; place-items: center;
  font: 600 var(--t-14)/1 var(--font); color: var(--on-stage-2); text-decoration: none;
  border: 1px solid transparent; border-radius: 999px;
  min-width: 44px; min-height: 44px; padding: 0 14px;
  transition: border-color .2s, color .2s;
}
.lang a:hover { color: var(--on-stage); }
.lang a[aria-current] { color: var(--on-stage); border-color: var(--stage-rule); }
/* Seven languages do not fit beside the wordmark on a phone: they wrap to a row of their own. */
@media (max-width: 560px) {
  .nav { flex-wrap: wrap; row-gap: 4px; }
  .lang { flex-wrap: wrap; gap: 2px; margin-inline-start: -10px; }
  .lang a { min-width: 40px; padding: 0 10px; }
}

.intro { max-width: 940px; padding-block: clamp(20px, 5vw, 64px) clamp(48px, 8vw, 96px); }
.kicker { margin: 0 0 14px; font-size: var(--t-16); font-weight: 600; color: var(--on-stage-2); }
.intro h1 {
  margin: 0; font-size: clamp(2rem, 7vw, 4.75rem); font-weight: 760;
  line-height: 1.02; letter-spacing: -.035em;
}
.lede { margin: 22px 0 32px; max-width: 46ch; font-size: clamp(var(--t-18), 2.6vw, var(--t-21)); line-height: 1.5; color: var(--on-stage-2); }
.stores { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.store { display: block; border-radius: 9px; }
.store img { height: clamp(42px, 11vw, 48px); width: auto; }
.free-note, .updated { margin: 12px 0 0; font-size: var(--t-14); color: var(--on-stage-2); }
.updated { margin-top: 6px; }

/* ---------- the article ---------- */
.prose { padding-block: clamp(32px, 6vw, 72px) 0; }
.prose > section, .prose > nav { max-width: var(--measure); }
.prose > nav { max-width: none; }
.prose h2 {
  margin: clamp(40px, 6vw, 64px) 0 16px; font-size: clamp(1.5rem, 3.6vw, 2.25rem); font-weight: 700;
  line-height: 1.15; letter-spacing: -.025em;
}
.prose > section:first-child h2 { margin-top: 0; }
.prose p { margin: 0 0 14px; }
.prose ul { margin: 0; padding-inline-start: 1.2em; display: grid; gap: 10px; }
.prose li::marker { color: var(--accent); }

.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; border-bottom: 1px solid var(--rule); }
.steps li { counter-increment: step; position: relative; padding: 16px 0; padding-inline-start: 48px; border-top: 1px solid var(--rule); }
.steps li::before {
  content: counter(step); position: absolute; inset-inline-start: 0; top: 14px;
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--seg-bg); color: var(--accent); font-size: var(--t-16); font-weight: 700;
}

/* ---------- comparison pages: table, notes, sources ---------- */
/* A section holding a table may use the full width; its text keeps the measure.
   On a phone the table scrolls sideways inside its frame, never the page. */
.prose > section.wide { max-width: none; }
.wide > h2, .wide > p { max-width: var(--measure); }
.table-wrap {
  margin: 4px 0 16px; overflow-x: auto; overscroll-behavior-x: contain;
  border: 1px solid var(--rule); border-radius: 18px; background: var(--surface);
}
.compare { width: 100%; border-collapse: collapse; font-size: var(--t-16); line-height: 1.45; }
.compare-wide { min-width: 900px; }
.compare th, .compare td { padding: 12px 16px; text-align: start; vertical-align: top; border-top: 1px solid var(--rule); }
.compare thead th { border-top: 0; background: var(--seg-bg); font-size: var(--t-14); font-weight: 650; color: var(--ink-2); }
.compare tbody th { font-weight: 650; }
.compare-wide tbody th { position: sticky; inset-inline-start: 0; min-width: 9.5em; background: var(--surface); box-shadow: 1px 0 0 var(--rule); }
html[dir="rtl"] .compare-wide tbody th { box-shadow: -1px 0 0 var(--rule); }
.compare-wide thead th:first-child { position: sticky; inset-inline-start: 0; z-index: 1; }
.compare .sub { display: block; margin-top: 2px; font-size: var(--t-14); font-weight: 400; color: var(--ink-2); }
.prose .note { font-size: var(--t-16); color: var(--ink-2); }
.sources p { color: var(--ink-2); }
.sources ul { font-size: var(--t-16); }

.qa h3 { margin: 26px 0 6px; font-size: var(--t-21); font-weight: 650; line-height: 1.3; letter-spacing: -.01em; }
.qa p { color: var(--ink-2); }

.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; } }
.card {
  display: grid; align-content: start; gap: 6px; height: 100%; padding: 22px 24px;
  border: 1px solid var(--rule); border-radius: 22px; background: var(--surface);
  color: var(--ink); text-decoration: none; transition: border-color .2s;
}
.card:hover { border-color: var(--accent); }
.card-h { font-size: var(--t-18); font-weight: 700; line-height: 1.3; }
.card-h::after { content: " →"; color: var(--accent); }
html[dir="rtl"] .card-h::after { content: " ←"; }
.card-p { font-size: var(--t-16); line-height: 1.5; color: var(--ink-2); }

.cta { margin-top: clamp(72px, 10vw, 140px); padding-block: clamp(64px, 10vw, 128px); }
.cta h2 {
  margin: 0 0 32px; max-width: 16ch; font-size: clamp(2.25rem, 6vw, 4.5rem); font-weight: 760;
  line-height: 1; letter-spacing: -.04em;
}

.foot { padding-block: 28px 36px; font-size: var(--t-14); color: var(--ink-2); }
.foot-about { margin: 0 0 14px; max-width: 70ch; }
.foot-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 28px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot a { color: inherit; }
.foot a:hover { color: var(--ink); }

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