/* =========================================================================
   myhavenreport.com — one stylesheet, no build step.

   Design intent: a modern technical product, not a brochure. Dark by
   default, cool neutrals, one luminous accent, hairline borders, monospace
   for anything that is data rather than prose, and tabular numerals so
   figures line up in a column. Every surface is a layer above the one
   behind it, defined by a 1px border rather than a shadow.

   Light mode is supported and stays cool — it is the same instrument in
   daylight, not a different brand.
   ========================================================================= */

:root {
  color-scheme: dark;

  /* Surfaces, darkest first. Each step up is a layer closer to the reader. */
  --paper:       #08090c;
  --paper-2:     #0f1218;
  --paper-3:     #161a22;
  --paper-4:     #1d222c;
  --rule:        #232833;
  --rule-strong: #333a48;

  --ink:   #e9eef5;
  --ink-2: #b4becd;
  --ink-3: #8593a5;
  --ink-4: #5e6b7c;

  /* One accent. Luminous enough to lead the eye, not so saturated that it
     starts to look like a toy. */
  --accent:      #2dd4bf;
  --accent-bright:#5eead4;
  --accent-dim:  #14a898;
  --accent-soft: #0e2320;
  --accent-line: #1f4a45;
  --on-accent:   #04100e;

  /* Checkbox tick, as a mask rather than an image, so it takes its colour
     from --on-accent above and is not a second place to change a colour. */
  --tick: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M3 8.5l3.2 3.2L13 5" fill="none" stroke="black" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"/></svg>');

  /* Evidence classes. Each is paired with a text label, never hue alone. */
  --verified:        #2dd4bf;
  --verified-soft:   #0e2320;
  --verified-line:   #1f4a45;
  --potential:       #f5b544;
  --potential-soft:  #241c0d;
  --potential-line:  #4a3a1a;
  --investigate:     #93a3b8;
  --investigate-soft:#171b22;
  --investigate-line:#2c3340;

  --danger:      #f87171;
  --danger-soft: #241414;

  --radius-lg: 16px;
  --radius:    11px;
  --radius-sm: 8px;

  --measure: 36rem;
  --page: 78rem;
  --page-narrow: 58rem;

  --sans: "Inter var", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", "Roboto Mono", Menlo, Consolas, monospace;

  --step-0: clamp(1rem, .97rem + .14vw, 1.0625rem);
  --step-1: clamp(1.125rem, 1.08rem + .22vw, 1.25rem);
  --step-2: clamp(1.35rem, 1.26rem + .45vw, 1.6rem);
  --step-3: clamp(1.6rem, 1.44rem + .8vw, 2.1rem);
  --step-4: clamp(2rem, 1.68rem + 1.55vw, 2.9rem);
  --step-5: clamp(2.45rem, 1.85rem + 2.9vw, 4rem);

  /* On dark, elevation reads as a lighter border and a faint inner light,
     not as a drop shadow — shadows are invisible against near-black. */
  --lift:    inset 0 1px 0 rgba(255, 255, 255, .04);
  --lift-lg: inset 0 1px 0 rgba(255, 255, 255, .06), 0 24px 60px rgba(0, 0, 0, .5);
  --glow:    0 0 0 1px var(--accent-line), 0 0 34px -12px var(--accent);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;

    --paper:       #fbfcfd;
    --paper-2:     #ffffff;
    --paper-3:     #f3f5f8;
    --paper-4:     #e9edf2;
    --rule:        #e2e7ee;
    --rule-strong: #c9d1db;

    --ink:   #0d1117;
    --ink-2: #39424f;
    --ink-3: #5d6a7a;
    --ink-4: #8593a5;

    --accent:      #0d9488;
    --accent-bright:#0f766e;
    --accent-dim:  #0d9488;
    --accent-soft: #eafaf6;
    --accent-line: #a7ded4;
    --on-accent:   #ffffff;

    --verified:        #0d9488;
    --verified-soft:   #eafaf6;
    --verified-line:   #a7ded4;
    --potential:       #96590c;
    --potential-soft:  #fdf4e6;
    --potential-line:  #e8d3ac;
    --investigate:     #4a5568;
    --investigate-soft:#eef1f5;
    --investigate-line:#d3dae3;

    --danger:      #b42318;
    --danger-soft: #fdeceb;

    --lift:    none;
    --lift-lg: 0 1px 2px rgba(13, 17, 23, .04), 0 22px 48px rgba(13, 17, 23, .09);
    --glow:    0 0 0 1px var(--accent-line);
  }
}

/* ------------------------------------------------------------------ reset */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.62;
  font-feature-settings: "cv05" 1, "ss01" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.12; letter-spacing: -.022em; font-weight: 600; text-wrap: balance; }
