:root {
  --bg: #0f1115;
  --panel: #161a22;
  --panel-2: #1c2230;
  --border: #262d3a;
  --text: #d8dee9;
  --muted: #7d8597;
  --accent: #1ec8ff;
  --accent-glow: rgba(30, 200, 255, 0.25);
  --green: #4ade80;
  --amber: #fbbf24;
  --red: #f87171;
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  background-color: var(--bg);
  /* faint cyber grid */
  background-image:
    linear-gradient(rgba(30, 200, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 200, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}
a { color: #93c5fd; text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: var(--panel-2); padding: 1px 5px; border-radius: 3px; }

/* Space Grotesk for headings + chrome (neuronetz family type); data stays monospace */
h1, h2, h3,
.brand-sub, .nav a, .bot-name { font-family: var(--font-display); }

/* one-line purpose statement under a page title */
.page-intro { color: var(--muted); font-size: 13px; line-height: 1.55; margin: 4px 0 10px; max-width: 74ch; }

/* collapsible per-page help — how to use it, what you're seeing, why it matters */
.page-help { margin: 0 0 18px; max-width: 80ch; }
.page-help summary {
  cursor: pointer; color: var(--accent); font-size: 12px;
  font-family: var(--font-display); letter-spacing: 0.5px;
  list-style: none; user-select: none; display: inline-block;
}
.page-help summary::-webkit-details-marker { display: none; }
.page-help summary::before { content: "▸ "; }
.page-help[open] summary::before { content: "▾ "; }
.page-help summary:hover { text-shadow: 0 0 10px var(--accent-glow); }
.help-body {
  margin-top: 10px; padding: 12px 14px;
  background: var(--panel-2); border: 1px solid var(--border);
  border-left: 2px solid var(--accent); border-radius: 4px;
}
.help-body p { margin: 0 0 8px; font-size: 13px; line-height: 1.6; color: var(--muted); }
.help-body p:last-child { margin-bottom: 0; }
.help-body b { color: var(--accent); font-family: var(--font-display); font-weight: 600; }

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex; align-items: center; gap: 12px;
  color: inherit; text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-icon {
  height: 48px; width: 160px;
  object-fit: cover; object-position: center;
  display: block;
  filter: drop-shadow(0 0 5px var(--accent)) drop-shadow(0 0 15px rgba(30, 200, 255, 0.5));
}
.brand-sub {
  color: var(--muted); font-size: 11px;
  text-transform: uppercase; letter-spacing: 1.2px;
  padding-left: 12px; border-left: 1px solid var(--border);
}
.nav a { margin-left: 18px; color: var(--muted); }
.nav a:hover { color: var(--text); }

/* live model status chip in the topbar */
.model-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-display); font-size: 10px; letter-spacing: 1px;
  text-transform: uppercase; padding: 3px 9px; margin-left: 14px;
  border: 1px solid var(--border); border-radius: 4px;
  background: var(--panel-2); color: var(--muted); cursor: default;
}
.model-status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--muted);
}
.model-status[data-state="online"] { color: var(--green); border-color: color-mix(in oklab, var(--green) 45%, var(--border)); }
.model-status[data-state="online"] .model-status-dot { background: var(--green); box-shadow: 0 0 6px var(--green); animation: status-pulse 2.2s ease-in-out infinite; }
.model-status[data-state="offline"] { color: var(--amber); border-color: color-mix(in oklab, var(--amber) 45%, var(--border)); }
.model-status[data-state="offline"] .model-status-dot { background: var(--amber); box-shadow: 0 0 6px var(--amber); }
@keyframes status-pulse { 0%,100% { opacity: 0.55; } 50% { opacity: 1; } }

/* neuronetz family framing — right of the topbar */
.family { display: flex; align-items: center; gap: 14px; }
.family-icon {
  height: 44px; width: auto; display: block;
  filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 10px var(--accent-glow));
}

.content { padding: 24px; max-width: 1280px; margin: 0 auto; }
.footer { text-align: center; color: var(--muted); padding: 24px; font-size: 12px; }
.footer a { color: var(--accent); }

.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px 24px;
}
/* HUD corner brackets — targeting-frame cyber look */
.panel::before, .panel::after {
  content: ""; position: absolute; width: 15px; height: 15px;
  border: 2px solid var(--accent); pointer-events: none;
}
.panel::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; border-radius: 6px 0 0 0; }
.panel::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; border-radius: 0 0 6px 0; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.panel-head h1 { margin: 0; font-size: 18px; text-shadow: 0 0 18px var(--accent-glow); }
.count { color: var(--muted); font-size: 12px; }
.empty { color: var(--muted); }
.back { color: var(--muted); font-size: 12px; }
.summary-lead { color: var(--text); font-size: 15px; margin-top: 8px; }

