/* =====================================================================================
   burner-pages.css · Burn Mark's pages beside the editor
   login · invite · password · terms (the gate) · projects · accounts
   Link order on every page: /burner.css → /burner-pages.css → the page's own <style>.
   Builds on burner.css only (.bn-* / --bn-*). Two inks for chrome, no glows, square furniture,
   round stickers, warnings in words and hazard tape (never a colour). Page classes are .pg-*.
   ===================================================================================== */

html { background: var(--bn-bg); }
body.bn { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--bn-bg); color: var(--bn-text);
  font-family: var(--bn-font-label); font-size: var(--bn-fs-13); line-height: 1.45; }
.bn a { color: var(--bn-text); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.bn a:hover { text-decoration-thickness: 2px; }
.bn b, .bn strong { font-weight: 600; }
.bn code { font-family: var(--bn-font-mono); font-size: .92em; }

/* Legacy status tokens that inline styles and lifted blocks still name (admin termsCell, old chips):
   status leaves the chrome, the words carry it (as burner-compat.css .bn-compat-bm). They follow the
   text ink, not paper, so a status word stays readable when a page turns to paper (the docs do). */
body.pg { --warn: var(--bn-text); --bad: var(--bn-text); --ok: var(--bn-text); --info: var(--bn-mix-72);
  --dim: var(--bn-mix-66); --dim2: var(--bn-mix-72); --line: var(--bn-mix-20); --panel: var(--bn-mix-06); }

/* ---------- form furniture (square, sunk, paper focus) ---------- */
.bn input[type=text], .bn input[type=password], .bn input[type=date], .bn input[type=email],
.bn select, .bn textarea {
  font: 500 var(--bn-fs-13)/1.3 var(--bn-font-mono); letter-spacing: .01em; color: var(--bn-text);
  background: var(--bn-sunk); border: var(--bn-rule) solid var(--bn-line-2); border-radius: 0; padding: 7px 10px;
  min-height: var(--bn-target-fine); transition: border-color var(--bn-t-quick); }
.bn input::placeholder, .bn textarea::placeholder { color: var(--bn-text-3); opacity: 1; }
.bn input:hover, .bn select:hover, .bn textarea:hover { border-color: var(--bn-line-3); }
.bn input:focus, .bn select:focus, .bn textarea:focus { outline: none; border-color: var(--bn-text); }
.bn input:focus-visible, .bn select:focus-visible, .bn textarea:focus-visible { outline: 2px solid var(--bn-focus); outline-offset: 2px; }
.bn input[readonly] { color: var(--bn-text-2); border-style: dashed; }
.bn select { appearance: none; -webkit-appearance: none; padding-right: 28px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(-45deg, transparent 50%, currentColor 50%);
  background-position: right 13px center, right 8px center; background-size: 5px 5px; background-repeat: no-repeat; }
.bn select option { background: var(--bn-raise); color: var(--bn-text); }
/* a tick box: a square box, drawn, never the native one */
.bn input[type=checkbox] { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 0;
  border: var(--bn-box) solid var(--bn-text-2); border-radius: 0; background: transparent; cursor: pointer; display: inline-grid; place-content: center;
  transition: background var(--bn-led-warm), border-color var(--bn-led-warm); }
.bn input[type=checkbox]::after { content: ""; width: 10px; height: 6px; border: solid var(--bn-ink); border-width: 0 0 2.5px 2.5px;
  transform: translateY(-1px) rotate(-45deg); opacity: 0; }
.bn input[type=checkbox]:checked { background: var(--bn-paper); border-color: var(--bn-paper); }
.bn input[type=checkbox]:checked::after { opacity: 1; }
.bn input[type=checkbox]:hover { border-color: var(--bn-text); }

/* legacy page buttons (projects, accounts) take the .bn-btn look without new markup */
.pg button, .pg .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--bn-target-fine); padding: 0 14px;
  font: 600 var(--bn-fs-11)/1 var(--bn-font-label); letter-spacing: .12em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  color: var(--bn-text); background: transparent; border: var(--bn-rule) solid var(--bn-line-2); border-radius: 0; cursor: pointer;
  transition: border-color var(--bn-t-quick), background var(--bn-t-quick), transform var(--bn-t-press) var(--bn-ease); }
.pg button:hover, .pg .btn:hover { border-color: var(--bn-text); color: var(--bn-text); }
.pg button:active, .pg .btn:active { transform: scale(.96); }
.pg button:disabled, .pg .btn:disabled { opacity: .38; pointer-events: none; }
.pg button.dim, .pg .btn.dim { color: var(--bn-text-2); border-color: transparent; }
.pg button.dim:hover, .pg .btn.dim:hover { color: var(--bn-text); background: var(--bn-hover); }
.pg button.small, .pg .btn.small { min-height: 28px; padding: 0 10px; font-size: var(--bn-fs-11); letter-spacing: .1em; }
.pg button.solid, .pg .btn.solid, .pg button.pri { background: var(--bn-inv-bg); color: var(--bn-inv-text); border-color: var(--bn-inv-line); border-width: var(--bn-box); }
.pg button.solid:hover, .pg button.pri:hover { transform: translate(-2px, -2px); box-shadow: 2px 2px 0 var(--bn-line-3); }
@media (pointer: coarse) { .pg button, .pg .btn { min-height: var(--bn-touch); } }

