/* ============================================================================
   OpenCaseLaw — shared design system v2
   ----------------------------------------------------------------------------
   One stylesheet to rule them all. Drop into the <head> of any page; the
   tokens + components below match the Word add-in (so users have one mental
   model across surfaces) and the existing /quality.html dashboard.

   Design contract:
   - Type stack: IBM Plex Sans (300/400/500) + JetBrains Mono. Times serif
     reserved for decision-body prose at /entscheid/{id} (legal authenticity).
   - Single accent (#b91c24 — Swiss-flag-rooted but desaturated).
   - Spacing scale: 4 / 8 / 12 / 16 / 24 / 40 / 64 px.
   - Type scale: 11 / 12 / 13 / 15 / 18 / 24 / 32 / 48 px.
   - Layout: --max-w 1240px (landing), 720px (prose), full (dashboards).
   - Breakpoints: 480 (phone) / 720 (tablet) / 1024 (laptop). Use these
     three values everywhere; no per-page custom breakpoints.
   - Dark mode: respected via prefers-color-scheme. Every shared component
     has a dark-mode counterpart — page-level CSS must use var() tokens.
   - Reduced motion: every animation gated on prefers-reduced-motion.
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* ── Tokens ───────────────────────────────────────────────── */
  --f-sans: 'IBM Plex Sans', 'Helvetica Neue', Helvetica, Arial, system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --f-serif: 'Times New Roman', 'Times', serif;

  /* Type scale */
  --t-xs: 11px;
  --t-sm: 12px;
  --t-md: 13px;
  --t-base: 15px;
  --t-lg: 18px;
  --t-xl: 24px;
  --t-2xl: 32px;
  --t-3xl: 48px;
  --leading: 1.55;
  --leading-tight: 1.2;

  /* Spacing scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 40px;
  --s-7: 64px;

  /* Color — light mode */
  --bg: #ffffff;
  --bg-muted: #fafafa;
  --bg-soft: #f4f4f5;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --text: #18181b;
  --text-2: #52525b;
  --text-3: #a1a1aa;
  --accent: #b91c24;
  --accent-soft: #fef2f2;
  --green: #15803d;
  --green-soft: #f0fdf4;

  /* Layout */
  --max-w: 1240px;
  --site-max-w: 1240px;
  --max-w-prose: 720px;
  --max-w-narrow: 560px;
  /* Canonical page gutter — single source of truth for horizontal
     padding. Brand sits exactly this far from the window edge:
     32px on a 320px phone (was 20 — felt glued to the edge),
     ~6vw mid-range, capped at 96px on desktop (was 48 — too tight
     on wide monitors). */
  --gutter-x: clamp(32px, 6vw, 96px);

  /* Radius / shadow */
  --radius: 8px;
  --radius-sm: 6px;
  --radius-pill: 999px;
  --shadow-1: 0 1px 2px rgba(24, 24, 27, 0.04);
  --shadow-2: 0 4px 12px rgba(24, 24, 27, 0.06), 0 1px 3px rgba(24, 24, 27, 0.04);
  --shadow-3: 0 16px 40px rgba(24, 24, 27, 0.08), 0 4px 12px rgba(24, 24, 27, 0.05);

  /* Motion */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --t-fast: 160ms;
  --t-base-ms: 240ms;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme='auto'], :root:not([data-theme]) {
    --bg: #0f0f10;
    --bg-muted: #161618;
    --bg-soft: #1c1c20;
    --surface: #1c1c1f;
    --surface-2: #232327;
    --border: #2e2e34;
    --border-strong: #44444c;
    --text: #fafafa;
    --text-2: #c4c4c8;
    --text-3: #8b8b92;
    --accent: #f87171;
    --accent-soft: #2c1014;
    --green: #4ade80;
    --green-soft: #102019;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-2: 0 4px 12px rgba(0, 0, 0, 0.6), 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-3: 0 16px 40px rgba(0, 0, 0, 0.7), 0 4px 12px rgba(0, 0, 0, 0.5);
  }
}

