/* The hosted surface: one palette, one type system, one sheet, for every page behind the sign-in.
   Written 2026-09-17 by the hosted-surface lane.

   THE LAW THIS FILE OBEYS (docs/DESIGN-STANDARD.md, plus his 2026-09-17 rulings):
     · GitHub Dark canvas is the ground; accents are brighter.
     · NO yellow, amber or orange anywhere. His words, 2026-09-17: grey, muted violet or blue,
       and red for bands. There is no gold token in this file and adding one is a defect.
     · Every colour is a token on :root. A hex outside this block is a defect.
     · IBM Plex Sans / Mono, embedded as data URIs in fonts.css. Never a CDN, never the system stack.
     · Title Case on every label; running prose stays sentence case.
     · No em dashes.
     · Contrast floor 4.5:1 on every text tier. --faint is the darkest legal TEXT tier;
       --dim is decoration only and never carries a word anybody has to read. */

:root{
  /* ground */
  --deep:#010409; --canvas:#0d1117; --surface:#161b22; --raised:#21262d; --lift:#2a313c;
  /* lines */
  --line:#21262d; --line2:#30363d; --line3:#3d444d;
  /* text ramp */
  --txt:#e6edf3; --muted:#9ea7b3; --faint:#8b949e; --dim:#5b636d;
  /* accents: blue is primary, violet secondary, green is pass, red is fail */
  --blue:#58a6ff; --blue-hi:#79b8ff; --blue-soft:rgba(88,166,255,.13); --blue-line:rgba(88,166,255,.35);
  --blue-fill:rgba(88,166,255,.22); --blue-wash:rgba(88,166,255,.05);
  --violet:#bc8cff; --violet-soft:rgba(188,140,255,.13); --violet-line:rgba(188,140,255,.35);
  --green:#3fb950; --green-soft:rgba(63,185,80,.13); --green-line:rgba(63,185,80,.4);
  --red:#f85149; --red-soft:rgba(248,81,73,.13); --red-line:rgba(248,81,73,.38);
  /* ⛔ EVERY colour is declared here and nowhere else, shadows and washes included. A literal
     rgba() further down the file is the same defect as a literal hex: it cannot follow a theme,
     and the checker that hunts for "#" alone never sees it, because a browser serialises a hex
     into rgb() before any script can read it back. Measured 2026-09-17: the first version of this
     file carried fourteen such literals under a check that read clean. */
  --shadow-1:rgba(1,4,9,.55); --shadow-2:rgba(1,4,9,.65); --shadow-3:rgba(1,4,9,.8);
  --veil:rgba(1,4,9,.86); --dots:rgba(158,167,179,.13); --gridv:rgba(48,54,61,.45);
  --surface-veil:rgba(22,27,34,.55);
  /* shape */
  --r-sm:6px; --r-md:10px; --r-lg:14px; --maxw:1120px;
  --sans:"IBM Plex Sans",-apple-system,"Segoe UI",Helvetica,Arial,sans-serif;
  --mono:"IBM Plex Mono",ui-monospace,"SF Mono",Menlo,Consolas,monospace;
}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--canvas);color:var(--txt);
  font:15px/1.55 var(--sans);font-feature-settings:"ss01";
  -webkit-font-smoothing:antialiased}
a{color:var(--blue);text-decoration:none}
a:hover{text-decoration:underline}
h1,h2,h3{font-weight:600;letter-spacing:-.01em;margin:0}
code,kbd,.mono{font-family:var(--mono);font-variant-numeric:tabular-nums}
kbd{background:var(--raised);border:1px solid var(--line2);border-bottom-width:2px;
  border-radius:4px;padding:1px 5px;font-size:12px;color:var(--txt)}

/* ── the top bar: the same on every page, so he always knows where he is and how to get back ── */
.topbar{position:sticky;top:0;z-index:40;display:flex;align-items:center;gap:18px;
  height:52px;padding:0 20px;background:var(--deep);border-bottom:1px solid var(--line2)}
.topbar .brand{display:flex;align-items:center;gap:9px;font-weight:600;font-size:14px;color:var(--txt)}
.topbar .brand .dot{width:9px;height:9px;border-radius:50%;
  background:linear-gradient(135deg,var(--blue),var(--violet))}
.topbar nav{display:flex;gap:2px;margin-left:6px}
.topbar nav a{padding:6px 11px;border-radius:var(--r-sm);color:var(--muted);font-size:13.5px;font-weight:500}
.topbar nav a:hover{background:var(--surface);color:var(--txt);text-decoration:none}
.topbar nav a.here{background:var(--blue-soft);color:var(--blue-hi)}
.topbar .spacer{flex:1}

