/* ════════════════════════════════════════════════════════════════════
   Qoyla. Public Marketing Site design system
   Grounded in css/tokens.css (semantic OKLCH tokens, type roles, spacing).
   Editorial light theme + Elite Navy ink. No raw colors in page markup.
   ════════════════════════════════════════════════════════════════════ */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&family=Schibsted+Grotesk:wght@500;600;700;800&display=swap");

:root {
  /* ── Type roles. Qoyla two-voice doctrine (estate-wide signature) ──
     Headings: Schibsted Grotesk (same voice as the cockpit) · UI: Inter ·
     Numbers: JetBrains Mono. Cover the logo, the type still says Qoyla. */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-display: "Schibsted Grotesk", "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-hero: "Schibsted Grotesk", "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* doctrine font aliases, every surface references these */
  --q-font-ui: var(--font-sans);
  --q-font-display: var(--font-display);
  --q-font-mono: var(--font-mono);

  /* type scale tokens */
  --q-text-caption: 12px;  --q-text-small: 14px;  --q-text-body: 16px;
  --q-text-body-lg: 18px;  --q-text-section: clamp(22px, 2.4vw, 30px);
  --q-text-page: clamp(28px, 3.4vw, 42px);
  --q-text-hero: clamp(46px, 6.6vw, 86px);
  --q-text-hero-mobile: clamp(42px, 12vw, 64px);

  /* hero metrics. Schibsted Grotesk carries its own tightness; don't crush it */
  --q-line-hero: 1.02; --q-letter-hero: -0.028em;

  /* weight tokens, no fragile <400, hero may reach 800 */
  --q-weight-regular: 400; --q-weight-medium: 500; --q-weight-semibold: 600; --q-weight-bold: 700;

  /* line / letter tokens */
  --q-line-tight: 1.08; --q-line-normal: 1.5; --q-line-relaxed: 1.65;
  --q-letter-tight: -0.02em; --q-letter-normal: 0; --q-letter-wide: 0.14em;

  /* radius */
  --r-pill: 999px; --r-card: 16px; --r-card-lg: 22px; --r-badge: 8px; --r-input: 12px;

  /* spacing */
  --s-4: 4px; --s-6: 6px; --s-8: 8px; --s-10: 10px; --s-12: 12px; --s-14: 14px;
  --s-16: 16px; --s-20: 20px; --s-24: 24px; --s-28: 28px; --s-32: 32px; --s-40: 40px;
  --s-48: 48px; --s-56: 56px; --s-64: 64px; --s-80: 80px; --s-96: 96px; --s-120: 120px;

  --max-content: 1200px;
  --gutter: clamp(20px, 5vw, 56px);

  /* ── Light editorial palette (OKLCH, from tokens.css semantic set) ── */
  --bg-app: oklch(0.987 0.005 230);
  --bg-tint: oklch(0.975 0.008 232);
  --surface-card: oklch(1 0 0);
  --surface-inset: oklch(0.972 0.007 233);
  --border-hairline: oklch(0.905 0.014 243);
  --border-strong: oklch(0.84 0.018 247);

  --ink: oklch(0.20 0.04 262);          /* deepest navy text */
  --ink-2: oklch(0.30 0.045 260);       /* default body */
  /* WCAG AA on --surface-card / #fff at 9px+ body text */
  --ink-muted: oklch(0.42 0.04 255);    /* muted */
  --ink-subtle: oklch(0.45 0.03 245);   /* subtle / captions */
  --on-dark: oklch(0.985 0.005 230);
  --on-dark-muted: oklch(0.78 0.02 250);

  /* navy field (dark sections, footer, nav rail) */
  --navy: oklch(0.185 0.045 262);
  --navy-2: oklch(0.155 0.045 264);
  --navy-3: oklch(0.235 0.05 260);

  /* WCAG AA: primary must pass 4.5:1 on --bg-app and with --on-dark button text */
  --primary: oklch(0.45 0.20 263);
  --primary-strong: oklch(0.38 0.20 263);
  --primary-tint: oklch(0.45 0.20 263 / 0.10);
  --cyan: oklch(0.78 0.13 228);
  --cyan-bright: oklch(0.82 0.13 220);

  --success: oklch(0.62 0.15 152);
  --success-text: oklch(0.50 0.14 152);
  --success-subtle: oklch(0.95 0.045 158);
  --warning-text: oklch(0.58 0.13 62);
  --gold: oklch(0.72 0.135 82);
  --gold-text: oklch(0.56 0.12 78);
  --gold-subtle: oklch(0.94 0.06 90);

  /* Elevation, crisp hairline-ring + tight layered, navy-tinted (sharper than a soft drop shadow) */
  --elev-1: 0 0 0 0.5px oklch(0.2 0.04 260 / 0.04), 0 1px 1px oklch(0.2 0.04 260 / 0.05), 0 1px 2px oklch(0.2 0.04 260 / 0.04);
  --elev-2: 0 0 0 0.5px oklch(0.2 0.04 260 / 0.04), 0 1px 2px oklch(0.2 0.04 260 / 0.05), 0 4px 8px oklch(0.2 0.04 260 / 0.05), 0 10px 20px oklch(0.2 0.04 260 / 0.05);
  --elev-pop: 0 0 0 0.5px oklch(0.2 0.04 260 / 0.05), 0 2px 4px oklch(0.2 0.04 260 / 0.06), 0 10px 22px oklch(0.2 0.04 260 / 0.08), 0 24px 44px oklch(0.2 0.04 260 / 0.09);

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ───────────────────────── Reset / base ───────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; font-optical-sizing: auto; }
body {
  font-family: var(--font-sans);
  background: var(--bg-app);
  color: var(--ink-2);
  font-size: 16.5px;
  line-height: 1.6;
  letter-spacing: -0.006em;
  font-feature-settings: "cv11", "ss01", "tnum" 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.btn:focus-visible, .tab:focus-visible, .rs:focus-visible, .nav-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
::selection { background: var(--primary-tint); color: var(--ink); }

/* ───────────────────────── Layout primitives ───────────────────────── */
.wrap { width: 100%; max-width: var(--max-content); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-wide { max-width: 1320px; }
.wrap-narrow { max-width: 820px; }
.section { padding-block: clamp(56px, 9vw, 120px); }
.section-sm { padding-block: clamp(40px, 6vw, 72px); }
.center { text-align: center; }
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.grid { display: grid; gap: var(--s-24); }
.divider { border: 0; border-top: 1px solid var(--border-hairline); }

/* ───────────────────────── Type roles ───────────────────────── */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--primary);
}
.eyebrow.on-dark { color: var(--cyan); }
.display {
  font-family: var(--font-hero);
  font-weight: 700;
  line-height: var(--q-line-hero);
  letter-spacing: var(--q-letter-hero);
  color: var(--ink);
  font-size: var(--q-text-hero);
  text-wrap: balance;
}
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); font-weight: 600; line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance; }
.h-xl { font-family: var(--font-hero); font-weight: 700; font-size: clamp(34px, 4.6vw, 56px); line-height: 1.06; letter-spacing: -0.026em; }
.h-lg { font-size: clamp(28px, 3.4vw, 42px); }
.h-md { font-size: clamp(22px, 2.4vw, 30px); }
.h-sm { font-size: clamp(18px, 1.6vw, 22px); }
.lede { font-size: clamp(18px, 1.5vw, 22px); line-height: 1.55; color: var(--ink-muted); text-wrap: pretty; }
.muted { color: var(--ink-muted); }
.subtle { color: var(--ink-subtle); }
.on-dark .display, .on-dark h1, .on-dark h2, .on-dark h3, .on-dark h4 { color: var(--on-dark); }
.on-dark { color: var(--on-dark-muted); }
.mono { font-family: var(--font-mono); }
.tabular, .mono { font-feature-settings: "tnum", "zero"; }
.serif { font-family: var(--font-display); }

