/* Attribution Lab - design tokens (direction A, Workbench) */

/* ------------------------------------------------------------------ fonts

   Self-hosted, issue #16. The pages used to pull IBM Plex from
   fonts.googleapis.com / fonts.gstatic.com, which sent every visitor's IP to
   Google from four hosts - including booking.nexusnode.ru, the host this demo
   presents as "no tag, no cookie, nothing of Google's". A demo that sells a
   clean partner host cannot make a third-party request from it.

   Files are the exact latin and latin-ext woff2 subsets Google serves for
   IBM Plex Sans (400/500/600, one variable file per subset) and IBM Plex Mono
   (400/500). IBM Plex is SIL OFL 1.1; the licence travels with them in
   /shared/fonts/LICENSE.txt. Unicode ranges are copied from Google's own CSS,
   so a character outside them falls back exactly as it did before.
   font-display: swap keeps the old `&display=swap` behaviour. */

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/ibm-plex-sans-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/ibm-plex-sans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/ibm-plex-sans-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/ibm-plex-sans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/ibm-plex-sans-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/ibm-plex-sans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/ibm-plex-mono-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/ibm-plex-mono-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/ibm-plex-mono-500-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/ibm-plex-mono-500-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Cyrillic for the Russian interface (?al_lang=ru), added 2026-09-21. The exact
   cyrillic woff2 subsets Google serves for the same font versions as the latin
   files above (IBM Plex Sans v23 – one variable file for 400/500/600; IBM Plex
   Mono v20 – 400 and 500); the latin files were byte-checked against Google on
   that date. Same SIL OFL 1.1 licence, /shared/fonts/LICENSE.txt. Unicode range
   copied from Google's CSS: a page with no Cyrillic text never downloads them. */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/ibm-plex-sans-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/ibm-plex-sans-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/ibm-plex-sans-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/ibm-plex-mono-400-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../fonts/ibm-plex-mono-500-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  /* Type */
  --font-sans: 'IBM Plex Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Surfaces */
  --bg: #FAFAF9;
  --surface: #FFFFFF;
  --border: #E7E5E4;
  --border-2: #D6D3D1;
  --text: #1C1917;
  --muted: #78716C;
  --faint: #A8A29E;
  --subtle: #F5F5F4;

  /* Accent */
  --accent: #6E56CF;
  --accent-soft: #EFEBFB;
  --accent-text: #4C3BA8;

  /* Status: KNOWN */
  --known-text: #15803D;
  --known-bg: #ECFDF5;
  --known-border: #BBF7D0;
  /* Status: LINKED */
  --linked-text: #1D4ED8;
  --linked-bg: #EFF6FF;
  --linked-border: #BFDBFE;
  /* Status: INFERRED */
  --inferred-text: #B45309;
  --inferred-bg: #FFFBEB;
  --inferred-border: #FDE68A;
  /* Status: UNKNOWN */
  --unknown-text: #57534E;
  --unknown-bg: #F5F5F4;
  --unknown-border: #E7E5E4;
  /* Status: PENDING */
  --pending-text: #6D28D9;
  --pending-bg: #F5F3FF;
  --pending-border: #DDD6FE;

  /* Geometry */
  --r-ctl: 6px;
  --r-card: 8px;
  --r-pill: 999px;
  --h-ctl: 36px;
  --h-chip: 32px;
  --h-topbar: 56px;
  --h-tabs: 44px;
  --drawer-default: 300px;
  --drawer-min: 40px;

  /* Live drawer height, written by lab.js so page padding tracks it */
  --drawer-h: 300px;

  /* Elevation */
  --shadow-drawer: 0 -8px 24px rgba(0, 0, 0, 0.06);
  --shadow-sheet: 0 -8px 24px rgba(0, 0, 0, 0.08);
  --shadow-seg: 0 1px 2px rgba(0, 0, 0, 0.08);
  --shadow-pop: 0 8px 24px rgba(0, 0, 0, 0.12);

  /* Motion */
  --t-fast: 140ms;
  --t-base: 240ms;
  --t-slow: 380ms;

  /* Rhythm */
  --pad-x: 32px;
  --gap: 14px;
}

