/* =====================================================================
   MOTDoc — International Typographic Style
   Pure white. Pure black. One green accent. Sharp corners. Whitespace is
   the design. Type is the design. Rules — not boxes — set the structure.
   ===================================================================== */

:root {
  --bg: #FCFBF7;                /* very subtle warm white — modern Swiss, not sterile */
  --paper: #FFFFFF;             /* card bg when needed */
  --ink: #0A0A0A;
  --rule: #0A0A0A;
  --hair: #E0E0DD;
  --hair-faint: #ECECE7;
  --text: #1A1A1A;
  --muted: #6A6A6A;
  --accent: #E60013;            /* Swiss red — alerts, brand */
  --accent-bright: #FF2A2A;
  --accent-soft: #FEEFEF;
  --positive: #047857;          /* deep green — "good/yes/clean" */
  --positive-soft: #ECFDF5;
  --red: #B91C1C;
  --amber: #B7791F;
  --pulse: #E60013;
  --radius: 4px;                /* subtle modern radius, not zero, not soft */

  --col-max: 1320px;
  --gutter: 32px;
  --baseline: 8px;

  --font: 'Helvetica Neue', Helvetica, Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'kern','ss01';
}

body {
  display: flex; flex-direction: column;
  min-height: 100vh;
  position: relative;
  isolation: isolate;
}

/* Ambient colour mesh — gives glass surfaces something to refract */
body::before {
  content: '';
  position: fixed;
  inset: -15vh -15vw;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 90% 8%,  rgba(230, 0, 19, 0.045) 0%, transparent 32%),
    radial-gradient(circle at 84% 22%, rgba(254, 240, 138, 0.18) 0%, transparent 42%),
    radial-gradient(circle at 70% 80%, rgba(180, 210, 245, 0.18) 0%, transparent 45%),
    radial-gradient(circle at 12% 78%, rgba(220, 230, 220, 0.22) 0%, transparent 40%);
  filter: blur(24px);
  animation: ambientShift 32s ease-in-out infinite alternate;
}
@keyframes ambientShift {
  0%   { transform: translate3d(0, 0, 0)        scale(1); }
  50%  { transform: translate3d(-2vw, 2vh, 0)   scale(1.04); }
  100% { transform: translate3d(2vw, -1.5vh, 0) scale(1.02); }
}
@media (prefers-reduced-motion: reduce) { body::before { animation: none; } }

/* Reusable frosted-glass surfaces */
.glass {
  background: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
          backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 28px -10px rgba(10, 10, 10, 0.12);
}
.glass-dark {
  background: rgba(20, 22, 28, 0.62);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
          backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 8px 28px -10px rgba(0, 0, 0, 0.45);
}

main {
  flex: 1; width: 100%;
  max-width: var(--col-max);
  margin: 0 auto;
  padding: calc(var(--baseline) * 12) var(--gutter);
}
@media (max-width: 599px) {
  main { padding: calc(var(--baseline) * 6) 16px; }
}

a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: var(--accent); }

:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 2px; border-radius: 0; }

p { margin: 0 0 1em; }

h1, h2, h3, h4 {
  margin: 0; padding: 0;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.96;
  color: var(--ink);
  font-feature-settings: 'kern','ss01';
}

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

/* ---------- TYPOGRAPHIC SYSTEM ---------- */

.t-display    { font-size: clamp(56px, 11vw, 168px); letter-spacing: -0.05em; line-height: 0.92; font-weight: 900; }
.t-headline   { font-size: clamp(34px, 6vw, 72px); letter-spacing: -0.04em; line-height: 0.98; font-weight: 900; }
.t-section    { font-size: clamp(28px, 4vw, 44px); letter-spacing: -0.035em; line-height: 1.02; font-weight: 900; }
.t-sub        { font-size: clamp(22px, 2.5vw, 28px); letter-spacing: -0.02em; line-height: 1.2; font-weight: 700; }
.t-lead       { font-size: clamp(17px, 1.6vw, 21px); line-height: 1.4; font-weight: 400; color: var(--text); }
.t-body       { font-size: 16px; line-height: 1.55; color: var(--text); }
.t-meta       { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink); }
.t-num        { font-family: var(--mono); font-feature-settings: 'tnum'; }

.muted { color: var(--muted); }
.ink   { color: var(--ink); }

/* ---------- HEADER ---------- */

.site-header {
  width: 100%;
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
}
.site-header > * {
  max-width: var(--col-max);
  margin: 0 auto;
  padding: 16px var(--gutter);
}
.site-header > div:first-child {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap;
}
@media (max-width: 520px) {
  .site-header > * { padding: 12px var(--gutter); }
  .logo { font-size: 17px; }
  .logo-suffix { display: none; }
  .site-nav { gap: 14px; font-size: 10px; letter-spacing: 0.14em; }
}

.logo {
  display: inline-flex; align-items: baseline; gap: 6px;
  font-size: 20px; font-weight: 900; letter-spacing: -0.03em;
  text-decoration: none; color: var(--ink);
}
.logo-mark {
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink); color: #FFFFFF;
  align-self: center;
  margin-right: 6px;
}
.logo-mark svg { width: 14px; height: 14px; }
.logo-suffix { color: var(--muted); font-weight: 400; font-size: 14px; font-family: var(--mono); letter-spacing: 0; }