/* ---------- top bar (projects, accounts, docs): the same 56 px bar as the editor ---------- */
.pg-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; min-height: var(--bn-topbar-h);
  padding: 0 16px; background: var(--bn-bg); border-bottom: var(--bn-hair) solid var(--bn-line-2); flex-wrap: wrap; }
.pg-top__mark { display: inline-flex; align-items: center; color: var(--bn-text); text-decoration: none; flex: none; }
.pg-top__mark .bn-mask { width: 150px; height: 20px; }
.pg-top__sheet { display: flex; align-items: center; gap: 10px; padding-left: 14px; border-left: var(--bn-hair) solid var(--bn-line-2); height: 32px; min-width: 0; }
.pg-top__sheet b { font: 700 var(--bn-fs-15)/1 var(--bn-font-label); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.pg-top__end { display: flex; align-items: center; gap: 10px; margin-left: auto; flex: none; flex-wrap: wrap; }
.pg-top__end form { margin: 0; }

/* ---------- title block (bottom of every page, as in the drawing packs) ---------- */
.pg-tb { margin-top: auto; }
.pg-tb .bn-titleblock__cell > b { font-size: var(--bn-fs-13); }
.pg-tb .bn-titleblock__cell > b a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--bn-line-3); }
.pg-tb .bn-titleblock__cell > b a:hover { border-bottom-color: var(--bn-text); }
.pg-tb .smile { width: 24px; height: 24px; } .pg-tb .tbc { width: 70px; height: 15px; }

/* =====================================================================================
   THE GATE: login · invite · password · terms
   ===================================================================================== */
/* overflow-x: clip, not hidden: the slapped sticker (scale 1.9 as it lands) must never widen a phone's page,
   and clip keeps the hero's position: sticky working (hidden would make .gate a scroll box) */
.gate { --line: var(--bn-line-3); display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; overflow-x: clip; }
.gate__main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 56px 32px 64px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 72px; align-items: center; }
.gate--wide .gate__main { grid-template-columns: minmax(0, 340px) minmax(0, 700px); align-items: start; gap: 64px; }
.gate__hero { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.gate--wide .gate__hero { position: sticky; top: 32px; }
.gate__mark { margin: 0; line-height: 0; }
.gate__mark img { display: block; width: 100%; max-width: 520px; height: auto; transform: rotate(-3deg); transform-origin: 20% 60%; }
.gate--wide .gate__mark img { max-width: 300px; }
.gate__line { margin: 0; max-width: 30ch; font: 400 var(--bn-fs-18)/1.4 var(--bn-font-label); color: var(--bn-text-2); }
.gate__line b { color: var(--bn-text); font-weight: 600; }
.gate__tape { align-self: flex-start; display: inline-block; padding: 10px 16px 9px; background: var(--bn-paper); color: var(--bn-ink);
  font: 700 var(--bn-fs-22)/1 var(--bn-font-display); letter-spacing: -.005em; text-transform: uppercase; white-space: nowrap; }
.gate__facts { display: flex; flex-wrap: wrap; gap: 6px 0; margin: 0; padding: 0; list-style: none; }
.gate__facts li { font: 500 var(--bn-fs-11)/1.6 var(--bn-font-mono); letter-spacing: var(--bn-track-micro); text-transform: uppercase; color: var(--bn-text-3); }
.gate__facts li + li::before { content: "·"; margin: 0 .7em; }

/* the card: a sheet off the pack, square, 2 px paper, hard shadow, crop marks */
/* one sticker slapped on the corner of the sheet (stickers may tilt; app chrome never does) */
.gate__sticker { position: absolute; z-index: 2; top: -62px; right: -64px; width: 196px; height: auto; transform: rotate(9deg); pointer-events: none;
  filter: drop-shadow(4px 4px 0 var(--bn-ink-deep)); animation: pg-slap var(--bn-t-stamp) var(--bn-slam) 700ms both; }
@keyframes pg-slap { 0% { opacity: 0; transform: rotate(9deg) scale(1.9); } 70% { opacity: 1; transform: rotate(9deg) scale(.96); } 100% { opacity: 1; transform: rotate(9deg) scale(1); } }
.gate__tape { transform: rotate(-1.5deg); }
.gate__card { position: relative; background: var(--bn-raise); border: var(--bn-box) solid var(--bn-text); box-shadow: var(--bn-shadow);
  padding: 0; min-width: 0; }
.gate__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px 12px;
  border-bottom: var(--bn-hair) solid var(--bn-line-2); }
