@import url("https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600&family=Geist+Mono:wght@400;500&display=swap");

:root {
  color-scheme: light dark;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --bg: #f7f7f7;
  --surface: #ffffff;
  --panel: #efefef;
  --fill: rgba(0, 0, 0, 0.04);
  --line: #e2e2e2;
  --text: #111112;
  --muted: #6b6b6b;
  --dim: #a3a3a3;
  --accent: #2c8a1c;
  --accent-soft: rgba(44, 138, 28, 0.1);
  --bar: #5bc944;
  --on-accent: #ffffff;
  --hover: rgba(0, 0, 0, 0.04);
  --primary: #111112;
  --on-primary: #e6e6e6;
  --ok: #2c8a1c;
  --warn: #b7791f;
  --bad: #c53030;
  --off: #a3a3a3;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #09090a;
    --surface: #111112;
    --panel: #1b1b1c;
    --fill: rgba(255, 255, 255, 0.05);
    --line: rgba(255, 255, 255, 0.08);
    --text: #e6e6e6;
    --muted: #a3a3a3;
    --dim: #6b6b6b;
    --accent: #7fee64;
    --accent-soft: rgba(158, 251, 135, 0.1);
    --bar: #7fee64;
    --on-accent: #111112;
    --hover: rgba(255, 255, 255, 0.04);
    --primary: #e6e6e6;
    --on-primary: #111112;
    --ok: #7fee64;
    --warn: #f0b429;
    --bad: #ff6b5e;
    --off: #4a4a4a;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #09090a;
  --surface: #111112;
  --panel: #1b1b1c;
  --fill: rgba(255, 255, 255, 0.05);
  --line: rgba(255, 255, 255, 0.08);
  --text: #e6e6e6;
  --muted: #a3a3a3;
  --dim: #6b6b6b;
  --accent: #7fee64;
  --accent-soft: rgba(158, 251, 135, 0.1);
  --bar: #7fee64;
  --on-accent: #111112;
  --hover: rgba(255, 255, 255, 0.04);
  --primary: #e6e6e6;
  --on-primary: #111112;
  --ok: #7fee64;
  --warn: #f0b429;
  --bad: #ff6b5e;
  --off: #4a4a4a;
}

:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
*:hover { scrollbar-color: var(--dim) transparent; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--dim); }

