:root { --series-2: #eb6834; }
@media (prefers-color-scheme: dark) { :root:where(:not([data-theme="light"])) { --series-2: #d95926; } }
:root[data-theme="dark"] { --series-2: #d95926; }
.net-values { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 16px; }
.net-values .metric-value { font-size: 26px; }
.net-key { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.net-key i, .tip-row i { display: inline-block; width: 12px; height: 2px; border-radius: 1px; }
.tip-row { display: flex; align-items: center; gap: 6px; }
.tip-row span, .tip-time { color: var(--muted); }
.tooltip .tip-row span { margin-left: 0; }
.quota { padding-top: 14px; border-top: 1px solid var(--grid); margin-top: 8px; }
.ctable .c-act { width: 74px; }
.ctable td.c-act { padding-left: 6px; text-align: right; white-space: nowrap; }
.ctl-btn { appearance: none; width: 28px; height: 28px; margin-left: 4px; border: 1px solid var(--border); border-radius: 6px; background: transparent; color: var(--ink-2); font: inherit; font-size: 13px; line-height: 1; cursor: pointer; }
.ctl-btn:hover { background: var(--hover); color: var(--ink); }
.ctl-lock { font-size: 11px; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ctl-stopped { margin-top: 10px; font-size: 13px; }
.ctl-stopped summary { cursor: pointer; color: var(--ink-2); min-height: 26px; }
.ctl-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--grid); overflow-wrap: anywhere; }
.ctl-start { flex: none; }
dialog.ctl { width: min(420px, calc(100vw - 32px)); padding: 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--ink); }
dialog.ctl::backdrop { background: rgba(0,0,0,.45); }
dialog.ctl p { margin: 0 0 8px; font-size: 14px; }
dialog.ctl p + p { font-size: 13px; color: var(--ink-2); }
.ctl-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
#ctl-error { margin-top: 8px; font-size: 13px; font-weight: 600; }
#ctl-error[hidden] { display: none; }
.bk-tiles { margin-bottom: 10px; }
.bk-tiles .tile-value { font-size: 20px; }
.bk-tiles .bk-bad .tile-value { color: var(--critical); }
.bk-inline { margin-top: 0; }
.bk-dbs { display: flex; flex-wrap: wrap; margin: 8px 0; }
.bk-act { min-height: 28px; padding: 3px 10px; }
.bk-job { margin-top: 14px; padding: 12px; border: 1px solid var(--border); border-radius: 8px; }
.bk-job[hidden], .bk-force[hidden], .bk-ask-error[hidden], #bk-error[hidden] { display: none; }
.bk-job-title { font-weight: 600; margin-bottom: 6px; }
.bk-steps { list-style: none; margin: 0; padding: 0; font-size: 13px; color: var(--muted); }
.bk-steps li { display: flex; gap: 8px; padding: 2px 0; }
.bk-steps li span { width: 12px; text-align: center; }
.bk-steps li.done { color: var(--ink-2); }
.bk-steps li.now { color: var(--ink); font-weight: 600; }
.bk-job-error { font-size: 13px; color: var(--ink); margin-top: 6px; overflow-wrap: anywhere; }
.bk-ask-title { margin: 0 0 10px; font-size: 16px; font-weight: 600; }
.bk-field { display: block; margin: 12px 0 6px; font-size: 13px; }
.bk-input { width: 100%; font: inherit; color: var(--ink); background: var(--page); border: 1px solid var(--border); border-radius: 6px; padding: 7px 9px; }
.bk-force { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; font-size: 13px; }
.bk-ask-error { margin-top: 8px; font-size: 13px; font-weight: 600; }
.speed-primary.bk-danger { background: var(--critical); }
.bk-settings { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; margin-top: 8px; }
.bk-settings label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
dialog.speed {
  width: min(820px, calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px);
  padding: 0; border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); color: var(--ink);
}
dialog.speed::backdrop { background: rgba(0,0,0,.45); }
.speed-body { padding: 18px; }
#speed-error[hidden] { display: none; }
.speed-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.speed-head h2 { margin: 0; font-size: 17px; font-weight: 600; }
.speed-grid { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 20px; align-items: center; }
.gauge { position: relative; max-width: 320px; margin: 0 auto; width: 100%; }
.gauge svg { display: block; width: 100%; height: auto; }
.gauge text { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.gauge-fill { transition: stroke-dashoffset .35s ease-out; }
.gauge-read { position: absolute; left: 0; right: 0; bottom: 4px; text-align: center; }
.gauge-value { font-size: 48px; font-weight: 600; line-height: 1.05; }
.gauge-unit { color: var(--muted); font-size: 13px; }
.speed-side { min-width: 0; }
.speed-phase { font-size: 13px; color: var(--ink-2); min-height: 20px; margin-bottom: 10px; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.tile-label { font-size: 13px; color: var(--ink-2); }
.tile-sub { font-size: 12px; color: var(--muted); }
.tile-value { font-size: 22px; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.tile-value small { font-size: 12px; font-weight: 400; color: var(--muted); }
.speed-primary {
  appearance: none; border: 0; border-radius: 8px; background: var(--accent); color: #fff;
  font: inherit; font-weight: 600; font-size: 14px; padding: 8px 16px; min-height: 38px; cursor: pointer;
}
.speed-primary:hover { filter: brightness(1.08); }
.speed-primary:disabled { opacity: .55; cursor: default; filter: none; }
.speed-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.speed-warn { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.speed-warn[hidden] { display: none; }
.speed-note { color: var(--muted); font-size: 12px; margin-top: 8px; }
.speed-section { border-top: 1px solid var(--grid); margin-top: 16px; padding-top: 14px; }
.speed-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 10px; }
.speed-row .section-label { margin: 0; }
.speed-select { font: inherit; font-size: 13px; color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 5px 8px; min-height: 30px; }
.speed-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 14px; }
.speed-charts h3 { margin: 0; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.speed-charts .chart { height: 130px; margin-top: 4px; }
.speed-charts .empty { left: 10px; right: 10px; }
.speed-table { max-height: 260px; overflow: auto; }
.speed-table td.err { white-space: normal; text-align: left; color: var(--ink-2); min-width: 160px; }
.speed-table th { position: sticky; top: 0; background: var(--surface); }
@media (max-width: 640px) {
  .speed-grid { grid-template-columns: minmax(0, 1fr); }
  .gauge-value { font-size: 44px; }
}
@media (prefers-reduced-motion: reduce) { .gauge-fill { transition: none; } }
.tunnels { margin-top: 14px; }
.ttable .t-num { width: 17%; text-align: right; font-variant-numeric: tabular-nums; }
.ttable .t-state { width: 17%; text-align: right; color: var(--muted); }
.ttable .t-off { color: var(--critical); font-weight: 600; }
.t-port { color: var(--muted); font-size: 12px; }