/* ───────────────────────── Buttons ───────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: var(--s-8);
  font-family: var(--font-sans); font-weight: 600; font-size: 15px;
  padding: 13px 22px; border-radius: var(--r-pill);
  border: 1px solid transparent; white-space: nowrap;
  transition: transform 140ms var(--ease), box-shadow 140ms var(--ease), background 140ms var(--ease), border-color 140ms var(--ease);
}
.btn svg { width: 17px; height: 17px; transition: transform 160ms var(--ease); }
.btn:hover svg { transform: translateX(2px); }
.btn-primary { background: var(--primary); color: var(--on-dark); box-shadow: 0 1px 2px oklch(0.45 0.2 263 / 0.4), 0 6px 18px oklch(0.45 0.2 263 / 0.22); }
.btn-primary:hover { background: var(--primary-strong); transform: translateY(-1px); box-shadow: 0 2px 4px oklch(0.45 0.2 263 / 0.4), 0 10px 26px oklch(0.45 0.2 263 / 0.3); }
.btn-ghost { background: var(--surface-card); color: var(--ink); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--ink-muted); transform: translateY(-1px); }
.btn-onnavy { background: oklch(1 0 0 / 0.10); color: var(--on-dark); border-color: oklch(1 0 0 / 0.18); }
.btn-onnavy:hover { background: oklch(1 0 0 / 0.16); }
.btn-light { background: var(--on-dark); color: var(--ink); }
.btn-light:hover { transform: translateY(-1px); box-shadow: var(--elev-pop); }
.btn-lg { padding: 16px 28px; font-size: 16px; }
.btn-text { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--primary); font-size: 15px; }
.btn-text:hover { gap: 9px; }
button.btn-text { background: none; border: 0; padding: 0; cursor: pointer; }
.btn-text svg { width: 16px; height: 16px; transition: transform 140ms var(--ease); }

/* ───────────────────────── Chips / badges ───────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: var(--s-6);
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 500;
  letter-spacing: 0.04em; padding: 5px 11px; border-radius: var(--r-pill);
  background: var(--surface-inset); color: var(--ink-muted); border: 1px solid var(--border-hairline);
}
.chip svg { width: 13px; height: 13px; }
.chip-seal { background: var(--success-subtle); color: var(--success-text); border-color: oklch(0.62 0.15 152 / 0.2); }
.chip-gold { background: var(--gold-subtle); color: var(--gold-text); border-color: oklch(0.72 0.135 82 / 0.25); }
.chip-cyan { background: oklch(0.78 0.13 228 / 0.14); color: oklch(0.45 0.1 235); border-color: oklch(0.78 0.13 228 / 0.3); }
.chip.on-dark { background: oklch(1 0 0 / 0.08); color: var(--on-dark); border-color: oklch(1 0 0 / 0.14); }

/* ───────────────────────── Cards ───────────────────────── */
.card {
  background: var(--surface-card); border: 1px solid var(--border-hairline);
  border-radius: var(--r-card); padding: var(--s-28);
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.5), var(--elev-1);
}
.card-lg { border-radius: var(--r-card-lg); padding: clamp(24px, 3vw, 36px); }
.card-link { transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), border-color 180ms var(--ease); }
.card-link:hover { transform: translateY(-3px); box-shadow: var(--elev-pop); border-color: var(--border-strong); }
.card-inset { background: var(--surface-inset); box-shadow: none; }