@media (min-width: 1500px) { html { zoom: 1.08; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 13px/1.5 var(--sans);
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
code, .mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0; }
.muted { color: var(--muted); }
.bad { color: var(--bad); }
.small { font-size: 11px; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ul { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }

button, input[type=search], select {
  font: inherit;
  color: var(--text);
  background: var(--fill);
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 6px 11px;
}
button { cursor: pointer; }
button:hover { background: var(--hover); border-color: var(--line); }
button:disabled { color: var(--dim); cursor: default; }
input[type=search] { width: 280px; }
input[type=search]::placeholder { color: var(--dim); }
input[type=search]:focus, select:focus { outline: none; border-color: var(--line); background: var(--surface); }
input[type=checkbox] { accent-color: var(--accent); }

.status button, .billsync button, .btn {
  padding: 5px 14px;
  border: 0;
  border-radius: 48px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 500;
}
.status button, .billsync button, .btn { transition: background-color 0.15s ease, color 0.15s ease; }
.status button:hover:not(:disabled), .billsync button:hover:not(:disabled), .btn:hover { background: var(--accent); color: var(--on-accent); }
.btn .arrow { display: inline-block; transition: transform 0.15s ease; }
.btn:hover .arrow { transform: rotate(45deg); }
.status button:disabled, .billsync button:disabled { opacity: 0.5; }

button.icon { display: inline-flex; align-items: center; padding: 6px 7px; color: var(--muted); }
button.icon:hover { color: var(--text); }
button.theme { background: none; padding: 6px; }
:root[data-theme="dark"] .i-moon, :root[data-theme="light"] .i-sun { display: none; }

/* login */
.loginbody { display: grid; place-items: center; min-height: 100vh; }
.login { width: min(340px, calc(100vw - 32px)); }
.login .brand { margin-bottom: 18px; font-size: 16px; }
.loginform { display: grid; gap: 12px; padding: 20px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.loginform label { display: grid; gap: 6px; }
.loginform label span { color: var(--dim); font: 500 10.5px/1.4 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.loginform input { width: 100%; padding: 8px 11px; border: 1px solid transparent; border-radius: 7px; background: var(--fill); color: var(--text); font: inherit; }
.loginform input:focus { outline: none; border-color: var(--line); background: var(--bg); }
.loginerr { margin: 0; color: var(--bad); font-size: 12px; }
.loginbtn { margin-top: 4px; padding: 8px 14px; border: 0; border-radius: 48px; background: var(--primary); color: var(--on-primary); font-weight: 500; transition: background-color 0.15s ease, color 0.15s ease; }
.loginbtn:hover { background: var(--accent); color: var(--on-accent); border: 0; }
.signout { margin: 0; }

/* top bar */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 28px;
  height: 52px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
}
.brand { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.brand { display: inline-flex; align-items: center; gap: 8px; }
.brand .logo { height: 18px; width: auto; display: block; }
.login .brand .logo { height: 22px; }
.tabs { display: flex; gap: 18px; align-self: stretch; }
.tabs a { display: flex; align-items: center; color: var(--muted); border-bottom: 1.5px solid transparent; }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--text); border-bottom-color: var(--accent); }
.pages { padding-left: 28px; border-left: 1px solid var(--line); margin: 14px 0; }
.pages a { margin: -14px 0; }
.status { display: flex; align-items: center; gap: 12px; margin-left: auto; font-size: 12px; }

.wrap { padding: 18px 22px 28px; }

/* sidebar layout */
.layout { display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.types {
  position: sticky;
  top: 52px;
  height: calc(100vh - 52px);
  overflow-y: auto;
  padding: 14px 10px 24px;
  border-right: 1px solid var(--line);
}
.content { padding: 16px 22px 28px; min-width: 0; }
.side-off .layout { grid-template-columns: minmax(0, 1fr); }
.side-off .types { display: none; }
.side-off #sidetoggle { color: var(--accent); }
.tgroup { margin-top: 16px; }
.thead {
  display: flex;
  justify-content: space-between;
  padding: 0 8px 5px;
  color: var(--dim);
  font: 500 10.5px/1.4 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.ty {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  width: 100%;
  padding: 4px 8px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted);
  text-align: left;
}
.ty b { color: var(--dim); font: 400 11.5px var(--mono); }
.ty:hover { background: var(--hover); color: var(--text); border: 0; }
.ty.on { background: var(--accent-soft); color: var(--text); }
.ty.on b { color: var(--accent); }
.ty.zero, .ty.zero b { color: var(--dim); }
a.ty span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ty.err span::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-radius: 50%; background: var(--bad); vertical-align: 1px; }
.types .banner { font-size: 12px; }

.banner {
  margin: 0 0 12px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
}

/* toolbar + table */
.toolbar { position: sticky; top: 52px; z-index: 6; display: flex; align-items: center; gap: 10px; margin: -16px -22px 12px; padding: 14px 22px 12px; background: var(--bg); border-bottom: 1px solid transparent; }
.toolbar.stuck { border-bottom-color: var(--line); }
.toolbar > .muted { margin-left: auto; font-size: 12px; white-space: nowrap; }
#filters { flex: 1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pop { position: relative; }
.popbtn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; color: var(--muted); }
.popbtn:hover, .popbtn[aria-expanded="true"] { color: var(--text); }
.popbtn .n:not(:empty) { min-width: 16px; padding: 0 5px; border-radius: 48px; background: var(--accent-soft); color: var(--accent); font: 500 10.5px/16px var(--mono); text-align: center; }
.popbtn .sv { color: var(--text); }
a.exportbtn { border-radius: 7px; background: var(--fill); border: 1px solid transparent; }
a.exportbtn:hover { border-color: var(--line); }
.popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 10;
  min-width: 260px;
  max-width: 360px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}
