:root {
  color-scheme: dark;
  --bg: #07090c;
  --bg-2: #0b0e13;
  --panel: #11161d;
  --panel-2: #161d26;
  --line: #232c37;
  --line-soft: #1a212a;
  --text: #eef4f8;
  --muted: #8d9aa8;
  --soft: #c5d0da;
  --green: #3ddc97;
  --amber: #f4b740;
  --red: #fb6470;
  --blue: #6ea8ff;
  --gray: #7b8794;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  --radius: 14px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(1100px 460px at 70% -8%, rgba(110, 168, 255, 0.08), transparent 60%),
    radial-gradient(900px 420px at 0% 0%, rgba(61, 220, 151, 0.05), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

/* ---------- Top nav (shared) ---------- */
.topnav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(9, 12, 16, 0.82);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.topnav .brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  letter-spacing: -0.2px;
  font-size: 16px;
}
.topnav .brand .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(61, 220, 151, 0.16);
}
.topnav .navlinks { display: flex; align-items: center; gap: 6px; }
.topnav .navlinks a {
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  transition: color 0.15s, background 0.15s;
}
.topnav .navlinks a:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.topnav .navlinks a.active { color: var(--text); background: rgba(110, 168, 255, 0.14); }

/* ---------- Layout ---------- */
.shell {
  width: min(1140px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 48px;
}

.topbar,
.section-head,
.status-line,
.metric-row,
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.topbar { margin-bottom: 24px; align-items: flex-end; }

.eyebrow {
  margin: 0 0 7px;
  color: var(--blue);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(26px, 4vw, 33px); line-height: 1.08; letter-spacing: -0.5px; }
h2 { margin-bottom: 0; font-size: 19px; line-height: 1.2; letter-spacing: -0.2px; }
.sub { color: var(--muted); }

.update-block {
  padding: 9px 13px;
  border: 1px solid var(--line);
  background: rgba(16, 21, 27, 0.6);
  border-radius: var(--radius-sm);
  text-align: right;
  white-space: nowrap;
}
.update-block span, .metric-row span, .score-copy span {
  display: block; color: var(--muted); font-size: 11.5px; letter-spacing: 0.2px;
}
.update-block strong, .metric-row strong, .score-copy strong { color: var(--text); font-size: 15px; }

/* ---------- Panels ---------- */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(230px, 0.78fr) minmax(280px, 1fr);
  gap: 14px;
}
.status-panel, .score-panel, .chart-panel, .section, .method-panel {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(22, 29, 38, 0.9), rgba(13, 17, 23, 0.94));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.status-panel { padding: 24px; }
.status-panel h2 { margin-top: 22px; font-size: 27px; letter-spacing: -0.4px; }
.state-message { margin: 11px 0 26px; color: var(--soft); line-height: 1.6; }

.pill {
  display: inline-flex; align-items: center; min-height: 27px;
  padding: 5px 11px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.045);
  color: var(--soft); font-size: 12px; font-weight: 700; letter-spacing: 0.2px;
}
.pill.green { color: var(--green); background: rgba(61, 220, 151, 0.1); border-color: rgba(61, 220, 151, 0.22); }
.pill.amber { color: var(--amber); background: rgba(244, 183, 64, 0.1); border-color: rgba(244, 183, 64, 0.22); }
.pill.red { color: var(--red); background: rgba(251, 100, 112, 0.1); border-color: rgba(251, 100, 112, 0.22); }
.pill.blue { color: var(--blue); background: rgba(110, 168, 255, 0.1); border-color: rgba(110, 168, 255, 0.22); }
.pill.gray, .pill.muted { color: var(--muted); }

.metric-row {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-top: 18px; border-top: 1px solid var(--line-soft); gap: 12px;
}

.score-panel { display: grid; place-items: center; padding: 24px; text-align: center; }
.score-ring {
  --angle: 0deg;
  width: 178px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--panel) 0 57%, transparent 58%),
    conic-gradient(var(--ring-color, var(--amber)) var(--angle), rgba(255, 255, 255, 0.07) 0);
  position: relative;
}
.score-ring span { font-size: 48px; font-weight: 800; letter-spacing: -1px; line-height: 1; }
.score-ring small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.score-copy { margin-top: 16px; }
.score-copy strong { font-size: 17px; }
.score-copy p { margin: 8px 0 0; color: var(--soft); font-size: 13px; }

.chart-panel { padding: 18px 18px 8px; }
.sparkline { width: 100%; height: 196px; margin-top: 10px; }
.sparkline svg { width: 100%; height: 100%; }

/* ---------- Sections ---------- */
.section { margin-top: 14px; padding: 22px; }
.section-head { margin-bottom: 18px; align-items: flex-end; }
.section-head.compact { margin-bottom: 12px; }
.section-head p { max-width: 520px; color: var(--muted); line-height: 1.45; font-size: 13.5px; }

.component-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
}
.component {
  display: block; min-height: 150px; padding: 16px 16px 18px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.022);
  border-radius: var(--radius-sm);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