@media (max-width: 767px) {
  :root {
    --pad-x: 16px;
    --h-topbar: 52px;
  }
}

/* ------------------------------------------- Attribution Lab hub: case page
   Source: hub/src/case.css. hub/build.py writes dist/assets/css/case.css as
   web/shared/css/tokens.css followed by this file, so the hub and the stand
   stay one visual system. No transitions or animation anywhere on purpose. */

:root { color-scheme: light dark; --danger: #B42318; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131211;
    --danger: #FDA29B;
    --surface: #1B1917;
    --border: #2E2A27;
    --border-2: #443E3A;
    --text: #F5F5F4;
    --muted: #A8A29E;
    --faint: #7C7570;
    --subtle: #232020;
    --accent: #9C86F2;
    --accent-soft: #241D3C;
    --accent-text: #C9BAFB;
    --known-text: #6EE7A8; --known-bg: #0B2419; --known-border: #14532D;
    --linked-text: #9DC0FD; --linked-bg: #0D1D38; --linked-border: #1E3A8A;
    --inferred-text: #FBC97A; --inferred-bg: #2A1E08; --inferred-border: #78350F;
    --unknown-text: #D6D3D1; --unknown-bg: #232020; --unknown-border: #3F3A37;
    --pending-text: #C9BAFB; --pending-bg: #201A38; --pending-border: #4C1D95;
    --shadow-pop: 0 8px 24px rgba(0, 0, 0, 0.5);
  }
}

:root[data-theme="dark"] {
  --bg: #131211;
  --danger: #FDA29B;
  --surface: #1B1917;
  --border: #2E2A27;
  --border-2: #443E3A;
  --text: #F5F5F4;
  --muted: #A8A29E;
  --faint: #7C7570;
  --subtle: #232020;
  --accent: #9C86F2;
  --accent-soft: #241D3C;
  --accent-text: #C9BAFB;
  --known-text: #6EE7A8; --known-bg: #0B2419; --known-border: #14532D;
  --linked-text: #9DC0FD; --linked-bg: #0D1D38; --linked-border: #1E3A8A;
  --inferred-text: #FBC97A; --inferred-bg: #2A1E08; --inferred-border: #78350F;
  --unknown-text: #D6D3D1; --unknown-bg: #232020; --unknown-border: #3F3A37;
  --pending-text: #C9BAFB; --pending-bg: #201A38; --pending-border: #4C1D95;
  --shadow-pop: 0 8px 24px rgba(0, 0, 0, 0.5);
}

/* Latin and Cyrillic IBM Plex both come from tokens.css (web/shared/fonts);
   the system stack only catches characters neither subset covers. */
:root {
  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI',
               'Helvetica Neue', Helvetica, Arial, sans-serif;
  --content: 44rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent-text); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
button { font: inherit; color: inherit; cursor: pointer; }
/* Components below set display:flex/grid; the attribute must still win. */
[hidden] { display: none !important; }
input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 10;
  background: var(--surface); border: 1px solid var(--accent);
  border-radius: var(--r-ctl); padding: 8px 12px;
}
.skip:focus { left: 8px; top: 8px; }

