/* Pinscope dashboard.
 * Layout: fixed project rail on the left, one working column on the right.
 * Look: an instrument panel. Flat surfaces, hairline rules, IBM Plex Sans for
 * words and IBM Plex Mono for everything measured. Primary actions are ink on
 * paper (inverted neutral); the indigo accent is kept for links, focus,
 * selection and data. Green, amber and red only ever mean state. */

@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url(/fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url(/fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 600; font-display: swap; src: url(/fonts/ibm-plex-mono-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url(/fonts/ibm-plex-mono-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url(/fonts/ibm-plex-mono-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 600; font-display: swap; src: url(/fonts/ibm-plex-mono-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113; }

/* ---- tokens: light ---- */
:root {
  --canvas: #f6f7f8;      /* page ground */
  --rail: #fbfbfc;        /* project rail */
  --surface: #ffffff;     /* panels */
  --inset: #f3f4f6;       /* code, log pane, inputs */
  --hover: #f0f1f3;
  --line: #e4e6ea;        /* hairlines */
  --line-strong: #cdd1d7; /* control borders */
  --ink: #15181c;         /* text, primary buttons */
  --ink-2: #454b54;
  --ink-3: #6b727c;       /* secondary text */
  --paper: #ffffff;       /* text on ink */
  --accent: #4347c9;
  --accent-wash: rgba(67, 71, 201, .08);
  --good: #0f7b55;
  --good-wash: rgba(15, 123, 85, .1);
  --warn: #946200;
  --warn-wash: rgba(148, 98, 0, .1);
  --bad: #c62f2f;
  --bad-wash: rgba(198, 47, 47, .08);
  --overlay: rgba(21, 24, 28, .32);
  --lift: 0 16px 48px -12px rgba(21, 24, 28, .28);
  --sans: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --mono: "IBM Plex Mono", "Cascadia Mono", ui-monospace, Menlo, Consolas, monospace;
  --r: 8px;
  --r-s: 6px;
  color-scheme: light;
}

/* ---- tokens: dark (same list twice so the Auto and the explicit choice agree) ---- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #0c0e10;
    --rail: #0f1114;
    --surface: #131619;
    --inset: #0b0d0f;
    --hover: #1a1e22;
    --line: #22272c;
    --line-strong: #333a41;
    --ink: #eceef0;
    --ink-2: #b9c0c7;
    --ink-3: #868e97;
    --paper: #0f1114;
    --accent: #9ba0ff;
    --accent-wash: rgba(155, 160, 255, .12);
    --good: #3fcb8f;
    --good-wash: rgba(63, 203, 143, .12);
    --warn: #e0b040;
    --warn-wash: rgba(224, 176, 64, .12);
    --bad: #ff7b72;
    --bad-wash: rgba(255, 123, 114, .12);
    --overlay: rgba(0, 0, 0, .6);
    --lift: 0 20px 60px -12px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --canvas: #0c0e10;
  --rail: #0f1114;
  --surface: #131619;
  --inset: #0b0d0f;
  --hover: #1a1e22;
  --line: #22272c;
  --line-strong: #333a41;
  --ink: #eceef0;
  --ink-2: #b9c0c7;
  --ink-3: #868e97;
  --paper: #0f1114;
  --accent: #9ba0ff;
  --accent-wash: rgba(155, 160, 255, .12);
  --good: #3fcb8f;
  --good-wash: rgba(63, 203, 143, .12);
  --warn: #e0b040;
  --warn-wash: rgba(224, 176, 64, .12);
  --bad: #ff7b72;
  --bad-wash: rgba(255, 123, 114, .12);
  --overlay: rgba(0, 0, 0, .6);
  --lift: 0 20px 60px -12px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* ---- base ---- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 14px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 1.5rem; font-weight: 600; letter-spacing: -.015em; line-height: 1.25; text-wrap: balance; }
h2 { font-size: 1rem; font-weight: 600; letter-spacing: -.005em; }
h3, .label, th, dt {
  font: 500 .6875rem/1.4 var(--mono); color: var(--ink-3); text-transform: uppercase; letter-spacing: .07em;
}
b { font-weight: 600; }
code, pre, .mono { font-family: var(--mono); font-size: .9em; }
code { background: var(--inset); border: 1px solid var(--line); border-radius: 4px; padding: .05em .35em; }
.muted { color: var(--ink-3); }
.small { font-size: .8125rem; }
.spacer, .grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: .625rem; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.stack { display: grid; gap: 1rem; }
.pad { padding: 1.25rem 1.375rem; }
.pad > h2 + p { margin: .25rem 0 1rem; max-width: 65ch; }

/* ---- layout ---- */
.app { display: grid; grid-template-columns: 15rem minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: .25rem;
  padding: 1rem .75rem; background: var(--rail); border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 600; font-size: 1rem; letter-spacing: -.01em; color: var(--ink); padding: .125rem .5rem 1rem; }
.brand:hover { text-decoration: none; }
.brand.big { font-size: 1.375rem; padding: 0; }
.mark-body { fill: none; stroke: var(--ink); stroke-width: 2.2; }
.mark-pin { stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.mark-trace { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.side .label { padding: .5rem .5rem .25rem; }
.side nav { display: grid; gap: 1px; }
.side nav a {
  display: flex; align-items: center; gap: .5rem; padding: .4rem .5rem; border-radius: var(--r-s); color: var(--ink-2); font-weight: 500;
  border-left: 2px solid transparent;
}
.side nav a:hover { background: var(--hover); color: var(--ink); text-decoration: none; }
.side nav a.active { background: var(--hover); color: var(--ink); border-left-color: var(--accent); }
.side nav .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side nav .count { font: 500 .6875rem var(--mono); color: var(--ink-3); }
.side nav .count.on { color: var(--good); }
.side .add { justify-content: flex-start; margin-top: .25rem; color: var(--ink-3); padding-left: .5rem; }
.themes { display: grid; grid-template-columns: repeat(3, 1fr); padding: 2px; gap: 2px; border-radius: var(--r-s); background: var(--inset); border: 1px solid var(--line); }
.themes button { border: 0; background: transparent; padding: .2rem 0; font-size: .75rem; font-weight: 500; color: var(--ink-3); border-radius: 4px; }
.themes button:hover { color: var(--ink); }
.themes button.active { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line-strong); }
.account { display: flex; align-items: center; gap: .5rem; padding: .625rem .25rem 0 .5rem; margin-top: .5rem; border-top: 1px solid var(--line); }
.account .email { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8125rem; color: var(--ink-3); }
main { padding: 1.25rem clamp(1rem, 3vw, 2.5rem) 4rem; display: grid; gap: 1.125rem; align-content: start; max-width: 80rem; width: 100%; }
.crumbs { display: flex; gap: .5rem; font-size: .8125rem; color: var(--ink-3); }
.crumbs .sep { opacity: .5; }
.pagehead { display: flex; align-items: baseline; gap: .875rem; flex-wrap: wrap; }

/* ---- surfaces ---- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.empty { padding: 2.25rem 1.375rem; text-align: center; color: var(--ink-3); }
p.empty { padding: 1.125rem 0; text-align: left; }
.callout {
  display: block; margin-top: 1rem; padding: .875rem 1rem; border-radius: var(--r-s); color: var(--ink);
  background: var(--accent-wash); border-left: 3px solid var(--accent);
}
.callout.bad { margin: 0; background: var(--bad-wash); border-left-color: var(--bad); }
.callout:hover { text-decoration: none; }
.callout .code { margin-top: .625rem; }
.line { display: flex; align-items: center; gap: .75rem; padding: .75rem 0; border-top: 1px solid var(--line); }
.line:first-of-type { margin-top: .625rem; }
.dangerzone h2 { color: var(--bad); }

/* ---- controls ---- */
button, .button, select, input { font: inherit; color: var(--ink); border-radius: var(--r-s); border: 1px solid var(--line-strong); background: var(--surface); }
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: .375rem; cursor: pointer;
  height: 2rem; padding: 0 .75rem; font-size: .8125rem; font-weight: 500; white-space: nowrap;
}
button:hover, .button:hover { background: var(--hover); text-decoration: none; }
.primary { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.primary:hover { background: var(--ink-2); border-color: var(--ink-2); }
.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.ghost:hover { background: var(--hover); color: var(--ink); }
.danger { color: var(--bad); }
.danger.solid { background: var(--bad); border-color: var(--bad); color: var(--paper); }
.danger.solid:hover { background: var(--bad); filter: brightness(1.1); }
button.small, .button.small { height: 1.625rem; padding: 0 .5rem; font-size: .75rem; }
.wide { width: 100%; height: 2.375rem; }
.disabled, button:disabled { opacity: .4; pointer-events: none; }
input, select { height: 2rem; padding: 0 .625rem; min-width: 0; background: var(--surface); }
input::placeholder { color: var(--ink-3); }
input:hover, select:hover { border-color: var(--ink-3); }
:is(input, select, button, a, .device):focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.switch { cursor: pointer; }
.switch input { appearance: none; width: 2.25rem; height: 1.25rem; padding: 0; border-radius: 99px; position: relative; cursor: pointer; flex: none; background: var(--line-strong); border: 0; }
.switch input::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: calc(1.25rem - 4px); height: calc(1.25rem - 4px);
  border-radius: 50%; background: var(--surface); transition: transform .15s;
}
.switch input:checked { background: var(--good); }
.switch input:checked::after { transform: translateX(1rem); }

.tabs { display: flex; gap: 1.25rem; border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs a {
  display: flex; align-items: center; gap: .4rem; padding: .5rem 0 .625rem; color: var(--ink-3); font-weight: 500;
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.active { color: var(--ink); border-bottom-color: var(--ink); }
.badge { font: 500 .6875rem var(--mono); padding: 0 .375rem; border-radius: 99px; background: var(--inset); border: 1px solid var(--line); color: var(--ink-3); }

.dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--line-strong); flex: none; }
.dot.on { background: var(--good); box-shadow: 0 0 0 3px var(--good-wash); }
.pill {
  display: inline-flex; align-items: center; gap: .45rem; height: 1.5rem; padding: 0 .625rem; border-radius: 99px;
  font-size: .75rem; font-weight: 500; background: var(--inset); border: 1px solid var(--line); color: var(--ink-3);
}
.pill.on { color: var(--good); background: var(--good-wash); border-color: transparent; }
.pill.on .dot { box-shadow: none; }
.chip { display: inline-block; padding: .0625rem .4375rem; border-radius: 4px; font: 500 .6875rem/1.5 var(--mono); background: var(--inset); border: 1px solid var(--line); color: var(--ink-3); white-space: nowrap; }
.chip.warn { color: var(--warn); background: var(--warn-wash); border-color: transparent; }
.chip.bad { color: var(--bad); background: var(--bad-wash); border-color: transparent; }

.code { position: relative; }
.code pre {
  margin: 0; padding: .75rem 4.25rem .75rem .875rem; border-radius: var(--r-s); background: var(--inset); border: 1px solid var(--line);
  overflow-x: auto; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .8125rem;
}
.code button { position: absolute; top: .375rem; right: .375rem; }

/* ---- sign in ---- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 23rem); gap: clamp(2rem, 7vw, 6.5rem); align-items: center; max-width: 66rem; margin: 0 auto; padding: 2rem; }
.pitch { display: grid; gap: 1.5rem; justify-items: start; }
.pitch h1 { font-size: clamp(2rem, 4.2vw, 3rem); font-weight: 600; line-height: 1.08; letter-spacing: -.03em; }
.pitch ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .5rem; color: var(--ink-3); font-size: 1rem; }
.pitch li b { color: var(--ink); }
.sample { margin: 0; width: 100%; padding: 1rem 1.125rem; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); font-size: .8125rem; line-height: 1.7; overflow-x: auto; }
.sample .c { color: var(--ink-3); }
.sample .ok { color: var(--good); }
.pitch .themes { width: 11rem; }
.authbox { padding: 1.5rem; display: grid; gap: .75rem; }
.authbox input { width: 100%; height: 2.375rem; }
.error { color: var(--bad); font-size: .8125rem; min-height: 1.3em; }
.error:empty, .note:empty { display: none; }
.note { color: var(--good); font-size: .8125rem; }
.meter { display: grid; gap: .125rem; padding: .625rem 0; border-top: 1px solid var(--line); }
.narrow { max-width: 28rem; }
.chip.good { color: var(--good); background: var(--good-wash); border-color: transparent; }
.callout.warn { margin: 0; background: var(--warn-wash); border-left-color: var(--warn); }
.callout.good { background: var(--good-wash); border-left-color: var(--good); }
form .callout { margin-top: .75rem; }
.callout > div + div { margin-top: .25rem; }
a.email:hover { color: var(--ink); }

/* ---- project ---- */
.devices { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.device {
  display: grid; grid-template-columns: auto minmax(9rem, 2fr) minmax(0, 1.2fr) minmax(0, 1.5fr) minmax(0, 1fr) auto;
  align-items: center; gap: 1rem; padding: .75rem 1rem; cursor: pointer; border-top: 1px solid var(--line);
}
.device:first-child { border-top: 0; }
.device:hover { background: var(--hover); }
.device .name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device .sub { color: var(--ink-3); font-size: .75rem; }
.device .meta { color: var(--ink-3); font-size: .8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 1.25rem; max-width: 46rem; }
.steps li { counter-increment: step; position: relative; padding-left: 2.25rem; display: grid; gap: .375rem; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 1.375rem; height: 1.375rem; border-radius: 50%;
  display: grid; place-items: center; font: 500 .6875rem var(--mono); color: var(--ink-2); border: 1px solid var(--line-strong);
}
.steps h3 { font: 600 .875rem var(--sans); text-transform: none; letter-spacing: 0; color: var(--ink); }
.ruleform { padding: .625rem; border-radius: var(--r-s); background: var(--inset); border: 1px solid var(--line); }
.ruleform .verb { font: 600 .75rem var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--bad); padding: 0 .375rem; }
.audiences { margin: .875rem 0 0; padding-left: 1.1rem; display: grid; gap: .25rem; }
.audiences b { color: var(--ink); }

/* ---- device ---- */
.hero { padding: 1.25rem 1.375rem; }
.hero .address { display: flex; align-items: center; gap: .375rem; margin-top: .375rem; flex-wrap: wrap; }
.hero .address a { font-size: .8125rem; color: var(--ink-2); overflow-wrap: anywhere; }
.tiles {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
}
.tile { padding: .875rem 1rem .75rem; display: grid; gap: .125rem; align-content: start; min-height: 6.25rem; box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); }
.tile .num { font: 500 1.625rem/1.15 var(--mono); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.tile .unit { margin-left: .3rem; color: var(--ink-3); font: 400 .75rem var(--mono); }
.tile.warn .num { color: var(--warn); }
.sparkbox { height: 1.75rem; margin-top: .375rem; }
.spark { width: 100%; height: 100%; display: block; }
.spark .line, .chart .line { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark .area, .chart .area { fill: var(--accent); opacity: .09; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 1rem 1.5rem; margin: 1rem 0 0; }
.facts dd { margin: .125rem 0 0; overflow-wrap: anywhere; }

.charts { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: .875rem; }
.chart { padding: .875rem 1rem .5rem; }
.chart .head { display: flex; align-items: baseline; gap: .5rem; }
.chart .name { font: 500 .75rem var(--mono); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart .when { margin-left: auto; font: 400 .6875rem var(--mono); color: var(--ink-3); white-space: nowrap; }
.chart .value { display: block; font: 500 1.25rem/1.35 var(--mono); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.chart svg { display: block; width: 100%; height: auto; margin-top: .25rem; touch-action: none; }
.chart .gridline { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--ink-3); font: 10px var(--mono); }
.chart .cursor { stroke: var(--ink-3); stroke-width: 1; }
.chart .point { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .625rem 1rem; border-bottom: 1px solid var(--line); }
th { background: var(--inset); }
th, td.num, td.mono { white-space: nowrap; }
td.num, th.num { text-align: right; }
td.num { font: 400 .8125rem var(--mono); font-variant-numeric: tabular-nums; }
td.empty { text-align: center; }
td.barcell { width: 22%; min-width: 5rem; padding-left: 0; }
.bar { display: block; height: .25rem; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--accent); }
.bar.wide { margin-top: .625rem; height: .375rem; background: var(--line-strong); }
.chip.elf { color: var(--accent); background: var(--accent-wash); border-color: transparent; }
.card:has(> table) { overflow-x: auto; }

.logs { overflow: hidden; }
.toolbar { display: flex; align-items: center; gap: .5rem; padding: .625rem .75rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.toolbar .group { display: flex; gap: .375rem; }
.seg { border-radius: 99px; padding: 0 .75rem; }
.seg .dot { background: var(--line-strong); box-shadow: none; }
.seg.active { color: var(--good); background: var(--good-wash); border-color: transparent; }
.seg.active .dot { background: var(--good); }
.logpane { height: min(66vh, 46rem); min-height: 20rem; overflow: auto; background: var(--inset); padding: .375rem 0; font: 400 .78125rem/1.6 var(--mono); }
.loglist > div { padding: 0 .875rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.ln:hover { background: var(--hover); }
.ln time { color: var(--ink-3); margin-right: .875rem; user-select: none; }
.ln.E { color: var(--bad); }
.ln.W { color: var(--warn); }
.ln.D, .ln.V { color: var(--ink-3); }
.logedge { display: flex; justify-content: center; padding: .375rem; font-family: var(--sans); }
.logs footer { padding: .5rem .875rem; border-top: 1px solid var(--line); min-height: 2.125rem; }
.crash h3 { margin: 1rem 0 .375rem; }
.crash p { margin-top: .375rem; }

/* ---- overlays ---- */
.modal { border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--ink); padding: 0; width: min(27rem, calc(100vw - 2rem)); box-shadow: var(--lift); }
.modal::backdrop { background: var(--overlay); }
.modal form { display: grid; gap: .875rem; padding: 1.375rem; }
.modal input { width: 100%; height: 2.25rem; }
.toasts { position: fixed; right: 1.125rem; bottom: 1.125rem; display: grid; gap: .5rem; z-index: 50; }
.toast { padding: .5rem .875rem; border-radius: var(--r-s); background: var(--ink); color: var(--paper); box-shadow: var(--lift); font-size: .8125rem; font-weight: 500; }
.toast.bad { background: var(--bad); }

@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); padding: .625rem .75rem; }
  .side .brand { padding: 0 .375rem; }
  .side .label, .side .spacer { display: none; }
  .side nav { display: flex; flex-wrap: wrap; }
  .side .add { margin: 0; }
  .themes { width: 9.5rem; margin-left: auto; }
  .account { border: 0; padding: 0; margin: 0; }
  .account .email { display: none; }
  .hide-narrow { display: none !important; }
  .device { grid-template-columns: auto minmax(0, 1fr) auto; }
  .device .meta { grid-column: 2; }
  .device .button { grid-row: 1; grid-column: 3; }
  .auth { grid-template-columns: 1fr; padding: 1.25rem; }
  th, td { padding: .5rem .75rem; }
}