a.component:hover { transform: translateY(-2px); border-color: rgba(110, 168, 255, 0.4); background: rgba(110, 168, 255, 0.04); }
.component h3 {
  margin: 0 0 12px; font-size: 12px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.component strong { display: block; margin-bottom: 10px; font-size: 25px; font-weight: 800; letter-spacing: -0.5px; }
.component p { margin: 11px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }

/* Uniform card header: value on its own line, status pill always on the next line,
   so every monitor card has identical structure regardless of content length. */
.comp-head { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.comp-head strong { margin: 0; font-size: 25px; white-space: nowrap; }
.component .stats {
  display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px;
  padding-top: 11px; border-top: 1px solid var(--line-soft);
}
.component .stats span { color: var(--muted); font-size: 12px; }
.component .stats b { color: var(--soft); font-weight: 700; }
.component .read { margin: 11px 0 0; color: var(--soft); font-size: 12.5px; line-height: 1.5; }

/* How-to / explainer callout */
.explainer { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 4px; }
.explainer .step { padding: 15px 16px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.018); }
.explainer .step .n { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(110, 168, 255, 0.16); color: var(--blue); font-size: 12px; font-weight: 800; margin-bottom: 9px; }
.explainer .step h4 { margin: 0 0 6px; font-size: 14px; }
.explainer .step p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.claim {
  display: flex; gap: 13px; align-items: flex-start;
  margin: 18px 0 6px; padding: 15px 17px;
  border: 1px solid rgba(61, 220, 151, 0.28);
  background: rgba(61, 220, 151, 0.06);
  border-radius: var(--radius-sm);
}
.claim-icon {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center; font-size: 17px; font-weight: 800;
  background: rgba(61, 220, 151, 0.16); color: var(--green);
}
.claim p { margin: 0; color: var(--soft); font-size: 14px; line-height: 1.55; }
.claim b { color: var(--text); }
.claim-sub { color: var(--green); font-weight: 700; }

.legend { display: grid; gap: 8px; margin-top: 14px; }
.legend .row { display: flex; gap: 11px; align-items: baseline; font-size: 13.5px; color: var(--soft); }
.legend .row .pill { flex-shrink: 0; }

.bar { height: 6px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, 0.07); margin-top: 12px; }
.bar span { display: block; height: 100%; width: var(--w); border-radius: inherit; background: var(--bar-color, var(--blue)); }

/* ---------- Split / tables / method ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.72fr); gap: 14px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table { width: 100%; min-width: 640px; border-collapse: collapse; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); text-align: left; font-size: 13px; }
th { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.4px; font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(255, 255, 255, 0.018); }
.result { font-weight: 700; }
.result.success { color: var(--green); }
.result.fail { color: var(--red); }

.method-panel { padding: 20px; }
.method-panel ul { margin: 14px 0; padding-left: 18px; color: var(--soft); line-height: 1.55; font-size: 13.5px; }
.threshold-list { display: grid; gap: 8px; margin-top: 14px; }
.threshold-item {
  display: flex; justify-content: space-between; gap: 10px; padding: 11px 13px;
  border: 1px solid var(--line-soft); border-radius: var(--radius-sm); color: var(--soft); font-size: 13px;
}

/* ---------- Entry Guide flow ---------- */
.verdict-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(230px, 0.7fr);
  gap: 22px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(22, 29, 38, 0.94), rgba(13, 17, 23, 0.96));
  box-shadow: var(--shadow);
}
.verdict-panel[data-tone="green"] { border-color: rgba(61, 220, 151, 0.35); }
.verdict-panel[data-tone="amber"] { border-color: rgba(244, 183, 64, 0.32); }
.verdict-panel h2 { font-size: 25px; letter-spacing: -0.4px; margin-top: 4px; }
.verdict-left .state-message { margin: 10px 0 18px; }
.verdict-right {
  display: grid; gap: 10px; align-content: center;
  padding-left: 22px; border-left: 1px solid var(--line-soft);
}
.vr-row span { display: block; color: var(--muted); font-size: 11.5px; }
.vr-row strong { font-size: 16px; }

.light {
  display: inline-block; width: 12px; height: 12px; border-radius: 50%;
  background: var(--gray); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}
.light.green { background: var(--green); box-shadow: 0 0 0 3px rgba(61, 220, 151, 0.15), 0 0 12px rgba(61, 220, 151, 0.5); }
.light.amber { background: var(--amber); box-shadow: 0 0 0 3px rgba(244, 183, 64, 0.15); }
.light.red { background: var(--red); box-shadow: 0 0 0 3px rgba(251, 100, 112, 0.15); }
.light.blue { background: var(--blue); box-shadow: 0 0 0 3px rgba(110, 168, 255, 0.15); }
.light.gray { background: var(--gray); }

.lights { display: flex; gap: 14px; flex-wrap: wrap; }
.lightchip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border: 1px solid var(--line-soft); border-radius: 999px;
  color: var(--soft); font-size: 12.5px; font-weight: 600;
}