/* ── Base ──────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  font-family: var(--f-sans);
  font-size: var(--t-base);
  font-weight: 400;
  line-height: var(--leading);
  color: var(--text);
  background: var(--bg);
  font-feature-settings: 'kern' 1, 'liga' 1, 'tnum' 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-thickness var(--t-fast) var(--ease);
}
a:hover { text-decoration-thickness: 2px; }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}
img, svg, video { max-width: 100%; height: auto; display: block; }

/* ── Layout containers ────────────────────────────────────── */
.container { max-width: calc(var(--max-w) + (var(--gutter-x) * 2)); margin: 0 auto; padding: 0 var(--gutter-x); }
.container-prose { max-width: calc(var(--max-w-prose) + (var(--gutter-x) * 2)); margin: 0 auto; padding: 0 var(--gutter-x); }
.container-narrow { max-width: calc(var(--max-w-narrow) + (var(--gutter-x) * 2)); margin: 0 auto; padding: 0 var(--gutter-x); }
header.site .container,
footer.site .container { max-width: calc(var(--site-max-w) + (var(--gutter-x) * 2)); }

/* ── Type ─────────────────────────────────────────────────── */
h1, h2, h3, h4 { margin: 0; font-weight: 300; letter-spacing: -0.012em; line-height: var(--leading-tight); color: var(--text); }
h1 { font-size: clamp(var(--t-2xl), 5vw, var(--t-3xl)); font-weight: 100; }
h2 { font-size: clamp(var(--t-xl), 3.5vw, var(--t-2xl)); }
h3 { font-size: clamp(var(--t-lg), 2.5vw, var(--t-xl)); }
h4 { font-size: var(--t-lg); font-weight: 500; }
p { margin: 0; }
.lede { font-size: var(--t-lg); font-weight: 300; color: var(--text-2); line-height: 1.5; max-width: 56ch; }
.eyebrow {
  display: block;
  font-size: var(--t-xs); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--accent);
  margin: 0 0 var(--s-3);
}
.mono { font-family: var(--f-mono); font-feature-settings: 'tnum' 1; }
.subtle { color: var(--text-2); }
.muted { color: var(--text-3); }

/* ── Header / nav (shared) ────────────────────────────────── */
header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--border);
}
@media (prefers-color-scheme: dark) {
  header.site { background: rgba(15, 15, 16, 0.85); }
}
header.site .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--s-4);
  font-size: var(--t-md);
  min-height: 56px;
}
/* Brand mark — boxed `+` glyph in mono, lowercase "opencaselaw.ch"
   wordmark. Used in header.site and footer.site brand <a>. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--f-mono);
  font-size: var(--t-md);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}
.brand .logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.brand:hover { color: var(--text); }
.brand:hover .logo { border-color: var(--border-strong); color: var(--text); }
.brand .wordmark { color: var(--text); font-weight: 500; }
header.site nav {
  display: flex;
  gap: var(--s-5);
  align-items: center;
  /* On narrow viewports the nav scrolls horizontally instead of
     disappearing — no link should ever be unreachable. */
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  white-space: nowrap;
  margin-left: var(--s-4);
  min-width: 0;
}
header.site nav::-webkit-scrollbar { display: none; }
header.site nav a {
  text-decoration: none;
  color: var(--text-2);
  flex: 0 0 auto;
  padding: var(--s-1) 0;
}
header.site nav a:hover { color: var(--text); }
/* Active state: subtle font-weight bump only — no red underline. The
   inconsistency between pages with/without an active marker (red bar
   appearing on some pages, missing on others) was visually jarring. */
header.site nav a.active {
  color: var(--text);
  font-weight: 500;
}
/* ── Mobile nav toggle (hamburger) ─────────────────────────────
   Visible at ≤1024px. Visible border so it always reads as a
   tap target. Sits to the right of the brand in the header row. */
.nav-toggle {
  display: none;
  align-items: center; justify-content: center;
  width: 44px; height: 44px;
  position: relative;
  flex: 0 0 auto;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-sm);
  cursor: pointer; padding: 0;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.nav-toggle:hover { background: var(--bg-soft); border-color: var(--text-3); }
.nav-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nav-toggle svg { width: 22px; height: 22px; pointer-events: none; }
.nav-toggle .icon-close { display: none; }
body.nav-open .nav-toggle .icon-menu { display: none !important; }
body.nav-open .nav-toggle .icon-close { display: block !important; }
body.nav-open .nav-toggle { z-index: 1002; }