.gate__head .bn-micro { color: var(--bn-text-2); }
.gate__head .smile { width: 22px; height: 22px; color: var(--bn-text-2); }
.gate__body { padding: 22px 22px 24px; }
.gate h2 { margin: 0 0 6px; font: 700 var(--bn-fs-28)/1 var(--bn-font-display); letter-spacing: -.005em; text-transform: uppercase; }
.gate .tag { margin: 0 0 22px; font: 500 var(--bn-fs-11)/1.5 var(--bn-font-mono); letter-spacing: var(--bn-track-micro); text-transform: uppercase; color: var(--bn-text-3); }
.gate label { display: block; margin: 0 0 7px; font: 500 var(--bn-fs-11)/1.2 var(--bn-font-mono); letter-spacing: var(--bn-track-micro); text-transform: uppercase; color: var(--bn-text-3); }
.gate label .opt, .gate label span.opt { text-transform: none; letter-spacing: .02em; color: var(--bn-text-3); }
.gate input[type=text], .gate input[type=password] { display: block; width: 100%; min-height: var(--bn-touch); padding: 10px 12px; font-size: var(--bn-fs-15); margin-bottom: 18px; }
.gate input[type=password] { letter-spacing: .18em; }
.gate button[type=submit], .gate .go {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; height: var(--bn-touch-show); margin-top: 6px; padding: 0 20px;
  font: 600 var(--bn-fs-13)/1 var(--bn-font-label); letter-spacing: .14em; text-transform: uppercase; text-decoration: none;
  background: var(--bn-inv-bg); color: var(--bn-inv-text); border: var(--bn-box) solid var(--bn-inv-line); border-radius: 0; cursor: pointer;
  transition: transform var(--bn-t-press) var(--bn-ease), box-shadow var(--bn-t-quick) var(--bn-ease); }
.gate button[type=submit]::after, .gate .go::after { content: "↵"; font: 500 var(--bn-fs-15)/1 var(--bn-font-mono); color: var(--bn-inv-text-2); }
.gate .go::after { content: "→"; }
.gate button[type=submit]:hover, .gate .go:hover { transform: translate(-3px, -3px); box-shadow: 3px 3px 0 var(--bn-line-3); }
.gate button[type=submit]:active { transform: scale(.98); box-shadow: none; }
.gate button[type=submit]:focus-visible { outline: 2px solid var(--bn-focus); outline-offset: 3px; }
.gate button[type=submit]:disabled, .gate button[type=submit]:disabled:hover {
  background: transparent; color: var(--bn-text-3); border: var(--bn-box) dashed var(--bn-line-3); transform: none; box-shadow: none; cursor: default; opacity: 1; }
.gate button[type=submit]:disabled::after { color: var(--bn-text-3); }

/* warnings: words + hazard tape, never a red */
.gate .err, .gate .dead { position: relative; margin: 18px 0 0; padding: 11px 14px 11px 34px; background: var(--bn-sunk);
  border: var(--bn-rule) solid var(--bn-text); color: var(--bn-text); font: 500 var(--bn-fs-12)/1.5 var(--bn-font-mono); letter-spacing: .01em; }
.gate .err::before, .gate .dead::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 20px;
  border-right: var(--bn-rule) solid var(--bn-text); background: repeating-linear-gradient(-45deg, var(--bn-text) 0 4px, transparent 4px 9px); }
.gate .dead { margin: 16px 0 0; font-size: var(--bn-fs-13); line-height: 1.6; }
.gate .hello { margin: 0 0 20px; font: 400 var(--bn-fs-15)/1.55 var(--bn-font-label); color: var(--bn-text-2); }
.gate .hello b { color: var(--bn-text); font-weight: 600; }
.gate .hello a { color: var(--bn-text); }
.gate .need { margin: 10px 0 0; min-height: 1.5em; font: 500 var(--bn-fs-12)/1.5 var(--bn-font-mono); color: var(--bn-text-3); }
.gate .need:not(:empty)::before { content: "→ "; color: var(--bn-text-2); }
.gate .caps { margin: -10px 0 14px; color: var(--bn-text); }

/* the Terms of Access: a reading box, the legal text untouched */
.gate .terms { border: var(--bn-rule) solid var(--bn-line-2); background: var(--bn-sunk); padding: 6px 22px 4px; max-height: 46vh; overflow-y: auto;
  scrollbar-color: var(--bn-line-3) var(--bn-sunk); margin: 0 0 20px; font: 400 var(--bn-fs-14)/1.65 var(--bn-font-label); color: var(--bn-text-2); }
/* the page puts focus here on load (keyboard readers scroll it straight away), so the ring is the box's own
   edge going paper, 2 px, not a second frame drawn outside it */
.gate .terms:focus, .gate .terms:focus-visible { outline: none; border-color: var(--bn-text); box-shadow: inset 0 0 0 1px var(--bn-text); }
.gate .terms h2 { margin: 18px 0 4px; font: 700 var(--bn-fs-15)/1.2 var(--bn-font-label); letter-spacing: .06em; color: var(--bn-text); }
.gate .terms .meta { margin: 0 0 12px; font: 500 var(--bn-fs-11)/1.4 var(--bn-font-mono); letter-spacing: var(--bn-track-micro); text-transform: uppercase; color: var(--bn-text-3); }
.gate .terms ol { padding-left: 22px; } .gate .terms li { margin-bottom: 10px; }
.gate .terms li::marker { font-family: var(--bn-font-mono); color: var(--bn-text-3); }
.gate .terms b, .gate .terms strong { color: var(--bn-text); }
.gate .sign { border-top: var(--bn-box) solid var(--bn-text); padding-top: 20px; margin: 4px 0 22px; }
.gate .sign .bn-micro { display: block; margin: 0 0 14px; color: var(--bn-text-2); }
.gate .accept { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 14px; cursor: pointer;
  font: 400 var(--bn-fs-15)/1.45 var(--bn-font-label); letter-spacing: 0; text-transform: none; color: var(--bn-text); }
