:root {
  --bg: #070a12;
  --bg-2: #0a0f1c;
  --surface: rgba(16, 23, 40, 0.72);
  --surface-solid: #0e1526;
  --surface-2: #131c31;
  --line: rgba(150, 175, 230, 0.12);
  --line-2: rgba(150, 175, 230, 0.22);
  --text: #e8eef9;
  --muted: #93a0ba;
  --accent: #4ff0c8;
  --accent-2: #7b8cff;
  --on-accent: #04121a;
  --sev-critical: #ff4d6d;
  --sev-high: #ff8a3d;
  --sev-medium: #ffc94d;
  --sev-low: #6fb8ff;
  --sev-none: #4ff0c8;
  --radius: 16px;
  --font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Code", monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  /* grid + glow atmosphere */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 50% at 80% 0%, rgba(123, 140, 255, 0.16), transparent 70%),
    radial-gradient(50% 40% at 10% 20%, rgba(79, 240, 200, 0.09), transparent 70%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 56px 56px;
  mask-image: radial-gradient(120% 80% at 50% 0%, #000 30%, transparent 85%);
  opacity: 0.9;
}
::selection { background: rgba(79, 240, 200, 0.3); }
a { color: inherit; }
svg { width: 1em; height: 1em; flex: none; }
h1, h2, h3 { margin: 0; letter-spacing: -0.03em; line-height: 1.05; font-weight: 600; }
p { margin: 0; }
.mono { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.02em; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--accent); color: var(--on-accent); border-radius: 8px; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 28px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(7, 10, 18, 0.7);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__mark { width: 30px; height: 30px; color: var(--text); }
.brand__word { font-weight: 700; letter-spacing: 0.22em; font-size: 0.95rem; }
.nav__links { display: flex; gap: 6px; margin-left: auto; }
.nav__links a { padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--muted); font-size: 0.92rem; transition: color .2s, background .2s; }
.nav__links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }

.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); font: 500 0.75rem var(--mono); color: var(--muted); white-space: nowrap; }
.pill--live { color: var(--accent); border-color: rgba(79, 240, 200, 0.35); background: rgba(79, 240, 200, 0.06); }
.pill--live.is-down { color: var(--sev-medium); border-color: rgba(255, 201, 77, 0.35); background: rgba(255, 201, 77, 0.06); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 currentColor; animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 currentColor; } 70%, 100% { box-shadow: 0 0 0 7px transparent; } }

