/*
 * ISO Guard Pro marketing page. Copyright © 2026 Golden Switch Technology CC. All rights reserved.
 * Colours are the app's own tokens (src/app.css): brand red, slate neutrals, status hues.
 */

:root {
  /* The app's tokens */
  --seal: #0f172a;         /* slate-900, the seal's core */
  --fg-strong: #1e293b;    /* slate-800 */
  --fg: #334155;           /* slate-700 */
  --fg-muted: #475569;     /* slate-600 */
  --fg-subtle: #64748b;    /* slate-500 */
  --brand: #dc2626;        /* red-600 */
  --brand-hover: #b91c1c;  /* red-700 */
  --brand-ring: #ef4444;   /* red-500 */
  --brand-soft: #fef2f2;   /* red-50 */
  --surface: #ffffff;
  --surface-sunken: #f8fafc;
  --surface-sunken-2: #f1f5f9;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --success: #15803d;
  --success-soft: #dcfce7;
  --danger: #b91c1c;
  --danger-soft: #fee2e2;
  --warning: #b45309;
  --warning-soft: #fef3c7;
  --radius-control: 0.5rem; /* rounded-lg, the app's controls */

  /* Type scale (1.25, set in rem) */
  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: 1.375rem;
  --step-3: clamp(1.625rem, 1.2rem + 1.4vw, 2.25rem);
  --step-4: clamp(2.25rem, 1.4rem + 3.4vw, 4rem);

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section: clamp(4rem, 3rem + 5vw, 7.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-optical-sizing: auto;
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--fg);
  background: var(--surface);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

[hidden] { display: none !important; }

h1, h2, h3 {
  color: var(--fg-strong);
  font-variation-settings: 'opsz' 32;
  line-height: 1.12;
  letter-spacing: -0.022em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

a { color: var(--brand); text-underline-offset: 0.18em; }
a:hover { color: var(--brand-hover); }

:focus-visible {
  outline: 3px solid var(--brand-ring);
  outline-offset: 3px;
  border-radius: 4px;
}

.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;
}

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--seal); color: #fff; padding: 0.75rem 1rem; border-radius: var(--radius-control);
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 1rem; color: #fff; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Buttons (the app's Button primitive: rounded-lg, red primary) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3rem;
  padding: 0.75rem 1.375rem;
  border-radius: var(--radius-control);
  border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: var(--step-0); line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); color: #fff; }
.btn-quiet { background: var(--surface); color: var(--fg-strong); border-color: var(--line-strong); }
.btn-quiet:hover { border-color: var(--fg-subtle); color: var(--seal); }
.btn-small { min-height: 2.5rem; padding: 0.5rem 1rem; font-size: var(--step--1); }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 1.5rem; min-height: 4rem; }

.brand {
  display: inline-flex; align-items: center; gap: 0.625rem;
  color: var(--seal); text-decoration: none;
  font-weight: 800; font-size: 1.125rem; letter-spacing: -0.02em;
  font-variation-settings: 'opsz' 32;
}
.brand:hover { color: var(--seal); }
.brand .seal { width: 2rem; height: 2rem; flex: none; }

.nav { margin-left: auto; position: relative; }
.nav-links { display: flex; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 0.5rem 0.75rem; border-radius: var(--radius-control);
  color: var(--fg-muted); text-decoration: none; font-weight: 500; font-size: var(--step--1);
}
.nav-links a:hover { color: var(--seal); background: var(--surface-sunken-2); }
.nav-toggle {
  display: none; width: 2.75rem; height: 2.75rem; border: 1px solid var(--line);
  border-radius: var(--radius-control); background: var(--surface); color: var(--seal); cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 1.25rem; height: 1.25rem; }

@media (max-width: 52rem) {
  .nav-toggle { display: inline-flex; }
  /* The panel hangs from the header's right edge, not from the menu button: anchored to the button it
     opened past the left edge of a folded phone (280 px), hiding half of every link. */
  .header-row { position: relative; }
  .nav { position: static; }
  .nav-links {
    display: none; position: absolute; right: var(--gutter); top: calc(100% + 0.25rem);
    max-width: calc(100% - 2 * var(--gutter));
    flex-direction: column; min-width: 12rem; padding: 0.5rem;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-control);
    box-shadow: 0 12px 32px -12px rgba(15, 23, 42, 0.25);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.75rem; font-size: var(--step-0); }
}
@media (max-width: 26rem) {
  .hero-actions .btn { width: 100%; }
  .brand span { font-size: 1rem; }
  .header-row { gap: 0.75rem; }
}
/* The header never wraps: the button keeps one line, and on the narrowest phones (a folded phone
   is 280 px) the wordmark gives way to the seal alone. The link keeps its accessible name. */
.site-header .btn { white-space: nowrap; }
/* A header button whose label is too long for a phone carries a short one too (French "Réserver une démo"
   / "Démo"); the link's aria-label keeps the full name. */
.btn-short { display: none; }
@media (max-width: 26rem) {
  .btn-long { display: none; }
  .btn-short { display: inline; }
}
.brand span { white-space: nowrap; }
@media (max-width: 19.5rem) {
  .brand span {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
  }
  .site-header .btn { padding-inline: 0.875rem; }
}

/* ---------- Language dropdown: the page in each language the app offers ---------- */
.lang { position: relative; flex: none; }
.lang summary {
  display: inline-flex; align-items: center; gap: 0.375rem;
  min-height: 2.5rem; padding: 0.375rem 0.625rem;
  border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--surface);
  color: var(--fg-strong); font-weight: 600; font-size: var(--step--1); line-height: 1;
  list-style: none; cursor: pointer; user-select: none;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover, .lang[open] summary { border-color: var(--line-strong); color: var(--seal); }