.site-nav, .footer-nav {
  display: flex; gap: 32px;
  font-family: var(--mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.18em;
}
.site-nav a, .footer-nav a { text-decoration: none; color: var(--ink); font-weight: 600; }
.site-nav a:hover, .footer-nav a:hover { color: var(--accent); }

/* ---------- FOOTER ---------- */

.site-footer {
  background: var(--ink);
  color: #FFFFFF;
  padding: 64px var(--gutter) 48px;
  margin-top: 96px;
  border-top: 1px solid var(--rule);
}
.site-footer > * { max-width: var(--col-max); margin: 0 auto; }
.footer-disclaimer {
  font-size: 12px;
  line-height: 1.6;
  color: #999999;
  max-width: 880px;
  margin: 0 0 32px;
}
.footer-nav { color: #FFFFFF; gap: 24px; }
.footer-nav a { color: #DDDDDD; }
.footer-nav a:hover { color: #FFFFFF; }

/* ---------- HERO ---------- */

.hero { border-bottom: 1px solid var(--rule); background: var(--bg); }
.hero-inner {
  max-width: var(--col-max);
  margin: 0 auto;
  padding: clamp(64px, 9vw, 128px) var(--gutter) clamp(56px, 7vw, 96px);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(40px, 5vw, 80px);
}

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink);
  display: inline-flex; align-items: center; gap: 12px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--rule);
}

.hero h1 {
  margin: 24px 0 24px;
  font-size: clamp(40px, 6.5vw, 88px);
  letter-spacing: -0.04em;
  line-height: 0.98;
  font-weight: 900;
  max-width: 16ch;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
  display: inline;
}

.hero-lead {
  font-size: clamp(18px, 1.6vw, 22px);
  color: var(--muted);
  max-width: 720px;
  margin: 0 0 40px;
  line-height: 1.45;
  font-weight: 400;
}

/* Intake form — single rule under, no chrome */
.intake-form { max-width: 720px; }
.intake-label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.intake-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
#reg-input {
  width: 100%;
  font-family: var(--mono);
  font-size: clamp(36px, 7vw, 56px);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: left;
  padding: 16px 20px;
  background: #FEF08A;
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
#reg-input::placeholder { color: rgba(10,10,10,0.32); letter-spacing: 0.12em; }
#reg-input:focus { box-shadow: 0 0 0 3px var(--accent-soft); border-color: var(--accent); }
#reg-input[data-valid="true"] { border-color: var(--accent); }
#reg-input[data-valid="false"] { border-color: var(--red); box-shadow: 0 0 0 3px rgba(185,28,28,0.12); }

.intake-row button {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  padding: 16px 28px;
  background: var(--ink);
  color: #FFFFFF;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease;
  min-height: 56px;
}
.intake-row button:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); }
.intake-row button:active:not(:disabled) { transform: translateY(1px); }
.intake-row button .btn-icon { width: 18px; height: 18px; stroke-width: 2.4; }

.inline-error {
  min-height: 1.2em;
  margin: 12px 0 0;
  color: var(--red);
  font-size: 12px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hero-meta {
  display: flex;
  gap: 32px;
  margin-top: 40px;
  font-size: 11px;
  color: var(--muted);
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  flex-wrap: wrap;
}
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta span::before {
  content: '+';
  color: var(--accent);
  font-weight: 800;
}

/* Hero side — credentials as a frosted-glass slab */
.hero-credentials {
  align-self: start;
  background: rgba(255, 255, 255, 0.58);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
          backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  padding: 24px 28px 16px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 12px 40px -12px rgba(10, 10, 10, 0.15);
}
.hero-credentials-header {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 700;
  color: var(--ink);
  padding-bottom: 14px;
  border-bottom: 2px solid var(--ink);
  display: flex; align-items: center; justify-content: space-between;
}
.hero-credentials-header::after {
  content: '';
  width: 8px; height: 8px;
  background: var(--accent);
  display: inline-block;
}

.cred-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--hair);
  gap: 16px;
}
.cred-row:last-child { border-bottom: 0; }
.cred-divider { border-top: 2px solid var(--ink); margin-top: 4px; padding-top: 18px; }
.cred-row.is-live .cred-value::after {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--accent);
  margin-left: 8px;
  vertical-align: middle;
  animation: pulseDot 2s ease-out infinite;
}
.cred-label {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  font-weight: 600;
}
.cred-value {
  font-family: var(--mono);
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 900;
  color: var(--ink);
  letter-spacing: -0.04em;
  font-feature-settings: 'tnum';
}

@media (min-width: 960px) {
  .hero-inner {
    grid-template-columns: minmax(0, 7fr) minmax(280px, 4fr);
    align-items: end;
  }
  .intake-row { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: stretch; }
  .intake-row > #reg-input { width: 100%; }
  .intake-row > button { min-width: 180px; }
}

/* ---------- SECTION HEAD pattern ---------- */

.sec { padding: 0; margin-top: clamp(64px, 8vw, 112px); }
.sec-head {
  margin-bottom: 40px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  border-top: 2px solid var(--ink);
  padding-top: 16px;
}
.sec-head .kicker {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.sec-head .kicker::before {
  content: '+';
  display: inline-block;
  width: 14px; height: 14px;
  line-height: 14px;
  text-align: center;
  background: var(--accent);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  border-radius: 2px;
  flex-shrink: 0;
}
.sec-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: -0.04em;
  line-height: 1;
  font-weight: 900;
}
.sec-head-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 600;
}

@media (min-width: 720px) {
  .sec-head { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr) auto; align-items: end; }
  .sec-head h2 { grid-column: 2; }
  .sec-head .kicker { grid-column: 1; }
}

.kicker { display: inline-block; font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink); }

/* ---------- SERVICES (numbered editorial list) ---------- */

.services-list {
  list-style: none; margin: 0; padding: 0;
  border-top: 1px solid var(--hair);
  counter-reset: svc;
}
.services-list li {
  position: relative;
  padding: 28px 0 28px 56px;
  border-bottom: 1px solid var(--hair);
  counter-increment: svc;
}
.services-list li::before {
  content: counter(svc, decimal-leading-zero);
  position: absolute;
  left: 0; top: 30px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.05em;
}
.services-list h3 {
  font-size: clamp(20px, 2.4vw, 26px);
  margin: 0 0 6px;
  letter-spacing: -0.03em;
  font-weight: 900;
}
.services-list p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
  max-width: 65ch;
}