.wrap {
  max-width: calc(var(--content) + var(--pad-x) * 2);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

/* ------------------------------------------------------------------ chrome */

.topbar { background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar-in {
  display: flex; align-items: center; gap: 16px;
  min-height: var(--h-topbar); padding-block: 8px;
}
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 600; font-size: 15px; color: var(--text);
  text-decoration: none; white-space: nowrap;
}
.mark {
  display: grid; place-items: center; width: 26px; height: 26px;
  border-radius: 6px; background: var(--accent); color: #fff;
  font-family: var(--font-mono); font-size: 14px; font-weight: 500;
}
.topnav { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.topnav a { font-size: 13px; text-decoration: none; color: var(--muted); }
.topnav a:hover { color: var(--accent-text); }
.lang-swap {
  border: 1px solid var(--border-2); border-radius: var(--r-pill);
  padding: 5px 11px; line-height: 1.3;
}
.lang-swap:hover { border-color: var(--accent); }

main { display: block; padding-bottom: 8px; }

/* --------------------------------------------------------------- case head */

.case-head { padding-block: 28px 20px; border-bottom: 1px solid var(--border); }
.case-head h1 {
  margin: 0;
  font-size: clamp(26px, 5.2vw, 36px);
  line-height: 1.16;
  letter-spacing: -0.02em;
  font-weight: 600;
  text-wrap: pretty;
}
.tags, .badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding: 0; list-style: none; }
.badges { margin-bottom: 16px; }
.tag, .badge {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
  border: 1px solid; border-radius: 4px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.03em; white-space: nowrap;
}
.tag-demo { color: var(--known-text); background: var(--known-bg); border-color: var(--known-border); }
.tag-explainer { color: var(--linked-text); background: var(--linked-bg); border-color: var(--linked-border); }
.tag-planned { color: var(--pending-text); background: var(--pending-bg); border-color: var(--pending-border); }
.tag-other { color: var(--unknown-text); background: var(--unknown-bg); border-color: var(--unknown-border); }
.badge { color: var(--muted); background: var(--subtle); border-color: var(--border); }

.case-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  margin-top: 14px;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--faint);
}
.case-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px;
  margin-top: 18px;
}
.btn-jump .arrow { font-family: var(--font-mono); font-size: 13px; }
/* anchors the page jumps to: keep a little air above the heading */
#demo, #call, #cases, #privacy { scroll-margin-top: 16px; }
#demo:focus, #call:focus, #cases:focus, #privacy:focus { outline: none; }

/* ------------------------------------------------------------------ prose */

.prose { padding-block: 8px 40px; }
.prose > * { margin-block: 0 16px; }
.prose h2 {
  margin-block: 40px 14px;
  font-size: clamp(19px, 3.4vw, 23px); line-height: 1.25;
  letter-spacing: -0.01em; font-weight: 600; text-wrap: pretty;
}
.prose h3 {
  margin-block: 28px 10px;
  font-size: 16.5px; line-height: 1.3; font-weight: 600; text-wrap: pretty;
}
.prose h4 { margin-block: 22px 8px; font-size: 15px; font-weight: 600; }
.prose p { text-wrap: pretty; }
.prose ul, .prose ol { padding-left: 0; margin-left: 0; }
.prose ul { list-style: none; }
.prose ul > li { position: relative; padding-left: 20px; margin-bottom: 9px; }
.prose ul > li::before {
  content: ""; position: absolute; left: 4px; top: 0.68em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
}
/* "1)" is Anton's numbering, so print the paren rather than the default dot */
.prose ol { list-style: none; counter-reset: paren; }
.prose ol > li { position: relative; padding-left: 28px; margin-bottom: 11px; counter-increment: paren; }
.prose ol > li::before {
  content: counter(paren) ")";
  position: absolute; left: 0; top: 0;
  font-family: var(--font-mono); font-size: 13px; color: var(--accent);
}
.prose li > ul, .prose li > ol { margin-top: 8px; }
.prose strong { font-weight: 600; }
.prose code {
  font-family: var(--font-mono); font-size: 0.86em;
  background: var(--subtle); border: 1px solid var(--border);
  border-radius: 4px; padding: 1px 5px;
  overflow-wrap: anywhere;
}
.prose pre {
  background: var(--subtle); border: 1px solid var(--border);
  border-radius: var(--r-card); padding: 12px 14px; overflow-x: auto;
}
.prose pre code { background: none; border: 0; padding: 0; }
.prose blockquote {
  margin-inline: 0; padding: 10px 14px;
  border-left: 2px solid var(--accent); background: var(--subtle);
  border-radius: 0 var(--r-ctl) var(--r-ctl) 0; color: var(--muted);
}
.prose a { overflow-wrap: anywhere; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin-block: 28px; }

/* ----------------------------------------------------------------- tables */

