/* SPDX-License-Identifier: AGPL-3.0-only */
/* Shieldlist — the night-watch console. Two palettes on one set of
   tokens: dark by default (readable in full sun: bright ink, panels that
   stand off the ground), light when the system asks or the person
   chooses. Data in monospace as the CLI shows it; one accent (the logo's
   blue→violet), one ban colour, one colour for what is dangerous to the
   fleet (exempting). No library, no font download. */
:root {
  --ground: #0d141d;
  --ground-2: #121b26;
  --panel: #1a2634;
  --panel-2: #22303f;
  --panel-3: #2a3a4c;
  --line: rgba(255,255,255,.10);
  --line-2: rgba(255,255,255,.18);
  --ink: #f4f7fa;
  --ink-2: #d5dde6;
  --mute: #aab5c2;
  --act: #5c98ff;
  --act-2: #8b6cff;
  --act-ink: #ffffff;
  --ban: #ff8a5b;
  --ok: #6fd39c;
  --warn: #f0c14b;
  --danger: #ff6b86;
  --red: #ff5252;
  --field: rgba(0,0,0,.28);
  --overlay: #1e2b3a;
  --shadow: 0 10px 34px rgba(0,0,0,.45);
  --glow: rgba(92,152,255,.28);
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r: 10px; --r-s: 7px; --r-l: 14px;
  --t: .16s ease;
  color-scheme: dark;
}
:root[data-theme="light"], :root.light-auto {
  --ground: #eef1f5;
  --ground-2: #e6eaf0;
  --panel: #ffffff;
  --panel-2: #f1f4f8;
  --panel-3: #e5eaf1;
  --line: rgba(20,30,45,.10);
  --line-2: rgba(20,30,45,.20);
  --ink: #121a24;
  --ink-2: #2f3b49;
  --mute: #5b6875;
  --act: #2b6fe6;
  --act-2: #6a4ce6;
  --act-ink: #ffffff;
  --ban: #d9531e;
  --ok: #1f9d5b;
  --warn: #b8860b;
  --danger: #d6335a;
  --red: #d61f1f;
  --field: #ffffff;
  --overlay: #ffffff;
  --shadow: 0 10px 34px rgba(20,30,45,.16);
  --glow: rgba(43,111,230,.2);
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--ground); color: var(--ink); font: 14px/1.5 var(--sans); }
a { color: var(--act); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--act-2); }
code, .mono, input, select, textarea { font-family: var(--mono); font-size: 13px; }
h1, h2, h3 { font-weight: 650; letter-spacing: -0.01em; margin: 0 0 .5rem; color: var(--ink); }
h1 { font-size: 21px; }
h2 { color: var(--ink-2); text-transform: uppercase; letter-spacing: .1em; font-size: 11.5px; margin-top: 1.6rem; font-weight: 700; }
h3 { font-size: 14.5px; }
p { margin: 0 0 .75rem; color: var(--ink-2); }
button, .btn { background: var(--panel-2); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-s); padding: .42rem .85rem; cursor: pointer; font: inherit; line-height: 1.3; transition: background var(--t), border-color var(--t), transform var(--t), box-shadow var(--t), color var(--t); }
button:hover, .btn:hover { background: var(--panel-3); border-color: var(--line-2); transform: translateY(-1px); color: var(--ink); }
button:active { transform: translateY(0); }
button.primary { background: linear-gradient(135deg, var(--act), var(--act-2)); color: #fff; font-weight: 600; border-color: transparent; box-shadow: 0 4px 14px var(--glow); }
button.primary:hover { filter: brightness(1.08); box-shadow: 0 6px 18px var(--glow); }
button.danger { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
button.danger:hover { background: color-mix(in srgb, var(--danger) 18%, transparent); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
button.danger.primary { background: linear-gradient(135deg, #ff5c7a, #ff7a45); color: #1a0710; }
button.small, .btn.small { padding: .24rem .6rem; font-size: 12px; }
button.link { background: none; border: none; color: var(--act); padding: 0; }
button.link:hover { text-decoration: underline; transform: none; background: none; }
button.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
button.ghost:hover { background: var(--panel-2); color: var(--ink); }
button.ghost.on { background: var(--panel-2); color: var(--ink); border-color: var(--line); }
button:disabled { opacity: .5; cursor: default; transform: none; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible, .addr:focus-visible { outline: 2px solid var(--act); outline-offset: 2px; }
input, select, textarea { background: var(--field); color: var(--ink); border: 1px solid var(--line-2); border-radius: var(--r-s); padding: .42rem .65rem; transition: border-color var(--t), box-shadow var(--t); }
input::placeholder { color: var(--mute); }
input:hover, select:hover { border-color: var(--mute); }
input:focus, select:focus { border-color: var(--act); box-shadow: 0 0 0 3px var(--glow); outline: none; }
input[type=checkbox] { width: 15px; height: 15px; accent-color: var(--act); vertical-align: -2px; margin: 0 .35rem 0 0; }
select { padding-right: 1.6rem; }
label { color: var(--ink); font-size: 12px; display: block; margin-bottom: .2rem; }
label.check { display: flex; align-items: center; gap: .45rem; font-size: 13px; color: var(--ink); cursor: pointer; }
label.check input[type=checkbox] { flex: none; width: 15px; margin: 0; }
label.check .dim { margin-left: .2rem; }
.hint { color: var(--ink-2); font-size: 12px; margin: .15rem 0 0; }
[data-hint] { position: relative; }
[data-hint]::after { content: attr(data-hint); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translate(-50%, 0); background: var(--overlay); color: var(--ink); border: 1px solid var(--line-2); border-radius: var(--r-s); padding: .35rem .6rem; font-size: 12px; font-family: var(--sans); white-space: nowrap; pointer-events: none; display: none; z-index: 40; box-shadow: var(--shadow); font-weight: 400; text-transform: none; letter-spacing: 0; animation: fade .12s ease-out; }
[data-hint]:hover::after { display: block; }
body { overflow-x: hidden; }

/* header */
.top { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center; padding: .55rem 1.2rem; border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 5; }
.brand { color: var(--ink); font-weight: 700; letter-spacing: .01em; white-space: nowrap; display: flex; align-items: center; gap: .55rem; font-size: 15.5px; }
.brand:hover { color: var(--ink); }
.brand img { display: block; transition: transform .3s ease; }
.brand .ver { color: var(--mute); font-family: var(--mono); font-weight: 400; font-size: 11.5px; margin-left: .2rem; }
.who .tag.warn { margin-right: .6rem; }
.livebtn .dot.tick { animation: tick .35s ease-out; }
@keyframes tick { 0% { transform: scale(1.8); box-shadow: 0 0 0 4px rgba(111,211,156,.5); } 100% { transform: scale(1); } }
.chart .foot .chips button { padding: .15rem .55rem; font-size: 11.5px; }
.chips button[role=checkbox] .sw { opacity: .45; }
.chips button[role=checkbox].on .sw { opacity: 1; }
.brand:hover img { transform: rotate(-8deg) scale(1.08); }
.railtab { position: fixed; left: 0; top: 50%; transform: translateY(-50%); z-index: 6; width: 18px; height: 56px; padding: 0; border-radius: 0 var(--r-s) var(--r-s) 0; background: var(--panel-2); border: 1px solid var(--line-2); border-left: none; color: var(--ink); font-size: 12px; display: grid; place-items: center; }
.railtab:hover { transform: translateY(-50%); background: var(--panel-3); }
.railtab[hidden] { display: none; }
.frame.with-rail .railtab { left: 250px; }
@media (max-width: 1100px) { .railtab { display: none; } }
.mark.big { display: block; margin: 0 auto .25rem; }
.mark.logo { width: 200px; height: auto; margin: -.5rem auto 0; }
.nav { display: flex; gap: .2rem; white-space: nowrap; }
.nav a { color: var(--ink-2); padding: .38rem .8rem; border-radius: 999px; transition: background var(--t), color var(--t); font-weight: 500; }
.nav a:hover { color: var(--ink); background: var(--panel-2); }
.nav a.on { color: #fff; background: linear-gradient(135deg, var(--act), var(--act-2)); }
.nav .badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; margin-left: .2rem; vertical-align: 1px; }
.nav a.on .badge { background: #fff; color: var(--act); }
.who { white-space: nowrap; color: var(--ink-2); }
.who a.quiet { color: var(--ink-2); margin-left: .5rem; }
.who a.quiet:hover { color: var(--ink); }

/* frame: an optional rail beside the page */
.frame { display: grid; grid-template-columns: minmax(0, 1fr); min-height: calc(100vh - 52px); }
.frame.with-rail { grid-template-columns: 250px minmax(0, 1fr); }
.rail { border-right: 1px solid var(--line); background: var(--ground-2); padding: 1rem .8rem; position: sticky; top: 52px; height: calc(100vh - 52px); overflow-y: auto; }
.rail[hidden] { display: none; }
.rail h2 { margin: 0 .3rem .5rem; font-size: 11px; }
.rail h2:not(:first-child) { margin-top: 1.4rem; }
.rail-list a, .rail-list button { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto auto; gap: .5rem; align-items: center; width: 100%; text-align: left; padding: .4rem .55rem; border-radius: var(--r-s); color: var(--ink); background: none; border: none; font: inherit; cursor: pointer; transition: background var(--t); }
.rail-list a:hover, .rail-list button:hover { background: var(--panel-2); transform: none; color: var(--ink); }
.rail-list .on { background: var(--panel-2); box-shadow: inset 2px 0 0 var(--act); }
.rail-list .name { font-family: var(--mono); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-list .n { font-family: var(--mono); font-size: 12px; color: var(--ink); }
.rail-list .n.ban { color: var(--ban); }
.rail-list .n.h { color: var(--warn); }
.rail .bar { height: 3px; background: var(--panel-3); border-radius: 2px; grid-column: 1 / -1; margin-top: -.2rem; overflow: hidden; display: flex; }
.rail .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--act), var(--act-2)); }
.rail .bar i.h { background: var(--warn); }
.rail p.small { margin: .4rem .55rem 0; }
.rail.loading h2:first-child::after { content: ""; display: inline-block; width: 9px; height: 9px; margin-left: .5rem; border: 2px solid var(--line-2); border-top-color: var(--act); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -1px; }
.credits { color: var(--mute); font-size: 11.5px; margin: 1.5rem 0 0; padding: .8rem 1rem 1.2rem; text-align: center; }
.credits a { color: var(--ink-2); }
.creditlist { margin: 0; padding-left: 1.2rem; line-height: 1.7; }
.card .v.mono { font-family: var(--mono); font-size: 26px; letter-spacing: .02em; }
.ticket.watched .stripe { background: var(--warn); }
.ticket .meters { display: inline-flex; gap: .55rem; align-items: flex-end; }
.ticket .meter { display: inline-grid; grid-template-columns: 1fr; width: 80px; vertical-align: middle; position: relative; }
.ticket .meter::before { content: ""; grid-row: 2; grid-column: 1; height: 8px; border-radius: 4px; background: var(--panel-3); }
.ticket .meter i { grid-row: 2; grid-column: 1; display: block; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--warn), var(--red)); background-size: 64px 100%; background-repeat: no-repeat; }
.ticket .meter b { grid-row: 1; font-size: 11.5px; font-weight: 600; color: var(--ink); font-family: var(--mono); line-height: 1.1; }
.ticket .meter small { grid-row: 3; font-size: 10.5px; color: var(--mute); font-family: var(--mono); line-height: 1.1; }

/* page */
.main:focus, .main:focus-visible { outline: none; }
.main { padding: 1.3rem 1.6rem 3rem; max-width: 1760px; margin: 0 auto; min-width: 0; width: 100%; }
.head { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: .8rem; }
.head h1 { margin: 0; }
.head .grow { flex: 1; }
.crumbs { color: var(--mute); font-size: 13px; margin-bottom: .5rem; }
.crumbs a { color: var(--ink-2); }
.tabs { display: flex; gap: .2rem; margin: .6rem 0 1.1rem; overflow-x: auto; overflow-y: hidden; padding: .25rem; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; width: max-content; max-width: 100%; }
.tabs a { color: var(--ink-2); padding: .38rem .9rem; border-radius: 999px; white-space: nowrap; transition: background var(--t), color var(--t); }
.tabs a.on { color: #fff; background: linear-gradient(135deg, var(--act), var(--act-2)); }
.tabs a:hover { color: var(--ink); }
.tabs .n { color: inherit; opacity: .75; font-family: var(--mono); font-size: 12px; margin-left: .3rem; }

/* blocks */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem; margin-bottom: 1.2rem; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: .8rem 1rem; color: inherit; transition: transform var(--t), border-color var(--t), background var(--t); }
.card .k { color: var(--ink-2); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.card .v { font-family: var(--mono); font-size: 24px; margin-top: .25rem; letter-spacing: -.02em; }
.card .v.ban { color: var(--ban); } .card .v.ok { color: var(--ok); } .card .v.warn { color: var(--warn); }
.card .s { color: var(--ink-2); font-size: 12px; margin-top: .15rem; }
a.card:hover { transform: translateY(-2px); border-color: var(--line-2); background: var(--panel-2); color: inherit; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--ink-2); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; padding: .55rem .8rem; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
td { padding: .55rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background var(--t); }
tbody tr:hover td { background: var(--panel-2); }
td.mono { font-family: var(--mono); font-size: 13px; }
td.num, th.num { text-align: right; font-family: var(--mono); }
td.acts { white-space: nowrap; text-align: right; }
tr.clickable { cursor: pointer; }
.tbl { overflow-x: auto; -webkit-overflow-scrolling: touch; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.tbl table { min-width: 680px; }
.tag { display: inline-block; white-space: nowrap; padding: .1rem .6rem; border-radius: 999px; font-size: 11.5px; font-family: var(--mono); background: var(--panel-3); color: var(--ink); }
.tag.ban { color: #fff; background: color-mix(in srgb, var(--ban) 75%, black); }
.tag.ban.dim { color: var(--ink); background: color-mix(in srgb, var(--ban) 22%, transparent); }
.tag.red { color: #fff; background: var(--red); }
.tag.warn { color: var(--warn); }
.tag.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 16%, transparent); }
.tag.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 16%, transparent); }
.tag.act { color: var(--act); background: color-mix(in srgb, var(--act) 16%, transparent); }
.tag.danger { color: var(--danger); background: color-mix(in srgb, var(--danger) 14%, transparent); }
a.tag:hover { background: var(--panel-2); color: var(--ink); }
:root[data-theme="light"] .tag.ban, :root.light-auto .tag.ban { background: var(--ban); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1.4rem; margin: 0 0 1rem; }
.kv dt { color: var(--mute); } .kv dd { margin: 0; font-family: var(--mono); font-size: 13px; }
.row { display: flex; gap: .75rem; align-items: end; flex-wrap: wrap; margin-bottom: 1rem; }
.row > * { min-width: 0; }
.row.tight { margin-bottom: .6rem; }
.field { display: flex; flex-direction: column; }
.field.grow { flex: 1; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem 1.2rem; margin-bottom: 1rem; }
.panel h3 { margin-bottom: .6rem; }
.empty { color: var(--ink-2); padding: 2rem 1.5rem; text-align: center; border: 1px dashed var(--line-2); border-radius: var(--r); background: var(--panel); }
.err { color: var(--ban); white-space: pre-wrap; font-family: var(--mono); font-size: 12px; }
.small { font-size: 12px; color: var(--ink-2); }
.dim { color: var(--mute); }
.hero { margin: 0 0 1rem; }
.hero .v { font-family: var(--mono); font-size: 22px; }
.hero .v.ban { color: var(--ban); } .hero .v.ok { color: var(--ok); }
.rep b.ban { color: var(--red); } .rep b.warn { color: var(--warn); } .rep b.ok { color: var(--ok); }
.rep .small { margin: 0 0 .9rem; }
pre.code { background: var(--field); border: 1px solid var(--line); border-radius: var(--r-s); padding: .75rem .9rem; overflow: auto; font-size: 12px; margin: 0 0 .75rem; color: var(--ink); }
pre.ev { background: var(--field); border: 1px solid var(--line); border-radius: var(--r-s); padding: .45rem .7rem; margin: 0; font-size: 11.5px; line-height: 1.45; white-space: pre-wrap; word-break: break-all; color: var(--ink); max-height: 9em; overflow: auto; resize: vertical; }
pre.ev .t { color: var(--ink-2); }
pre.ev.scrolls { overflow-y: scroll; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
pre.ev.scrolls::-webkit-scrollbar { width: 8px; }
pre.ev.scrolls::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 4px; }
.pulse { display: inline-block; flex: none; justify-self: start; width: 8px; height: 8px; border-radius: 50%; background: var(--mute); vertical-align: middle; }
.pulse.live { background: var(--ok); box-shadow: 0 0 0 0 rgba(111,211,156,.6); animation: pulse 2.4s ease-out infinite; }
.pulse.stale { background: var(--warn); }
.pulse.off { background: var(--ban); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(111,211,156,.5); } 70% { box-shadow: 0 0 0 7px rgba(111,211,156,0); } 100% { box-shadow: 0 0 0 0 rgba(111,211,156,0); } }

/* the world: countries filled by what they sent, under the current filters */
.world { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: .6rem .8rem .4rem; margin-bottom: 1rem; }
.world select { padding: .22rem 1.5rem .22rem .5rem; font-size: 12px; }
.world svg { width: 100%; height: auto; max-height: 400px; display: block; }
.world path { fill: var(--panel-3); stroke: var(--panel); stroke-width: .6; transition: fill var(--t); cursor: pointer; }
.world path.hot { stroke: var(--panel-2); }
.world path:hover { stroke: var(--ink); stroke-width: 1; }
.world path.on { stroke: var(--act); stroke-width: 1.5; }
.world g.tiny { cursor: pointer; }
.world g.tiny circle { stroke: none; }
.chips button.na { opacity: .45; text-decoration: line-through; }
.world .ripple { fill: none; stroke: var(--red); stroke-width: 1.5; }
.world .ripple.hit { stroke: var(--warn); animation: ripple 2.4s ease-out forwards; pointer-events: none; }
@keyframes ripple { 0% { r: 3; opacity: 1; } 100% { r: 40; opacity: 0; } }
.world .srv circle { fill: var(--act); stroke: #fff; stroke-width: .8; }
.world .srv .halo { fill: var(--act); stroke: none; opacity: .35; animation: halo 2.4s ease-out infinite; }
@keyframes halo { 0% { r: 4; opacity: .5; } 100% { r: 14; opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .world .ripple, .world .srv .halo { animation: none; } }
.world .tip { position: absolute; pointer-events: none; background: var(--overlay); color: var(--ink); border: 1px solid var(--line-2); border-radius: var(--r-s); padding: .3rem .55rem; font-size: 12px; box-shadow: var(--shadow); white-space: nowrap; display: none; z-index: 3; }
.world .foot { display: flex; gap: 1rem; align-items: center; font-size: 11.5px; color: var(--ink-2); margin-top: .3rem; flex-wrap: wrap; }
.world .foot .grow { flex: 1; }
.world .scale { display: inline-flex; align-items: center; gap: .3rem; }
.world .scale i { display: inline-block; width: 28px; height: 8px; border-radius: 2px; }
.world .hide { position: absolute; right: .5rem; top: .4rem; }
.who .me { color: var(--ink); background: none; border: none; padding: 0; font: inherit; cursor: pointer; }
.who .me:hover { color: var(--act); transform: none; }

/* map + chart side by side on the home */
.overview { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .9rem; margin-bottom: 1rem; align-items: stretch; }
.overview[hidden] { display: none; }
.overview:not(:has(#world)) { grid-template-columns: minmax(0, 1fr); }
.world { margin-bottom: 0; display: flex; flex-direction: column; }
.world svg { max-height: none; flex: 1; min-height: 0; }
.chart { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: .6rem .8rem .4rem; display: flex; flex-direction: column; height: 100%; }
.chart .chead { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .3rem; }
.chart .plot { flex: 1; min-height: 160px; position: relative; display: flex; flex-direction: column; }
.chart .plot svg { width: 100%; flex: 1; min-height: 0; display: block; }
.chart .plot svg g:hover rect { filter: brightness(1.25); }
.chart .plot svg g { cursor: pointer; }
.chart .scale i.ln { height: 3px; }
.chart .ymax { position: absolute; left: 0; top: 0; z-index: 2; background: var(--overlay); color: var(--ink); border: 1px solid var(--line-2); border-radius: 999px; padding: .05rem .5rem; font-family: var(--mono); font-size: 11px; box-shadow: var(--shadow); }
.chart .xlab { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: var(--ink-2); margin-top: .25rem; }
.chart .tip { position: absolute; pointer-events: none; background: var(--overlay); color: var(--ink); border: 1px solid var(--line-2); border-radius: var(--r-s); padding: .3rem .55rem; font-size: 12px; box-shadow: var(--shadow); white-space: nowrap; display: none; z-index: 3; }
.chart .foot { display: flex; gap: .6rem 1rem; align-items: center; font-size: 11.5px; color: var(--ink-2); margin-top: .3rem; flex-wrap: wrap; }
.chart .foot .grow { flex: 1; }
.chart .scale { display: inline-flex; align-items: center; gap: .3rem; }
.chart .scale i { display: inline-block; width: 12px; height: 8px; border-radius: 2px; margin-left: .3rem; }
.chart select { padding: .22rem 1.5rem .22rem .5rem; font-size: 12px; }
@media (max-width: 1100px) { .overview { grid-template-columns: minmax(0, 1fr); } }

/* servers as cards */
.servers { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: .9rem; }
.server { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-l); padding: 1rem 1.1rem; color: inherit; transition: transform var(--t), border-color var(--t), background var(--t), box-shadow var(--t); }
.server:hover { transform: translateY(-2px); border-color: var(--line-2); box-shadow: var(--shadow); color: inherit; }
.server .name { font-family: var(--mono); font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: .5rem; }
.server .meta { color: var(--ink-2); font-size: 12px; margin: .2rem 0 .7rem; }
.server .facts { display: flex; gap: .4rem .5rem; flex-wrap: wrap; align-items: center; }
.server .big { font-family: var(--mono); font-size: 22px; color: var(--ban); margin-left: auto; }
.server .big.zero { color: var(--ok); }

/* the sanction feed: its bar, then tickets */
.fbar { display: flex; flex-direction: column; gap: .55rem; margin-bottom: .9rem; }
.fline { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.fgroup { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.fgroup.display { color: var(--ink-2); font-size: 12px; padding: .2rem .5rem; border: 1px dashed var(--line-2); border-radius: var(--r-s); flex: none; }
.fgroup.display > .lbl { text-transform: uppercase; letter-spacing: .08em; font-size: 10.5px; margin-right: .1rem; }
.fgroup.display select { padding: .22rem 1.5rem .22rem .5rem; font-size: 12px; }
.fgroup.display label.check { font-size: 12px; color: var(--ink-2); }
.fdiv { width: 1px; align-self: stretch; background: var(--line-2); margin: 0 .3rem; }
.search { position: relative; flex: 1 1 320px; max-width: 640px; }
.search input { width: 100%; padding: .5rem 2.4rem .5rem 2.2rem; font-size: 14px; border-radius: var(--r); }
.search .ico { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: var(--mute); pointer-events: none; font-size: 14px; }
.search .spin { position: absolute; right: .7rem; top: 50%; width: 14px; height: 14px; margin-top: -7px; border: 2px solid var(--line-2); border-top-color: var(--act); border-radius: 50%; opacity: 0; transition: opacity var(--t); }
.search.busy .spin { opacity: 1; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.search .open { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); }
.search .open[data-banaddr] { right: 4.6rem; color: var(--red); border-color: color-mix(in srgb, var(--red) 45%, transparent); background: color-mix(in srgb, var(--red) 10%, transparent); }
.search.busy .open { display: none; }
.dates { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.dates[hidden] { display: none; }
.dates label { margin: 0; }
.dates input { padding: .3rem .5rem; font-size: 12.5px; }
.chips { display: inline-flex; gap: .15rem; padding: .18rem; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button { border-radius: 999px; padding: .28rem .75rem; font-size: 12.5px; background: none; border-color: transparent; white-space: nowrap; flex: none; color: var(--ink); }
.chips button:hover { background: var(--panel-2); transform: none; color: var(--ink); }
.chips button.on { background: linear-gradient(135deg, var(--act), var(--act-2)); color: #fff; }
/* the states' colours, one signal beside the word: on the chip, on the card's stripe, on the state tag */
.chips button .sw { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: .4rem; vertical-align: 0; background: var(--mute); }
.chips button.c-ban .sw { background: var(--ban); }
.chips button.c-red .sw { background: var(--red); }
.chips button.on.c-red { background: var(--red); }
.chips button.c-rec .sw { background: var(--mute); }
.chips button.c-exp .sw { background: var(--line-2); }
.chips button.c-act .sw { background: var(--act); }
.chips button.c-warn .sw { background: var(--warn); }
.chips button.on.c-ban { background: color-mix(in srgb, var(--ban) 80%, black); }
.chips button.on.c-rec { background: var(--panel-3); }
.chips button.on.c-exp { background: var(--panel-3); }
.chips button.on.c-warn { background: color-mix(in srgb, var(--warn) 75%, black); }
.chips button.on .sw { background: #fff; }
.ticket.recorded .tag { }
.ticket.watched .tag.warn { color: #1a1200; background: var(--warn); }
.livebtn { display: inline-flex; align-items: center; gap: .5rem; border-radius: 999px; padding: .32rem .9rem .32rem .6rem; background: var(--panel-2); font-size: 12.5px; border: 1px solid var(--line-2); margin-left: auto; }
.livebtn .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--mute); }
.livebtn.on { border-color: color-mix(in srgb, var(--ok) 50%, transparent); }
.livebtn.on .dot { background: var(--ok); box-shadow: 0 0 0 0 rgba(111,211,156,.6); animation: pulse 2s ease-out infinite; }
.livebtn .ic { font-size: 11px; width: 14px; text-align: center; }
.pop { position: relative; }
.pop-menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--overlay); border: 1px solid var(--line-2); border-radius: var(--r); padding: .6rem .8rem; display: grid; gap: .35rem; z-index: 15; box-shadow: var(--shadow); min-width: 200px; }
.pop-menu[hidden] { display: none; }
.pop-menu label.check { color: var(--ink); font-size: 13px; }
.only-mobile { display: none; }
.more-filters { display: contents; }

/* One grid for the whole feed, each card a subgrid row: the columns line
   up across cards, and the left column takes what the widest network
   name needs (up to a bound) — the name shows when there is room. */
.feed { display: grid; gap: .5rem; grid-template-columns: 4px auto 44px fit-content(360px) minmax(0, 1fr) auto; }
/* A card: the flag on the left, whole height; the moment on top; under
   it the address over its network, then the facts; the actions on the
   right, always in the same place. */
.ticket { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; grid-template-areas: "s when f who what acts" "s ev ev ev ev ev"; gap: .15rem 1rem; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: .5rem 1rem .55rem 0; overflow: visible; transition: transform var(--t), border-color var(--t), background var(--t), box-shadow var(--t); }
.ticket:hover { border-color: var(--line-2); box-shadow: var(--shadow); transform: translateY(-1px); }
.ticket .stripe { grid-area: s; align-self: stretch; margin: -.5rem 0 -.55rem; border-radius: var(--r) 0 0 var(--r); background: var(--line-2); }
.ticket .fcol { grid-area: f; justify-self: center; align-self: center; }
.ticket .when { grid-area: when; font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); align-self: center; display: flex; flex-direction: column; line-height: 1.25; padding-left: .9rem; }
.ticket .when .t { color: var(--ink); font-size: 14px; font-weight: 600; }
.ticket .who { grid-area: who; align-self: center; }
.ticket .what { grid-area: what; align-self: center; }
.ticket .acts { grid-area: acts; }
.ticket .ev { grid-area: ev; }
.ticket.active .stripe { background: var(--red); }
.ticket.recorded .stripe { background: var(--mute); }
.ticket.expired .stripe { background: color-mix(in srgb, var(--ban) 55%, transparent); }
.ticket.lifted .stripe { background: var(--act); }
.ticket .who { min-width: 0; }
.ticket .addr { font-family: var(--mono); font-size: 14.5px; font-weight: 600; color: var(--ink); cursor: pointer; transition: color var(--t); user-select: text; overflow-wrap: anywhere; }
.ticket .addr:hover { color: var(--act); }
.ticket .addr.plain { cursor: text; }
.modal-head .copy { background: none; border: none; color: var(--mute); font-size: 14px; padding: 0 .3rem; }
.modal-head .copy:hover { color: var(--act); transform: none; }
.rulebtn { cursor: pointer; }
button.tag.rulebtn { border: none; font-family: var(--mono); }
button.tag.rulebtn:hover { filter: brightness(1.15); transform: none; }
.ticket .copy { background: none; border: none; color: var(--mute); padding: 0 .3rem; font-size: 13px; opacity: 0; transition: opacity var(--t), color var(--t); vertical-align: 1px; }
.ticket:hover .copy { opacity: 1; }
.ticket .copy:hover { color: var(--act); transform: none; }
.ticket .acts button.ban, .modal-foot button.ban { color: var(--red); border-color: color-mix(in srgb, var(--red) 45%, transparent); background: color-mix(in srgb, var(--red) 10%, transparent); }
.ticket .acts button.ban:hover, .modal-foot button.ban:hover { background: color-mix(in srgb, var(--red) 20%, transparent); }
.orders { margin: 0 0 1rem; padding-left: 1.2rem; color: var(--ink-2); font-size: 13px; }
.ticket .acts, .modal-foot .acts { display: inline-flex; gap: .3rem; }
.modal-foot .acts button.lift, .ticket .acts button.lift { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); background: color-mix(in srgb, var(--ok) 10%, transparent); }
.modal-foot .acts button.lift:hover, .ticket .acts button.lift:hover { background: color-mix(in srgb, var(--ok) 20%, transparent); }
.modal-foot .acts button.exempt, .ticket .acts button.exempt { color: var(--ink); background: var(--panel-2); border-color: var(--line-2); }
.modal-foot .acts button.exempt:hover, .ticket .acts button.exempt:hover { background: var(--panel-3); }
.modal-foot .acts button:disabled, .ticket .acts button:disabled, .modal-foot .acts button:disabled:hover, .ticket .acts button:disabled:hover { color: var(--mute); background: transparent; border-color: var(--line); opacity: .6; transform: none; cursor: not-allowed; }
.ticket.rq.pending .stripe { background: var(--warn); } .ticket.rq.approved .stripe, .ticket.rq.done .stripe { background: var(--ok); } .ticket.rq.denied .stripe { background: var(--red); }
.ticket.watched.exempt .stripe { background: repeating-linear-gradient(45deg, var(--warn) 0 4px, var(--ok) 4px 8px); }
.subs { display: inline-flex; gap: .9rem; align-items: center; margin-left: .35rem; }
.subs label.check { font-size: 12.5px; color: var(--ink-2); }
.subs label.check input { accent-color: var(--act); }
.chips button[role=radio] { font-weight: 500; }
.ticket .flag { font-size: 26px; background: none; border: none; padding: 0; cursor: pointer; line-height: 1; transition: transform var(--t); }
.ticket .flag:hover { transform: scale(1.12); }
.ticket .flag.none { width: 26px; height: 20px; border-radius: 3px; background: var(--panel-3); cursor: default; }
.ticket .as { background: none; border: none; padding: 0; color: var(--ink-2); font: inherit; cursor: pointer; }
.ticket .as:hover, .ticket .flag:hover { color: var(--act); transform: none; }
.geochips { display: inline-flex; gap: .3rem; }
.chips.period { margin-left: .6rem; }
.chips.period button { padding: .2rem .65rem; font-size: 12px; }
.ticket .who .as { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; font-size: 12px; margin-top: .05rem; }
.ticket .what { display: flex; gap: .4rem .75rem; flex-wrap: wrap; align-items: center; min-width: 0; font-size: 12.5px; color: var(--ink); justify-self: start; }
.ticket .what > .fact { white-space: nowrap; }
.ticket .what > .fact.dim { color: var(--ink-2); }
.ticket .what > .fact.dim::before { content: "·"; color: var(--mute); margin-right: .75rem; }
.ticket .acts { display: flex; gap: .35rem; align-items: center; opacity: .8; transition: opacity var(--t); }
.ticket:hover .acts { opacity: 1; }
.ticket .ev { margin: .4rem 0 .1rem .9rem; }
.ticket.fresh { animation: fresh 2.5s ease-out; }
@keyframes fresh { 0% { background: color-mix(in srgb, var(--red) 30%, var(--panel)); border-color: var(--red); } 100% { background: var(--panel); border-color: var(--line); } }
@media (prefers-reduced-motion: reduce) { .pulse.live, .livebtn.on .dot { animation: none; } .ticket.fresh { animation: none; } * { transition: none !important; } }
.addr { font-family: var(--mono); color: var(--act); background: none; border: none; padding: 0; cursor: pointer; font-size: 13px; }
.addr:hover { text-decoration: underline; }

/* modals */
.backdrop { position: fixed; inset: 0; background: rgba(4,8,13,.66); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 20; padding: 1rem; overflow-y: auto; animation: fade .15s ease-out; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--overlay); border: 1px solid var(--line-2); border-radius: var(--r-l); width: min(760px, 100%); max-height: calc(100vh - 2rem); overflow: auto; box-shadow: 0 30px 80px rgba(0,0,0,.6); animation: rise .18s ease-out; color: var(--ink); }
@keyframes rise { from { transform: translateY(10px) scale(.985); opacity: 0; } }
.modal.narrow { width: min(480px, 100%); }
.modal.wide { width: min(1000px, 100%); }
.modal-head { display: flex; align-items: center; gap: .75rem; padding: .95rem 1.2rem; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--overlay); z-index: 1; }
.modal-head h2 { margin: 0; text-transform: none; letter-spacing: 0; font-size: 16px; color: var(--ink); }
.modal-head .grow { flex: 1; }
.modal-head .x { background: none; border: none; color: var(--mute); font-size: 22px; line-height: 1; padding: 0 .2rem; }
.modal-head .x:hover { color: var(--ink); transform: none; background: none; }
.modal-body { padding: 1.1rem 1.2rem; }
.modal-body p:last-child { margin-bottom: 0; }
.modal-foot { display: flex; gap: .5rem; justify-content: flex-end; align-items: center; padding: .85rem 1.2rem; border-top: 1px solid var(--line); flex-wrap: wrap; }
.modal-foot .grow { flex: 1; }
.modal .danger-note { border-left: 3px solid var(--danger); padding: .55rem .8rem; background: color-mix(in srgb, var(--danger) 9%, transparent); border-radius: var(--r-s); color: var(--ink); margin-bottom: 1rem; }
.fields { display: grid; gap: .85rem; }
.fields input:not([type=checkbox]), .fields select { width: 100%; }
.fields .two { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
.modal .feed { margin-top: .5rem; }
.modal .ticket { background: var(--panel); }

.toast { position: fixed; right: 1rem; bottom: 1rem; background: var(--overlay); color: var(--ink); border: 1px solid var(--line-2); border-left: 3px solid var(--act); padding: .65rem 1rem; border-radius: var(--r-s); opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; max-width: 480px; white-space: pre-wrap; z-index: 30; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: none; }
.toast.bad { border-left-color: var(--ban); }
.login[hidden] { display: none; }
.login { position: fixed; inset: 0; background: radial-gradient(900px 500px at 50% 0%, #1a2740 0%, #0d141d 60%); display: grid; place-items: center; z-index: 10; }
.login-card [hidden] { display: none !important; }
.login-card #login-step1, .login-card #login-step2, .login-card #login-token-wrap { display: flex; flex-direction: column; gap: .75rem; }
.login-card { background: rgba(26,38,52,.92); color: #f2f5f8; border: 1px solid rgba(255,255,255,.18); border-radius: var(--r-l); padding: 2.2rem 2rem; width: min(400px, 92vw); display: flex; flex-direction: column; gap: .8rem; text-align: center; box-shadow: 0 10px 34px rgba(0,0,0,.45); }
.login-card input { font-size: 14px; text-align: left; background: rgba(0,0,0,.28); color: #f2f5f8; border-color: rgba(255,255,255,.18); }
.login-card p { text-align: left; color: #c6cfd9; }
.login-card p.err:empty { display: none; }
.login-card .small { text-align: center; }

@media (max-width: 1100px) { .frame.with-rail { grid-template-columns: minmax(0, 1fr); } .rail { display: none; } }
@media (max-width: 900px) {
  .top { grid-template-columns: auto 1fr auto; gap: .4rem .6rem; padding: .5rem .75rem; position: static; }
  .railbtn { display: none; }
  .brand { grid-row: 1; grid-column: 1; }
  .who { grid-row: 1; grid-column: 3; }
  .nav { grid-row: 2; grid-column: 1 / -1; overflow-x: auto; gap: .1rem; padding-bottom: .1rem; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .main { padding: .9rem .75rem 2rem; }
  .cards { grid-template-columns: repeat(2, 1fr); gap: .5rem; }
  .card .v { font-size: 19px; }
  .row { gap: .5rem; }
  .row .field { flex: 1 1 140px; }
  .row input, .row select { width: 100%; }
  .kv { grid-template-columns: 1fr; gap: .1rem; }
  .kv dt { margin-top: .4rem; }
  .hero .v { font-size: 18px; }
  .toast { left: .75rem; right: .75rem; max-width: none; }
  .login-card { padding: 1.4rem; }
  .fields .two { grid-template-columns: 1fr; }
  .backdrop { padding: .5rem; align-items: start; }
  .modal { max-height: calc(100vh - 1rem); }
  .feed { grid-template-columns: 4px auto 36px minmax(0, 1fr); }
  .ticket { grid-template-areas: "s when when acts" "s f who who" "s what what what" "s ev ev ev"; gap: .1rem .6rem; padding-right: .7rem; }
  .ticket .when { flex-direction: row; gap: .5rem; align-items: baseline; }
  .ticket .acts { justify-self: end; }
  .ticket .flag { font-size: 22px; }
  .ticket .who { min-width: 0; }
  .ticket .addr { font-size: 14px; }
  .ticket .what { margin-top: .2rem; }
  .ticket .acts { align-self: start; margin-top: .1rem; }
  .ticket .copy { opacity: 1; }
  .search { flex-basis: 100%; max-width: none; }
  .only-mobile { display: inline-block; }
  .more-filters { display: none; }
  .more-filters.open { display: flex; flex-wrap: wrap; gap: .4rem; width: 100%; }
  .livebtn { margin-left: 0; }
  [data-hint]::after { display: none; }
}
@media (max-width: 480px) { h1 { font-size: 18px; } .cards { grid-template-columns: 1fr 1fr; } }