.gate .accept input { margin-top: 1px; }
.gate .sign input.sig { font: 600 var(--bn-fs-18)/1.2 var(--bn-font-label); letter-spacing: .02em; margin-bottom: 6px; }
.gate .sign input[type=text] { margin-bottom: 6px; }
.gate .why { margin: 0 0 18px; font: 500 var(--bn-fs-12)/1.5 var(--bn-font-mono); color: var(--bn-text-3); }
.gate .hint { margin: 0 0 12px; font: 600 var(--bn-fs-12)/1.5 var(--bn-font-mono); color: var(--bn-text); }
.gate .hint::before { content: "!  "; }
.gate .prev { margin: -8px 0 16px; font: 500 var(--bn-fs-12)/1.4 var(--bn-font-mono); }
.gate .prev a, .gate .alt { color: var(--bn-text-2); font: 500 var(--bn-fs-12)/1.4 var(--bn-font-mono); }
.gate .done .stamp-row { display: flex; justify-content: center; padding: 14px 0 26px; }
.gate .done .bn-stamp { font-size: var(--bn-fs-36); padding: 14px 24px 12px; }

/* steps across the top of a form: 01 READ · 02 SIGN · 03 PASSWORD */
.gate__steps { display: flex; gap: 0; margin: 16px 0 22px; padding: 0; list-style: none; border: var(--bn-rule) solid var(--bn-line-2); }
.gate__steps li { flex: 1; display: flex; align-items: baseline; gap: 8px; padding: 9px 12px; border-right: var(--bn-hair) solid var(--bn-line-2);
  font: 600 var(--bn-fs-12)/1 var(--bn-font-label); letter-spacing: .1em; text-transform: uppercase; color: var(--bn-text-3); min-width: 0; }
.gate__steps li:last-child { border-right: 0; }
.gate__steps li i { font: 500 var(--bn-fs-11)/1 var(--bn-font-mono); font-style: normal; letter-spacing: .04em; }
.gate__steps li.is-now { background: var(--bn-inv-bg); color: var(--bn-inv-text); }
.gate__steps li.is-now i { color: var(--bn-inv-text-2); }

/* =====================================================================================
   PROJECTS + ACCOUNTS
   ===================================================================================== */