table.cases { width: 100%; border-collapse: collapse; }
table.cases th, table.cases td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); }
table.cases th { color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
table.cases tr:hover { background: var(--panel-2); }
table.cases .muted { color: var(--muted); font-size: 12px; }
table.cases .summary { max-width: 600px; }

.sev-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; background: var(--panel-2); border: 1px solid var(--border); text-transform: uppercase; }
tr.sev-critical .sev-badge { color: var(--red); border-color: var(--red); }
tr.sev-high .sev-badge { color: var(--amber); border-color: var(--amber); }
tr.sev-medium .sev-badge { color: #fde68a; }
tr.sev-low .sev-badge { color: var(--muted); }

.tlp-badge { display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: 11px; font-weight: 600; }
.tlp-RED   { background: #7f1d1d; color: #fee2e2; }
.tlp-AMBER { background: #78350f; color: #fef3c7; }
.tlp-GREEN { background: #14532d; color: #d1fae5; }
.tlp-CLEAR { background: var(--panel-2); color: var(--muted); border: 1px solid var(--border); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }
.card { background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; padding: 14px 16px; }
.card.wide { grid-column: 1 / -1; }
.card h2 { font-size: 13px; color: var(--muted); margin: 0 0 10px; text-transform: uppercase; letter-spacing: 1px; }
.card h3 { font-size: 12px; color: var(--muted); margin: 12px 0 6px; }
.card dl { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; margin: 0; font-size: 13px; }
.card dt { color: var(--muted); }
.card dd { margin: 0; }
.card ul { margin: 0; padding-left: 18px; font-size: 13px; }

/* training loss chart (Trainline /train page) */
.loss-chart { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.loss-row { display: grid; grid-template-columns: 130px 1fr 72px; align-items: center; gap: 10px; font-size: 12px; }
.loss-step { color: var(--muted); }
.loss-bar-track { background: var(--panel-2); border: 1px solid var(--border); border-radius: 3px; height: 16px; overflow: hidden; }
.loss-bar { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--green)); }
.loss-val { text-align: right; color: var(--text); }

/* Worker Mesh — character bots (/cases/{id}/journey) */
.mesh { list-style: none; margin: 22px 0 0; padding: 0; position: relative; }
.mesh::before {
  content: ""; position: absolute; left: 47px; top: 36px; bottom: 70px; width: 3px;
  background: linear-gradient(180deg, transparent, var(--border) 7%, var(--border) 93%, transparent);
  border-radius: 2px;
}
.case-token {
  position: absolute; left: 42px; top: 28px; width: 13px; height: 13px; border-radius: 50%;
  background: var(--accent); opacity: 0; z-index: 3;
  box-shadow: 0 0 10px 3px var(--accent), 0 0 24px 7px var(--accent-glow);
}
.mesh.playing .case-token { animation: token-travel 6.6s ease-in-out forwards; }
@keyframes token-travel {
  0% { opacity: 0; top: 28px; }
  6% { opacity: 1; }
  94% { opacity: 1; }
  100% { opacity: 0; top: calc(100% - 78px); }
}

.bot {
  position: relative; display: grid; grid-template-columns: 96px 1fr;
  gap: 20px; align-items: start; padding-bottom: 26px;
}
.mesh.playing .bot {
  opacity: 0; transform: translateY(16px);
  animation: bot-rise 0.55s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
  animation-delay: calc(var(--i) * 0.95s);
}
@keyframes bot-rise { to { opacity: 1; transform: none; } }

.bot-avatar { position: relative; display: flex; flex-direction: column; align-items: center; }
.bot-svg { width: 96px; height: 116px; overflow: visible; }
.bot-done .bot-svg { animation: idle-float 3.6s ease-in-out infinite; animation-delay: calc(var(--i) * 0.3s); }
@keyframes idle-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.bot-name {
  margin-top: 2px; font-size: 12px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: var(--bot);
}
.bot-asleep .bot-name { color: var(--muted); }

.bot-head, .bot-body { fill: #11151d; stroke: var(--bot); stroke-width: 2.4; }
.bot-visor { fill: #0a0d13; }
.bot-stalk { stroke: var(--bot); stroke-width: 3; }
.bot-arm, .bot-foot { fill: #1c2230; stroke: var(--bot); stroke-width: 2; }
.bot-tip, .bot-eye.eye-awake, .bot-core { fill: var(--bot); }
.bot-mouth { stroke: var(--bot); stroke-width: 3; stroke-linecap: round; fill: none; }
.bot-eye.eye-sleep { stroke: var(--bot); stroke-width: 3; stroke-linecap: round; }
.bot-num { fill: #0a0d13; font-size: 11px; font-weight: 700; }

.eye-sleep, .mouth-flat { display: none; }
.bot-asleep .eye-awake, .bot-asleep .mouth-happy { display: none; }
.bot-asleep .eye-sleep, .bot-asleep .mouth-flat { display: inline; }
.bot-asleep .bot-svg { filter: grayscale(0.7) brightness(0.7); opacity: 0.55; }

.bot-done .bot-tip { animation: tip-pulse 1.8s ease-in-out infinite; }
@keyframes tip-pulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
.bot-done .bot-core { animation: core-pulse 2.4s ease-in-out infinite; }
@keyframes core-pulse { 0%, 100% { opacity: 0.65; } 50% { opacity: 1; } }

.bot-ring {
  position: absolute; top: 44px; left: 50%; width: 64px; height: 64px; margin-left: -32px;
  border-radius: 50%; border: 2px solid var(--bot); opacity: 0;
}
.mesh.playing .bot-done .bot-ring {
  animation: ring-burst 1s ease-out; animation-delay: calc(var(--i) * 0.95s);
}
@keyframes ring-burst { 0% { opacity: 0.8; transform: scale(0.3); } 100% { opacity: 0; transform: scale(1.6); } }

.bot-bubble {
  position: relative; background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 16px; min-height: 72px;
}
.bot-bubble::before {
  content: ""; position: absolute; left: -9px; top: 26px; width: 16px; height: 16px;
  background: var(--panel-2); border-left: 1px solid var(--border); border-bottom: 1px solid var(--border);
  transform: rotate(45deg);
}
.bot-done .bot-bubble { border-color: color-mix(in oklab, var(--bot) 45%, var(--border)); }
.bot-purpose { margin: 0 0 6px; font-size: 12px; font-style: italic; color: var(--muted); }
.bot-answer { margin: 0; font-size: 14px; color: var(--text); }
.bot-done .bot-answer { color: var(--bot); font-weight: 600; }
.bot-answer-skip { color: var(--muted); }
.bot-working { margin: 0; font-size: 14px; font-weight: 600; color: var(--bot); position: absolute; opacity: 0; pointer-events: none; }
.bot-facts { margin: 8px 0 0; padding-left: 16px; font-size: 12px; color: var(--muted); }
.bot-facts li { margin: 2px 0; }

/* live-model verdict on the Classifier bot */
.bot-model {
  margin: 10px 0 0; padding: 8px 10px; font-size: 13px;
  border: 1px solid var(--border); border-radius: 6px; background: var(--navy-700);
}
.model-chip {
  display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 0.6px;
  text-transform: uppercase; padding: 2px 7px; border-radius: 4px; margin-right: 6px;
  background: var(--cyan-700); color: var(--cyan-100); border: 1px solid var(--cyan-500);
}
.bot-model strong { color: var(--text); }
.model-verdict { font-size: 12px; }
.model-agree { border-color: color-mix(in oklab, var(--out-actioned) 45%, var(--border)); }
.model-agree .model-verdict { color: var(--out-actioned); }
.model-differ { border-color: color-mix(in oklab, var(--sev-medium) 45%, var(--border)); }
.model-differ .model-verdict { color: var(--sev-medium); }

.mesh.playing .bot-done .bot-working { animation: work-flash 1.5s ease both; animation-delay: calc(var(--i) * 0.95s); }
@keyframes work-flash { 0%, 12% { opacity: 0; } 22%, 60% { opacity: 1; } 74%, 100% { opacity: 0; } }
.mesh.playing .bot-done .bot-answer,
.mesh.playing .bot-done .bot-facts { animation: answer-rise 1.6s ease both; animation-delay: calc(var(--i) * 0.95s); }
@keyframes answer-rise { 0%, 62% { opacity: 0; transform: translateY(4px); } 80%, 100% { opacity: 1; transform: none; } }

.replay-btn {
  background: var(--panel-2); color: var(--accent); border: 1px solid var(--border);
  border-radius: 4px; padding: 4px 12px; font: inherit; font-size: 12px; cursor: pointer;
}
.replay-btn:hover { border-color: var(--accent); }

/* ── approval queue ─────────────────────────────────────────── */
.queue-tabs { display: flex; gap: 4px; margin: 12px 0 16px; border-bottom: 1px solid var(--border); }
.queue-tab {
  padding: 6px 14px; color: var(--muted); border: 1px solid transparent;
  border-bottom: none; border-radius: 4px 4px 0 0; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.queue-tab:hover { color: var(--text); }
.queue-tab.is-active {
  color: var(--accent); border-color: var(--border) var(--border) transparent;
  background: var(--panel-2);
}
.queue-action { display: inline-flex; gap: 4px; margin-right: 6px; align-items: center; }
.btn {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--border);
  border-radius: 3px; padding: 4px 10px; font: inherit; font-size: 12px; cursor: pointer;
}
.btn:hover { border-color: var(--accent); }
.btn-approve { color: var(--green); border-color: rgba(74, 222, 128, 0.35); }
.btn-approve:hover { background: rgba(74, 222, 128, 0.08); border-color: var(--green); }
.btn-reject { color: var(--red); border-color: rgba(248, 113, 113, 0.35); }
.btn-reject:hover { background: rgba(248, 113, 113, 0.08); border-color: var(--red); }
.reject-reason {
  background: var(--bg); color: var(--text); border: 1px solid var(--border);
  border-radius: 3px; padding: 3px 6px; font: inherit; font-size: 11px; width: 130px;
}
.reject-reason::placeholder { color: var(--muted); }
.outcome-pending_approval { background: rgba(251, 191, 36, 0.15); color: var(--amber); border: 1px solid rgba(251, 191, 36, 0.4); }

/* ── indicator lookup ───────────────────────────────────────── */
.lookup-form { display: flex; gap: 8px; margin: 14px 0 18px; }
.lookup-input {
  flex: 1; background: var(--bg); color: var(--text); border: 1px solid var(--border);
  border-radius: 4px; padding: 9px 12px; font: inherit; font-size: 14px;
}
.lookup-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.verdict { padding: 12px 16px; border-radius: 6px; margin: 14px 0; font-size: 14px; }
.verdict-bad { background: rgba(248, 113, 113, 0.12); border: 1px solid var(--red); color: var(--red); }
.verdict-clean { background: rgba(74, 222, 128, 0.10); border: 1px solid var(--green); color: var(--green); }

/* ── response actions ───────────────────────────────────────── */
.act-type { display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: 11px; text-transform: uppercase; border: 1px solid var(--border); }
.act-alert { color: var(--amber); border-color: var(--amber); }
.act-blocklist { color: var(--red); border-color: var(--red); }
.act-ticket { color: var(--accent); border-color: var(--accent); }
.btn-enforce { color: var(--bg); background: var(--accent); border-color: var(--accent); font-weight: 700; }
.btn-enforce:hover { background: #5ad8ff; box-shadow: 0 0 12px var(--accent-glow); }
.outcome-failed { background: rgba(248,113,113,0.15); color: var(--red); border: 1px solid var(--red); }

/* ── the disco: enforcement payoff ──────────────────────────── */
.disco {
  position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center;
  background: rgba(8,10,14,0.72); backdrop-filter: blur(2px); animation: disco-in 0.25s ease-out;
}
.disco.disco-out { animation: disco-fade 0.7s ease forwards; }
.disco-strobe {
  position: absolute; inset: 0; mix-blend-mode: screen; animation: strobe 0.42s steps(1) infinite;
}
@keyframes strobe {
  0%   { background: radial-gradient(circle at 30% 40%, rgba(30,200,255,0.55), transparent 55%); }
  25%  { background: radial-gradient(circle at 70% 30%, rgba(248,113,113,0.55), transparent 55%); }
  50%  { background: radial-gradient(circle at 50% 70%, rgba(74,222,128,0.50), transparent 55%); }
  75%  { background: radial-gradient(circle at 25% 65%, rgba(251,191,36,0.50), transparent 55%); }
  100% { background: radial-gradient(circle at 75% 50%, rgba(167,139,250,0.55), transparent 55%); }
}
.disco-core { position: relative; text-align: center; animation: disco-pop 0.45s cubic-bezier(.2,1.4,.4,1); }
.disco-bolt { font-size: 84px; line-height: 1; filter: drop-shadow(0 0 18px var(--accent)); animation: bolt-buzz 0.18s steps(2) infinite; }
@keyframes bolt-buzz { 0%{transform:rotate(-6deg) scale(1);} 100%{transform:rotate(6deg) scale(1.08);} }
.disco-headline {
  font-family: var(--font-display); font-size: 64px; font-weight: 700; letter-spacing: 0.12em;
  color: #fff; text-shadow: 0 0 24px var(--accent), 0 0 48px rgba(30,200,255,0.6); margin-top: 6px;
}
.disco-sub { color: var(--text); font-size: 14px; margin-top: 4px; opacity: 0.9; }
.disco-iocs { margin-top: 18px; height: 28px; position: relative; }
.ioc-fly {
  position: absolute; left: 50%; font-size: 22px; opacity: 0;
  animation: ioc-scatter 1.1s ease-out var(--d) forwards;
}
@keyframes ioc-scatter {
  0%   { opacity: 0; transform: translate(-50%, 0) scale(0.4); }
  30%  { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--x)), -120px) scale(1.1); }
}
@keyframes disco-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes disco-fade { to { opacity: 0; } }
@keyframes disco-pop { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .disco-strobe, .disco-bolt, .ioc-fly { animation: none; }
}

/* ── admin gate (TOTP) — secure console ─────────────────────── */
.gate-body { overflow: hidden; }
.gate-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(900px 600px at 50% -10%, rgba(30,200,255,0.16), transparent 60%),
    radial-gradient(700px 500px at 80% 110%, rgba(167,139,250,0.12), transparent 60%),
    radial-gradient(600px 500px at 12% 90%, rgba(30,200,255,0.08), transparent 60%);
  animation: gate-breathe 7s ease-in-out infinite;
}
@keyframes gate-breathe { 0%,100% { opacity: 0.75; } 50% { opacity: 1; } }
.gate-wrap { position: relative; z-index: 1; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.gate-card {
  width: 380px; max-width: 100%; text-align: center; padding: 38px 32px 28px;
  background: linear-gradient(180deg, rgba(28,34,48,0.82), rgba(18,22,30,0.92));
  backdrop-filter: blur(14px) saturate(120%);
  border: 1px solid rgba(120,140,170,0.18); border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.55), 0 0 0 1px rgba(30,200,255,0.06), inset 0 1px 0 rgba(255,255,255,0.04);
  position: relative; animation: gate-rise 0.5s cubic-bezier(.2,.9,.3,1);
}
.gate-card::before {  /* glowing top accent line */
  content: ""; position: absolute; top: 0; left: 22%; right: 22%; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 14px var(--accent); opacity: 0.85;
}
@keyframes gate-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.corner { position: absolute; width: 18px; height: 18px; border: 2px solid var(--accent); opacity: 0.5; }
.corner.tl { top: 10px; left: 10px; border-right: none; border-bottom: none; border-radius: 4px 0 0 0; }
.corner.tr { top: 10px; right: 10px; border-left: none; border-bottom: none; border-radius: 0 4px 0 0; }
.corner.bl { bottom: 10px; left: 10px; border-right: none; border-top: none; border-radius: 0 0 0 4px; }
.corner.br { bottom: 10px; right: 10px; border-left: none; border-top: none; border-radius: 0 0 4px 0; }

.gate-emblem { position: relative; display: inline-grid; place-items: center; color: var(--accent); margin-bottom: 6px; }
.gate-emblem svg { filter: drop-shadow(0 0 10px var(--accent-glow)); position: relative; z-index: 1; }
.emblem-ring {
  position: absolute; width: 76px; height: 76px; border-radius: 50%;
  border: 1px solid rgba(30,200,255,0.35); box-shadow: 0 0 24px rgba(30,200,255,0.25) inset;
  animation: ring-pulse 2.6s ease-in-out infinite;
}
@keyframes ring-pulse { 0%,100% { transform: scale(1); opacity: 0.5; } 50% { transform: scale(1.12); opacity: 0.9; } }

.gate-status {
  display: inline-flex; align-items: center; gap: 7px; margin: 8px 0 2px;
  font-size: 10.5px; letter-spacing: 0.22em; color: var(--muted); text-transform: uppercase;
}
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); animation: dot-blink 1.4s steps(2) infinite; }
@keyframes dot-blink { 0%,60% { opacity: 1; } 80%,100% { opacity: 0.25; } }
.gate-title { font-family: var(--font-display); font-size: 25px; font-weight: 700; margin: 6px 0 2px; letter-spacing: 0.16em; color: #eaf6ff; text-shadow: 0 0 22px rgba(30,200,255,0.45); }
.gate-sub { color: var(--muted); font-size: 12.5px; margin: 0 0 20px; letter-spacing: 0.04em; }

.gate-setup { margin: 4px 0 18px; }
.gate-qr-frame {
  position: relative; display: inline-block; padding: 10px; border-radius: 12px;
  background: #fff; box-shadow: 0 0 0 1px rgba(30,200,255,0.4), 0 0 26px rgba(30,200,255,0.22); overflow: hidden;
}
.gate-qr { display: block; width: 158px; height: 158px; border-radius: 4px; }
.scanline {
  position: absolute; left: 10px; right: 10px; height: 22px; top: 10px; border-radius: 4px;
  background: linear-gradient(180deg, rgba(30,200,255,0.45), transparent);
  box-shadow: 0 0 14px var(--accent); animation: scan 2.4s ease-in-out infinite;
}
@keyframes scan { 0% { transform: translateY(0); } 50% { transform: translateY(136px); } 100% { transform: translateY(0); } }
.gate-step { font-size: 12px; color: var(--text); margin: 12px 0 0; opacity: 0.85; }

.gate-error { color: var(--red); font-size: 12.5px; margin: 0 0 12px; padding: 8px; border: 1px solid rgba(248,113,113,0.4); border-radius: 8px; background: rgba(248,113,113,0.08); }
.gate-form { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.gate-input {
  background: rgba(10,13,18,0.85); color: #eaf6ff; border: 1px solid rgba(120,140,170,0.25);
  border-radius: 10px; padding: 14px; font-family: ui-monospace, Menlo, monospace;
  font-size: 30px; letter-spacing: 0.5em; text-align: center; text-indent: 0.5em; transition: all 0.15s;
}
.gate-input::placeholder { color: rgba(125,133,151,0.5); letter-spacing: 0.4em; }
.gate-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow), 0 0 22px rgba(30,200,255,0.25); }
.gate-btn {
  padding: 13px; border: none; border-radius: 10px; cursor: pointer;
  font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: 0.18em;
  color: #04121a; background: linear-gradient(180deg, #5ad8ff, var(--accent));
  box-shadow: 0 6px 20px rgba(30,200,255,0.3); transition: all 0.15s;
}
.gate-btn:hover { box-shadow: 0 8px 30px rgba(30,200,255,0.5); transform: translateY(-1px); }
.gate-btn:active { transform: translateY(0); }
.gate-hint { color: var(--muted); font-size: 10.5px; margin-top: 14px; letter-spacing: 0.06em; }
@media (prefers-reduced-motion: reduce) { .gate-bg, .emblem-ring, .pulse-dot, .scanline, .gate-card { animation: none; } }

/* ── admin dashboard ────────────────────────────────────────── */
.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 18px; }
.admin-tile { padding: 18px; background: linear-gradient(180deg, var(--panel-2), rgba(18,22,30,0.6)); border: 1px solid var(--border); border-radius: 10px; }
.admin-tile h2 { font-size: 15px; margin: 0 0 6px; }
.admin-tile p { font-size: 13px; color: var(--muted); margin: 0; }

/* ── admin: enrollment card ─────────────────────────────────── */
.enroll-card { display: flex; gap: 16px; align-items: center; padding: 16px; margin: 14px 0; background: var(--panel-2); border: 1px solid var(--accent); border-radius: 10px; box-shadow: 0 0 18px var(--accent-glow); }
.enroll-card .gate-qr { width: 130px; height: 130px; }
.enroll-body h3 { margin: 0 0 6px; font-size: 15px; }
.enroll-body p { margin: 0; font-size: 13px; color: var(--muted); }

/* ── admin in the topbar (announced, not hidden) ────────────── */
.nav-admin {
  display: inline-flex; align-items: center; gap: 6px;
  margin-left: 18px; padding: 4px 10px;
  color: var(--accent) !important;
  background: rgba(30, 200, 255, 0.08);
  border: 1px solid color-mix(in oklab, var(--accent) 35%, var(--border));
  border-radius: 6px;
  text-shadow: 0 0 8px var(--accent-glow);
}
.nav-admin:hover { background: rgba(30, 200, 255, 0.16); border-color: var(--accent); text-decoration: none; }

.admin-chip {
  display: inline-flex; align-items: stretch; margin-left: 14px;
  font-family: var(--font-display); font-size: 11px; letter-spacing: 0.12em;
  border: 1px solid var(--accent);
  border-radius: 6px; overflow: hidden;
  background: linear-gradient(180deg, rgba(30,200,255,0.12), rgba(30,200,255,0.02));
  box-shadow: 0 0 0 0 var(--accent-glow);
  animation: admin-chip-in 0.55s cubic-bezier(.2,1.4,.4,1), admin-chip-glow 3.2s ease-in-out 0.6s infinite;
}
.admin-chip-body, .admin-chip-lock {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 10px; color: var(--accent) !important;
  text-decoration: none;
}
.admin-chip-body { padding-right: 8px; }
.admin-chip-body:hover { background: rgba(30,200,255,0.15); text-decoration: none; }
.admin-chip-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 10px var(--green);
  animation: admin-dot-blink 1.6s ease-in-out infinite;
}
.admin-chip-label { text-transform: uppercase; font-weight: 600; }
.admin-chip-lock {
  border-left: 1px solid color-mix(in oklab, var(--accent) 35%, var(--border));
  font-size: 13px; padding: 4px 10px;
  background: rgba(0,0,0,0.18);
}
.admin-chip-lock:hover { background: rgba(248,113,113,0.18); color: var(--red) !important; }