h1 { font-size: var(--step-5); letter-spacing: -.035em; }
h2 { font-size: var(--step-4); letter-spacing: -.03em; }
h3 { font-size: var(--step-2); letter-spacing: -.02em; }
h4 { font-size: var(--step-1); letter-spacing: -.015em; }
p  { margin: 0 0 1.1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
a { color: var(--accent-bright); text-underline-offset: .2em; text-decoration-thickness: from-font; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.2em; }
li { margin-bottom: .45em; }
li:last-child { margin-bottom: 0; }
strong { font-weight: 620; color: var(--ink); }
code { font-family: var(--mono); font-size: .9em; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 3rem 0; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--on-accent); padding: .75rem 1.25rem; font-weight: 600;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ----------------------------------------------------------------- layout */

.wrap { width: min(100% - 2rem, var(--page)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2rem, var(--page-narrow)); margin-inline: auto; }
@media (min-width: 48rem) {
  .wrap { width: min(100% - 4rem, var(--page)); }
  .wrap-narrow { width: min(100% - 4rem, var(--page-narrow)); }
}

section { padding-block: clamp(3.5rem, 2rem + 6vw, 7rem); position: relative; }
section.tight { padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.5rem); }
.prose { max-width: var(--measure); }
.lede { font-size: var(--step-1); color: var(--ink-2); line-height: 1.58; max-width: 42rem; }

/* Mono eyebrows are the single strongest "this is a technical product" cue. */
.eyebrow {
  font-family: var(--mono);
  font-size: .73rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 1.1rem;
}
.eyebrow.muted { color: var(--ink-4); }

.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 1rem + 3vw, 3.5rem); }
.section-head p { color: var(--ink-3); font-size: var(--step-1); margin-top: 1rem; }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .82rem 1.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font: inherit; font-weight: 560; font-size: .98rem; letter-spacing: -.008em;
  text-decoration: none; cursor: pointer;
  /* Short labels stay on one line; a long one wraps rather than forcing its
     container wider. `balance` keeps a two-line CTA from breaking with one
     orphaned word. */
  white-space: normal; text-wrap: balance; overflow-wrap: break-word;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .18s ease, transform .1s ease;
  min-height: 46px;
  text-align: center;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn-primary:hover { background: var(--accent-bright); color: var(--on-accent); box-shadow: 0 0 28px -8px var(--accent); }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: var(--ink-2); color: var(--paper); }
.btn-ghost { background: var(--paper-2); color: var(--ink); border-color: var(--rule-strong); box-shadow: var(--lift); }
.btn-ghost:hover { background: var(--paper-3); color: var(--ink); border-color: var(--accent-line); }
.btn-light { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn-light:hover { background: var(--paper-3); color: var(--ink); border-color: var(--accent-line); }
.btn-lg { padding: 1rem 1.75rem; font-size: 1.03rem; min-height: 52px; }
.btn-sm { padding: .5rem .95rem; font-size: .88rem; min-height: 38px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

/* ------------------------------------------------------------------- nav */

.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--rule);
}
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  font-weight: 600; font-size: 1.02rem; letter-spacing: -.024em; color: var(--ink); text-decoration: none;
}
.brand-mark {
  width: 15px; height: 15px; flex: none; border-radius: 4px;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent-dim));
  box-shadow: 0 0 16px -4px var(--accent);
}
/* Navigation.
   Below 62rem the links do not fit beside the brand, so the nav becomes a
   sheet under the header and a toggle appears. Above it, the toggle goes away
   and the nav is an ordinary inline row again — same markup, no duplication.
   The footer carries the same links, so a visitor whose scripting is off can
   still get everywhere. */
.site-nav a { color: var(--ink-3); text-decoration: none; font-size: .92rem; font-weight: 480; transition: color .15s ease; }
.site-nav a:hover { color: var(--ink); }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-right: -.6rem;
  padding: 0; background: none; border: 0; border-radius: var(--radius-sm);
  color: var(--ink-2); cursor: pointer;
}
.nav-toggle:hover { color: var(--ink); }
.nav-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Three rules that become a cross. The middle bar is the element; the other
   two are its pseudo-elements, so the button holds one child, not three. */
.nav-toggle .bars { position: relative; }
.nav-toggle .bars,
.nav-toggle .bars::before,
.nav-toggle .bars::after {
  content: ""; display: block; width: 20px; height: 1.5px; border-radius: 2px;
  background: currentColor;
  transition: transform .2s ease, background-color .15s ease;
}
.nav-toggle .bars::before { position: absolute; top: -6px; }
.nav-toggle .bars::after { position: absolute; top: 6px; }
.site-head[data-nav-open] .nav-toggle .bars { background: transparent; }
.site-head[data-nav-open] .nav-toggle .bars::before { transform: translateY(6px) rotate(45deg); }
.site-head[data-nav-open] .nav-toggle .bars::after { transform: translateY(-6px) rotate(-45deg); }

