/* ============================================================
   Trace My Land — landing page styles (modern layer).
   Built on style.css tokens: Inter, brand green, terracotta,
   dark mode via [data-theme]. Flat surfaces + borders carry the
   structure; depth comes from a few deliberate, soft shadows.
   ============================================================ */

.landing main { display: none; } /* landing.html has no <main> panels */

.landing ::selection { background: color-mix(in srgb, var(--brand) 24%, transparent); }

/* visible, on-brand focus for keyboard users */
.landing a:focus-visible,
.landing button:focus-visible,
.landing summary:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ============================ topbar ============================ */
.landing .topbar { border-bottom: 1px solid var(--line); gap: var(--sp-3); transition: box-shadow .25s ease; }
body.scrolled .topbar { box-shadow: 0 8px 24px -18px rgba(2, 6, 23, .35); }
.landing .pill { flex: 0 0 auto; }

.topnav {
  display: flex; align-items: center; gap: var(--sp-4);
  margin-left: var(--sp-4); margin-right: auto;
}
.topnav a {
  color: var(--muted); text-decoration: none; font-size: var(--fs-sm);
  font-weight: 500; padding: 6px 2px; white-space: nowrap;
  border-bottom: 2px solid transparent; transition: color .15s ease;
}
.topnav a:hover { color: var(--brand); }
.topnav .sep { width: 1px; height: 18px; background: var(--line-strong); margin: 0 var(--sp-1); }

.linklike {
  background: none; border: none; padding: 0; cursor: pointer;
  font: inherit; font-size: var(--fs-sm); color: var(--muted);
}
.linklike:hover { color: var(--ink); text-decoration: underline; }

/* ============================= hero ============================= */
/* No overflow:hidden here: the themed dropdown popups must be able to extend
 * beyond the hero's bottom edge without being clipped. The pattern backdrop
 * is inset:0 anyway, so nothing else needs the clipping. */
.hero {
  position: relative;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(1100px 460px at 18% -12%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 70%),
    radial-gradient(900px 420px at 88% -4%, color-mix(in srgb, var(--terra) 10%, transparent), transparent 70%),
    radial-gradient(1200px 500px at 50% 130%, color-mix(in srgb, var(--brand) 7%, transparent), transparent 70%);
}
/* faint cadastral parcel pattern, fading out toward the fold */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='280' viewBox='0 0 280 280'%3E%3Cg fill='none' stroke='%2394a3b8' stroke-opacity='.13'%3E%3Cpath d='M24 232 66 104 158 70 226 128 192 236z'/%3E%3Cpath d='M66 104 122 158 100 244'/%3E%3Cpath d='M122 158 226 128'/%3E%3Cpath d='M158 70 138 20 252 44 226 128'/%3E%3Cpath d='M20 40 96 24 122 60 66 104'/%3E%3Ccircle cx='122' cy='158' r='3'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 280px 280px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.9), transparent 88%);
  mask-image: linear-gradient(180deg, rgba(0,0,0,.9), transparent 88%);
}
.hero-inner {
  position: relative; z-index: 1;
  max-width: 1040px; margin: 0 auto;
  padding: var(--sp-8) var(--sp-4) var(--sp-7);
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: var(--sp-4);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 14px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: color-mix(in srgb, var(--card) 82%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: var(--muted); font-size: var(--fs-xs); font-weight: 600;
}
.hero-badge::before {
  content: ""; width: 7px; height: 7px; border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 22%, transparent);
}
.hero h2 {
  margin: 0; font-size: clamp(2rem, 5vw, 3.35rem);
  line-height: 1.08; letter-spacing: -.03em; font-weight: 700;
  text-wrap: balance;
}
.grad {
  background: linear-gradient(94deg, var(--brand) 20%, var(--terra) 95%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero-sub {
  max-width: 620px; margin: 0; color: var(--muted);
  font-size: var(--fs-md); line-height: 1.65; text-wrap: pretty;
}

.hero-trust {
  display: flex; gap: var(--sp-2); flex-wrap: wrap; justify-content: center;
  align-items: center; font-size: var(--fs-xs); color: var(--muted);
}
.hero-trust .chip {
  display: inline-flex; align-items: center;
  padding: 5px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--card) 85%, transparent);
  border: 1px solid var(--line); font-weight: 600; color: var(--ink);
}
.hero-trust .chip::before {
  content: "✓"; margin-right: 7px; font-weight: 800; color: var(--brand);
}

