[hidden] { display: none !important; }
:root {
  color-scheme: dark;
  --void: #07090c;
  --panel: #0c1016;
  --panel-2: #111720;
  --line: #1f2833;
  --line-2: #2b3644;
  --ink: #d9e1ea;
  --ink-2: #8a97a6;
  --ink-3: #56626f;
  --hub: #f2b84b;
  --c-one: #a48cf7;
  --c-scams: #f27b6e;
  --c-dark: #3fd0b6;
  --c-scan: #64a8f5;
  --c-8cc: #e3c26b;
  --c-resume: #d987c9;
  --c-vc: #9bd36a;
  --c-personal: #7fd99a;
  --c-dormant: #6d7a8a;
  --ok: #3fd0a0;
  --warn: #f2b84b;
  --crit: #f2685e;
  --display: "Chakra Petch", "Bahnschrift", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { background: var(--void); color: var(--ink); }
body {
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.5;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  margin: 0;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--void); }
.app { max-width: 440px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }

.sample {
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3);
  display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap;
}
.sample b { color: var(--hub); font-weight: 600; }

header.top { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; }
.brand {
  background: var(--hub); color: #1a1205; font-family: var(--display); font-weight: 700;
  padding: 8px 12px; border-radius: 3px; line-height: 1.05;
}
.brand span { display: block; font-size: 18px; letter-spacing: .02em; }
.brand small { font-family: var(--mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; opacity: .75; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.kpi { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kpi .k { font-size: 8.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .v { font-family: var(--display); font-weight: 600; font-size: 22px; line-height: 1; font-variant-numeric: tabular-nums; }

.panel {
  position: relative; background: var(--panel); border: 1px solid var(--line);
  border-radius: 4px; padding: 10px;
}
.panel::before, .panel::after {
  content: ""; position: absolute; width: 10px; height: 10px; pointer-events: none;
  border-color: var(--pc, var(--line-2)); border-style: solid;
}
.panel::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; border-top-left-radius: 4px; }
.panel::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; border-bottom-right-radius: 4px; }
.ph {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2);
}
.ph .tag {
  background: var(--pc, var(--line-2)); color: #0a0c10; font-weight: 600;
  padding: 1px 6px; border-radius: 2px; letter-spacing: .06em;
}
.ph .right { margin-left: auto; color: var(--ink-3); }

.graph-wrap { position: relative; height: 340px; margin: -2px; }
canvas#graph { width: 100%; height: 100%; display: block; cursor: pointer; touch-action: manipulation; }
.legend {
  margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px 14px; font-size: 10.5px;
}
.legend span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend div { display: grid; grid-template-columns: 8px 1fr auto; gap: 6px; align-items: center; }
.legend i { width: 7px; height: 7px; border-radius: 50%; display: block; }
.legend b { font-weight: 500; color: var(--ink-3); font-variant-numeric: tabular-nums; text-align: right; }
.graph-hint { position: absolute; right: 8px; bottom: 6px; font-size: 9.5px; color: var(--ink-3); letter-spacing: .08em; pointer-events: none; }

.list { display: flex; flex-direction: column; gap: 4px; }
.row {
  display: grid; grid-template-columns: 8px 1fr auto; gap: 8px; align-items: center;
  padding: 7px 8px; border: 1px solid var(--line); border-radius: 3px; background: var(--panel-2);
  color: inherit; font: inherit; text-align: left; width: 100%;
}
button.row { cursor: pointer; }
button.row:hover { border-color: var(--line-2); }
button.row:focus-visible, .close:focus-visible { outline: 2px solid var(--hub); outline-offset: 2px; }
.row .dot { width: 8px; height: 8px; border-radius: 50%; }
.row .main { min-width: 0; }
.row .name { color: var(--ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .sub { color: var(--ink-3); font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chips { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.chip {
  font-size: 9.5px; padding: 1px 6px; border-radius: 2px; letter-spacing: .04em;
  border: 1px solid currentColor; white-space: nowrap; font-weight: 500;
}
.chip.active { color: var(--ok); }
.chip.warm { color: var(--warn); }
.chip.stale { color: var(--ink-3); }
.chip.dirty { color: var(--crit); }
.chip.norepo { color: var(--c-scan); }

.att { display: grid; grid-template-columns: 3px 1fr; gap: 8px; padding: 6px 0; border-top: 1px dashed var(--line); }
.att:first-child { border-top: 0; padding-top: 0; }
.att .bar { border-radius: 2px; }
.att .t { color: var(--ink); }
.att .d { color: var(--ink-3); font-size: 10.5px; }

.check { display: grid; grid-template-columns: 14px 1fr; gap: 8px; padding: 5px 0; align-items: start; }
.check .box { width: 12px; height: 12px; border: 1px solid var(--line-2); border-radius: 2px; margin-top: 3px; }
.check .t { color: var(--ink); }
.check .d { color: var(--ink-3); font-size: 10.5px; }
.example-note { font-size: 10px; color: var(--ink-3); margin-top: 4px; font-style: italic; }

.pr { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: baseline; padding: 5px 0; border-top: 1px dashed var(--line); }
.pr:first-child { border-top: 0; }
.pr .num { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.pr .title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr .age { font-variant-numeric: tabular-nums; font-size: 10.5px; }

.spark { display: flex; align-items: flex-end; gap: 2px; height: 34px; }
.spark span { flex: 1; background: var(--hub); opacity: .75; border-radius: 1px 1px 0 0; min-height: 2px; }

.ticker {
  overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 6px 0; white-space: nowrap; font-size: 10.5px; color: var(--hub);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker .track { display: inline-block; padding-left: 100%; animation: tick 70s linear infinite; }
.ticker .track span { margin-right: 28px; }
.ticker .track span b { color: var(--ink); font-weight: 500; }
@keyframes tick { to { transform: translateX(-100%); } }

.sheet-bg {
  position: fixed; inset: 0; background: rgba(3,4,6,.7); z-index: 20;
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  width: 100%; max-width: 440px; max-height: 82vh; overflow: auto;
  background: var(--panel); border: 1px solid var(--line-2); border-bottom: 0;
  border-radius: 8px 8px 0 0; padding: 14px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  border-top: 3px solid var(--pc, var(--hub));
}
.sheet h2 { font-family: var(--display); font-weight: 600; font-size: 22px; margin: 0; text-wrap: balance; }
.sheet .meta { color: var(--ink-3); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; }
.sheet dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 10px 0; }
.sheet dt { color: var(--ink-3); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; padding-top: 2px; }
.sheet dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.sheet h3 { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); margin: 14px 0 6px; font-weight: 500; }
.sheet ul { margin: 0; padding-left: 16px; display: grid; gap: 3px; }
.sheet .head { display: flex; align-items: flex-start; gap: 10px; }
.close {
  margin-left: auto; background: transparent; color: var(--ink-2); border: 1px solid var(--line-2);
  border-radius: 3px; font: inherit; padding: 3px 9px; cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  .ticker .track { animation: none; padding-left: 0; }
}
@media (max-width: 380px) {
  header.top { grid-template-columns: 1fr; }
  .graph-wrap { height: 300px; }
}

/* ---------- App additions ---------- */
.view { display: flex; flex-direction: column; gap: 12px; }
a { color: var(--hub); }
.slink { color: var(--ink-2); text-decoration: none; border: 1px solid var(--line-2); border-radius: 2px; padding: 0 6px; }
.slink:focus-visible, .bnav a:focus-visible, .btn:focus-visible, .more:focus-visible, .back:focus-visible { outline: 2px solid var(--hub); outline-offset: 2px; }
.banner {
  font-size: 10.5px; color: var(--warn); border: 1px solid rgba(242,184,75,.35); background: rgba(242,184,75,.06);
  border-radius: 3px; padding: 6px 8px;
}
.banner.crit { color: var(--crit); border-color: rgba(242,104,94,.4); background: rgba(242,104,94,.07); }
.banner a { color: inherit; }
header.top.solo { grid-template-columns: auto; }

.lead { margin: 0 0 8px; color: var(--ink); }
.steps { margin: 0 0 12px; padding-left: 18px; display: grid; gap: 6px; color: var(--ink-2); }
.steps b { color: var(--ink); font-weight: 500; }
code { font-family: var(--mono); background: var(--panel-2); border: 1px solid var(--line); border-radius: 2px; padding: 0 4px; font-size: .95em; color: var(--ink); }
.lbl { display: block; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
input[type=password], input[type=text] {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--void);
  border: 1px solid var(--line-2); border-radius: 3px; padding: 9px 10px;
}
input:focus { outline: 2px solid var(--hub); outline-offset: 1px; }
.btn {
  margin-top: 10px; font: inherit; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  background: var(--hub); color: #1a1205; border: 0; border-radius: 3px; padding: 9px 16px; cursor: pointer; min-height: 40px;
}
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-2); }
.btn.danger { background: transparent; color: var(--crit); border: 1px solid var(--crit); }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.err { margin-top: 8px; color: var(--crit); font-size: 11px; }
.fine { font-size: 10.5px; color: var(--ink-3); margin: 10px 0 0; }
.empty { color: var(--ink-3); font-size: 11px; }
.more {
  margin-top: 6px; background: transparent; border: 1px dashed var(--line-2); color: var(--ink-2);
  font: inherit; font-size: 10.5px; border-radius: 3px; padding: 5px 8px; width: 100%; cursor: pointer;
}
button.att { width: 100%; background: transparent; border: 0; border-top: 1px dashed var(--line); color: inherit; font: inherit; text-align: left; cursor: pointer; }
button.att:first-child { border-top: 0; }
.check .who { color: var(--hub); }

/* bottom nav */
.bnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: rgba(7,9,12,.96); border-top: 1px solid var(--line);
  padding: 0 max(8px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(8px, env(safe-area-inset-left, 0px));
}
.bnav a {
  display: flex; align-items: center; justify-content: center; min-height: 52px;
  color: var(--ink-3); text-decoration: none; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  border-top: 2px solid transparent; margin-top: -1px;
}
.bnav a[aria-current="page"] { color: var(--hub); border-top-color: var(--hub); }

/* pages */
.pagehead { display: flex; align-items: center; gap: 10px; }
.back {
  background: transparent; color: var(--ink-2); border: 1px solid var(--line-2); border-radius: 3px;
  font: inherit; padding: 4px 10px; text-decoration: none; min-height: 32px; display: inline-flex; align-items: center;
}
.pagehead h1 { font-family: var(--display); font-weight: 600; font-size: 22px; margin: 0; line-height: 1.15; overflow-wrap: anywhere; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; }
.facts dt { color: var(--ink-3); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; padding-top: 2px; }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.md { overflow-wrap: anywhere; font-size: 12.5px; }
.md h1, .md h2, .md h3, .md h4, .md h5, .md h6 { font-family: var(--display); font-weight: 600; margin: 16px 0 6px; line-height: 1.2; }
.md h1 { font-size: 21px; } .md h2 { font-size: 16px; color: var(--hub); } .md h3 { font-size: 14px; } .md h4, .md h5, .md h6 { font-size: 13px; color: var(--ink-2); }
.md > :first-child { margin-top: 0; }
.md p { margin: 0 0 8px; }
.md ul, .md ol { margin: 0 0 8px; padding-left: 18px; display: grid; gap: 3px; }
.md strong { color: var(--ink); font-weight: 600; }
.md a { color: var(--hub); text-underline-offset: 2px; }
.md .scanner { border-top: 1px dashed var(--line-2); margin-top: 12px; padding-top: 8px; color: var(--ink-2); font-size: 11.5px; }
.md .scanner::before { content: "Scanner"; display: block; font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.loading { color: var(--ink-3); font-size: 11px; }
.sheet .btn { width: 100%; text-align: center; text-decoration: none; display: block; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
#page { display: flex; flex-direction: column; gap: 12px; }
.sample { flex-wrap: nowrap; align-items: center; }
.sample #asof { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sample .slink { flex-shrink: 0; }