/* ---------- buttons, tags ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 20px; border-radius: 12px;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03);
  color: var(--text); font: 500 0.95rem var(--font); text-decoration: none; cursor: pointer;
  transition: transform .25s var(--ease), background .25s, border-color .25s, box-shadow .25s;
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { border-color: rgba(255, 255, 255, 0.32); background: rgba(255, 255, 255, 0.06); }
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--accent); border-color: transparent; color: var(--on-accent); font-weight: 600; box-shadow: 0 8px 32px -10px rgba(79, 240, 200, 0.6); }
.btn--primary:hover { background: #7af6d8; box-shadow: 0 10px 40px -8px rgba(79, 240, 200, 0.75); }
.btn--icon { width: 46px; padding: 0; }
.btn[disabled] { opacity: 0.55; cursor: progress; }

.tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 6px; font: 500 0.7rem var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); border: 1px solid var(--line-2); width: fit-content; }
.tag--live { color: var(--accent); border-color: rgba(79, 240, 200, 0.4); background: rgba(79, 240, 200, 0.07); }
.tag--sim { color: var(--sev-medium); border-color: rgba(255, 201, 77, 0.4); background: rgba(255, 201, 77, 0.07); }

.eyebrow { font: 500 0.75rem var(--mono); text-transform: uppercase; letter-spacing: 0.18em; color: var(--accent); margin-bottom: 18px; }
.lede { color: var(--muted); font-size: clamp(1rem, 1.3vw, 1.15rem); max-width: 60ch; }
.grad { background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2) 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }

section { padding: clamp(64px, 9vw, 120px) clamp(16px, 4vw, 48px); max-width: 1320px; margin: 0 auto; }
.section-head { margin-bottom: 40px; }
.section-head h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); max-width: 20ch; }
.section-head .lede { margin-top: 18px; }
.section-head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: clamp(32px, 5vw, 72px); min-height: calc(100svh - 70px); padding-top: clamp(40px, 6vw, 72px); }
.hero h1 { font-size: clamp(2.8rem, 7vw, 6rem); letter-spacing: -0.045em; line-height: 0.98; margin-bottom: 26px; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 36px 0 28px; }
.honest { display: flex; gap: 10px; align-items: flex-start; max-width: 56ch; font-size: 0.85rem; color: var(--muted); padding: 12px 14px; border: 1px dashed var(--line-2); border-radius: 12px; }
.honest svg { color: var(--sev-medium); margin-top: 3px; }

.radar { position: relative; aspect-ratio: 1; width: min(100%, 560px); justify-self: center; border-radius: 50%; }
.radar__rings {
  position: absolute; inset: 0; border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 24.6%, var(--line-2) 24.8% 25%, transparent 25.2% 49.6%, var(--line-2) 49.8% 50%, transparent 50.2% 74.6%, var(--line) 74.8% 75%, transparent 75.2%),
    linear-gradient(transparent 49.9%, var(--line) 50%, transparent 50.1%),
    linear-gradient(90deg, transparent 49.9%, var(--line) 50%, transparent 50.1%),
    radial-gradient(circle, rgba(79, 240, 200, 0.07), transparent 70%);
  border: 1px solid var(--line-2);
}
.radar__sweep {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(79, 240, 200, 0.38), rgba(79, 240, 200, 0.06) 14%, transparent 26%);
  animation: spin 5s linear infinite;
  mask-image: radial-gradient(circle, #000 69%, transparent 70%);
}
@keyframes spin { to { transform: rotate(360deg); } }
.blip { position: absolute; left: var(--x); top: var(--y); width: 10px; height: 10px; margin: -5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 18px var(--accent); opacity: 0; animation: blip 5s var(--d) infinite; }
.blip--hot { background: var(--sev-critical); box-shadow: 0 0 22px var(--sev-critical); }
@keyframes blip { 0%, 100% { opacity: 0; transform: scale(0.4); } 8% { opacity: 1; transform: scale(1.2); } 40% { opacity: 0.6; transform: scale(1); } 70% { opacity: 0; } }
.radar__core { position: absolute; inset: 39%; display: grid; place-items: center; border-radius: 28%; background: rgba(10, 15, 28, 0.9); border: 1px solid var(--line-2); box-shadow: 0 0 60px -10px rgba(79, 240, 200, 0.5), inset 0 0 30px rgba(79, 240, 200, 0.08); animation: breathe 4s ease-in-out infinite; }
.radar__core svg { width: 62%; height: 62%; color: var(--text); }
@keyframes breathe { 50% { box-shadow: 0 0 90px -6px rgba(79, 240, 200, 0.65), inset 0 0 30px rgba(79, 240, 200, 0.12); } }
.orbit { position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; font: 500 0.78rem var(--mono); background: rgba(8, 12, 22, 0.75); backdrop-filter: blur(10px); border: 1px solid var(--line-2); animation: float 6s ease-in-out infinite; }
.orbit svg { color: var(--accent); width: 16px; height: 16px; }
.orbit--a { top: 6%; left: 58%; }
.orbit--b { top: 52%; left: -4%; animation-delay: -2s; }
.orbit--c { bottom: 6%; right: 2%; animation-delay: -4s; }
@keyframes float { 50% { transform: translateY(-8px); } }

/* ---------- pillars ---------- */
.pillars__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pillar { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden; transition: border-color .3s, transform .4s var(--ease); }
.pillar::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 50% at 0% 0%, rgba(79, 240, 200, 0.1), transparent 70%); opacity: 0; transition: opacity .4s; pointer-events: none; }
.pillar:hover { border-color: var(--line-2); transform: translateY(-4px); }
.pillar:hover::after { opacity: 1; }
.pillar__icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: rgba(79, 240, 200, 0.08); border: 1px solid rgba(79, 240, 200, 0.2); color: var(--accent); }
.pillar__icon svg { width: 24px; height: 24px; }
.pillar h3 { font-size: 1.4rem; }
.pillar p { color: var(--muted); flex: 1; }