@media (min-width: 800px) {
  .services-list li {
    padding: 32px 0 32px 80px;
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
    gap: 32px;
    align-items: baseline;
  }
  .services-list li::before { top: 36px; }
  .services-list h3 { margin: 0; }
}

/* ---------- COVERAGE TABLE ---------- */

.coverage-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.coverage-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 15px;
}
.coverage-table thead th {
  text-align: left;
  padding: 16px 0 16px 0;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink);
  border-bottom: 2px solid var(--ink);
}
.coverage-table thead th + th { padding-left: 24px; }
.coverage-table tbody td {
  padding: 16px 0;
  border-bottom: 1px solid var(--hair);
  vertical-align: top;
}
.coverage-table tbody td + td { padding-left: 24px; }
.coverage-table .yes { color: var(--positive); font-weight: 700; font-family: var(--mono); }
.coverage-table .no  { color: var(--muted); font-weight: 700; font-family: var(--mono); }

/* ---------- FAQ ---------- */

.faq { padding: 0; background: transparent; border: 0; }
.faq details {
  border-top: 1px solid var(--hair);
}
.faq details:last-of-type { border-bottom: 1px solid var(--hair); }
.faq summary {
  font-weight: 800;
  font-size: clamp(18px, 1.8vw, 22px);
  letter-spacing: -0.02em;
  cursor: pointer;
  list-style: none;
  padding: 24px 0;
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px;
  color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  font-family: var(--mono);
  font-weight: 400; font-size: 28px; color: var(--ink);
  line-height: 0;
}
.faq details[open] summary::after { content: '−'; color: var(--accent); }
.faq details > p { margin: 0 0 24px; color: var(--muted); max-width: 720px; font-size: 16px; line-height: 1.6; }

/* ---------- RESULTS — REPORT BANNER ---------- */

.report-banner {
  background:
    linear-gradient(135deg, rgba(20, 22, 28, 0.92) 0%, rgba(10, 10, 10, 0.96) 100%);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
          backdrop-filter: blur(20px) saturate(1.4);
  color: #FFFFFF;
  position: relative;
  overflow: hidden;
}
.report-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 50%, rgba(230, 0, 19, 0.18) 0%, transparent 60%);
  pointer-events: none;
}
.report-banner-inner { position: relative; z-index: 1; }
.report-banner-inner {
  max-width: var(--col-max);
  margin: 0 auto;
  padding: 24px var(--gutter);
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: end;
}
.report-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}
@media (min-width: 520px) {
  .report-meta { grid-template-columns: repeat(3, auto); gap: 24px 32px; }
}
.report-meta-item { display: flex; flex-direction: column; gap: 4px; }
.report-meta-label { color: #999999; font-weight: 600; }
.report-meta-value { color: #FFFFFF; font-weight: 700; font-size: 14px; letter-spacing: 0.08em; }
.report-meta-pulse {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--accent-bright);
  font-family: var(--mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.2em; font-weight: 700;
  justify-self: end;
}
.ecg-line {
  width: 64px; height: 16px;
  display: inline-block;
}
.ecg-line path {
  fill: none;
  stroke: var(--accent-bright);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 120;
  stroke-dashoffset: 120;
  animation: ecgDraw 2.4s linear infinite;
}
@keyframes ecgDraw {
  0%   { stroke-dashoffset: 120; }
  60%  { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -120; }
}

@media (min-width: 768px) {
  .report-banner-inner { grid-template-columns: 1fr auto; }
}

/* In-page disclaimer */
.in-page-disclaimer {
  font-size: 12px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  padding: 14px 0;
  background: transparent;
  margin: 0 0 64px;
  line-height: 1.5;
}
.in-page-disclaimer::before {
  content: 'Notice ';
  font-weight: 800; color: var(--ink); margin-right: 4px;
}

/* States */
.state-loading, .state-error {
  border: 0;
  padding: 96px 0;
  text-align: left;
  background: transparent;
}
.state-error h2 { color: var(--red); margin-bottom: 12px; }
.state-loading p { font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.18em; font-size: 12px; }

@keyframes loadingDots {
  0%, 80%, 100% { opacity: 0.2; }
  40% { opacity: 1; }
}
.state-loading p::after {
  content: '';
  display: inline-block;
  width: 4px; height: 4px;
  margin-left: 8px;
  background: var(--ink);
  box-shadow: 10px 0 0 var(--ink), 20px 0 0 var(--ink);
  animation: loadingDots 1.2s infinite both;
}

/* ---------- PATIENT (asymmetric, no card) ---------- */

.patient {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin: 0 0 96px;
  padding-bottom: 64px;
  border-bottom: 2px solid var(--ink);
}
.patient-id {
  display: flex; flex-direction: column; gap: 16px;
}
.patient-plate {
  display: inline-block;
  font-family: var(--mono);
  font-weight: 900;
  letter-spacing: 0.16em;
  font-size: clamp(20px, 2.4vw, 28px);
  padding: 6px 14px;
  background: #FEF08A;
  color: var(--ink);
  align-self: flex-start;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
}
.patient-name {
  margin: 0;
  font-size: clamp(40px, 6vw, 88px);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 0.94;
  color: var(--ink);
}

.patient-facts {
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--hair);
}
.patient-facts > div {
  padding: 14px 0;
  display: flex; flex-direction: column; gap: 4px;
  border-bottom: 1px solid var(--hair);
}
@media (min-width: 520px) {
  .patient-facts { grid-template-columns: repeat(2, 1fr); }
  .patient-facts > div { padding-right: 16px; }
  .patient-facts > div:nth-child(2n) { padding-right: 0; padding-left: 16px; }
}
.patient-facts dt {
  font-family: var(--mono);
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--muted);
}
.patient-facts dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 16px; font-weight: 700;
  color: var(--ink); font-feature-settings: 'tnum';
}
.patient-facts .status-cell[data-tone="bad"] dd { color: var(--accent); }