.tablewrap {
  margin-block: 18px 22px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--surface);
}
.tablewrap:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tablewrap table { border-collapse: collapse; width: 100%; min-width: 760px; font-size: 14px; }
.tablewrap th, .tablewrap td {
  text-align: left; vertical-align: top; min-width: 160px;
  padding: 11px 14px; border-bottom: 1px solid var(--border);
}
.tablewrap th:first-child, .tablewrap td:first-child { min-width: 180px; }
.tablewrap th:last-child, .tablewrap td:last-child { min-width: 104px; }
.tablewrap thead th {
  background: var(--subtle); color: var(--muted);
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.05em; text-transform: uppercase;
  border-bottom: 1px solid var(--border-2);
}
.tablewrap tbody tr:last-child td { border-bottom: 0; }
.tablewrap td:last-child { color: var(--muted); font-size: 13px; }
.tablehint {
  margin: 18px 0 -10px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em;
  color: var(--faint);
}
@media (min-width: 768px) { .tablehint { display: none; } }

/* ----------------------------------------------------------------- frames */

.frame { margin: 22px 0; }
.frame img {
  display: block; width: 100%;
  border: 1px solid var(--border); border-radius: var(--r-card);
  background: var(--surface);
}
.frame figcaption {
  margin-top: 9px; font-size: 13px; line-height: 1.5; color: var(--muted);
}
.frame-box {
  display: grid; gap: 7px; place-content: center; justify-items: center;
  min-height: 170px; padding: 24px 18px; text-align: center;
  border: 1px dashed var(--border-2); border-radius: var(--r-card);
  background: var(--subtle);
}
.frame-label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--accent-text);
}
.frame-alt { font-size: 13.5px; color: var(--muted); max-width: 40ch; }
.frame-file {
  font-family: var(--font-mono); font-size: 11px; color: var(--faint);
  overflow-wrap: anywhere;
}

/* ------------------------------------------------------- regime switcher */