/* ---------- console ---------- */
.controls { display: flex; gap: 10px; }
.banner { display: flex; align-items: center; gap: 16px; padding: 14px 18px; margin-bottom: 16px; border-radius: 12px; border: 1px solid rgba(255, 201, 77, 0.25); background: rgba(255, 201, 77, 0.05); font-size: 0.92rem; color: var(--muted); }
.banner strong { color: var(--text); font-weight: 500; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); backdrop-filter: blur(12px); }
.card__head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.card__head h3 { font-size: 1rem; letter-spacing: -0.01em; }

.board { display: grid; grid-template-columns: 380px 1fr; grid-template-rows: auto minmax(520px, auto); gap: 16px; }
.score { display: grid; place-items: center; padding: 22px; position: relative; }
.score__ring { width: 150px; height: 150px; transform: rotate(-90deg); grid-area: 1 / 1; }
.score__track { fill: none; stroke: var(--line); stroke-width: 9; }
.score__bar { fill: none; stroke: var(--accent); stroke-width: 9; stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 0; transition: stroke-dashoffset 1s var(--ease), stroke .6s; filter: drop-shadow(0 0 8px currentColor); }
.score__value { grid-area: 1 / 1; display: grid; text-align: center; }
.score__value span { font-size: 2.6rem; font-weight: 600; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.score__value small { font: 500 0.66rem var(--mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-top: 6px; }
.score__state { margin-top: 12px; font-weight: 500; }

.areas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.area { display: flex; align-items: center; gap: 14px; padding: 20px; transition: border-color .4s, box-shadow .4s; }
.area > svg { width: 26px; height: 26px; color: var(--accent); }
.area div { flex: 1; min-width: 0; }
.area h3 { font-size: 1.02rem; letter-spacing: -0.01em; }
.area__status { color: var(--muted); font-size: 0.86rem; margin-top: 4px; }
.area__count { font: 600 1.6rem var(--font); font-variant-numeric: tabular-nums; color: var(--muted); }
.area[data-sev] > svg, .area[data-sev] .area__count { color: var(--sev); }
.area[data-sev] { border-color: color-mix(in srgb, var(--sev) 35%, transparent); box-shadow: inset 0 0 40px -20px var(--sev); }

.feed { display: flex; flex-direction: column; min-height: 0; max-height: 640px; }
.feed__list { list-style: none; margin: 0; padding: 8px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.feed__list:empty { display: none; }
.feed__list:not(:empty) + .empty { display: none; }
.event { all: unset; box-sizing: border-box; width: 100%; display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; cursor: pointer; border: 1px solid transparent; transition: background .2s, border-color .2s; animation: slide-in .6s var(--ease) both; }
.event:hover { background: rgba(255, 255, 255, 0.035); }
.event[aria-current="true"] { background: rgba(79, 240, 200, 0.06); border-color: rgba(79, 240, 200, 0.3); }
.event:focus-visible { outline: 2px solid var(--accent); }
.event__icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-2); color: var(--muted); }
.event__icon svg { width: 18px; height: 18px; }
.event__title { font-size: 0.92rem; font-weight: 500; line-height: 1.3; }
.event__meta { font: 400 0.72rem var(--mono); color: var(--muted); margin-top: 3px; }
.event.is-resolved .event__title { text-decoration: line-through; color: var(--muted); }
@keyframes slide-in { from { opacity: 0; transform: translateY(-12px) scale(0.98); } }

.sev { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 6px; font: 600 0.68rem var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--sev); background: color-mix(in srgb, var(--sev) 12%, transparent); border: 1px solid color-mix(in srgb, var(--sev) 35%, transparent); white-space: nowrap; }
[data-sev="critical"] { --sev: var(--sev-critical); }
[data-sev="high"] { --sev: var(--sev-high); }
[data-sev="medium"] { --sev: var(--sev-medium); }
[data-sev="low"] { --sev: var(--sev-low); }
[data-sev="none"] { --sev: var(--sev-none); }
.sev--pending { --sev: var(--muted); }
.sev--pending::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }

.empty { display: grid; place-items: center; gap: 14px; text-align: center; padding: 48px 24px; color: var(--muted); flex: 1; }
.empty svg { width: 40px; height: 40px; color: var(--line-2); }

/* ---------- analysis detail ---------- */
.detail { padding: 26px; min-height: 420px; display: flex; flex-direction: column; grid-column: 2; grid-row: 2; }
.board .feed { grid-column: 1; grid-row: 2; }
.board .areas { grid-column: 2; grid-row: 1; }
.analysis { display: flex; flex-direction: column; gap: 22px; animation: fade-up .5s var(--ease) both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } }
.analysis__top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.analysis__src { margin-left: auto; font: 400 0.72rem var(--mono); color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.analysis__src svg { color: var(--accent); }
.analysis h3 { font-size: clamp(1.4rem, 2.2vw, 1.9rem); }
.analysis__summary { font-size: 1.05rem; color: var(--text); }
.analysis__explain { color: var(--muted); }
.meter { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; font: 500 0.72rem var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.meter__bar { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.meter__bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--sev-low), var(--sev)); border-radius: inherit; transition: width 1s var(--ease); }
.meter b { color: var(--sev); font-size: 0.9rem; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.block h4 { margin: 0 0 10px; font: 500 0.7rem var(--mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.block ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.flags li { position: relative; padding-left: 18px; font-size: 0.92rem; }
.flags li::before { content: ""; position: absolute; left: 2px; top: 0.6em; width: 7px; height: 7px; border-radius: 2px; background: var(--sev); transform: rotate(45deg); }
.actions li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; font-size: 0.92rem; }
.actions li span:first-child { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; background: rgba(79, 240, 200, 0.1); color: var(--accent); font: 600 0.72rem var(--mono); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 5px 10px; border-radius: 8px; font-size: 0.8rem; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.raw { font: 400 0.78rem/1.6 var(--mono); color: var(--muted); background: rgba(0, 0, 0, 0.25); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; white-space: pre-wrap; word-break: break-word; }
.analysis__foot { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding-top: 16px; border-top: 1px solid var(--line); }
.note { font-size: 0.82rem; color: var(--sev-medium); }

.thinking { display: grid; gap: 14px; }
.thinking__label { display: flex; align-items: center; gap: 10px; font: 500 0.8rem var(--mono); color: var(--accent); }
.thinking__label::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
.shimmer { height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2) 0%, rgba(79, 240, 200, 0.12) 50%, var(--surface-2) 100%) 0 0 / 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- scanner ---------- */
.scan { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 16px; align-items: start; }
.scan__form { padding: 22px; display: grid; gap: 16px; }
.tabs { display: inline-flex; padding: 4px; gap: 4px; border-radius: 12px; background: rgba(0, 0, 0, 0.25); border: 1px solid var(--line); width: fit-content; }
.tab { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: 500 0.9rem var(--font); cursor: pointer; transition: background .2s, color .2s; }
.tab[aria-selected="true"] { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
textarea {
  width: 100%; resize: vertical; min-height: 140px; padding: 14px 16px; border-radius: 12px;
  background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line-2); color: var(--text);
  font: 400 0.95rem/1.5 var(--mono); transition: border-color .2s, box-shadow .2s;
}
textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79, 240, 200, 0.15); }
.scan__row { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.examples { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.examples button { min-height: 36px; padding: 0 12px; border-radius: 9px; border: 1px dashed var(--line-2); background: transparent; color: var(--muted); font: 400 0.8rem var(--font); cursor: pointer; transition: color .2s, border-color .2s; }
.examples button:hover { color: var(--text); border-color: var(--accent); }
.scan .detail { grid-column: auto; grid-row: auto; min-height: 360px; }

/* ---------- how ---------- */
.steps { list-style: none; margin: 0 0 40px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: s; }
.steps li { padding: 24px; border-top: 1px solid var(--line-2); display: grid; gap: 10px; align-content: start; }
.steps .mono { color: var(--accent); }
.steps h3 { font-size: 1.25rem; }
.steps p { color: var(--muted); font-size: 0.94rem; }
.truth { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.truth__col { padding: 24px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.truth__col ul { margin: 16px 0 0; padding-left: 18px; color: var(--muted); display: grid; gap: 8px; font-size: 0.94rem; }

.footer { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; justify-content: space-between; padding: 36px clamp(16px, 4vw, 48px) 110px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.86rem; }
.footer p { max-width: 70ch; }

/* ---------- assistant ---------- */
.fab { position: fixed; right: 20px; bottom: 20px; z-index: 50; display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 20px 0 14px; border-radius: 16px; border: 1px solid rgba(79, 240, 200, 0.35); background: rgba(10, 15, 28, 0.88); backdrop-filter: blur(14px); color: var(--text); font: 600 0.95rem var(--font); cursor: pointer; box-shadow: 0 20px 50px -16px rgba(79, 240, 200, 0.45); transition: transform .3s var(--ease), box-shadow .3s; }
.fab svg { width: 28px; height: 28px; }
.fab:hover { transform: translateY(-3px); box-shadow: 0 24px 60px -14px rgba(79, 240, 200, 0.6); }
.chat { position: fixed; right: 20px; bottom: 20px; z-index: 60; width: min(420px, calc(100vw - 32px)); height: min(640px, calc(100svh - 40px)); display: flex; flex-direction: column; border-radius: 20px; background: rgba(10, 15, 28, 0.94); backdrop-filter: blur(20px); border: 1px solid var(--line-2); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(79, 240, 200, 0.08); animation: pop .4s var(--ease) both; }
.chat[hidden] { display: none; }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(0.97); } }
.chat::before { content: ""; position: absolute; inset: 0 0 auto; height: 140px; border-radius: 20px 20px 0 0; pointer-events: none; background: radial-gradient(80% 100% at 20% 0%, rgba(79, 240, 200, 0.12), transparent 70%); }
.chat__head { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 10px 14px 16px; border-bottom: 1px solid var(--line); }
.chat__title { flex: 1; min-width: 0; }
.chat__head h2 { font-size: 1rem; letter-spacing: -0.01em; }
.chat__status { display: flex; align-items: center; gap: 7px; margin-top: 3px; font: 400 0.72rem var(--mono); color: var(--accent); }
.chat__status .dot { width: 6px; height: 6px; }
.chat__head .btn--icon { width: 40px; min-height: 40px; }
.btn--quiet { border-color: transparent; background: transparent; color: var(--muted); }
.btn--quiet:hover { color: var(--text); }
.btn--sm { min-height: 40px; padding: 0 14px; font-size: 0.86rem; }
.btn--sm svg { width: 16px; height: 16px; }
.chat__avatar { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 9px; background: var(--bg); border: 1px solid rgba(79, 240, 200, 0.3); color: var(--text); }
.chat__avatar svg { width: 20px; height: 20px; }
.chat__avatar--lg { width: 40px; height: 40px; border-radius: 12px; box-shadow: 0 0 24px -6px rgba(79, 240, 200, 0.6); }
.chat__avatar--lg svg { width: 28px; height: 28px; }
.chat__log { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 14px; scroll-behavior: smooth; overscroll-behavior: contain; }
.row { display: flex; gap: 10px; align-items: flex-start; animation: fade-up .35s var(--ease) both; }
.row--user { justify-content: flex-end; }
.msg { max-width: 85%; padding: 11px 14px; border-radius: 14px; font-size: 0.92rem; line-height: 1.6; overflow-wrap: anywhere; }
.msg p + p, .msg p + ul, .msg ul + p, .msg p + ol, .msg ol + p { margin-top: 8px; }
.msg ul, .msg ol { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.msg li::marker { color: var(--accent); }
.msg strong { color: #fff; font-weight: 600; }
.msg code { font: 0.85em var(--mono); padding: 1px 5px; border-radius: 5px; background: rgba(0, 0, 0, 0.35); }
.msg__h { font-weight: 600; color: #fff; }
.msg--ai { background: var(--surface-2); border: 1px solid var(--line); border-top-left-radius: 4px; }
.msg--user { background: linear-gradient(135deg, rgba(79, 240, 200, 0.18), rgba(123, 140, 255, 0.14)); border: 1px solid rgba(79, 240, 200, 0.28); border-top-right-radius: 4px; }
.msg--err { color: var(--sev-medium); border-color: rgba(255, 201, 77, 0.3); }
.typing { display: inline-flex; gap: 5px; padding: 4px 2px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); opacity: 0.35; animation: typing 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 30% { opacity: 1; transform: translateY(-3px); } }
.cursor > :last-child::after { content: ""; display: inline-block; width: 7px; height: 1em; margin-left: 3px; vertical-align: -2px; background: var(--accent); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.chat__suggest { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 0 16px 14px 54px; }
.chat__suggest p { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.12em; }
.chat__suggest button { min-height: 38px; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.02); color: var(--text); font: 400 0.85rem var(--font); cursor: pointer; text-align: left; transition: border-color .2s, background .2s, transform .25s var(--ease); }
.chat__suggest button:hover { border-color: var(--accent); background: rgba(79, 240, 200, 0.06); transform: translateX(3px); }
.chat__form { display: flex; align-items: flex-end; gap: 8px; padding: 12px 12px 6px; border-top: 1px solid var(--line); }
.chat__form textarea { min-height: 46px; height: 46px; max-height: 120px; padding: 12px 14px; scrollbar-width: none; resize: none; font-family: var(--font); line-height: 1.4; }
.chat__hint { padding: 0 14px 12px; font-size: 0.72rem; color: var(--muted); text-align: center; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--delay, 0s); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .board { grid-template-columns: 1fr; grid-template-rows: none; }
  .board > * { grid-column: auto !important; grid-row: auto !important; }
  .score { grid-template-columns: auto 1fr; justify-items: start; gap: 0 20px; }
  .score__ring, .score__value { grid-area: 1 / 1 / 3 / 2; place-self: center; }
  .score__state { grid-area: 1 / 2 / 3 / 3; align-self: center; margin: 0; font-size: 1.15rem; }
  .feed { max-height: 420px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .scan { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .radar { width: min(88%, 420px); }
  .pillars__grid, .areas, .truth { grid-template-columns: 1fr; }
  .nav__links { display: none; }
  .pill--live { margin-left: auto; }
  .cols { grid-template-columns: 1fr; }
  .banner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
  .score__ring { width: 110px; height: 110px; }
  .score__value span { font-size: 2rem; }
  .detail { padding: 20px; }
  .fab span { display: none; }
  .fab { padding: 0 12px; }
  .chat { right: 8px; bottom: 8px; width: calc(100vw - 16px); height: calc(100svh - 16px); }
  .orbit { font-size: 0.68rem; padding: 6px 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