@keyframes admin-chip-in {
  0%   { opacity: 0; transform: translateY(-8px) scale(0.92); box-shadow: 0 0 0 0 var(--accent); }
  60%  { opacity: 1; transform: translateY(0) scale(1.05); box-shadow: 0 0 24px var(--accent); }
  100% { opacity: 1; transform: scale(1); box-shadow: 0 0 12px var(--accent-glow); }
}
@keyframes admin-chip-glow {
  0%,100% { box-shadow: 0 0 8px rgba(30,200,255,0.25); }
  50%     { box-shadow: 0 0 18px rgba(30,200,255,0.55); }
}
@keyframes admin-dot-blink {
  0%,80%,100% { opacity: 1; }
  90%         { opacity: 0.35; }
}
@media (prefers-reduced-motion: reduce) {
  .admin-chip, .admin-chip-dot { animation: none; }
}

/* ── docker topology view ────────────────────────────────────── */
.admin-tile-link { display: block; color: inherit; text-decoration: none; transition: all 0.15s; }
.admin-tile-link:hover { border-color: var(--accent); box-shadow: 0 0 16px var(--accent-glow); text-decoration: none; }
.net-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-top: 10px; }
.net-card {
  background: linear-gradient(180deg, var(--panel-2), rgba(18,22,30,0.6));
  border: 1px solid var(--border); border-radius: 10px; padding: 14px;
  border-left: 3px solid var(--muted);
}
.net-driver-bridge { border-left-color: var(--accent); }
.net-driver-host { border-left-color: var(--amber); }
.net-driver-overlay { border-left-color: #a78bfa; }
.net-card-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; gap: 8px; }
.net-name { font-family: var(--font-display); font-size: 14px; font-weight: 600; color: var(--text); }
.net-meta { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.net-count { font-family: var(--font-display); font-size: 13px; color: var(--muted); background: var(--bg); padding: 2px 9px; border-radius: 12px; border: 1px solid var(--border); }
.net-members { display: flex; flex-wrap: wrap; gap: 6px; }
.net-chip {
  display: inline-flex; flex-direction: column; padding: 4px 8px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 5px;
  font-size: 11px; line-height: 1.25;
}
.net-chip-name { color: var(--text); font-weight: 600; }
.net-chip-ip { color: var(--muted); font-family: ui-monospace, Menlo, monospace; font-size: 10px; }
.net-chip.mini { padding: 2px 6px; margin: 0 4px 4px 0; }
.net-empty { color: var(--muted); font-size: 12px; font-style: italic; }
.state-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; background: var(--panel-2); border: 1px solid var(--border); color: var(--muted); }
.state-running { color: var(--green); border-color: color-mix(in oklab, var(--green) 45%, var(--border)); }
.state-exited, .state-dead { color: var(--red); border-color: color-mix(in oklab, var(--red) 45%, var(--border)); }
.state-paused, .state-restarting { color: var(--amber); border-color: color-mix(in oklab, var(--amber) 45%, var(--border)); }