.icon-tile {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px;
  background: var(--primary-tint); color: var(--primary); flex: none;
}
.icon-tile svg { width: 23px; height: 23px; }
.icon-tile.cyan { background: oklch(0.78 0.13 228 / 0.16); color: oklch(0.46 0.1 232); }
.icon-tile.gold { background: var(--gold-subtle); color: var(--gold-text); }
.icon-tile.green { background: var(--success-subtle); color: var(--success-text); }
.icon-tile.navy { background: var(--navy); color: var(--cyan-bright); }

/* ───────────────────────── Dark band ───────────────────────── */
.band-navy {
  background:
    radial-gradient(120% 90% at 12% 0%, oklch(0.30 0.08 258 / 0.55), transparent 60%),
    radial-gradient(90% 80% at 100% 100%, oklch(0.42 0.13 235 / 0.28), transparent 55%),
    var(--navy-2);
  color: var(--on-dark-muted);
}
.band-tint { background: var(--bg-tint); }
.band-card-row { background: linear-gradient(180deg, var(--bg-app), var(--bg-tint)); }

/* ───────────────────────── Header (chrome.js) ───────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: oklch(0.99 0.004 230 / 0.82);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--border-hairline);
}
.site-header.scrolled { box-shadow: var(--elev-1); }
.nav { display: flex; align-items: center; gap: var(--s-24); height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-tile { width: 34px; height: 34px; display: block; flex: none; border-radius: 9px; }
.brand .word { font-family: var(--font-display); font-weight: 700; font-size: 24px; color: var(--ink); letter-spacing: -0.03em; }
.nav-links { display: flex; align-items: center; gap: 2px; margin-inline-start: var(--s-12); }
.nav-link { position: relative; display: inline-flex; align-items: center; gap: 5px; padding: 9px 14px; border-radius: 9px; font-size: 14.5px; font-weight: 500; letter-spacing: -0.01em; color: var(--ink-2); transition: background 140ms, color 140ms; }
.nav-link:hover { background: var(--surface-inset); color: var(--ink); }
.nav-link svg { width: 14px; height: 14px; opacity: 0.6; }
.nav-spacer { flex: 1; }
.nav-cta { display: flex; align-items: center; gap: var(--s-10); }
.nav-toggle { display: none; }

.mega { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(6px); min-width: 320px; background: var(--surface-card); border: 1px solid var(--border-hairline); border-radius: var(--r-card); box-shadow: var(--elev-pop); padding: 10px; opacity: 0; visibility: hidden; transition: opacity 160ms var(--ease), transform 160ms var(--ease); }
/* invisible hover bridge so the menu doesn't close when crossing the gap */
.mega::before { content: ""; position: absolute; top: -14px; left: 0; right: 0; height: 14px; }
.has-mega::after { content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 16px; }
.has-mega:hover .mega, .has-mega:focus-within .mega { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.mega-item { display: flex; gap: 12px; padding: 11px 12px; border-radius: 11px; transition: background 130ms; }
.mega-item:hover { background: var(--surface-inset); }
.mega-item .ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--primary-tint); color: var(--primary); flex: none; }
.mega-item .ico svg { width: 18px; height: 18px; }
.mega-item .t { font-weight: 600; font-size: 14.5px; color: var(--ink); }
.mega-item .d { font-size: 12.5px; color: var(--ink-muted); line-height: 1.4; }