.regime {
  margin: 22px 0;
  border: 1px solid var(--border); border-radius: var(--r-card);
  background: var(--surface); padding: 18px;
}
.demo-choices { display: grid; gap: 18px; }
.demo-legend {
  display: block; margin: 0 0 8px; padding: 0;
  font-size: 14px; font-weight: 600; color: var(--text);
}
.regime-set { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.source-set { min-width: 0; }
.source-set select {
  width: 100%; min-height: 44px; padding: 9px 36px 9px 12px;
  border: 1px solid var(--border-2); border-radius: var(--r-ctl);
  background-color: var(--bg); color: var(--text);
  font-size: 16px; line-height: 1.3;
  -webkit-appearance: none; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.source-set select:focus { border-color: var(--accent); }
.source-note { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.regime-opt {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; min-height: 44px;
  border: 1px solid var(--border); border-radius: var(--r-ctl);
  background: var(--bg); cursor: pointer;
}
.regime-opt:hover { border-color: var(--border-2); }
.regime-opt:has(input:checked) {
  border-color: var(--accent); background: var(--accent-soft);
}
.regime-opt input { margin: 3px 0 0; width: 16px; height: 16px; flex: none; accent-color: var(--accent); }
.regime-key {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  color: var(--accent-text); flex: none; min-width: 36px; padding-top: 2px;
}
.regime-text { font-size: 13.5px; line-height: 1.4; }
.regime-go { display: grid; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 10px 18px;
  border: 1px solid var(--border-2); border-radius: var(--r-ctl);
  background: var(--surface); color: var(--text);
  font-size: 14px; text-decoration: none;
}
.btn:hover { border-color: var(--accent); color: var(--accent-text); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 500; }
.btn.primary:hover { background: var(--accent-text); border-color: var(--accent-text); color: #fff; }
.regime-url { display: grid; gap: 4px; min-width: 0; }
.regime-url-label {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--faint);
}
.regime-url code {
  font-family: var(--font-mono); font-size: 11px; line-height: 1.5;
  color: var(--muted); overflow-wrap: anywhere; word-break: break-all;
}
.regime-noscript { margin: 12px 0 6px; font-size: 13px; color: var(--muted); }
.regime-list { margin: 0; padding-left: 18px; font-size: 13px; }
.regime-list li { margin-bottom: 6px; overflow-wrap: anywhere; }

/* -------------------------------------------------------------- call form */

.callform {
  margin: 20px 0 0;
  border: 1px solid var(--border); border-radius: var(--r-card);
  background: var(--surface); padding: 18px;
  display: grid; gap: 14px;
}
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 500; }
.field input, .field textarea {
  width: 100%; min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border-2); border-radius: var(--r-ctl);
  background: var(--bg); color: var(--text);
  font-size: 16px; line-height: 1.45;
}
.field textarea { resize: vertical; min-height: 84px; }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.form-go { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.form-said { margin: 0; font-size: 13px; color: var(--accent-text); }
.field-error { margin: 0; font-size: 13px; line-height: 1.45; color: var(--danger); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--danger); }
.form-done {
  margin: 20px 0 0; padding: 18px;
  border: 1px solid var(--known-border); border-radius: var(--r-card);
  background: var(--known-bg); color: var(--known-text);
  font-size: 15px; font-weight: 500;
}
.form-done:focus { outline: none; }
/* honeypot: out of sight and out of the tab order, still in the form */
.hp {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; opacity: 0;
}
.form-stub {
  margin: 0; padding-top: 12px; border-top: 1px solid var(--border);
  font-size: 12.5px; line-height: 1.5; color: var(--muted);
}

/* ----------------------------------------------------------------- footer */

.sitefoot { border-top: 1px solid var(--border); background: var(--surface); }
.sitefoot-in {
  display: flex; flex-wrap: wrap; gap: 8px 20px;
  align-items: baseline; justify-content: space-between;
  padding-block: 18px 22px;
}
.sitefoot p { margin: 0; }
.notice { font-size: 12.5px; color: var(--muted); max-width: 60ch; }
.foot-links { font-family: var(--font-mono); font-size: 11px; color: var(--faint); }
.foot-links a { color: var(--faint); }
.foot-links a:hover { color: var(--accent-text); }

/* ----------------------------------------------------------------- home */

.hero { padding-block: 36px 28px; border-bottom: 1px solid var(--border); }
.hero h1 {
  margin: 0;
  font-size: clamp(28px, 5.6vw, 42px); line-height: 1.14;
  letter-spacing: -0.02em; font-weight: 600; text-wrap: balance;
}
.hero-sub { margin: 16px 0 0; max-width: 58ch; font-size: 17px; line-height: 1.55; color: var(--muted); text-wrap: pretty; }

.casefilter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 4px 0 16px; }
.casefilter label { flex-basis: 100%; font-size: 13px; font-weight: 500; }
.casefilter input {
  flex: 1 1 220px; min-width: 0; min-height: 44px; padding: 9px 12px;
  border: 1px solid var(--border-2); border-radius: var(--r-ctl);
  background: var(--surface); color: var(--text); font-size: 16px;
}
.casefilter input:focus { border-color: var(--accent); }
.casefilter-count { margin: 0; font-family: var(--font-mono); font-size: 11.5px; color: var(--faint); flex-basis: 100%; min-height: 1em; }