.insurance-note {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--hair);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}
.insurance-note-text {
  flex: 1 1 240px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
.askmid-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(10, 10, 10, 0.85);
  border-radius: var(--radius);
  color: var(--ink);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.18s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.askmid-btn:hover {
  background: var(--ink);
  color: #FFFFFF;
  border-color: var(--ink);
  transform: translateY(-1px);
}
.askmid-btn:active { transform: translateY(0); }
.askmid-btn-arrow { font-size: 13px; line-height: 1; }
/* Share nudge — slides in 6s after results render, captures peak intent. */
.share-nudge {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 14px 14px 18px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  background: var(--ink);
  color: #FFFFFF;
  border-radius: var(--radius);
  box-shadow: 0 16px 40px -12px rgba(10, 10, 10, 0.55);
  animation: share-nudge-in 360ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes share-nudge-in {
  from { transform: translateY(120%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.share-nudge-leaving {
  animation: share-nudge-out 320ms ease-in forwards;
}
@keyframes share-nudge-out {
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(120%); opacity: 0; }
}
.share-nudge-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  line-height: 1.4;
  min-width: 0;
}
.share-nudge-body strong {
  font-size: 14px;
  font-weight: 700;
}
.share-nudge-body span {
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.02em;
}
.share-nudge-actions { display: flex; align-items: center; gap: 6px; }
.share-nudge-cta {
  background: #FFFFFF;
  color: var(--ink);
  border: 0;
  padding: 10px 16px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.share-nudge-cta:hover { background: var(--accent); color: #FFFFFF; }
.share-nudge-close {
  background: none;
  border: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 22px;
  line-height: 1;
  width: 32px;
  height: 32px;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s ease;
}
.share-nudge-close:hover { background: rgba(255, 255, 255, 0.12); color: #FFFFFF; }

/* Recipient banner — shown when visitor arrived via a shared link. Closes the viral loop. */
.recipient-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 18px;
  margin: 0 0 24px;
  background: var(--accent-soft, #FEEFEF);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  color: var(--ink);
}
.recipient-banner-body { flex: 1 1 auto; min-width: 200px; line-height: 1.4; }
.recipient-banner-body strong { display: block; font-size: 14px; font-weight: 700; }
.recipient-banner-body span { font-family: var(--mono); font-size: 12px; color: var(--ink); }
.recipient-banner-cta {
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  background: var(--ink);
  color: #FFFFFF;
  border-radius: 8px;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  transition: background 0.15s ease;
}
.recipient-banner-cta:hover { background: var(--accent); color: #FFFFFF; }
.recipient-banner-close {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  width: 28px;
  height: 28px;
  cursor: pointer;
  border-radius: 6px;
}
.recipient-banner-close:hover { color: var(--accent); }

/* On narrow screens, give WhatsApp share button priority — it's the dominant
   UK car-buying messenger. Native + Copy + WhatsApp on top row, others below. */
@media (max-width: 599px) {
  .share-controls { grid-template-columns: repeat(2, 1fr); }
  .share-btn[data-platform="whatsapp"] {
    grid-column: span 2;
    background: rgba(37, 211, 102, 0.12);
    border-color: #25D366;
  }
  .share-btn[data-platform="whatsapp"]:hover {
    background: #25D366;
    color: #FFFFFF;
    border-color: #25D366;
  }
  .share-btn[data-platform="linkedin"] { display: none; }
}

/* "Install app" link injected into the footer-nav by app.js. Inherits
   footer-nav anchor styling automatically; this rule just exists as a
   hook in case we want to differentiate it later. */
.footer-install-link { /* shares footer-nav a styling */ }

/* PWA install pill — fixed bottom-right, mono ghost button matching design system. */
.install-pill {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1000;
  display: flex;
  align-items: stretch;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
          backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px -8px rgba(10, 10, 10, 0.35);
  overflow: hidden;
  max-width: calc(100vw - 32px);
  animation: install-pill-in 280ms ease-out;
}
@keyframes install-pill-in {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.install-pill-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: none;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  transition: background 0.18s ease, color 0.18s ease;
}
.install-pill-cta:hover { background: var(--ink); color: #FFFFFF; }
.install-pill-icon { font-size: 16px; line-height: 1; }
.install-pill-close {
  background: none;
  border: 0;
  border-left: 1px solid var(--hair);
  padding: 0 12px;
  font-size: 18px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.18s ease;
}
.install-pill-close:hover { color: var(--accent); }

/* iOS instruction overlay — modal explaining the manual Add-to-Home-Screen flow. */
.install-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(10, 10, 10, 0.55);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  animation: install-overlay-in 200ms ease-out;
}
@keyframes install-overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.install-card {
  position: relative;
  max-width: 420px;
  width: 100%;
  background: var(--paper, #FAFAF7);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 28px 24px 22px;
  box-shadow: 0 24px 60px -12px rgba(10, 10, 10, 0.5);
}
.install-card-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: 0;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}
.install-card-close:hover { color: var(--accent); }
.install-card-title {
  margin: 0 0 18px;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
}
.install-card-steps {
  margin: 0 0 18px;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--ink);
}
.install-card-steps li {
  font-size: 14px;
  line-height: 1.5;
}
.install-card-hint {
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.install-card-note {
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--hair);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}

.askmid-feedback {
  flex: 1 1 100%;
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  min-height: 14px;
}
.patient-facts .status-cell[data-tone="bad"] dd::after {
  content: '';
  display: inline-block;
  width: 7px; height: 7px;
  background: var(--accent);
  margin-left: 8px;
  vertical-align: middle;
  animation: pulseDot 2s ease-out infinite;
}
.patient-facts .status-cell[data-tone="good"] dd { color: var(--ink); }

.countdown {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid var(--hair);
  border-radius: 3px;
  color: var(--muted);
  vertical-align: middle;
}
.countdown[data-tone="good"]  { color: #047857; border-color: #047857; }
.countdown[data-tone="amber"] { color: var(--amber); border-color: var(--amber); }
.countdown[data-tone="bad"]   { color: var(--accent); border-color: var(--accent); }

@media (min-width: 800px) {
  .patient { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; align-items: end; }
  .patient-facts { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- VITAL SIGNS — bare numerals ---------- */

.vitals {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 0 0 96px;
  border: 0;
  background: transparent;
}
.vital {
  position: relative;
  padding: 22px 22px 20px;
  display: flex; flex-direction: column; gap: 8px;
  background: rgba(255, 255, 255, 0.62);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
          backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(10, 10, 10, 0.04),
    0 10px 30px -14px rgba(10, 10, 10, 0.18);
  transition: transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1),
              box-shadow 0.28s ease,
              background 0.28s ease;
}
.vital::before {
  content: '';
  position: absolute;
  inset: 1px 1px auto 1px;
  height: 55%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 100%);
  border-radius: 13px 13px 0 0;
  pointer-events: none;
}
.vital::after {
  content: '';
  position: absolute;
  left: 12%; right: 12%; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(10, 10, 10, 0.10) 50%, transparent 100%);
  pointer-events: none;
}
.vital:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.80);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(10, 10, 10, 0.04),
    0 18px 44px -14px rgba(10, 10, 10, 0.28);
}
.vital > * { position: relative; z-index: 1; }

.vital-label {
  font-family: var(--mono);
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.18em;
  font-weight: 700; color: var(--muted);
}
.vital-value {
  font-family: var(--mono);
  font-size: clamp(34px, 4.4vw, 50px);
  font-weight: 900; color: var(--ink);
  letter-spacing: -0.05em;
  line-height: 0.95;
  font-feature-settings: 'tnum';
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vital-unit {
  font-family: var(--mono);
  font-size: 0.45em;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-left: 6px;
  vertical-align: 0.18em;
}
.vital-sub { font-size: 11px; color: var(--muted); font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.12em; }
.vital-tone-good   .vital-value { color: var(--ink); }
.vital-tone-bad    .vital-value { color: var(--red); }
.vital-tone-amber  .vital-value { color: var(--amber); }

@media (min-width: 720px) {
  .vitals { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- LATEST VISIT (most recent MOT, fully exposed) ---------- */

.latest-visit {
  margin: 0 0 96px;
}
.latest-visit > .sec-head { margin-bottom: 24px; }

.lv-summary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 24px;
}
@media (min-width: 720px) {
  .lv-summary { grid-template-columns: repeat(3, 1fr); }
}

.lv-stat {
  position: relative;
  padding: 22px;
  background: rgba(255, 255, 255, 0.62);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
          backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 14px;
  overflow: hidden;
  display: flex; flex-direction: column; gap: 8px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 10px 30px -14px rgba(10, 10, 10, 0.18);
}
.lv-stat::before {
  content: '';
  position: absolute;
  inset: 1px 1px auto 1px;
  height: 55%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 100%);
  border-radius: 13px 13px 0 0;
  pointer-events: none;
}
.lv-stat > * { position: relative; z-index: 1; }

.lv-label {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: var(--muted);
}
.lv-value {
  font-family: var(--mono);
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--ink);
  font-feature-settings: 'tnum';
}
[data-field="latestVisitResult"][data-tone="good"] { color: var(--positive); }
[data-field="latestVisitResult"][data-tone="bad"]  { color: var(--accent); }

.lv-items-block { padding: 0; }
.lv-items-header {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: var(--ink);
  padding: 12px 0;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--hair);
}
.lv-items {
  list-style: none;
  margin: 0;
  padding: 0;
}
.lv-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--hair);
  align-items: baseline;
}
.lv-tag {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  padding: 3px 8px;
  border: 1px solid currentColor;
  border-radius: 3px;
  justify-self: start;
  align-self: start;
}
.lv-item[data-type="ADVISORY"] .lv-tag { color: var(--amber); }
.lv-item[data-type="FAIL"] .lv-tag     { color: var(--red); }
.lv-item[data-dangerous="true"] .lv-tag { color: var(--accent); }
.lv-text {
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  font-family: var(--font);
}
.lv-item[data-dangerous="true"] .lv-text { font-weight: 700; }

.lv-empty {
  margin: 16px 0 0;
  padding: 14px 0;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--positive);
}