.pg-page { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.pg-wrap { width: 100%; max-width: 1500px; margin: 0 auto; padding: 28px 24px 64px; flex: 1; }
.pg .spacer { flex: 1; }
.pg .hint { color: var(--bn-text-3); font: 500 var(--bn-fs-12)/1.5 var(--bn-font-mono); letter-spacing: .01em; }
.pg .tag { font: 500 var(--bn-fs-11)/1.4 var(--bn-font-mono); letter-spacing: var(--bn-track-micro); text-transform: uppercase; color: var(--bn-text-3); }
.pg .mono { font-family: var(--bn-font-mono); color: var(--bn-text-2); font-variant-numeric: tabular-nums slashed-zero; }
.pg h3 { display: flex; align-items: baseline; gap: 10px; margin: 0 0 14px; font: 500 var(--bn-fs-11)/1.2 var(--bn-font-mono);
  letter-spacing: var(--bn-track-micro); text-transform: uppercase; color: var(--bn-text-2); }
.pg h3::after { content: ""; flex: 1; height: var(--bn-hair); background: var(--bn-line-2); transform: translateY(-3px); }
.pg .panel { border: var(--bn-rule) solid var(--bn-line-2); background: var(--bn-sunk); padding: 18px 20px; margin-bottom: 18px; }

/* the big sheet heading: outlined count + a display word */
.pg-hero { display: flex; align-items: flex-end; gap: 18px; margin: 8px 0 26px; flex-wrap: wrap; }
.pg-hero .bn-numerals { font-size: 88px; color: var(--bn-text); }
.pg-hero__words { display: flex; flex-direction: column; gap: 8px; padding-bottom: 6px; min-width: 0; }
.pg-hero__words h1 { margin: 0; font: 700 var(--bn-fs-48)/.9 var(--bn-font-display); letter-spacing: -.01em; text-transform: uppercase; }

/* the project list */
#projList { border-top: var(--bn-box) solid var(--bn-text); }
.pg .projrow { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto auto; align-items: center; gap: 18px; min-height: 64px; padding: 10px 14px 10px 6px;
  border-bottom: var(--bn-hair) solid var(--bn-line-2); cursor: pointer; transition: background var(--bn-t-quick); }
.pg .projrow:hover, .pg .projrow:focus-visible { background: var(--bn-raise); box-shadow: inset 3px 0 0 var(--bn-text); outline: none; }
.pg .projrow .no { font: 500 var(--bn-fs-15)/1 var(--bn-font-mono); color: var(--bn-text-3); text-align: right; font-variant-numeric: tabular-nums slashed-zero; }
.pg .projrow b { font: 700 var(--bn-fs-22)/1.05 var(--bn-font-label); letter-spacing: .02em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg .projrow .tag { display: block; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg .projrow .rows { font: 500 var(--bn-fs-13)/1 var(--bn-font-mono); color: var(--bn-text-2); white-space: nowrap; }
.pg .projrow .go { font: 500 var(--bn-fs-15)/1 var(--bn-font-mono); color: var(--bn-text-3); transition: transform var(--bn-t-quick) var(--bn-ease), color var(--bn-t-quick); }
.pg .projrow:hover .go { color: var(--bn-text); transform: translateX(4px); }
.pg-new { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px; align-items: end; margin-top: 26px;
  padding: 18px; border: var(--bn-box) dashed var(--bn-line-3); }
.pg-new label { display: flex; flex-direction: column; gap: 6px; font: 500 var(--bn-fs-11)/1.2 var(--bn-font-mono); letter-spacing: var(--bn-track-micro); text-transform: uppercase; color: var(--bn-text-3); min-width: 0; }
.pg-new input[type=text] { width: 100%; min-height: var(--bn-touch); }
.pg-new button { min-height: var(--bn-touch); }

/* one project */
.pg-projhead { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 14px; }
.pg-projhead #pName { font: 700 var(--bn-fs-36)/1 var(--bn-font-display); letter-spacing: -.005em; text-transform: uppercase; min-width: 0; overflow-wrap: anywhere; }
.pg-projhead .pg-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-left: auto; }
.pg-projhead select { min-height: var(--bn-target-fine); max-width: 260px; }
/* the rollup reads like a drawing-pack register */
.pg .rollup { display: flex; flex-wrap: wrap; margin: 0 0 22px; border: var(--bn-box) solid var(--bn-text); }
.pg .rollup > span { flex: 1 1 auto; padding: 10px 14px; border-right: var(--bn-hair) solid var(--bn-line-2); font: 500 var(--bn-fs-12)/1.35 var(--bn-font-mono);
  color: var(--bn-text-2); letter-spacing: .01em; }
.pg .rollup > span:last-child { border-right: 0; }
.pg .rollup:empty { display: none; }
/* conventions flags: hazard tape, then the words */
#collide { border: var(--bn-box) solid var(--bn-text); background: var(--bn-sunk); position: relative; padding-top: 26px; }
#collide::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 10px; background: repeating-linear-gradient(-45deg, var(--bn-text) 0 6px, transparent 6px 12px);
  border-bottom: var(--bn-rule) solid var(--bn-text); }
#collide h3 { color: var(--bn-text); }
#collide .row { display: flex; gap: 12px; align-items: baseline; padding: 6px 0; border-bottom: var(--bn-hair) solid var(--bn-line); }
#collide .row span { flex: 1; color: var(--bn-text); font: 500 var(--bn-fs-13)/1.45 var(--bn-font-mono); }
#collide .row.acked span { color: var(--bn-text-3); text-decoration: line-through; text-decoration-color: var(--bn-line-3); }
/* tabs = a segmented control: square cells, selected = inversion */
.pg .tabs { display: inline-flex; gap: 0; margin: 0 0 -2px; border: var(--bn-rule) solid var(--bn-line-2); border-bottom: 0; position: relative; z-index: 1; }
.pg .tabs button { min-height: 40px; padding: 0 20px; border: 0; border-right: var(--bn-hair) solid var(--bn-line-2); font-size: var(--bn-fs-12); color: var(--bn-text-2); }
.pg .tabs button:last-child { border-right: 0; }
.pg .tabs button:hover { background: var(--bn-hover); color: var(--bn-text); }
.pg .tabs button.on { background: var(--bn-inv-bg); color: var(--bn-inv-text); }
#tabTracker, #tabFullsets, #tabNotes { border-top: var(--bn-box) solid var(--bn-text); }

/* the tracker */
.pg .gridwrap { overflow-x: auto; margin: -18px -20px 0; }
.pg table.tracker { border-collapse: collapse; width: 100%; min-width: 1100px; font-family: var(--bn-font-label); }
.pg table.tracker th { position: sticky; top: 0; z-index: 2; padding: 10px 10px 8px; text-align: left; white-space: nowrap; background: var(--bn-sunk);
  font: 500 var(--bn-fs-11)/1 var(--bn-font-mono); letter-spacing: var(--bn-track-micro); text-transform: uppercase; color: var(--bn-text-3);
  border-bottom: var(--bn-rule) solid var(--bn-line-3); }
.pg table.tracker td { padding: 6px 10px; border-bottom: var(--bn-hair) solid var(--bn-line); white-space: nowrap; font-size: var(--bn-fs-13); vertical-align: middle; }
.pg table.tracker td.mono { font: 500 var(--bn-fs-12)/1 var(--bn-font-mono); color: var(--bn-text-2); }
.pg table.tracker td b { font-weight: 600; letter-spacing: .02em; }
.pg tr.item { transition: background var(--bn-t-quick); }
.pg tr.item:hover td { background: var(--bn-raise); cursor: pointer; }
.pg tr.item:hover td:first-child { box-shadow: inset 3px 0 0 var(--bn-text); }
.pg tr.act td { padding: 18px 10px 7px; background: transparent; border-bottom: var(--bn-rule) solid var(--bn-text);
  font: 700 var(--bn-fs-13)/1 var(--bn-font-label); letter-spacing: .14em; text-transform: uppercase; color: var(--bn-text); }
.pg .kind { display: inline-block; margin-right: 8px; padding: 2px 6px; border: var(--bn-hair) solid var(--bn-line-3); vertical-align: 1px;
  font: 500 var(--bn-fs-11)/1.2 var(--bn-font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--bn-text-2); }
/* chips are stickers: round */
.pg .chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: var(--bn-r-die); border: var(--bn-rule) solid var(--bn-line-3);
  font: 600 var(--bn-fs-11)/1 var(--bn-font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--bn-text-2); text-decoration: none; white-space: nowrap; }