/* ── topology graph (Docker switches + addresses) ───────────── */
.topo-stage {
  position: relative; margin: 12px 0 22px;
  background: radial-gradient(800px 400px at 50% 30%, rgba(30,200,255,0.06), transparent 70%), var(--bg);
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
}
.topo-toolbar {
  display: flex; align-items: center; gap: 14px; padding: 10px 14px;
  background: rgba(28,34,48,0.6); border-bottom: 1px solid var(--border);
  font-size: 11px; color: var(--muted); font-family: var(--font-display); letter-spacing: 0.08em; text-transform: uppercase;
}
.topo-legend { display: inline-flex; align-items: center; gap: 6px; }
.lg-swatch { width: 10px; height: 10px; border-radius: 50%; display: inline-block; border: 1px solid currentColor; }
.lg-swatch.lg-net  { background: rgba(30,200,255,0.25); border-color: var(--accent); }
.lg-swatch.lg-run  { background: rgba(74,222,128,0.25); border-color: var(--green); }
.lg-swatch.lg-stop { background: rgba(248,113,113,0.25); border-color: var(--red); }
.topo-hint { margin-left: auto; opacity: 0.6; text-transform: none; letter-spacing: 0; }
#topology-graph { display: block; width: 100%; height: 560px; cursor: grab; }
#topology-graph:active { cursor: grabbing; }