/* ---------- EXAMINATION SUMMARY (clean grid, no cards) ---------- */

.exam-summary {
  margin: 0 0 96px;
}
.exam-summary > .sec-head { margin-bottom: 24px; }
.exam-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.exam-summary-cell {
  position: relative;
  padding: 22px;
  display: flex; flex-direction: column; gap: 8px;
  text-decoration: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.62);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
          backdrop-filter: blur(20px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(10, 10, 10, 0.04),
    0 10px 30px -14px rgba(10, 10, 10, 0.18);
  transition: transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1),
              box-shadow 0.28s ease,
              background 0.28s ease,
              color 0.2s ease;
}
.exam-summary-cell::before {
  content: '';
  position: absolute;
  inset: 1px 1px auto 1px;
  height: 55%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 100%);
  border-radius: 13px 13px 0 0;
  pointer-events: none;
}
.exam-summary-cell::after {
  content: '';
  position: absolute;
  left: 12%; right: 12%; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(10, 10, 10, 0.10) 50%, transparent 100%);
  pointer-events: none;
}
.exam-summary-cell > * { position: relative; z-index: 1; }
.exam-summary-cell:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.80);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(10, 10, 10, 0.04),
    0 18px 44px -14px rgba(10, 10, 10, 0.28);
}
.exam-summary-cell[data-tone="red"]:hover   { color: var(--red); }
.exam-summary-cell[data-tone="amber"]:hover { color: var(--amber); }
.exam-summary-cell[data-tone="green"]:hover { color: var(--ink); }
.exam-summary-cell[data-tone="info"]:hover  { color: var(--ink); }
.es-tag {
  font-family: var(--mono);
  font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--muted);
}
.exam-summary-cell[data-tone="red"]   .es-tag { color: var(--red); }
.exam-summary-cell[data-tone="amber"] .es-tag { color: var(--amber); }
.exam-summary-cell[data-tone="green"] .es-tag { color: var(--positive); }
.es-count {
  font-family: var(--mono);
  font-size: clamp(48px, 7vw, 88px);
  font-weight: 900; letter-spacing: -0.05em;
  line-height: 0.9; color: var(--ink);
  font-feature-settings: 'tnum';
}
.es-label { font-size: 12px; color: var(--muted); font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.1em; }

