/* RIVA design system. Light and dark are both first-class; the default follows the system. */

:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-2: #eaf0f8;
  --border: #d8e0ec;
  --text: #0b1220;
  --muted: #55627a;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-2: #0891b2;
  --focus: #0891b2;
  --field-bg: #ffffff;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 10px 28px rgba(15, 23, 42, 0.06);
  --radius: 14px;
  --gauge-color: #4f46e5;
  --very-low: #10b981;
  --low: #059669;
  --moderate: #f59e0b;
  --high: #ea580c;
  --critical: #dc2626;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #070b14;
  --surface: #0f1729;
  --surface-2: #16213a;
  --border: #1f2c47;
  --text: #e7ecf7;
  --muted: #94a3bd;
  --accent: #818cf8;
  --accent-hover: #a5b4fc;
  --accent-2: #22d3ee;
  --focus: #22d3ee;
  --field-bg: #0a1222;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(1200px 500px at 85% -10%, color-mix(in srgb, var(--accent-2) 14%, transparent), transparent 60%),
    radial-gradient(900px 480px at -10% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { line-height: 1.25; letter-spacing: -0.015em; margin: 0; }

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem clamp(1rem, 4vw, 2.5rem);
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand-mark { width: 36px; height: 36px; flex: none; }
.brand-name { font-weight: 800; font-size: 1.15rem; letter-spacing: 0.04em; }
.brand-sub { font-size: 0.78rem; color: var(--muted); }

.theme-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.theme-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
}

.theme-switch button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

/* ---------- Layout ---------- */
.container {
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 4vw, 2rem);
}

.hero { margin-bottom: 1.75rem; }

.hero h1 {
  font-size: clamp(1.9rem, 4.2vw, 2.7rem);
  font-weight: 800;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead { color: var(--muted); max-width: 62ch; margin: 0.75rem 0 0; font-size: 1.02rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.1rem, 2.5vw, 1.6rem);
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
}

.card h2 { font-size: 1.1rem; margin-bottom: 1rem; }

/* ---------- Form ---------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.1rem;
}

.field-wide { grid-column: 1 / -1; }

.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 0.97rem;
  color: var(--text);
  background: var(--field-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea { resize: vertical; min-height: 120px; }

.field input::placeholder,
.field textarea::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent);
}

.form-error {
  margin: 1rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: color-mix(in srgb, var(--critical) 12%, transparent);
  color: var(--critical);
  font-weight: 600;
  font-size: 0.92rem;
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.hint { margin: 0; color: var(--muted); font-size: 0.85rem; max-width: 52ch; }

/* ---------- Buttons ---------- */
.btn-primary {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  padding: 0.8rem 1.6rem;
  border-radius: 10px;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent);
  transition: transform 0.12s ease, filter 0.15s ease;
}

.btn-primary:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.05); }
.btn-primary:disabled { opacity: 0.7; cursor: progress; }

.btn-ghost {
  appearance: none;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--border);
  padding: 0.55rem 1rem;
  border-radius: 10px;
  margin-top: 1rem;
}

.btn-ghost:hover { background: var(--surface-2); }

/* ---------- Report head ---------- */
.results { margin-top: 2rem; }

.report-head {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 4vw, 2.5rem);
  flex-wrap: wrap;
}

.gauge-wrap { position: relative; width: 180px; height: 180px; flex: none; }
.gauge { width: 100%; height: 100%; }
.gauge-track { fill: none; stroke: var(--surface-2); stroke-width: 10; }
.gauge-arc {
  fill: none;
  stroke: var(--gauge-color);
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.gauge-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gauge-score { font-size: 2.6rem; font-weight: 800; line-height: 1; color: var(--gauge-color); }
.gauge-of { font-size: 0.8rem; color: var(--muted); margin-top: 0.25rem; }

.report-meta { flex: 1; min-width: 240px; }

.meta-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 1.25rem;
  margin: 0.9rem 0 0.4rem;
}