.flow-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  counter-reset: flowstep;
}
.step-card {
  position: relative;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.022);
}
.step-card.action { border-style: dashed; border-color: rgba(110, 168, 255, 0.4); background: rgba(110, 168, 255, 0.04); }
.step-card .step-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.step-card .n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(110, 168, 255, 0.16); color: var(--blue);
  font-size: 12px; font-weight: 800;
}
.step-card h3 { margin: 0 0 10px; font-size: 14.5px; }
.step-card strong { display: block; margin-bottom: 9px; font-size: 17px; letter-spacing: -0.2px; }
.step-card p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.step-card .step-read {
  margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line-soft);
  color: var(--soft); font-size: 12.5px; line-height: 1.5; min-height: 38px;
}

/* Homepage entry strip */
.entry-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 14px; padding: 15px 20px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(110, 168, 255, 0.06), rgba(13, 17, 23, 0.4));
  flex-wrap: wrap;
}
.entry-strip .es-left { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.entry-strip .es-title { font-weight: 700; font-size: 14px; }
.entry-strip .es-verdict { color: var(--soft); font-size: 13.5px; }
.entry-strip .es-link {
  flex-shrink: 0; padding: 8px 16px; border-radius: 999px;
  background: rgba(110, 168, 255, 0.14); color: var(--blue);
  font-size: 13px; font-weight: 700; transition: background 0.15s;
}
.entry-strip .es-link:hover { background: rgba(110, 168, 255, 0.24); }

/* ---------- Unified decision funnel ---------- */
.flow-intro { margin: 18px 2px 4px; max-width: 760px; line-height: 1.6; font-size: 14px; }
.flow-intro b { color: var(--soft); }

.step-section { margin-top: 16px; }

.drivers { margin-top: 14px; }
.drivers summary {
  cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 600;
  padding: 10px 0; user-select: none;
}
.drivers summary:hover { color: var(--text); }
.drivers[open] summary { margin-bottom: 10px; }

.veto-tag {
  display: inline-block; margin-left: 8px; padding: 2px 9px; border-radius: 999px;
  background: rgba(251, 100, 112, 0.12); color: var(--red);
  font-size: 10.5px; letter-spacing: 0.5px;
}

/* Step 2 value gauge */
.value-row { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr); gap: 26px; align-items: center; }
.vgauge-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 11.5px; margin-bottom: 8px; }
.vgauge {
  position: relative; height: 14px; border-radius: 999px;
  background: linear-gradient(90deg, rgba(61, 220, 151, 0.22) 0 30%, rgba(244, 183, 64, 0.18) 30% 70%, rgba(251, 100, 112, 0.2) 70% 100%);
  border: 1px solid var(--line-soft);
}
.vgauge-fill { display: none; }
.vgauge-marker {
  position: absolute; top: 50%; transform: translate(-50%, -50%);
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--text); border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25), 0 4px 12px rgba(0, 0, 0, 0.5);
  transition: left 0.4s ease;
}
.vgauge-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.vgauge-foot span:first-child { font-weight: 700; font-size: 15px; }
.value-read p { margin: 0 0 10px; color: var(--soft); font-size: 14px; line-height: 1.6; }
.mini-link { color: var(--blue); font-size: 13px; font-weight: 600; }
.mini-link:hover { text-decoration: underline; }

/* Step 3 tape dials */
.tape-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.tape-dial {
  padding: 17px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.022);
}
.tape-dial.summary { border-color: rgba(110, 168, 255, 0.32); background: rgba(110, 168, 255, 0.04); }
.tape-dial h3 { margin: 0 0 10px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.tape-dial strong { display: block; font-size: 24px; font-weight: 800; letter-spacing: -0.4px; margin-bottom: 8px; }
.tape-dial p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.tape-light-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.tape-light-row strong { margin: 0; font-size: 17px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }

/* Step 4 matrix */
.matrix td .light { margin-right: 4px; vertical-align: middle; width: 10px; height: 10px; }
.matrix tr.today td { background: rgba(110, 168, 255, 0.07); }
.matrix tr.today td:first-child { box-shadow: inset 3px 0 0 var(--blue); }

.honesty {
  margin-top: 14px; padding: 13px 15px;
  border: 1px dashed var(--line); border-radius: var(--radius-sm);
  color: var(--muted); font-size: 12.5px; line-height: 1.55;
}
.honesty a { color: var(--blue); }

/* Private monitors */
.ps-title { margin: 18px 0 10px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }

@media (max-width: 900px) {
  .verdict-panel { grid-template-columns: 1fr; }
  .verdict-right { padding-left: 0; border-left: 0; padding-top: 16px; border-top: 1px solid var(--line-soft); }
  .value-row { grid-template-columns: 1fr; gap: 16px; }
}

footer {
  margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line-soft);
  color: var(--muted); font-size: 12px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero-grid, .component-grid, .split { grid-template-columns: 1fr; }
  .component { min-height: auto; }
}
@media (max-width: 620px) {
  .shell { width: min(100% - 22px, 1140px); padding-top: 20px; }
  .topbar, .section-head, footer { flex-direction: column; align-items: flex-start; }
  .metric-row { grid-template-columns: 1fr; gap: 12px; }
  .topnav { padding: 12px 14px; }
  .topnav .brand { font-size: 14px; }
  .topnav .navlinks a { padding: 6px 10px; font-size: 13px; }
}