.prose ul.tiles { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 0 0 16px; padding: 0; list-style: none; }
.prose ul.tiles > li.tile { padding: 16px 18px 18px; margin: 0; }
.prose ul.tiles > li::before { content: none; }
/* the tag and service lists inside a tile are lists too: no prose bullets */
.prose ul.tags > li, .prose ul.badges > li { padding: 0 8px; margin: 0; }
.prose ul.tags > li::before, .prose ul.badges > li::before { content: none; }
.tile {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  padding: 16px 18px 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
}
.tile:hover { border-color: var(--border-2); }
.tile:focus-within { border-color: var(--accent); }
.tile .tags, .tile .badges { margin: 0; }
.tile h3 { margin: 0; font-size: 17px; line-height: 1.3; font-weight: 600; text-wrap: pretty; }
.tile h3 a { color: var(--text); text-decoration: none; }
.tile h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-card); }
.tile h3 a:hover { color: var(--accent-text); }
.tile h3 a:focus-visible { outline: none; }
.tile h3 a:focus-visible::after { outline: 2px solid var(--accent); outline-offset: 2px; }
.tile p { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.tiles-empty { margin: 0 0 16px; font-size: 14px; color: var(--muted); }

.foot-prose { flex: 1 1 100%; display: grid; gap: 4px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.foot-prose h2 { margin: 12px 0 2px; font-size: 13px; font-weight: 600; letter-spacing: 0.01em; }
.foot-prose p { margin: 0; max-width: 72ch; font-size: 13px; line-height: 1.55; color: var(--muted); }

/* ------------------------------------------------------- LLM split button
   Left part runs the current mode, the arrow opens a two-item menu. The menu
   is placed by case.js so it never leaves the viewport on a phone. */

.llm { position: relative; display: inline-flex; align-items: stretch; }
.llm-main, .llm-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--h-ctl); margin: 0;
  border: 1px solid var(--border-2); background: var(--surface); color: var(--muted);
  font-family: var(--font-mono); font-size: 12px; line-height: 1.25;
}
.llm-main { padding: 6px 12px 6px 14px; border-radius: var(--r-pill) 0 0 var(--r-pill); text-align: left; }
.llm-toggle { width: 38px; padding: 0; margin-left: -1px; border-radius: 0 var(--r-pill) var(--r-pill) 0; }
.llm-main:hover, .llm-toggle:hover, .llm-toggle[aria-expanded="true"] {
  position: relative; z-index: 1;
  border-color: var(--accent); color: var(--accent-text);
}
.llm-toggle svg { display: block; }
.llm-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.llm-noscript { font-family: var(--font-mono); font-size: 12px; }

.llm-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 30;
  width: min(340px, calc(100vw - 24px));
  display: grid; gap: 2px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--r-card);
  box-shadow: var(--shadow-pop);
  font-family: var(--font-sans); color: var(--text);
}
.llm-menu [role="menuitem"] {
  display: grid; gap: 3px; width: 100%; margin: 0;
  padding: 10px 12px 11px; min-height: 44px;
  text-align: left; background: none; border: 0; border-radius: var(--r-ctl);
  color: var(--text);
}
.llm-menu [role="menuitem"]:hover { background: var(--subtle); }
.llm-menu [role="menuitem"]:focus { outline: none; }
.llm-menu [role="menuitem"]:focus-visible { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.llm-menu [role="menuitem"].is-current { box-shadow: inset 3px 0 0 var(--accent); }
.llm-menu [role="menuitem"].is-current:focus-visible { box-shadow: inset 3px 0 0 var(--accent), inset 0 0 0 2px var(--accent); }
.llm-t { font-size: 14px; font-weight: 500; line-height: 1.3; }
.llm-s { font-size: 12.5px; line-height: 1.4; color: var(--muted); }

/* -------------------------------------------------------- markdown view
   The article is swapped for its own markdown: same column, readable size,
   the syntax visible but quiet. Highlighting is done by case.js. */

.mdview { padding-block: 28px 44px; }
.mdview-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px;
  padding: 8px 14px;
  background: var(--subtle); border: 1px solid var(--border);
  border-radius: var(--r-card) var(--r-card) 0 0;
  font-family: var(--font-mono); font-size: 12.5px; color: var(--faint);
}
.mdview-title {
  margin: 0; padding: 6px 0;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-text);
}
.mdview-title:focus { outline: none; }
.mdview-act {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 2px;
  background: none; border: 0;
  font-family: var(--font-mono); font-size: 12.5px; color: var(--muted);
  text-decoration: underline; text-decoration-color: var(--border-2); text-underline-offset: 3px;
  cursor: pointer;
}
.mdview-act:hover { color: var(--accent-text); text-decoration-color: currentColor; }