/* edges */
.topo-edge { stroke: rgba(125,133,151,0.45); stroke-width: 1.1; fill: none; }
.topo-edge-label { fill: var(--muted); font-size: 9px; text-anchor: middle; font-family: ui-monospace, Menlo, monospace; opacity: 0.7; pointer-events: none; }
.topo-kind-wire .topo-edge   { stroke: rgba(30,200,255,0.4); }
.topo-kind-wire .topo-edge-label { fill: rgba(170, 220, 255, 0.7); }
.topo-kind-uplink .topo-edge { stroke: rgba(167,139,250,0.65); stroke-width: 1.5; }
.topo-kind-uplink .topo-edge-label { fill: rgba(200, 180, 250, 0.85); font-weight: 600; }
.topo-kind-publish .topo-edge { stroke: rgba(251,191,36,0.55); stroke-dasharray: 4 3; }
.topo-kind-publish .topo-edge-label { fill: rgba(253,210,90,0.8); font-weight: 600; font-size: 10px; }

/* nodes */
.topo-node { cursor: grab; }
.topo-node.dragging { cursor: grabbing; }
.topo-node circle, .topo-node rect { transition: filter 0.15s; }
.topo-node:hover circle, .topo-node:hover rect { filter: drop-shadow(0 0 10px var(--accent)); }

