/* ============ Tokens (from the Claude Design canvas) ============ */
:root {
  --bg: #07070a;
  --bg-card: #0e0e13;
  --bg-panel: #0a0a0d;
  --border: #1d1d25;
  --border-soft: #1a1a22;
  --rule: #17171e;
  --text: #f2f2f5;
  --text-body: #e8e8ee;
  --muted: #9a9aa6;
  --muted-2: #a8a8b4;
  --label: #7b7b87;
  --faint: #8f8f9b;
  --danger: #ff6b3d;
  --danger-soft: #ff8a5c;
  --danger-deep: #ff5a2b;
  --safe: #4fd1b1;
  --safe-bright: #68dcc0;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3 { margin: 0; letter-spacing: -0.012em; }
p { margin: 0; }
a { color: var(--safe); text-decoration: none; }
a:hover { color: var(--safe-bright); }

@keyframes revealCursor { 0%,49%{opacity:1} 50%,100%{opacity:0} }
@keyframes recPulse { 0%,100%{opacity:1} 50%{opacity:.25} }
@keyframes rowIn { from { opacity:0; transform: translateY(4px);} to { opacity:1; transform:none;} }

/* ============ Sticky trust banner + meter ============ */
.trust-banner {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 10px;
  height: 32px; padding: 0 18px;
  background: #0b1614; border-bottom: 1px solid #172a26;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.13em; color: var(--safe-bright);
  white-space: nowrap; overflow: hidden;
}
.trust-banner .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--safe); flex: none; }

.meter {
  position: sticky; top: 32px; z-index: 59;
  display: flex; align-items: center; gap: 12px;
  height: 30px; padding: 0 18px;
  background: rgba(10,10,13,0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-soft);
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.18em;
}
.meter-label { color: var(--faint); flex: none; }
.meter-track { flex: 1; height: 3px; background: #17171e; border-radius: 2px; overflow: hidden; max-width: 340px; }
.meter-fill { height: 100%; width: 2%; background: linear-gradient(90deg, var(--danger-soft), var(--danger-deep)); border-radius: 2px; transition: width 0.9s cubic-bezier(.2,.7,.3,1); }
.meter-stage { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meter-verdict { color: var(--danger-soft); font-weight: 600; margin-left: auto; white-space: nowrap; }

/* ============ Hero ============ */
.hero {
  min-height: calc(100vh - 62px);
  display: flex; flex-direction: column;
  padding: 64px 24px 24px; max-width: 1240px; margin: 0 auto;
}
.rec-badge {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; color: var(--danger-soft);
  border: 1px solid rgba(255,107,61,0.3); border-radius: 999px; padding: 7px 14px;
  background: rgba(255,107,61,0.06); margin-bottom: 38px;
}
.rec-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--danger); animation: recPulse 1.6s infinite; }
.hero h1 { font-size: clamp(34px, 5.4vw, 62px); font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; }
.hero h1 em { font-style: normal; color: var(--danger-soft); }
.hero-sub { margin-top: 22px; font-size: clamp(15px, 1.6vw, 18px); line-height: 1.6; color: var(--muted-2); max-width: 54ch; }

.hero-facts { margin-top: 44px; max-width: 640px; }
.hf { display: flex; align-items: baseline; gap: 22px; padding: 10px 0; border-top: 1px solid var(--rule); }
.hf:last-child { border-bottom: 1px solid var(--rule); }
.hk { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; color: var(--muted); width: 172px; flex: none; }
.hv { font-family: var(--mono); font-size: 17px; color: var(--text); text-shadow: 0 0 22px rgba(255,107,61,0.28); word-break: break-word; min-height: 24px; }
.cursor { display: inline-block; width: 9px; height: 17px; background: var(--danger); margin-left: 3px; vertical-align: -2px; animation: revealCursor 1s steps(1) infinite; }