/* The sheet. Not `display: none` when closed: it keeps its own transition and
   `visibility` still removes it from the tab order and the accessibility
   tree, so a closed menu cannot be tabbed into. */
.site-nav {
  position: absolute; left: 0; right: 0; top: 100%;
  display: grid; gap: .1rem;
  padding: .5rem 1rem 1.25rem;
  background: var(--paper); border-bottom: 1px solid var(--rule);
  box-shadow: var(--lift-lg);
  opacity: 0; visibility: hidden; transform: translateY(-.5rem);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.site-head[data-nav-open] .site-nav { opacity: 1; visibility: visible; transform: none; }
.site-nav a { padding: .8rem .25rem; font-size: .98rem; border-bottom: 1px solid var(--rule); }
.site-nav a:last-child { border-bottom: 0; }
/* Selector written as `.site-nav a.nav-cta`, not `.nav-cta`, on purpose:
   `.site-nav a` above is more specific than a lone class, so a bare
   `.nav-cta` loses and the button renders grey-on-teal. */
.site-nav a.nav-cta {
  margin-top: .9rem;
  justify-content: center;
  padding: .82rem 1.4rem;
  font-size: .98rem;
  color: var(--on-accent);
  border-bottom: 0;
}
.site-nav a.nav-cta:hover { color: var(--on-accent); background: var(--accent-bright); }

@media (min-width: 48rem) {
  .site-nav { padding-inline: 2rem; }
  /* Above this the header itself carries a call to action, so the one in the
     sheet would be the same button twice. */
  .site-nav a.nav-cta { display: none; }
}

@media (min-width: 62rem) {
  .nav-toggle { display: none; }
  .site-nav {
    position: static; display: flex; gap: 1.75rem; align-items: center;
    padding: 0; background: none; border-bottom: 0; box-shadow: none;
    opacity: 1; visibility: visible; transform: none;
  }
  .site-nav a { padding: 0; font-size: .92rem; border-bottom: 0; }
}

.head-cta { display: none; }
@media (min-width: 48rem) { .head-cta { display: inline-flex; } }

/* Someone who navigates by keyboard should not have the sheet animate under
   them, and someone who asked for less motion should not see it move at all. */
@media (prefers-reduced-motion: reduce) {
  .site-nav, .nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after { transition: none; }
}

/* ------------------------------------------------------------------ hero */

.hero { padding-block: clamp(3rem, 1.5rem + 7vw, 7rem) clamp(3rem, 2rem + 5vw, 6rem); overflow: hidden; }

/* A faint dot grid and a single light source behind the headline. Enough to
   read as "technical surface", far short of decoration. */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, var(--rule-strong) 1px, transparent 0);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 80% 60% at 30% 0%, #000 0%, transparent 72%);
  opacity: .5;
}
.hero::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  top: -18rem; left: -6rem; width: 46rem; height: 34rem;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 16%, transparent) 0%, transparent 62%);
  filter: blur(26px);
}
.hero h1 { max-width: 17ch; }
.hero .lede { margin-top: 1.5rem; }
.hero .btn-row { margin-top: 2.25rem; }
.hero-note { margin-top: 1.4rem; color: var(--ink-4); font-size: .88rem; font-family: var(--mono); letter-spacing: -.01em; }
.hero-grid { display: grid; gap: clamp(2.5rem, 1rem + 5vw, 4rem); }
@media (min-width: 64rem) { .hero-grid { grid-template-columns: 1.05fr .95fr; align-items: start; } }

/* ------------------------------------------------------------------ cards */

.card {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(1.35rem, 1rem + 1.2vw, 1.9rem);
  box-shadow: var(--lift);
}
.card-pad-lg { padding: clamp(1.6rem, 1rem + 2.2vw, 2.5rem); }
.card h3 { margin-bottom: .6rem; }
.card p { color: var(--ink-2); }

.grid { display: grid; gap: 1rem; }
/* minmax(0, …) rather than a bare 1fr throughout. A bare `1fr` is
   `minmax(auto, 1fr)`, and `auto` floors the track at its content's
   min-content width — so one unbreakable string inside a card silently widens
   its column and pushes the whole page sideways. Flooring at 0 means a track
   is never larger than its share, and content adapts instead of the layout
   breaking. */
.grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 40rem) { .grid-2, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 58rem) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.service-card { display: flex; flex-direction: column; transition: border-color .18s ease, background-color .18s ease, transform .18s ease; }
.service-card:hover { border-color: var(--accent-line); background: var(--paper-3); transform: translateY(-2px); }
.service-card h3 { font-size: var(--step-1); }
.service-card p { font-size: .94rem; flex: 1; margin-bottom: 1.1rem; color: var(--ink-3); }
.service-card .card-link { font-weight: 560; font-size: .89rem; text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; }
.service-card .card-link::after { content: "→"; transition: transform .16s ease; }
.service-card:hover .card-link::after { transform: translateX(3px); }