.meta-list dt { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.meta-list dd { margin: 0.1rem 0 0; font-weight: 700; }
.meta-note { margin: 0.4rem 0 0; font-size: 0.82rem; color: var(--muted); }

.pill {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #ffffff;
  background: var(--moderate);
}

.pill-very-low { background: var(--very-low); }
.pill-low { background: var(--low); }
.pill-moderate { background: var(--moderate); color: #1f1300; }
.pill-high { background: var(--high); }
.pill-critical { background: var(--critical); }

/* ---------- Categories ---------- */
.categories { display: grid; gap: 0.95rem; }

.cat-top { display: flex; justify-content: space-between; font-size: 0.92rem; margin-bottom: 0.35rem; }
.cat-name { font-weight: 600; }
.cat-value { color: var(--muted); font-variant-numeric: tabular-nums; }

.cat-track {
  height: 9px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.cat-fill {
  height: 100%;
  width: var(--fill, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.cat-fill-muted { background: var(--border); }

/* ---------- Findings ---------- */
.findings { display: grid; gap: 0.9rem; }
.empty { color: var(--muted); margin: 0; }

.finding {
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  background: var(--surface-2);
}

.finding-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; }
.finding-title { font-size: 1rem; font-weight: 700; }

.finding-points {
  flex: none;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--high) 18%, transparent);
  color: var(--high);
  font-variant-numeric: tabular-nums;
}

.finding-desc { margin: 0.5rem 0 0.6rem; color: var(--muted); font-size: 0.92rem; }

.evidence {
  border-radius: 10px;
  background: var(--field-bg);
  border: 1px dashed var(--border);
  padding: 0.6rem 0.8rem;
}

.evidence-meta { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }

.evidence-text {
  display: block;
  margin-top: 0.3rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86rem;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
}

.finding-rec { margin: 0.65rem 0 0.3rem; font-size: 0.92rem; }
.finding-foot { margin: 0; font-size: 0.76rem; color: var(--muted); }

/* ---------- Recommendations, notes ---------- */
.recommendations { margin: 0; padding-left: 1.25rem; display: grid; gap: 0.6rem; }
.notes { margin: 0; padding-left: 1.25rem; display: grid; gap: 0.5rem; color: var(--muted); font-size: 0.92rem; }
.disclaimer {
  margin: 1.1rem 0 0;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 0.88rem;
  color: var(--muted);
}

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  padding: 1rem 1.5rem 2.5rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 680px) {
  .form-grid { grid-template-columns: 1fr; }
  .report-head { flex-direction: column; align-items: stretch; }
  .gauge-wrap { margin: 0 auto; }
  .btn-primary { width: 100%; }
  .form-footer { flex-direction: column; align-items: stretch; }
  .meta-list { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Phase 2: accounts and history ---------- */
[hidden] { display: none !important; }

.nav-link {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  margin-right: 0.75rem;
}
.nav-link:hover { text-decoration: underline; }

.check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.92rem;
  color: var(--text);
  cursor: pointer;
  margin: 0;
  font-weight: 500;
}
.check input { width: 1rem; height: 1rem; accent-color: var(--accent); margin: 0; }
.check input:disabled + span { opacity: 0.6; cursor: not-allowed; }
.hint-inline { color: var(--muted); font-size: 0.85rem; }

.form-hint-group { display: grid; gap: 0.5rem; }

.container.narrow { max-width: 720px; }

.notice {
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-size: 0.93rem;
  font-weight: 500;
}
.notice-ok { background: color-mix(in srgb, var(--very-low) 14%, transparent); color: var(--text); border: 1px solid color-mix(in srgb, var(--very-low) 40%, transparent); }
.notice-error { background: color-mix(in srgb, var(--critical) 12%, transparent); color: var(--text); border: 1px solid color-mix(in srgb, var(--critical) 40%, transparent); }

.tabs { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; border-bottom: 1px solid var(--border); }
.tabs button {
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  padding: 0.5rem 0.25rem 0.75rem;
  margin-right: 1rem;
  cursor: pointer;
}
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }

.stack { display: grid; gap: 0.9rem; }
.stack .btn-primary { width: 100%; }

.link-btn {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  color: var(--accent);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.link-btn:hover { text-decoration: underline; }

.account-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.row-between h2 { margin: 0; }

.btn-ghost:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-danger { color: var(--critical); border-color: color-mix(in srgb, var(--critical) 45%, transparent); }

.history { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }

.history-item {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  text-align: left;
  font: inherit;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  cursor: pointer;
}
.history-item:hover { border-color: var(--focus); }
.history-main { min-width: 0; display: grid; gap: 0.15rem; }
.history-label { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-date { font-size: 0.8rem; color: var(--muted); }
.history-score { font-weight: 800; font-variant-numeric: tabular-nums; flex: none; }

.pager { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 1rem; }

.detail-summary { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.detail-score { font-size: 1.6rem; font-weight: 800; }
.detail-list { display: grid; gap: 0.6rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.detail-list li { padding: 0.75rem 0.9rem; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.detail-input { font-size: 0.9rem; color: var(--muted); margin: 0.2rem 0; word-break: break-word; }
.detail-input strong { color: var(--text); }

/* ---------- Intro splash (see js/splash.js) ---------- */
html.splash-on body { visibility: hidden; overflow: hidden; }

.splash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  visibility: visible;
  background:
    radial-gradient(900px 480px at 80% 0%, color-mix(in srgb, var(--accent-2) 18%, transparent), transparent 60%),
    radial-gradient(800px 480px at 10% 100%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 60%),
    var(--bg);
  transition: opacity 0.45s ease;
  cursor: pointer;
}
.splash.splash-out { opacity: 0; pointer-events: none; }

.splash-inner { display: grid; justify-items: center; gap: 0.7rem; text-align: center; padding: 1rem; }
.splash-mark { width: 104px; height: 104px; overflow: visible; }

.splash-fill { opacity: 0; animation: splash-fill-in 0.5s ease 0.75s forwards; }
.splash-outline {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.4;
  stroke-linejoin: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: splash-draw 0.85s ease forwards;
}
.splash-check {
  fill: none;
  stroke: #ffffff;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: splash-draw 0.5s ease 1.05s forwards;
}

.splash-name {
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: 0.35em;
  padding-left: 0.35em; /* balances the trailing letter-spacing so the word looks centred */
  opacity: 0;
  transform: translateY(8px);
  animation: splash-rise 0.6s ease 0.8s forwards;
}
.splash-tag {
  color: var(--muted);
  font-size: 0.95rem;
  opacity: 0;
  transform: translateY(8px);
  animation: splash-rise 0.6s ease 1.1s forwards;
}

@keyframes splash-draw { to { stroke-dashoffset: 0; } }
@keyframes splash-fill-in { to { opacity: 1; } }
@keyframes splash-rise { to { opacity: 1; transform: translateY(0); } }

/* ---------- Legal pages and footer ---------- */
.legal h1 { font-size: 1.8rem; margin-bottom: 0.25rem; }
.legal h2 { font-size: 1.15rem; margin: 1.6rem 0 0.4rem; }
.legal p, .legal li { color: var(--text); }
.legal ul { padding-left: 1.2rem; }
.site-footer { text-align: center; padding: 2rem 1rem; color: var(--muted); font-size: 0.9rem; }
.site-footer a { color: var(--muted); }

/* ---------- Pricing ---------- */
.plans { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 1rem; }
.plan h2 { font-size: 1.2rem; }
.plan ul { padding-left: 1.1rem; margin: 0.6rem 0 1rem; color: var(--muted); }
.plan .price { font-size: 1.8rem; font-weight: 800; margin: 0.4rem 0; }
.plan .per { font-size: 0.9rem; font-weight: 500; color: var(--muted); }
.plan-featured { border-color: var(--accent); }
.plan-btn { width: 100%; }
.plans-note { margin-top: 1.5rem; text-align: center; }
button:disabled { opacity: 0.6; cursor: not-allowed; }

/* ---------- Renewal consent ---------- */
.consent { display: flex; gap: 0.6rem; align-items: flex-start; max-width: 42rem; margin: 1.5rem auto 0; font-size: 0.95rem; color: var(--text); }
.consent input { margin-top: 0.3rem; width: 1.1rem; height: 1.1rem; flex: none; }

/* ---------- Support page ---------- */
.log-item { display: grid; gap: 0.15rem; padding: 0.7rem 0; border-bottom: 1px solid var(--border); }
.log-item:last-child { border-bottom: 0; }

/* ---------- Sign-up visibility and mobile layout ---------- */
.tabs { flex-wrap: wrap; border-bottom: 0; gap: 0.5rem; }
.tabs button {
  flex: 1 1 140px;
  min-height: 44px;
  padding: 0.6rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}
.tabs button[aria-selected="true"] { background: var(--accent); color: #ffffff; border-color: var(--accent); }
.new-account { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); display: grid; gap: 0.6rem; justify-items: start; }
.new-account p { margin: 0; color: var(--muted); }
.new-account .btn-primary { width: 100%; }

button, .btn-primary, .btn-ghost, .link-btn { min-height: 44px; }
.field input, .field select, .field textarea { font-size: 16px; min-height: 44px; }

@media (max-width: 640px) {
  .container { padding-left: 16px; padding-right: 16px; }
  .topbar { padding: 0.75rem 16px; }
  .theme-switch { width: 100%; justify-content: center; }
  .hero h1 { font-size: 1.6rem; }
  .card { padding: 1rem; }
  .form-grid { grid-template-columns: 1fr; }
  .account-head { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .plans { grid-template-columns: 1fr; }
  .site-footer { padding: 1.5rem 16px; }
}

/* ---------- Visibility and mobile fixes ---------- */
.topbar .nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: var(--shadow);
}
.topbar .nav-link:hover { background: var(--accent-hover); text-decoration: none; }
.topbar .nav-link:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.topbar .theme-switch { flex-wrap: wrap; }

@media (max-width: 640px) {
  .topbar { justify-content: space-between; gap: 0.6rem; }
  .topbar .nav-link { order: 2; }
  .topbar .theme-switch { order: 3; width: 100%; justify-content: center; }
  .theme-switch button { min-height: 36px; padding: 0.35rem 0.7rem; font-size: 0.85rem; }
  .container { padding-left: 16px; padding-right: 16px; }
  input, select, textarea { font-size: 16px; min-height: 44px; }
  button, .btn-primary, .btn-ghost { min-height: 44px; }
  .plans { grid-template-columns: 1fr; }
  .tabs { overflow-x: auto; }
  body { overflow-x: hidden; }
}

/* Menu, landing page and guided steps */
.menu-wrap { position: relative; margin-left: 8px; }
.menu-btn { min-width: 44px; min-height: 44px; border-radius: 999px; border: 1px solid #d4d4d8; background: transparent; color: inherit; font-size: 22px; line-height: 1; cursor: pointer; }
.menu-btn:focus-visible { outline: 3px solid #4f46e5; outline-offset: 2px; }
.menu-list { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; margin: 0; padding: 6px; list-style: none; background: #ffffff; color: #111827; border: 1px solid #d4d4d8; border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18); z-index: 50; }
.menu-list[hidden] { display: none; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border: 0; background: none; border-radius: 8px; color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.menu-icon { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.menu-item:hover .menu-icon, .menu-item:focus-visible .menu-icon { stroke: var(--accent-2); }
@media (prefers-reduced-motion: no-preference) {
  .menu-item:hover .menu-icon { transform: translateX(2px); transition: transform 0.2s ease; }
}
.menu-item:hover, .menu-item:focus-visible { background: rgba(127, 127, 127, 0.15); text-decoration: none; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.steps { padding-left: 22px; line-height: 1.6; }
.steps li { margin-bottom: 8px; }

/* ---------- Home page (v4.12) ---------- */

.home-main { max-width: 1080px; }
.section { margin: 3.5rem 0; }
.section-title { font-size: clamp(1.45rem, 2.6vw, 1.9rem); margin: 0 0 0.5rem; letter-spacing: -0.01em; }
.section-lead { color: var(--muted); max-width: 62ch; margin: 0 0 1.5rem; }
.grad { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { display: inline-block; margin: 0 0 0.75rem; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-2); }
.hero-home { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2.5rem; align-items: center; padding: 1.5rem 0 2.5rem; }
.hero-home h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); line-height: 1.12; margin: 0; letter-spacing: -0.02em; }
.hero-note { margin-top: 1rem; }
.hero-art { position: relative; display: grid; justify-items: center; gap: 1.25rem; }

/* Shield draws itself, then a scan line passes over it */
.shield-wrap { position: relative; width: 120px; height: 140px; }
.shield { width: 100%; height: 100%; overflow: visible; }
.shield-outline { stroke-dasharray: 340; stroke-dashoffset: 340; animation: draw 1.6s ease forwards; }
.shield-tick { stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw 0.7s 1.5s ease forwards; }
.scan-line { position: absolute; left: -10%; right: -10%; height: 3px; top: 0; border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--accent-2), transparent); opacity: 0; animation: scan 3.2s 0.4s ease-in-out infinite; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes scan { 0% { top: 0; opacity: 0; } 15% { opacity: 0.9; } 85% { opacity: 0.9; } 100% { top: 100%; opacity: 0; } }

/* Report mock: rows appear one by one */
.report-mock { width: min(360px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.1rem; }
.report-row { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0; border-bottom: 1px dashed var(--border); font-size: 0.93rem; opacity: 0; animation: rise 0.5s ease forwards; animation-delay: var(--d); }
.report-src { margin-top: 0.7rem; font-size: 0.8rem; color: var(--muted); opacity: 0; animation: rise 0.5s ease forwards; animation-delay: var(--d); }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.dot-ok { background: var(--low); box-shadow: 0 0 0 4px color-mix(in srgb, var(--low) 20%, transparent); }
.dot-warn { background: var(--high); box-shadow: 0 0 0 4px color-mix(in srgb, var(--high) 20%, transparent); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Ticker */
.ticker { overflow: hidden; border-block: 1px solid var(--border); background: var(--surface); margin: 0 -16px; }
.ticker-track { display: flex; gap: 2.5rem; width: max-content; padding: 0.9rem 0; animation: ticker 28s linear infinite; }
.ticker-track span { white-space: nowrap; color: var(--muted); font-weight: 600; font-size: 0.92rem; }
.ticker-track span::before { content: "\2022"; color: var(--accent-2); margin-right: 2.5rem; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Cards and tiles */
.grid-3 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.tile h3, .sign h3 { margin: 0.5rem 0 0.4rem; font-size: 1.05rem; }
.tile { transition: transform 0.25s ease, box-shadow 0.25s ease; }
.tile:hover, .sign:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12); }
.tile-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, transparent), color-mix(in srgb, var(--accent-2) 22%, transparent)); }
.tile-icon svg { width: 24px; height: 24px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sign { border-left: 4px solid var(--high); }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 1.25rem; }
.timeline li { display: grid; grid-template-columns: 48px 1fr; gap: 1rem; align-items: start; position: relative; }
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 23px; top: 50px; bottom: -22px; width: 2px; background: var(--border); }
.step-num { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 35%, transparent); }
.timeline h3 { margin: 0.6rem 0 0.25rem; font-size: 1.05rem; }

/* Split section */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; }
.sample { border-top: 4px solid var(--accent); }
.sample-label { margin: 0 0 0.5rem; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); }
.sample-title { margin: 0 0 0.4rem; font-weight: 700; font-size: 1.1rem; }
.sample-meta { margin: 0.8rem 0 0; font-size: 0.85rem; color: var(--muted); }

/* Checklist */
.checklist { display: grid; gap: 0.6rem; }
.check-item { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.85rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.check-item:hover { border-color: var(--accent); }
.check-item input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: 0 0 auto; }
.check-item input:checked + span { text-decoration: line-through; color: var(--muted); }

/* Verify card and about */
.verify-card, .about-card { padding: 2rem; }
.verify-card .section-title, .about-card .section-title { margin-top: 0; }
.about-card p { margin: 0 0 0.6rem; }

/* FAQ */
.faq { display: grid; gap: 0.6rem; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.9rem 1.1rem; }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0.6rem 0 0.2rem; }

/* Reveal on scroll (only when home.js has run) */
.js-anim .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js-anim .reveal.is-in { opacity: 1; transform: none; }
.js-anim .tile.reveal.is-in:hover, .js-anim .sign.reveal.is-in:hover { transform: translateY(-3px); }

@media (max-width: 760px) {
  .hero-home, .split { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .section { margin: 2.5rem 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .report-row, .report-src { opacity: 1; }
  .shield-outline, .shield-tick { stroke-dashoffset: 0; }
  .scan-line { display: none; }
}

/* ---------- Home page additions (v4.12) ----------
   Animations are CSS only. Delays are classes, not inline styles, because the CSP blocks inline style attributes.
   Everything is shown, without motion, for people who prefer reduced motion. */

.report-row.row-1 { animation-delay: 0.2s; }
.report-row.row-2 { animation-delay: 0.9s; }
.report-row.row-3 { animation-delay: 1.6s; }
.report-row.row-4 { animation-delay: 2.3s; }
.report-src.row-5 { animation-delay: 3s; }

/* Scam path: nodes light up one after another, joined by lines that draw in. */
.flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center; gap: 0.4rem; }
.flow-node { display: grid; justify-items: center; text-align: center; gap: 0.3rem; padding: 0.9rem 0.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.flow-node strong { font-size: 0.92rem; }
.flow-node small { color: var(--muted); font-size: 0.78rem; line-height: 1.3; }
.flow-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.flow-node.danger .flow-icon { background: var(--critical); }
.flow-line { height: 3px; background: var(--border); border-radius: 3px; position: relative; overflow: hidden; }
.flow-line::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transform: scaleX(0); transform-origin: left; }
.flow-note { margin-top: 1rem; text-align: center; }

@media (prefers-reduced-motion: no-preference) {
  .flow-node { animation: flow-glow 6s ease-in-out infinite; }
  .flow-line::after { animation: flow-draw 6s ease-in-out infinite; }
  .node-2 { animation-delay: 0.3s; }
  .node-3 { animation-delay: 0.6s; }
  .node-4 { animation-delay: 0.9s; }
  .node-5 { animation-delay: 1.2s; }
  .line-1::after { animation-delay: 0.1s; }
  .line-2::after { animation-delay: 0.4s; }
  .line-3::after { animation-delay: 0.7s; }
  .line-4::after { animation-delay: 1.0s; }
}

@keyframes flow-glow {
  0%, 100% { transform: translateY(0); box-shadow: var(--shadow); }
  10%, 20% { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(79, 70, 229, 0.25); }
}
@keyframes flow-draw {
  0%, 4% { transform: scaleX(0); }
  14%, 100% { transform: scaleX(1); }
}

/* Steps grid */
.steps-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); counter-reset: step; }
.step-card { position: relative; padding-top: 1.6rem; }
.step-card h3 { margin: 0.6rem 0 0.35rem; font-size: 1.05rem; }
.step-badge { position: absolute; top: -14px; left: 1.1rem; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: var(--shadow); }