.pg .chip.ok { border-color: var(--bn-text); color: var(--bn-text); }
.pg a.chip.ok:hover { background: var(--bn-inv-bg); color: var(--bn-inv-text); }
.pg .chip.warn { border-style: dashed; color: var(--bn-text); }
.pg .chip.run { border-style: dashed; color: var(--bn-text); }
.pg td .chip + button { margin-left: 6px; }
.pg .notesn { display: inline-block; padding: 2px 7px; background: var(--bn-inv-bg); color: var(--bn-inv-text); font: 600 var(--bn-fs-11)/1.3 var(--bn-font-mono); letter-spacing: .06em; }
/* department status: shape, never hue. Not started = dashed, previs = outline, done = inversion, NA = faint */
.pg select.status { min-height: 28px; max-width: 104px; padding: 3px 24px 3px 8px; font: 600 var(--bn-fs-11)/1.2 var(--bn-font-mono); letter-spacing: .06em; background-position: right 11px center, right 6px center; }
.pg select.status.s0 { color: var(--bn-text-3); border-style: dashed; border-color: var(--bn-line-3); background-color: transparent; }
.pg select.status.s1 { color: var(--bn-text); border-color: var(--bn-text-2); background-color: transparent; }
.pg select.status.s2 { color: var(--bn-inv-text); background-color: var(--bn-inv-bg); border-color: var(--bn-inv-line); }
.pg select.status.sna { color: var(--bn-text-3); border-color: transparent; background-color: transparent; }
.pg #addItem { margin-top: 4px; }

/* full sets */
.pg .fsrow { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-bottom: var(--bn-hair) solid var(--bn-line); flex-wrap: wrap; }
.pg .fsrow b { font: 600 var(--bn-fs-15)/1.2 var(--bn-font-label); letter-spacing: .02em; }
.pg .fsrow .tc { width: 110px; font: 500 var(--bn-fs-12)/1 var(--bn-font-mono); color: var(--bn-text); }
.pg .fsrow .rng { width: 130px; font: 500 var(--bn-fs-12)/1 var(--bn-font-mono); color: var(--bn-text-3); }
.pg .fsrow input[type=text] { flex: 1; min-width: 140px; }
.pg .fsrow select { max-width: 240px; }
.pg #fsCanvas { width: 100%; height: 130px; display: block; background: var(--bn-ink-deep); border: var(--bn-rule) solid var(--bn-line-2); cursor: crosshair; }
.pg #fsProgress { margin: 10px 0; }
.pg-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* notes */
.pg .filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
#notesList .note, #dNotes .note { border: var(--bn-rule) solid var(--bn-line-2); background: var(--bn-bg); padding: 10px 14px; margin-bottom: 8px; }
.pg .note .meta { display: flex; gap: 6px 12px; flex-wrap: wrap; align-items: center; font: 500 var(--bn-fs-11)/1.4 var(--bn-font-mono); letter-spacing: .04em; color: var(--bn-text-3); }
.pg .note .meta b { font: 600 var(--bn-fs-13)/1.2 var(--bn-font-label); letter-spacing: .02em; color: var(--bn-text); }
.pg .note .txt { margin: 6px 0 2px; white-space: pre-wrap; font: 400 var(--bn-fs-15)/1.5 var(--bn-font-label); color: var(--bn-text); }
.pg .note.done { opacity: .5; }
.pg .note.reviewed .txt { color: var(--bn-text-2); }
.pg .state-open, .pg .state-reviewed, .pg .state-done { padding: 2px 7px; font-weight: 600; letter-spacing: .1em; }
.pg .state-open { background: var(--bn-inv-bg); color: var(--bn-inv-text); }
.pg .state-reviewed { border: var(--bn-hair) solid var(--bn-text-2); color: var(--bn-text); }
.pg .state-done { color: var(--bn-text-2); text-decoration: line-through; }
.pg-quick { display: flex; gap: 8px; margin-bottom: 16px; align-items: flex-start; }
.pg-quick textarea { flex: 1; min-height: 44px; }
.pg-quick__side { display: flex; flex-direction: column; gap: 6px; }
.pg textarea { width: 100%; min-height: 56px; resize: vertical; font-family: var(--bn-font-label); font-weight: 400; font-size: var(--bn-fs-15); }

/* the row drawer: a square sheet off the right edge. Each label sits on top of its own field. */
#drawer { position: fixed; top: 0; right: 0; z-index: 40; width: min(560px, 100vw); height: 100vh; height: 100dvh; overflow-y: auto;
  background: var(--bn-raise); border-left: var(--bn-box) solid var(--bn-text); box-shadow: -8px 0 0 var(--bn-ink-deep);
  padding: 0 24px 28px; transform: translateX(calc(100% + 12px)); visibility: hidden;
  transition: transform var(--bn-t-sheet) var(--bn-ease), visibility 0s linear var(--bn-t-sheet); }