/* ── the live chip: one place that says whether his Mac is answering ── */
.live{display:inline-flex;align-items:center;gap:7px;padding:4px 10px;border-radius:999px;
  border:1px solid var(--line2);background:var(--surface);
  font:500 12px/1 var(--sans);color:var(--muted);white-space:nowrap}
.live .led{width:7px;height:7px;border-radius:50%;background:var(--dim);flex:none}
.live.on{border-color:var(--green-line);color:var(--txt)}
.live.on .led{background:var(--green);box-shadow:0 0 0 3px var(--green-soft)}
.live.off{border-color:var(--red-line);color:var(--txt)}
.live.off .led{background:var(--red);box-shadow:0 0 0 3px var(--red-soft)}
.live .mono{font-size:11.5px;color:var(--faint)}

/* ── page frame ── */
main{max-width:var(--maxw);margin:0 auto;padding:36px 20px 72px}
main.wide{max-width:1560px}
.eyebrow{font:600 11.5px/1 var(--sans);letter-spacing:.09em;text-transform:uppercase;color:var(--faint)}
.lede{color:var(--muted);margin:8px 0 0;max-width:62ch}
.sect{margin-top:34px}
.sect > h2{font-size:15px;margin-bottom:12px}

/* ── cards ── */
/* 360 so four doors land two by two rather than three and a straggler */
.cards{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(360px,1fr))}
.card{display:block;position:relative;background:var(--surface);border:1px solid var(--line2);
  border-radius:var(--r-md);padding:16px 17px;color:var(--txt);
  transition:border-color .12s ease,background .12s ease,transform .12s ease}
a.card:hover{border-color:var(--blue-line);background:var(--raised);text-decoration:none;transform:translateY(-1px)}
.card h3{font-size:15px;display:flex;align-items:center;gap:8px}
.card p{margin:6px 0 0;color:var(--muted);font-size:13.5px;line-height:1.5}
.card .meta{margin-top:12px;display:flex;flex-wrap:wrap;gap:6px}
.card.off{opacity:.62}

.tag{display:inline-block;padding:2px 8px;border-radius:999px;font:500 11.5px/1.5 var(--mono);
  border:1px solid var(--line2);background:var(--raised);color:var(--faint)}
.tag.blue{border-color:var(--blue-line);background:var(--blue-soft);color:var(--blue-hi)}
.tag.violet{border-color:var(--violet-line);background:var(--violet-soft);color:var(--violet)}
.tag.green{border-color:var(--green-line);background:var(--green-soft);color:var(--green)}
.tag.red{border-color:var(--red-line);background:var(--red-soft);color:var(--red)}

/* ── buttons: quiet accent ring, fill on hover, one accent (the FPW language) ── */
.btn{display:inline-flex;align-items:center;gap:7px;padding:6px 12px;border-radius:var(--r-sm);
  border:1px solid var(--line2);background:var(--raised);color:var(--txt);
  font:500 13px/1.4 var(--sans);cursor:pointer;transition:all .12s ease}
.btn:hover{border-color:var(--blue-line);background:var(--blue-soft);color:var(--blue-hi);text-decoration:none}
.btn:active{transform:translateY(1px)}
.btn[disabled]{opacity:.45;cursor:not-allowed}
.btn[disabled]:hover{border-color:var(--line2);background:var(--raised);color:var(--txt)}
.btn.primary{border-color:var(--blue-line);background:var(--blue-soft);color:var(--blue-hi)}
.btn.primary:hover{background:var(--blue-fill)}
.btn.sm{padding:3px 9px;font-size:12px}

/* ── the plain-words banner: what is wrong and what to do, never jargon ── */
.tell{border:1px solid var(--line2);background:var(--surface);border-radius:var(--r-md);
  padding:14px 16px;margin:0 0 18px;color:var(--muted);font-size:13.5px;line-height:1.6}
.tell b{color:var(--txt);font-weight:600}
.tell.warn{border-color:var(--red-line);background:var(--red-soft)}
.tell pre{margin:9px 0 0;padding:9px 11px;background:var(--deep);border:1px solid var(--line2);
  border-radius:var(--r-sm);overflow-x:auto;font:12.5px/1.6 var(--mono);color:var(--txt);
  -webkit-user-select:all;user-select:all}
.tell .why{display:block;margin-top:8px;color:var(--faint);font-size:12.5px}

/* ── THE SHEET (docs/DESIGN-STANDARD.md, the reference) ────────────────────────────────────
   Sticky header, sticky row numbers, windowed rows, type badge per column, monospace
   right-aligned numbers, click to sort, drag to select, Cmd/Ctrl+C copies the underlying
   rows as TSV. Truncation says so with the count. */