/* ------------------------- lookup widget ------------------------- */
.lookup {
  width: 100%; max-width: 880px; margin-top: var(--sp-2);
  background: color-mix(in srgb, var(--card) 94%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow:
    0 1px 2px rgba(2, 6, 23, .06),
    0 32px 64px -32px rgba(2, 6, 23, .35);
  padding: var(--sp-5); text-align: left;
  display: flex; flex-direction: column; gap: var(--sp-4);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.lookup:focus-within {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line-strong));
  box-shadow:
    0 1px 2px rgba(2, 6, 23, .06),
    0 32px 64px -28px rgba(2, 6, 23, .38),
    0 0 0 4px var(--ring);
}
.lookup-head { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); flex-wrap: wrap; }
.lookup-head strong { font-weight: 700; letter-spacing: -.01em; }
.live-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .64rem; font-weight: 800; letter-spacing: .14em;
  color: var(--success);
  background: color-mix(in srgb, var(--success) 11%, transparent);
  border: 1px solid color-mix(in srgb, var(--success) 28%, transparent);
  padding: 3px 9px; border-radius: 999px;
}
.live-chip .pulse { position: relative; width: 7px; height: 7px; border-radius: 999px; background: var(--success); }
.live-chip .pulse::after {
  content: ""; position: absolute; inset: -3px; border-radius: 999px;
  border: 1.5px solid var(--success); opacity: .8;
  animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(.5); opacity: .9; }
  80%, 100% { transform: scale(1.5); opacity: 0; }
}
.lookup-note { color: var(--muted); font-weight: 400; }

.lookup-step { display: flex; gap: var(--sp-3); align-items: flex-start; }
.lookup-fields { display: grid; gap: var(--sp-3); flex: 1; }
.lookup-4 { grid-template-columns: repeat(4, 1fr); }
.lookup-2 { grid-template-columns: 1fr 1fr; }
.lookup .step-n {
  position: relative; z-index: 1;
  width: 30px; height: 30px; flex-basis: 30px;
  background: linear-gradient(160deg, var(--brand-hover), var(--brand));
  color: var(--on-brand); font-weight: 800; font-size: var(--fs-sm);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent);
  margin-top: 22px; /* optically aligns with the first control */
}
.lookup-actions { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.btn.lg { padding: 12px 24px; font-size: var(--fs-md); }

/* elevated primary button, landing scope only */
.landing .btn.primary {
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 90%, #ffffff), var(--brand));
  box-shadow:
    0 1px 2px rgba(2, 6, 23, .12),
    0 12px 24px -12px color-mix(in srgb, var(--brand) 60%, transparent);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.landing .btn.primary:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow:
    0 2px 4px rgba(2, 6, 23, .14),
    0 16px 32px -12px color-mix(in srgb, var(--brand) 65%, transparent);
}
.landing .btn.primary:active:not(:disabled) { transform: translateY(0); }
.landing .btn.primary:disabled { opacity: .55; }

.lookup-hint { color: var(--muted); font-size: var(--fs-sm); }
.lookup-err {
  margin: 0; color: var(--danger); font-size: var(--fs-sm);
  background: var(--danger-soft); border-radius: var(--r-sm); padding: 8px 12px;
}
.lookup select:disabled, .lookup input:disabled { opacity: .55; }

/* --------------------- live preview dossier --------------------- */
.live-dossier {
  background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--r-md);
  padding: var(--sp-3);
  display: flex; flex-direction: column; gap: var(--sp-2);
  animation: panelIn .35s cubic-bezier(.2, .7, .2, 1);
}
.live-head { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.live-rows { margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); }
.live-rows > div {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 8px 12px; min-width: 0;
  transition: border-color .2s ease;
}
.live-rows > div:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.live-rows dt { color: var(--muted); font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; }
.live-rows dd { margin: 3px 0 0; font-weight: 600; font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-links { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.chip-link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand);
  border: 1px solid transparent;
  font-size: var(--fs-xs); font-weight: 700; text-decoration: none;
  font-family: inherit; cursor: pointer;
  transition: border-color .15s ease, transform .15s ease;
}
.chip-link:hover { text-decoration: underline; border-color: color-mix(in srgb, var(--brand) 40%, transparent); transform: translateY(-1px); }
.live-note { color: var(--faint); font-size: var(--fs-xs); }
.lookup.is-busy .lookup-step, .lookup.is-busy .lookup-actions .btn { pointer-events: none; }
.lookup.is-busy .live-rows dd { color: var(--faint); }