@media (min-width: 720px) {
  .exam-summary-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- MILEAGE CHART ---------- */

.mileage-chart { margin: 0 0 96px; padding: 0; background: transparent; border: 0; }
.mileage-chart .sec-head { margin-bottom: 24px; }
.spark-container {
  width: 100%; position: relative;
  padding: 24px 0 12px;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
}
.spark-container svg { width: 100%; height: auto; display: block; }
.spark-labels {
  display: flex; justify-content: space-between;
  padding: 12px 0 0;
  font-family: var(--mono);
  font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.14em;
}
.spark-empty { color: var(--muted); font-size: 14px; margin: 16px 0 0; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.12em; }

.spark-line {
  stroke-dasharray: var(--len);
  stroke-dashoffset: var(--len);
  animation: sparkDraw 1.6s cubic-bezier(0.22, 0.61, 0.36, 1) 0.2s forwards;
}
@keyframes sparkDraw { to { stroke-dashoffset: 0; } }
.spark-fill { opacity: 0; animation: sparkFade 0.8s ease-out 1.2s forwards; }
@keyframes sparkFade { to { opacity: 1; } }
.spark-dot-group {
  opacity: 0;
  animation: sparkPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: calc(1s + var(--i) * 0.08s);
}
@keyframes sparkPop {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.spark-dot { transition: r 0.15s ease; cursor: pointer; }
.spark-dot:hover { r: 8; }
.spark-grid text, .spark-years text { pointer-events: none; user-select: none; }

/* Per-dot date labels */
.spark-date-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  fill: var(--muted);
  letter-spacing: 0.04em;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transform-origin: center;
  transform-box: fill-box;
  animation: sparkLabelDrop 0.45s cubic-bezier(0.22, 0.61, 0.36, 1) both;
  animation-delay: calc(1.2s + var(--i) * 0.08s);
}
@keyframes sparkLabelDrop {
  0%   { opacity: 0; transform: translateY(-6px); }
  60%  { opacity: 1; transform: translateY(1px); }
  100% { opacity: 1; transform: translateY(0); }
}
.spark-dot-group:hover .spark-date-label {
  fill: var(--ink);
  font-size: 12px;
  transition: fill 0.15s ease, font-size 0.15s ease;
}

/* ---------- SYMPTOMS (numbered editorial list) ---------- */

.findings { margin: 0 0 96px; padding: 0; background: transparent; border: 0; }
.findings > .sec-head { margin-bottom: 24px; }

.findings-disclaimer {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 24px;
  line-height: 1.55;
  border-top: 1px solid var(--hair);
  padding: 12px 0 0;
  font-family: var(--mono);
  text-transform: uppercase; letter-spacing: 0.1em;
}

.findings-list {
  list-style: none; padding: 0; margin: 0;
  counter-reset: finding;
  border-top: 1px solid var(--hair);
}
.findings-list li {
  counter-increment: finding;
  padding: 32px 0 32px 80px;
  border-bottom: 1px solid var(--hair);
  position: relative;
}
.findings-list li::before {
  content: counter(finding, decimal-leading-zero);
  position: absolute;
  left: 0; top: 32px;
  font-family: var(--mono);
  font-size: 13px; font-weight: 700;
  color: var(--accent); letter-spacing: 0.06em;
}
.pattern-severity-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.2em;
  padding: 3px 10px;
  border: 1px solid currentColor;
  margin-bottom: 12px;
}
.findings-list li[data-severity="red"] .pattern-severity-tag   { color: var(--red); }
.findings-list li[data-severity="amber"] .pattern-severity-tag { color: var(--amber); }
.findings-list li[data-severity="green"] .pattern-severity-tag { color: var(--positive); }

.pattern-headline {
  font-weight: 900;
  font-size: clamp(22px, 2.6vw, 30px);
  margin: 0 0 8px;
  letter-spacing: -0.025em; line-height: 1.05;
  color: var(--ink);
}
.pattern-message { margin: 0; font-size: 16px; line-height: 1.6; color: var(--text); max-width: 70ch; }

.findings-none {
  text-align: left;
  padding: 32px 0;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
}
.findings-none-title {
  font-weight: 900;
  font-size: clamp(28px, 3vw, 40px);
  color: var(--positive);
  margin: 0 0 12px;
  letter-spacing: -0.03em;
}
.findings-none-body {
  font-size: 15px; color: var(--muted);
  line-height: 1.6; margin: 0; max-width: 65ch;
}

/* ---------- EXAMINATION HISTORY (table) ---------- */