/* mobile drawer */
.nav-drawer { display: none; }
@media (max-width: 1439px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface-card); color: var(--ink); }
  .nav-toggle svg { width: 20px; height: 20px; }
  .nav-drawer { display: block; position: fixed; inset: 72px 0 0 0; background: var(--bg-app); z-index: 59; transform: translateX(100%); visibility: hidden; pointer-events: none; transition: transform 240ms var(--ease), visibility 0s linear 240ms; overflow-y: auto; padding: var(--s-20) var(--gutter) var(--s-56); }
  body.menu-open .nav-drawer { transform: translateX(0); visibility: visible; pointer-events: auto; transition-delay: 0s; }
  body.menu-open { overflow: hidden; }
  .nav-drawer a { display: block; padding: 15px 4px; font-size: 19px; font-family: var(--font-display); font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--border-hairline); }
  .nav-drawer .grp { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--primary); padding: 22px 4px 4px; }
  .nav-drawer-tools { display: flex; align-items: center; justify-content: space-between; gap: var(--s-12); padding-bottom: var(--s-12); border-bottom: 1px solid var(--border-hairline); }
  .nav-drawer-language { display: flex; align-items: center; gap: var(--s-10); min-width: 0; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
  .nav-drawer-language .lang-switch { min-height: 44px; max-width: min(160px, 45vw) !important; background: var(--surface-card) !important; }
  .nav-drawer .nav-drawer-human { flex: none; padding: 12px 4px; border-bottom: 0; font-family: var(--font-body); font-size: 14px; color: var(--primary); white-space: nowrap; }
}

/* ───────────────────────── Resources hub sub-nav (chrome.js) ───────────────────────── */
.resource-subnav { position: sticky; top: 68px; z-index: 50; background: oklch(0.99 0.004 230 / 0.9); backdrop-filter: saturate(1.6) blur(12px); border-bottom: 1px solid var(--border-hairline); }
.subnav-row { display: flex; align-items: center; gap: var(--s-20); height: 54px; overflow-x: auto; scrollbar-width: none; }
.subnav-row::-webkit-scrollbar { display: none; }
.subnav-label { font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-subtle); flex: none; }
.subnav-links { display: flex; align-items: center; gap: 4px; }
.subnav-link { white-space: nowrap; padding: 8px 14px; border-radius: var(--r-pill); font-size: 14px; font-weight: 500; color: var(--ink-muted); transition: background 130ms, color 130ms; }
.subnav-link:hover { background: var(--surface-inset); color: var(--ink); }
.subnav-link[aria-current="page"] { background: var(--navy); color: var(--on-dark); }