/* =========================== stats strip =========================== */
.stats {
  max-width: 1040px; margin: 0 auto; padding: var(--sp-6) var(--sp-4) 0;
}
.stats-inner {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow);
  overflow: hidden;
}
.stat {
  padding: var(--sp-5) var(--sp-4); text-align: center;
  position: relative;
}
.stat + .stat::before {
  content: ""; position: absolute; left: 0; top: 22%; bottom: 22%;
  width: 1px; background: var(--line);
}
.stat b {
  display: block; font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 700; letter-spacing: -.02em;
  background: linear-gradient(120deg, var(--ink), color-mix(in srgb, var(--ink) 55%, var(--brand)));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat span {
  color: var(--muted); font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em;
}

/* ========================= section shells ========================= */
.section-head { text-align: center; max-width: 700px; margin: 0 auto var(--sp-6); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: .68rem; font-weight: 800; letter-spacing: .16em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 12px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--terra); }
.eyebrow::after { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--terra); }
.section-head h2 {
  margin: 0 0 var(--sp-2);
  font-size: clamp(1.55rem, 3.2vw, 2.1rem);
  font-weight: 700; letter-spacing: -.02em; line-height: 1.15;
}
.section-head p { margin: 0; color: var(--muted); font-size: var(--fs-md); line-height: 1.65; text-wrap: pretty; }

/* ========================= mode showcase ========================= */
.modes { max-width: 1040px; margin: 0 auto; padding: var(--sp-8) var(--sp-4); }

.mode-tabs {
  display: flex; width: max-content; max-width: 100%;
  margin: 0 auto var(--sp-6);
  gap: 4px; padding: 4px;
  background: var(--card-2); border: 1px solid var(--line);
  border-radius: 999px;
  overflow-x: auto;
}
.mode-tab {
  appearance: none; background: none; border: none; cursor: pointer;
  font: inherit; font-size: var(--fs-sm); font-weight: 600; color: var(--muted);
  padding: 9px 20px; border-radius: 999px; white-space: nowrap;
  transition: color .15s ease, background .15s ease, box-shadow .15s ease;
}
.mode-tab:hover { color: var(--ink); }
.mode-tab.active {
  background: var(--card); color: var(--brand);
  box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
}

.mode-panel {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-7);
  align-items: center;
  animation: panelIn .4s cubic-bezier(.2, .7, .2, 1);
}
.mode-panel[hidden] { display: none; }
@keyframes panelIn {
  from { opacity: 0; transform: translateY(12px); }
}
.mode-copy h3 { margin: 0 0 var(--sp-3); font-size: clamp(1.25rem, 2.2vw, 1.6rem); letter-spacing: -.02em; }
.mode-copy p { margin: 0 0 var(--sp-4); color: var(--muted); line-height: 1.7; text-wrap: pretty; }
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-3); }
.ticks li { position: relative; padding-left: 30px; font-size: var(--fs-sm); color: var(--ink); }
.ticks li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 20px; height: 20px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand);
  font-size: 11px; font-weight: 800; display: grid; place-items: center;
}

/* mock dossier (mode 1) */
.mode-visual { min-width: 0; }
.dossier {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 0 1px 2px rgba(2, 6, 23, .05), 0 24px 48px -28px rgba(2, 6, 23, .3);
  padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-3);
  transition: transform .25s ease, box-shadow .25s ease;
}
.dossier:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(2, 6, 23, .06), 0 32px 56px -28px rgba(2, 6, 23, .35); }
.dossier-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); flex-wrap: wrap; }
.plot-badge {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: var(--fs-xs);
  letter-spacing: .01em;
}
.dossier-crumb { color: var(--muted); font-size: var(--fs-xs); }
.dossier-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--sp-3); align-items: stretch; }
.dossier-map {
  border: 1px solid var(--line); border-radius: var(--r-md);
  background:
    linear-gradient(color-mix(in srgb, var(--line) 55%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--line) 55%, transparent) 1px, transparent 1px),
    var(--panel);
  background-size: 18px 18px, 18px 18px, auto;
  color: var(--terra); padding: var(--sp-2);
  display: grid; place-items: center; min-height: 150px;
}
.dossier-rows { margin: 0; display: flex; flex-direction: column; justify-content: center; gap: 7px; }
.dossier-rows > div {
  display: flex; justify-content: space-between; gap: var(--sp-2);
  border-bottom: 1px dashed var(--line); padding-bottom: 7px; font-size: var(--fs-sm);
}
.dossier-rows > div:last-child { border-bottom: none; }
.dossier-rows dt { color: var(--muted); }
.dossier-rows dd { margin: 0; font-weight: 600; }