.sheetwrap{border:1px solid var(--line2);border-radius:var(--r-md);background:var(--canvas);overflow:hidden}
.sheetbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:9px 12px;
  background:var(--surface);border-bottom:1px solid var(--line2);font-size:12.5px;color:var(--muted)}
.sheetbar .grow{flex:1}
.sheetscroll{overflow:auto;position:relative;background:var(--canvas)}
table.sheet{border-collapse:separate;border-spacing:0;font-size:12.5px;width:max-content;min-width:100%}
/* ROW HEIGHT IS A SHARED CONSTANT: 24px of content plus a 1px rule is the 25 that
   console.js's ROWH assumes. Change one and the probe's row-height check goes red. */
table.sheet th,table.sheet td{border-right:1px solid var(--gridv);
  border-bottom:1px solid var(--line);padding:0 9px;height:24px;line-height:24px;
  text-align:left;white-space:nowrap;max-width:420px;overflow:hidden;text-overflow:ellipsis}
table.sheet thead th{height:auto;line-height:1.35;padding:4px 9px}
table.sheet thead th{position:sticky;top:0;z-index:3;background:var(--raised);color:var(--txt);
  font-weight:600;cursor:pointer;-webkit-user-select:none;user-select:none;vertical-align:bottom}
table.sheet thead th:hover{background:var(--lift)}
table.sheet thead th .ty{display:block;font:500 9.5px/1.4 var(--mono);letter-spacing:.06em;color:var(--faint)}
table.sheet thead th .sd{color:var(--blue)}
table.sheet td.rn,table.sheet th.rn{position:sticky;left:0;z-index:2;background:var(--surface);
  color:var(--faint);text-align:right;font-family:var(--mono);font-size:11px;
  -webkit-user-select:none;user-select:none;border-right:1px solid var(--line2)}
table.sheet thead th.rn{z-index:4}
table.sheet td.num{font-family:var(--mono);text-align:right;font-variant-numeric:tabular-nums}
table.sheet td.nul{color:var(--faint);font-style:italic}
table.sheet tbody tr:hover td{background:var(--blue-wash)}
table.sheet td.sel{background:var(--blue-soft);box-shadow:inset 0 0 0 1px var(--blue-line)}
.sheetpad{height:1px}
.selsum{position:fixed;left:50%;bottom:18px;transform:translateX(-50%);z-index:60;
  padding:6px 13px;border-radius:999px;border:1px solid var(--line3);background:var(--deep);
  font:500 12px/1 var(--mono);color:var(--txt);box-shadow:0 6px 22px var(--shadow-2)}

/* ── THE MODEL VIEWER: a full-screen secondary view, never a pop-up ──────────────────────
   It is fixed to the viewport and covers it, so no clipping ancestor can render it at
   0px visible (the trap that has shipped in this repo five times). */
.modelview{position:fixed;inset:0;z-index:100;background:var(--deep);display:none;flex-direction:column}
.modelview.open{display:flex}
.mv-bar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:10px 16px;
  background:var(--canvas);border-bottom:1px solid var(--line2);font-size:13px;color:var(--muted)}
.mv-bar .grow{flex:1}
.mv-canvas{flex:1;position:relative;overflow:hidden;cursor:grab;
  background:
    radial-gradient(circle at 1px 1px,var(--dots) 1px,transparent 0) 0 0/26px 26px,
    var(--deep)}
.mv-canvas.panning{cursor:grabbing}
.mv-pan{position:absolute;left:0;top:0;transform-origin:0 0;will-change:transform}
.mv-edges{position:absolute;left:0;top:0;overflow:visible;pointer-events:none}
.mv-edges path{fill:none;stroke:var(--line3);stroke-width:1.4;pointer-events:stroke;cursor:pointer}
/* the fat transparent twin: a 1.4px line cannot be hit reliably by a mouse, so every line
   carries an invisible 12px one over it whose only job is to be clickable */
.mv-edges path.hit{stroke:transparent;stroke-width:12}
.mv-edges path.hot{stroke:var(--blue);stroke-width:2.2}
.mv-edges path.picked{stroke:var(--violet);stroke-width:2.6}
/* a line's column name appears only when the line is touched or picked: 76 labels at once put
   text over every card and made the map unreadable */
.mv-edges .elab{font:500 10.5px/1 var(--mono);fill:var(--txt);pointer-events:none;
  paint-order:stroke;stroke:var(--deep);stroke-width:3.5px;opacity:0}