/* --------------------------------------------------------------- steps */

.steps { counter-reset: step; display: grid; gap: 1.75rem; }
@media (min-width: 52rem) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem 3rem; } }
@media (min-width: 72rem) { .steps.steps-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.step { counter-increment: step; position: relative; padding-top: 2.6rem; }
.step::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; top: 0; left: 0; right: 0;
  font-family: var(--mono); font-size: .78rem; font-weight: 500; letter-spacing: .1em;
  color: var(--accent);
  padding-bottom: .55rem; border-bottom: 1px solid var(--rule);
}
.step h3 { font-size: var(--step-1); margin-bottom: .5rem; }
.step p { color: var(--ink-3); font-size: .94rem; }

/* ------------------------------------------------------------------ forms */

.field { margin-bottom: 1.1rem; }
.field label {
  display: block; font-size: .85rem; margin-bottom: .45rem; color: var(--ink-2);
  font-weight: 560; letter-spacing: -.005em;
}
.field .hint { display: block; font-weight: 400; color: var(--ink-4); font-size: .82rem; margin-top: .3rem; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: .8rem .95rem;
  font: inherit; font-size: 1rem;          /* 16px minimum, or iOS zooms on focus */
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
  min-height: 46px;
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-4); }
.field textarea { min-height: 7rem; resize: vertical; line-height: 1.55; }
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%238593a5' stroke-width='1.6' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); background: var(--paper-2);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--danger); }
.field-error { display: block; color: var(--danger); font-size: .84rem; margin-top: .35rem; font-weight: 500; }
.field-row { display: grid; gap: 0 1rem; }
@media (min-width: 34rem) { .field-row { grid-template-columns: 1fr 1fr; } }

/* The honeypot. Off-screen rather than display:none, which some bots skip. */
.hp { position: absolute; left: -9999px; top: 0; width: 1px; height: 1px; overflow: hidden; }

/* Consent tickboxes. Deliberately plainer and smaller than the fields above:
   this is disclosure the visitor must be able to read, not a call to action,
   and styling it persuasively would undercut the point of asking. */
.consent-group { margin: 1.4rem 0 1.1rem; display: grid; gap: .85rem; }
.consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .7rem;
  align-items: start;
  font-size: .82rem;
  line-height: 1.55;
  color: var(--ink-3);
  cursor: pointer;
}
.consent input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 1.05rem;
  height: 1.05rem;
  margin: .15rem 0 0;
  border: 1px solid var(--rule-strong);
  border-radius: .3rem;
  background: var(--surface-2);
  flex: none;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.consent input[type="checkbox"]:hover { border-color: var(--accent-line); }
.consent input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent); }
/* The tick is a masked shape, not a glyph or a gradient: the mask carries the
   geometry and the colour still comes from a token, so light mode needs no
   second copy of it. */
.consent input[type="checkbox"]:checked::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: var(--on-accent);
  -webkit-mask: var(--tick) no-repeat center / 68% 68%;
  mask: var(--tick) no-repeat center / 68% 68%;
}
.consent input[type="checkbox"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.consent input[type="checkbox"][aria-invalid="true"] { border-color: var(--danger); }
.consent a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }
.consent a:hover { color: var(--accent); }
.consent .field-error { grid-column: 2; }

/* Turnstile slot. Empty and out of the layout until a site key is configured. */
[data-turnstile] { margin: 0 0 1.1rem; }
[data-turnstile][hidden] { display: none; }

/* Report assistant. Reads as an instrument panel attached to the report, not
   as a floating support widget: it is part of the document, so it sits in the
   flow and shares the report's surfaces. */
.assistant {
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background: var(--paper-2);
  padding: clamp(1.4rem, 1rem + 2vw, 2.2rem);
  box-shadow: var(--lift);
}
.assistant-head { display: flex; gap: .9rem; align-items: flex-start; margin-bottom: 1.4rem; }
.assistant-head h3 { margin: 0 0 .25rem; font-size: 1.12rem; }
.assistant-head p { margin: 0; color: var(--ink-3); font-size: .88rem; }
.assistant-dot {
  width: 9px; height: 9px; border-radius: 50%; flex: none; margin-top: .45rem;
  background: var(--accent); box-shadow: 0 0 12px var(--accent);
}

.assistant-log {
  display: grid;
  gap: .85rem;
  max-height: 26rem;
  overflow-y: auto;
  padding: .25rem .25rem 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}
.assistant-msg { display: flex; }
.assistant-msg p {
  margin: 0;
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .92rem;
  line-height: 1.6;
  max-width: 44ch;
  white-space: pre-wrap;
}
.assistant-msg.is-bot { justify-content: flex-start; }
.assistant-msg.is-bot p { background: var(--paper-3); color: var(--ink-2); border: 1px solid var(--rule); }
.assistant-msg.is-you { justify-content: flex-end; }
.assistant-msg.is-you p { background: var(--accent-soft); color: var(--ink); border: 1px solid var(--accent-line); }
.assistant-msg.is-thinking p { color: var(--ink-4); font-family: var(--mono); font-size: .82rem; }