/* Search demo: the name types itself, then results appear one by one. */
.split-lists { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.split-lists h3 { margin-top: 0; }
.demo { display: grid; gap: 0.7rem; }
.demo-bar { display: flex; align-items: center; gap: 2px; padding: 0.7rem 0.9rem; border: 1px solid var(--border); border-radius: 10px; background: var(--field-bg); font-weight: 600; overflow: hidden; }
.demo-typed { white-space: nowrap; overflow: hidden; display: inline-block; }
.demo-caret { width: 2px; height: 1.1em; background: var(--accent); }
.demo-result { display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.7rem 0.8rem; border-radius: 10px; background: var(--surface-2); opacity: 0; }
.demo-result strong { display: block; font-size: 0.93rem; }
.demo-result small { color: var(--muted); }
.demo-result .dot { margin-top: 0.45rem; }
.demo-note { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.82rem; }

@media (prefers-reduced-motion: no-preference) {
  .demo-typed { animation: demo-type 6s steps(24, end) infinite; }
  .demo-caret { animation: demo-blink 0.9s step-end infinite; }
  .demo-result { animation: demo-in 6s ease infinite; }
  .demo-result.r1 { animation-delay: 1.6s; }
  .demo-result.r2 { animation-delay: 2.6s; }
  .demo-result.r3 { animation-delay: 3.6s; }
}
.demo-result.r1, .demo-result.r2, .demo-result.r3 { opacity: 1; }

@keyframes demo-type {
  0% { max-width: 0; }
  25%, 100% { max-width: 26ch; }
}
@keyframes demo-blink { 50% { opacity: 0; } }
@keyframes demo-in {
  0%, 10% { opacity: 0; transform: translateY(6px); }
  18%, 88% { opacity: 1; transform: none; }
  96%, 100% { opacity: 0; }
}

/* Protect card with an animated padlock */
.protect { display: grid; grid-template-columns: 150px 1fr; gap: 2rem; align-items: center; padding: 2rem; }
.lock-art svg { width: 100%; max-width: 130px; display: block; margin: 0 auto; }
.lock-body { fill: var(--accent); }
.lock-shackle { fill: none; stroke: var(--accent-2); stroke-width: 6; stroke-linecap: round; }
.lock-key { fill: var(--surface); }
.lock-slot { fill: var(--surface); }

@media (prefers-reduced-motion: no-preference) {
  .lock-shackle { animation: lock-close 4s ease-in-out infinite; transform-origin: 48px 44px; }
  .lock-body { animation: lock-pulse 4s ease-in-out infinite; transform-origin: 48px 86px; }
}
@keyframes lock-close {
  0%, 25% { transform: translateY(-10px); }
  45%, 90% { transform: translateY(0); }
  100% { transform: translateY(-10px); }
}
@keyframes lock-pulse {
  0%, 45%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

@media (max-width: 760px) {
  .flow { grid-template-columns: 1fr; }
  .flow-line { width: 3px; height: 26px; justify-self: center; }
  .flow-line::after { transform-origin: top; }
  @media (prefers-reduced-motion: no-preference) {
    .flow-line::after { animation-name: flow-draw-v; }
  }
  .protect { grid-template-columns: 1fr; text-align: center; }
  .protect .notes { text-align: left; }
}
@keyframes flow-draw-v {
  0%, 4% { transform: scaleY(0); }
  14%, 100% { transform: scaleY(1); }
}


/* ---------- v4.13: menu entrance and verification seal ----------
   The menu items slide in one after another. The seal stamps down onto the verification card once.
   Both are off for people who prefer reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .menu-list:not([hidden]) .menu-item {
    animation: menu-in 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    animation-delay: calc(var(--i, 0) * 45ms);
  }
  .verify-seal { animation: seal-stamp 0.9s cubic-bezier(0.3, 1.4, 0.5, 1) 0.2s both; }
  .verify-seal .seal-ring { animation: seal-spin 24s linear infinite; transform-origin: 50px 50px; }
}
@keyframes menu-in {
  from { opacity: 0; transform: translateX(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes seal-stamp {
  0% { opacity: 0; transform: scale(1.6) rotate(-14deg); }
  60% { opacity: 1; transform: scale(0.94) rotate(3deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes seal-spin { to { transform: rotate(360deg); } }
.verify-card { display: grid; grid-template-columns: 1fr 120px; gap: 1.5rem; align-items: center; }
.verify-seal { width: 120px; height: 120px; }
.verify-seal circle, .verify-seal path { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.verify-seal .seal-fill { fill: var(--surface-2); stroke: none; }
.verify-seal text { fill: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: 0.12em; }
@media (max-width: 720px) {
  .verify-card { grid-template-columns: 1fr; }
  .verify-seal { order: -1; width: 88px; height: 88px; }
}

/* Menu marker for business verification. */
.menu-item-accent::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); margin-left: 0.5rem; vertical-align: middle; }
@media (prefers-reduced-motion: no-preference) {
  .menu-item-accent::after { animation: menu-dot 2.4s ease-in-out infinite; }
}
@keyframes menu-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.6); opacity: 0.45; }
}