.popover[hidden] { display: none; }
.psec { padding: 8px 8px 10px; }
.psec + .psec { border-top: 1px solid var(--line); }
.plabel { display: block; margin-bottom: 7px; color: var(--dim); font: 500 10.5px/1.4 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.opts { display: flex; flex-wrap: wrap; gap: 5px; }
.opt input, .srow input { position: absolute; opacity: 0; pointer-events: none; }
.opt span { display: inline-block; padding: 3px 10px; border-radius: 48px; background: var(--fill); color: var(--muted); font-size: 12px; cursor: pointer; }
.opt span:hover { color: var(--text); }
.opt input:checked + span { background: var(--accent-soft); color: var(--accent); }
.opt input:focus-visible + span, .srow input:focus-visible + span { outline: 1px solid var(--accent); }
.ptext { width: 100%; padding: 6px 10px; border: 1px solid transparent; border-radius: 7px; background: var(--fill); color: var(--text); font: 12px var(--mono); }
.ptext:focus { outline: none; border-color: var(--line); background: var(--bg); }
.pfoot { display: flex; justify-content: flex-end; padding: 6px 8px 4px; border-top: 1px solid var(--line); }
.plink { padding: 2px 4px; border: 0; background: none; color: var(--muted); font-size: 12px; }
.plink:hover { color: var(--text); background: none; border: 0; }
.popover[data-kind="sort"] { min-width: 200px; }
.srow { display: block; position: relative; cursor: pointer; }
.srow span { display: flex; justify-content: space-between; padding: 6px 10px; border-radius: 6px; color: var(--muted); }
.srow span:hover { background: var(--hover); color: var(--text); }
.srow input:checked + span { color: var(--text); }
.srow input:checked + span::after { content: "✓"; color: var(--accent); }

main { display: grid; gap: 16px; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; }
th {
  position: sticky;
  top: 0;
  padding: 8px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  color: var(--dim);
  font: 500 10.5px/1.4 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
}
td {
  max-width: 300px;
  padding: 7px 12px;
  border-top: 1px solid var(--line);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
tbody tr:first-child td { border-top: 0; }
tbody tr { cursor: pointer; }
tbody tr:hover, tbody tr:focus { background: var(--hover); outline: none; }
.empty { padding: 28px; color: var(--muted); text-align: center; }

.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  vertical-align: 1px;
  background: var(--off);
}
.dot.ok { background: var(--ok); }
.dot.warn { background: var(--warn); }
.dot.bad { background: var(--bad); }
.dot.none { display: none; }

dl { display: grid; grid-template-columns: fit-content(45%) minmax(0, 1fr); gap: 5px 16px; margin: 0; }
dt { color: var(--muted); overflow-wrap: anywhere; }
dd { margin: 0; word-break: break-all; }
dd.pre { white-space: pre-line; }

.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip {
  display: inline-flex;
  align-items: baseline;
  max-width: 100%;
  padding: 2px 9px;
  border-radius: 48px;
  background: var(--fill);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
a.chip:hover { background: var(--accent-soft); }
.chip .dot { flex: none; margin-right: 6px; }
.chip .cl { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.chip.missing { color: var(--muted); background: none; border: 1px dashed var(--line); }

/* panels and cards */
.panel { min-width: 0; margin-bottom: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.panel h3 {
  margin: 0 0 10px;
  color: var(--dim);
  font: 500 10.5px/1.4 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.card { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.card > .muted:first-child { color: var(--dim); font: 500 10.5px/1.4 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.card b { font-size: 26px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.card b.mid { font-size: 17px; letter-spacing: -0.01em; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.two .panel { margin-bottom: 0; }
.stack { display: grid; gap: 16px; align-content: start; }

/* cluster + labels */
.clu { margin-right: 6px; }
.lbl { display: inline-block; margin-right: 4px; padding: 0 7px; border-radius: 48px; background: var(--accent-soft); color: var(--accent); font: 11px/18px var(--mono); }
.lbl.big { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; line-height: 22px; }
.lx { padding: 0 2px; border: 0; background: none; color: inherit; opacity: .6; font-size: 14px; line-height: 1; }
.lx:hover { opacity: 1; background: none; border: 0; }
.labels .chips { margin-bottom: 10px; }
.lform { display: flex; gap: 6px; margin-top: 8px; }
.lform input { flex: 1; min-width: 0; padding: 6px 10px; border: 1px solid transparent; border-radius: 7px; background: var(--fill); color: var(--text); font: 12px var(--mono); }
.lform input:focus { outline: none; border-color: var(--line); background: var(--bg); }

/* resource page */
.back { display: inline-block; margin-bottom: 12px; color: var(--muted); }
.back:hover { color: var(--text); }
.rphead { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.rphead h1 { margin: 0 0 3px; font-size: 24px; font-weight: 500; letter-spacing: -0.02em; word-break: break-all; }
.rphead h1 .dot { width: 9px; height: 9px; vertical-align: 4px; }
.rphead p { margin: 0; }
.btn { flex: none; display: inline-block; }
.rg { margin-bottom: 12px; }
.rghead { margin-bottom: 5px; font-size: 12px; }
.lp { margin-top: 16px; }
.lp h4 { margin: 0 0 6px; font-size: 12px; font-weight: 600; }
.kv { width: 100%; table-layout: fixed; }
.kv td { max-width: none; padding: 4px 10px 4px 0; border-top: 1px solid var(--line); white-space: pre-wrap; word-break: break-all; vertical-align: top; cursor: default; }
.kv tbody tr:first-child td { border-top: 0; }
.kv td:first-child { width: 38%; }
.kv tr { cursor: default; }
.kv tbody tr:hover { background: none; }
pre.json {
  max-height: 480px;
  overflow: auto;
  margin: 8px 0 0;
  padding: 12px;
  border-radius: 7px;
  background: var(--bg);
  font: 11.5px/1.55 var(--mono);
  white-space: pre-wrap;
  word-break: break-all;
}
details summary { cursor: pointer; margin-top: 6px; }
details.panel summary { margin: 0; }

/* billing */
.billhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.billhead h1 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 22px; font-weight: 500; letter-spacing: -0.02em; }
.billhead h1 .mono { font-weight: 400; }
.billsync { display: flex; align-items: center; gap: 12px; }
.billgrid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(260px, 2fr); gap: 16px; }
.billgrid .panel { margin-bottom: 0; }
.billgrid .panel:first-child { overflow-x: auto; }
.billgrid + p { margin-top: 14px; }
.bt { width: 100%; }
.bt th { position: static; background: none; padding: 5px 8px; }
.bt td { max-width: none; padding: 6px 8px; border-top: 1px solid var(--line); cursor: default; }
.bt.rules td { white-space: normal; overflow-wrap: anywhere; vertical-align: top; }
.bt.rules td:first-child { white-space: nowrap; }
.bt.rules .chip { display: inline-block; overflow: visible; border-radius: 6px; white-space: normal; overflow-wrap: anywhere; }
.bt.rules .chip .cl { overflow: visible; }
.bt tbody tr:first-child td { border-top: 0; }
.bt tr { cursor: default; }
.bt tbody tr:hover { background: none; }
.bt tr:target td { background: var(--accent-soft); }
.days td { padding: 2px 8px; font-size: 12px; border-top: 0; }
.barcell { width: 100%; }
.bar { display: block; height: 6px; border-radius: 3px; background: var(--bar); min-width: 1px; }
[id^="b-"], tr[id^="svc-"] { scroll-margin-top: 68px; }

@media (max-width: 1250px) {
  .billgrid { grid-template-columns: 1fr; }
}

.tablewrap { container-type: inline-size; }
td.c-name { max-width: 280px; }
td.c-id { max-width: 170px; }
td.c-lbl { max-width: 180px; }
td.c-det { max-width: 200px; }
td.c-type { max-width: 140px; }
@container (max-width: 1580px) { .c-cpu { display: none; } }
@container (max-width: 1460px) { .c-id { display: none; } }
@container (max-width: 1290px) { .c-reg { display: none; } }
@container (max-width: 1190px) { .c-lbl { display: none; } }
@container (max-width: 1010px) { .c-det { display: none; } }
@container (max-width: 810px) { td.c-name { max-width: 200px; } }
@container (max-width: 720px) { .c-type { display: none; } }

.mhead { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.seg button { border: 0; border-radius: 0; background: transparent; color: var(--muted); padding: 4px 12px; font: 12px/1.6 var(--mono); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button:hover { color: var(--text); background: var(--hover); }
.seg button.on { color: var(--text); background: var(--fill); }
.idlenote { margin: 0 0 14px; }
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 12px; }
.chart { position: relative; padding: 12px 14px 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart p { margin: 4px 0 0; }
.chead { display: flex; align-items: baseline; gap: 12px; margin-bottom: 6px; min-height: 20px; }
.chead b { font-weight: 500; }
.chead b, .legend { white-space: nowrap; }
.readout { position: absolute; top: 36px; right: 14px; padding: 1px 6px; border-radius: 4px; background: var(--surface); font-family: var(--mono); white-space: pre; pointer-events: none; }
.readout:empty { display: none; }
.legend { display: inline-flex; gap: 10px; color: var(--muted); font: 11px var(--mono); }
.lg::before { content: ""; display: inline-block; width: 12px; height: 2px; margin: 0 5px 3px 0; vertical-align: middle; background: var(--accent); }
.lg.s1::before { background: var(--muted); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .ax { fill: var(--dim); font: 10px var(--mono); }
.mcards { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.chart path { fill: none; stroke-width: 1.5; stroke-linejoin: round; }
.chart .s0 { stroke: var(--accent); }
.chart .s1 { stroke: var(--muted); stroke-width: 1; opacity: 0.8; }
.chart .cur { stroke: var(--dim); stroke-width: 1; stroke-dasharray: 2 3; }

@media (max-width: 1000px) {
  .top { flex-wrap: wrap; height: auto; padding: 8px 20px; gap: 16px; }
  .layout { grid-template-columns: 1fr; }
  .types { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .two, .cards, .charts { grid-template-columns: 1fr; }
  .rphead { flex-direction: column; }
  .toolbar { flex-wrap: wrap; }
  input[type=search] { width: 100%; }
}

.loginfields { display: grid; gap: 12px; }
.loginfields label { display: grid; gap: 6px; }
.loginfields label span { color: var(--dim); font: 500 10.5px/1.4 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.loginfields input { width: 100%; padding: 8px 11px; border: 1px solid transparent; border-radius: 7px; background: var(--fill); color: var(--text); font: inherit; }
.loginfields input:focus { outline: none; border-color: var(--line); background: var(--bg); }
a.loginbtn { display: block; text-align: center; text-decoration: none; }
.breakglass summary { cursor: pointer; margin-bottom: 10px; }
.signout { display: flex; align-items: center; gap: 6px; }
.me { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dim); font-size: 12px; }
.tform select { appearance: none; -webkit-appearance: none; padding: 6px 30px 6px 11px; border: 1px solid transparent; border-radius: 7px; background: var(--fill) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none' stroke='%238f8f8f' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 11px center / 10px 6px; color: var(--text); font: inherit; cursor: pointer; }
.tform select:focus { background-color: var(--surface); }
.lform button { flex: none; padding: 6px 14px; border: 1px solid var(--line); background: transparent; font-weight: 500; }
.lform button:hover { background: var(--fill); border-color: var(--line); }
.tform { margin-bottom: 12px; }
.newtoken { margin-bottom: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); }
.newtoken p { margin: 0 0 4px; }
.settings .bt td { vertical-align: baseline; }
.settings .bt th:first-child, .settings .bt td:first-child { padding-left: 0; }
.settings .bt th:last-child, .settings .bt td:last-child { padding-right: 0; }
.settings .bt:not(.audit) td:last-child { text-align: right; }
.settings .bt td:last-child > .plink:last-child { margin-right: -4px; }
@media (min-width: 1001px) { .settings > .toolbar { display: none; } }
.bt.audit td { white-space: nowrap; }
.bt.audit td:nth-child(5), .bt.audit td:nth-child(6) { min-width: 200px; white-space: normal; overflow-wrap: anywhere; }
.settings .panel { overflow-x: auto; }

@media (max-width: 1000px) {
  .types, .side-off .types { display: block; position: fixed; top: 0; bottom: 0; left: 0; z-index: 30; width: 280px; max-width: 85vw; height: auto; padding-top: 18px; border-right: 1px solid var(--line); border-bottom: 0; background: var(--bg); transform: translateX(-100%); transition: transform 0.2s ease; }
  .side-open .types { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, 0.4); }
  .side-open body::after { content: ""; position: fixed; inset: 0; z-index: 25; background: rgba(0, 0, 0, 0.35); }
  .side-off #sidetoggle { color: inherit; }
  .c-det, .c-cpu { display: none; }
  .tablewrap { overflow-x: auto; }
  .bt { display: block; overflow-x: auto; }
  .settings .bt { display: table; }
}

@media (max-width: 700px) {
  html { zoom: 1; }
  .bt.rules, .bt.rules tbody, .bt.rules tr, .bt.rules td { display: block; }
  .bt.rules thead { display: none; }
  .bt.rules tr { padding: 10px 0; border-top: 1px solid var(--line); }
  .bt.rules tbody tr:first-child { border-top: 0; }
  .bt.rules td { padding: 2px 0; border: 0; }
  .bt.rules td:first-child { font-weight: 500; }
  .bt.rules td[data-k]::before { content: attr(data-k) " "; color: var(--dim); font: 12px var(--sans); }
  .top { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 8px 12px; }
  .top .brand { order: 0; }
  .top .status { order: 1; margin-left: auto; gap: 8px; }
  .top .signout { order: 2; }
  .top .theme { order: 3; }
  .top .tabs { order: 4; gap: 14px; height: 30px; overflow-x: auto; scrollbar-width: none; }
  .top .tabs.pages { order: 5; margin: 0 0 0 auto; padding-left: 0; border-left: 0; }
  .top .tabs.pages a { margin: 0; }
  .top .status > span.muted { display: none; }
  .top .status button { padding: 4px 10px; }
  .top .me { display: none; }
  .content, .wrap { padding: 12px 12px 24px; }
  .toolbar { position: static; margin: -12px -12px 10px; padding: 10px 12px; gap: 8px; }
  .toolbar { flex-wrap: wrap; }
  .toolbar > .muted { margin-left: auto; }
  #filters { flex: 1 1 calc(100% - 50px); min-width: 0; gap: 6px; }
  #filters input[type=search] { order: -1; flex: 1 1 100%; width: 100%; }
  .popover { max-width: calc(100vw - 24px); min-width: min(260px, calc(100vw - 24px)); }
  .popover[data-kind="sort"] { left: auto; right: 0; }
  .c-id, .c-lbl, .c-reg, .c-age, .c-type { display: none; }
  .c-st .st { display: none; }
  td.c-name { max-width: 44vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .res td, .res th { padding-left: 8px; padding-right: 8px; }
  .rphead h1 { font-size: 20px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .card b { font-size: 20px; }
  .lform { flex-wrap: wrap; }
  .lform input { flex: 1 1 100%; }
  .tform select, .tform button { flex: 1 1 0; }
  .seg button { padding: 4px 9px; }
  .settings .bt, .settings .bt tbody { display: block; overflow: visible; }
  .settings .bt thead { display: none; }
  .settings .bt tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .settings .bt td { padding: 0; border: 0; min-width: 0; white-space: normal; }
  .settings .bt td:first-child { flex: 1 1 100%; }
  .settings .bt.audit td:nth-child(3), .settings .bt.audit td:nth-child(7) { display: none; }
  .settings .bt.audit td:nth-child(5), .settings .bt.audit td:nth-child(6) { min-width: 0; }
  .billhead h1, .bill h1 { font-size: 20px; }
}


/* restyle 2026-11-27: quieter, fewer boxes, no shouting labels. rollback: .design-backup/2026-11-27-before-restyle/rollback.sh */
:root {
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --line-soft: color-mix(in srgb, var(--line) 60%, transparent);
}
body { letter-spacing: 0; }

.thead, th, .panel h3, .plabel, .card > .muted:first-child, .loginform label span, .loginfields label span {
  font: 500 12px/1.4 var(--sans);
  letter-spacing: 0;
  text-transform: none;
}
.thead { color: var(--dim); padding-bottom: 4px; }
th { color: var(--muted); }
.panel h3 { color: var(--muted); }
.card > .muted:first-child { color: var(--muted); }

.tabs a.on { border-bottom-color: var(--text); }
.pages { border-left: 0; padding-left: 4px; }

.status button, .billsync button {
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  font-weight: 500;
}
.status button:hover:not(:disabled), .billsync button:hover:not(:disabled) { background: var(--fill); color: var(--text); border-color: var(--line); }

.ty { padding: 4px 8px; }
.ty b { font: 400 12px var(--sans); font-variant-numeric: tabular-nums; }
.ty.on { background: var(--fill); }
.ty.on b { color: var(--muted); }
.types { border-right-color: var(--line-soft); }

.popbtn, a.exportbtn, #sidetoggle { background: transparent; border: 1px solid transparent; }
.popbtn:hover, a.exportbtn:hover, #sidetoggle:hover { background: var(--fill); border-color: transparent; }
.popbtn .n:not(:empty) { background: var(--fill); color: var(--text); font: 500 11px/16px var(--sans); }
.opt input:checked + span { background: var(--text); color: var(--bg); }

.tablewrap { border: 0; border-radius: 0; background: transparent; }
th { background: var(--bg); border-bottom: 1px solid var(--line); padding: 7px 12px; }
td { padding: 8px 12px; border-top-color: var(--line-soft); }
td.c-id, td.mono { color: var(--muted); }

.panel, .card { border-color: var(--line-soft); }
.card b { font-weight: 500; }
.lbl { background: var(--accent-soft); color: var(--accent); font: 11.5px/18px var(--sans); }
#filters input[type=search] { width: clamp(160px, 22vw, 280px); }
.toolbar { align-items: flex-start; }

.home { max-width: 1480px; margin: 0 auto; padding: 8px 28px 64px; }
.home h2 { margin: 0; color: var(--muted); font: 500 13px/1.4 var(--sans); }
.hhead { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.hhead.sub { margin: 36px 0 14px; }
.hsec { padding: 32px 0; border-top: 1px solid var(--line-soft); }

.hero { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(0, 1.5fr); grid-template-rows: auto auto; gap: 0 56px; padding: 44px 0 36px; }
.hero-num { align-self: end; }
.hk { margin: 0 0 10px; color: var(--muted); }
.big { font-size: clamp(48px, 6.4vw, 92px); font-weight: 400; line-height: 0.95; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; }
.hsub { margin: 16px 0 0; color: var(--muted); }
.hsub b { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.chg { margin-left: 8px; padding: 1px 8px; border-radius: 48px; background: var(--fill); color: var(--text); font-size: 12px; font-variant-numeric: tabular-nums; }

.spark { position: relative; align-self: end; margin: 0; }
.spark svg { display: block; width: 100%; height: 150px; overflow: visible; cursor: crosshair; }
.spark .sa { fill: var(--accent-soft); }
.spark .sl { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linejoin: round; }
.spark .sx { stroke: var(--line); stroke-width: 1; visibility: hidden; }
.spark.hot .sx { visibility: visible; }
.sbox { position: relative; }
.sdot { position: absolute; top: 0; left: 0; transform: translate(-50%, -50%); width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); opacity: 0; pointer-events: none; }
.spark.hot .sdot { opacity: 1; }
.spark figcaption { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; font-size: 12px; font-variant-numeric: tabular-nums; }
.spark figcaption { flex-wrap: wrap; }
.spark figcaption .muted { white-space: nowrap; }
.sread { white-space: pre; }
.spark svg path { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; transform-origin: 0 100%; }
@keyframes rise { from { transform: scaleY(0.02); opacity: 0; } to { transform: none; opacity: 1; } }

.facts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0; margin: 40px 0 0; border-top: 1px solid var(--line-soft); }
.facts div { flex: 1 1 140px; padding: 16px 0 0; }
.facts div + div { padding-left: 20px; border-left: 1px solid var(--line-soft); }
.facts dt { color: var(--muted); font-size: 12px; }
.facts dd { margin: 4px 0 0; font-size: 22px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

.accts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); border-top: 1px solid var(--line-soft); }
.accts a { display: grid; grid-template-columns: auto auto; justify-content: space-between; gap: 6px 16px; padding: 22px 20px 26px; border-left: 1px solid var(--line-soft); transition: background-color 0.15s ease; }
.accts a:first-child { padding-left: 0; border-left: 0; }
.accts a:hover .an1 b { color: var(--accent); }
.an1 { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.an1 b { font-size: 15px; font-weight: 500; transition: color 0.15s ease; }
.an1 .mono { color: var(--dim); font-size: 11.5px; }
.av { color: var(--muted); font-variant-numeric: tabular-nums; }
.av b { color: var(--text); font-size: 18px; font-weight: 400; letter-spacing: -0.01em; }
.ar { grid-column: 1 / -1; color: var(--dim); font-size: 12px; }

.hsplit { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0 56px; }
.attn { margin: 0; padding: 0; list-style: none; counter-reset: a; }
.attn li { display: flex; gap: 20px; align-items: baseline; padding: 16px 0; border-top: 1px solid var(--line-soft); counter-increment: a; }
.attn li:first-child { border-top: 0; padding-top: 0; }
.attn li::before { content: counter(a, decimal-leading-zero); flex: none; width: 22px; color: var(--dim); font: 12px var(--mono); }
.attn li.lv-bad::before { color: var(--bad); }
.attn li.lv-warn::before { color: var(--warn); }
.am { flex: 1; min-width: 0; }
.at { margin: 0; font-size: 14px; font-weight: 500; }
.at a .arrow { display: inline-block; margin-left: 6px; color: var(--dim); transition: transform 0.15s ease, color 0.15s ease; }
.at a:hover .arrow { transform: translateX(3px); color: var(--text); }
.an { margin: 3px 0 0; color: var(--muted); }
.am .chips { margin-top: 10px; }
.ac { flex: none; font-size: 15px; font-variant-numeric: tabular-nums; }
.ac small { color: var(--muted); font-size: 11px; }

.fresh { margin: 0; padding: 0; list-style: none; }
.fresh a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "d n g" ". t t"; align-items: baseline; gap: 0 10px; padding: 9px 10px; margin: 0 -10px; border-radius: 7px; }
.fresh a:hover { background: var(--hover); }
.fresh .dot { grid-area: d; }
.fn { grid-area: n; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ft { grid-area: t; color: var(--muted); font-size: 12px; }
.fg { grid-area: g; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }

.tbars { margin: 0; padding: 0; list-style: none; }
.tbars a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 8px 0; }
.tv { font-variant-numeric: tabular-nums; }
.tb { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: var(--fill); overflow: hidden; }
.tb i { display: block; height: 100%; border-radius: 2px; background: var(--muted); transform-origin: 0 0; animation: grow 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.tbars a:hover .tb i { background: var(--accent); }
.tbars a:hover .tn { color: var(--text); }
.tn { color: var(--muted); }
@keyframes grow { from { transform: scaleX(0); } to { transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .tb i, .spark svg path { animation: none; }
}
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 28px; }
  .hsplit { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .home { padding: 0 14px 40px; }
  .hhead { flex-wrap: wrap; }
  .facts div { flex: 1 1 40%; padding: 14px 0 0; }
  .facts div + div { padding-left: 0; border-left: 0; }
  .facts dd { font-size: 19px; }
  .accts a, .accts a:first-child { padding: 16px 0; border-left: 0; border-top: 1px solid var(--line-soft); }
  .accts a:first-child { border-top: 0; }
  .attn li { flex-wrap: wrap; gap: 4px 14px; }
  .ac { margin-left: 36px; }
}