.topo-host rect {
  fill: rgba(167,139,250,0.12); stroke: #a78bfa; stroke-width: 2;
  filter: drop-shadow(0 0 14px rgba(167,139,250,0.4));
}
.topo-host .topo-label { fill: #d4c5ff; font-weight: 700; letter-spacing: 0.08em; font-size: 12px; }

.topo-net circle { fill: rgba(30,200,255,0.10); stroke-width: 2; }
.topo-net .topo-net-inner { fill: transparent; stroke-width: 1; opacity: 0.6; }
.topo-driver-bridge circle { stroke: var(--accent); filter: drop-shadow(0 0 10px var(--accent-glow)); }
.topo-driver-host circle   { stroke: var(--amber); filter: drop-shadow(0 0 10px rgba(251,191,36,0.35)); }
.topo-driver-overlay circle{ stroke: #a78bfa; filter: drop-shadow(0 0 10px rgba(167,139,250,0.35)); }
.topo-driver-null circle, .topo-driver-none circle { stroke: var(--muted); }
.topo-internal circle { stroke-dasharray: 4 3; }
.topo-net .topo-label { fill: var(--accent); font-weight: 600; font-size: 12px; }

.topo-cont circle { fill: rgba(255,255,255,0.04); stroke: var(--muted); stroke-width: 1.6; }
.topo-state-running circle { stroke: var(--green); fill: rgba(74,222,128,0.10); }
.topo-state-exited circle, .topo-state-dead circle { stroke: var(--red); fill: rgba(248,113,113,0.10); }
.topo-state-paused circle, .topo-state-restarting circle { stroke: var(--amber); fill: rgba(251,191,36,0.10); }
.topo-cont .topo-label { fill: var(--text); font-size: 10px; }

.topo-label, .topo-sublabel { text-anchor: middle; pointer-events: none; font-family: var(--font-display); }
.topo-sublabel { fill: var(--muted); font-size: 9px; font-family: ui-monospace, Menlo, monospace; letter-spacing: 0.04em; }

/* ── topology: layout buttons + traffic flow ─────────────────── */
.topo-layouts { display: inline-flex; gap: 0; border: 1px solid var(--border); border-radius: 5px; overflow: hidden; }
.topo-layout {
  background: transparent; color: var(--muted); border: none; cursor: pointer;
  padding: 4px 11px; font: inherit; font-size: 11px;
  font-family: var(--font-display); letter-spacing: 0.06em;
  border-right: 1px solid var(--border);
}
.topo-layout:last-child { border-right: none; }
.topo-layout:hover { color: var(--text); background: rgba(30,200,255,0.06); }
.topo-layout.is-active {
  color: var(--accent); background: rgba(30,200,255,0.14);
  box-shadow: inset 0 -2px 0 var(--accent);
}
.topo-toggle {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font-size: 11px; color: var(--muted); letter-spacing: 0.06em;
}
.topo-toggle input { accent-color: var(--accent); }

/* Traffic-flow animation: dashed pattern marches along live edges. */
.topo-edge.alive { stroke-dasharray: 5 4; animation: topo-flow 1.6s linear infinite; }
.topo-kind-uplink .topo-edge.alive  { animation-duration: 2.6s; stroke-dasharray: 6 4; }
.topo-kind-publish .topo-edge.alive { animation-duration: 0.95s; stroke-dasharray: 4 3; }
.topo-edge.dead   { opacity: 0.28; }
@keyframes topo-flow { to { stroke-dashoffset: -54; } }

/* Master kill-switch for flow (the "traffic flow" checkbox) */
#topology-graph.flow-off .topo-edge.alive { animation: none; }

@media (prefers-reduced-motion: reduce) {
  .topo-edge.alive { animation: none; }
}

/* ── wide-page mode (topology lives here) ───────────────────── */
body.wide .content { max-width: none; padding: 24px 32px; }
body.wide #topology-graph {
  height: min(74vh, 880px);
  min-height: 520px;
}
/* Network cards get more room on wide; bump min column width. */
body.wide .net-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

/* ── topology selection + detail panel ──────────────────────── */
.topo-node.selected circle, .topo-node.selected rect {
  stroke-width: 3;
  filter: drop-shadow(0 0 16px var(--accent)) drop-shadow(0 0 24px rgba(30,200,255,0.55));
}
.topo-node.selected .topo-label { fill: #eaf6ff; font-weight: 700; }
@keyframes topo-pulse {
  0%, 100% { stroke-opacity: 1; }
  50%      { stroke-opacity: 0.55; }
}
.topo-node.selected circle:first-of-type, .topo-node.selected rect {
  animation: topo-pulse 1.4s ease-in-out infinite;
}

.topo-detail {
  margin: 18px 0;
  background: linear-gradient(180deg, var(--panel), rgba(18,22,30,0.85));
  border: 1px solid var(--border); border-radius: 10px;
  padding: 18px 20px; position: relative;
}
.topo-detail.has-selection { border-color: color-mix(in oklab, var(--accent) 35%, var(--border)); box-shadow: 0 0 18px var(--accent-glow); }
.topo-detail-empty { color: var(--muted); margin: 0; font-style: italic; }

.td-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.td-kind {
  font-family: var(--font-display); font-size: 10px; letter-spacing: 0.16em;
  padding: 3px 10px; border-radius: 4px; text-transform: uppercase;
  background: var(--panel-2); border: 1px solid var(--border); color: var(--muted);
}
.td-kind-host { color: #d4c5ff; border-color: #a78bfa; background: rgba(167,139,250,0.10); }
.td-kind-net  { color: var(--accent); border-color: var(--accent); background: rgba(30,200,255,0.10); }
.td-kind-cont { color: var(--green); border-color: var(--green); background: rgba(74,222,128,0.10); }
.td-title { margin: 0; font-size: 18px; flex: 1; text-shadow: 0 0 14px var(--accent-glow); }
.td-close {
  background: transparent; border: 1px solid var(--border); color: var(--muted);
  width: 30px; height: 30px; border-radius: 50%; font-size: 18px; line-height: 1; cursor: pointer;
}
.td-close:hover { color: var(--red); border-color: var(--red); }

.td-kv { display: grid; grid-template-columns: 110px 1fr; gap: 6px 14px; margin: 0 0 14px; font-size: 13px; }
.td-kv dt { color: var(--muted); }
.td-kv dd { margin: 0; color: var(--text); }
.td-kv code { font-size: 12px; }

.td-sec { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; margin: 14px 0 6px; }
.td-tbl { width: 100%; border-collapse: collapse; }
.td-tbl th, .td-tbl td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); font-size: 12px; }
.td-tbl th { color: var(--muted); font-weight: 500; text-transform: uppercase; font-size: 10px; letter-spacing: 0.08em; }
.td-tbl tr:hover { background: var(--panel-2); }
.td-jump { color: var(--accent); }
.td-jump:hover { text-decoration: underline; text-shadow: 0 0 8px var(--accent-glow); }

.port-pill { display: inline-block; padding: 1px 7px; margin-right: 4px; background: rgba(251,191,36,0.12); border: 1px solid rgba(251,191,36,0.4); border-radius: 10px; color: var(--amber); font-family: ui-monospace, Menlo, monospace; font-size: 11px; }
.td-portlist { margin: 0; padding-left: 18px; font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--text); }
.td-portlist li { margin: 2px 0; }