#drawer.open { transform: none; visibility: visible; transition: transform var(--bn-t-sheet) var(--bn-ease), visibility 0s; }
#drawer .pg-dhead { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; margin: 0 -24px 6px; padding: 16px 24px 14px;
  background: var(--bn-raise); border-bottom: var(--bn-hair) solid var(--bn-line-2); }
#drawer .pg-dhead b { font: 700 var(--bn-fs-22)/1.05 var(--bn-font-label); letter-spacing: .02em; text-transform: uppercase; min-width: 0; overflow-wrap: anywhere; }
#drawer .grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 14px; }
#drawer .grid2 > div { min-width: 0; }
#drawer label { display: block; margin: 12px 0 6px; font: 500 var(--bn-fs-11)/1.2 var(--bn-font-mono); letter-spacing: var(--bn-track-micro); text-transform: uppercase; color: var(--bn-text-3); }
#drawer input[type=text], #drawer select { width: 100%; }
#drawer .pg-dfoot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 16px; }
#drawer h3 { margin-top: 26px; }

/* accounts */
.pg table.pg-tbl { width: 100%; border-collapse: collapse; }
.pg .pg-tbl th { text-align: left; padding: 8px 10px; border-bottom: var(--bn-rule) solid var(--bn-line-3); font: 500 var(--bn-fs-11)/1 var(--bn-font-mono);
  letter-spacing: var(--bn-track-micro); text-transform: uppercase; color: var(--bn-text-3); white-space: nowrap; }
.pg .pg-tbl td { padding: 9px 10px; border-bottom: var(--bn-hair) solid var(--bn-line); vertical-align: middle; white-space: nowrap; font-size: var(--bn-fs-13); }
.pg .pg-tbl td b { font-weight: 600; }
.pg .pg-tbl td.act { text-align: right; }
.pg .pg-tbl td.act .btn { margin-left: 4px; min-height: 28px; padding: 0 9px; font-size: var(--bn-fs-11); }
.pg .pg-tbl td.terms { white-space: normal; min-width: 220px; line-height: 1.5; }
.pg .pg-tbl td.terms a { color: var(--bn-text-2); }
.pg .pg-tbl tr.off td { color: var(--bn-text-3); }
.pg .role { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: var(--bn-r-die); border: var(--bn-rule) solid var(--bn-line-3);
  font: 600 var(--bn-fs-11)/1 var(--bn-font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--bn-text-2); white-space: nowrap; }
.pg .role.admin { background: var(--bn-inv-bg); color: var(--bn-inv-text); border-color: var(--bn-inv-line); }
.pg .role.crew { color: var(--bn-text); border-color: var(--bn-text-2); }
.pg .role.beta { border-style: dashed; color: var(--bn-text); border-color: var(--bn-text-2); }
.pg .note-p { color: var(--bn-text-2); font: 400 var(--bn-fs-14)/1.6 var(--bn-font-label); }
.pg .note-p b { color: var(--bn-text); }
.pg .warnbox { position: relative; padding: 10px 14px 10px 34px; border: var(--bn-rule) solid var(--bn-text); background: var(--bn-bg);
  font: 500 var(--bn-fs-12)/1.55 var(--bn-font-mono); color: var(--bn-text); }
.pg .warnbox::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 20px; border-right: var(--bn-rule) solid var(--bn-text);
  background: repeating-linear-gradient(-45deg, var(--bn-text) 0 4px, transparent 4px 9px); }
.pg .temp { margin-top: 14px; padding: 14px 16px; border: var(--bn-box) solid var(--bn-text); background: var(--bn-bg); font: 400 var(--bn-fs-14)/1.55 var(--bn-font-label); }
.pg .temp code { font-size: var(--bn-fs-13); color: var(--bn-text); user-select: all; }
.pg .scroll { overflow-x: auto; }
.pg .audit td { font: 500 var(--bn-fs-12)/1.4 var(--bn-font-mono); }
.pg .audit td.detail { white-space: normal; color: var(--bn-text-2); }
.pg .audit td.bad { color: var(--bn-text); font-weight: 600; }
.pg .audit td.bad::before { content: "! "; }
.pg .pg-beta .row { padding: 8px 0; border-bottom: var(--bn-hair) solid var(--bn-line); }

/* ---------- the shared toast and dialog, in the system's look (app.css keeps its pinned rules) ---------- */
.bn #flash { background: var(--bn-inv-bg); color: var(--bn-inv-text); border: var(--bn-box) solid var(--bn-inv-line); border-radius: 0;
  font: 500 var(--bn-fs-12)/1.3 var(--bn-font-mono); letter-spacing: .02em; padding: 11px 16px; box-shadow: 6px 6px 0 var(--bn-ink-deep); max-width: calc(100vw - 32px); }
.bn #flash.bad { background: var(--bn-paper); outline: 3px solid var(--bn-paper); outline-offset: 0; border: 3px solid var(--bn-ink);
  border-image: repeating-linear-gradient(-45deg, var(--bn-ink) 0 5px, var(--bn-paper) 5px 10px) 3; }