/* ───────────────────────── Footer (chrome.js) ───────────────────────── */
.site-footer { background: var(--navy-2); color: var(--on-dark-muted); padding-block: clamp(48px, 7vw, 80px) 32px; }
.footer-top { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--s-40) var(--s-32); }
.footer-brand { flex: 1.6 1 250px; max-width: 340px; }
.footer-brand .word { font-family: var(--font-display); font-weight: 600; font-size: 22px; color: var(--on-dark); }
.footer-brand p { margin-top: 14px; max-width: 30ch; font-size: 14.5px; color: var(--on-dark-muted); }
.footer-col { flex: 1 1 110px; min-width: 110px; }
.footer-col h2, .footer-col h4 { font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: oklch(0.7 0.03 245); margin: 0 0 14px; }
.footer-col a { display: block; padding: 6px 0; font-size: 14.5px; color: var(--on-dark-muted); transition: color 130ms; }
.footer-col a:hover { color: var(--on-dark); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: var(--s-16); align-items: center; justify-content: space-between; margin-top: clamp(40px, 5vw, 64px); padding-top: 24px; border-top: 1px solid oklch(1 0 0 / 0.1); font-size: 13px; color: oklch(0.66 0.03 245); }
.footer-region { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; }
.footer-region svg { width: 15px; height: 15px; flex: none; }
.footer-social { display: flex; align-items: center; gap: 9px; margin-top: 18px; }
.footer-social a { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; border: 1px solid oklch(1 0 0 / 0.14); color: var(--on-dark-muted); transition: color 130ms, border-color 130ms; }
.footer-social a:hover { color: var(--on-dark); border-color: oklch(1 0 0 / 0.34); }
.footer-social svg { width: 15px; height: 15px; }
.footer-social .handle { font-family: var(--font-mono); font-size: 12px; color: var(--on-dark-muted); margin-left: 4px; }
@media (max-width: 980px) { .footer-brand { flex-basis: 100%; max-width: 36ch; } .footer-col { flex: 1 1 28%; } }
@media (max-width: 860px) { .footer-top { gap: var(--s-32); } .footer-col { flex: 1 1 38%; } }
@media (max-width: 520px) { .footer-col { flex-basis: 100%; } }

/* ───────────────────────── Reusable sections ───────────────────────── */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-20); }
.feature-grid.two { grid-template-columns: repeat(2, 1fr); }
.feature-grid.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 940px) { .feature-grid, .feature-grid.four { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .feature-grid, .feature-grid.two, .feature-grid.four { grid-template-columns: 1fr; } }

.feature { display: flex; flex-direction: column; gap: 14px; }
.feature h3 { font-size: 19px; }
.feature p { font-size: 15px; color: var(--ink-muted); line-height: 1.55; }

.section-head { display: flex; flex-direction: column; gap: 16px; max-width: 720px; }
.section-head.center { margin-inline: auto; align-items: center; text-align: center; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-24); }
@media (max-width: 720px) { .stat-row { grid-template-columns: 1fr 1fr; gap: var(--s-32); } }
.stat .n { font-family: var(--font-mono); font-size: clamp(31px, 3.5vw, 45px); font-weight: 500; color: var(--ink); letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; font-feature-settings: "tnum", "zero"; }
.stat .n.on-dark { color: var(--on-dark); }
.stat .l { margin-top: 10px; font-size: 14px; color: var(--ink-muted); }
.stat .l.on-dark { color: var(--on-dark-muted); }

/* CTA band */
.cta-band { border-radius: var(--r-card-lg); padding: clamp(40px, 6vw, 72px); text-align: center; }

/* logo strip */
.logo-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: clamp(24px, 4vw, 56px); }
.logo-strip span { font-family: var(--font-display); font-weight: 600; font-size: clamp(17px, 1.8vw, 22px); color: var(--ink-subtle); opacity: 0.8; letter-spacing: -0.01em; }

/* evidence row */
.evidence-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--surface-inset); border: 1px solid var(--border-hairline); }
.evidence-row .label { font-size: 14px; color: var(--ink-2); flex: 1; }
.evidence-row .val { font-family: var(--font-mono); font-size: 14px; color: var(--ink); font-weight: 500; }

/* breadcrumb */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-muted); font-family: var(--font-mono); }
.breadcrumb a:hover { color: var(--primary); }

/* form */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 15px; padding: 12px 14px; border-radius: var(--r-input);
  border: 1px solid var(--border-strong); background: var(--surface-card); color: var(--ink);
  transition: border-color 130ms, box-shadow 130ms; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-tint); }
.field textarea { resize: vertical; min-height: 110px; }