/* mock 7/12 document (mode 2) */
.doc {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: 0 1px 2px rgba(2, 6, 23, .05), 0 24px 48px -28px rgba(2, 6, 23, .3);
  padding: var(--sp-5) var(--sp-4); display: flex; flex-direction: column; gap: 11px;
  max-width: 380px; margin: 0 auto; width: 100%;
}
.doc::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--terra));
  border-radius: var(--r-md) var(--r-md) 0 0;
}
.doc-line { height: 9px; border-radius: 4px; background: var(--card-2); }
.doc-line.w40 { width: 40%; } .doc-line.w60 { width: 60%; }
.doc-line.w75 { width: 75%; } .doc-line.w80 { width: 80%; }
.doc-line.w90 { width: 90%; }
.doc-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.doc-grid span { height: 24px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); }
.doc-stamp {
  position: absolute; right: 14px; bottom: 12px;
  border: 2px solid var(--terra); color: var(--terra);
  border-radius: 6px; padding: 2px 8px; font-weight: 800; font-size: var(--fs-xs);
  transform: rotate(-6deg); opacity: .85;
}

/* mock rates table (mode 3) */
.rates {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: 0 1px 2px rgba(2, 6, 23, .05), 0 24px 48px -28px rgba(2, 6, 23, .3);
  overflow: hidden; max-width: 380px; margin: 0 auto; width: 100%;
}
.rates-row {
  display: grid; grid-template-columns: 1.2fr .8fr 1.1fr; gap: var(--sp-2);
  padding: 12px 16px; font-size: var(--fs-sm);
  border-bottom: 1px solid var(--line); align-items: center;
}
.rates-row:last-child { border-bottom: none; }
.rates-head {
  background: var(--card-2); font-weight: 700; font-size: .66rem;
  text-transform: uppercase; letter-spacing: .1em; color: var(--muted);
}
.rates-row b { color: var(--brand); font-weight: 700; }

/* mock village map (mode 4) */
.vmap {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: 0 1px 2px rgba(2, 6, 23, .05), 0 24px 48px -28px rgba(2, 6, 23, .3);
  padding: var(--sp-3); max-width: 380px; margin: 0 auto; width: 100%;
  color: var(--brand);
  transition: transform .25s ease, box-shadow .25s ease;
}
.vmap:hover { transform: translateY(-3px); }
.vmap svg { display: block; }
.vmap-chips { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 6px; }
.vmap-chips .chip {
  padding: 3px 9px; border-radius: 999px; background: var(--card);
  border: 1px solid var(--line-strong); font-size: var(--fs-xs); font-weight: 800;
  letter-spacing: .06em;
}

/* ======================= feature deep-dive ======================= */
.deep { background: var(--card-2); border-block: 1px solid var(--line); }
.deep .section-head { max-width: 1040px; padding: var(--sp-8) var(--sp-4) var(--sp-5); }
.deep-grid {
  max-width: 1040px; margin: 0 auto;
  padding: 0 var(--sp-4) var(--sp-8);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3);
}
.deep-card {
  position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: var(--sp-5);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.deep-card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, var(--brand), var(--terra));
  opacity: 0; transition: opacity .2s ease;
}
.deep-card:hover {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
  transform: translateY(-3px);
  box-shadow: 0 20px 40px -24px rgba(2, 6, 23, .35);
}
.deep-card:hover::before { opacity: 1; }
.deep-icon {
  display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: var(--r-md);
  background: linear-gradient(140deg, var(--brand-soft), color-mix(in srgb, var(--terra) 10%, transparent));
  color: var(--brand);
  margin-bottom: var(--sp-3);
}
.deep-card h3 { margin: 0 0 7px; font-size: var(--fs-md); letter-spacing: -.01em; }
.deep-card p { margin: 0; color: var(--muted); font-size: var(--fs-sm); line-height: 1.65; }

/* ============================ personas ============================ */
.personas { max-width: 1040px; margin: 0 auto; padding: var(--sp-8) var(--sp-4); }
.persona-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); }
.persona {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: var(--sp-5);
  display: flex; flex-direction: column; gap: var(--sp-3);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.persona:hover {
  border-color: color-mix(in srgb, var(--terra) 45%, var(--line));
  transform: translateY(-3px);
  box-shadow: 0 20px 40px -24px rgba(2, 6, 23, .3);
}
.persona h3 { margin: 0; font-size: var(--fs-md); letter-spacing: -.01em; }
.persona p { margin: 0; color: var(--muted); font-size: var(--fs-sm); line-height: 1.65; flex: 1; }
.persona-tag {
  align-self: flex-start; padding: 4px 11px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line);
  color: var(--terra); font-weight: 700; font-size: var(--fs-xs);
}