.bn #flash.ok::before { content: "✓  "; font-weight: 700; }
.bn .bmdlg { background: rgba(14, 14, 14, .78); }
.bn .bmdlg-box { background: var(--bn-raise); border: var(--bn-box) solid var(--bn-text); box-shadow: var(--bn-shadow-deep); border-radius: 0; padding: 22px 24px; }
.bn .bmdlg-title { font: 700 var(--bn-fs-22)/1 var(--bn-font-display); letter-spacing: -.005em; text-transform: uppercase; color: var(--bn-text); }
.bn .bmdlg-body { font: 400 var(--bn-fs-14)/1.55 var(--bn-font-label); color: var(--bn-text-2); }
.bn .bmdlg-body input[type=text] { width: 100%; margin-top: 12px; min-height: var(--bn-touch); font-size: var(--bn-fs-15); }
.bn .bmdlg-foot button { min-height: 40px; padding: 0 18px; font: 600 var(--bn-fs-12)/1 var(--bn-font-label); letter-spacing: .12em; text-transform: uppercase;
  background: transparent; color: var(--bn-text); border: var(--bn-rule) solid var(--bn-line-2); border-radius: 0; cursor: pointer; }
.bn .bmdlg-foot button:hover { border-color: var(--bn-text); }
.bn .bmdlg .primary { background: var(--bn-inv-bg); color: var(--bn-inv-text); border: var(--bn-box) solid var(--bn-inv-line); }
.bn .bmdlg .primary.bmdlg-danger { background: var(--bn-paper); color: var(--bn-ink); border: 3px solid var(--bn-ink); outline: 2px solid var(--bn-paper);
  border-image: repeating-linear-gradient(-45deg, var(--bn-ink) 0 5px, var(--bn-paper) 5px 10px) 3; }

/* ---------- phone ---------- */
@media (max-width: 900px) {
  .gate__main, .gate--wide .gate__main { grid-template-columns: minmax(0, 1fr); gap: 32px; padding: 28px var(--bn-gutter) 40px; align-items: start; }
  .gate--wide .gate__hero { position: static; }
  .gate__mark img { max-width: 340px; }
  .gate--wide .gate__mark img { max-width: 240px; }
}
@media (max-width: 640px) {
  .pg-top { gap: 10px; padding: 8px var(--bn-gutter); }
  .pg-top__mark .bn-mask { width: 112px; height: 15px; }
  .pg-top__sheet { padding-left: 10px; }
  .pg-top__end { margin-left: 0; width: 100%; }
  .gate .pg-top__end { margin-left: auto; width: auto; }
  .gate__sticker { width: 112px; top: -34px; right: -6px; }
  .pg-wrap { padding: 20px var(--bn-gutter) 48px; }
  .pg-hero .bn-numerals { font-size: 60px; }
  .pg-hero__words h1 { font-size: var(--bn-fs-36); }
  .pg .projrow { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; padding-right: 6px; }
  .pg .projrow .go { display: none; }
  .pg .projrow b { font-size: var(--bn-fs-18); }
  .pg-new { grid-template-columns: minmax(0, 1fr); }
  .pg-projhead #pName { font-size: var(--bn-fs-28); width: 100%; }
  .pg-projhead .pg-tools { margin-left: 0; }
  .pg .rollup { flex-direction: column; }
  .pg .rollup > span { border-right: 0; border-bottom: var(--bn-hair) solid var(--bn-line-2); }
  .pg .rollup > span:last-child { border-bottom: 0; }
  .pg .panel { padding: 14px var(--bn-gutter); margin-left: calc(-1 * var(--bn-gutter)); margin-right: calc(-1 * var(--bn-gutter)); border-left: 0; border-right: 0; }
  .pg .gridwrap { margin: -14px calc(-1 * var(--bn-gutter)) 0; }
  .pg .tabs { display: flex; width: 100%; } .pg .tabs button { flex: 1; padding: 0 8px; }
  .pg-quick { flex-direction: column; align-items: stretch; }
  .pg-quick__side { flex-direction: row; flex-wrap: wrap; }
  .pg .filters input, .pg .filters select { flex: 1 1 140px; width: auto !important; }
  #drawer { padding: 0 var(--bn-gutter) 24px; box-shadow: none; }
  #drawer .pg-dhead { margin: 0 calc(-1 * var(--bn-gutter)) 6px; padding: 14px var(--bn-gutter) 12px; }
  #drawer .grid2 { grid-template-columns: minmax(0, 1fr); }
  .pg .fsrow .tc, .pg .fsrow .rng { width: auto; }
  .gate__tape { display: none; }
  .gate__mark img { max-width: 280px; }
  .gate__hero { gap: 16px; }
  .gate__line { font-size: var(--bn-fs-15); }
  .gate__steps li { padding: 9px 8px; font-size: var(--bn-fs-11); letter-spacing: .06em; }
  .pg-tb .bn-titleblock__cell { padding: 8px 12px; }
  /* the title block on a phone: the short cells share the first row, the long one gets a row of its own */
  .pg-tb .bn-titleblock__cell:not(.bn-titleblock__cell--mark) { flex: 1 1 auto; }
  .pg-tb .bn-titleblock__cell--grow { order: 9; flex: 1 1 100%; border-right: 0; border-top: var(--bn-hair) solid var(--bn-line-2); }
  /* the bar wraps to two rows here; it scrolls away with the page instead of holding 100 px of a phone */
  .pg-top { position: static; }
}
@media (prefers-reduced-motion: reduce) { #drawer { transition: none; } }