/* pill tabs */
.tabs { display: inline-flex; gap: 4px; padding: 5px; background: var(--surface-inset); border: 1px solid var(--border-hairline); border-radius: var(--r-pill); }
.tab { padding: 9px 18px; border-radius: var(--r-pill); font-size: 14.5px; font-weight: 600; color: var(--ink-muted); border: 0; background: transparent; transition: all 160ms var(--ease); }
.tab[aria-selected="true"] { background: var(--surface-card); color: var(--ink); box-shadow: var(--elev-1); }

/* filter chips */
.filterbar { display: flex; flex-wrap: wrap; gap: 8px; }
.filter { padding: 8px 16px; border-radius: var(--r-pill); font-size: 14px; font-weight: 500; color: var(--ink-muted); background: var(--surface-card); border: 1px solid var(--border-hairline); transition: all 140ms; }
.filter[aria-selected="true"], .filter:hover { color: var(--ink); border-color: var(--border-strong); }
.filter[aria-selected="true"] { background: var(--navy); color: var(--on-dark); border-color: transparent; }

/* anim, visible by default; hidden only when JS arms it (html.anim) so
   no-JS, print and reduced-motion always show content. */
@media (prefers-reduced-motion: no-preference) {
  html.anim [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 620ms var(--ease-soft), transform 620ms var(--ease-soft); }
  html.anim [data-reveal].in { opacity: 1; transform: none; }
}

/* utilities */
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mt-40 { margin-top: 40px; } .mt-48 { margin-top: 48px; } .mt-64 { margin-top: 64px; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; } .gap-24 { gap: 24px; } .gap-32 { gap: 32px; }
.wrap-text { max-width: 60ch; }
.flex-wrap { flex-wrap: wrap; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.tabular { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ── Elite shell pass, premium polish parity (additive, restraint) ── */
* { -webkit-tap-highlight-color: transparent; }
.tabular, .mono, .stat .n { font-variant-numeric: tabular-nums slashed-zero; }
:disabled, [aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; } }


/* ── Document request (shared), any [data-doc] opens this; zero dead downloads ──
   One system component (chrome.ts wires it by delegation). Calm card, one
   field, one action, designed success moment. [data-print] prints to PDF. */
[data-doc] { cursor: pointer; }
.qdoc-scrim { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 20px;
  background: oklch(0.185 0.045 262 / 0.45); backdrop-filter: blur(6px) saturate(1.2); -webkit-backdrop-filter: blur(6px) saturate(1.2);
  opacity: 0; transition: opacity 200ms var(--ease); }
.qdoc-scrim.open { opacity: 1; }
.qdoc { width: min(440px, 100%); background: var(--surface-card); border: 1px solid var(--border-hairline);
  border-radius: var(--r-card-lg, 22px); box-shadow: var(--elev-pop); padding: 28px;
  transform: translateY(10px) scale(0.985); transition: transform 220ms var(--ease-soft); }
.qdoc-scrim.open .qdoc { transform: none; }
.qdoc-top { display: flex; align-items: flex-start; gap: 12px; }
.qdoc-ico { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px;
  background: var(--primary-tint); color: var(--primary); }
.qdoc-ico svg { width: 20px; height: 20px; }
.qdoc-close { margin-left: auto; flex: none; width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid var(--border-hairline); border-radius: 10px; background: none; color: var(--ink-muted); }
.qdoc-close:hover { color: var(--ink); border-color: var(--border-strong); }
.qdoc-close svg { width: 16px; height: 16px; }
.qdoc h3 { font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: -0.015em; color: var(--ink); margin-top: 18px; text-wrap: balance; }
.qdoc .qdoc-sub { font-size: 14.5px; line-height: 1.55; color: var(--ink-muted); margin-top: 8px; text-wrap: pretty; }
.qdoc form { display: flex; gap: 10px; margin-top: 20px; }
.qdoc input { flex: 1; min-width: 0; font: inherit; font-size: 15px; padding: 12px 15px; border-radius: var(--r-pill);
  border: 1px solid var(--border-strong); background: var(--surface-card); color: var(--ink); }
.qdoc input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-tint); }
.qdoc .qdoc-fine { font-size: 12.5px; color: var(--ink-subtle); margin-top: 14px; }
.qdoc-done { display: none; text-align: center; padding: 6px 4px 2px; }
.qdoc-done .ok { width: 48px; height: 48px; margin: 12px auto 0; display: grid; place-items: center; border-radius: 50%;
  background: var(--success-subtle); color: var(--success-text); }