@media (max-width: 1024px) {
  /* Hide the inline nav and reveal the hamburger. */
  .nav-toggle { display: inline-flex !important; }
  header.site nav { display: none !important; }

  /* Full-viewport overlay — covers everything (no top:56px gap, no
     scroll bleed). Hamburger button stays visible on top of the
     overlay (z-index: 1001) so the user can close. */
  body.nav-open { overflow: hidden; }
  body.nav-open header.site { z-index: 1001; }
  body.nav-open header.site nav {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    min-height: 100vh;
    background: var(--bg);
    padding: calc(80px + env(safe-area-inset-top)) var(--gutter-x) calc(40px + env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    z-index: 1000;
    margin: 0;
  }
  body.nav-open header.site nav > a {
    padding: var(--s-4) 0;
    font-size: var(--t-lg);
    color: var(--text);
    border-bottom: 1px solid var(--border);
    text-decoration: none;
  }
  body.nav-open header.site nav > a.active { font-weight: 600; color: var(--accent); }
  body.nav-open header.site nav .lang-sw,
  body.nav-open header.site nav .lang-switch {
    margin: var(--s-5) 0 0;
    padding: var(--s-4) 0 0;
    border-top: 1px solid var(--border);
    border-left: none;
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--s-2);
  }
  body.nav-open header.site nav .lang-sw > a,
  body.nav-open header.site nav .lang-switch > a {
    padding: var(--s-2) var(--s-4);
    border-bottom: none !important;
    background: var(--bg-soft);
    color: var(--text);
    border-radius: var(--radius-sm);
    font-size: var(--t-sm);
  }
}
@media (max-width: 480px) {
  header.site .brand span:not(.logo) { display: none; }
}

/* ── Footer (shared) ──────────────────────────────────────── */
footer.site {
  margin-top: var(--s-7);
  padding: var(--s-6) 0;
  border-top: 1px solid var(--border);
  font-size: var(--t-sm);
  color: var(--text-2);
}
footer.site .row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--s-5);
}
@media (max-width: 720px) { footer.site .row { grid-template-columns: 1fr 1fr; } }
footer.site h4 { font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text); margin-bottom: var(--s-3); font-weight: 500; }
footer.site ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--s-2); }
footer.site a { text-decoration: none; color: var(--text-2); }
footer.site a:hover { color: var(--text); text-decoration: underline; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 10px 18px;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: var(--t-md);
  font-weight: 500;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.btn:hover { background: var(--surface-2); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-accent:hover { background: #a01620; }
.btn-lg { padding: 14px 24px; font-size: var(--t-base); }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn-primary:hover { transform: none; } }

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s-5);
  transition: border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.card:hover { border-color: var(--border-strong); }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  padding: clamp(var(--s-6), 8vw, var(--s-7)) 0 var(--s-7);
  text-align: left;
}
/* 28ch fits the longest localized headlines (DE/FR) without wrapping
   awkwardly. Pages with a 2-column hero override this on the wrapper. */
.hero h1 { margin-bottom: var(--s-4); max-width: 28ch; }
.hero .lede { margin-bottom: var(--s-5); }
.hero-actions { display: flex; gap: var(--s-3); flex-wrap: wrap; align-items: center; }
.hero-meta { font-size: var(--t-sm); color: var(--text-2); margin-top: var(--s-3); }
@media (max-width: 480px) {
  /* Mobile: CTAs stretch to the screen so each tap target is comfortable. */
  .hero-actions { width: 100%; }
  .hero-actions > .btn,
  .hero-actions > a { flex: 1 1 100%; justify-content: center; }
}

/* ── Section ──────────────────────────────────────────────── */
.section { padding: var(--s-7) 0; border-top: 1px solid var(--border); }
.section h2 { margin-bottom: var(--s-5); }

/* ── Feature grid ─────────────────────────────────────────── */
.features {
  display: grid;
  /* 220px lower bound = three-up at 720, two-up at 480, one column on
     phones without overflow risk on 320 px viewports. */
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--s-4);
}
.feature .icon {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  color: var(--text);
  margin-bottom: var(--s-3);
  font-size: var(--t-lg);
}
.feature h3 { font-size: var(--t-lg); font-weight: 500; margin-bottom: var(--s-2); }
.feature p { color: var(--text-2); font-size: var(--t-md); line-height: 1.6; }