/* ── home / Newsline ────────────────────────────────────────── */
.hero {
  display: flex; gap: 16px; align-items: flex-end; justify-content: space-between;
  flex-wrap: wrap; margin-bottom: 18px;
  padding: 28px 28px 22px;
  background: radial-gradient(700px 300px at 12% 0%, rgba(30,200,255,0.10), transparent 60%),
              radial-gradient(700px 300px at 95% 100%, rgba(167,139,250,0.08), transparent 60%),
              var(--panel);
  border: 1px solid var(--border); border-radius: 12px; position: relative;
}
.hero::before {
  content: ""; position: absolute; top: 0; left: 20%; right: 20%; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 14px var(--accent); opacity: 0.85;
}
.hero-title {
  margin: 0; font-size: clamp(20px, 4vw, 30px); letter-spacing: 0.04em;
  text-shadow: 0 0 22px var(--accent-glow);
}
.hero-sub { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.hero-cta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border: 1px solid var(--accent); border-radius: 8px;
  color: var(--accent); font-family: var(--font-display); letter-spacing: 0.08em; font-size: 12px;
  background: rgba(30,200,255,0.06); white-space: nowrap;
}
.hero-cta:hover { background: rgba(30,200,255,0.15); text-decoration: none; box-shadow: 0 0 14px var(--accent-glow); }

