:root {
  --bg: #f7f7f8;
  --surface: #ffffff;
  --sunken: #fafafb;
  --line: #e4e4e8;
  --line-2: #efeff2;
  --text: #18181b;
  --ink: #18181b;
  --muted: #5c5c66;
  --faint: #9898a3;
  --accent: #2f5bd3;
  --accent-weak: #eef2fd;
  --ok: #187a3e;
  --ok-bg: #e6f4ea;
  --warn: #a95c06;
  --warn-bg: #fcf0de;
  --bad: #c0362c;
  --bad-bg: #fbe9e7;
  --unk: #5f6b7a;
  --unk-bg: #eceff2;
  --c-likely_human: #3f9a62;
  --c-suspicious: #e0a03a;
  --c-bot: #d0473c;
  --c-unknown: #b6bec9;
  --radius: 6px;
  --radius-lg: 8px;
  color-scheme: light;
}

* { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: #d4d4d8 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 5px; background: #d4d4d8 padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: #a1a1aa; }
pre.code:not(.raw)::-webkit-scrollbar-thumb { background-color: #4a5059; }


@font-face { font-family: "Zerda Flags"; src: url(/console/flags.woff2) format("woff2"); unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067, U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F; font-display: swap; }
html { font: 13px/1.5 "Zerda Flags", system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; color: var(--text); background: var(--bg); scrollbar-gutter: stable; }
body { margin: 0; }
a { color: var(--accent); text-decoration: none; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: 12px; }
.i { flex: none; display: block; }
[hidden] { display: none !important; }


.shell { display: grid; grid-template-columns: 224px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 12px; padding: 16px 12px 12px; background: var(--bg); border-right: 1px solid var(--line); overflow-y: auto; }
.brand { padding: 2px 8px 4px; font-size: 16px; font-weight: 700; }
.nav { display: grid; gap: 1px; }
.nav a { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border: 1px solid transparent; border-radius: var(--radius); color: var(--muted); font-weight: 500; white-space: nowrap; }
.nav a:hover { background: var(--line-2); color: var(--text); }
.nav a.on { background: var(--surface); border-color: var(--line); color: var(--text); box-shadow: 0 1px 2px rgba(24, 24, 27, .06); }
.nav a.on .i { color: var(--text); }
.side > .nav { flex: 1; align-content: start; }
.nav-g { padding: 14px 10px 4px; color: var(--faint); font-size: 12px; font-weight: 500; }
.side-foot { display: grid; gap: 10px; }
.plan { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); }
a.plan:hover { border-color: #cfcfd6; }
.plan-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.plan-row span, .plan-n { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.plan .bar-track { height: 6px; }
.plan .bar-fill { background: var(--ink); }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px max(28px, calc((100% - 1584px) / 2)); background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site { width: 220px; font-weight: 500; }
.view { width: 100%; max-width: 1640px; margin: 0 auto; padding: 24px 28px 40px; }
.vh, .tab-page > .page-head h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.tab-page > .page-head:not(:has(.btn, .seg, .chips-row)) { display: none; }


.subnav { margin-bottom: 20px; }
.subnav h1 { margin: 0 0 12px; font-size: 20px; font-weight: 600; }
.tabs-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; box-shadow: inset 0 -1px 0 var(--line); }
.tabs-nav::-webkit-scrollbar { display: none; }
.tabs-nav a { flex: none; display: flex; align-items: center; height: 38px; padding: 0 10px; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 500; white-space: nowrap; }
.tabs-nav a:hover { color: var(--text); }
.tabs-nav a.on { border-bottom-color: var(--ink); color: var(--text); }
.tabs-nav a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }


.page-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; min-height: 32px; margin-bottom: 20px; }
.page-head h1 { min-width: 0; margin: 0; font-size: 20px; font-weight: 600; overflow-wrap: anywhere; }
.page-head .id { font-size: 15px; font-weight: 600; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.spacer { flex: 1; }
.head-acts { display: flex; gap: 8px; }
.stack { display: grid; gap: 16px; align-content: start; min-width: 0; }
.panel { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.panel-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 46px; padding: 6px 16px; border-bottom: 1px solid var(--line-2); }
.panel-head h2 { margin: 0; font-size: 13px; font-weight: 600; }
.panel-body { padding: 16px; }
.faint { color: var(--faint); }
.muted { color: var(--muted); }
.empty { display: grid; place-items: center; min-height: 120px; color: var(--faint); }


.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); font: inherit; font-weight: 500; white-space: nowrap; cursor: pointer; }
.btn:hover { background: var(--sunken); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: #303036; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.on { border-color: var(--accent); color: var(--accent); background: var(--accent-weak); }
.ibtn { width: 32px; padding: 0; }
.btn:focus-visible, .input:focus-visible, .seg button:focus-visible, .nav a:focus-visible, tr.row:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.tip { position: fixed; z-index: 60; padding: 3px 8px; border-radius: 4px; background: var(--text); color: #fff; font-size: 12px; font-weight: 400; line-height: 1.6; white-space: pre-line; max-width: min(560px, calc(100vw - 8px)); pointer-events: none; }
.qr { display: flex; justify-content: center; margin: 4px 0 12px; }
.qr svg { display: block; width: 184px; height: 184px; }
.seg { display: inline-flex; max-width: 100%; overflow-x: auto; gap: 2px; padding: 2px; border-radius: var(--radius); background: var(--line-2); }
.seg button { height: 28px; padding: 0 10px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font: inherit; white-space: nowrap; cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--text); font-weight: 500; box-shadow: 0 1px 2px rgba(16, 24, 40, .1); }
.input { height: 32px; min-width: 0; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); font: inherit; }
.input.invalid { border-color: var(--bad); }
select.input {
  appearance: none; padding-right: 28px; cursor: pointer;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235f6b7a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center;
}
.search { position: relative; display: inline-flex; align-items: center; }
.search .i { position: absolute; left: 9px; color: var(--faint); pointer-events: none; }
.search .input { width: 240px; padding-left: 30px; }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line-2); }
.tb-count { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }


.dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.d-likely_human { background: var(--c-likely_human); }
.d-suspicious { background: var(--c-suspicious); }
.d-bot { background: var(--c-bot); }
.d-unknown { background: var(--c-unknown); }
.vb { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 4px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.vb-likely_human { background: var(--ok-bg); color: var(--ok); }
.vb-suspicious { background: var(--warn-bg); color: var(--warn); }
.vb-bot { background: var(--bad-bg); color: var(--bad); }
.vb-unknown { background: var(--unk-bg); color: var(--unk); }
.chip { display: inline-flex; align-items: center; height: 20px; margin-right: 4px; padding: 0 7px; border-radius: 4px; background: var(--line-2); color: #344054; font-size: 12px; white-space: nowrap; }
.chip.hit-bad { background: var(--bad-bg); color: var(--bad); }
.chip.hit-warn { background: var(--warn-bg); color: var(--warn); }
.chip.hit-ok { background: var(--ok-bg); color: var(--ok); }
.hold-runs { display: grid; gap: 14px; }
.hold-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.hold-facts { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 8px; font-size: 12px; }
.hold-chart { display: block; width: 100%; height: 96px; border: 1px solid var(--line); border-radius: 4px; }
.hold-rp { margin-bottom: 10px; }
.hold-stage { display: grid; place-items: center; padding: 10px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--surface); }
.hold-stage canvas { display: block; max-width: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; margin-left: auto; color: var(--muted); font-size: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }


.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tbl th { padding: 8px 10px; border-bottom: 1px solid var(--line); background: var(--sunken); color: var(--muted); font-size: 12px; font-weight: 500; text-align: left; white-space: nowrap; }
.tbl td { height: 40px; padding: 6px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; }
.tbl td.acct { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.tbl tr.row { cursor: pointer; }
.tbl tr.row:hover td { background: #f7f8fc; }
.tbl tr.row.on td { background: var(--accent-weak); }

.tbl tr[data-v] td:first-child { box-shadow: inset 3px 0 0 var(--vc); }
.tbl tr.v-lit td { background: color-mix(in srgb, var(--vc) 9%, var(--surface)); }
.vcell { display: inline-flex; align-items: center; gap: 6px; }

.vtag { flex: none; display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 3px; border-radius: 4px; background: var(--vc, transparent); color: #fff; font-size: 11px; font-style: normal; font-weight: 600; line-height: 1; }
.vn { color: var(--vc); font-size: 12px; font-weight: 600; text-decoration: none; }
.vn.faint { color: var(--faint); font-weight: 500; }
.vn:hover { text-decoration: underline; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 8px 14px; border-top: 1px solid var(--line-2); color: var(--muted); font-variant-numeric: tabular-nums; }


.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; margin-bottom: 16px; background: var(--line-2); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.kpi { min-height: 92px; padding: 14px 16px; background: var(--surface); }
.kpi .k { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.kpi .v { margin-top: 6px; font-size: 26px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi .s { color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }

.ov-kpis { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2.2fr); }
.ov-kpis .kpi .v { font-size: 30px; }
.kpi-mix { display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.mix-bar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: var(--line-2); }
.mix-bar i { display: block; height: 100%; }
.mix-parts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mix-parts b { display: inline-block; margin-top: 4px; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mix-parts .p { margin-left: 6px; color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tiles .kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.chart { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 8px; height: 300px; }
.chart-y { display: flex; flex-direction: column; justify-content: space-between; padding-bottom: 22px; color: var(--faint); font-size: 11px; text-align: right; font-variant-numeric: tabular-nums; }
.chart-y span { line-height: 1; transform: translateY(-50%); }
.chart-y span:last-child { transform: translateY(0); }
.chart-plot { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) 22px; min-width: 0; }
.chart-grid { position: absolute; inset: 0 0 22px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.chart-grid i { border-top: 1px dashed var(--line); }
.chart-grid i:last-child { border-top: 1px solid var(--line); }
.chart-bars { position: relative; display: flex; align-items: stretch; gap: var(--gap, 3px); min-width: 0; }
.chart-bars .col { flex: 1; min-width: 0; display: flex; flex-direction: column-reverse; align-items: center; }
.chart-bars .col:hover { filter: brightness(.92); }
.chart-bars a.col:hover { background: var(--line-2); }

.chart-bars .col.major:not(.out):not(:hover) { background: linear-gradient(var(--line-2), var(--line-2)) center / 1px 100% no-repeat; }
.chart-bars .col.out, .sw-out { background: repeating-linear-gradient(135deg, var(--line-2) 0 1px, transparent 1px 6px); }
.chart-note { display: inline-flex; align-items: center; gap: 6px; margin-left: 12px; color: var(--faint); font-size: 12px; }
.sw-out { display: inline-block; width: 10px; height: 10px; border: 1px solid var(--line); border-radius: 2px; }
.chart-bars .col i { display: block; flex: none; width: 100%; max-width: 56px; }
.chart-bars .col i:last-child { border-radius: min(3px, var(--gap, 3px)) min(3px, var(--gap, 3px)) 0 0; }
.chart-bars .col i.v-likely_human { background: var(--c-likely_human); }
.chart-bars .col i.v-suspicious { background: var(--c-suspicious); }
.chart-bars .col i.v-bot { background: var(--c-bot); }
.chart-bars .col i.v-unknown { background: var(--c-unknown); }


.chart-lines { position: absolute; left: 0; top: 0; width: 100%; height: calc(100% - 22px); overflow: visible; pointer-events: none; }
.chart-lines path { fill: none; vector-effect: non-scaling-stroke; }
.chart-lines .l { stroke: var(--c); stroke-width: 2; stroke-linejoin: round; }
.chart-lines .p { stroke: var(--c); stroke-width: 6; stroke-linecap: round; }
.chart-lines .a { fill: var(--c); stroke: none; opacity: .08; }
.chart-lines .v-likely_human { --c: var(--c-likely_human); }
.chart-lines .v-suspicious { --c: var(--c-suspicious); }
.chart-lines .v-bot { --c: var(--c-bot); }
.chart-lines .v-unknown { --c: var(--c-unknown); }
.seg-ico { margin-left: 12px; }
.seg-ico button { display: inline-grid; place-items: center; width: 30px; padding: 0; }
.chart-x { display: flex; gap: var(--gap, 3px); min-width: 0; padding-top: 6px; color: var(--faint); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart-x span { position: relative; flex: 1; min-width: 0; display: flex; justify-content: center; overflow: visible; white-space: nowrap; }

.chart-x span::before { content: ''; position: absolute; top: -6px; left: 50%; width: 1px; height: 3px; background: var(--line); }
.chart-x span.major::before { height: 5px; background: #c4c4cc; }
.chart-x.dense span:not(.major)::before { display: none; }
.bar-track { height: 8px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; background: #52525b; }
.dist { display: flex; width: 96px; height: 8px; border-radius: 4px; overflow: hidden; background: var(--line-2); }
.dist i { display: block; height: 100%; }
.ov-dist { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.dist-list { display: grid; padding: 6px 0; }
.dist-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 48px; align-items: center; column-gap: 10px; row-gap: 5px; padding: 7px 16px; color: var(--text); }
.dist-row .n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dist-row .c { font-variant-numeric: tabular-nums; }
.dist-row .p { color: var(--muted); font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.dist-row .bar-track { grid-column: 1 / -1; height: 4px; }
.dist-row .bar-fill { display: block; background: var(--accent); opacity: .7; }
a.dist-row:hover { background: var(--sunken); }
a.dist-row:hover .bar-fill { opacity: 1; }
div.dist-row .bar-fill { background: var(--faint); }


.detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.dl { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 8px 12px; margin: 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.ip-check:not(:empty) { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.scenes .scene + .scene { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.scene-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.scene-head .chip { margin: 0; }
.scene-act { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.list-box .dl { grid-template-columns: max-content minmax(0, 1fr); align-items: center; gap: 4px 12px; }
.list-row { display: flex; align-items: center; gap: 4px; min-width: 0; }
.list-row > .v { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.list-row .ab { margin-right: 4px; }
.hits { display: grid; }
.hit-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; gap: 12px; min-height: 42px; padding: 8px 14px; border-bottom: 1px solid var(--line-2); }
.hit-row:last-child { border-bottom: 0; }
.hit-row .g { color: var(--muted); }
.hit-row .chips { display: flex; flex-wrap: wrap; gap: 4px; }
.hit-row .chip { margin: 0; }
.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }


.stage { display: grid; place-items: center; min-height: 160px; padding: 12px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--sunken); }
.stage canvas { display: block; max-width: 100%; }
.lane { display: block; width: 100%; height: 44px; margin-top: 10px; }
.rp-ctrl { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.rp-scrub { --p: 0%; flex: 1 1 160px; min-width: 120px; height: 16px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.rp-scrub::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(var(--ink), var(--ink)) 0 0 / var(--p) 100% no-repeat, var(--line); }
.rp-scrub::-webkit-slider-thumb { width: 10px; height: 10px; margin-top: -5px; border: 2px solid var(--ink); border-radius: 50%; background: var(--surface); -webkit-appearance: none; appearance: none; }
.rp-scrub::-moz-range-track { height: 4px; border-radius: 2px; background: var(--line); }
.rp-scrub::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--ink); }
.rp-scrub::-moz-range-thumb { width: 10px; height: 10px; border: 2px solid var(--ink); border-radius: 50%; background: var(--surface); }
.rp-scrub:hover::-webkit-slider-thumb { transform: scale(1.15); }
.rp-scrub:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.rp-time { min-width: 120px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.rp-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; color: var(--muted); font-size: 12px; }
.rp-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; flex: none; width: 14px; height: 3px; border-radius: 2px; }
.sw.ring { width: 10px; height: 10px; border: 2px solid; border-radius: 50%; background: transparent; }
.sw.key { width: 10px; height: 10px; border-radius: 2px; }


.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > label { color: var(--muted); font-size: 12px; }
.keybox { display: flex; align-items: center; gap: 6px; min-width: 0; }
.keybox code { flex: 1; min-width: 0; height: 32px; padding: 0 10px; display: flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); background: var(--sunken); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tag-input { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 36px; padding: 5px 6px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: text; }
.tag-input:focus-within { border-color: var(--accent); }
.tag-input.ro { min-height: 0; padding: 0; border: 0; background: none; cursor: default; }
.tag-input > .tags { display: contents; }
.tag-input .chip { height: 24px; }
.tag-input > input { flex: 1; min-width: 140px; height: 24px; padding: 0 4px; border: 0; outline: 0; background: none; color: var(--text); font: inherit; }
.tag-input > input.invalid { color: var(--bad); }
pre.code { margin: 0; padding: 14px; overflow-x: auto; scrollbar-color: #4a5059 transparent; background: #1f2329; color: #e6e9ef; border-radius: 0 0 var(--radius) var(--radius); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; line-height: 1.6; }
.policy select.input { width: 100%; min-width: 120px; }
.policy td:first-child { font-weight: 500; }


.ftip { position: fixed; z-index: 30; display: none; min-width: 120px; padding: 8px 10px; border-radius: var(--radius); background: var(--text); color: #fff; font-size: 12px; pointer-events: none; font-variant-numeric: tabular-nums; }
.ftip .r { display: flex; align-items: center; gap: 6px; }
.ftip .r b { margin-left: auto; padding-left: 12px; font-weight: 500; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 50; transform: translate(-50%, 12px); padding: 8px 14px; border-radius: var(--radius); background: var(--text); color: #fff; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.modal-back { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; background: rgba(16, 24, 40, .35); }
.modal { width: min(400px, 100%); padding: 18px; border-radius: 8px; background: var(--surface); box-shadow: 0 12px 32px rgba(16, 24, 40, .2); }
.modal h3 { margin: 0 0 16px; font-size: 15px; font-weight: 600; }
.modal .acts { display: flex; justify-content: flex-end; gap: 8px; }

@media (max-width: 1180px) {
  .detail { grid-template-columns: minmax(0, 1fr); }
  .kpis, .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpis.ov-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-mix { grid-column: 1 / -1; }
  .ov-dist { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .side { z-index: 6; height: auto; flex-direction: row; align-items: center; gap: 8px; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .side-foot { display: flex; align-items: center; }
  #plan { display: none; }
  .brand { padding: 0 6px 0 0; }
  .nav { display: flex; gap: 2px; }
  .nav-g { display: none; }
  .nav a { height: 32px; padding: 0 8px; gap: 6px; }
  .top { position: static; flex-wrap: wrap; padding: 8px 12px; }
  .site { flex: 1 1 180px; width: auto; }
  .view { padding: 12px; }
  .two { grid-template-columns: minmax(0, 1fr); }
  .kpis, .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search { flex: 1 1 200px; }
  .search .input { width: 100%; }
  .hide-sm { display: none; }
  .hit-row { grid-template-columns: 88px minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .side { gap: 4px; scrollbar-width: none; }
  .side::-webkit-scrollbar { display: none; }
  .brand > span:last-child { display: none; }
  .nav a { padding: 0 6px; gap: 4px; }
  .rp-time { min-width: 0; }
  .ov-dist { grid-template-columns: minmax(0, 1fr); }
}


.nav a .i:last-child:not(:first-child) { margin-left: auto; color: var(--faint); }
.ws { width: 100%; font-weight: 600; }
.menu-wrap { position: relative; }
.acct { max-width: 220px; gap: 6px; padding: 0 8px; }
.acct-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 25; min-width: 220px; padding: 4px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 8px 24px rgba(16, 24, 40, .14); }
.menu-head { padding: 8px 10px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.menu a, .menu button { display: flex; align-items: center; gap: 8px; width: 100%; height: 34px; padding: 0 10px; border: 0; border-radius: 5px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--line-2); }
.banners:empty { display: none; }
.banners { display: grid; gap: 8px; width: 100%; max-width: 1640px; margin: 0 auto; padding: 16px 28px 0; }
.banner { display: flex; align-items: center; gap: 10px; min-height: 40px; margin-bottom: 16px; padding: 8px 12px; border: 1px solid #c9d7f7; border-radius: var(--radius); background: var(--accent-weak); color: #1d3f91; }
.banners .banner { margin-bottom: 0; }
.banner > span:not(.spacer), .banner > a.banner-main { min-width: 0; }
.banner > a.banner-main { display: flex; align-items: center; gap: 10px; flex: 1; color: inherit; }
.banner .ibtn.dismiss { width: 26px; height: 26px; margin: -2px -4px -2px 0; border-color: transparent; background: none; color: inherit; opacity: .7; }
.banner .ibtn.dismiss:hover { opacity: 1; background: rgba(16, 24, 40, .06); }
.banner.info { border-color: #c9d7f7; background: var(--accent-weak); color: #1d3f91; }
.banner.warn { border-color: #f1d3a6; background: var(--warn-bg); color: #7a4204; }
.banner.bad { border-color: #f1c2bc; background: var(--bad-bg); color: #8f2219; }
a.banner:hover { filter: brightness(.98); }
.banner .btn { flex: none; }


.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 32px 16px; }
.auth-brand { font-size: 20px; font-weight: 700; }
.auth-card { width: min(400px, 100%); padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.auth-card h1 { margin: 0 0 8px; font-size: 18px; font-weight: 600; }
.auth-card > p.muted { margin: 0 0 16px; }
.auth-card .banner { margin-bottom: 16px; }
.auth-card .input { width: 100%; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin-top: 14px; }
.auth-foot { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 16px; color: var(--muted); font-size: 12px; }
.auth-foot a { color: var(--muted); }
.auth-foot a:hover { color: var(--text); }
.btn.block { width: 100%; height: 36px; }
.link { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: var(--accent); font: inherit; cursor: pointer; }
.link:hover { text-decoration: underline; }
.auth-foot .link { color: var(--muted); }


.field .input { width: 100%; }
.input.area { height: auto; min-height: 64px; padding: 8px 10px; line-height: 1.5; resize: vertical; }
.input.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }
.input.sm { height: 28px; padding-left: 8px; font-size: 12px; }
select.input.sm { padding-right: 26px; }
.hint { margin: 0; color: var(--faint); font-size: 12px; line-height: 1.5; }
p.hint { margin-top: 10px; }
.hint.pad, p.hint.panel-body { margin: 0; padding: 10px 14px 14px; }
.form-err { min-height: 0; color: var(--bad); font-size: 12px; }
.form-err:not(:empty) { margin: -4px 0 12px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.form-grid .field:has(textarea), .form-grid .field:has(.checks) { grid-column: 1 / -1; }
.test-out:not(:empty) { margin: 0 0 12px; padding: 8px 10px; border-radius: var(--radius); background: var(--sunken); font-size: 12px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.check { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; cursor: pointer; }
.check input { width: 15px; height: 15px; margin: 0; accent-color: var(--accent); }
.help { display: inline-flex; vertical-align: -3px; color: var(--faint); cursor: help; }
.help:hover, .help:focus-visible { color: var(--muted); outline: 0; }
.toggle-row { display: flex; margin-bottom: 10px; }
.modal.wide { width: min(640px, 100%); }
.modal { max-height: calc(100vh - 32px); overflow-y: auto; }
.switch { position: relative; display: inline-block; width: 34px; height: 20px; flex: none; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 10px; background: #c7ced8; transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, .25); transition: transform .15s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(14px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }


.ab { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 4px; font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--unk-bg); color: var(--unk); }
.ab-allow { background: var(--ok-bg); color: var(--ok); }
.ab-challenge, .ab-review, .ab-reduce { background: var(--warn-bg); color: var(--warn); }
.ab-block { background: var(--bad-bg); color: var(--bad); }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chips-row:empty { display: none; }
.toolbar + .chips-row { padding: 8px 14px; border-bottom: 1px solid var(--line-2); }
.chip.removable { gap: 4px; padding-right: 2px; margin: 0; }
.chip.removable button { display: grid; place-items: center; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 3px; background: none; color: inherit; cursor: pointer; }
.chip.removable button:hover { background: rgba(16, 24, 40, .08); }
.row-acts { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
td .row-acts .btn { border-color: transparent; }

.idc { display: inline-flex; align-items: center; gap: 2px; }
.bico { flex: none; display: inline-block; width: 14px; height: 14px; vertical-align: -2px; }
.dist-row .n .bico { margin-right: 6px; }
.devc { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; min-width: 0; }
.devc .chip { gap: 4px; margin: 0; }
.devc .chip .bico { width: 12px; height: 12px; }
.btn.ibtn.cp { width: 24px; height: 24px; flex: none; border-color: transparent; background: none; color: var(--faint); vertical-align: middle; }
.btn.ibtn.cp:hover { background: var(--sunken); color: var(--text); }
.tbl .cp { opacity: 0; }
.tbl tr:hover .cp, .tbl tr:focus-within .cp, .tbl .cp:focus-visible { opacity: 1; }
@media (hover: none) { .tbl .cp { opacity: 1; } }
.tbl td.idcol { width: 1%; }


.step .panel-head { gap: 10px; }
.step-n { display: grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 50%; background: var(--line-2); color: var(--muted); font-size: 12px; font-weight: 600; }
.step.done .step-n { background: var(--ok-bg); color: var(--ok); }
.step-desc { margin: 0 0 10px; color: var(--muted); line-height: 1.6; }
.step-site { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.step-site .keybox { flex: 0 1 320px; }
.code-wrap { position: relative; margin-top: 10px; }
.code-wrap pre.code { border-radius: var(--radius); padding-right: 48px; }
.code-wrap > .btn { position: absolute; top: 8px; right: 8px; border-color: #3a4049; background: #2a2f36; color: #e6e9ef; }
.code-wrap > .btn:hover { background: #343a42; }
pre.code.raw { max-height: 420px; overflow: auto; scrollbar-color: #d4d4d8 transparent; border: 1px solid var(--line); border-radius: var(--radius); background: var(--sunken); color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
pre.code.codes { columns: 2; white-space: pre; font-size: 13px; letter-spacing: 0; }
.panel > pre.code.raw { border: 0; border-radius: 0 0 var(--radius) var(--radius); }


.mb { margin-bottom: 16px; }
.mt { margin-top: 14px; }
.acts.mt { display: flex; flex-wrap: wrap; gap: 8px; }
.panel-body > .acts, .panel-body .acts { display: flex; flex-wrap: wrap; gap: 8px; }
.tiles.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tiles.three { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 12px 0 0; }
.tiles .kpi { min-height: 72px; }
.danger-zone { border-color: #f1c2bc; }
.danger-zone .panel-head h2 { color: var(--bad); }

.set-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; align-items: center; gap: 16px; min-height: 56px; padding: 10px 16px; }
.set-row + .set-row { border-top: 1px solid var(--line-2); }
.set-row > .k { font-weight: 500; }
.set-row > .k.wide { grid-column: 1 / 3; font-weight: 400; }
.set-row > .v { min-width: 0; overflow-wrap: anywhere; }
.set-row > .a { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.set-row > .a select.input { width: 160px; }
@media (max-width: 1280px) {
  .acct-two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .set-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .set-row > .k { grid-column: 1 / -1; }
  .set-row > .k.wide { grid-column: 1 / 2; }
  .set-row > .k:not(.wide) ~ .v, .set-row > .k:not(.wide) ~ .a { grid-column: 1 / -1; }
  .set-row > .k:not(.wide) ~ .a { justify-content: flex-start; }
  .set-row > .v:empty { display: none; }
}
.seg.tabs { display: flex; width: max-content; max-width: 100%; overflow-x: auto; }
.links { display: grid; gap: 8px; }
.links a { display: inline-flex; align-items: center; gap: 8px; overflow-wrap: anywhere; }


.meter { display: grid; gap: 6px; }
.bar-track.wide { height: 10px; border-radius: 5px; }
.bar-fill.warn { background: var(--c-suspicious); }
.bar-fill.bad { background: var(--c-bot); }
.meter-n { font-variant-numeric: tabular-nums; }
.meter-n b { font-size: 16px; font-weight: 600; }
.chart-bars span.col { cursor: default; }


.thread { display: grid; gap: 12px; padding: 14px; }
.msg { max-width: 88%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.msg.staff { justify-self: end; border-color: #c9d7f7; background: var(--accent-weak); }
.msg-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 6px; font-size: 12px; }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; }
form.reply { padding: 14px; border-top: 1px solid var(--line-2); }
form.reply .input { width: 100%; margin-bottom: 10px; }
form.reply .acts { display: flex; justify-content: flex-end; }

@media (max-width: 1180px) {
  .tiles.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .side { overflow-y: visible; }
  .nav a .i:last-child:not(:first-child) { display: none; }
  .ws { flex: 0 0 160px; width: 160px; }
  .banners { padding: 12px 12px 0; }
  .subnav h1 { font-size: 18px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .tiles.three { grid-template-columns: minmax(0, 1fr); }
  .msg { max-width: 100%; }
}
@media (max-width: 560px) {
  .acct-name { display: none; }
  .tiles.four { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .mix-parts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  pre.code.codes { columns: 1; }
}


.page-head { position: relative; }
.cal-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 25; display: flex; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: 0 8px 24px rgba(16, 24, 40, .14); }
.cal-pop[hidden] { display: none; }
.cal-presets { display: grid; align-content: start; gap: 2px; width: 120px; padding-right: 12px; border-right: 1px solid var(--line-2); }
.cal-presets button { height: 32px; padding: 0 10px; border: 0; border-radius: 5px; background: none; color: var(--text); font: inherit; text-align: left; white-space: nowrap; cursor: pointer; }
.cal-presets button:hover { background: var(--line-2); }
.cal-presets button.on { background: var(--accent-weak); color: var(--accent); font-weight: 500; }
.cal-months { display: grid; grid-template-columns: repeat(2, 252px); gap: 20px; }
.cal-title { display: grid; grid-template-columns: 32px minmax(0, 1fr) 32px; align-items: center; height: 32px; margin-bottom: 6px; }
.cal-title b { font-size: 13px; font-weight: 600; text-align: center; }
.cal-title .ibtn { width: 32px; padding: 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 36px); row-gap: 2px; }
.cal-w { display: grid; place-items: center; height: 28px; color: var(--faint); font-size: 12px; }
.cal-d { height: 34px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--text); font: inherit; font-variant-numeric: tabular-nums; cursor: pointer; }
.cal-d:not(.in):hover { background: var(--line-2); }
.cal-d.now { font-weight: 600; }
.cal-d.now:not(.in) { box-shadow: inset 0 0 0 1px var(--line); }
.cal-d.old { color: var(--faint); }
.cal-d:disabled { color: #d0d0d6; cursor: default; }
.cal-d:disabled:hover { background: none; }
.cal-d.in { border-radius: 0; background: var(--accent-weak); color: var(--accent); }
.cal-d.lo, .cal-d.hi { background: var(--accent); color: #fff; }
.cal-d.lo { border-radius: 6px 0 0 6px; }
.cal-d.hi { border-radius: 0 6px 6px 0; }
.cal-d.lo.hi { border-radius: 6px; }
.cal-d:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
@media (max-width: 1100px) {
  .cal-months { grid-template-columns: 252px; }
}
@media (max-width: 560px) {
  .cal-pop { position: fixed; left: 12px; right: 12px; top: 64px; flex-direction: column; max-height: calc(100vh - 80px); overflow-y: auto; }
  .cal-presets { display: flex; flex-wrap: wrap; width: auto; padding: 0 0 8px; border-right: 0; border-bottom: 1px solid var(--line-2); }
  .cal-months { grid-template-columns: minmax(0, 1fr); }
  .cal-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}