/* Public web search record (check page) */
.search-record { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1rem; margin: 0 0 0.9rem; font-size: 0.9rem; }
.search-record dt { color: var(--muted); }
.search-record dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.search-summary { margin: 0 0 0.4rem; font-weight: 600; }
.search-sites { margin: 0.2rem 0 0.9rem; padding-left: 1.2rem; font-size: 0.9rem; }
.search-results { margin: 0.4rem 0 0.9rem; padding-left: 1.4rem; display: grid; gap: 0.2rem; }
.search-results .log-item { padding: 0.5rem 0; }
.search-copy { margin-top: 0.4rem; }
@media (max-width: 480px) {
  .search-record { grid-template-columns: 1fr; gap: 0.1rem; }
  .search-record dt { margin-top: 0.4rem; }
}

/* Guided check form and plain-language report */
.form-step { grid-column: 1 / -1; margin-top: 0.8rem; padding-top: 0.8rem; border-top: 1px solid var(--border); }
.form-step:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.form-step h3 { margin: 0 0 0.2rem; font-size: 1.02rem; }
.form-step .hint { margin: 0; }
.summary-headline { margin: 0 0 0.5rem; font-weight: 700; font-size: 1.05rem; }
.hint-block { margin: 0 0 0.5rem; max-width: 70ch; }
.summary-sub { margin: 1rem 0 0.4rem; font-size: 0.95rem; }
.plain-explain { margin: 0.2rem 0 0.4rem; display: grid; gap: 0.25rem; font-size: 0.92rem; }
.plain-explain dt { font-weight: 600; }
.plain-explain dd { margin: 0; }

/* Company line in the site footer */
.site-copy { margin: 0.6rem 0 0; font-size: 0.82rem; color: var(--muted); }

/* Rating explainer */
.level-guide { list-style: none; padding: 0; margin: 0.6rem 0; display: grid; gap: 0.7rem; }
.level-guide li { display: grid; grid-template-columns: max-content 1fr; gap: 0.6rem; align-items: start; font-size: 0.92rem; }
@media (max-width: 480px) { .level-guide li { grid-template-columns: 1fr; } }
.level-guide .pill { justify-self: start; width: max-content; }

/* Business registration blocks */
.benefit-list { padding-left: 1.2em; margin: 0.8em 0 1.2em; display: grid; gap: 0.5em; }
.register-card { margin-top: 1.5em; }

/* Help button and help page */
.help-fab { position: fixed; right: 16px; bottom: 16px; z-index: 50; padding: 0.55em 1em; border-radius: 999px; background: var(--accent, #4f46e5); color: #fff; text-decoration: none; font-weight: 600; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.help-page h2 { margin-top: 1.6em; }
.help-page details { margin: 0.6em 0; }
.help-page summary { cursor: pointer; font-weight: 600; }
.help-page details p { margin: 0.4em 0 0.8em; }