.mdsrc {
  margin: 0; padding: 22px 20px 30px;
  background: var(--surface); border: 1px solid var(--border); border-top: 0;
  border-radius: 0 0 var(--r-card) var(--r-card);
  font-family: var(--font-sans); font-size: 16px; line-height: 1.6; color: var(--text);
  white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 4;
}
.mdsrc .mk, .mdsrc .mp { color: var(--faint); }
.mdsrc .mh { font-weight: 600; }
.mdsrc .mh1 { font-size: 1.22em; line-height: 1.45; }
.mdsrc .mh2 { font-size: 1.1em; }
.mdsrc .mkh { color: var(--accent); font-weight: 500; }
.mdsrc .mli { color: var(--accent); }
.mdsrc .ml { color: var(--accent-text); }
.mdsrc .mu { color: var(--faint); font-family: var(--font-mono); font-size: 0.82em; }
.mdsrc .mc {
  font-family: var(--font-mono); font-size: 0.86em;
  background: var(--subtle); border-radius: 3px; padding: 0 2px;
}
.mdsrc strong { font-weight: 600; }
.mdsrc .mtr { display: block; padding: 6px 0 7px; border-bottom: 1px solid var(--border); }
.mdsrc .mth { font-weight: 600; }
.mdsrc .mts { padding: 0 0 2px; font-size: 0.8em; }

/* ------------------------------------------------------- consent banner
   Bottom of the screen, nothing dimmed, two equal buttons (same size, colour
   and weight), no close. Contract: gtm/hub/HUB-MEASUREMENT.md, section 4. */

.cbanner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: var(--surface); border-top: 1px solid var(--border-2);
  box-shadow: var(--shadow-drawer);
}
.cbanner-in { display: grid; gap: 6px 20px; padding-block: 14px 16px; }
.cbanner-title { margin: 0; font-size: 14px; font-weight: 600; }
.cbanner-text { margin: 0; max-width: 72ch; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.cbanner-acts { display: flex; gap: 10px; margin-top: 6px; }
.cbanner .cbtn {
  flex: 1 1 0; width: auto; min-width: 0; max-width: 200px; min-height: 44px;
  background: var(--surface); border: 1px solid var(--text); color: var(--text); font-weight: 500;
}
.cbanner .cbtn:hover { border-color: var(--accent); color: var(--accent-text); }
@media (min-width: 768px) {
  .cbanner-in { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .cbanner-acts { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; }
  /* an explicit width: WebKit sizes the grid column from the buttons' text otherwise */
  .cbanner .cbtn { flex: none; width: 140px; }
}

.linkbtn {
  padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; color: var(--faint); text-decoration: underline; text-underline-offset: 3px;
}
.linkbtn:hover { color: var(--accent-text); }
.consent-note { flex-basis: 100%; margin: 0; font-size: 12px; color: var(--muted); }

/* ------------------------------------------------------------- wide screen */

@media (min-width: 640px) {
  .prose ul.tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
  .demo-choices { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; gap: 24px; }
  .hero { padding-block: 52px 36px; }
  .regime-go { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 16px; }
  .regime-go .btn { justify-self: start; }
  .case-head { padding-block: 40px 24px; }
}

/* A four-column comparison table needs more room than a line of prose does,
   so on a wide screen it steps outside the reading measure. */
@media (min-width: 1000px) {
  .prose ul.tiles {
    --wide: min(960px, calc(100vw - var(--pad-x) * 2));
    width: var(--wide); max-width: none;
    margin-left: calc(50% - var(--wide) / 2); margin-right: calc(50% - var(--wide) / 2);
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  /* four tiles read better as two rows of two than as three and one */
  .prose ul.tiles:has(> li:nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tablewrap {
    --wide: min(960px, calc(100vw - var(--pad-x) * 2));
    width: var(--wide);
    max-width: none;
    margin-left: calc(50% - var(--wide) / 2);
    margin-right: calc(50% - var(--wide) / 2);
  }
}

@media (max-width: 480px) {
  .btn { width: 100%; }
  .tablewrap table { min-width: 560px; }
  .mdsrc { font-size: 15px; padding: 18px 14px 26px; }
}