.mv-edges .elab.show{opacity:1}
.mv-edges .plate{fill:var(--surface-veil);stroke:var(--line);stroke-width:1;pointer-events:none}
.mv-edges .pcap{font:600 10px/1 var(--mono);letter-spacing:.1em;fill:var(--faint);pointer-events:none}
.node{position:absolute;width:212px;background:var(--surface);border:1px solid var(--line2);
  border-radius:var(--r-md);box-shadow:0 5px 18px var(--shadow-1);cursor:grab;
  -webkit-user-select:none;user-select:none}
.node.drag{cursor:grabbing;box-shadow:0 12px 34px var(--shadow-3);border-color:var(--blue-line);z-index:5}
.node.hot{border-color:var(--blue-line)}
.node.dim{opacity:.32}
.node .nh{display:flex;align-items:center;gap:7px;padding:7px 10px;border-bottom:1px solid var(--line2);
  background:var(--raised);border-radius:var(--r-md) var(--r-md) 0 0}
.node .nh .db{font:500 9.5px/1 var(--mono);letter-spacing:.06em;padding:2px 5px;border-radius:3px}
.node .nh .nm{font:600 12.5px/1.3 var(--sans);color:var(--txt);overflow:hidden;text-overflow:ellipsis}
.node .nb{padding:5px 10px 8px}
.node .col{display:flex;justify-content:space-between;gap:8px;font:11.5px/1.7 var(--mono);color:var(--muted)}
.node .col .t{color:var(--faint);font-size:9.5px}
.node .col.key{color:var(--violet)}
.node .more{font:11px/1.7 var(--mono);color:var(--faint)}
.node .nf{padding:4px 10px 7px;font:11px/1 var(--mono);color:var(--faint);
  border-top:1px solid var(--line);margin-top:4px;padding-top:6px}
.mv-side{position:absolute;right:16px;top:16px;bottom:16px;width:330px;z-index:8;
  background:var(--canvas);border:1px solid var(--line2);border-radius:var(--r-md);
  display:none;flex-direction:column;overflow:hidden;box-shadow:0 10px 40px var(--shadow-2)}
.mv-side.open{display:flex}
.mv-side h3{padding:12px 14px;border-bottom:1px solid var(--line2);font-size:13px;background:var(--surface)}
.mv-side .body{flex:1;overflow:auto;padding:13px 14px;font-size:13px;color:var(--muted);line-height:1.6}
.mv-side .body pre{margin:8px 0;padding:9px 10px;background:var(--deep);border:1px solid var(--line2);
  border-radius:var(--r-sm);overflow-x:auto;font:11.5px/1.6 var(--mono);color:var(--txt);white-space:pre-wrap}
.mv-side .kv{display:flex;justify-content:space-between;gap:10px;padding:4px 0;border-bottom:1px solid var(--line)}
.mv-side .kv b{color:var(--txt);font-weight:600;font-family:var(--mono);font-size:12px}
.mv-hint{position:absolute;left:16px;bottom:16px;z-index:8;padding:7px 12px;border-radius:var(--r-sm);
  background:var(--veil);border:1px solid var(--line2);font-size:12px;color:var(--faint)}
.mv-hint b{color:var(--muted);font-weight:500}

/* ── lists (queries, jobs) ── */
.rows{border:1px solid var(--line2);border-radius:var(--r-md);overflow:hidden;background:var(--surface)}
.row{display:flex;align-items:flex-start;gap:14px;padding:13px 15px;border-bottom:1px solid var(--line)}
.row:last-child{border-bottom:0}
.row:hover{background:var(--raised)}
.row .main{flex:1;min-width:0}
.row .nm{font:600 13.5px/1.4 var(--mono);color:var(--txt)}
.row .desc{margin-top:3px;color:var(--muted);font-size:13px;line-height:1.5}
.row .side{display:flex;align-items:center;gap:7px;flex:none}
.row .out{margin-top:10px}

.spin{display:inline-block;width:11px;height:11px;border-radius:50%;
  border:2px solid var(--line3);border-top-color:var(--blue);animation:sp .7s linear infinite}
@keyframes sp{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){
  *{animation-duration:.001ms!important;transition-duration:.001ms!important}
  .spin{animation:none;border-top-color:var(--line3)}
}

.foot{margin-top:46px;padding-top:16px;border-top:1px solid var(--line);
  color:var(--faint);font-size:12.5px;line-height:1.7}
.foot b{color:var(--muted);font-weight:500}

@media(max-width:720px){
  main{padding:24px 16px 56px}
  .topbar{gap:10px;padding:0 14px}
  .topbar nav a{padding:6px 8px}
  .mv-side{left:16px;width:auto;top:auto;height:44%}
}