.qdoc-done .ok svg { width: 24px; height: 24px; }
.qdoc-done h3 { margin-top: 14px; }
.qdoc.sent .qdoc-form-wrap { display: none; }
.qdoc.sent .qdoc-done { display: block; }


/* ── External-family primitives (Developers · Portals · Learn · Auth) ────── */
.x-table { width:100%; border-collapse:collapse; font-size:14px; }
.x-table th { text-align:left; font-family:var(--font-mono); font-size:11px; letter-spacing:0.08em; text-transform:uppercase; color:var(--ink-subtle); font-weight:600; padding:10px 14px; border-bottom:1px solid var(--border-strong); }
.x-table td { padding:12px 14px; border-bottom:1px solid var(--border-hairline); color:var(--ink); vertical-align:top; }
.x-table td.mono, .x-table .mono { font-family:var(--font-mono); font-size:13px; font-variant-numeric:tabular-nums slashed-zero; }
.x-code { background:oklch(0.22 0.04 264); color:oklch(0.93 0.01 255); border-radius:var(--r-card); padding:18px 20px; overflow-x:auto; font-family:var(--font-mono); font-size:13px; line-height:1.65; margin:0; }
.x-code .c { color:oklch(0.62 0.03 255); }
.x-code-cap { display:flex; align-items:center; gap:8px; font-family:var(--font-mono); font-size:11.5px; letter-spacing:0.06em; text-transform:uppercase; color:var(--ink-subtle); margin:0 0 8px; }
.x-rows { display:flex; flex-direction:column; }
.x-row { display:flex; gap:16px; align-items:flex-start; padding:16px 2px; border-top:1px solid var(--border-hairline); text-decoration:none; color:inherit; }
.x-row:first-child { border-top:none; }
.x-row .ico { flex:none; width:38px; height:38px; border-radius:12px; display:grid; place-items:center; background:var(--surface-inset); color:var(--ink-muted); }
.x-row .ico svg { width:18px; height:18px; }
.x-row .t { font-weight:600; color:var(--ink); font-size:15px; }
.x-row .d { color:var(--ink-muted); font-size:13.5px; line-height:1.55; margin-top:2px; }
.x-row .end { margin-left:auto; flex:none; font-family:var(--font-mono); font-size:12px; color:var(--ink-subtle); white-space:nowrap; align-self:center; }
a.x-row:hover .t { color:var(--primary); }
.x-faq { border-top:1px solid var(--border-hairline); }
.x-faq summary { cursor:pointer; list-style:none; display:flex; justify-content:space-between; gap:14px; padding:16px 2px; font-weight:600; font-size:15px; color:var(--ink); }
.x-faq summary::-webkit-details-marker { display:none; }
.x-faq summary::after { content:"+"; font-family:var(--font-mono); color:var(--ink-subtle); }
.x-faq[open] summary::after { content:"–"; }
.x-faq p { color:var(--ink-muted); font-size:14px; line-height:1.65; margin:0 0 16px; max-width:64ch; }
.x-locked { display:inline-flex; align-items:center; gap:7px; font-family:var(--font-mono); font-size:11.5px; letter-spacing:0.06em; text-transform:uppercase; color:var(--ink-subtle); border:1px solid var(--border-strong); border-radius:var(--r-pill); padding:6px 12px; }
.x-locked svg { width:13px; height:13px; }
.x-auth-card { max-width:420px; margin-inline:auto; background:var(--surface-card); border:1px solid var(--border-hairline); border-radius:var(--r-card); box-shadow:var(--elev-pop, 0 18px 40px -24px oklch(0.25 0.05 262 / 0.25)); padding:34px 30px; }
.x-auth-card h1 { font-size:23px; letter-spacing:-0.02em; margin:0; }
.x-auth-card .field { display:block; margin-top:16px; }
.x-auth-card .field span { display:block; font-size:12.5px; font-weight:600; color:var(--ink-muted); margin-bottom:6px; }
.x-auth-card input { width:100%; padding:13px 15px; border-radius:12px; border:1px solid var(--border-strong); font:inherit; font-size:15px; background:var(--surface-card); }
.x-auth-card .btn { width:100%; justify-content:center; margin-top:18px; }
.x-kpis { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:14px; }
.x-kpi { border:1px solid var(--border-hairline); border-radius:var(--r-card); padding:16px 18px; background:var(--surface-card); }
.x-kpi .v { font-family:var(--font-mono); font-size:22px; font-weight:700; letter-spacing:-0.02em; color:var(--ink); font-variant-numeric:tabular-nums slashed-zero; }
.x-kpi .k { font-size:12px; color:var(--ink-muted); margin-top:4px; }
@media (max-width:720px){ .x-row .end { display:none; } }