.kpis {
  display: grid; gap: 10px;
  grid-template-columns: repeat(2, 1fr);   /* mobile: 2 columns */
  margin-bottom: 18px;
}
@media (min-width: 720px)  { .kpis { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1080px) { .kpis { grid-template-columns: repeat(6, 1fr); } }
.kpi {
  display: block; padding: 14px 12px; border: 1px solid var(--border); border-radius: 10px;
  background: linear-gradient(180deg, var(--panel-2), rgba(18,22,30,0.55));
  color: var(--text); text-decoration: none; transition: all 0.15s;
}
.kpi:hover { border-color: var(--accent); box-shadow: 0 0 14px var(--accent-glow); text-decoration: none; }
.kpi-num   { font-family: var(--font-display); font-size: clamp(22px, 4vw, 28px); font-weight: 700; line-height: 1; }
.kpi-label { font-size: 11px; color: var(--muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.08em; }
.kpi-warn   { border-color: rgba(251,191,36,0.4); }
.kpi-warn   .kpi-num { color: var(--amber); }
.kpi-accent { border-color: rgba(30,200,255,0.4); }
.kpi-accent .kpi-num { color: var(--accent); }

.home-grid {
  display: grid; gap: 16px;
  grid-template-columns: 1fr;                   /* mobile: stacked */
}
@media (min-width: 980px) {
  .home-grid { grid-template-columns: minmax(0,1fr) 280px; }   /* desktop: main + sidebar */
}

.news-list { list-style: none; margin: 0; padding: 0; }
.news-item {
  display: grid; grid-template-columns: 32px 1fr; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.news-item:last-child { border-bottom: none; }
.news-icon {
  width: 32px; height: 32px; display: grid; place-items: center;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; color: var(--muted); flex-shrink: 0;
}
.news-kind-enforced .news-icon { color: var(--accent); border-color: var(--accent); background: rgba(30,200,255,0.08); }
.news-kind-rejected .news-icon { color: var(--red); border-color: var(--red); background: rgba(248,113,113,0.06); }
.news-kind-submitted .news-icon { color: var(--green); border-color: var(--green); background: rgba(74,222,128,0.06); }
.news-kind-failed .news-icon { color: var(--red); border-color: var(--red); }
.news-item.sev-critical .news-icon { color: var(--red); border-color: var(--red); }
.news-item.sev-high .news-icon { color: var(--amber); border-color: var(--amber); }
.news-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.news-headline { font-family: var(--font-display); font-size: 14px; color: var(--text); }
.news-sub { color: var(--muted); font-size: 12px; margin-top: 3px; line-height: 1.4; word-break: break-word; }
.news-meta { color: var(--muted); font-size: 11px; margin-top: 4px; font-family: ui-monospace, Menlo, monospace; }
.news-meta a { color: var(--accent); }

.feed-health { list-style: none; margin: 0; padding: 0; }
.feed-row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 12px;
}
.feed-row:last-child { border-bottom: none; }
.feed-name  { color: var(--text); }
.feed-count { color: var(--accent); font-family: ui-monospace, Menlo, monospace; font-weight: 600; }
.feed-time  { color: var(--muted); font-family: ui-monospace, Menlo, monospace; font-size: 11px; }

/* ── hamburger toggle (visible only on mobile) ──────────────── */
.nav-toggle {
  display: none;
  background: transparent; border: 1px solid var(--border); border-radius: 6px;
  width: 38px; height: 38px; padding: 0; cursor: pointer;
  flex-direction: column; gap: 5px; align-items: center; justify-content: center;
  transition: border-color 0.15s;
}
.nav-toggle:hover, .topbar.nav-open .nav-toggle { border-color: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }
.nav-toggle-bar {
  display: block; width: 18px; height: 2px; background: var(--text); border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}
.topbar.nav-open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.topbar.nav-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.topbar.nav-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── mobile pass — proper drawer nav ────────────────────────── */
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; gap: 8px; padding: 8px 14px; align-items: center; }
  .brand-icon { height: 36px; width: 120px; }
  .brand-sub  { display: none; }
  .nav-toggle { display: inline-flex; order: 99; }

  .nav {
    order: 100; flex-basis: 100%;
    display: none; flex-direction: column;
    margin-top: 8px; padding: 6px 0;
    border-top: 1px solid var(--border);
  }
  .topbar.nav-open .nav { display: flex; }
  .nav a {
    margin: 0; padding: 10px 4px;
    font-size: 14px; color: var(--text);
    border-bottom: 1px solid var(--border);
  }
  .nav a:last-child { border-bottom: none; }
  .nav-admin {
    border: none; background: transparent;
    padding: 10px 4px; border-bottom: 1px solid var(--border);
    border-radius: 0;
  }

  .family-icon { height: 30px; }
  .model-status { font-size: 9.5px; padding: 2px 6px; }
  .admin-chip   { font-size: 10px; }
  .admin-chip-body, .admin-chip-lock { padding: 3px 7px; }

  .content { padding: 14px; }
  .panel   { padding: 14px; }
  table.cases, table.ledger { display: block; overflow-x: auto; white-space: nowrap; }
}

@media (max-width: 420px) {
  .family-icon  { display: none; }
  .model-status { display: none; }
  .brand-icon   { height: 32px; width: 100px; }
}
