/* GateClash — three themes: Dark "Night Watch" (default), Medium "Dusk", Light "Daylight". */
/* Fonts: Orbitron (titles, scores) + Exo 2 (text) — "Command centre" */
@font-face { font-family: "Orbitron"; font-weight: 500; font-display: swap; src: url(/static/fonts/orbitron-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Orbitron"; font-weight: 600; font-display: swap; src: url(/static/fonts/orbitron-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Orbitron"; font-weight: 700; font-display: swap; src: url(/static/fonts/orbitron-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Orbitron"; font-weight: 800; font-display: swap; src: url(/static/fonts/orbitron-latin-800-normal.woff2) format("woff2"); }
@font-face { font-family: "Exo 2"; font-weight: 400; font-display: swap; src: url(/static/fonts/exo-2-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Exo 2"; font-weight: 500; font-display: swap; src: url(/static/fonts/exo-2-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Exo 2"; font-weight: 600; font-display: swap; src: url(/static/fonts/exo-2-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Exo 2"; font-weight: 700; font-display: swap; src: url(/static/fonts/exo-2-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-display: swap; src: url(/static/fonts/jetbrains-mono-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-display: swap; src: url(/static/fonts/jetbrains-mono-latin-500-normal.woff2) format("woff2"); }

:root, [data-theme="dark"] {
  --bg: #07110F; --surface: #0F1D1A; --surface2: #132622; --line: #1F3A33; --text: #E6F2EF; --muted: #8FA9A2;
  --brand: #2FE0B0; --brand-hover: #7FF0CF; --on-brand: #04201A; --brand-soft: rgba(47,224,176,.12);
  --safe: #3DDC84; --caution: #F5B83D; --high: #FF9F43; --danger: #FF5C5C; --info: #8FA9A2; --low: #7CB7FF;
  --safe-bg: rgba(61,220,132,.14); --caution-bg: rgba(245,184,61,.14); --high-bg: rgba(255,159,67,.14);
  --danger-bg: rgba(255,92,92,.14); --info-bg: rgba(143,169,162,.12); --low-bg: rgba(124,183,255,.13);
  --input: #0B1715; --glow: rgba(47,224,176,.35); --grid: rgba(47,224,176,.045);
  --shadow: 0 0 0 1px rgba(47,224,176,.04), 0 10px 30px rgba(0,0,0,.35);
  color-scheme: dark;
}
[data-theme="medium"] {
  --bg: #1E2B32; --surface: #27373F; --surface2: #2D3F48; --line: #3C525D; --text: #F1F5F7; --muted: #B0C1C9;
  --brand: #3CCFB0; --brand-hover: #7FE3CD; --on-brand: #0B2620; --brand-soft: rgba(60,207,176,.14);
  --safe: #4ADE80; --caution: #FBBF24; --high: #FB923C; --danger: #F87171; --info: #B0C1C9; --low: #93C5FD;
  --safe-bg: rgba(74,222,128,.16); --caution-bg: rgba(251,191,36,.16); --high-bg: rgba(251,146,60,.16);
  --danger-bg: rgba(248,113,113,.16); --info-bg: rgba(176,193,201,.12); --low-bg: rgba(147,197,253,.15);
  --input: #22313A; --glow: rgba(60,207,176,.3); --grid: rgba(255,255,255,.03);
  --shadow: 0 10px 30px rgba(0,0,0,.25);
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #F3F7F6; --surface: #FFFFFF; --surface2: #F7FAF9; --line: #D4E1DD; --text: #12211D; --muted: #526B64;
  --brand: #0F7A66; --brand-hover: #0A5A4B; --on-brand: #FFFFFF; --brand-soft: #E1F2EE;
  --safe: #17703C; --caution: #8A5700; --high: #A4460F; --danger: #C22E2E; --info: #526B64; --low: #2F6591;
  --safe-bg: #E3F3E9; --caution-bg: #FBF0DC; --high-bg: #FDEBDD; --danger-bg: #FBE4E4; --info-bg: #EDF2F0; --low-bg: #E4EEF8;
  --input: #FFFFFF; --glow: rgba(15,122,102,.18); --grid: rgba(15,122,102,.035);
  --shadow: 0 1px 2px rgba(18,33,29,.05), 0 8px 24px rgba(18,33,29,.06);
  color-scheme: light;
}
/* The live feed always looks like a terminal, in every theme. */
.term { --t-bg: #040B0A; --t-line: #16302A; --t-text: #D7EBE5; --t-muted: #6F8E86; --t-ok: #3DDC84; --t-warn: #F5B83D; --t-bad: #FF6B6B; --t-brand: #2FE0B0; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15.5px/1.55 "Exo 2", -apple-system, "Segoe UI", Roboto, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text); background: var(--bg); }
body.app { background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px; }
a { color: var(--brand); }
a:hover { color: var(--brand-hover); }
h1, h2, .display { font-family: "Orbitron", "Exo 2", sans-serif; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
h1 { font-size: 26px; line-height: 1.25; margin: 0 0 8px; }
h2 { font-size: 17px; margin: 30px 0 12px; }
h3 { font-size: 15px; margin: 0 0 4px; font-weight: 600; }
p { margin: 0 0 10px; }
small, .muted { color: var(--muted); }
.mono, code, pre { font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; }
code, pre { font-size: 13px; }
pre { white-space: pre-wrap; word-break: break-word; background: var(--surface2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; color: var(--text); }
.copy { background: var(--surface2); border: 1px dashed var(--line); border-radius: 6px; padding: 6px 8px; display: inline-block; word-break: break-all; font-family: "JetBrains Mono", monospace; font-size: 13px; }
.eyebrow { font-family: "JetBrains Mono", monospace; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.eyebrow.accent { color: var(--brand); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- layout ---------- */
.shell { display: flex; min-height: 100vh; }
.side { width: 250px; background: var(--surface); border-right: 1px solid var(--line); padding: 22px 14px; position: sticky; top: 0;
  height: 100vh; overflow-y: auto; flex-shrink: 0; display: flex; flex-direction: column; }
.brand { font-family: "Orbitron", sans-serif; font-weight: 800; font-size: 18px; text-transform: uppercase; letter-spacing: .08em; color: var(--text); text-decoration: none;
  display: flex; align-items: center; gap: 10px; margin: 0 8px 22px; }
.brand:hover { color: var(--text); }
.brand .mark { width: 30px; height: 30px; filter: drop-shadow(0 0 6px var(--glow)); }
.mark .m-shield { fill: none; stroke: var(--brand); stroke-width: 2.2; }
.mark .m-hash { stroke: var(--brand); stroke-width: 2; fill: none; stroke-linecap: round; }
.side nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--text); text-decoration: none;
  margin-bottom: 3px; font-weight: 500; border: 1px solid transparent; min-height: 44px; }
.side nav a:hover { background: var(--surface2); color: var(--text); }
.side nav a.on { background: var(--brand-soft); color: var(--brand); border-color: rgba(47,224,176,.25); font-weight: 600; }
.side nav svg { width: 20px; height: 20px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.side .group { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .14em; margin: 18px 12px 6px; }
.side .plan { margin-top: auto; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface2); font-size: 13px; }
.side .plan strong { display: block; }
.ws-switch select { width: 100%; }
.ws-name { margin: 0 12px 10px; }
.main { flex: 1; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 14px 32px; border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.topbar .watching { flex: 1; color: var(--muted); display: flex; align-items: center; gap: 10px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--safe); box-shadow: 0 0 0 0 var(--safe); animation: gcPing 2s infinite; flex-shrink: 0; }
@keyframes gcPing { 0% { box-shadow: 0 0 0 0 rgba(61,220,132,.6); } 70% { box-shadow: 0 0 0 8px rgba(61,220,132,0); } 100% { box-shadow: 0 0 0 0 rgba(61,220,132,0); } }
.themes { display: flex; gap: 4px; padding: 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.themes button { min-height: 36px; padding: 0 14px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); font: 600 13px "Exo 2", sans-serif; cursor: pointer; }
.themes button[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); }
.icon-btn { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; color: var(--text); position: relative; text-decoration: none; }
.icon-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn .dot { position: absolute; top: -5px; right: -5px; background: var(--danger); color: #fff; border-radius: 10px; font-size: 11px; line-height: 18px; min-width: 18px; padding: 0 5px; text-align: center; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; font: 700 14px "Orbitron", sans-serif; border: 1px solid var(--line); text-decoration: none; }
.content { padding: 30px 32px 70px; max-width: 1320px; }
@media (max-width: 760px) {
  .shell { display: block; }
  .side { width: auto; height: auto; position: static; border-right: 0; border-bottom: 1px solid var(--line); padding: 14px 16px; }
  .side nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .side nav a { padding: 8px 10px; }
  .side .group, .side .plan { display: none; }
  .content, .topbar { padding-left: 16px; padding-right: 16px; }
  .topbar { flex-wrap: wrap; position: static; }
  .topbar .watching { flex-basis: 100%; }
  h1 { font-size: 24px; }
}

/* ---------- auth pages ---------- */
body.authpage { background-image: radial-gradient(ellipse at 50% -10%, var(--brand-soft), transparent 60%),
  linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: auto, 40px 40px, 40px 40px; min-height: 100vh; }
.auth { max-width: 440px; margin: 8vh auto; padding: 0 16px; }
.auth .card { padding: 30px; }
.auth .brand { justify-content: center; font-size: 24px; margin-bottom: 22px; }

/* ---------- cards and grids ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; margin-bottom: 16px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 10px; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }

/* ---------- forms ---------- */
label { display: block; font-weight: 600; margin: 12px 0 4px; }
label.inline { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; margin: 6px 12px 6px 0; }
input[type=text], input[type=tel], input[type=email], input[type=password], input[type=url], input[type=date], input[type=number], input[type=file], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: var(--input); color: var(--text); min-height: 44px; }
textarea { min-height: 90px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.row > select, .row > input { width: auto; flex: 1 1 180px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 4px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--brand); color: var(--on-brand); border: 1px solid var(--brand);
  border-radius: 10px; padding: 10px 18px; font: 600 15px "Exo 2", sans-serif; cursor: pointer; text-decoration: none; min-height: 44px;
  box-shadow: 0 0 18px var(--glow); transition: filter .15s, transform .15s; }
.btn:hover { color: var(--on-brand); filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; }
.btn.light { background: var(--surface); color: var(--text); border: 1px solid var(--line); font-weight: 500; box-shadow: none; }
.btn.light:hover { background: var(--surface2); color: var(--text); }
.btn.danger { background: #B42828; border-color: #B42828; color: #fff; box-shadow: none; }
.btn.small { padding: 6px 12px; font-size: 13px; min-height: 34px; }
.btn.big { padding: 14px 26px; font-size: 16px; border-radius: 12px; }
.btn.block { display: flex; width: 100%; margin-top: 16px; }
form.inline { display: inline; }
.linkbtn { background: none; border: 0; color: var(--brand); padding: 0; font: inherit; cursor: pointer; text-decoration: underline; }

/* ---------- messages ---------- */
.flash { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; border: 1px solid; word-break: break-word; }
.flash.ok { background: var(--safe-bg); border-color: var(--safe); color: var(--safe); }
.flash.error { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
.note { background: var(--brand-soft); border-left: 3px solid var(--brand); padding: 10px 14px; border-radius: 0 10px 10px 0; margin: 12px 0; }

/* ---------- badges ---------- */
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 20px; white-space: nowrap; }
.sev-critical { background: var(--danger-bg); color: var(--danger); }
.sev-high { background: var(--high-bg); color: var(--high); }
.sev-medium { background: var(--caution-bg); color: var(--caution); }
.sev-low { background: var(--low-bg); color: var(--low); }
.sev-info { background: var(--info-bg); color: var(--info); }
.st-verified, .st-completed, .st-fixed, .st-good, .st-ok, .st-safe { background: var(--safe-bg); color: var(--safe); }
.st-unverified, .st-queued, .st-running, .st-marked_fixed, .st-fair, .st-work, .st-attention { background: var(--caution-bg); color: var(--caution); }
.st-lost, .st-failed, .st-reopened, .st-bad, .st-weak, .st-error, .st-danger { background: var(--danger-bg); color: var(--danger); }
.st-cancelled, .st-false_positive, .st-accepted_risk, .st-open, .st-none, .st-unknown, .st-skipped, .st-info { background: var(--info-bg); color: var(--info); }
.tag { display: inline-block; font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 20px; background: var(--brand-soft); color: var(--brand); white-space: nowrap; }

/* ---------- score gauge ---------- */
.gauge { display: block; margin: 0 auto; max-width: 100%; height: auto; }
.gauge .b-red { stroke: var(--danger); stroke-opacity: .2; }
.gauge .b-amber { stroke: var(--caution); stroke-opacity: .2; }
.gauge .b-green { stroke: var(--safe); stroke-opacity: .2; }
.gauge .needle { stroke: var(--text); }
.gauge .hub { fill: var(--text); }
.gauge .num { font-family: "Exo 2", sans-serif; font-weight: 700; }
.gauge .of { fill: var(--muted); font-weight: 500; }
.gauge.danger .fill { stroke: var(--danger); } .gauge.danger .num { fill: var(--danger); }
.gauge.attention .fill { stroke: var(--caution); } .gauge.attention .num { fill: var(--caution); }
.gauge.safe .fill { stroke: var(--safe); } .gauge.safe .num { fill: var(--safe); }
.gauge.none .fill { stroke: var(--line); } .gauge.none .num { fill: var(--muted); }
.gauge.safe { animation: gcGlow 2.4s ease-in-out infinite; }
.gauge .fill { stroke-dasharray: 600; stroke-dashoffset: 600; animation: gcDraw 1.2s ease-out forwards; }
@keyframes gcDraw { to { stroke-dashoffset: 0; } }
@keyframes gcGlow { 0%,100% { filter: drop-shadow(0 0 6px rgba(61,220,132,.3)); } 50% { filter: drop-shadow(0 0 18px rgba(61,220,132,.7)); } }
@keyframes gcPulse { 0%,100% { opacity: .5; transform: scale(.94); } 50% { opacity: 1; transform: scale(1.06); } }
.verdict { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border-radius: 12px; font: 700 16px "Orbitron", sans-serif; text-transform: uppercase; letter-spacing: .08em; }
.verdict svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.verdict.danger { background: var(--danger-bg); color: var(--danger); } .verdict.danger svg { animation: gcPulse 1.4s ease-in-out infinite; }
.verdict.attention { background: var(--caution-bg); color: var(--caution); }
.verdict.safe { background: var(--safe-bg); color: var(--safe); box-shadow: 0 0 20px rgba(61,220,132,.18); }
.verdict.none { background: var(--info-bg); color: var(--muted); }
.verdict.small { font-size: 12px; padding: 6px 12px; } .verdict.small svg { width: 20px; height: 20px; }
.score-card { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.score-card .eyebrow-row { align-self: stretch; display: flex; justify-content: space-between; gap: 8px; }
.score-card .delta { color: var(--muted); font-size: 14px; }
.score-card .delta strong { color: var(--brand); }
.score-card.is-danger { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger-bg), 0 0 30px rgba(255,92,92,.12); }
.trendline { width: 100%; height: 40px; }
.trendline polyline { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 4px var(--glow)); }
/* legacy number-only score (kept for older pages) */
.score { display: flex; align-items: center; gap: 18px; }
.score .num { font: 700 52px/1 "Exo 2", sans-serif; }
.score .num small { font-size: 18px; font-weight: 500; }
.score.good .num { color: var(--safe); } .score.fair .num { color: var(--caution); } .score.weak .num { color: var(--high); }
.score.bad .num { color: var(--danger); } .score.none .num { color: var(--muted); }
.spark { display: block; }
.spark polyline { fill: none; stroke: var(--brand); stroke-width: 2; }
.spark circle { fill: var(--brand); }
.counts { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- dashboard ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head p { margin: 0; color: var(--muted); }
.dash { display: grid; grid-template-columns: minmax(300px, 1.45fr) repeat(3, minmax(0, 1fr)); gap: 18px; }
.dash .score-card { grid-row: span 2; margin: 0; }
.tile { margin: 0; display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--text); transition: transform .15s, border-color .15s; min-height: 200px; }
a.tile:hover { transform: translateY(-2px); border-color: var(--brand); color: var(--text); }
.tile .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.tile .ico { width: 42px; height: 42px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface2); }
.tile .ico svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tile h3 { font: 700 15px/1.3 "Orbitron", sans-serif; margin: 0; text-transform: uppercase; letter-spacing: .06em; }
.tile p { color: var(--muted); font-size: 14px; margin: 0; }
.tile .bars { margin-top: auto; }
.tile.safe .ico, .tile.safe .bars rect { color: var(--safe); fill: var(--safe); }
.tile.attention .ico, .tile.attention .bars rect.bad { color: var(--caution); fill: var(--caution); }
.tile.danger .ico, .tile.danger .bars rect.bad { color: var(--danger); fill: var(--danger); }
.tile .bars rect { fill: var(--safe); opacity: .8; }
.tile.none .ico { color: var(--muted); }
.tile.danger { border-color: var(--danger); box-shadow: 0 0 0 1px var(--danger-bg), 0 0 26px rgba(255,92,92,.1); }
.tile .ico { color: var(--muted); }
.tile.attention .ico { background: var(--caution-bg); } .tile.danger .ico { background: var(--danger-bg); } .tile.safe .ico { background: var(--safe-bg); }
.tile .none-line { margin-top: auto; height: 36px; border-bottom: 1px dashed var(--line); }
.dash-lower { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; margin-top: 18px; }
.dash-lower > .card { margin: 0; }
@media (max-width: 1200px) { .dash { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash .score-card { grid-column: span 2; grid-row: auto; } }
@media (max-width: 900px) { .dash-lower { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .dash { grid-template-columns: 1fr; } .dash .score-card { grid-column: auto; } }

/* terminal-style feed */
.term { background: var(--t-bg); border: 1px solid var(--t-line); border-radius: 16px; padding: 20px 22px; color: var(--t-text); font: 14px/1.5 "JetBrains Mono", monospace; min-height: 280px; }
.term .head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-family: "Exo 2", sans-serif; font-size: 13px; color: var(--t-muted); }
.term .head .eyebrow { color: var(--t-brand); font-size: 13px; letter-spacing: .2em; }
.term .head .live { display: inline-flex; gap: 8px; align-items: center; }
.term ol { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow-y: auto; }
.term li { display: grid; grid-template-columns: 84px 20px 1fr; gap: 6px; padding: 5px 0; animation: gcIn .35s ease-out both; }
.term li .t { color: var(--t-muted); }
.term li.ok .s { color: var(--t-ok); } .term li.warn .s, .term li.warn .m { color: var(--t-warn); }
.term li.bad .s, .term li.bad .m { color: var(--t-bad); } .term li.info .s { color: var(--t-brand); } .term li.muted { color: var(--t-muted); }
.term .cursor { color: var(--t-brand); } .term .cursor::after { content: "▋"; animation: gcBlink 1s steps(1) infinite; }
.term .empty { color: var(--t-muted); }
.term a { color: var(--t-brand); }
@keyframes gcIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes gcBlink { 50% { opacity: 0; } }
@media (max-width: 620px) { .term li { grid-template-columns: 70px 16px 1fr; font-size: 12.5px; } }

/* "fix these first" list */
.fixlist { display: flex; flex-direction: column; gap: 12px; }
.fixitem { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface2); text-decoration: none; color: var(--text); }
a.fixitem:hover { border-color: var(--brand); color: var(--text); }
.fixitem .n { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font: 700 16px "Orbitron", sans-serif; flex-shrink: 0; background: var(--brand-soft); color: var(--brand); }
.fixitem .n.critical, .fixitem .n.high { background: var(--danger-bg); color: var(--danger); }
.fixitem .n.medium { background: var(--caution-bg); color: var(--caution); }
.fixitem strong { display: block; margin-bottom: 6px; }
.fixitem .row { gap: 8px; }

/* ---------- tables ---------- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: "JetBrains Mono", monospace; font-size: 11.5px; color: var(--muted); font-weight: 500; letter-spacing: .1em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }
.mini-score { font: 700 19px "Exo 2", sans-serif; }
.mini-score.danger { color: var(--danger); } .mini-score.attention { color: var(--caution); } .mini-score.safe { color: var(--safe); } .mini-score.none { color: var(--muted); }

/* ---------- findings ---------- */
.finding { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin-bottom: 12px; background: var(--surface); }
.finding .head { display: flex; gap: 12px; align-items: flex-start; }
.finding .num { background: var(--brand-soft); color: var(--brand); width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font: 700 15px "Orbitron", sans-serif; flex-shrink: 0; }
.finding h3 a { color: var(--text); }
.finding ol, .finding ul { margin: 6px 0 0; padding-left: 20px; }
.finding .why { margin-top: 8px; }
.finding .example { background: var(--brand-soft); border-left: 3px solid var(--brand); border-radius: 8px; padding: 10px 14px; margin: 10px 0; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding: 7px 0; display: flex; gap: 12px; align-items: center; }
.checklist .tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
.checklist .done .tick { background: var(--safe); border-color: var(--safe); color: var(--bg); }
.checklist .done a { color: var(--muted); text-decoration: line-through; }

/* ---------- "while we check" screen ---------- */
.scanning { position: relative; display: grid; grid-template-columns: minmax(240px, 1fr) minmax(300px, 1.2fr) minmax(280px, 1.3fr); gap: 26px; align-items: center; padding: 30px 0; }
.scanning::before { content: ""; position: absolute; left: -32px; right: -32px; top: 50%; height: 2px; background: linear-gradient(90deg, transparent, var(--brand), transparent);
  opacity: .25; animation: gcSweep 4s ease-in-out infinite; pointer-events: none; }
@keyframes gcSweep { 0%,100% { transform: translateY(-160px); opacity: 0; } 20%,80% { opacity: .35; } 50% { transform: translateY(160px); } }
.checkpanel { margin: 0; }
.checkpanel ul { list-style: none; padding: 0; margin: 10px 0 0; }
.checkpanel li { display: flex; gap: 12px; align-items: center; padding: 8px 0; color: var(--muted); }
.checkpanel li .s { width: 18px; text-align: center; font-family: "JetBrains Mono", monospace; }
.checkpanel li.good { color: var(--text); } .checkpanel li.good .s { color: var(--safe); }
.checkpanel li.attention { color: var(--text); } .checkpanel li.attention .s { color: var(--caution); }
.checkpanel li.danger { color: var(--text); } .checkpanel li.danger .s { color: var(--danger); }
.checkpanel li.running { color: var(--text); font-weight: 600; }
.checkpanel li.running .s { width: 16px; height: 16px; border: 2px solid var(--brand); border-right-color: transparent; border-radius: 50%; animation: gcSpin .9s linear infinite; }
.checkpanel li.skipped, .checkpanel li.error { color: var(--muted); }
@keyframes gcSpin { to { transform: rotate(360deg); } }
.ringwrap { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.ring { width: 100%; max-width: 360px; height: auto; }
.ring .track { stroke: var(--line); }
.ring .dots { stroke: var(--brand); stroke-opacity: .35; stroke-dasharray: 1 9; }
.ring .bar { stroke: var(--brand); filter: drop-shadow(0 0 10px var(--glow)); transition: stroke-dashoffset .8s ease; }
.ring .spin { transform-origin: 180px 180px; animation: gcSpin 6s linear infinite; }
.ring .spin path { stroke: var(--brand); stroke-opacity: .6; }
.ring .pct { font: 700 66px "Exo 2", sans-serif; fill: var(--text); }
.ring .lbl { font: 500 14px "JetBrains Mono", monospace; letter-spacing: .25em; fill: var(--muted); }
.ringwrap .now { font: 700 18px "Orbitron", sans-serif; margin: 0; text-transform: uppercase; letter-spacing: .06em; }
.scanning .term { min-height: 440px; }
.scanning .term ol { max-height: 400px; }
@media (max-width: 1100px) { .scanning { grid-template-columns: 1fr; } .scanning::before { display: none; } .ringwrap { order: -1; } }

/* ---------- misc ---------- */
progress { width: 100%; height: 12px; accent-color: var(--brand); }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs a { padding: 7px 14px; border-radius: 20px; text-decoration: none; color: var(--text); border: 1px solid var(--line); background: var(--surface); font-size: 14px; }
.tabs a.on { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
details { margin: 8px 0; }
summary { cursor: pointer; font-weight: 600; }
.qa { border-bottom: 1px solid var(--line); padding: 12px 0; }
.qa:last-child { border-bottom: 0; }

/* ---------- report (standalone, printable) ---------- */
.report { max-width: 880px; margin: 0 auto; padding: 32px 24px 60px; background: var(--surface); }
.report-head { border-bottom: 3px solid var(--brand); padding-bottom: 14px; margin-bottom: 20px; }
.report .actions { margin-bottom: 16px; }
@media print {
  .side, .topbar, .no-print, .actions { display: none !important; }
  body, body.app { background: #fff; }
  .content { padding: 0; max-width: none; }
  .finding, .card { break-inside: avoid; box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .gauge .fill { stroke-dashoffset: 0; } }
.card .row.between > h2 { margin: 0 0 14px; }
.scanning > * { position: relative; z-index: 1; }
.score-card .sevrow { margin-top: auto; align-self: stretch; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; border-top: 1px solid var(--line); padding-top: 14px; }
.score-card .sevrow a { text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border-radius: 10px; }
.score-card .sevrow a:hover { background: var(--surface2); }
.score-card .sevrow b { font: 700 26px "Exo 2", sans-serif; }
.score-card .sevrow span { font-size: 12px; color: var(--muted); }
.sevrow .critical b { color: var(--danger); } .sevrow .high b { color: var(--high); } .sevrow .medium b { color: var(--caution); } .sevrow .low b { color: var(--low); }
.sevrow .zero b { color: var(--muted); opacity: .6; }

@media (max-width: 1100px) and (min-width: 761px) {
  .side { width: 210px; padding: 18px 10px; }
  .side nav a { padding: 8px 10px; gap: 10px; font-size: 14.5px; }
  .topbar { padding: 12px 20px; gap: 10px; }
  .content { padding: 24px 20px 60px; }
  .themes button { padding: 0 10px; }
}

/* ---------- public pages ---------- */
.pubbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 32px; flex-wrap: wrap; }
.pubbar .brand { margin: 0; }
.pubbar nav { display: flex; gap: 18px; align-items: center; }
.pubbar nav a:not(.btn) { color: var(--text); text-decoration: none; font-weight: 500; }
.pubmain { max-width: 1240px; margin: 0 auto; padding: 20px 32px 70px; }
@media (max-width: 760px) { .pubbar, .pubmain { padding-left: 16px; padding-right: 16px; } }

/* ---------- plans & billing ---------- */
.themes a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 8px; color: var(--muted); font: 600 13px "Exo 2", sans-serif; text-decoration: none; }
.themes a[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
@media (max-width: 1000px) { .plans { grid-template-columns: 1fr; } }
.plan { position: relative; display: flex; flex-direction: column; gap: 10px; margin: 0; }
.plan h2 { margin: 2px 0 0; font-size: 22px; }
.plan.popular { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand-soft), 0 0 34px var(--glow); }
.plan.current { outline: 2px dashed var(--line); outline-offset: 4px; }
.plan .ribbon { position: absolute; top: -12px; right: 18px; background: var(--brand); color: var(--on-brand); font: 700 11px "Orbitron", sans-serif; letter-spacing: .1em; text-transform: uppercase; padding: 5px 10px; border-radius: 20px; }
.plan .price b { font: 700 40px "Exo 2", sans-serif; letter-spacing: -.01em; }
.plan .price span { color: var(--muted); margin-left: 4px; }
.plan .per { color: var(--muted); font-size: 13px; margin-top: -6px; }
.plan .btn.block { margin-top: 6px; }
.ticks { list-style: none; padding: 0; margin: 6px 0 0; }
.ticks li { padding: 5px 0 5px 26px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 12px; height: 6px; border-left: 2px solid var(--safe); border-bottom: 2px solid var(--safe); transform: rotate(-45deg); }
.ticks.small li { font-size: 13.5px; padding: 3px 0 3px 24px; } .ticks.small li::before { top: 8px; }
.ticks li.new { color: var(--brand); font-weight: 600; }
.checks-list { margin-top: auto; border-top: 1px solid var(--line); padding-top: 10px; }
.faq p { max-width: 900px; }
.faq .tool-list { max-width: 900px; margin: 0 0 12px; padding-left: 20px; display: grid; gap: 6px; }
.bill-top .current-plan h2 { margin: 4px 0 8px; font-size: 24px; }
.meter { margin: 12px 0; } .meter svg { width: 100%; height: 8px; display: block; margin-top: 6px; }
.meter .bg { fill: var(--surface2); } .meter .fg { fill: var(--brand); } .meter.full .fg { fill: var(--caution); }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; align-items: end; }
.form-grid .span2 { grid-column: span 2; }
@media (max-width: 760px) { .form-grid { grid-template-columns: 1fr; } .form-grid .span2 { grid-column: auto; } }
table.sums td { padding: 8px 0; } table.sums td:last-child { text-align: right; white-space: nowrap; }
table.sums tr.total td { font: 700 19px "Exo 2", sans-serif; border-top: 2px solid var(--brand); }
.warn-card { border-color: var(--caution); } .warn-card ul { padding-left: 18px; }
.pay-result { max-width: 640px; margin: 30px auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.pay-result .row { justify-content: center; }
.testpay { max-width: 520px; margin: 20px auto; text-align: center; }
.testbanner { background: repeating-linear-gradient(45deg, var(--caution-bg), var(--caution-bg) 10px, transparent 10px, transparent 20px);
  color: var(--caution); border: 1px dashed var(--caution); border-radius: 10px; padding: 8px; font: 700 13px "Orbitron", sans-serif; letter-spacing: .12em; margin-bottom: 12px; }
.testpay h1 { font-size: 40px; margin: 10px 0; }
.side .plan { text-decoration: none; color: var(--text); display: block; }
.side .plan span { display: block; }
.side .plan .up { color: var(--brand); font-weight: 600; margin-top: 4px; }
.side .plan:hover { border-color: var(--brand); }
.lock { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 20px; background: var(--brand-soft); color: var(--brand); text-decoration: none; white-space: nowrap; }
.lock svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
.locked-card { border-style: dashed; }
.paused-note { background: var(--caution-bg); color: var(--caution); border-radius: 10px; padding: 10px 14px; margin: 10px 0; }
.client-logo { max-height: 64px; width: auto; height: auto; display: block; margin-bottom: 10px; }
.logo-preview { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: inline-block; margin: 6px 0 4px; }
.logo-preview img { max-height: 70px; width: auto; height: auto; display: block; }
.report-card { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.report-card h2 { margin: 4px 0 0; }
.report-card .btn { align-self: flex-start; margin-top: auto; }
.ico-lg { width: 46px; height: 46px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; }
.ico-lg svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.testpay h1 { font-family: "Exo 2", sans-serif; letter-spacing: 0; text-transform: none; }

/* ---------- phone menu ---------- */
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.side-menu { display: flex; flex-direction: column; flex: 1; }
.menu-btn { display: none; align-items: center; gap: 8px; min-height: 42px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface2); color: var(--text); font: 600 14px "Exo 2", sans-serif; cursor: pointer; }
.menu-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
@media (max-width: 760px) {
  .side-head .brand { margin: 0; }
  .menu-btn { display: inline-flex; }
  .side-menu { display: none; margin-top: 12px; }
  .side.open .side-menu { display: flex; }
  .side .plan { display: none !important; }
  .side nav a { flex: 1 1 45%; }
  .topbar { gap: 8px; }
  .topbar .themes button { padding: 0 9px; }
  .table-wrap table { min-width: 620px; }
  .content h1 { font-size: 22px; }
}

.meter.over .fg { fill: var(--danger); } .meter.over strong { color: var(--danger); }
.dash-lower .term { padding-bottom: 26px; }
.dash-lower .term ol { max-height: 360px; margin-bottom: 12px; }

/* ---------- legal pages ---------- */
.legal { max-width: 860px; line-height: 1.7; }
.legal h1 { margin-bottom: 4px; }
.legal h2 { font-size: 15px; margin: 26px 0 8px; }
.legal ul { padding-left: 20px; } .legal li { margin: 6px 0; }
.legal-links a { color: var(--muted); }
.side-legal { font-size: 12px; margin: 14px 12px 0; }
.pubfoot { text-align: center; color: var(--muted); font-size: 13px; padding: 20px 16px 40px; }
.pubfoot a { color: var(--muted); }

/* "You build. We fix." */
.fixcard { border-left: 3px solid var(--brand); margin: 18px 0; }
.fixcard h3 { margin: 6px 0 8px; }
.fix-price { font-family: 'Exo 2', sans-serif; font-size: 30px; font-weight: 700; color: var(--brand); margin: 4px 0; }
.fixrow td { vertical-align: top; }
.fixrow form { margin: 4px 0; }
.fixlink { margin: 6px 0 0; font-weight: 600; }
.launch-verdict { border-left: 4px solid var(--info); }
.launch-verdict.danger { border-left-color: var(--danger); }
.launch-verdict.attention { border-left-color: var(--caution); }
.launch-verdict.safe { border-left-color: var(--safe); }
.launch-verdict .verdict { font-size: 20px; }
.launch-hero .price { font-family: 'Exo 2', sans-serif; font-size: 40px; font-weight: 700; color: var(--brand); margin: 6px 0; }
.launch-list { columns: 2; column-gap: 32px; }
@media (max-width: 640px) { .launch-list { columns: 1; } }
.launch-target { justify-content: space-between; border-top: 1px solid var(--line); padding: 10px 0; }
.launch-add { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.launch-add summary { cursor: pointer; font-weight: 600; }
.launch-add form { margin-top: 12px; }
/* Report part 2: technical details for developers */
h2.part2 { margin-top: 36px; padding-top: 18px; border-top: 2px solid var(--line); }
.tech-table { width: 100%; }
.tech-table th { width: 150px; vertical-align: top; text-align: left; white-space: nowrap; }
.tech-table td { vertical-align: top; overflow-wrap: anywhere; }
.tech-table code { font-size: 12.5px; }
@media print { h2.part2 { break-before: page; border-top: 0; } }