/* ── Stats strip ──────────────────────────────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--s-5);
  padding: var(--s-5) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat .num { font-family: var(--f-mono); font-size: clamp(var(--t-xl), 3.5vw, var(--t-2xl)); font-weight: 400; letter-spacing: -0.02em; line-height: 1; }
.stat .label { font-size: var(--t-xs); color: var(--text-2); text-transform: uppercase; letter-spacing: 0.06em; margin-top: var(--s-2); }

/* ── Pricing ──────────────────────────────────────────────── */
.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--s-4); }
.pricing .card .price { font-family: var(--f-mono); font-size: var(--t-2xl); margin: var(--s-3) 0 var(--s-4); }
.pricing .card .price .unit { font-size: var(--t-base); color: var(--text-2); }
.pricing ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--s-2); font-size: var(--t-md); }
.pricing ul li::before { content: '✓ '; color: var(--green); margin-right: var(--s-1); }

/* ── FAQ ──────────────────────────────────────────────────── */
.faq details { border-bottom: 1px solid var(--border); padding: var(--s-4) 0; }
.faq details:last-of-type { border-bottom: none; }
.faq summary { cursor: pointer; font-weight: 500; font-size: var(--t-base); list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--f-mono); color: var(--text-2); }
.faq details[open] summary::after { content: '−'; }
.faq details > p { margin-top: var(--s-3); color: var(--text-2); font-size: var(--t-md); }

/* ── Forms ────────────────────────────────────────────────── */
.input {
  width: 100%;
  padding: 10px 14px;
  font: inherit;
  font-size: var(--t-base);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
}
.input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.input::placeholder { color: var(--text-3); }
.input--lg { padding: 12px 16px; }

/* ── Skip-to-content (a11y) ──────────────────────────────────
   Hidden until keyboard-focused; jumps to <main id="main">. */
.skip-link {
  position: absolute;
  left: var(--s-3); top: var(--s-3);
  padding: 8px 14px;
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  font-size: var(--t-sm);
  font-weight: 500;
  border-radius: var(--radius-sm);
  z-index: 1000;
  transform: translateY(calc(-100% - var(--s-3)));
  transition: transform var(--t-fast) var(--ease);
}
.skip-link:focus,
.skip-link:focus-visible { transform: translateY(0); outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Keyboard focus on every interactive primitive ──────────── */
.filter-pill:focus-visible,
.lang-switch a:focus-visible,
.lang-sw button:focus-visible,
.brand:focus-visible,
header.site nav a:focus-visible,
footer.site a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ── Search bar (hero-level: flex row + flex-grow input + button) ── */
.search-bar {
  display: flex; gap: var(--s-3); flex-wrap: wrap; align-items: stretch;
  margin: 0;
}
.search-bar > .input { flex: 1 1 320px; min-width: 240px; }

/* ── Filter pill row (exclusive filters: lang, level, status…) ───── */
.filter-bar {
  display: flex; gap: var(--s-2); flex-wrap: wrap;
  margin: 0;
}
.filter-pill {
  padding: 6px 12px;
  font: inherit; font-size: var(--t-md);
  background: var(--surface); color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  white-space: nowrap;
}
.filter-pill:hover { color: var(--text); border-color: var(--border-strong); }
.filter-pill.active {
  background: var(--text); color: var(--bg); border-color: var(--text);
}

/* ── Section head — h2 with optional count meta on the right ────── */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s-3);
  margin: var(--s-6) 0 var(--s-3);
  padding-bottom: var(--s-2);
  border-bottom: 1px solid var(--border);
}
.section-head h2,
.section-head h3 {
  margin: 0;
  font-size: var(--t-xl);
  font-weight: 400;
}
.section-head .count {
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  color: var(--text-3);
  font-weight: 400;
}

/* ── Pill / badge / tag ───────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-family: var(--f-mono); font-size: var(--t-xs);
  background: var(--bg-soft); color: var(--text-2);
  border: 1px solid transparent;
}
.pill-accent { background: var(--accent-soft); color: var(--accent); }
.pill-green { background: var(--green-soft); color: var(--green); }

/* ── Skeleton + state placeholders ────────────────────────── */
.skeleton {
  background: var(--bg-soft);
  border-radius: var(--radius);
  animation: skeleton-pulse 1.4s ease-in-out infinite;
  height: 92px;
}
.skeleton-line {
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  height: 12px;
  display: inline-block;
  animation: skeleton-pulse 1.4s ease-in-out infinite;
}
@keyframes skeleton-pulse { 0%, 100% { opacity: 0.6; } 50% { opacity: 0.95; } }
@media (prefers-reduced-motion: reduce) { .skeleton, .skeleton-line { animation: none; } }
.state-empty, .state-error, .state-loading {
  padding: var(--s-6) var(--s-4);
  text-align: center;
  color: var(--text-2);
  font-size: var(--t-base);
}
.state-empty strong {
  display: block;
  margin-bottom: var(--s-2);
  font-size: var(--t-lg);
  font-weight: 400;
  color: var(--text);
}
.state-error { color: var(--accent); }

