:root {
  --bg: #060a10; --bg2: #0a1019; --panel: #0d141f; --panel2: #111a28; --line: #1b2636; --line2: #24324a;
  --text: #dbe4ee; --muted: #8392a7; --faint: #56647a;
  --accent: #22d3ee; --accent2: #0ea5e9; --good: #22c55e; --warn: #f59e0b; --bad: #f43f5e; --violet: #a78bfa;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 14px/1.45 var(--sans); }
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
code, .mono, pre, textarea, input { font-variant-ligatures: none; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
::selection { background: rgba(34, 211, 238, .28); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #1e2a3b; border-radius: 6px; border: 2px solid var(--bg); }

/* ---------- login ---------- */
.auth { display: grid; grid-template-columns: 1.25fr 1fr; min-height: 100vh; }
.auth-hero { position: relative; background: #05080d center/cover no-repeat; display: flex; flex-direction: column; justify-content: space-between; padding: 44px 52px; overflow: hidden; }
.auth-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, rgba(4,8,14,.92) 0%, rgba(4,8,14,.55) 55%, rgba(4,8,14,.85) 100%); }
.auth-hero > * { position: relative; z-index: 1; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; letter-spacing: .2px; font-size: 17px; }
.brand svg { width: 34px; height: 34px; }
.brand small { display: block; font-weight: 500; color: var(--muted); font-size: 11.5px; letter-spacing: 1.6px; text-transform: uppercase; }
.hero-copy h1 { font-size: 40px; line-height: 1.12; margin: 0 0 16px; letter-spacing: -.6px; max-width: 560px; }
.hero-copy h1 span { color: var(--accent); }
.hero-copy p { color: #b3c0d0; max-width: 520px; font-size: 15.5px; margin: 0 0 28px; }
.hero-points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; max-width: 600px; }
.hero-points div { display: flex; gap: 10px; color: #c8d3e0; font-size: 13.5px; }
.hero-points b { color: var(--text); display: block; font-size: 13.5px; }
.hero-points i { flex: none; width: 26px; height: 26px; border-radius: 7px; background: rgba(34,211,238,.1); border: 1px solid rgba(34,211,238,.3); display: grid; place-items: center; font-style: normal; color: var(--accent); font-size: 12px; }
.hero-foot { display: flex; gap: 22px; color: var(--muted); font-size: 12px; align-items: center; flex-wrap: wrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); display: inline-block; box-shadow: 0 0 0 3px rgba(34,197,94,.18); margin-right: 6px; }
.dot.off { background: var(--faint); box-shadow: none; }

.auth-side { display: grid; place-items: center; padding: 40px 24px; background: radial-gradient(1000px 500px at 80% -10%, rgba(14,165,233,.10), transparent 60%), var(--bg); }
.card { width: 100%; max-width: 410px; background: linear-gradient(180deg, rgba(17,26,40,.92), rgba(12,18,28,.96)); border: 1px solid var(--line2); border-radius: 16px; padding: 34px 32px 28px; box-shadow: 0 30px 80px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.04); }
.card h2 { margin: 0 0 4px; font-size: 22px; letter-spacing: -.2px; }
.card .sub { margin: 0 0 24px; color: var(--muted); }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 500; letter-spacing: .3px; }
.input { position: relative; }
.input input, .input select, textarea.in { width: 100%; background: #070c14; border: 1px solid var(--line2); border-radius: 10px; padding: 12px 14px 12px 40px; outline: none; transition: border-color .15s, box-shadow .15s; }
textarea.in, .input.plain input, .input.plain select { padding-left: 14px; }
.input input:focus, .input select:focus, textarea.in:focus { border-color: var(--accent2); box-shadow: 0 0 0 3px rgba(14,165,233,.18); }
.input svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); }
.input .eye { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 12px; padding: 6px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; padding: 11px 16px; border: 1px solid var(--line2); background: var(--panel2); cursor: pointer; font-weight: 600; transition: background .15s, border-color .15s, transform .05s; white-space: nowrap; }
.btn:hover { border-color: #33455f; background: #152033; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(180deg, #19b6d3, #0e8fb8); border-color: #1fc3e0; color: #031018; }
.btn.primary:hover { background: linear-gradient(180deg, #2cc6e2, #129ec9); }
.btn.danger { background: rgba(244,63,94,.12); border-color: rgba(244,63,94,.45); color: #fda4af; }
.btn.small { padding: 6px 10px; font-size: 12.5px; border-radius: 8px; }
.btn.block { width: 100%; padding: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.err { color: #fda4af; background: rgba(244,63,94,.08); border: 1px solid rgba(244,63,94,.3); border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 14px; display: none; }
.demo-box { margin-top: 20px; border: 1px dashed #2a3a52; border-radius: 12px; padding: 14px; font-size: 13px; color: var(--muted); }
.demo-box b { color: var(--text); }
.demo-box code { color: var(--accent); background: rgba(34,211,238,.08); padding: 1px 6px; border-radius: 5px; }
.card-foot { margin-top: 22px; display: flex; justify-content: space-between; font-size: 12px; color: var(--faint); }

/* ---------- app shell ---------- */
.shell { display: grid; grid-template-columns: 232px 1fr; height: 100vh; }
.side { background: var(--bg2); border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 12px; overflow-y: auto; }
.side .brand { padding: 4px 8px 20px; font-size: 15px; }
.side .brand svg { width: 30px; height: 30px; }
.nav-h { font-size: 10.5px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--faint); padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: #aab7c8; font-weight: 500; font-size: 13.5px; }
.nav a svg { width: 17px; height: 17px; opacity: .85; }
.nav a:hover { background: #111a27; color: var(--text); }
.nav a.on { background: linear-gradient(90deg, rgba(34,211,238,.14), rgba(34,211,238,.03)); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.nav a .pill { margin-left: auto; }
.side-foot { margin-top: auto; padding: 14px 10px 4px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }
.main { display: flex; flex-direction: column; min-width: 0; height: 100vh; }
.top { height: 58px; flex: none; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px; padding: 0 22px; background: rgba(8,13,20,.85); backdrop-filter: blur(6px); }
.top h1 { font-size: 16px; margin: 0; font-weight: 600; }
.top .grow { flex: 1; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line2); background: var(--panel); color: var(--muted); font-size: 12px; white-space: nowrap; }
.chip b { color: var(--text); font-weight: 600; }
.view { flex: 1; overflow-y: auto; padding: 20px 22px 40px; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; border: 1px solid transparent; white-space: nowrap; }
.p1, .bad { background: rgba(244,63,94,.14); color: #fda4af; border-color: rgba(244,63,94,.35); }
.p2, .warn { background: rgba(245,158,11,.12); color: #fcd34d; border-color: rgba(245,158,11,.35); }
.p3, .info { background: rgba(14,165,233,.12); color: #7dd3fc; border-color: rgba(14,165,233,.3); }
.p4, .mute { background: #121b28; color: var(--muted); border-color: var(--line2); }
.ok { background: rgba(34,197,94,.12); color: #86efac; border-color: rgba(34,197,94,.3); }

/* ---------- panels ---------- */
.grid { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g31 { grid-template-columns: minmax(0, 2.1fr) minmax(320px, 1fr); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.panel > header { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.panel > header h3 { margin: 0; font-size: 13.5px; font-weight: 600; }
.panel > header .grow { flex: 1; }
.panel > header .hint { color: var(--faint); font-size: 12px; }
.pad { padding: 14px 16px; }
.kpi { padding: 14px 16px; position: relative; }
.kpi .l { color: var(--muted); font-size: 12px; font-weight: 500; }
.kpi .v { font-size: 28px; font-weight: 650; letter-spacing: -.5px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .s { color: var(--faint); font-size: 11.5px; margin-top: 2px; }
.kpi.alert .v { color: #fb7185; }
.kpi.good .v { color: #4ade80; }
.kpi.acc .v { color: var(--accent); }
.kpi.amber .v { color: #fbbf24; }

table.t { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.t th { text-align: left; font-weight: 500; color: var(--faint); padding: 8px 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); z-index: 1; white-space: nowrap; }
table.t td { padding: 7px 12px; border-bottom: 1px solid #131c29; vertical-align: top; }
table.t tr:hover td { background: #0f1724; }
table.t tr.sel td { background: rgba(34,211,238,.08); }
table.t td.n { font-variant-numeric: tabular-nums; text-align: right; }
.scroll { overflow: auto; }
.trunc { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.v-allowed { color: #86efac; } .v-blocked { color: #fb7185; } .v-dropped { color: #f472b6; } .v-challenged { color: #fbbf24; }
.flash { animation: flash 1.2s ease-out; }
@keyframes flash { from { background: rgba(34,211,238,.18); } to { background: transparent; } }

/* stages */
.stages { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stage { border: 1px solid var(--line2); border-radius: 12px; padding: 14px; background: var(--panel2); position: relative; overflow: hidden; }
.stage .n { color: var(--faint); font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; }
.stage h4 { margin: 4px 0 4px; font-size: 14.5px; }
.stage p { margin: 0 0 10px; color: var(--muted); font-size: 12.5px; min-height: 36px; }
.stage .bar { height: 4px; border-radius: 4px; background: #182334; overflow: hidden; }
.stage .bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.stage .res { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; min-height: 22px; }
.stage.live { border-color: rgba(34,211,238,.55); box-shadow: 0 0 0 1px rgba(34,211,238,.18) inset; }
.stage.done .bar i { background: var(--good); }

/* alerts / phone */
.alerts { display: flex; flex-direction: column; gap: 10px; padding: 12px; max-height: 560px; overflow-y: auto; }
.alert { border: 1px solid var(--line2); border-left: 3px solid var(--accent2); border-radius: 10px; background: #0b121c; padding: 10px 12px; }
.alert.P1 { border-left-color: var(--bad); }
.alert.P2 { border-left-color: var(--warn); }
.alert .h { display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: 12.5px; }
.alert .h .grow { flex: 1; }
.alert pre { margin: 8px 0 0; white-space: pre-wrap; word-break: break-word; font: 11.5px/1.5 var(--mono); color: #aebbcc; }
.phone { width: 100%; max-width: 360px; margin: 0 auto; border: 1px solid #2a3a52; border-radius: 30px; padding: 12px; background: #05080d; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.phone .scr { border-radius: 22px; background: #0e1621; overflow: hidden; }
.phone .bar { display: flex; justify-content: space-between; padding: 8px 18px 4px; font-size: 11px; color: var(--muted); }
.phone .ttl { padding: 8px 14px; border-bottom: 1px solid #1a2534; display: flex; gap: 10px; align-items: center; }
.phone .ttl .av { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #0ea5e9, #22d3ee); display: grid; place-items: center; color: #021018; font-weight: 800; font-size: 13px; }
.phone .msgs { height: 470px; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.bubble { background: #182434; border-radius: 12px 12px 12px 4px; padding: 9px 11px; font-size: 12px; max-width: 94%; }
.bubble b { display: block; margin-bottom: 4px; font-size: 12px; }
.bubble pre { margin: 0; white-space: pre-wrap; word-break: break-word; font: 10.8px/1.45 var(--mono); color: #b9c6d6; }
.bubble .t { color: var(--faint); font-size: 10px; text-align: right; margin-top: 4px; }
.bubble .acts { display: flex; gap: 6px; margin-top: 8px; }

/* toast */
.toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 10px; z-index: 50; width: 380px; }
.toast { background: #0f1825; border: 1px solid var(--line2); border-left: 3px solid var(--accent); border-radius: 10px; padding: 11px 13px; box-shadow: 0 16px 40px rgba(0,0,0,.5); font-size: 12.5px; animation: slide .25s ease-out; }
.toast.P1 { border-left-color: var(--bad); } .toast.P2 { border-left-color: var(--warn); }
.toast b { display: block; margin-bottom: 3px; }
@keyframes slide { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

/* banner */
.banner { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line2); background: #05080d center/cover no-repeat; padding: 22px 24px; display: flex; gap: 20px; align-items: center; }
.banner::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,9,15,.95) 0%, rgba(5,9,15,.7) 60%, rgba(5,9,15,.5)); }
.banner > * { position: relative; }
.banner h2 { margin: 0 0 6px; font-size: 20px; }
.banner p { margin: 0; color: #b0bdcc; max-width: 720px; }
.banner .grow { flex: 1; }

/* analyser */
.pa { display: grid; grid-template-rows: minmax(220px, 1fr) auto; gap: 12px; }
.pa .list { height: 330px; overflow: auto; }
.pa .lower { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.tree { font: 12px/1.6 var(--mono); padding: 10px 12px; height: 300px; overflow: auto; }
.tree details { margin-left: 2px; }
.tree summary { cursor: pointer; color: #cbd5e1; }
.tree .kv { padding-left: 18px; color: #9fb0c3; white-space: pre-wrap; word-break: break-all; }
.tree .kv b { color: #7dd3fc; font-weight: 500; }
.hex { font: 11.5px/1.6 var(--mono); padding: 10px 12px; height: 300px; overflow: auto; white-space: pre; color: #9fb0c3; }
.hex .o { color: var(--faint); }
.filter { display: flex; gap: 8px; }
.filter input { flex: 1; background: #070c14; border: 1px solid var(--line2); border-radius: 8px; padding: 8px 12px; font-family: var(--mono); font-size: 12.5px; outline: none; }
.filter input.okf { border-color: rgba(34,197,94,.55); }
.filter input.badf { border-color: rgba(244,63,94,.55); }

.chart { width: 100%; height: 220px; display: block; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.ev-detail pre { margin: 0; font: 11.5px/1.5 var(--mono); white-space: pre-wrap; word-break: break-all; color: #b6c3d3; }
.mathline { font: 12px/1.7 var(--mono); color: #b6c3d3; }
.empty { padding: 26px; text-align: center; color: var(--faint); }
.tabs { display: flex; gap: 4px; }
.tabs button { background: none; border: 1px solid transparent; padding: 6px 10px; border-radius: 8px; color: var(--muted); cursor: pointer; }
.tabs button.on { border-color: var(--line2); background: var(--panel2); color: var(--text); }
.kv2 { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; font-size: 13px; }
.kv2 div:nth-child(odd) { color: var(--muted); }
.tier-card { border: 1px solid var(--line2); border-radius: 14px; padding: 20px; background: var(--panel2); display: flex; flex-direction: column; gap: 10px; }
.tier-card h3 { margin: 0; }
.tier-card ul { margin: 0; padding-left: 18px; color: #b4c1d1; }
.tier-card.hl { border-color: rgba(34,211,238,.5); box-shadow: 0 0 0 1px rgba(34,211,238,.15) inset; }
.modal-bg { position: fixed; inset: 0; background: rgba(2,5,9,.7); display: grid; place-items: center; z-index: 60; }
.modal { width: 100%; max-width: 520px; background: var(--panel); border: 1px solid var(--line2); border-radius: 14px; padding: 22px; }
.credit { font-size: 11px; color: var(--faint); }

@media (max-width: 1200px) { .g6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g31 { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; } .auth-hero { min-height: 360px; padding: 28px 20px; } .hero-copy h1 { font-size: 28px; } .hero-points { grid-template-columns: 1fr; }
  .shell { grid-template-columns: 1fr; } .side { display: none; } .g4, .g2, .stages, .pa .lower { grid-template-columns: 1fr; } .g6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .view { padding: 16px; } .top { padding: 0 16px; } .toasts { width: calc(100% - 32px); left: 16px; right: 16px; }
}
/* ---------- attacker terminal ---------- */
.term-bar { padding: 10px 14px 8px; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.term-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.term-l { color: var(--faint); font-size: 10.5px; letter-spacing: 1.1px; text-transform: uppercase; width: 58px; flex: none; }
.term-chips { display: flex; gap: 5px; flex-wrap: wrap; }
.tchip { border: 1px solid var(--line2); background: var(--panel); color: var(--muted); border-radius: 999px; padding: 3px 10px; font-size: 11.5px; cursor: pointer; }
.tchip b { color: var(--text); font-weight: 600; margin-left: 2px; }
.tchip:hover { border-color: #33455f; }
.tchip.on { border-color: rgba(34,211,238,.6); background: rgba(34,211,238,.12); color: var(--text); }
.term-opt { display: inline-flex; gap: 5px; align-items: center; font-size: 11.5px; color: var(--muted); cursor: pointer; }
.term { height: 360px; overflow: auto; background: #04070c; border-radius: 0 0 12px 12px; font: 11.5px/1.5 var(--mono); font-variant-ligatures: none; padding: 6px 0; }
.tl { display: grid; grid-template-columns: 52px 96px 150px 108px minmax(0, 1fr); column-gap: 10px; padding: 3px 14px; border-left: 3px solid transparent; }
.tl:hover { background: rgba(255,255,255,.025); }
.tl .t-time { color: #56647a; text-align: right; }
.tl .t-who { color: #7dd3fc; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl .t-src { color: #8392a7; }
.tl .t-req { color: #c9d5e3; word-break: break-all; }
.tl .t-why { grid-column: 5; color: #56647a; font-size: 10.5px; }
.t-pay { color: #fbbf24; }
.t-dim { color: #56647a; }
.t-badge { justify-self: start; border-radius: 4px; padding: 0 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .4px; height: 17px; line-height: 17px; }
.t-badge.block { background: rgba(244,63,94,.16); color: #fb7185; }
.t-badge.drop { background: rgba(219,39,119,.16); color: #f472b6; }
.t-badge.chal { background: rgba(245,158,11,.16); color: #fbbf24; }
.t-badge.pass { background: rgba(47,143,91,.16); color: #86efac; }
.t-badge.would { background: rgba(245,158,11,.2); color: #fcd34d; }
.t-badge.breach { background: #e11d48; color: #fff; }
.tl.breach { background: rgba(225,29,72,.10); border-left-color: #e11d48; }
.tl.breach .t-why { color: #fda4af; }
.tl.would { border-left-color: rgba(245,158,11,.6); }
.t-empty { color: #56647a; padding: 8px 14px; }
@media (max-width: 900px) { .tl { grid-template-columns: 46px 86px minmax(0, 1fr); } .tl .t-who, .tl .t-src { display: none; } .tl .t-why { grid-column: 3; } }

/* ---------- attack anatomy ---------- */
.whatsnew { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 16px; border-radius: 12px; border: 1px solid rgba(34,211,238,.35); background: linear-gradient(90deg, rgba(34,211,238,.10), rgba(167,139,250,.06)); color: var(--text); font-size: 13px; transition: border-color .15s, background .15s; }
.whatsnew:hover { border-color: rgba(34,211,238,.7); background: linear-gradient(90deg, rgba(34,211,238,.16), rgba(167,139,250,.10)); }
.whatsnew .go { color: var(--accent); font-weight: 600; white-space: nowrap; }
@media (max-width: 760px) { .whatsnew { flex-wrap: wrap; } }
.v-bad { color: #fb7185; }
.an-ctl { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; min-width: 260px; }
.an-select { background: #070c14; border: 1px solid var(--line2); border-radius: 10px; padding: 9px 12px; min-width: 260px; outline: none; }
.an-select:focus { border-color: var(--accent2); }
.an-chain { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.an-chain .stage p { min-height: 34px; }
.an-kv { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13px; }
.an-kv b { color: var(--muted); font-weight: 600; font-size: 12px; }
.an-sub { color: var(--faint); font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase; margin: 14px 0 6px; }
.an-code { margin: 0; padding: 10px 12px; border-radius: 8px; background: #04070c; font: 11.5px/1.6 var(--mono); white-space: pre-wrap; word-break: break-word; border-left: 3px solid var(--line2); color: #c9d5e3; font-variant-ligatures: none; }
.an-code.bad { border-left-color: var(--bad); } .an-code.ok { border-left-color: var(--good); }
.an-steps tr[data-i] { cursor: pointer; }
.an-steps tr.sel td { background: rgba(34,211,238,.08); }
.an-steps tr.sel td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.an-steps td.trunc { max-width: 340px; }
.an-sticky { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.an-dh { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12.5px; }
.an-raw { margin: 0; padding: 10px 12px; border-radius: 8px; background: #04070c; border: 1px solid var(--line); font: 11px/1.55 var(--mono); white-space: pre-wrap; word-break: break-all; color: #b6c3d3; max-height: 230px; overflow: auto; font-variant-ligatures: none; }
.an-raw.resp { color: #9fb3c8; } .an-raw.resp.bad { border-color: rgba(244,63,94,.5); color: #fecdd3; }
.an-meter { position: relative; height: 10px; border-radius: 6px; background: #182334; margin-top: 18px; }
.an-meter .fill { height: 100%; border-radius: 6px; transition: width .3s; }
.an-meter .mark { position: absolute; top: -16px; bottom: -3px; border-left: 2px dashed #f59e0b; }
.an-meter .mark span { position: absolute; top: -1px; left: 4px; font-size: 10px; color: #f59e0b; white-space: nowrap; }
.an-input { border: 1px solid var(--line); border-radius: 9px; padding: 9px 10px; margin-bottom: 8px; background: var(--panel2); }
.an-input.hit { border-color: rgba(244,63,94,.45); }
.an-input .hd { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; font-size: 12px; }
.an-input .chip { padding: 1px 7px; font-size: 10.5px; }
.an-input .decode code { display: block; background: #04070c; border-radius: 6px; padding: 5px 8px; white-space: pre-wrap; word-break: break-all; font-size: 11px; color: #e2e8f0; }
.an-input .decode .arrow { color: var(--accent); font-size: 10.5px; padding: 3px 0 3px 6px; font-family: var(--mono); }
.an-input .find { display: flex; gap: 8px; align-items: center; margin-top: 6px; font-size: 12px; padding-top: 6px; border-top: 1px dashed var(--line2); }
.an-note { border-radius: 8px; padding: 9px 11px; font-size: 12.5px; margin-top: 6px; border: 1px solid var(--line2); background: var(--panel2); }
.an-note.bad { border-color: rgba(244,63,94,.5); background: rgba(244,63,94,.08); color: #fecdd3; }
.an-note.ok { border-color: rgba(34,197,94,.45); background: rgba(34,197,94,.07); color: #bbf7d0; }
.an-note.brain { border-color: rgba(219,39,119,.5); background: rgba(219,39,119,.07); }
.an-note.patch { border-color: rgba(167,139,250,.5); background: rgba(167,139,250,.07); }
.an-note.own { border-color: rgba(56,189,248,.5); background: rgba(56,189,248,.07); }
.an-gauge { display: flex; gap: 8px; align-items: center; font-size: 12px; margin-top: 6px; }
.an-gauge .track, .an-frow .track { position: relative; flex: 0 0 120px; height: 7px; border-radius: 5px; background: #182334; overflow: visible; }
.an-gauge .track i, .an-frow .track i { display: block; height: 100%; border-radius: 5px; transition: width .3s; }
.an-gauge .track b { position: absolute; top: -3px; bottom: -3px; border-left: 2px solid #f59e0b; }
.an-frow { display: flex; gap: 10px; align-items: center; margin: 7px 0; font-size: 12.5px; }
.an-frow .lbl { flex: 0 0 150px; color: var(--muted); }
.an-frow .track { flex: 1; height: 10px; }
.an-frow .n { flex: 0 0 34px; text-align: right; }
.an-patch { border: 1px solid var(--line2); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; background: var(--panel2); }
.an-patch.on { border-color: rgba(167,139,250,.55); box-shadow: 0 0 0 1px rgba(167,139,250,.15) inset; }
.an-patch .hd { display: flex; gap: 8px; align-items: center; }
@media (max-width: 1200px) { .an-chain { grid-template-columns: repeat(3, minmax(0, 1fr)); } .an-sticky { position: static; max-height: none; } }
@media (max-width: 760px) { .an-banner { flex-direction: column; align-items: stretch; } .an-ctl { min-width: 0; align-items: stretch; } .an-select { min-width: 0; width: 100%; } .an-chain { grid-template-columns: 1fr 1fr; } .an-kv { grid-template-columns: 1fr; gap: 2px; } .an-frow .lbl { flex-basis: 110px; } }

@media print {
  .side, .top, .toasts, .noprint { display: none !important; }
  .shell { display: block; height: auto; } .main, .view { height: auto; overflow: visible; }
  body { background: #fff; color: #111; } .panel { border-color: #ccc; background: #fff; } table.t th { background: #fff; color: #555; } table.t td { border-color: #eee; }
  .alert pre, .ev-detail pre, .mathline { color: #222; } .muted, .faint { color: #555; }
  .view { padding: 0; } .g6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g2, .g31 { grid-template-columns: 1fr; }
  :root { color-scheme: light; } html, body { background: #fff !important; } .panel > header { border-color: #ddd; }
  table.t { font-size: 10px; } table.t th, table.t td { padding: 4px 6px; overflow-wrap: anywhere; }
  .alert { background: #fff !important; border-color: #ccc; } .alert .h { color: #111; } .pill { border-color: #bbb; }
  .panel { break-inside: avoid; } .alert { break-inside: avoid; } .kpi .v { font-size: 22px; }
}

/* ---------- attack lab v1.4 ---------- */
.lab-hero { display: flex; gap: 16px; align-items: flex-end; padding: 22px 24px; border-radius: 14px; border: 1px solid var(--line2); background: radial-gradient(120% 140% at 0% 0%, rgba(34,211,238,.14), transparent 55%), radial-gradient(90% 120% at 100% 100%, rgba(167,139,250,.12), transparent 60%), var(--panel); }
.lab-hero h2 { margin: 4px 0 6px; font-size: 22px; letter-spacing: -.3px; }
.lab-hero p { margin: 0; color: var(--muted); max-width: 820px; font-size: 13.5px; }
.lab-eyebrow { font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.lab-num { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: rgba(34,211,238,.14); color: var(--accent); font-size: 11.5px; margin-right: 8px; font-weight: 700; }
.lab-status { margin-top: 12px; padding: 11px 16px; display: flex; align-items: center; gap: 8px; font-size: 13.5px; flex-wrap: wrap; }
.lab-status.running { border-color: rgba(34,211,238,.45); }
.lab-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); flex: none; }
.lab-dot.ok { background: var(--good); } .lab-dot.bad { background: var(--bad); box-shadow: 0 0 10px var(--bad); }
.lab-dot.live { background: var(--accent); animation: labPulse 1.2s infinite; }
@keyframes labPulse { 50% { box-shadow: 0 0 0 6px rgba(34,211,238,0); opacity: .55; } }
.k-acc { color: var(--accent); } .k-bad { color: #fb7185; } .k-good { color: var(--good); }
.lab-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.lab-main { display: grid; gap: 16px; min-width: 0; }
.lab-rail { position: sticky; top: 12px; max-height: calc(100vh - 24px); display: flex; flex-direction: column; }
#lab-q { width: 100%; background: #070c14; border: 1px solid var(--line2); border-radius: 9px; padding: 9px 12px; outline: none; }
#lab-q:focus { border-color: rgba(34,211,238,.6); }
.lab-presets, .lab-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.lab-chip { background: var(--panel2); border: 1px solid var(--line2); color: var(--muted); border-radius: 999px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
.lab-chip:hover { color: var(--text); border-color: rgba(34,211,238,.5); }
.lab-chip span { margin-left: 6px; color: var(--faint); font-size: 11px; }
.lab-list { overflow-y: auto; padding: 4px 10px 12px; flex: 1; }
.lab-gl { font-size: 10.5px; letter-spacing: 1.3px; text-transform: uppercase; color: var(--faint); margin: 12px 6px 6px; }
.lab-item { display: flex; gap: 8px; align-items: flex-start; padding: 9px 10px; border-radius: 10px; border: 1px solid transparent; cursor: pointer; outline: none; }
.lab-item[hidden], .lab-g[hidden], [data-pane][hidden] { display: none; }
.lab-item:hover, .lab-item:focus-visible { background: var(--panel2); }
.lab-item.on { background: rgba(34,211,238,.08); border-color: rgba(34,211,238,.45); }
.lab-in { font-weight: 600; font-size: 13.5px; } .lab-it { color: var(--faint); font-size: 11.5px; }
.lab-hb { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; } .lab-hb:empty { display: none; }
.lab-h { font-size: 10.5px; padding: 0 6px; border-radius: 5px; border: 1px solid; }
.lab-h.ok { color: #86efac; border-color: rgba(34,197,94,.35); } .lab-h.bad { color: #fda4af; border-color: rgba(244,63,94,.4); }
.lab-add { flex: none; width: 24px; height: 24px; border-radius: 7px; border: 1px solid var(--line2); background: none; color: var(--muted); cursor: pointer; line-height: 1; }
.lab-add:hover, .lab-add.on { color: var(--accent); border-color: rgba(34,211,238,.55); }
.lab-title { margin: 4px 0 8px; font-size: 19px; }
.lab-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 12px; }
.lab-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 10px; }
.lab-3 p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.lab-sample { margin: 6px 0 12px; } .lab-sample summary { cursor: pointer; color: var(--muted); font-size: 12.5px; }
.lab-sample pre { margin: 8px 0 0; background: #04070c; border-radius: 8px; padding: 10px 12px; font-size: 11px; white-space: pre-wrap; word-break: break-all; color: #fca5a5; }
.lab-ctl { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.lab-ctl-c { padding: 16px 18px; } .lab-ctl-c h3 { margin: 0 0 12px; font-size: 14px; }
.lab-go { border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.lab-go #launch { padding: 14px 16px; font-size: 14.5px; font-weight: 600; }
.lab-go #launch.danger { background: linear-gradient(180deg, #e11d48, #be123c); border-color: #f43f5e; color: #fff; }
#launch-note { font-size: 12px; }
.lab-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lab-switch button { text-align: left; padding: 12px 14px; border-radius: 11px; border: 1px solid var(--line2); background: var(--panel2); cursor: pointer; display: flex; flex-direction: column; gap: 4px; transition: border-color .15s, background .15s; }
.lab-switch button span { color: var(--muted); font-size: 12px; }
.lab-switch button b::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; background: var(--faint); vertical-align: 1px; }
.lab-switch button[data-m="protect"].on { border-color: rgba(34,197,94,.6); background: rgba(34,197,94,.08); }
.lab-switch button[data-m="protect"].on b::before { background: var(--good); box-shadow: 0 0 8px var(--good); }
.lab-switch button[data-m="monitor"].on { border-color: rgba(244,63,94,.6); background: rgba(244,63,94,.08); }
.lab-switch button[data-m="monitor"].on b::before { background: var(--bad); box-shadow: 0 0 8px var(--bad); }
.lab-switch button:disabled { cursor: not-allowed; opacity: .6; }
.lab-pipe { display: flex; align-items: stretch; }
.lab-node { flex: 1; min-width: 0; border: 1px solid var(--line2); border-radius: 12px; padding: 12px; background: var(--panel2); transition: border-color .25s, background .25s; }
.lab-step { font-size: 10.5px; color: var(--faint); font-family: var(--mono); }
.lab-nt { font-weight: 600; font-size: 13px; margin: 2px 0 6px; }
.lab-nv { font-size: 24px; font-weight: 700; letter-spacing: -.5px; line-height: 1.1; }
.lab-nv small { display: block; font-size: 11px; font-weight: 500; color: var(--faint); letter-spacing: 0; }
.lab-ns { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.lab-node.is-on { border-color: rgba(34,211,238,.4); }
.lab-node.is-stop { border-color: rgba(34,197,94,.55); background: rgba(34,197,94,.07); } .lab-node.is-stop .lab-nv { color: #86efac; }
.lab-node.is-warn { border-color: rgba(245,158,11,.55); background: rgba(245,158,11,.07); } .lab-node.is-warn .lab-nv { color: #fcd34d; }
.lab-node.is-breach { border-color: rgba(244,63,94,.7); background: rgba(244,63,94,.1); box-shadow: 0 0 18px rgba(244,63,94,.18); } .lab-node.is-breach .lab-nv, .lab-node.is-breach b { color: #fb7185; }
.lab-node.is-safe { border-color: rgba(34,197,94,.55); } .lab-node.is-safe .lab-nv { color: #86efac; }
.lab-arrow { flex: 0 0 26px; display: flex; align-items: center; }
.lab-arrow i { display: block; width: 100%; height: 2px; background: var(--line2); position: relative; }
.lab-arrow i::after { content: ''; position: absolute; right: -1px; top: -4px; border: 5px solid transparent; border-left-color: var(--line2); border-right: 0; }
.lab-arrow.flow i { background: repeating-linear-gradient(90deg, var(--accent) 0 6px, transparent 6px 10px); background-size: 20px 2px; animation: labFlow .6s linear infinite; }
.lab-arrow.bad i { background-color: var(--bad); }
.lab-arrow.flow.bad i { background: repeating-linear-gradient(90deg, var(--bad) 0 6px, transparent 6px 10px); background-size: 20px 2px; }
@keyframes labFlow { to { background-position: 20px 0; } }
.lab-trace-h { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.lab-trace { list-style: none; margin: 0; padding: 0; }
.lab-trace li { display: flex; gap: 10px; padding: 8px 0 10px; position: relative; }
.lab-trace li:not(:last-child)::before { content: ''; position: absolute; left: 11px; top: 32px; bottom: -2px; width: 2px; background: var(--line2); }
.lab-tn { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 700; border: 1px solid var(--line2); background: var(--panel2); color: var(--muted); }
.lab-trace li.is-on .lab-tn { border-color: rgba(34,211,238,.6); color: var(--accent); }
.lab-trace li.is-stop .lab-tn, .lab-trace li.is-safe .lab-tn { border-color: rgba(34,197,94,.6); color: #86efac; background: rgba(34,197,94,.1); }
.lab-trace li.is-warn .lab-tn { border-color: rgba(245,158,11,.6); color: #fcd34d; }
.lab-trace li.is-breach .lab-tn { border-color: var(--bad); color: #fff; background: var(--bad); }
.lab-tb { color: var(--muted); font-size: 12.5px; margin-top: 2px; word-break: break-word; }
.lab-req { margin-top: 4px; background: #04070c; border-radius: 6px; padding: 6px 8px; font-size: 11.5px; color: var(--text); }
.lab-cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lab-cmp-c { border: 1px solid var(--line2); border-radius: 12px; padding: 14px; background: var(--panel2); display: grid; gap: 8px; align-content: start; }
.lab-cmp-c.bad { border-color: rgba(244,63,94,.5); } .lab-cmp-c.ok { border-color: rgba(34,197,94,.5); } .lab-cmp-c.none { border-style: dashed; }
.lab-cmp-l { font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.lab-cmp-big { font-size: 20px; font-weight: 700; } .lab-cmp-c.bad .lab-cmp-big { color: #fb7185; } .lab-cmp-c.ok .lab-cmp-big { color: #86efac; }
.lab-cmp-g { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; font-size: 12px; color: var(--muted); }
.lab-cmp-g b { color: var(--text); }
.lab-tabsh { flex-wrap: wrap; }
@media (max-width: 1100px) { .lab-pipe { flex-direction: column; } .lab-arrow { flex-basis: 18px; justify-content: center; } .lab-arrow i { width: 2px; height: 100%; } .lab-arrow i::after { display: none; } .lab-3 { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .lab-grid { grid-template-columns: 1fr; } .lab-rail { position: static; max-height: 420px; } .lab-ctl { grid-template-columns: 1fr; } .lab-go { border-left: 0; border-top: 1px solid var(--line); } }
@media (max-width: 560px) { .lab-hero { flex-direction: column; align-items: flex-start; padding: 16px; } .lab-switch, .lab-cmp { grid-template-columns: 1fr; } }
.lab-item > div { flex: 1; min-width: 0; }
@media (max-width: 700px) { .top { flex-wrap: wrap; row-gap: 6px; height: auto; padding: 10px 16px; } }