.history { margin: 0 0 96px; padding: 0; background: transparent; border: 0; }
.history > .sec-head { margin-bottom: 24px; }

#timeline-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  border-top: 2px solid var(--ink);
}
@media (min-width: 768px) { .history-table { min-width: 540px; } }
.history-table thead th {
  text-align: left;
  padding: 14px 0;
  font-family: var(--mono);
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--muted);
  border-bottom: 1px solid var(--ink);
}
.history-table thead th.numeric { text-align: right; }
.history-table thead th + th { padding-left: 24px; }
.history-table tbody tr { border-bottom: 1px solid var(--hair); }
.history-table tbody tr:last-child { border-bottom: 0; }
.history-table tbody td { padding: 16px 0; vertical-align: top; }
.history-table tbody td + td { padding-left: 24px; }
.history-table .col-date { font-family: var(--mono); font-weight: 700; white-space: nowrap; }
.history-table .col-result {
  font-family: var(--mono);
  font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.16em;
}
.history-table .col-result[data-result="PASSED"] { color: var(--muted); }
.history-table .col-result[data-result="FAILED"] { color: var(--red); }
.history-table .col-mileage { font-family: var(--mono); text-align: right; font-feature-settings: 'tnum'; white-space: nowrap; }
.history-table .col-items { font-family: var(--mono); text-align: right; color: var(--muted); }
.history-table .col-toggle { text-align: right; width: 1%; }
.history-table .col-toggle button {
  background: transparent;
  border: 1px solid var(--ink);
  color: var(--ink);
  padding: 5px 14px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.16em;
  border-radius: var(--radius);
  transition: background 0.15s ease, color 0.15s ease;
}
.history-table .col-toggle button:hover { background: var(--ink); color: #FFFFFF; }

/* Mobile + tablet-portrait: keep the table layout, just compact it.
   Hide the "Items" count column (the OPEN button still implies count),
   tighten padding/fonts, abbreviate the date so everything fits one row. */
@media (max-width: 767px) {
  .history-table thead th, .history-table tbody td {
    padding: 12px 6px; font-size: 12px;
  }
  .history-table thead th + th, .history-table tbody td + td { padding-left: 8px; }
  .history-table thead th {
    font-size: 9px; letter-spacing: 0.12em;
  }
  .history-table .col-items,
  .history-table th:nth-child(4) { display: none; }
  .history-table .col-date {
    font-size: 12px; font-weight: 700; white-space: nowrap;
  }
  .history-table .col-result {
    font-size: 10px; letter-spacing: 0.1em;
  }
  .history-table .col-mileage {
    font-size: 12px; white-space: nowrap;
  }
  .history-table .col-toggle button {
    padding: 4px 10px; font-size: 9px; letter-spacing: 0.1em;
  }
  .history-detail-row td { padding: 0 6px 12px 6px; }
  .history-detail { padding: 10px 12px; }
  .history-detail li { font-size: 12px; }
}

.history-detail-row td {
  padding: 0 0 24px 0;
  background: transparent;
}
.history-detail-row[hidden] { display: none; }
.history-detail {
  padding: 16px 24px;
  border-left: 2px solid var(--accent);
  margin-left: 0;
  list-style: none;
  background: #F7F7F7;
}
.history-detail li {
  padding: 6px 0;
  font-size: 13px;
  color: var(--text);
  display: flex; gap: 10px; align-items: flex-start;
  font-family: var(--mono);
}
.history-detail li::before {
  content: '—';
  color: var(--muted);
  flex-shrink: 0;
}
.history-detail li[data-type="FAIL"] { color: var(--red); }
.history-detail li[data-type="ADVISORY"] { color: #92400E; }
.history-detail li[data-dangerous="true"] { color: var(--red); font-weight: 700; }

.history-empty { padding: 32px 0; color: var(--muted); font-size: 14px; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.12em; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }

/* ---------- OUTSIDE OUR SCOPE ---------- */

.dont-show-card { padding: 0; background: transparent; border: 0; margin: 0 0 96px; }
.dont-show-card > .sec-head { margin-bottom: 24px; }
.dont-show-card > p { color: var(--muted); max-width: 65ch; }
.dont-show-card ul {
  list-style: none; padding: 0; margin: 24px 0;
  border-top: 1px solid var(--hair);
  display: grid;
  grid-template-columns: 1fr;
}
.dont-show-card li {
  padding: 16px 0;
  border-bottom: 1px solid var(--hair);
  font-family: var(--mono);
  font-size: 14px;
  display: flex; align-items: center; gap: 16px;
  text-transform: uppercase; letter-spacing: 0.1em;
}
.dont-show-card li::before {
  content: '×';
  font-weight: 900;
  color: var(--muted);
  width: 16px; text-align: center;
}
@media (min-width: 720px) { .dont-show-card ul { grid-template-columns: repeat(2, 1fr); column-gap: 32px; } }

.affiliate-note { font-size: 11px; color: var(--muted); font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.12em; }

/* ---------- SHARE (social) ---------- */

.share-card { margin: 0; padding: 0; background: transparent; color: var(--ink); border: 0; }
.share-card > .sec-head { margin-bottom: 24px; }
.share-hint {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 24px;
  max-width: 60ch;
  line-height: 1.55;
}
.share-card-preview { display: none; }

/* --- share doc internal layout (also used at download sizes) --- */

.sd-rule { height: 5px; background: var(--accent); flex-shrink: 0; }
.sd-head {
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--ink);
  flex-shrink: 0;
}
.sd-brand { display: flex; align-items: baseline; gap: 6px; }
.sd-mark {
  width: 22px; height: 22px;
  background: var(--ink); color: #FFFFFF;
  font-family: var(--mono);
  font-size: 12px; font-weight: 900;
  display: inline-flex; align-items: center; justify-content: center;
  align-self: center;
  margin-right: 6px;
}
.sd-brand-name { font-weight: 900; font-size: 16px; letter-spacing: -0.025em; color: var(--ink); }
.sd-brand-sub { color: var(--muted); font-family: var(--mono); font-size: 12px; letter-spacing: 0; }
.sd-no {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  text-align: right;
}

.sd-body {
  padding: 20px;
  display: flex; flex-direction: column; gap: 14px;
  flex: 1;
  min-height: 0;
}

.sd-plate {
  display: inline-block;
  font-family: var(--mono);
  font-weight: 900;
  letter-spacing: 0.14em;
  font-size: 18px;
  padding: 5px 12px;
  background: #FEF08A;
  color: var(--ink);
  align-self: flex-start;
  border: 1px solid var(--ink);
}
.sd-title {
  font-family: var(--font);
  font-size: 28px; font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 0.98;
  margin: 0;
  color: var(--ink);
  max-width: 18ch;
}
.sd-tags {
  display: flex; gap: 6px; flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink);
  font-weight: 700;
}
.sd-tags span { padding: 3px 8px; border: 1px solid var(--ink); }