.assistant-handoff {
  display: flex; flex-wrap: wrap; gap: .75rem; align-items: center;
  padding: .85rem 1rem;
  border: 1px dashed var(--accent-line);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
}
.assistant-handoff p { margin: 0; font-size: .88rem; color: var(--ink-2); }

.assistant-form { display: flex; gap: .6rem; }
.assistant-form input {
  flex: 1; min-width: 0;
  padding: .8rem 1rem;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink);
  font: inherit; font-size: .95rem;
}
.assistant-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.assistant-form input::placeholder { color: var(--ink-4); }
.assistant-form input:disabled { opacity: .6; }
.assistant-note { margin: .9rem 0 0; font-size: .8rem; color: var(--ink-4); line-height: 1.5; }

@media (max-width: 34rem) {
  .assistant-form { flex-direction: column; }
  .assistant-msg p { max-width: 100%; }
}

/* A conversation is not part of the document someone prints. */
@media print { .assistant { display: none; } }

/* Unresolved placeholders in legal copy. Loud on purpose: a [STATE] that
   ships to production is a real problem, so it should look like one. */
mark {
  background: var(--potential-soft);
  color: var(--potential);
  border: 1px dashed var(--potential-line);
  border-radius: .25rem;
  padding: 0 .3rem;
  font-family: var(--mono);
  font-size: .9em;
}

.form-note { color: var(--ink-4); font-size: .82rem; margin-top: 1rem; line-height: 1.5; }
.form-alert {
  padding: .85rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1.25rem;
  background: var(--danger-soft); color: var(--danger);
  border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
  font-size: .92rem; font-weight: 500;
}
.form-alert[hidden] { display: none; }
/* The same box, for the case where the news is good — a price that saved,
   rather than a field that failed. */
.form-alert.is-ok {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent-ink, var(--accent));
  border-color: color-mix(in srgb, var(--accent) 34%, transparent);
}

.scan-form {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 1rem + 2vw, 2.25rem);
  box-shadow: var(--lift-lg);
  position: relative;
}
/* A hairline of accent along the top edge: the panel is "live". */
.scan-form::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: .7;
}
.scan-form h2 { font-size: var(--step-2); margin-bottom: .4rem; }
.scan-form > p { color: var(--ink-3); font-size: .93rem; margin-bottom: 1.6rem; }

/* ------------------------------------------------------------- statuses */

.tag {
  display: inline-flex; align-items: center; gap: .42rem;
  padding: .26rem .6rem;
  border-radius: 5px; border: 1px solid transparent;
  font-family: var(--mono);
  font-size: .68rem; font-weight: 500; letter-spacing: .09em; text-transform: uppercase;
  white-space: nowrap;
}
.tag::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex: none; box-shadow: 0 0 7px currentColor; }
.tag-verified    { background: var(--verified-soft);    color: var(--verified);    border-color: var(--verified-line); }
.tag-potential   { background: var(--potential-soft);   color: var(--potential);   border-color: var(--potential-line); }
.tag-investigate { background: var(--investigate-soft); color: var(--investigate); border-color: var(--investigate-line); }
.tag-plain       { background: var(--paper-3); color: var(--ink-3); border-color: var(--rule); text-transform: none; letter-spacing: 0; }
.tag-plain::before { display: none; }

.meter { display: inline-flex; gap: 3px; vertical-align: middle; }
.meter i { width: 15px; height: 4px; border-radius: 1px; background: var(--rule-strong); display: block; }
.meter i.on { background: var(--accent); box-shadow: 0 0 8px -2px var(--accent); }
.meter.is-complexity i.on { background: var(--ink-3); box-shadow: none; }

/* ----------------------------------------------------------------- report */

.report-head {
  position: relative;
  background: var(--paper-2);
  border-bottom: 1px solid var(--rule);
  padding-block: clamp(2.5rem, 1.5rem + 4vw, 4rem);
  overflow: hidden;
}
.report-head::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, var(--rule-strong) 1px, transparent 0);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse 70% 100% at 85% 0%, #000 0%, transparent 70%);
  opacity: .55;
}
.report-head > * { position: relative; }
.report-head h1 { font-size: var(--step-4); }
.report-meta {
  display: grid; gap: 1.25rem 2.5rem; margin-top: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  border-top: 1px solid var(--rule); padding-top: 1.6rem;
}
.report-meta dt {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-4); margin-bottom: .35rem;
}
.report-meta dd { margin: 0; font-size: 1rem; font-weight: 540; color: var(--ink); overflow-wrap: anywhere; }

