/*
 * The Desk.
 *
 * ── THE TOKENS ARE COPIED FROM scripts/transmission/public/css/portal.css, ON PURPOSE ────
 * Not imported, because they CANNOT be: portal.css is served from the transmission server's
 * static root (:3847) and this file from the Desk server's (:3850). An @import across origins
 * would make the Desk's typography depend on the one server this tree is under standing
 * orders never to start. So the :root block below is a verbatim copy of portal.css's, and the
 * component classes the gate reuses (.login-wrap, .login-card, .pin-input, .btn*,
 * .inline-input, .login-error, shake) are copied verbatim too — same names, same values — so
 * the two surfaces stay recognisably one product. If a token changes there, change it here.
 *
 * ── NOTHING HERE MAY TRUNCATE A VALUE ────────────────────────────────────────────────────
 * Four of admin's six Vitals carry `unit: 'text'` and their value is a SENTENCE, not a
 * number — 'not in yet — Toast posts a closed day in the early-afternoon run (~13:30);
 * pos_sales reaches Aug 5 so far', and three more like it. Those sentences ARE the fix for
 * four tiles that used to render a bare dash or a misleadingly-bald figure; clipping one puts
 * the bug straight back. So: no `text-overflow: ellipsis` anywhere in this file, no
 * `white-space: nowrap` on a value, no fixed heights on a tile, and `.vital.is-text` spans
 * the full grid row so the sentence has somewhere to go. grep this file for 'ellipsis' — it
 * should stay empty.
 *
 * ── LIGHT ONLY, MATCHING THE PORTAL ──────────────────────────────────────────────────────
 * portal.css has no prefers-color-scheme block and no [data-theme] hooks — the staff portal
 * is a single light theme on --alabaster. A dark Desk would be the only dark surface in the
 * product, so there is deliberately no dark variant here either.
 */