.scroll-cue { margin-top: auto; padding-top: 56px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.scroll-cue span { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.2em; color: var(--faint); }
.cue-line { width: 1px; height: 42px; background: linear-gradient(180deg, #3a3a46, rgba(58,58,70,0)); }

/* ============ Sections ============ */
main { max-width: 1240px; margin: 0 auto; padding: 0 24px 96px; }
.section-lede { display: flex; align-items: center; gap: 16px; padding: 20px 0 34px; }
.section-lede span { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.2em; color: var(--muted); flex: none; }
.lede-line { height: 1px; flex: 1; background: var(--border-soft); }

.card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
  padding: 32px 36px 28px; margin-bottom: 24px;
}
.card-critical { border-color: rgba(255,90,43,0.28); box-shadow: 0 0 60px rgba(255,90,43,0.05); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.card-title { display: flex; gap: 16px; }
.icon-box {
  width: 34px; height: 34px; border: 1px solid #2a2a34; border-radius: 10px;
  display: grid; place-items: center; flex: none; margin-top: 2px;
}
.sec-num { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.2em; color: var(--muted); }
.sec-num-teal { color: var(--safe); }
.card h2 { margin-top: 5px; font-size: 23px; font-weight: 600; }
.live-tag { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; color: var(--danger-soft); }

.badge {
  display: flex; align-items: center; gap: 9px; flex: none;
  border-radius: 999px; padding: 7px 13px 7px 11px;
  font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: 0.14em;
}
.badge .bars { display: flex; gap: 2px; align-items: flex-end; }
.badge .bars i { width: 3px; height: 11px; border-radius: 1px; display: block; }
.badge-high { border: 1px solid rgba(255,138,92,0.3); background: rgba(255,138,92,0.08); color: var(--danger-soft); }
.badge-high .bars i { background: var(--danger-soft); }
.badge-med { border: 1px solid rgba(232,176,122,0.3); background: rgba(232,176,122,0.07); color: #e8b07a; }
.badge-med .bars i { background: #e8b07a; }
.badge-critical { border: 1px solid rgba(255,90,43,0.4); background: rgba(255,90,43,0.1); color: var(--danger-deep); }
.badge-critical .bars i { background: var(--danger-deep); }
.badge .bars i.off { background: #33333d !important; }

/* Plain-language one-line intro under each section title */
.sec-intro {
  font-size: 15px; line-height: 1.6; color: var(--muted-2);
  max-width: 68ch; margin: -6px 0 22px; text-wrap: pretty;
}

/* Data rows */
.rows { display: grid; grid-template-columns: 232px 1fr; column-gap: 28px; border-top: 1px solid var(--border-soft); }
.k, .v { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.k { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; color: var(--label); align-self: start; padding-top: 15px; }
.v { font-family: var(--mono); font-size: 14.5px; color: var(--text-body); word-break: break-word; }
.v.revealed { animation: rowIn 0.5s ease both; }
.v-small { font-size: 11.5px; color: var(--muted-2); line-height: 1.6; }
.v.blocked { color: var(--safe); }
.v .note { display: block; font-size: 10.5px; color: var(--faint); margin-top: 4px; letter-spacing: 0.02em; line-height: 1.5; }
.v.blocked .note { color: #95b3aa; }
.note-inline { font-size: 10.5px; color: var(--faint); }
.chip {
  display: inline-block; font-size: 8.5px; letter-spacing: 0.12em; color: #b98a74;
  border: 1px solid rgba(185,138,116,0.35); border-radius: 4px; padding: 1.5px 5px;
  margin-left: 7px; vertical-align: 1px; white-space: nowrap;
}

.callout {
  margin-top: 18px; padding: 14px 18px; border: 1px solid rgba(255,107,61,0.35);
  border-radius: 10px; background: rgba(255,107,61,0.07);
  font-size: 14px; line-height: 1.6; color: #ffb499;
}

.subcard { margin-top: 20px; border: 1px solid var(--border-soft); border-radius: 10px; padding: 16px 18px; background: var(--bg-panel); }
.subcard-title { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.18em; color: var(--faint); margin-bottom: 10px; }
.headers-pre {
  margin: 0; font-family: var(--mono); font-size: 11.5px; line-height: 1.7; color: var(--muted-2);
  white-space: pre-wrap; word-break: break-all; max-height: 260px; overflow-y: auto;
}
.headers-pre b { color: var(--danger-soft); font-weight: 500; }

/* Explainers */
.explain { margin-top: 14px; }
.explain summary {
  display: flex; align-items: center; gap: 11px; padding: 8px 0; min-height: 44px;
  cursor: pointer; list-style: none;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; color: var(--safe); text-transform: uppercase;
}
.explain summary::-webkit-details-marker { display: none; }
.toggle-box {
  width: 20px; height: 20px; border: 1px solid rgba(79,209,177,0.4); border-radius: 5px;
  display: grid; place-items: center; font-size: 12px; line-height: 1; flex: none;
}
.toggle-box::before { content: '+'; }
.explain[open] .toggle-box::before { content: '−'; }
.explain-body { border-top: 1px solid var(--border-soft); padding-top: 20px; margin-top: 6px; }
.explain-body p { font-size: 15.5px; line-height: 1.65; color: var(--muted-2); max-width: 70ch; text-wrap: pretty; }
.explain-body p + p { margin-top: 14px; }

/* "This section was blocked — good" banner (teal = protected) */
.blocked-banner {
  border: 1px solid rgba(79,209,177,0.4); background: rgba(79,209,177,0.07);
  border-radius: 12px; padding: 18px 20px; margin-bottom: 20px;
  font-size: 14.5px; line-height: 1.6; color: #95b3aa;
}
.blocked-banner strong { display: block; margin-bottom: 8px; color: var(--safe-bright); font-weight: 600; font-size: 15.5px; }

/* Fingerprint centrepiece */
.fp-hero { text-align: center; padding: 26px 0 30px; border-top: 1px solid var(--border-soft); margin-bottom: 4px; }
.fp-label { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.22em; color: var(--muted); }
.fp-hash {
  font-family: var(--mono); font-size: clamp(15px, 2.6vw, 24px); font-weight: 600; letter-spacing: 0.04em;
  color: var(--danger-soft); text-shadow: 0 0 34px rgba(255,107,61,0.35);
  margin: 14px 0 10px; word-break: break-all;
}
.fp-onein { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; color: var(--muted-2); }
.fp-scramble {
  max-width: 60ch; margin: 18px auto 0; padding: 12px 16px;
  border: 1px solid rgba(79,209,177,0.4); background: rgba(79,209,177,0.07); border-radius: 10px;
  font-size: 13.5px; line-height: 1.55; color: #95b3aa; text-wrap: pretty;
}
.fp-canvas { background: #fff; border-radius: 6px; max-width: 100%; height: auto; }

/* Behaviour trail */
.trail-wrap { margin-top: 20px; border: 1px solid var(--border-soft); border-radius: 10px; padding: 14px 16px; background: var(--bg-panel); }
.trail-canvas { width: 100%; height: 140px; display: block; }

/* Permissions */
.perm-lede { font-size: 15.5px; line-height: 1.6; color: var(--muted-2); max-width: 64ch; margin-bottom: 24px; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.perm-card { border: 1px solid var(--border-soft); border-radius: 12px; padding: 20px; background: var(--bg-panel); display: flex; flex-direction: column; gap: 10px; }
.perm-name { font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; color: var(--danger-soft); }
.perm-card p { font-size: 13.5px; line-height: 1.55; color: var(--muted-2); flex: 1; }
.perm-btn {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em;
  background: rgba(255,107,61,0.1); color: var(--danger-soft);
  border: 1px solid rgba(255,107,61,0.4); border-radius: 8px;
  padding: 12px 14px; min-height: 44px; cursor: pointer; transition: background 0.15s;
}
.perm-btn-row { display: flex; gap: 8px; }
.perm-btn-row .perm-btn { flex: 1; padding: 12px 8px; }
.perm-btn:hover { background: rgba(255,107,61,0.18); }
.perm-btn:disabled { opacity: 0.45; cursor: default; }
.perm-out {
  font-family: var(--mono); font-size: 12px; line-height: 1.7; color: var(--text-body);
  border-top: 1px solid var(--rule); padding-top: 10px; word-break: break-word;
  white-space: pre-wrap; max-height: 180px; overflow-y: auto;
}
.perm-states { margin-top: 22px; }

/* Finale */
.finale { text-align: center; padding: 90px 12px 70px; }
.finale-hash {
  font-family: var(--mono); font-size: clamp(16px, 3vw, 30px); font-weight: 600; letter-spacing: 0.05em;
  color: var(--danger-soft); text-shadow: 0 0 44px rgba(255,107,61,0.4);
  margin: 26px 0 18px; word-break: break-all;
}
.finale-headline { font-size: clamp(26px, 3.6vw, 40px); font-weight: 700; letter-spacing: -0.018em; }
.finale-body { margin: 20px auto 0; font-size: 16px; line-height: 1.65; color: var(--muted-2); max-width: 62ch; text-wrap: pretty; }
.scorecard {
  display: inline-flex; align-items: center; gap: 14px; margin-top: 34px;
  border: 1px solid var(--border); border-radius: 999px; padding: 12px 22px;
  font-family: var(--mono); font-size: 12px; color: var(--text-body); flex-wrap: wrap; justify-content: center;
}
.sc-browser { color: var(--danger-soft); letter-spacing: 0.14em; font-size: 10px; }
.scorecard-note { margin-top: 14px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; color: var(--faint); }

/* Good news */
.goodnews { border-top: 1px solid #17322c; padding: 70px 0 30px; }
.goodnews h2 { font-size: clamp(24px, 3.2vw, 34px); font-weight: 700; margin-top: 10px; }
.gn-lede { margin-top: 14px; font-size: 16px; line-height: 1.6; color: var(--muted-2); max-width: 56ch; }
.gn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 36px; }
.gn-card { border: 1px solid #17322c; border-radius: 12px; padding: 22px; background: #0b1210; }
.gn-n {
  font-family: var(--mono); font-size: 11px; color: var(--safe);
  width: 26px; height: 26px; border: 1px solid rgba(79,209,177,0.4); border-radius: 8px;
  display: grid; place-items: center; margin-bottom: 14px;
}
.gn-card h3 { font-size: 16.5px; font-weight: 600; color: var(--text); }
.gn-card p { margin-top: 8px; font-size: 14px; line-height: 1.6; color: #95b3aa; }

/* Footer */
footer { border-top: 1px solid var(--border-soft); padding: 44px 0 60px; }
footer p { font-size: 15px; line-height: 1.65; color: var(--muted-2); max-width: 66ch; }
.foot-honest { margin-top: 14px; font-size: 13px; color: var(--faint); }
.nodata {
  display: inline-block; margin-top: 24px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; color: var(--safe);
  border: 1px solid rgba(79,209,177,0.35); border-radius: 999px; padding: 8px 16px;
}

/* ============ Mobile ============ */
@media (max-width: 767px) {
  .trust-banner { font-size: 9px; padding: 0 12px; }
  .meter { padding: 0 12px; gap: 8px; }
  .meter-stage { display: none; }
  .hero { padding: 44px 18px 20px; }
  .hero-facts { margin-top: 34px; }
  .hf { flex-direction: column; gap: 4px; }
  .hk { width: auto; }
  main { padding: 0 14px 72px; }
  .card { padding: 22px 18px 20px; border-radius: 12px; }
  .card-head { flex-direction: column; gap: 14px; }
  .badge { align-self: flex-start; }
  .rows { grid-template-columns: 1fr; border-top: 1px solid var(--border-soft); }
  .k { border-bottom: 0; padding: 12px 0 2px; }
  .v { padding: 0 0 12px; }
  .finale { padding: 64px 6px 50px; }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cursor, .rec-dot { animation: none; }
  .v.revealed { animation: none; }
  .meter-fill { transition: none; }
}