.snapshot {
  display: grid; gap: 1px; background: var(--rule);
  border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
}
.snapshot div { background: var(--paper-2); padding: 1.3rem 1.2rem; }
.snapshot .n {
  font-size: var(--step-3); font-weight: 620; letter-spacing: -.04em; line-height: 1; display: block;
  font-variant-numeric: tabular-nums;
}
.snapshot .k { font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; color: var(--ink-4); margin-top: .5rem; display: block; text-transform: uppercase; }

.opportunity {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper-2);
  padding: clamp(1.35rem, 1rem + 1.4vw, 2.1rem);
  margin-bottom: 1.25rem;
  box-shadow: var(--lift);
}
.opportunity-head { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: baseline; justify-content: space-between; margin-bottom: 1.35rem; }
.opportunity-num {
  font-family: var(--mono); font-size: .72rem; color: var(--accent); letter-spacing: .1em;
  display: block; margin-bottom: .45rem; text-transform: uppercase;
}
.opportunity h3 { font-size: var(--step-2); }
.opportunity dl { margin: 0; display: grid; gap: 1.15rem; }
.opportunity dt {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-4); margin-bottom: .4rem;
}
.opportunity dd { margin: 0; color: var(--ink-2); max-width: 48rem; }
.evidence {
  background: var(--paper); border: 1px solid var(--rule); border-left: 2px solid var(--accent-line);
  padding: .75rem .9rem; border-radius: var(--radius-sm);
  font-size: .85rem; color: var(--ink-3); font-family: var(--mono); line-height: 1.6;
  overflow-wrap: anywhere;
}
.opportunity-foot {
  display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: 1.5rem; padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
  font-family: var(--mono); font-size: .74rem; letter-spacing: .04em; color: var(--ink-4); text-transform: uppercase;
}
.opportunity-foot span { display: inline-flex; align-items: center; gap: .5rem; }
.opportunity-foot strong { color: var(--ink-2); font-weight: 500; }

.scope-note {
  border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 1.1rem 1.25rem; font-size: .88rem; color: var(--ink-3); background: var(--paper-2);
}
.scope-note strong { color: var(--ink); }

.matrix { display: grid; gap: 1rem; }
@media (min-width: 48rem) { .matrix { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.matrix .quad { border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.3rem; background: var(--paper-2); }
.matrix .quad h4 {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-4); margin-bottom: .9rem; font-weight: 500;
}
.matrix .quad ul { list-style: none; padding: 0; margin: 0; }
.matrix .quad li { padding: .5rem 0; border-bottom: 1px solid var(--rule); font-size: .93rem; margin: 0; }
.matrix .quad li:last-child { border-bottom: 0; }
.matrix .quad.is-primary { border-color: var(--accent-line); background: var(--accent-soft); box-shadow: var(--glow); }
.matrix .quad.is-primary h4 { color: var(--accent); }
.matrix .empty { color: var(--ink-4); font-size: .9rem; }

.roadmap { display: grid; gap: 1rem; }
.phase { border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; background: var(--paper-2); }
.phase > header { padding: 1.05rem 1.4rem; background: var(--paper-3); border-bottom: 1px solid var(--rule); }
.phase > header h4 { font-size: var(--step-1); }
.phase > header p { font-size: .86rem; color: var(--ink-3); margin: .35rem 0 0; }
.phase ol { margin: 0; padding: .75rem 1.4rem 1.2rem 2.6rem; }
.phase li { margin: .75rem 0; }
.phase li strong { display: block; }
.phase li span { color: var(--ink-3); font-size: .9rem; }

.workflow { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper-2); padding: clamp(1.2rem, 1rem + 1vw, 1.8rem); margin-bottom: 1rem; }
.workflow h4 { margin-bottom: 1.1rem; }
.flow { display: grid; gap: .6rem; margin: 0; }
@media (min-width: 56rem) { .flow { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .45rem; } }
.flow .stage { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius-sm); padding: .9rem 1rem; position: relative; }
.flow .stage dt {
  font-family: var(--mono); font-size: .65rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-4); margin-bottom: .4rem;
}
.flow .stage dd { margin: 0; font-size: .89rem; color: var(--ink-2); line-height: 1.5; }
@media (min-width: 56rem) {
  .flow .stage:not(:last-child)::after {
    content: "→"; position: absolute; right: -.62rem; top: 50%; transform: translateY(-50%);
    color: var(--accent); font-size: .85rem; z-index: 1;
  }
}

.facts { width: 100%; border-collapse: collapse; font-size: .92rem; }
.facts th, .facts td { text-align: left; padding: .72rem .5rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.facts th { font-weight: 540; color: var(--ink-2); width: 45%; }
.facts td { color: var(--ink-3); overflow-wrap: anywhere; font-family: var(--mono); font-size: .86rem; }
.facts thead th { font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-4); font-weight: 500; }

/* ------------------------------------------------------------ conversion */