:root {
  --alabaster: #F5EBDB;
  --sage: #82A19C;
  --sandstone: #F8DBB3;
  --rust: #A15D50;
  --deep-shadow: #000;
  --text: #1a1a1a;
  --text-muted: #666;
  --border: #ddd;
  --success: #4a7c59;
  --danger: #c0392b;
  --font-head: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;

  /* Desk-only additions. --warn is the amber the portal already uses inline for
     .char-fill.warn and .status-warn; named here so the alert severities can share it. */
  --warn: #e6a817;
  --card: #fff;
  --shadow: 0 2px 8px rgba(0,0,0,.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/*
 * `hidden` MUST WIN, and without this line it does not.
 *
 * The gate and the Desk share a page and exactly one is meant to be visible, switched by the
 * `hidden` attribute. But `[hidden] { display: none }` lives in the USER-AGENT stylesheet, and
 * `.login-wrap { display: flex }` below is an AUTHOR rule — author beats UA regardless of
 * specificity, so a hidden `.login-wrap` kept its flex box and went on painting a full-height
 * black panel straight over the signed-in Desk. The DOM said hidden:true, `read_page` agreed,
 * and the screenshot showed the login card anyway. Nothing but looking at it would have caught
 * this, which is the entire argument for looking.
 *
 * Applies to every [hidden] on the page (#gate, #desk, #status, #incomplete, #hiddenSect), so
 * any future rule that gives one of them a display value cannot reintroduce the same bug.
 */
[hidden] { display: none !important; }

body {
  font-family: var(--font-body);
  background: var(--alabaster);
  color: var(--text);
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3 { font-family: var(--font-head); }
h1 { font-size: 1.6rem; font-weight: 700; }
h2 { font-size: 1.2rem; font-weight: 600; }
h3 { font-size: 1rem; font-weight: 600; }

/* ── Buttons (copied from portal.css) ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s;
}
.btn:active { opacity: 0.8; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-primary { background: var(--rust); color: #fff; }
.btn-secondary { background: var(--sage); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1.5px solid var(--border); }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.8rem; }
/* The only button in the Portal that spends money. Deliberately NOT the same rust as
   .btn-primary: the confirm on a live rate push must not look like every other primary
   action, and --danger is the token this product already uses for "this one is different". */
.btn-danger { background: var(--danger); color: #fff; }

.inline-input {
  padding: 0.4rem 0.5rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  background: #fff;
  width: 100%;
}
.inline-input:focus { outline: none; border-color: var(--sage); }

/* ── The PIN gate (copied from portal.css's login block) ──────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--deep-shadow);
  padding: 1rem;
}
.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  width: min(360px, 100%);
  text-align: center;
}
.login-card h1 { font-size: 1.3rem; margin-bottom: 0.25rem; }
.login-card .role-name { color: var(--rust); font-size: 0.9rem; margin-bottom: 1.5rem; }
.login-card label {
  display: block;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.gate-select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: #fff;
  margin-bottom: 1rem;
}
.gate-select:focus { outline: none; border-color: var(--sage); }
.gate-pin-label { margin-top: 0.25rem; }
.pin-input {
  font-size: 2rem;
  letter-spacing: 0.4em;
  text-align: center;
  padding: 0.75rem;
  width: 100%;
  border: 2px solid var(--border);
  border-radius: 10px;
  margin-bottom: 1rem;
  font-family: var(--font-body);
}
.pin-input:focus { border-color: var(--sage); outline: none; }
.login-error { color: var(--danger); font-size: 0.85rem; min-height: 1.2em; margin-bottom: 0.75rem; text-align: left; }
.gate-note { font-size: 0.75rem; color: var(--text-muted); margin-top: 1rem; }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%,60% { transform: translateX(-8px); }
  40%,80% { transform: translateX(8px); }
}
.shake { animation: shake 0.4s ease; }

/* ── Header ────────────────────────────────────────────────────────────────────────── */
.desk-header {
  background: var(--deep-shadow);
  color: #fff;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.desk-header h1 { font-size: 1.1rem; color: var(--sandstone); }
.role-badge {
  background: var(--rust);
  color: #fff;
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}
.hdr-spacer { flex: 1; }
.hdr-date {
  background: #1c1c1c;
  color: #fff;
  border: 1px solid #3a3a3a;
  border-radius: 6px;
  padding: 0.3rem 0.45rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
}
.hdr-btn {
  background: transparent;
  color: #cfcfcf;
  border: 1px solid #3a3a3a;
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  cursor: pointer;
}
.hdr-btn:hover { color: #fff; border-color: #666; }

/* ── Page ──────────────────────────────────────────────────────────────────────────── */
.desk-wrap { max-width: 880px; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
.sect { margin-bottom: 1.75rem; }
.sect-head {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
  flex-wrap: wrap;
}
.sect-note { font-size: 0.75rem; color: var(--text-muted); }
.empty-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.5rem 0;
}

/* ── Banners ───────────────────────────────────────────────────────────────────────── */
.banner {
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.1rem;
  font-size: 0.85rem;
  line-height: 1.45;
}
.banner-info { background: var(--sandstone); border: 1.5px solid #e5c68f; }
.banner-danger { background: #fae5e1; border: 1.5px solid var(--danger); color: #7d2a1f; }
/* Added for the push result, which has four outcomes rather than two: running, finished,
   finished-badly, and "we have lost track of it". The last two are visually distinct on
   purpose — a partial push and an unknown push need different actions from the reader.
   Every one of these pairs a hue with a WORD in the banner title, never colour alone. */
.banner-ok { background: #e8f5e9; border: 1.5px solid #2d8a4e; color: #1d5c34; }
.banner-warn { background: #fdf3e3; border: 1.5px solid #b06a00; color: #7a4a00; }
.banner-title { font-weight: 600; display: block; margin-bottom: 0.15rem; }

/* ── Vitals ────────────────────────────────────────────────────────────────────────── */
/*
 * TWO COLUMNS, NOT auto-fit, AND THE PRESET'S ORDER IS NEVER TOUCHED.
 *
 * `repeat(auto-fit, minmax(200px, 1fr))` made four columns at desktop width, so the row of
 * two numbers left two empty cells beside it and the lone F&B figure sat in a quarter-width
 * card. `grid-auto-flow: dense` would have back-filled those holes — and REORDERED the
 * Vitals to do it. presets.js is explicit that the six are in the order Jeff reads them
 * ("how full are we tonight, at what rate, …"), so a layout that rearranges them to look
 * tidier is changing the content. Two fixed columns pairs the numbers, gives every sentence
 * the full width, and leaves the order alone.
 */
.vitals {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
}
@media (min-width: 640px) {
  .vitals { grid-template-columns: 1fr 1fr; }
}
.vital {
  background: var(--card);
  border-radius: 12px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--sage);
  padding: 0.85rem 1rem;
  min-width: 0;                 /* lets a long word wrap instead of blowing the grid out */
  overflow-wrap: anywhere;
}
/* A sentence gets the whole row. This is the line that keeps the caveats readable.
   Same sage accent as a numeric tile, deliberately: a healthy tile is a healthy tile, and
   giving the four caveat-carrying Vitals a rust bar made two-thirds of a perfectly good
   front page look like it was flagging something. Red is reserved for .is-gap. */
.vital.is-text { grid-column: 1 / -1; }
.vital.is-gap { border-left-color: var(--danger); }
.vital-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.vital-value {
  font-family: var(--font-head);
  font-size: 2.1rem;
  /* 1.25, not 1.15: at 1.15 the box was 2px shorter than Playfair's own glyph extent, so the
     '$' on a currency figure sat right on the edge of its line box. Nothing was visibly cut
     (there is no overflow:hidden anywhere here, by policy) but a value that measures taller
     than its container is not a thing to leave in place on the page that shows the numbers. */
  line-height: 1.25;
  margin-top: 0.2rem;
  white-space: normal;
}
.vital.is-text .vital-value {
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.5;
  margin-top: 0.3rem;
}
.vital-value.is-dash { color: var(--text-muted); font-weight: 400; }
.vital-foot {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.45rem;
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ── Chips ─────────────────────────────────────────────────────────────────────────── */
.chip {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.14rem 0.4rem;
  border-radius: 4px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.chip-partial    { background: #fdf1d8; border-color: var(--warn); color: #7a5605; }
.chip-empty      { background: #f0f0f0; border-color: #bbb; color: #555; }
.chip-stale      { background: #fdf1d8; border-color: var(--warn); color: #7a5605; }
.chip-unreadable { background: #fae5e1; border-color: var(--danger); color: #7d2a1f; }
.chip-missing    { background: #fae5e1; border-color: var(--danger); color: #7d2a1f; }
.chip-high { background: #fae5e1; border-color: var(--danger); color: #7d2a1f; }
.chip-med  { background: #fdf1d8; border-color: var(--warn); color: #7a5605; }
.chip-low  { background: #eef3f2; border-color: var(--sage); color: #3f5d58; }

/* ── The calm Desk ─────────────────────────────────────────────────────────────────── */
/* Deliberately loud about being quiet. A blank region here is what a broken Desk looks
   like, so an all-clear says all-clear in words. */
.calm {
  background: var(--card);
  border: 1.5px dashed var(--sage);
  border-radius: 12px;
  padding: 1.5rem 1.25rem;
  text-align: center;
}
.calm-head { font-family: var(--font-head); font-size: 1.2rem; color: var(--success); }
.calm-sub { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.4rem; line-height: 1.5; }

/* ── Alert lanes ───────────────────────────────────────────────────────────────────── */
.lane { margin-bottom: 1.1rem; }
.lane-head {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}
.lane-head h3 { font-size: 0.95rem; }
.lane-count { font-size: 0.72rem; color: var(--text-muted); }

.alert {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--sage);
  border-radius: 8px;
  padding: 0.8rem 0.9rem;
  margin-bottom: 0.5rem;
  overflow-wrap: anywhere;
}
.alert.sev-high { border-left-color: var(--danger); }
.alert.sev-med  { border-left-color: var(--warn); }
.alert.sev-low  { border-left-color: var(--sage); }

/*
 * A MODULE-FAILURE ALERT IS NOT A NORMAL ALERT AND MUST NOT LOOK LIKE ONE.
 * It means the Desk on screen is incomplete — some Vital or pin is MISSING rather than zero.
 * Heavier border on all four sides, a tinted field, and a ribbon that says so in words.
 */
.alert.is-module-failure {
  border: 2px solid var(--danger);
  border-left-width: 7px;
  background: #fff7f5;
  box-shadow: 0 2px 10px rgba(192,57,43,.14);
}
.alert-ribbon {
  display: inline-block;
  background: var(--danger);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 0.18rem 0.45rem;
  border-radius: 4px;
  margin-bottom: 0.4rem;
}
.alert-head {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.alert-title { font-weight: 600; font-size: 0.92rem; }
a.alert-title { color: var(--rust); text-decoration: none; border-bottom: 1px solid rgba(161,93,80,.35); }
a.alert-title:hover { border-bottom-color: var(--rust); }
.alert-body { font-size: 0.83rem; color: #333; line-height: 1.5; margin-top: 0.3rem; }
.alert-key { font-size: 0.66rem; color: var(--text-muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; margin-top: 0.35rem; }
.alert-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
}
.snooze-select {
  padding: 0.35rem 0.4rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  background: #fff;
}
.alert-locked { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.5rem; font-style: italic; }
.alert-msg { font-size: 0.75rem; margin-top: 0.4rem; }
.alert-msg.ok  { color: var(--success); }
.alert-msg.err { color: var(--danger); }

/* ── Snoozed / hidden ──────────────────────────────────────────────────────────────── */
#hiddenSect details {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
}
.hidden-summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}
.hidden-list { margin-top: 0.6rem; }
.hidden-item {
  border-top: 1px solid var(--border);
  padding: 0.55rem 0;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}
.hidden-item:first-child { border-top: none; }
.hidden-item .hidden-title { font-weight: 600; }
.hidden-item .hidden-why { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.15rem; }
.hidden-item .hidden-body { font-size: 0.78rem; color: #444; margin-top: 0.2rem; line-height: 1.45; }

/* ── Pinned ────────────────────────────────────────────────────────────────────────── */
.pin {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  overflow-wrap: anywhere;
}
.pin-main { flex: 1; min-width: 0; }
.pin-label { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.pin-value { font-family: var(--font-head); font-size: 1.4rem; line-height: 1.2; margin-top: 0.1rem; }
.pin.is-text .pin-value { font-family: var(--font-body); font-size: 0.9rem; font-weight: 500; line-height: 1.5; }
.pin-value.is-dash { color: var(--text-muted); font-family: var(--font-body); font-size: 1rem; }
.pin-foot { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; margin-top: 0.35rem; font-size: 0.7rem; color: var(--text-muted); }

.pin-add { margin-top: 0.6rem; }
.pin-add > summary { font-size: 0.75rem; color: var(--text-muted); cursor: pointer; }
.pin-add-row { display: flex; gap: 0.5rem; align-items: center; margin-top: 0.5rem; }
.pin-add-row .inline-input { flex: 1; }
.pin-add-msg { font-size: 0.75rem; margin-top: 0.35rem; }
.pin-add-msg.ok  { color: var(--success); }
.pin-add-msg.err { color: var(--danger); }

/* The pin picker's select. Same box as .inline-input — it replaced one, and the row it sits
   in should not change shape because the control did. `min-width: 0` matters: a select whose
   longest option is 'MTD revenue vs plan — house.mtd_vs_projection' will otherwise refuse to
   shrink below that width and push the Pin button off a 375px screen. */
.inline-select {
  flex: 1;
  min-width: 0;
  padding: 0.4rem 0.5rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  background: #fff;
  color: var(--text);
}
.inline-select:focus { outline: none; border-color: var(--sage); }
.inline-select:disabled { background: #f4f4f4; color: var(--text-muted); }
/* Nothing left to pin is a state, not a failure — the message below the row says so, and the
   row itself just goes quiet. */
.pin-add.is-exhausted .pin-add-msg { color: var(--text-muted); }

/* The un-hide control in the Snoozed row. */
.hidden-actions { margin-top: 0.4rem; }

/* ── Teams — the slow path, kept quiet ─────────────────────────────────────────────── */
.sect-quiet h2 { color: var(--text-muted); font-size: 1.05rem; }
.team { margin-bottom: 0.9rem; }
.team-name {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.25rem;
  margin-bottom: 0.4rem;
}
.mod-row { padding: 0.4rem 0; display: flex; gap: 0.75rem; align-items: baseline; flex-wrap: wrap; }
.mod-name { font-size: 0.85rem; font-weight: 600; min-width: 7rem; }
.mod-boards { display: flex; gap: 0.55rem; flex-wrap: wrap; }
.mod-boards a { font-size: 0.8rem; color: var(--rust); text-decoration: none; border-bottom: 1px solid rgba(161,93,80,.3); }
.mod-boards a:hover { border-bottom-color: var(--rust); }
.mod-none { font-size: 0.75rem; color: var(--text-muted); font-style: italic; }
.mod-actions { font-size: 0.7rem; color: var(--text-muted); }

.desk-foot {
  border-top: 1px solid var(--border);
  padding-top: 0.8rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ══ THE BOARDS ═════════════════════════════════════════════════════════════════════════
 *
 * IN THIS FILE, NOT A SECOND STYLESHEET. The Boards are the same product as the Desk and
 * they reuse its components wholesale — .sect, .vital, .chip, .banner, .empty-note, .btn,
 * the whole gate. A board.css would mean two places to change a token and two chances for a
 * Board to stop looking like the Desk. What follows is only what the Desk has no equivalent
 * for: tables, the stat strip, and the per-Board cards.
 *
 * ── NOTHING HERE MAY TRUNCATE A VALUE, AND NOTHING MAY SCROLL THE PAGE SIDEWAYS ─────────
 * The same rule as the top of this file, plus its Board-shaped corollary: three of these
 * five pages are tables with six or seven columns, and on a 375px screen those cannot fit.
 * They scroll INSIDE .table-wrap. Wrapping the table instead would either clip an error
 * string (forbidden — a Mews error is the most useful text on the Audit Board) or make the
 * whole document scroll horizontally, which loses the header and the nav too.
 */

/* ── Board chrome ──────────────────────────────────────────────────────────────────── */
.hdr-home {
  color: var(--sandstone);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid #3a3a3a;
  border-radius: 6px;
  padding: 0.3rem 0.55rem;
}
.hdr-home:hover { color: #fff; border-color: #666; }

.board-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}
.board-nav-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  margin-right: 0.2rem;
}
.board-nav-item {
  font-size: 0.82rem;
  color: var(--rust);
  text-decoration: none;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  border: 1px solid rgba(161,93,80,.3);
}
.board-nav-item:hover { border-color: var(--rust); }
/* The Board you are on is a label, not a link to itself. */
.board-nav-item.is-here {
  background: var(--rust);
  border-color: var(--rust);
  color: #fff;
  font-weight: 600;
}

/* ── The stat strip ────────────────────────────────────────────────────────────────── */
/* The answer, above the working. auto-fit is right here in a way it was not for Vitals:
   these are independent readings in no meaningful order, so reflowing them is not editing
   the content the way reordering Jeff's six would be. */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.7rem;
  margin-bottom: 0.9rem;
}
.stat {
  background: var(--card);
  border-radius: 12px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--sage);
  padding: 0.75rem 0.9rem;
  min-width: 0;
  overflow-wrap: anywhere;
}
.stat-good { border-left-color: var(--success); }
.stat-warn { border-left-color: var(--warn); }
.stat-bad  { border-left-color: var(--danger); }
.stat-label {
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.stat-value {
  font-family: var(--font-head);
  font-size: 1.5rem;
  line-height: 1.3;
  margin-top: 0.15rem;
}
.stat-value.is-dash { font-family: var(--font-body); font-size: 1rem; color: var(--text-muted); }
.stat-note { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.3rem; line-height: 1.45; }

/* ── Tables ────────────────────────────────────────────────────────────────────────── */
/* THE SCROLL LIVES HERE, not on the page. */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 10px;
}
.board-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.82rem;
}
.board-table th {
  text-align: left;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 0.55rem 0.7rem;
  border-bottom: 1.5px solid var(--border);
  white-space: nowrap;
  background: #faf7f2;
  position: sticky;
  top: 0;
}
.board-table td {
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid #eee;
  vertical-align: top;
  line-height: 1.45;
}
.board-table tr:last-child td { border-bottom: none; }
.board-table tbody tr:hover { background: #fdfbf8; }

/* Column shapes. `col-wide` is the one that may wrap — error strings and reasons live there
   and must never be clipped. Everything else stays on one line so the columns stay readable
   while the box scrolls. */
.col-date   { white-space: nowrap; }
.col-num    { white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.col-bar    { white-space: nowrap; }
.col-target { white-space: nowrap; font-weight: 600; }
.col-status { white-space: nowrap; }
.col-flags  { white-space: nowrap; }
.col-wide   { min-width: 14rem; overflow-wrap: anywhere; }

.cell-strong { font-weight: 600; }
.cell-sub    { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.15rem; }
.cell-sub.is-up   { color: var(--success); }
.cell-sub.is-down { color: var(--rust); }
/* A GAP IS NAMED, NOT BLANK — an empty cell reads as a zero at a glance. */
.cell-gap    { color: var(--text-muted); font-style: italic; }
.row-link    { color: var(--rust); font-size: 0.78rem; text-decoration: none; border-bottom: 1px solid rgba(161,93,80,.3); }
.row-link:hover { border-bottom-color: var(--rust); }

.flag-list { display: flex; gap: 0.3rem; flex-wrap: wrap; }

/* ── Recommendations: the discount stack inside one cell ───────────────────────────── */
.disc-list { display: flex; flex-direction: column; gap: 0.25rem; }
.disc { display: flex; gap: 0.45rem; align-items: baseline; flex-wrap: wrap; }
.disc-prog { font-weight: 600; }
.disc-move { font-variant-numeric: tabular-nums; }
.disc-now  { font-size: 0.72rem; color: var(--text-muted); }

/* ── Audit: one card per push batch ────────────────────────────────────────────────── */
.push {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem;
  margin-bottom: 1rem;
}
/* A batch with failures is not "mostly fine" — Mews and sol.db disagree about those dates. */
.push.has-failures { border-color: var(--danger); box-shadow: 0 2px 10px rgba(192,57,43,.12); }
.push-head { display: flex; gap: 0.6rem; align-items: baseline; flex-wrap: wrap; margin-bottom: 0.3rem; }
.push-title { display: flex; gap: 0.5rem; align-items: baseline; flex-wrap: wrap; flex: 1; min-width: 0; }
.push-id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85rem; font-weight: 600; overflow-wrap: anywhere; }
.push-when { font-size: 0.75rem; color: var(--text-muted); }
.push-counts { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.push-meta { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.6rem; line-height: 1.5; }
.push .table-wrap { border-radius: 8px; }

/* ── Rate Calendar: the pointer card ───────────────────────────────────────────────── */
.pointer-card {
  background: var(--card);
  border: 1.5px dashed var(--sage);
  border-radius: 12px;
  padding: 1.2rem;
}
.pointer-head { font-family: var(--font-head); font-size: 1.1rem; margin-bottom: 0.5rem; }
.pointer-body { font-size: 0.85rem; color: #333; line-height: 1.6; margin-bottom: 0.7rem; }
.pointer-note { font-size: 0.72rem; color: var(--text-muted); line-height: 1.5; margin-top: 0.8rem; }
.pointer-links { display: flex; flex-direction: column; gap: 0.4rem; }
.pointer-link { font-size: 0.85rem; color: var(--rust); text-decoration: none; border-bottom: 1px solid rgba(161,93,80,.3); align-self: flex-start; }
.pointer-link:hover { border-bottom-color: var(--rust); }

/* ── The push panel: the only control in the Portal that spends money ──────────────── */
/*
 * Styled to be VISIBLY a different weight of thing from the tables above it. The solid
 * --danger edge on the confirmation card is the one place in this stylesheet that border is
 * used for emphasis rather than for an error, and it is doing the same job: this is the part
 * of the page where a click is irreversible.
 *
 * Nothing here carries meaning by colour alone — the confirmation states its counts in words,
 * the checkbox label spells out what ticking it approves, and the result banners all lead
 * with a title.
 */
.push-panel {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem;
}
.push-note { font-size: 0.8rem; color: var(--text-muted); line-height: 1.55; margin-bottom: 0.9rem; }
.push-warn {
  background: #fdf3e3;
  border: 1.5px solid #b06a00;
  color: #7a4a00;
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  font-size: 0.82rem;
  line-height: 1.5;
  margin-bottom: 0.9rem;
}
.push-confirm {
  margin-top: 1rem;
  border: 2px solid var(--danger);
  border-radius: 12px;
  padding: 1.1rem;
  background: var(--alabaster);
}
.push-confirm-head { font-family: var(--font-head); font-size: 1.05rem; margin: 0 0 0.5rem; }
.push-confirm-count { font-size: 0.95rem; margin: 0 0 0.6rem; }
.push-confirm-warn {
  font-size: 0.85rem;
  line-height: 1.6;
  color: #7d2a1f;
  margin: 0 0 0.9rem;
}
/* The deliberate second act. Given real hit area — a checkbox that is fiddly to tick is a
   checkbox people click twice, and the second click lands on the button behind it. */
.push-ack {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0.9rem 0;
  cursor: pointer;
}
.push-ack input { margin-top: 0.2rem; width: 1.05rem; height: 1.05rem; flex: none; }
.push-buttons { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.push-status { margin-top: 1rem; }
.push-status .banner { margin-bottom: 0; }
@media (max-width: 480px) {
  .push-panel, .push-confirm { padding: 0.9rem; }
  .push-buttons .btn { width: 100%; justify-content: center; }
}

/* ── House Vitals: the full tile grid ──────────────────────────────────────────────── */
/* Same .vital component as the Desk, in a grid that is allowed to reflow — this page has no
   preset order to preserve, so auto-fit is honest here. */
.tile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
  margin-bottom: 1rem;
}
@media (min-width: 640px) {
  .tile-grid { grid-template-columns: 1fr 1fr; }
  .tile-grid .vital.is-text { grid-column: 1 / -1; }
}
.front-page-mark {
  display: inline-block;
  margin-left: 0.4rem;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  background: var(--sandstone);
  border: 1px solid #e5c68f;
  color: #7a5605;
  border-radius: 4px;
  padding: 0.1rem 0.32rem;
}
/* The id, which the Desk does not show. Small, monospace, and never the loudest thing. */
.tile-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.64rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  overflow-wrap: anywhere;
}

/* ── Runs: the watchdog card ───────────────────────────────────────────────────────── */
.wd-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem 1rem;
}
.wd-head { font-weight: 600; font-size: 0.9rem; }
/* overflow-wrap because these carry AUTHORED content, not just prose the app wrote.
   transmission_content.meta stores things like {"image":"https://…-1785021759408-sd2phj.jpg"},
   and one unbreakable URL pushed the whole page to 387px at a 375px viewport — the body
   scrolling sideways, which is the one thing no Board may do. The element rects all measured
   under 375; it was the TEXT NODE overflowing its block box, which is why it took a
   document-width check rather than an element sweep to find. */
.wd-body { font-size: 0.82rem; color: #333; line-height: 1.5; margin-top: 0.25rem; overflow-wrap: anywhere; }
.wd-warn {
  font-size: 0.8rem;
  background: #fdf1d8;
  border: 1px solid var(--warn);
  color: #7a5605;
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  margin-top: 0.6rem;
  line-height: 1.5;
}
.wd-list { margin-top: 0.7rem; overflow-wrap: anywhere; }
.wd-list-head { font-size: 0.66rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 0.3rem; }
.wd-list-empty { font-size: 0.8rem; color: var(--text-muted); }

/* ── A Board that could not be built ───────────────────────────────────────────────── */
/* Loud, and it names the failure. A page that fails must never look like a page with nothing
   to report — the same rule the Desk's calm card exists to keep from the other direction. */
.board-failure {
  background: #fff7f5;
  border: 2px solid var(--danger);
  border-radius: 12px;
  padding: 1.1rem;
}
.board-failure-head { font-family: var(--font-head); font-size: 1.1rem; color: #7d2a1f; }
.board-failure-body { font-size: 0.85rem; color: #333; line-height: 1.55; margin-top: 0.4rem; overflow-wrap: anywhere; }
.board-failure-note { font-size: 0.75rem; color: var(--text-muted); line-height: 1.5; margin-top: 0.6rem; }

/* ── Responsive ────────────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .desk-wrap { padding: 1rem 0.75rem 2.5rem; }
  .desk-header { padding: 0.7rem 0.85rem; gap: 0.45rem; }
  .desk-header h1 { font-size: 1rem; }
  .hdr-spacer { flex-basis: 100%; height: 0; }   /* controls wrap onto their own line */
  .hdr-date, .hdr-btn { font-size: 0.72rem; }
  .vitals { grid-template-columns: 1fr; }
  .vital-value { font-size: 1.9rem; }
  .alert-actions .btn { flex: 1; justify-content: center; }
  .snooze-select { flex: 1; }
  .pin { flex-wrap: wrap; }
  .pin .btn { width: 100%; justify-content: center; }
  .mod-name { min-width: 100%; }

  /* Boards. The header wraps to two lines rather than shrinking the back-link out of reach,
     and the stat strip goes to one column — at 375px a two-column strip puts a currency
     figure and its caveat in about eleven characters of width. */
  .hdr-home { font-size: 0.72rem; padding: 0.25rem 0.45rem; }
  .stat-row { grid-template-columns: 1fr; }
  .stat-value { font-size: 1.35rem; }
  .board-table { font-size: 0.78rem; }
  .col-wide { min-width: 11rem; }
  .push { padding: 0.75rem 0.6rem; }
  .pointer-card { padding: 0.9rem; }
  .pointer-card .btn { width: 100%; justify-content: center; }
}

/* ── The nav ───────────────────────────────────────────────────────────────────────────
 *
 * ONE COMPONENT ON EVERY PAGE: a trigger in the black header, and a drawer that is both the
 * Team → Module → Board tree and the type-to-jump filter. Injected by js/portal-nav.js, so
 * these classes appear in no HTML file — see the note at the top of that file on why the
 * seventeen shells were not each given the markup.
 *
 * DESKTOP AND PHONE ARE THE SAME PANEL, not two navigations — one media query and a class on
 * <body>, no second markup tree. Above 1024px it is DOCKED: always on screen, no scrim,
 * nothing to open, and the page inset by its width. Below that there is no room to give away,
 * so the identical panel becomes an overlay drawer over a scrim. Two implementations would be
 * two things to keep in step and the phone one would be the one that rotted — he reads this
 * on a phone.
 */

.nav-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #1c1c1c;
  color: #e6e6e6;
  border: 1px solid #3a3a3a;
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  cursor: pointer;
  white-space: nowrap;
}
.nav-trigger:hover { color: #fff; border-color: var(--sandstone); }
.nav-trigger-glyph { font-size: 0.95rem; line-height: 1; color: var(--sandstone); }
/* A search-looking control, because that is what it is. A bare hamburger would not tell
   anyone there is a filter behind it, and a bare ⌘K hint is a feature nobody discovers. */
.nav-trigger-text { font-weight: 600; }
.nav-trigger-key {
  font-family: var(--font-body);
  font-size: 0.62rem;
  color: #8f8f8f;
  border: 1px solid #3a3a3a;
  border-radius: 4px;
  padding: 0.05rem 0.25rem;
}

.nav-wrap { position: fixed; inset: 0; z-index: 60; }
.nav-scrim { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.nav-panel {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: min(360px, 88vw);
  background: var(--card);
  box-shadow: 4px 0 22px rgba(0,0,0,.28);
  display: flex;
  flex-direction: column;
}
/* The page behind must not scroll under the drawer on a phone, where the drawer is most of
   the screen and a stray touch-drag reads as the drawer failing to respond. */
body.nav-is-open { overflow: hidden; }

.nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--deep-shadow);
  color: #fff;
  padding: 0.8rem 0.9rem;
}
.nav-head-title { font-family: var(--font-head); font-size: 1.05rem; color: var(--sandstone); }
.nav-close {
  background: transparent;
  border: none;
  color: #cfcfcf;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.2rem;
}
.nav-close:hover { color: #fff; }

.nav-search { padding: 0.7rem 0.8rem 0.5rem; border-bottom: 1px solid var(--border); }
.nav-input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
}
.nav-input:focus { outline: 2px solid var(--sage); outline-offset: 1px; }

.nav-body { flex: 1; overflow-y: auto; padding: 0.5rem 0.55rem 1rem; }
.nav-group { margin-bottom: 0.5rem; }
.nav-team {
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 0.7rem 0.45rem 0.25rem;
}
.nav-module {
  font-family: var(--font-head);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  padding: 0.4rem 0.45rem 0.15rem;
}

.nav-item {
  display: block;
  text-decoration: none;
  color: var(--text);
  padding: 0.4rem 0.55rem;
  border-radius: 6px;
  border: 1px solid transparent;
}
/* Hover and keyboard selection are ONE state. Two highlights on screen at once is a menu
   where Enter goes somewhere other than the thing that looks chosen. */
.nav-item.is-active { background: #f4efe6; border-color: rgba(161,93,80,.35); }
.nav-item-line { display: flex; align-items: center; gap: 0.4rem; }
.nav-item-label { font-size: 0.88rem; }
.nav-item-where { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.1rem; }
.nav-item-note { font-size: 0.7rem; color: var(--text-muted); line-height: 1.45; margin-top: 0.15rem; }

/* WHERE YOU ARE, stated in words as well as in colour. A highlight alone is a convention;
   'you are here' is a sentence, and it is not a link to itself. */
.nav-item.is-here { background: var(--rust); border-color: var(--rust); color: #fff; }
.nav-item.is-here .nav-item-note, .nav-item.is-here .nav-item-where { color: #f3ded9; }
.nav-item-hereflag {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(255,255,255,.22);
  padding: 0.1rem 0.35rem;
  border-radius: 10px;
}

/* AN EMBEDDED TOOL. A different colour and a ⧉, because it is still a different kind of
   thing — somebody else's live page, wrapped — even though it now opens in place and gets
   'you are here' like any Board. The glyph is not ↗: nothing here opens a new tab. */
.nav-item.is-tool .nav-item-label { color: var(--sage); font-weight: 600; }
.nav-item-out { font-size: 0.78rem; color: var(--sage); }
.nav-item.is-tool.is-active { background: #eef3f2; border-color: rgba(130,161,156,.5); }
.nav-item.is-tool.is-here .nav-item-label { color: #fff; }

.nav-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  padding: 0.6rem 0.55rem;
}
.nav-note-inline { padding-top: 0.1rem; }
.nav-note-stale { color: var(--danger); }

.nav-foot {
  border-top: 1px solid var(--border);
  padding: 0.55rem 0.8rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.nav-foot-line { font-size: 0.68rem; color: var(--text-muted); overflow-wrap: anywhere; }

@media (max-width: 480px) {
  /* At 375px the header already wraps its controls onto a second line. The trigger keeps
     its words and drops the hotkey — there is no keyboard to press it with. */
  .nav-trigger { font-size: 0.72rem; padding: 0.25rem 0.45rem; }
  .nav-trigger-key { display: none; }
  .nav-panel { width: 88vw; }
}

/* ── DOCKED ──────────────────────────────────────────────────────────────────────────────
 * js/portal-nav.js puts `nav-docked` on <body> above 1024px. Everything here is the
 * difference between a drawer and furniture:
 *
 *   the wrap stops covering the page (no fixed inset:0, so nothing behind it is blocked)
 *   the scrim goes away entirely — there is nothing to dismiss
 *   the page is inset by the panel's width instead of sitting under it
 *
 * The width is a custom property so the panel and the inset can never disagree; getting
 * those two out of step is a permanent 20px of content hidden under the menu.
 */
body.nav-docked { --nav-w: 300px; }
body.nav-docked .nav-wrap {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--nav-w);
  z-index: 40;
}
body.nav-docked .nav-scrim { display: none; }
body.nav-docked .nav-panel {
  width: var(--nav-w);
  box-shadow: none;
  border-right: 1px solid var(--border);
}
/* The header is fixed-position furniture on these pages too, so both it and the page body
   move over. `#desk`/`#board`/`#tool` are the three page roots; the gate is NOT inset — a
   sign-in screen with a menu beside it would be offering doors to someone with no key yet. */
body.nav-docked #desk,
body.nav-docked #board,
body.nav-docked #tool { padding-left: var(--nav-w); }
/* Docked, the trigger is hidden by JS. This is the belt to that braces: if the script that
   hides it ever fails to run, a button that opens an already-open panel is at least not
   sitting in the header looking broken. */
body.nav-docked .nav-trigger { display: none; }
/* And the same for the ×. close() refuses while docked — the layout is built around the
   panel and closing it would leave a 300px hole — so the control would be a button that
   visibly does nothing, which is worse than no button. */
body.nav-docked .nav-close { display: none; }

/* WHILE THE PIN GATE IS UP THERE IS NO NAVIGATION, docked or otherwise. portal-ui.js's
   Gate.show()/hide() set this class. Without it a signed-out viewer meets a sign-in card with
   an empty panel beside it reading 'Sign in to see where you can go' — a menu with nothing in
   it, offered before anyone asked. The panel comes back the moment the PIN lands. */
body.portal-gated .nav-wrap,
body.portal-gated .nav-trigger { display: none; }
body.portal-gated.nav-docked #desk,
body.portal-gated.nav-docked #board,
body.portal-gated.nav-docked #tool { padding-left: 0; }

/* ── THE TOOL SHELL ──────────────────────────────────────────────────────────────────────
 * A page whose content area is an <iframe> holding a live staff-portal tool.
 *
 * THE FRAME IS SIZED IN VIEWPORT UNITS, NOT BY ITS CONTENT. A cross-origin frame cannot be
 * measured from out here — its scrollHeight is unreadable — so 'size it to fit' is not
 * available at any price. It gets the window minus the chrome above it and scrolls inside
 * itself, which is the only arrangement that does not either clip the tool or leave a page
 * with two scrollbars fighting.
 */
.tool-wrap {
  max-width: none;
  margin: 0;
  padding: 0.6rem 0.9rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  /* Room for the header above. Not a magic number reached by nudging: 3.4rem is the header's
     own padding + line box, and the two move together because both are in rem. */
  min-height: calc(100vh - 3.4rem);
}
.tool-note {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.tool-note-what { color: var(--text); }
.tool-note-sep { color: var(--border); }
.tool-note-where { overflow-wrap: anywhere; opacity: 0.75; }

.tool-frame {
  width: 100%;
  flex: 1;
  min-height: calc(100vh - 8rem);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  /* The frame is the page's own scroll region. Without this the tool's scrollbar and the
     Portal's are both on screen and the wrong one moves. */
  display: block;
}

@media (max-width: 640px) {
  /* AN IFRAME ON A PHONE IS THE HARD CASE and this does not pretend otherwise. The tools are
     desktop layouts; at 375px they will be scrolled in both directions inside the frame. What
     this does is make the frame worth scrolling — full bleed, as tall as the screen allows —
     rather than a small window onto a wide page. 'Open on its own' in the header is the real
     answer on a phone and it is one tap away. */
  .tool-wrap { padding: 0.4rem 0 0.5rem; gap: 0.35rem; }
  .tool-note { padding: 0 0.6rem; }
  .tool-frame {
    border-left: none;
    border-right: none;
    border-radius: 0;
    min-height: calc(100vh - 10rem);
    /* iOS Safari treats an iframe as un-scrollable and inflates it to its content height
       unless the SCROLLING is delegated to a wrapper. There is no wrapper here on purpose —
       that trick needs -webkit-overflow-scrolling on a parent and a frame sized to its
       content, and the content height of a cross-origin frame is exactly the number that
       cannot be read. So on iOS this scrolls the page, not the frame. Noted, not fixed. */
  }
}