/* ── Nav + card fixes (estate-wide) ─────────────────────────────────────── */
/* feature-card icon tile, sizes every cards() icon across the external pages */
.feature > .ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: var(--primary-tint); color: var(--primary); flex: none; }
.feature > .ico svg { width: 22px; height: 22px; }
/* nav CTAs never wrap ("Log in" two-line fix) */
.nav-cta .nav-link, .nav-cta .btn { white-space: nowrap; }
/* mega items: title + description stack (they were inline and ran together) */
.mega-item .t, .mega-item .d { display: block; }
.mega-item > span:last-child { min-width: 0; }
/* chevron alignment in nav links */
.nav-link svg { flex: none; margin-top: 1px; }
/* country flags, functional glyphs, not decoration */
.flag { font-size: 21px; line-height: 1; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.feature > .ico.flag-tile { background: var(--surface-inset); }
.feature > .ico.flag-tile .flag { font-size: 24px; }
.mega-item .ico .flag { font-size: 17px; }
.subnav-link .flag { font-size: 14px; margin-right: 2px; vertical-align: -1px; }
.eyebrow .flag { font-size: 15px; margin-right: 6px; vertical-align: -2px; }

/* ───────────────────────── Partner gate (partner-gate.ts) ───────────────────────── */
/* Fail closed: on gated pages, technical sections stay hidden until the gate
   script either confirms a partner session (adds .q-partner-open) or removes
   them and shows the access panel. No flash of gated content; if JS fails,
   the content stays hidden, never the other way round. */
body[data-partner-gate="full"]:not(.q-partner-open) > section.section:not(:first-of-type):not([data-public]),
body[data-partner-gate="full"]:not(.q-partner-open) > section.section:first-of-type pre,
body[data-partner-gate="full"]:not(.q-partner-open) > section.section:first-of-type [data-doc],
body[data-partner-gate]:not(.q-partner-open) [data-gated] { display: none; }

.q-partner-bar { background: var(--surface-inset); border-bottom: 1px solid var(--border-hairline); }
.q-partner-bar .row-inner { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 13px; color: var(--ink-muted); }
.q-partner-bar svg { width: 14px; height: 14px; flex: none; color: var(--ink-subtle); }
.q-partner-bar .who { font-family: var(--font-mono); font-size: 12px; font-weight: 500; color: var(--ink); }
.q-partner-bar .spacer { flex: 1; }
.q-partner-bar a { font-weight: 600; color: var(--primary); white-space: nowrap; }

.q-lock { max-width: 620px; margin-inline: auto; }
.q-lock .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-inset); color: var(--ink-muted); margin-bottom: 18px; }
.q-lock .ico svg { width: 20px; height: 20px; }
.q-lock h2 { font-size: 23px; letter-spacing: -0.02em; margin: 0 0 10px; }
.q-lock p.muted { font-size: 14.5px; line-height: 1.65; margin: 0 0 18px; max-width: 56ch; }
.q-lock .q-lock-count { font-family: var(--font-mono); font-size: 12px; color: var(--ink-subtle); border: 1px solid var(--border-hairline); background: var(--surface-inset); border-radius: 10px; padding: 9px 12px; margin: 0 0 20px; display: inline-block; }
.q-lock .q-lock-fine { font-size: 13px; color: var(--ink-muted); line-height: 1.6; margin: 16px 0 0; max-width: 60ch; }
.q-lock .q-lock-fine a { color: var(--primary); font-weight: 600; }

.q-kind-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
.q-kind { padding: 11px 12px; border-radius: 12px; border: 1px solid var(--border-hairline); background: var(--surface-card); font-size: 13px; font-weight: 600; color: var(--ink-muted); cursor: pointer; text-align: left; transition: border-color 140ms var(--ease), color 140ms var(--ease), box-shadow 140ms var(--ease); }
.q-kind:hover { border-color: var(--border-strong); color: var(--ink); }
.q-kind[aria-pressed="true"] { border-color: var(--primary); color: var(--ink); box-shadow: 0 0 0 1px var(--primary); }