.sd-vitals {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  margin-top: auto;
}
.sd-vitals > div {
  padding: 10px 8px;
  border-right: 1px solid var(--hair);
  display: flex; flex-direction: column; gap: 3px;
}
.sd-vitals > div:last-child { border-right: 0; }
.sd-num {
  font-family: var(--mono);
  font-size: 26px; font-weight: 900;
  letter-spacing: -0.05em; line-height: 1;
  color: var(--ink); font-feature-settings: 'tnum';
}
.sd-lbl {
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 700;
}

.sd-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 6px 0;
}
.sd-label {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  font-weight: 700;
}
.sd-val {
  font-family: var(--mono);
  font-size: 16px; font-weight: 800;
  color: var(--ink);
}

.sd-block { padding: 10px 0 0; border-top: 1px solid var(--ink); }
.sd-symptoms {
  list-style: none; margin: 6px 0 6px; padding: 0;
  display: flex; flex-direction: column; gap: 4px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink);
}
.sd-symptoms li {
  display: flex; align-items: center; gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}
.sd-symptoms li b {
  font-weight: 800;
  font-family: var(--mono);
  font-feature-settings: 'tnum';
  color: var(--ink);
}
.sd-dot { width: 8px; height: 8px; display: inline-block; }
.sd-dot-red   { background: var(--accent); }
.sd-dot-amber { background: var(--amber); }
.sd-dot-green { background: var(--ink); }

.sd-top {
  display: flex; flex-direction: column; gap: 2px;
  padding-top: 6px;
  border-top: 1px dashed var(--hair);
}
.sd-top-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.sd-top-text {
  font-weight: 800;
  font-size: 13px;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.2;
}

.sd-clean { padding: 10px 0 0; border-top: 1px solid var(--ink); }
.sd-clean-title {
  font-weight: 900;
  font-size: 18px;
  color: var(--accent);
  letter-spacing: -0.02em;
  margin: 4px 0 4px;
}
.sd-clean-sub {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 600;
}

.sd-foot {
  padding: 10px 20px;
  border-top: 1px solid var(--ink);
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  font-weight: 600;
  flex-shrink: 0;
  background: #FAFAF7;
}
.share-controls {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
@media (min-width: 600px) { .share-controls { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 900px) { .share-controls { grid-template-columns: repeat(7, 1fr); } }

.share-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 12px;
  background: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
          backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid rgba(10, 10, 10, 0.85);
  border-radius: var(--radius);
  color: var(--ink);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  transition: background 0.2s ease, color 0.2s ease, transform 0.18s ease, border-color 0.2s ease, box-shadow 0.25s ease;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.share-btn:hover {
  background: var(--ink);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 12px 24px -8px rgba(10, 10, 10, 0.3);
}
.share-btn:active { transform: translateY(0); box-shadow: none; }
.share-icon {
  width: 22px; height: 22px;
  flex-shrink: 0;
}

.share-btn-primary {
  background: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent);
}
.share-btn-primary:hover { background: var(--ink); border-color: var(--ink); }

/* Brand-tinted hovers */
.share-btn[data-platform="x"]:hover        { background: #000000; color: #FFFFFF; border-color: #000000; }
.share-btn[data-platform="facebook"]:hover { background: #1877F2; color: #FFFFFF; border-color: #1877F2; }
.share-btn[data-platform="whatsapp"]:hover { background: #25D366; color: #FFFFFF; border-color: #25D366; }
.share-btn[data-platform="linkedin"]:hover { background: #0A66C2; color: #FFFFFF; border-color: #0A66C2; }
.share-btn[data-platform="email"]:hover    { background: var(--ink); color: #FFFFFF; border-color: var(--ink); }
.share-btn[data-platform="copy"]:hover     { background: var(--ink); color: #FFFFFF; border-color: var(--ink); }

/* ---------- LEGAL pages ---------- */

.legal-page {
  background: transparent; border: 0; padding: 0;
  max-width: 740px; margin: 0 auto;
}
.legal-page h1 { margin-bottom: 12px; font-size: clamp(40px, 6vw, 72px); letter-spacing: -0.04em; }
.legal-page h2 { margin-top: 48px; font-size: clamp(20px, 2vw, 26px); letter-spacing: -0.02em; padding-top: 16px; border-top: 1px solid var(--hair); }
.legal-page .muted {
  color: var(--muted);
  font-size: 11px;
  margin-top: 0;
  font-family: var(--mono);
  text-transform: uppercase; letter-spacing: 0.16em;
}
.legal-page code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: #F4F4F4;
  padding: 2px 6px;
  border: 1px solid var(--hair);
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