.lang svg { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.lang-globe { width: 1.0625rem; height: 1.0625rem; color: var(--fg-muted); }
.lang-chev { width: 0.875rem; height: 0.875rem; color: var(--fg-subtle); transition: transform 120ms ease; }
.lang[open] .lang-chev { transform: rotate(180deg); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 0.5rem); z-index: 60;
  min-width: 11rem; margin: 0; padding: 0.375rem; list-style: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-control);
  box-shadow: 0 12px 32px -12px rgba(15, 23, 42, 0.25);
}
.lang-menu a {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  min-height: 2.5rem; padding: 0.5rem 0.75rem; border-radius: calc(var(--radius-control) - 2px);
  color: var(--fg); text-decoration: none; font-weight: 500; font-size: var(--step--1);
}
.lang-menu a:hover { background: var(--surface-sunken-2); color: var(--seal); }
.lang-menu a[aria-current] { color: var(--seal); font-weight: 600; }
.lang-menu a svg { width: 1rem; height: 1rem; color: var(--brand); stroke-width: 2.25; }
/* The same two links inside the phone menu. On a phone the header has room for the wordmark, the menu
   button and "Book a demo" only (the French label is longer still), so below 34rem the language choice
   moves into the menu panel, under a rule, instead of pushing the header past the screen edge. */
.nav-lang { display: none; }
.nav-lang a { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.nav-lang a[aria-current] { color: var(--seal); font-weight: 600; }
.nav-lang svg {
  width: 1rem; height: 1rem; color: var(--brand);
  fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round;
}
@media (max-width: 34rem) {
  .site-header .lang { display: none; }
  .nav-lang { display: block; }
  .nav-lang-first { margin-top: 0.25rem; padding-top: 0.25rem; border-top: 1px solid var(--line); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(3rem, 2rem + 5vw, 6.5rem) clamp(3.5rem, 2rem + 5vw, 6rem);
  background: var(--surface-sunken);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
/* A faint hexagon lattice, the seal's own geometry, behind the copy only */
.hero::before {
  content: ""; position: absolute; inset: 0 auto auto 0; width: 60%; height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 1 L55 16.5 V47.5 L28 63 L1 47.5 V16.5 Z M28 63 V96' fill='none' stroke='%23cbd5e1' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 56px 97px;
  opacity: 0.45;
  -webkit-mask-image: linear-gradient(115deg, #000 20%, transparent 75%);
          mask-image: linear-gradient(115deg, #000 20%, transparent 75%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid; gap: clamp(2.5rem, 2rem + 3vw, 4.5rem);
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
}
.hero h1 {
  font-size: var(--step-4);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.04;
  max-width: 15ch;
}
.lede {
  margin-top: 1.5rem;
  font-size: var(--step-1);
  line-height: 1.65;
  color: var(--fg-muted);
  max-width: 34rem;
}
/* The lede is the picture the reader is meant to see; the second paragraph is the plain
   "what it is and who it is for", quieter so the picture leads. */
.lede-2 {
  margin-top: 1rem;
  line-height: 1.65;
  color: var(--fg-muted);
  max-width: 34rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.cta-note { margin-top: 0.75rem; font-size: var(--step--1); color: var(--fg-muted); max-width: 34rem; }
.cta-note a { color: var(--brand-hover); font-weight: 600; }
.standards {
  margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--line);
  font-size: var(--step--1); color: var(--fg-subtle); max-width: 34rem;
}
.standards ul { list-style: none; margin: 0.625rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.375rem; }
.standards li {
  padding: 0.25rem 0.625rem; border-radius: 0.375rem;
  background: var(--surface); border: 1px solid var(--line-strong);
  color: var(--fg-strong); font-weight: 650; font-size: 0.8125rem; letter-spacing: -0.005em;
}

@media (max-width: 60rem) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: 18ch; }
  .hero::before { width: 100%; height: 50%; }
}

/* ---------- The record (hero's one memorable element) ---------- */
.record {
  position: relative; margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--seal);
  border-radius: 0.75rem;
  padding: clamp(1.125rem, 0.8rem + 1.2vw, 1.75rem);
  box-shadow:
    0 1px 0 rgba(15, 23, 42, 0.04),
    0 24px 48px -24px rgba(15, 23, 42, 0.28);
  font-size: var(--step--1);
}
.record-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 0.5rem 1rem; }
.record-head > div { flex: 1 1 14rem; }
.record-title { font-weight: 700; color: var(--fg-strong); font-size: var(--step-0); }
.record-sub { color: var(--fg-subtle); margin-top: 0.125rem; }

.pill {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.1875rem 0.625rem; border-radius: 999px;
  font-size: 0.75rem; font-weight: 600; line-height: 1.4; white-space: nowrap;
}
.pill-ok { background: var(--success-soft); color: var(--success); }
.pill-fail { background: var(--danger-soft); color: var(--danger); }
.pill-warn { background: var(--warning-soft); color: var(--warning); }
.pill-live-plain { background: var(--surface-sunken-2); color: var(--fg-muted); }
.pill-live { background: var(--surface-sunken-2); color: var(--fg-muted); }
.pill-live::before {
  content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--success);
}
.pill-live[data-state="done"]::before { background: var(--fg-subtle); }
.record.is-playing .pill-live::before { animation: pulse 1.2s ease-in-out infinite; }