/* ========================== how it works ========================== */
.how { background: var(--card-2); border-block: 1px solid var(--line); }
.how .section-head { padding: var(--sp-8) var(--sp-4) 0; }
.how > .steps {
  max-width: 720px; margin-inline: auto;
  list-style: none;
  padding: var(--sp-6) var(--sp-4) var(--sp-8);
  display: flex; flex-direction: column; gap: var(--sp-5);
  counter-reset: step;
}
.steps li { display: flex; gap: var(--sp-4); align-items: flex-start; }
.step-n {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 999px;
  background: linear-gradient(160deg, var(--brand-hover), var(--brand));
  color: var(--on-brand); font-weight: 800;
  display: grid; place-items: center; font-size: var(--fs-sm);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent);
}
.steps h3 { margin: 3px 0; font-size: var(--fs-md); letter-spacing: -.01em; }
.steps p { margin: 0; color: var(--muted); font-size: var(--fs-sm); line-height: 1.6; }

/* ============================== faq ============================== */
.faq { max-width: 720px; margin: 0 auto; padding: var(--sp-8) var(--sp-4); }
.faq .section-head { margin-bottom: var(--sp-5); }
.faq details {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: var(--sp-4);
  margin-bottom: var(--sp-2);
  transition: border-color .2s ease;
}
.faq details:hover { border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
.faq summary {
  cursor: pointer; font-weight: 600;
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: 0 0 auto;
  width: 22px; height: 22px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--card-2); color: var(--muted);
  font-weight: 700; font-size: .9rem; line-height: 1;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.faq details[open] summary { color: var(--brand); }
.faq details[open] summary::after {
  content: "−"; transform: rotate(180deg);
  background: var(--brand-soft); color: var(--brand);
}
.faq p { margin: var(--sp-3) 0 0; color: var(--muted); font-size: var(--fs-sm); line-height: 1.65; }

/* =========================== final CTA =========================== */
.cta-final { max-width: 1040px; margin: 0 auto; padding: var(--sp-7) var(--sp-4); }
.cta-band {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg);
  background:
    radial-gradient(600px 200px at 85% -20%, rgba(255, 255, 255, .22), transparent 70%),
    linear-gradient(115deg, var(--brand), color-mix(in srgb, var(--brand) 62%, #064e3b));
  box-shadow: 0 32px 64px -32px color-mix(in srgb, var(--brand) 55%, rgba(2, 6, 23, .4));
  padding: var(--sp-8) var(--sp-5);
  text-align: center;
}
.cta-band::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='280' viewBox='0 0 280 280'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.1'%3E%3Cpath d='M24 232 66 104 158 70 226 128 192 236z'/%3E%3Cpath d='M66 104 122 158 100 244'/%3E%3Cpath d='M122 158 226 128'/%3E%3Cpath d='M158 70 138 20 252 44 226 128'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 280px 280px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.8), transparent 90%);
  mask-image: linear-gradient(180deg, rgba(0,0,0,.8), transparent 90%);
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 {
  margin: 0 0 var(--sp-2);
  color: var(--on-brand);
  font-size: clamp(1.55rem, 3.2vw, 2.1rem);
  letter-spacing: -.02em; line-height: 1.15;
}
.cta-band .cta-sub { color: color-mix(in srgb, var(--on-brand) 78%, transparent); margin: 0 0 var(--sp-5); font-size: var(--fs-md); }
.cta-band .btn.primary {
  background: var(--on-brand); color: var(--brand);
  box-shadow: 0 12px 28px -12px rgba(2, 6, 23, .5);
}
.cta-band .btn.primary:hover:not(:disabled) { filter: none; }

/* ============================= footer ============================= */
.landing-foot {
  background: var(--card-2);
  border-top: 1px solid var(--line);
  padding: var(--sp-7) var(--sp-4) var(--sp-6);
  font-size: var(--fs-xs);
}
.foot-cols {
  max-width: 1040px; margin: 0 auto;
  display: flex; justify-content: space-between; gap: var(--sp-5); flex-wrap: wrap;
}
.foot-cols > div:first-child { max-width: 520px; }
.foot-cols p { margin: 0 0 var(--sp-2); }
.foot-links { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.foot-links a, .foot-links .linklike { color: var(--muted); text-decoration: none; font-size: var(--fs-sm); }
.foot-links a:hover, .foot-links .linklike:hover { color: var(--brand); text-decoration: underline; }
.foot-copy {
  max-width: 1040px; margin: var(--sp-5) auto 0; color: var(--faint);
  padding-top: var(--sp-4); border-top: 1px solid var(--line);
}

/* ========================= terms dialog ========================= */
.terms-dialog {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--sp-5); max-width: 560px; width: calc(100% - 32px);
  box-shadow: var(--shadow-lg);
}
.terms-dialog::backdrop { background: rgba(2, 6, 23, .6); }
.terms-dialog h2 { margin: 0 0 var(--sp-3); font-size: var(--fs-lg); }
.terms-dialog p { color: var(--muted); font-size: var(--fs-sm); line-height: 1.65; margin: 0 0 var(--sp-3); }
.terms-dialog .dlg-close { margin-top: var(--sp-2); }

/* ====================== scroll-reveal motion ====================== */
/* Only when JS is present (html.js); no-JS visitors see everything. */
.js .reveal {
  opacity: 0; transform: translateY(16px);
  transition: opacity .6s cubic-bezier(.2, .7, .2, 1), transform .6s cubic-bezier(.2, .7, .2, 1);
}
.js .reveal.in { opacity: 1; transform: none; }
.js .deep-grid .reveal:nth-child(3n+2), .js .persona-grid .reveal:nth-child(3n+2) { transition-delay: .07s; }
.js .deep-grid .reveal:nth-child(3n+3), .js .persona-grid .reveal:nth-child(3n+3) { transition-delay: .14s; }

/* Reduced motion: targeted opt-outs (reveals, panels, pulse, dd-pop), not a
 * blanket transition kill — the widget, tabs and hover states stay functional
 * for users who only disabled transparency effects. */
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .mode-panel, .live-dossier { animation: none !important; }
  .live-chip .pulse::after { animation: none !important; }
  .dd-pop { transition: none !important; }
}

/* Safety net: without JS (html lacks .js) reveals must never hide content. */
html:not(.js) .reveal { opacity: 1 !important; transform: none !important; }

/* =========================== responsive =========================== */
@media (max-width: 920px) {
  .lookup-4 { grid-template-columns: repeat(2, 1fr); }
  .mode-panel { grid-template-columns: 1fr; gap: var(--sp-5); }
  .deep-grid, .persona-grid { grid-template-columns: 1fr 1fr; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3)::before { display: none; } /* row 2 starts fresh */
  .topnav a[href="#features"], .topnav a[href="#faq"] { display: none; }
  .topnav .sep { display: none; }
}
@media (max-width: 640px) {
  .hero-inner { padding-top: var(--sp-7); }
  .hero-br { display: none; }
  .lookup-4, .lookup-2 { grid-template-columns: 1fr; }
  .deep-grid, .persona-grid { grid-template-columns: 1fr; }
  .foot-cols { flex-direction: column; }
  .live-rows { grid-template-columns: 1fr; }
  .topnav { position: static; margin: 0; order: 3; width: 100%; overflow-x: auto; padding-bottom: 2px; }
  .topbar { flex-wrap: wrap; padding-left: max(var(--sp-4), env(safe-area-inset-left)); padding-right: max(var(--sp-4), env(safe-area-inset-right)); padding-top: max(var(--sp-3), env(safe-area-inset-top)); }
  .topbar-tools { margin-left: auto; }
  .lookup { padding: var(--sp-4); }
  .lookup .step-n { display: none; } /* save space; labels carry the meaning */
  .stat { padding: var(--sp-4); }
  /* section rhythm tightens up on phones */
  section { scroll-margin-top: 64px; }
  /* CTA + dialog buttons stack full-width and respect the home indicator */
  .cta-band .btn { width: 100%; }
  .terms-dialog { max-width: none; width: calc(100vw - 16px); max-height: 86dvh; overflow-y: auto; }
  .landing-foot { padding-bottom: calc(var(--sp-6) + env(safe-area-inset-bottom)); }
  /* stats grid: 2 columns are fine, but give the numbers room to breathe */
  .stats-inner { gap: var(--sp-2); }
}

/* touch screens: bigger tap targets on nav + pills */
@media (pointer: coarse) {
  .topnav a { padding: 10px 12px; }
  .close-match, .radio-pill { padding: 11px 16px; }
}