/* ── /word/* primitives (hero, how-it-works, proof, screenshots,
   AppSource badge) — promoted from per-page inline blocks so the
   four locales (de/en/fr/it) and any future Marketplace landing
   share the exact same component vocabulary. ────────────────── */
.word-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-6);
  align-items: center;
}
@media (max-width: 880px) { .word-hero { grid-template-columns: 1fr; } }
.word-hero img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-3);
}

.howto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--s-5);
  counter-reset: step;
}
.howto .step { position: relative; padding-left: var(--s-6); }
.howto .step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent); color: #fff;
  font-family: var(--f-mono); font-weight: 500;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--t-md);
}
.howto .step h3 { font-size: var(--t-base); font-weight: 500; margin-bottom: var(--s-2); }
.howto .step p { color: var(--text-2); font-size: var(--t-md); line-height: 1.6; }

.proof {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5);
}
@media (max-width: 720px) { .proof { grid-template-columns: 1fr; } }
.proof blockquote {
  font-family: var(--f-serif);
  font-size: var(--t-lg);
  line-height: 1.5;
  padding: var(--s-5);
  border-left: 3px solid var(--accent);
  background: var(--bg-soft);
  margin: 0;
  border-radius: var(--radius-sm);
  color: var(--text);
}
.proof blockquote cite {
  display: block;
  margin-top: var(--s-3);
  font-family: var(--f-sans);
  font-style: normal;
  font-size: var(--t-sm);
  color: var(--text-2);
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--s-4);
}
.screenshot-grid figure { margin: 0; }
.screenshot-grid img { border-radius: var(--radius); border: 1px solid var(--border); }
.screenshot-grid figcaption { font-size: var(--t-sm); color: var(--text-2); margin-top: var(--s-2); }

.cta-row {
  display: inline-flex;
  gap: var(--s-3);
  align-items: center;
  flex-wrap: wrap;
}

.appsource-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 12px 20px;
  background: var(--text); color: var(--bg);
  border-radius: var(--radius);
  font-weight: 500;
  text-decoration: none;
  font-size: var(--t-base);
  transition: transform var(--t-fast) var(--ease);
}
.appsource-badge:hover { transform: translateY(-1px); }
@media (prefers-reduced-motion: reduce) { .appsource-badge:hover { transform: none; } }
.appsource-badge svg { width: 18px; height: 18px; flex: 0 0 auto; }

/* ── Language switch (used on /word/* pages) ──────────────── */
.lang-switch {
  display: inline-flex;
  gap: var(--s-1);
  /* Push to the right edge of the nav with a divider — matches the
     landing's `.lang-sw` placement so /word/* and / look identical. */
  margin-left: auto;
  padding-left: var(--s-3);
  border-left: 1px solid var(--border);
  flex: 0 0 auto;
  align-items: center;
}
.lang-switch a {
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-3);
  border-bottom: none !important;  /* override header.site nav a underline */
}
.lang-switch a:hover,
.lang-switch a.active,
.lang-switch a.on { background: var(--bg-soft); color: var(--text); }

/* Landing's .lang-sw uses <button> elements; sub-pages use <a> elements
   pointing to /?lang=XX. Same visual contract for both. Sits in the
   header.site nav with margin-left:auto (already on .lang-sw above). */
.lang-sw a {
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-3);
  text-transform: uppercase;
  border-bottom: none !important;  /* override header.site nav a underline */
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.lang-sw a:hover, .lang-sw a.on { color: var(--text); background: var(--bg-soft); }

/* ── Print baseline ───────────────────────────────────────── */
@media print {
  header.site, footer.site { display: none; }
  body { background: #fff; color: #000; }
  a { color: inherit; text-decoration: underline; }
}

/* ── Utility ──────────────────────────────────────────────── */
.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; }
.gap-2 { gap: var(--s-2); } .gap-3 { gap: var(--s-3); } .gap-4 { gap: var(--s-4); } .gap-5 { gap: var(--s-5); }
.flex { display: flex; } .grid { display: grid; }
.center { text-align: center; }
.muted { color: var(--text-3); }
.subtle { color: var(--text-2); }