.readings { list-style: none; margin: 1.25rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.reading {
  display: grid; grid-template-columns: 3.5rem 1fr auto; align-items: center; gap: 0.75rem;
  padding: 0.6875rem 0; border-bottom: 1px solid var(--line);
}
.reading time { color: var(--fg-subtle); font-variant-numeric: tabular-nums; }
.value { font-weight: 700; color: var(--fg-strong); font-variant-numeric: tabular-nums; font-size: var(--step-0); }
.reading-fail { background: linear-gradient(90deg, var(--brand-soft), transparent 85%); margin-inline: -0.75rem; padding-inline: 0.75rem; border-radius: 0.375rem; }
.reading-fail .value { color: var(--danger); }

.nc, .fix, .sign { margin-top: 0.875rem; padding: 0.75rem 0.875rem; border-radius: var(--radius-control); }
.nc { background: var(--danger-soft); border-left: 4px solid var(--brand); color: #7f1d1d; }
.nc-title { font-weight: 700; color: var(--danger); margin-bottom: 0.125rem; }
.fix { background: var(--surface-sunken); border: 1px solid var(--line); }
.fix-reading { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.375rem; }
.sign { background: var(--success-soft); color: #14532d; }
.sign strong { color: var(--success); }

.record-foot {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem;
  margin-top: 0.75rem; min-height: 5rem;
}
.stamp {
  margin-left: auto;
  display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
  color: var(--seal); font-weight: 800; font-size: 0.8125rem; letter-spacing: -0.01em;
  transform: rotate(-8deg);
}
.stamp svg { width: 4.25rem; height: 4.25rem; filter: drop-shadow(0 6px 10px rgba(15, 23, 42, 0.25)); }

.replay {
  background: none; border: 0; padding: 0.25rem 0; cursor: pointer;
  font: inherit; font-size: var(--step--1); font-weight: 600; color: var(--fg-muted);
  text-decoration: underline; text-underline-offset: 0.2em;
}
.replay:hover { color: var(--seal); }

/* Steps are hidden only when the script is running the sequence */
.js .record [data-step] { opacity: 0; transform: translateY(6px); transition: opacity 380ms ease, transform 380ms ease; }
.js .record [data-step].shown { opacity: 1; transform: none; }
.js .record .stamp[data-step] { transform: rotate(-8deg) scale(1.6); transition: opacity 260ms ease, transform 320ms cubic-bezier(.2, 1.4, .4, 1); }
.js .record .stamp[data-step].shown { transform: rotate(-8deg) scale(1); }

@keyframes pulse { 50% { opacity: 0.25; } }

/* ---------- Who it's for ---------- */
.fit { padding-block: 2.5rem; border-bottom: 1px solid var(--line); }
.fit-title { font-size: var(--step-1); font-weight: 600; letter-spacing: -0.01em; color: var(--fg-strong); max-width: 46rem; }
.fit-list { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 1.25rem 0 0; }
.fit-list li {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1rem 0.5rem 0.75rem; border: 1px solid var(--line); border-radius: 999px;
  color: var(--fg-strong); font-size: var(--step--1); font-weight: 550; background: var(--surface);
}
.fit-list svg {
  width: 1.375rem; height: 1.375rem; flex: none;
  fill: none; stroke: var(--brand); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Sections ---------- */
.section { padding-block: var(--section); }
.section-sunken { background: var(--surface-sunken); border-block: 1px solid var(--line); }
.section-head { max-width: 40rem; margin-bottom: clamp(2.5rem, 2rem + 2vw, 3.5rem); }
.section-head h2, .evidence h2, .ai h2, .faq-wrap h2, .book h2 { font-size: var(--step-3); font-weight: 800; }
.section-head p { margin-top: 0.875rem; font-size: var(--step-1); color: var(--fg-muted); }

/* What you gain: one row per Core Human Drive. What it means and its sourced fact on the left,
   a picture of the product doing it on the right; rules between rows. */
.gains { display: grid; gap: 0; }
.gain {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  column-gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: center;
  padding-block: clamp(2rem, 1.5rem + 2vw, 3.25rem);
  border-top: 1px solid var(--line);
}
.gain:last-child { border-bottom: 1px solid var(--line); }
.gain h3 {
  font-weight: 800; color: var(--fg-strong); font-size: var(--step-2);
  letter-spacing: -0.02em; line-height: 1.2;
  padding-left: 1.25rem; position: relative;
}
.gain h3::before {
  content: ""; position: absolute; left: 0; top: 0.4em; width: 0.55rem; height: 0.55rem;
  background: var(--brand);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.gain-why > p { margin: 0.875rem 0 0 1.25rem; color: var(--fg-muted); max-width: 30rem; font-size: var(--step-1); line-height: 1.6; }
/* The fact is the reason; it reads as a quotation from the rulebook, set off by a rule. */
.gain-why > p.gain-fact {
  margin-top: 1.25rem; padding-left: 0.875rem; border-left: 3px solid var(--line-strong);
  font-size: 0.9375rem; color: var(--fg); line-height: 1.55;
}
.gain-why > p.gain-source { margin-top: 0.375rem; margin-left: calc(1.25rem + 0.875rem + 3px); font-size: 0.8125rem; color: var(--fg-subtle); }
.gain-source a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 2px; }
@media (max-width: 52rem) {
  .gain { grid-template-columns: minmax(0, 1fr); row-gap: 1.75rem; }
}

/* ---------- Product pictures: small screens drawn in the app's own look (the hero record's language) ---------- */
.viz-card {
  background: var(--surface);
  border: 1px solid var(--line); border-top: 4px solid var(--seal); border-radius: 0.75rem;
  padding: clamp(1rem, 0.8rem + 0.8vw, 1.5rem);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04), 0 20px 40px -24px rgba(15, 23, 42, 0.25);
  font-size: var(--step--1);
  min-width: 0;
}
.viz-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 0.5rem 1rem; }
.viz-head > div { flex: 1 1 12rem; }
.viz svg text { font-family: inherit; }
.hex {
  display: inline-block; width: 0.75rem; height: 0.75rem; flex: none; background: var(--brand);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.hex-ok { background: var(--success); }

/* Defend: a CCP reading below its critical limit and what follows */
/* The gauge is HTML, not SVG text, so its labels keep their size at every width. */
.gauge { position: relative; height: 5.25rem; margin: 1rem 0.25rem 0; }
.gauge > span { position: absolute; }
.g-track { position: absolute; left: 0; right: 0; top: 2.25rem; height: 0.625rem; display: flex; gap: 2px; }
.g-track span { flex: 1; border-radius: 999px; }
.g-bad { background: #fecaca; }
.g-good { background: #bbf7d0; }
.g-label { top: 0.375rem; transform: translateX(-50%); font-weight: 700; color: var(--fg-strong); white-space: nowrap; }
.g-limit { top: 1.75rem; width: 2px; height: 1.625rem; margin-left: -1px; background: var(--seal); }
.g-dot {
  top: 2.5625rem; width: 1.125rem; height: 1.125rem; margin: -0.5625rem 0 0 -0.5625rem; border-radius: 50%;
  background: var(--brand); box-shadow: 0 0 0 3px #fff, 0 2px 6px rgba(15, 23, 42, 0.3);
}
.g-value { top: 3.5rem; transform: translateX(-50%); font-weight: 800; font-size: var(--step-0); color: var(--danger); font-variant-numeric: tabular-nums; white-space: nowrap; }
.g-scale { top: 3.625rem; left: 0; color: var(--fg-subtle); font-size: 0.75rem; }
.g-scale-end { left: auto; right: 0; }
.outcomes { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.5rem; }
.outcomes li {
  display: flex; align-items: center; gap: 0.625rem;
  padding: 0.625rem 0.75rem; border-radius: var(--radius-control);
  background: var(--surface-sunken); border: 1px solid var(--line); color: var(--fg-strong); font-weight: 550;
}
.outcomes li.out-nc { background: var(--danger-soft); border-color: #fecaca; color: #7f1d1d; }
.outcomes svg {
  width: 1.125rem; height: 1.125rem; flex: none;
  fill: none; stroke: var(--fg-muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* Acquire: the file the auditor asks for */
.file-rows { list-style: none; margin: 1rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.file-rows li {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 0.75rem;
  padding: 0.6875rem 0; border-bottom: 1px solid var(--line);
}
.folder {
  width: 1.25rem; height: 0.95rem; border-radius: 2px 3px 3px 3px; background: var(--seal); position: relative; margin-top: 0.15rem;
}
.folder::before {
  content: ""; position: absolute; left: 0; top: -0.2rem; width: 0.55rem; height: 0.3rem;
  background: var(--seal); border-radius: 2px 2px 0 0;
}
.file-name { font-weight: 650; color: var(--fg-strong); min-width: 0; }
.file-count { color: var(--fg-subtle); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 34rem) {
  .file-rows li { grid-template-columns: auto minmax(0, 1fr) auto; row-gap: 0.25rem; }
  .file-rows .file-count { grid-column: 2; grid-row: 2; }
  .file-rows .pill { grid-column: 3; grid-row: 1 / span 2; white-space: normal; text-align: center; }
}

/* Bond: a test taken on a phone by someone without a login */
.viz-phone-stage {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(1rem, 0.5rem + 2vw, 2rem); align-items: center;
  padding: clamp(1.25rem, 1rem + 1vw, 2rem); border-radius: 1rem;
  background:
    radial-gradient(circle at 25% 30%, rgba(220, 38, 38, 0.07), transparent 60%),
    var(--surface-sunken);
  border: 1px solid var(--line);
}
.phone {
  width: 13.5rem; padding: 0.625rem; border-radius: 2rem; background: var(--seal);
  box-shadow: 0 24px 40px -20px rgba(15, 23, 42, 0.5);
}
.phone-screen {
  background: var(--surface); border-radius: 1.5rem; padding: 1.5rem 1rem 1.125rem;
  font-size: var(--step--1); position: relative;
}
.phone-screen::before {
  content: ""; position: absolute; top: 0.5rem; left: 50%; width: 3rem; height: 0.3rem; margin-left: -1.5rem;
  border-radius: 999px; background: var(--line);
}
.ph-kicker { color: var(--brand-hover); font-weight: 700; font-size: 0.75rem; }
.ph-title { font-weight: 800; color: var(--fg-strong); font-size: var(--step-1); letter-spacing: -0.015em; margin-top: 0.125rem; }
.ph-who { color: var(--fg-subtle); font-size: 0.75rem; margin-top: 0.125rem; }
.ph-score { display: flex; align-items: center; justify-content: space-between; margin-top: 1rem; }
.ph-big { font-size: 2.5rem; font-weight: 800; letter-spacing: -0.04em; color: var(--seal); line-height: 1; font-variant-numeric: tabular-nums; }
.ph-big small { font-size: 1rem; color: var(--fg-subtle); font-weight: 700; letter-spacing: 0; }
.ph-mark { color: var(--fg-subtle); font-size: 0.75rem; margin-top: 0.25rem; }
.ph-filed {
  display: flex; align-items: center; gap: 0.5rem; margin-top: 1rem; padding: 0.5rem 0.625rem;
  border-radius: var(--radius-control); background: var(--success-soft); color: #14532d; font-weight: 600; font-size: 0.75rem;
}
.team { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; font-size: var(--step--1); }
.team li {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.625rem;
  padding: 0.5rem 0.625rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-control);
  color: var(--fg-strong); font-weight: 600;
}
.avatar {
  display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--surface-sunken-2); color: var(--fg-muted); font-size: 0.75rem; font-weight: 700;
}
@media (max-width: 36rem) {
  .viz-phone-stage { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .team { width: 100%; }
}

/* Learn: a control chart with a drift before the breach */
.chart { width: 100%; height: auto; margin-top: 1rem; overflow: visible; }
.c-axis { stroke: var(--line-strong); stroke-width: 1; }
.c-mean { stroke: var(--fg-subtle); stroke-width: 1; stroke-dasharray: 4 4; }
.c-limit { stroke: var(--brand); stroke-width: 1.5; stroke-dasharray: 6 4; }
.c-drift { fill: var(--warning-soft); opacity: 0.7; }
.c-line { fill: none; stroke: var(--seal); stroke-width: 2; stroke-linejoin: round; }
.c-pts circle { fill: var(--surface); stroke: var(--seal); stroke-width: 2; }
.c-pts-drift circle { stroke: var(--warning); fill: var(--warning-soft); }
.c-out { fill: var(--brand); stroke: #fff; stroke-width: 2.5; }
.c-months { display: flex; justify-content: space-between; padding: 0.125rem 4% 0 10%; color: var(--fg-subtle); font-size: 0.75rem; }
.c-key { list-style: none; margin: 0.75rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.375rem 1.125rem; color: var(--fg-muted); font-size: 0.8125rem; }
.c-key li { display: flex; align-items: center; gap: 0.5rem; }
.k { flex: none; }
.k-limit { width: 1.125rem; border-top: 2px dashed var(--brand); }
.k-mean { width: 1.125rem; border-top: 1px dashed var(--fg-subtle); }
.k-drift { width: 0.625rem; height: 0.625rem; border-radius: 50%; border: 2px solid var(--warning); background: var(--warning-soft); }
.k-out { width: 0.625rem; height: 0.625rem; border-radius: 50%; background: var(--brand); }

/* Feel: a month of registers, every day on record */
.cal { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.375rem; }
.cal-dow { font-size: 0.75rem; font-weight: 600; color: var(--fg-subtle); padding-bottom: 0.125rem; }
.day {
  display: flex; flex-direction: column; justify-content: space-between; gap: 0.375rem;
  min-height: 2.875rem; padding: 0.375rem 0.5rem 0.5rem; border-radius: 0.375rem;
  background: var(--surface-sunken); border: 1px solid var(--line);
}
.day b { font-size: 0.75rem; font-weight: 700; color: var(--fg-muted); font-variant-numeric: tabular-nums; }
.day i { display: block; height: 0.3125rem; border-radius: 999px; background: var(--line); position: relative; overflow: hidden; }
.day.done { background: #f0fdf4; border-color: #bbf7d0; }
.day.done i { background: var(--success); }
.day.today { border: 2px solid var(--brand); background: var(--surface); }
.day.today b { color: var(--brand-hover); }
.day.today i::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--done, 50%); background: var(--warning); }
.cal-key { display: flex; flex-wrap: wrap; gap: 0.375rem 1.25rem; margin-top: 0.875rem; color: var(--fg-muted); font-size: 0.8125rem; }
.cal-key p { display: flex; align-items: center; gap: 0.5rem; }
.key { width: 0.875rem; height: 0.3125rem; border-radius: 999px; flex: none; }
.key-done { background: var(--success); }
.key-today { background: linear-gradient(90deg, var(--warning) 64%, var(--line) 64%); }
.cal-visit {
  display: flex; align-items: center; gap: 0.625rem; margin-top: 0.875rem; padding: 0.625rem 0.75rem;
  border-radius: var(--radius-control); background: var(--seal); color: #fff; font-weight: 650;
}

/* Modules: the plant's order, joined by a track */
/* Modules: the four stages as stacked rows. The stage (numbered seal, name, who works there) on
   the left, its modules on the right in two columns; a dotted line joins the seals down the page. */
.flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: stage; position: relative; }
.flow::before {
  content: ""; position: absolute; left: 1.25rem; top: 2.5rem; bottom: 2.5rem; width: 2px;
  background: repeating-linear-gradient(180deg, var(--line-strong) 0 8px, transparent 8px 14px);
}
.stage {
  position: relative; counter-increment: stage;
  display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  column-gap: clamp(1.5rem, 1rem + 3vw, 4rem);
  padding-block: clamp(1.5rem, 1rem + 1.5vw, 2.25rem);
}
.stage + .stage { border-top: 1px solid var(--line); }
.stage-head { position: sticky; top: 5rem; align-self: start; }
.stage h3 { display: flex; align-items: center; gap: 0.75rem; font-size: var(--step-2); font-weight: 750; }
.stage h3::before {
  content: counter(stage);
  content: counter(stage) / "";
  display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; flex: none;
  background: var(--seal); color: #fff; font-size: 1rem; font-weight: 700;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.stage:last-child h3::before { background: var(--brand); }
.stage-who { margin: 0.5rem 0 0 3.25rem; font-size: var(--step--1); color: var(--fg-muted); }
.mods {
  margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.625rem; align-items: start;
}
/* A module: its name and one line; the full description opens on a click. */
.mod {
  background: var(--surface); border: 1px solid var(--line); border-radius: 0.625rem;
}
.mod summary {
  list-style: none; cursor: pointer; position: relative;
  display: grid; gap: 0.125rem; padding: 0.75rem 2.5rem 0.8125rem 1rem; min-height: 3rem;
  border-radius: 0.625rem;
}
.mod summary::-webkit-details-marker { display: none; }
.mod summary::after {
  content: ""; position: absolute; right: 1rem; top: 1.125rem; width: 0.5rem; height: 0.5rem;
  border-right: 2px solid var(--fg-subtle); border-bottom: 2px solid var(--fg-subtle);
  transform: rotate(45deg); transition: transform 160ms ease;
}
.mod[open] summary::after { transform: translateY(0.2rem) rotate(-135deg); }
.mod summary:hover { background: var(--surface-sunken); }
.mod[open] { border-color: var(--line-strong); }
.mod-name { font-weight: 700; color: var(--fg-strong); letter-spacing: -0.01em; display: flex; align-items: center; gap: 0.5rem; }
.mod-nc .mod-name::after {
  content: ""; width: 0.625rem; height: 0.625rem; flex: none; background: var(--brand);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.mod-line { color: var(--fg-muted); font-size: 0.875rem; line-height: 1.45; }
.mod p { margin: 0; padding: 0 1rem 1rem; color: var(--fg-muted); font-size: 0.875rem; line-height: 1.55; }
.mods-key {
  display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.5rem;
  font-size: var(--step--1); color: var(--fg-muted);
}

/* One list fed by every failed check */
.funnel {
  margin: 0 0 clamp(2.5rem, 2rem + 2vw, 3.5rem);
  display: grid; grid-template-columns: minmax(0, 15rem) minmax(3rem, 1fr) minmax(0, 32rem); align-items: center;
}
.funnel-from { list-style: none; margin: 0; padding: 0; display: grid; grid-template-rows: repeat(5, 1fr); gap: 0.5rem; height: 100%; }
.funnel-from li {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.75rem; border-radius: var(--radius-control);
  background: var(--surface); border: 1px solid var(--line); color: var(--fg-strong); font-weight: 600; font-size: var(--step--1);
}
.funnel-from li::before {
  content: ""; width: 0.625rem; height: 0.625rem; flex: none; background: var(--brand);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.funnel-lines { width: 100%; height: 100%; }
.funnel-lines path { fill: none; stroke: var(--brand-ring); stroke-width: 2; vector-effect: non-scaling-stroke; opacity: 0.55; }
.nc-list {
  background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: 0.75rem;
  padding: clamp(1rem, 0.8rem + 0.8vw, 1.5rem); font-size: var(--step--1);
  box-shadow: 0 20px 40px -24px rgba(15, 23, 42, 0.25);
}
.nc-list ul { list-style: none; margin: 0.875rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.nc-list li {
  display: grid; grid-template-columns: 4.25rem 4.5rem minmax(0, 1fr) auto; align-items: center; gap: 0.625rem;
  padding: 0.5625rem 0; border-bottom: 1px solid var(--line);
}
.nc-id { font-weight: 700; color: var(--fg-strong); font-variant-numeric: tabular-nums; }
.nc-src { color: var(--fg-subtle); font-size: 0.8125rem; }
.nc-what { color: var(--fg); min-width: 0; }
@media (max-width: 56rem) {
  .funnel { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .funnel-from { display: flex; flex-wrap: wrap; gap: 0.375rem; height: auto; }
  .funnel-lines { display: none; }
  .nc-list { margin-top: 2.25rem; position: relative; }
  .nc-list::before {
    content: ""; position: absolute; left: 50%; top: -1.875rem; width: 2px; height: 1.25rem; margin-left: -1px;
    background: var(--brand-ring);
  }
  .nc-list::after {
    content: ""; position: absolute; left: 50%; top: -0.75rem; margin-left: -0.375rem;
    border: 0.375rem solid transparent; border-top-color: var(--brand-ring);
  }
}
@media (max-width: 34rem) {
  .nc-list li { grid-template-columns: 4.25rem minmax(0, 1fr) auto; row-gap: 0.125rem; }
  .nc-src { grid-column: 2; grid-row: 1; }
  .nc-what { grid-column: 1 / 3; grid-row: 2; }
  .nc-list .pill { grid-column: 3; grid-row: 1 / span 2; }
}

.across {
  margin-top: clamp(1.5rem, 1rem + 1.5vw, 2.25rem); padding: 1.25rem 1.5rem 1.5rem;
  border: 1px dashed var(--line-strong); border-radius: 0.75rem; background: var(--surface);
}
.across h3 { font-size: var(--step-1); font-weight: 750; color: var(--fg-strong); }
.across-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; align-items: center; margin-top: 1rem; }
.across ul { margin: 0; padding-left: 1.125rem; display: grid; gap: 0.5rem; color: var(--fg-muted); }
.across strong { color: var(--fg-strong); }
.dash { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; }
.tile {
  padding: 0.75rem 0.75rem 0.875rem; border-radius: var(--radius-control);
  background: var(--surface-sunken); border: 1px solid var(--line);
  font-size: 0.75rem; color: var(--fg-muted); line-height: 1.3;
}
.tile-n { font-size: var(--step-3); font-weight: 800; color: var(--seal); letter-spacing: -0.03em; line-height: 1; margin-bottom: 0.375rem; font-variant-numeric: tabular-nums; }
.tile-red { background: var(--danger-soft); border-color: #fecaca; color: #7f1d1d; }
.tile-red .tile-n { color: var(--danger); }
@media (max-width: 52rem) {
  .across-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 30rem) {
  .dash { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 62rem) {
  .stage { grid-template-columns: minmax(0, 1fr); row-gap: 1.25rem; }
  .stage-head { position: static; }
  .mods { margin-left: 3.25rem; }
  .flow::before { bottom: 0; }
}
@media (max-width: 40rem) {
  .mods { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 26rem) {
  .mods { margin-left: 0; }
  .flow::before { display: none; }
}

/* Evidence: the one dark section, in the seal's slate */
.evidence { background: var(--seal); color: #cbd5e1; }
.evidence h2 { color: #fff; }
.evidence-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(2.5rem, 2rem + 3vw, 5rem); align-items: center; }
.evidence-copy > p { margin-top: 1rem; font-size: var(--step-1); line-height: 1.65; max-width: 34rem; }
.checks { list-style: none; padding: 0; margin: 1.75rem 0 0; display: grid; gap: 0.75rem; }
.checks li { position: relative; padding-left: 1.75rem; color: #e2e8f0; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 0.3em; width: 1.05rem; height: 1.05rem;
  background: var(--brand);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.checks li::after {
  content: ""; position: absolute; left: 0.32rem; top: calc(0.3em + 0.28rem); width: 0.42rem; height: 0.25rem;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg);
}

.trail {
  background: #1e293b; border: 1px solid #334155; border-radius: 0.75rem; overflow: hidden;
  font-size: var(--step--1);
}
.trail-row {
  display: grid; grid-template-columns: 3.75rem 8.5rem 1fr; gap: 1rem;
  padding: 0.875rem 1.25rem; border-top: 1px solid #334155;
}
.trail-row span:first-child { font-variant-numeric: tabular-nums; color: #94a3b8; }
.trail-row span:nth-child(2) { color: #cbd5e1; font-weight: 500; }
.trail-row span:last-child { color: #f1f5f9; }
.trail-head { border-top: 0; background: #0b1324; }
.trail-head span { color: #94a3b8 !important; font-weight: 600; font-size: 0.75rem; }
.trail .was { color: #94a3b8; text-decoration-color: #f87171; text-decoration-thickness: 2px; }
.trail .now { display: inline-block; margin-left: 0.25rem; padding: 0 0.375rem; border-radius: 0.25rem; background: rgba(220, 38, 38, 0.25); color: #fecaca; font-weight: 600; }
.trail-signed { background: rgba(21, 128, 61, 0.16); }
.trail-signed span:last-child { color: #bbf7d0 !important; font-weight: 600; }
@media (max-width: 60rem) { .evidence-grid { grid-template-columns: 1fr; } }
@media (max-width: 30rem) {
  .trail-row { grid-template-columns: 3.25rem 1fr; row-gap: 0.25rem; }
  .trail-row span:last-child { grid-column: 2; }
  .trail-head span:last-child { display: none; }
}

/* Platforms: the same records on three screens, drawn as the screens themselves */
.devices {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.1fr) minmax(0, 0.75fr);
  gap: clamp(1rem, 0.5rem + 2vw, 2.5rem); align-items: end;
}
.device { margin: 0; display: grid; gap: 1rem; min-width: 0; }
.device figcaption { color: var(--fg-muted); font-size: 0.9375rem; }
.device figcaption strong { display: block; color: var(--fg-strong); font-size: var(--step-1); letter-spacing: -0.012em; }
.frame {
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 0.75rem; overflow: hidden;
  box-shadow: 0 24px 40px -28px rgba(15, 23, 42, 0.4); font-size: 0.8125rem;
}
.frame-bar {
  display: flex; align-items: center; gap: 0.375rem; padding: 0.5rem 0.75rem;
  background: var(--surface-sunken-2); border-bottom: 1px solid var(--line);
}
.frame-bar i { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--line-strong); }
.frame-bar span {
  margin-left: 0.5rem; flex: 1; padding: 0.125rem 0.625rem; border-radius: 999px; background: var(--surface);
  color: var(--fg-subtle); font-size: 0.75rem;
}
.frame-bar-app { background: var(--seal); border-bottom-color: var(--seal); }
.frame-bar-app span { margin: 0; padding: 0; background: none; color: #e2e8f0; font-weight: 600; }
.frame-body { padding: 0.875rem; display: grid; gap: 0.625rem; min-height: 11rem; align-content: start; }
.mini-dash { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.mini-dash .tile-n { font-size: var(--step-2); }
.mini-bars {
  display: flex; align-items: flex-end; gap: 0.375rem; height: 3.5rem; padding: 0.375rem 0.5rem 0;
  border-bottom: 1px solid var(--line);
}
.mini-bars i { flex: 1; height: var(--h); background: var(--seal); border-radius: 3px 3px 0 0; opacity: 0.85; }
.mini-bars i:nth-child(4) { background: var(--brand); }
.offline {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.625rem; border-radius: var(--radius-control);
  background: var(--warning-soft); color: #78350f; font-weight: 600;
}
.offline .dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--warning); flex: none; }
.row-line { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; padding: 0.375rem 0; border-bottom: 1px solid var(--line); color: var(--fg-strong); }
.sync { color: var(--fg-subtle); font-size: 0.75rem; }
.frame-phone {
  max-width: 12.5rem; justify-self: start; width: 100%;
  border: 0.5rem solid var(--seal); border-radius: 1.75rem; box-shadow: 0 24px 40px -20px rgba(15, 23, 42, 0.45);
}
.frame-phone .frame-body { padding: 1.25rem 0.875rem 1rem; min-height: 14rem; }
.q { font-weight: 700; color: var(--fg-strong); font-size: var(--step--1); line-height: 1.35; }
.yn { display: grid; grid-template-columns: 1fr 1fr; gap: 0.375rem; }
.yn span { text-align: center; padding: 0.5rem 0; border-radius: var(--radius-control); border: 1px solid var(--line-strong); font-weight: 600; color: var(--fg-muted); }
.yn .on { background: var(--success); border-color: var(--success); color: #fff; }
.photo {
  display: grid; place-items: center; gap: 0.25rem; padding: 0.875rem 0.5rem; border-radius: var(--radius-control);
  background: repeating-linear-gradient(135deg, var(--surface-sunken-2) 0 8px, var(--surface-sunken) 8px 16px);
  border: 1px dashed var(--line-strong); color: var(--fg-muted); font-size: 0.75rem; font-weight: 600;
}
.photo svg { width: 1.5rem; height: 1.5rem; fill: none; stroke: var(--fg-muted); stroke-width: 1.6; stroke-linejoin: round; }
@media (max-width: 52rem) {
  .devices { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .device:last-child { grid-column: 1 / -1; grid-template-columns: auto minmax(0, 1fr); align-items: center; }
}
@media (max-width: 34rem) {
  .devices { grid-template-columns: minmax(0, 1fr); }
  .device:last-child { grid-template-columns: minmax(0, 1fr); }
}

.platform-extras {
  list-style: none; margin: clamp(2rem, 1.5rem + 2vw, 3rem) 0 0; padding: clamp(1.5rem, 1rem + 1vw, 2rem) 0 0;
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem;
}
.platform-extras li { display: flex; gap: 0.875rem; align-items: flex-start; }
.platform-extras svg {
  width: 1.75rem; height: 1.75rem; flex: none; fill: none; stroke: var(--brand); stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.platform-extras p { color: var(--fg-muted); font-size: 0.9375rem; }
.platform-extras strong { display: block; color: var(--fg-strong); }
@media (max-width: 52rem) { .platform-extras { grid-template-columns: minmax(0, 1fr); } }

/* AI: three pictures, each above its caption */
.ai-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 0.5rem + 2vw, 2rem); }
.ai-card { margin: 0; display: grid; grid-template-rows: auto 1fr; gap: 1rem; min-width: 0; }
.ai-card figcaption { color: var(--fg-muted); font-size: 0.9375rem; }
.ai-card figcaption strong { display: block; color: var(--fg-strong); font-size: var(--step-1); letter-spacing: -0.01em; margin-bottom: 0.25rem; }
.ai-viz {
  background: var(--surface); border: 1px solid var(--line); border-radius: 0.75rem;
  padding: 1rem; min-height: 11.5rem; font-size: 0.8125rem;
  box-shadow: 0 20px 36px -28px rgba(15, 23, 42, 0.35);
}
.ai-lab { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 0.625rem; }
.pdf {
  width: 3.5rem; padding: 0.5rem 0.4rem 0.625rem; border-radius: 0.25rem; background: var(--surface-sunken);
  border: 1px solid var(--line-strong); display: grid; gap: 0.3rem; position: relative;
}
.pdf span {
  justify-self: start; padding: 0.0625rem 0.3rem; border-radius: 0.1875rem; background: var(--brand); color: #fff;
  font-size: 0.75rem; font-weight: 800;
}
.pdf i { height: 0.25rem; border-radius: 999px; background: var(--line-strong); }
.pdf i:nth-of-type(2n) { width: 70%; }
.ai-arrow { width: 1.25rem; height: 1.25rem; fill: none; stroke: var(--fg-subtle); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lab-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.375rem; min-width: 0; }
.lab-rows li {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.4rem;
  padding: 0.375rem 0.5rem; border-radius: 0.375rem; background: var(--surface-sunken); color: var(--fg);
}
.lab-rows b { color: var(--fg-strong); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; flex: none; }
.dot-ok { background: var(--success); }
.dot-check { background: var(--warning); }
.lab-rows li:last-child { background: var(--warning-soft); }
.lab-rows li:last-child b { color: var(--warning); }
.ai-chat { display: grid; gap: 0.5rem; align-content: start; }
.bubble { padding: 0.5rem 0.75rem; border-radius: 0.75rem; line-height: 1.45; max-width: 92%; }
.bubble-q { justify-self: end; background: var(--seal); color: #fff; border-bottom-right-radius: 0.25rem; }
.bubble-a { justify-self: start; background: var(--surface-sunken-2); color: var(--fg-strong); border-bottom-left-radius: 0.25rem; }
.cite {
  display: inline-block; padding: 0 0.3rem; border-radius: 0.25rem; background: var(--seal); color: #fff;
  font-size: 0.75rem; font-weight: 700; vertical-align: 0.05em;
}
.sources { color: var(--fg-subtle); font-size: 0.75rem; }
.ai-minutes { display: grid; gap: 0.75rem; align-content: start; }
.wave { width: 100%; height: 2.5rem; }
.wave path { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linecap: round; }
.draft { padding: 0.625rem 0.75rem; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--surface-sunken); display: grid; gap: 0.375rem; }
.draft-title { font-weight: 700; color: var(--fg-strong); }
.draft-item { display: flex; align-items: flex-start; gap: 0.5rem; color: var(--fg); line-height: 1.35; }
.box { width: 0.875rem; height: 0.875rem; border: 1.5px solid var(--fg-subtle); border-radius: 0.1875rem; flex: none; margin-top: 0.1rem; position: relative; }
.box-on { background: var(--success); border-color: var(--success); }
.box-on::after {
  content: ""; position: absolute; left: 0.22rem; top: 0.06rem; width: 0.25rem; height: 0.45rem;
  border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg);
}
@media (max-width: 60rem) { .ai-cards { grid-template-columns: minmax(0, 1fr); max-width: 34rem; } }

/* FAQ */
.faq-wrap { max-width: calc(48rem + 2 * var(--gutter)); }
.faq { margin-top: 2rem; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 1.25rem 2.5rem 1.25rem 0; font-weight: 650; color: var(--fg-strong); font-size: var(--step-1);
  letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 0.5rem; top: 50%; width: 0.625rem; height: 0.625rem;
  border-right: 2px solid var(--fg-subtle); border-bottom: 2px solid var(--fg-subtle);
  transform: translateY(-70%) rotate(45deg); transition: transform 160ms ease;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { padding: 0 2.5rem 1.375rem 0; color: var(--fg-muted); max-width: 42rem; }

/* Booking */
.book { background: var(--surface-sunken); border-top: 1px solid var(--line); }
.book-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: start; }
.book-copy > p { margin-top: 1rem; color: var(--fg-muted); font-size: var(--step-1); max-width: 28rem; }
.book-copy .book-direct { margin-top: 2rem; font-size: var(--step-0); color: var(--fg-muted); }
.email-link { display: inline-block; margin-top: 0.25rem; font-size: var(--step-2); font-weight: 700; letter-spacing: -0.015em; word-break: break-word; }
.book-copy .book-note { margin-top: 1.5rem; font-size: var(--step--1); color: var(--fg-subtle); }
@media (min-width: 60.01rem) { .book-copy { position: sticky; top: 6rem; } }
@media (max-width: 60rem) { .book-grid { grid-template-columns: 1fr; } }

.book-form {
  background: var(--surface); border: 1px solid var(--line); border-radius: 0.75rem;
  padding: clamp(1.25rem, 0.75rem + 2vw, 2.25rem);
  box-shadow: 0 24px 48px -32px rgba(15, 23, 42, 0.3);
  display: grid; gap: 1.25rem;
}
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
@media (max-width: 34rem) { .field-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 0.375rem; min-width: 0; }
fieldset.field { border: 0; margin: 0; padding: 0; }
.field label, .field legend { font-weight: 600; color: var(--fg-strong); font-size: var(--step--1); padding: 0; }
.optional { font-weight: 400; color: var(--fg-subtle); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 2.875rem;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--line-strong); border-radius: var(--radius-control);
  background: var(--surface); color: var(--fg-strong);
  font: inherit; font-size: 1rem; /* 16px stops iOS from zooming in */
}
.field textarea { resize: vertical; min-height: 6rem; }
.field input::placeholder, .field textarea::placeholder { color: #94a3b8; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25);
}
.field [aria-invalid="true"] { border-color: var(--danger); background: #fffafa; }
.hint { font-size: 0.8125rem; color: var(--fg-subtle); }
.error { font-size: 0.8125rem; color: var(--danger); font-weight: 600; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.25rem; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0.5rem 1rem;
  border: 1px solid var(--line-strong); border-radius: 999px;
  font-size: var(--step--1); font-weight: 500; color: var(--fg);
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
.chip:hover span { border-color: var(--fg-subtle); }
.chip input:checked + span { background: var(--seal); border-color: var(--seal); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--brand-ring); outline-offset: 2px; }

.sent {
  border-top: 1px solid var(--line); padding-top: 1.25rem; display: grid; gap: 0.75rem; justify-items: start;
}
.sent:focus { outline: none; }
.sent-title { font-weight: 700; color: var(--success); }
.sent-fallback .sent-title { color: var(--fg); }
.fallback-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
#book-fallback-reason:empty { display: none; }
.request-preview {
  margin-top: 0.75rem; padding: 0.875rem 1rem; max-height: 18rem; overflow: auto;
  background: var(--surface, #fff); border: 1px solid var(--line); border-radius: var(--radius, 0.5rem);
  font: inherit; font-size: var(--step--1); line-height: 1.55; color: var(--fg);
  white-space: pre-wrap; overflow-wrap: anywhere;
}
/* The robot trap: off screen, never shown, never focused. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.sent p { color: var(--fg-muted); }
.copy-status { font-size: var(--step--1); color: var(--success); font-weight: 600; min-height: 1.25em; }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding-block: 3.5rem 2rem; font-size: var(--step--1); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.footer-grid p { color: var(--fg-muted); margin-top: 0.5rem; max-width: 22rem; }
.footer-title { font-size: var(--step--1); font-weight: 700; color: var(--fg-strong); margin: 0; }
.footer-links { list-style: none; padding: 0; margin: 0.5rem 0 0; display: grid; gap: 0.375rem; }
.footer-links a, .footer-grid a:not(.brand) { color: var(--fg-muted); }
.footer-links a:hover, .footer-grid a:not(.brand):hover { color: var(--brand); }
.footer-legal { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.footer-legal p { color: var(--fg-subtle); font-size: 0.8125rem; max-width: 60rem; }
@media (max-width: 40rem) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }
@media (max-width: 22rem) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }
.footer-grid a, .email-link { overflow-wrap: anywhere; }

/* Touch screens: every control a finger aims at is at least 44 px tall (WCAG 2.5.5 target size,
   the size Apple and Google recommend). Links inside running text are exempt. */
@media (pointer: coarse) {
  .footer-links { gap: 0; }
  .footer-links a, .footer-grid p a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
  .brand, .site-header .btn, .email-link { min-height: 44px; }
  .brand { min-width: 44px; justify-content: center; }
  .site-header .btn, .email-link { display: inline-flex; align-items: center; }
  .nav-links a { display: flex; align-items: center; min-height: 44px; }
  .lang summary, .lang-menu a { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
}

@media print {
  .site-header, .book-form, .replay, .hero::before, .lang { display: none; }
  .evidence, .trail { background: #fff; color: #000; }
  .evidence h2, .trail-row span { color: #000 !important; }
}