/* On a dark page, a "band" is a brighter panel, not a darker one. */
.band {
  background: var(--paper-2);
  border-block: 1px solid var(--rule);
  position: relative; overflow: hidden;
}
.band::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 60% 100% at 50% 0%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%);
}
.band > * { position: relative; }
.band-soft { background: var(--paper-2); border-block: 1px solid var(--rule); }

.offer {
  border: 1px solid var(--rule); border-radius: var(--radius-lg); background: var(--paper-2);
  padding: clamp(1.6rem, 1rem + 2.5vw, 2.6rem); display: flex; flex-direction: column;
  box-shadow: var(--lift);
}
.offer.is-featured { border-color: var(--accent-line); box-shadow: var(--glow), var(--lift-lg); position: relative; }
.offer .price {
  font-size: var(--step-4); font-weight: 650; letter-spacing: -.04em; line-height: 1; margin: .5rem 0 .35rem;
  font-variant-numeric: tabular-nums;
}
.offer .price small { font-size: .92rem; font-weight: 460; color: var(--ink-4); letter-spacing: 0; font-family: var(--mono); }
.offer ul { list-style: none; padding: 0; margin: 1.4rem 0; flex: 1; }
.offer li { padding-left: 1.6rem; position: relative; margin-bottom: .7rem; color: var(--ink-2); font-size: .94rem; }
.offer li::before {
  content: ""; position: absolute; left: 0; top: .5em;
  width: 10px; height: 5px; border-left: 1.8px solid var(--accent); border-bottom: 1.8px solid var(--accent);
  transform: rotate(-45deg);
}
.ribbon {
  position: absolute; top: -.7rem; left: clamp(1.6rem, 1rem + 2.5vw, 2.6rem);
  background: var(--accent); color: var(--on-accent);
  font-family: var(--mono); font-size: .66rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; padding: .3rem .7rem; border-radius: 4px;
}

.compare { width: 100%; border-collapse: collapse; font-size: .92rem; }
.compare caption { text-align: left; color: var(--ink-4); font-size: .88rem; padding-bottom: 1rem; }
.compare th, .compare td { padding: .85rem .75rem; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.compare thead th { font-family: var(--mono); font-size: .7rem; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-4); font-weight: 500; }
.compare tbody th { font-weight: 520; color: var(--ink-2); }
.compare td { color: var(--ink-3); }
.compare .is-highlight { background: var(--accent-soft); color: var(--ink-2); }
.compare thead .is-highlight { color: var(--accent); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* A row of small labelled fields that wraps rather than scrolls: adding an
   affiliate should not mean a horizontal scrollbar on a phone. */
.admin-inline-form {
  display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end;
  margin-top: 1.1rem; padding-top: 1.1rem; border-top: 1px solid var(--rule);
}
.admin-inline-form label {
  display: flex; flex-direction: column; gap: .3rem;
  font-size: .78rem; font-weight: 550; color: var(--ink-3);
  flex: 1 1 8rem; min-width: 0;
}
.admin-inline-form input,
.admin-inline-form select {
  padding: .45rem .6rem; font: inherit; font-size: .88rem;
  border: 1px solid var(--rule); border-radius: var(--radius-sm);
  background: var(--paper); color: var(--ink-1); min-width: 0; width: 100%;
}
/* The browser default is dark enough that "Sam Reyes" in an empty Name field
   reads as a value rather than a hint — and an admin who believes the form is
   already filled in presses the button. */
.admin-inline-form input::placeholder { color: var(--ink-4); opacity: .7; }
.admin-inline-form button { flex: 0 0 auto; }

/* Promo entry on the checkout card. A <details>, so it opens with no script;
   quiet by default because most readers do not have a code and an open box is
   an invitation to go looking for one. */
.promo { margin-top: .9rem; }
.promo > summary {
  cursor: pointer; font-size: .84rem; color: var(--ink-4);
  list-style: none; text-align: center; padding: .35rem;
  border-radius: var(--radius-sm);
}
.promo > summary::-webkit-details-marker { display: none; }
.promo > summary:hover { color: var(--ink-2); }
.promo > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.promo-row { display: flex; gap: .5rem; margin-top: .6rem; }
.promo-row input {
  flex: 1 1 auto; min-width: 0;
  padding: .55rem .7rem; font: inherit; font-size: .9rem;
  text-transform: uppercase; letter-spacing: .04em;
  border: 1px solid var(--rule); border-radius: var(--radius-sm);
  background: var(--paper); color: var(--ink-1);
}
.promo-row input::placeholder { text-transform: none; letter-spacing: 0; }
.promo-row button { flex: 0 0 auto; }
.promo-msg { margin: .5rem 0 0; font-size: .84rem; min-height: 1.2em; }
.promo-msg.is-ok { color: var(--accent); }
.promo-msg.is-bad { color: var(--danger); }

.faq details { border-bottom: 1px solid var(--rule); padding: 1.1rem 0; }
.faq summary { cursor: pointer; font-weight: 560; font-size: 1.01rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.25rem; line-height: 1; flex: none; font-family: var(--mono); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: .9rem; color: var(--ink-3); max-width: var(--measure); }

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

.site-foot { border-top: 1px solid var(--rule); padding-block: 3.5rem 2.5rem; font-size: .9rem; }
.foot-grid { display: grid; gap: 2.5rem; margin-bottom: 2.5rem; }
@media (min-width: 48rem) { .foot-grid { grid-template-columns: 1.5fr 1fr 1fr; } }
.site-foot h4 { font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-4); margin-bottom: .9rem; font-weight: 500; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin-bottom: .5rem; }
.site-foot a { color: var(--ink-3); text-decoration: none; }
.site-foot a:hover { color: var(--accent); }
.foot-legal { border-top: 1px solid var(--rule); padding-top: 1.75rem; color: var(--ink-4); font-size: .82rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }

/* ---------------------------------------------------------------- states */

.spinner {
  width: 16px; height: 16px; border-radius: 50%; flex: none;
  border: 2px solid color-mix(in srgb, currentColor 30%, transparent); border-top-color: currentColor;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.progress { margin-top: 1.75rem; border-top: 1px solid var(--rule); padding-top: 1.5rem; }
.progress ol { list-style: none; padding: 0; margin: 0; display: grid; gap: .65rem; }
.progress li {
  display: flex; align-items: center; gap: .75rem; color: var(--ink-4);
  font-family: var(--mono); font-size: .82rem; letter-spacing: -.01em; transition: color .3s ease;
}
.progress li .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--rule-strong); flex: none; transition: background .3s ease, box-shadow .3s ease; }
.progress li.is-active { color: var(--ink); }
.progress li.is-active .dot { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.progress li.is-done { color: var(--ink-3); }
.progress li.is-done .dot { background: var(--accent-dim); }

.empty-state { text-align: center; padding: 3.5rem 1rem; color: var(--ink-4); border: 1px dashed var(--rule-strong); border-radius: var(--radius); }

@media print {
  :root { color-scheme: light; }
  .site-head, .site-foot, .no-print, .btn { display: none !important; }
  body { background: #fff; color: #000; }
  .report-head { background: #fff; color: #000; border-bottom: 2px solid #000; }
  .report-head::before, .band::before, .hero::before, .hero::after, .scan-form::before { display: none; }
  .report-head h1, .report-meta dd { color: #000; }
  .report-meta dt, .facts td { color: #444; }
  .opportunity, .card, .workflow, .phase, .snapshot { break-inside: avoid; border-color: #bbb; box-shadow: none; background: #fff; }
  section { padding-block: 1.5rem; }
}

/* ---------------------------------------------------------------------
   The report guide and the voice layer.
   Same instrument: hairlines, one accent, nothing that glows for its own
   sake. The microphone state is words as well as colour.
   --------------------------------------------------------------------- */
.assistant-disclosure { font-size: .8rem; color: var(--ink-4); margin: -.25rem 0 .9rem; }
.assistant-guide { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .6rem 0 1rem; }
.assistant-suggestions { display: flex; flex-wrap: wrap; gap: .4rem; }
.assistant-chip {
  font: inherit; font-size: .82rem; padding: .4rem .7rem; border-radius: 999px;
  border: 1px solid var(--rule-strong); background: var(--paper-3); color: var(--ink-2); cursor: pointer;
  min-height: 36px;
}
.assistant-chip:hover, .assistant-chip:focus-visible { border-color: var(--accent-line); color: var(--ink); background: var(--accent-soft); }
.assistant-msg.is-interim p { color: var(--ink-4); font-style: italic; }

.voice { border-top: 1px solid var(--rule); padding-top: .9rem; margin: .4rem 0 1rem; }
.voice-controls { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.voice-status { font-size: .84rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.voice-note { font-size: .78rem; color: var(--ink-4); margin: .5rem 0 0; max-width: var(--measure); }
.voice-mic {
  display: inline-block; width: .7rem; height: .7rem; border-radius: 50%;
  background: currentColor; margin-right: .35rem; vertical-align: -1px;
}
[data-voice-start][aria-pressed="true"] .voice-mic { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { [data-voice-start] .voice-mic { animation: none; } }

/* Bars drawn as SVG so a data-driven width is an attribute, not an inline
   style — which is what lets the CSP forbid inline styles entirely. */
.bar-svg { display: block; width: 100%; height: 7px; }
.bar-svg .bar-bg { fill: var(--paper-3); }
.bar-svg .bar-fg { fill: var(--accent); }
.u-w35 { width: 35%; }
.note.is-user { border-left-color: var(--accent); }
.note-body { margin: 0; font-size: .88rem; color: var(--ink-2); line-height: 1.5; }
.note-body.is-user { color: var(--ink); }
