/* Reservision dashboard, 1.6 redesign (plans/reservision-dashboard-redesign.md Task 2): one dark look, drawn from
   docs/mocks/2026-11-06-console/dashboard-views.html (the Twenty-CRM-style console: sidebar, tables, cards).
   Part 1 is the new tokens, shell and primitives; part 2 keeps every older rule the not-yet-redrawn views read,
   recoloured through the --a-* aliases below; part 3 is the phone. Fonts come from tokens.css. */

/* ---------- 1. tokens ---------- */
/* ":root[data-theme]" matches tokens.css's own dark block in weight, and this file loads after it, so these
   values win whatever data-theme the page carries: the dashboard has one look. */
:root, :root[data-theme] {
  color-scheme: dark;
  --page: #0D0D0F; --side: #111113; --surface: #171719; --hover: #202023; --border: #2A2A2E; --border-2: #35353a;
  --text: #F5F5F4; --muted: #A1A1AA; --dim: #6f6f78;
  --ok: #1f6b3a; --ok-ink: #8fd3a6; --warn-ink: #e7c067; --bad-ink: #ff7b72; --staff: #B9A6E8; --gold: #D4AF37;
  --r: 8px; --r-sm: 6px;
  --sb-w: 240px;
  /* The names the older rules read, pointed at the new tokens. */
  --a-bg: var(--page);
  --a-surface: var(--hover);
  --a-card: var(--surface);
  --a-ink: var(--text);
  --a-ink-2: var(--text);
  --a-muted: var(--muted);
  --a-rule: var(--border);
  --a-on-ink: #0D0D0F;
  --a-gold: var(--gold);
  --a-err: var(--bad-ink);
  --a-staff: #5B4A8A;            /* a fill under white text (help bar, suggested rows) */
  --a-staff-ink: var(--staff);   /* purple text and borders */
  --a-owner: var(--ok);          /* a fill under white text */
  --a-owner-ink: var(--ok-ink);  /* green text and borders */
  --f-wordmark: var(--font-wordmark, "Anton", "Archivo Narrow", "Arial Narrow", Impact, sans-serif);
  --f-headline: var(--font-headline, var(--f-wordmark));
  --f-name: var(--font-name, var(--font-display, "Archivo Black", "Arial Black", sans-serif));
  --f-body: var(--font-body, "Inter", system-ui, -apple-system, "Segoe UI", sans-serif);
  --a-max: 1040px;
  --a-gutter: var(--s4, 16px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--a-bg);
  color: var(--a-ink);
  font-family: var(--f-body);
  font-size: 14px;
  line-height: 1.45;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--a-ink); }
[hidden] { display: none !important; }
.offscreen { position: fixed; left: -9999px; top: 0; opacity: 0; }
:focus-visible { outline: 2px solid var(--staff); outline-offset: 2px; }

/* ---------- 2. the shell (mock: every laptop page) ---------- */
/* The sidebar is fixed on the left; .content is the column beside it (header, banners, .main, footer). */
.sb {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 15; width: var(--sb-w); overflow-y: auto;
  background: var(--side); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 4px; padding: 18px 12px 14px;
}
body:has(.banner:not([hidden])) .sb { top: 32px; }
.content { flex: 1; min-width: 0; margin-left: var(--sb-w); display: flex; flex-direction: column; min-height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 10px 16px; text-decoration: none; color: var(--text); min-width: 0; }
.brand .wordmark { font-family: var(--f-wordmark); font-size: 22px; letter-spacing: 0.02em; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a, .nav button {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 9px 10px;
  border: 0; border-radius: var(--r-sm); background: none; color: var(--muted); text-decoration: none; text-align: left;
  font: inherit; font-weight: 500; cursor: pointer;
}
.nav a:hover, .nav button:hover { background: var(--hover); color: var(--text); }
/* 1.7.0 (Task 1.2): the row's icon, an inline SVG from admin.js ICONS (navIcon); the empty placeholder square is gone. */
.nav-i { width: 16px; height: 16px; display: grid; place-items: center; flex: none; position: relative; }
.nav-ico { width: 16px; height: 16px; }
.nav a.on, .nav button.on, .nav [aria-current="page"] { background: var(--hover); color: var(--text); font-weight: 600; }
.nav .count { background: var(--border-2); color: var(--text); border-radius: 999px; padding: 0 7px; font-size: 11px; font-weight: 700; min-width: 20px; text-align: center; }
.nav .count:empty { display: none; }
.nav .count.hot { background: var(--text); color: #0D0D0F; }
.sb-label { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; color: var(--dim); padding: 16px 10px 6px; text-transform: uppercase; }
.sb-label.staff { color: var(--staff); }
.sb .spacer { flex: 1; }
.spacer { flex: 1; }
.me { display: flex; align-items: center; gap: 10px; padding: 10px; border-top: 1px solid var(--border); margin-top: 8px; min-width: 0; }
.me .who { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; max-width: none; color: var(--text); }
.me .who b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .who span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.caret { color: var(--dim); }
.me .caret { margin-left: auto; }
.av { width: 30px; height: 30px; border-radius: 50%; background: var(--hover); border: 1px solid var(--border-2); display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; color: var(--text); }
.av.lg { width: 56px; height: 56px; font-size: 18px; border-radius: 12px; }
.av.sm { width: 22px; height: 22px; font-size: 9px; }
.foot-version { padding: 4px 10px 0; font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; }

/* The phone top bar (mock phone page): hidden on a laptop, shown at <= 640 px. */
.ptop { display: none; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); background: var(--side); position: sticky; top: 0; z-index: 10; }
/* The top bar's brand: the sidebar's lockup without the sidebar's bottom padding, so it centres on the bar (walk fix F2). */
.ptop .brand { padding: 0; }
.burger { width: 36px; height: 36px; border: 1px solid var(--border-2); border-radius: 8px; display: grid; place-items: center; color: var(--text); background: transparent; font-size: 16px; padding: 0; cursor: pointer; }

.main { flex: 1; width: 100%; min-width: 0; padding: 26px 32px 40px; display: flex; flex-direction: column; gap: 18px; }
.main > * { min-width: 0; }
.main > .crumbs { font-size: 13px; color: var(--muted); margin: 0; }
.main > .crumbs b { color: var(--text); font-weight: 500; }
.main > .crumbs a { color: var(--muted); text-decoration: none; }
.main > .crumbs a:hover { color: var(--text); text-decoration: underline; }
.head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.head h1 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.01em; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.head .right { display: flex; gap: 8px; align-items: center; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.org-head { display: flex; align-items: center; gap: 16px; }
.subtabs { display: flex; gap: 22px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.subtabs::-webkit-scrollbar { display: none; }
.subtabs a, .subtabs button {
  padding: 8px 0 10px; color: var(--muted); text-decoration: none; font: inherit; font-weight: 500; font-size: 14px; white-space: nowrap;
  background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer;
}
.subtabs a:hover, .subtabs button:hover { color: var(--text); }
.subtabs a.on, .subtabs button.on, .subtabs [aria-current="page"] { color: var(--text); font-weight: 600; border-bottom-color: var(--text); }

/* The help bar (mock page 25): staff helping an org as its Admin. No negative margins: it sits atop .content. */
.banner { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; min-height: 32px; background: #3f2f6e; color: #fff; padding: 7px 16px; font-size: 12px; font-weight: 600; position: relative; z-index: 16; }
.banner a, .banner button { color: #fff; background: none; border: 1px solid rgba(255, 255, 255, .6); border-radius: 999px; padding: 1px 9px; font: inherit; font-size: 11px; text-decoration: none; cursor: pointer; }
.banner a:hover, .banner button:hover { background: rgba(255, 255, 255, 0.16); }
/* View as (look only): the line above the page, gold edge. */
.view-banner { border: 1px solid var(--border); border-left: 3px solid var(--gold); border-radius: var(--r-sm); background: var(--surface); color: var(--text); padding: 8px 16px; margin: 0; font-size: 13px; }
.view-banner .link { display: inline; font-size: 13px; }

/* The sidebar rows the shell markup draws (index.html, drawSidebar, drawBottomNav, drawMe; mock pages 1, 2, 12b). */
/* The mock's brand mark: a white circle holding "R" (a span, not the old mascot image). The phone menu's lockup
   (openPhoneMenu .pm-lockup) draws the same badge (walk fix F2: it showed a bare "R"). */
.brand .mascot, .pm-lockup .mascot { width: 26px; height: 26px; border-radius: 50%; background: var(--text); color: #0D0D0F; display: grid; place-items: center; font-size: 13px; font-weight: 800; line-height: 1; flex: none; }
/* .nav-l: the left half of a row (icon + words in .nav-t); 1.7.0 moved the flex here from the old inline style. */
.nav-l { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.nav-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nav-l .av.sm { width: 18px; height: 18px; font-size: 8px; }

/* The fold button at the sidebar's foot (admin.js drawFoldButton) and the folded rail (body.sb-fold, Khalil 11-06):
   56 px of icons, words hidden and shown as each row's title tooltip, a count shrunk to a dot on its icon. The phone
   (<= 640 px) hides .sb, and its own rule sets .content's margin to 0, so none of this reaches it. */
.nav-fold { padding-top: 6px; }
.nav-fold .sb-fold-btn { color: var(--dim); }
body.sb-fold { --sb-w: 56px; }
body.sb-fold .sb { padding: 18px 8px 14px; overflow: visible; }
body.sb-fold .sb .brand { justify-content: center; padding: 2px 0 16px; }
body.sb-fold .sb .wordmark,
body.sb-fold .sb .nav-t,
body.sb-fold .sb .tag-k,
body.sb-fold .sb .sb-label,
body.sb-fold .sb .me .who,
body.sb-fold .sb .me .caret { display: none; }
body.sb-fold .sb .nav a, body.sb-fold .sb .nav > button, body.sb-fold .sb .nav .menu > a { justify-content: center; padding: 9px 0; position: relative; }
body.sb-fold .sb .nav-l { flex: none; justify-content: center; gap: 0; overflow: visible; }
body.sb-fold .sb .nav .count:not([hidden]) {
  position: absolute; top: 6px; left: calc(50% + 4px); width: 6px; height: 6px; min-width: 0; padding: 0;
  font-size: 0; line-height: 0; border-radius: 50%; background: var(--muted);
}
body.sb-fold .sb .nav .count.hot:not([hidden]) { background: var(--text); }
body.sb-fold .sb .me { justify-content: center; padding: 10px 0; }
/* The rail is too narrow for the account and View the site as menus: folded, .sb stops clipping (overflow visible)
   and the lists open 220 px wide to the right of the rail's left edge. */
body.sb-fold .sb .me-menu > .menu-list, body.sb-fold .sb .viewsite-menu > .menu-list { right: auto; width: 220px; }
/* The bottom nav (View the site as..., My hosting, Back to Public Site) above .me. */
.nav-bottom { padding-top: 8px; }
/* The sidebar's pop-ups (account menu, View the site as) live at the bottom of a fixed column: they open UPWARD and fill
   the column's width. .sb scrolls (overflow-y: auto clips both axes), so the list stays inside the column sideways
   (left/right 0) and is capped in height with its own scroll, so a short window never cuts its top off. */
.me-menu, .viewsite-menu { position: relative; }
.me-menu > .menu-list, .viewsite-menu > .menu-list {
  top: auto; bottom: calc(100% + 6px); left: 0; right: 0; min-width: 0; z-index: 25;
  max-height: calc(100vh - 140px); overflow-y: auto; box-shadow: 0 -8px 24px rgba(0, 0, 0, .45);
}
.nav .menu-list button, .nav .menu-list a { justify-content: flex-start; padding: 10px 12px; color: var(--text); font-size: 14px; font-weight: 500; }
.nav .menu-list button:hover, .nav .menu-list a:hover { background: var(--hover); }
.menu-list a { color: var(--text); }
/* The account menu's head: the role tags and "Hosting as <name>", muted and small; no rule above it (it comes first). */
.me-menu .menu-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 12px 10px; margin: 0 0 4px;
  border-top: 0; border-bottom: 1px solid var(--border); font-size: 12px; font-weight: 500; letter-spacing: 0;
  text-transform: none; color: var(--muted);
}
.me-menu .menu-head .muted { flex-basis: 100%; font-size: 12px; color: var(--muted); }
/* View as... opens its nested rows (Admin, Party partner, A guest's page...) indented under it. */
.menu-list .menu-sub { padding-left: 28px; font-size: 13px; color: var(--muted); }
.menu-list .menu-sub:hover, .menu-list .menu-sub[aria-current="true"] { color: var(--text); }
.menu-list .menu-sub[aria-current="true"]::after { content: " ✓"; color: var(--muted); }

/* ---------- 3. primitives (mock CSS, scoped where an older view uses the same name) ---------- */
/* Buttons (all pages): the mock's quiet square button; the older class names map onto the same looks. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 34px; padding: 0 14px; border-radius: var(--r-sm);
  background: var(--surface); color: var(--text); border: 1px solid var(--border-2);
  font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none;
  cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.btn:hover { background: var(--hover); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn:focus-visible, .seg:focus-visible, .link:focus-visible, .row-click:focus-visible { outline: 2px solid var(--staff); outline-offset: 2px; }
.btn.primary { background: var(--text); color: #0D0D0F; border-color: var(--text); }
.btn.primary:hover { background: #ffffff; }
.btn.ghost, .btn-ghost { background: transparent; color: var(--text); }
.btn.ghost:hover, .btn-ghost:hover { background: var(--hover); }
.btn.sm, .btn-sm { min-height: 28px; padding: 0 10px; font-size: 12px; }
.btn.danger, .btn-danger { color: var(--bad-ink); border-color: #5a2a27; }
.btn.armed { background: var(--bad-ink); border-color: var(--bad-ink); color: #0D0D0F; }
.dots { width: 28px; height: 28px; padding: 0; border-radius: var(--r-sm); border: 1px solid transparent; background: transparent; display: inline-grid; place-items: center; color: var(--muted); letter-spacing: 1px; font-weight: 800; cursor: pointer; }
.dots:hover, .dots[aria-expanded="true"] { border-color: var(--border-2); background: var(--hover); color: var(--text); }

/* rowMenu (div.menu.row-menu > button.dots + div.menu-list): the list right-aligned under the dots, above the rows below.
   No ancestor (.card, .cb, .tbl, .tr, .cell) clips overflow, so absolute is enough. */
.row-menu { position: relative; display: inline-flex; flex: none; }
.row-menu > .menu-list { top: calc(100% + 4px); right: 0; left: auto; bottom: auto; z-index: 30; min-width: 190px; box-shadow: 0 8px 24px rgba(0, 0, 0, .45); }
.row-menu > .menu-list button { color: var(--text); }
.row-menu > .menu-list button.danger { color: var(--bad-ink); }
.row-menu > .menu-list button.armed { background: var(--bad-ink); color: #0D0D0F; }

/* Badges (page 4, review #29): a badge clips with an ellipsis and never crosses its column. */
.badge {
  display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle;
  line-height: 20px; white-space: nowrap; height: 20px; padding: 0 8px; border-radius: 999px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  border: 1px solid var(--border-2); color: var(--muted); background: transparent;
}
.badge.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.badge.fill { background: var(--text); color: #0D0D0F; border-color: var(--text); }
.badge.staff { border-color: var(--staff); color: var(--staff); }
.badge.gold { border-color: var(--gold); color: var(--gold); }
.badge.warn { border-color: #6b5a2a; color: var(--warn-ink); }
.badge.bad { border-color: #5a2a27; color: var(--bad-ink); }
.badge.dash { border-style: dashed; }
/* 1.7.0 (Khalil 11-06 22:4x: "The live badge with a dot is what I want."): a night happening now. A muted green pill
   with a 6 px dot before the word; the dot pulses only where the person allows motion. */
.badge.live { border-color: var(--ok); color: var(--ok-ink); background: rgba(31, 107, 58, .18); }
.badge.live::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ok-ink); margin-right: 6px; vertical-align: 1px; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok-ink); margin-right: 8px; vertical-align: middle; }
@keyframes rv-live-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: no-preference) {
  .badge.live::before, .live-dot { animation: rv-live-pulse 1.6s ease-in-out infinite; }
}
.ig { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--hover); font-size: 12px; color: var(--text); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The mock's small square kind tag (ORG, TEAM); named .tag-k so the 1.4.1 role .tag keeps its own rule. */
.tag-k { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 4px; border: 1px solid var(--border-2); font-size: 10px; font-weight: 700; letter-spacing: 0.04em; color: var(--muted); flex: none; white-space: nowrap; }

/* Toolbar + table (pages 1-6: Organizations, Nights, Hosts, Teams, Staff). */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.toolbar .l, .toolbar .r { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 10px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.filter.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.filter:hover { color: var(--text); }
.tbl { border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); }
.tbl > :first-child { border-top-left-radius: var(--r); border-top-right-radius: var(--r); }
.tbl > :last-child { border-bottom-left-radius: var(--r); border-bottom-right-radius: var(--r); }
.tbl .tr { position: relative; display: grid; grid-template-columns: var(--cols, minmax(0, 1fr)); align-items: center; gap: 12px; padding: 0 16px; min-height: 52px; border-top: 1px solid var(--border); }
.tbl .tr:first-child { border-top: 0; }
.tbl .tr[role="button"], .tbl .tr.row-click { cursor: pointer; }
.tbl .tr[role="button"]:hover, .tbl .tr.row-click:hover { background: var(--hover); }
.tbl .th { min-height: 40px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); background: #141416; }
.tbl .tr.sub { background: #131315; min-height: 48px; }
.tbl .tr.sub .cell:first-child { padding-left: 34px; position: relative; }
.tbl .tr.sub .cell:first-child::before { content: ""; position: absolute; left: 12px; top: -26px; bottom: 50%; width: 12px; border-left: 1px solid var(--border-2); border-bottom: 1px solid var(--border-2); border-radius: 0 0 0 6px; }
.tbl .tr.open { background: var(--hover); }
.cell { min-width: 0; display: flex; align-items: center; flex-wrap: wrap; row-gap: 4px; column-gap: 10px; overflow-wrap: anywhere; }
.cell.r { justify-content: flex-end; text-align: right; font-variant-numeric: tabular-nums; }
.stack { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.stack b { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.stack span { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.tbl .chev, .cb .chev { color: var(--muted); font-size: 12px; }
.chk { width: 16px; height: 16px; margin: 0; border: 1.5px solid var(--border-2); border-radius: 4px; flex: none; accent-color: var(--text); cursor: pointer; }
.drawer { border-top: 1px solid var(--border); background: #141416; padding: 14px 16px 16px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px 24px; }
.drawer .facts { margin: 0; padding-top: 0; border-top: 0; gap: 6px 18px; font-size: 13px; }
.drawer .facts dt { font-size: 13px; font-weight: 400; letter-spacing: 0; text-transform: none; padding-top: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; align-items: center; }
.tbl .foot { max-width: none; margin: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 16px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.pager { display: flex; gap: 6px; }
.pager span, .pager button { min-width: 28px; height: 28px; padding: 0 6px; border: 1px solid var(--border-2); border-radius: 6px; display: grid; place-items: center; background: transparent; color: var(--text); font: inherit; font-size: 12px; }
.pager button { cursor: pointer; }
.pager button:disabled { opacity: 0.4; cursor: default; }

/* Cards and layouts (pages 7-12: an org page, a night page, Settings). */
.two { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); min-width: 0; }
.card > .ch { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.card > .ch h2 { margin: 0; font-size: 14px; font-weight: 700; }
.card > .ch h2 span { color: var(--muted); font-weight: 500; }
.card > .cb { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.card > .cb.tight { padding: 0; gap: 0; }
.card > .cb p { margin: 0; }
.card > .cb p.muted { color: var(--muted); }
/* An empty line in a tight card (e.g. "No teams yet.") keeps the card's inner padding. */
.card > .cb.tight > p.muted { padding: 14px 16px; }
/* Organization details: the card body is the dl alone, no rule or band above it (mock page 2). */
.card > .cb > .facts { margin: 0; padding-top: 0; border-top: 0; font-size: 13px; }
.card > .cb > .facts dt { font-size: 13px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--muted); padding-top: 0; }
.who-inline { display: inline-flex; align-items: center; gap: 8px; }
/* A tile whose value is words (Next night, Status) reads at 18px; number tiles stay 26px. */
.tiles > .stat .stat-num.txt { font-size: 18px; line-height: 1.3; letter-spacing: 0; }
/* Tiles (page 7, the night page): stat() nodes inside .tiles take the tile look too. */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tile, .tiles > .stat:nth-child(n) { border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tile .lab, .tiles > .stat .label { font-size: 12px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.tile .lab i { width: 14px; height: 14px; border: 1.5px solid currentColor; border-radius: 3px; }
.tile .val, .tiles > .stat .stat-num { font-family: var(--f-body); font-size: 26px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tile .val.ok::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok-ink); margin-right: 8px; vertical-align: middle; }
.tiles > .stat .stat-sub { font-size: 12px; color: var(--muted); }
/* The new row, inside a card body or a table; the older .row keeps its own rule below. */
.cb .row, .tbl .row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--border); font-size: 13px; }
.cb .row:first-child, .tbl .row:first-child { border-top: 0; }
.row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.row .grow b { font-weight: 600; overflow-wrap: anywhere; }
.row .grow span { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.date { width: 44px; flex: none; border: 1px solid var(--border-2); border-radius: 6px; text-align: center; padding: 4px 0; line-height: 1.1; }
.date small { display: block; font-size: 9px; font-weight: 700; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; }
.date b { font-size: 15px; }
.stripe { border-left: 3px solid var(--staff); }
.setting { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--border); font-size: 13px; }
.setting:first-child { border-top: 0; }
.setting .k { min-width: 0; }
.setting .k b { display: block; font-weight: 600; }
.setting .k span { color: var(--muted); font-size: 12px; }
/* The switch (review #19): sw() draws label.sw-field > span.sw (the drawn track, holding the real checkbox) + span.sw-label.
   The real checkbox stays for the change event and the keyboard; it is hidden but focusable. */
.sw { display: inline-flex; align-items: center; flex: none; position: relative; cursor: pointer; }
.sw-input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }

/* sw() (mock pages 6, 10): label.sw-field > span.sw (the track itself, holding the hidden checkbox) + span.sw-label. */
.sw-field { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; min-width: 0; }
.sw-field .sw { width: 36px; height: 20px; border-radius: 999px; background: var(--border-2); transition: background 120ms ease; }
.sw-field .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform 120ms ease, background 120ms ease; }
.sw-field .sw.on { background: var(--text); }
.sw-field .sw.on::after { transform: translateX(16px); background: #0D0D0F; }
.sw-field .sw:has(.sw-input:focus-visible) { outline: 2px solid var(--staff); outline-offset: 2px; }
.sw-field:has(.sw-input:disabled) { opacity: 0.5; cursor: default; }
.sw-label { font-size: 13px; color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.inp { min-height: 32px; border: 1px solid var(--border-2); border-radius: var(--r-sm); background: var(--page); padding: 0 10px; color: var(--text); font-size: 13px; min-width: 90px; max-width: 100%; }
.inp:focus { outline: none; border-color: var(--text); }
.inp.w { min-width: 240px; }
.inp::placeholder { color: var(--dim); }
/* The new segment (Settings, sheets); the older .seg is a button inside .segment and keeps its rule below. */
.setting .seg:not(button), .sheet .seg:not(button) { display: inline-flex; border: 1px solid var(--border-2); border-radius: var(--r-sm); overflow: hidden; max-width: 100%; }
.setting .seg:not(button) > *, .sheet .seg:not(button) > * { padding: 6px 12px; font-size: 12px; font-weight: 600; color: var(--muted); background: none; border: 0; font-family: inherit; cursor: pointer; white-space: nowrap; }
.setting .seg:not(button) > .on, .sheet .seg:not(button) > .on,
.setting .seg:not(button) > [aria-checked="true"], .sheet .seg:not(button) > [aria-checked="true"] { background: var(--hover); color: var(--text); }
/* The new pills (Requests, filters); the older status .pill keeps its rule below. */
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pills > .pill { margin-left: 0; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border-2); background: transparent; display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 12px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--muted); cursor: pointer; }
.pills > .pill.on, .pills > .pill[aria-selected="true"] { background: var(--text); color: #0D0D0F; border-color: var(--text); }
.map { height: 220px; border: 1px dashed var(--border-2); border-radius: var(--r-sm); display: grid; place-items: center; color: var(--muted); font-size: 13px; background: repeating-linear-gradient(45deg, #141416 0 12px, #121214 12px 24px); }
/* The sheet (review #18): fixed over the whole page, never absolute. The owner sheet keeps its ids and classes. */
.sheet { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .6); display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.sheet .box { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--border-2); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.sheet .box h2 { margin: 0; font-size: 18px; }
.kicker { font-size: 10px; font-weight: 800; letter-spacing: 0.1em; color: var(--staff); text-transform: uppercase; }
/* Phone list rows (mock phone page): a table row folded into a two-column card. */
.m-row { border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); padding: 12px 14px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 12px; font-size: 13px; }
.m-row .k { font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); display: block; }
.m-row .full { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* The console pages (mock pages 1, 14, 15, 16, 19 from the console): drawOrgs, drawAccounts, drawStaff, drawViewSite. */
/* The page's own wrappers take the .main column's gap, so the toolbar, table and lines keep the mock's spacing. */
.orgs-region, .move-email { display: flex; flex-direction: column; gap: inherit; min-width: 0; }
.move-email > p { margin: 0; font-size: 13px; }
.move-results { min-width: 0; }
/* The org cell's link (page 1): the avatar and the name stack, nothing of a link's look but the cursor. */
.org-link { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; }
.org-link:hover .stack b { text-decoration: underline; text-underline-offset: 3px; }
/* The chevron as a button (page 1's first column): no button chrome, the mock's muted glyph. */
.tbl button.chev { display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0; margin: 0; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--muted); font: inherit; font-size: 12px; line-height: 1; cursor: pointer; }
.tbl button.chev:hover, .tbl button.chev[aria-expanded="true"] { background: var(--hover); color: var(--text); }
/* Filter and Sort set: the ghost filter shows it is on. The Filter list sits in a .menu, right-aligned under it. */
.filter.on, .filter.ghost.on { color: var(--text); background: var(--hover); border-color: var(--border); }
.toolbar .menu { position: relative; display: inline-flex; }
.toolbar .menu > .menu-list, .export-menu > .menu-list, .viewas-menu > .menu-list { box-shadow: 0 8px 24px rgba(0, 0, 0, .45); z-index: 30; }
.menu-list button[aria-checked="true"], .menu-list button[aria-current="true"] { color: var(--text); font-weight: 700; }
.menu-list button[aria-checked="true"]::after, .export-menu .menu-list button[aria-current="true"]::after, .viewas-menu .menu-list button[aria-current="true"]::after { content: " ✓"; color: var(--muted); }
/* Accounts (page 15): the find box and Find in one line; .inp is the mock's quiet box, over the older .input. */
.find-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.input.inp { width: auto; min-height: 32px; padding: 0 10px; font-size: 13px; background: var(--page); border: 1px solid var(--border-2); border-radius: var(--r-sm); color: var(--text); }
.input.inp:focus { border-color: var(--text); box-shadow: none; }
/* The console Accounts page's Display name cell (Task 9b, moveRow): the .inp field and a .btn.sm Save on one line on a
   laptop; wraps on a phone, where both are 44 px taps (the @media (max-width: 640px) block). */
.disp-row { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; min-width: 0; }
.disp-row .disp-inp { flex: 1 1 auto; min-width: 90px; width: auto; }
.disp-row .disp-save { flex: none; }
.find-row .input.inp { flex: 0 1 320px; min-width: 0; }
.find-row .btn { flex: none; }
.move-row .cell { min-width: 0; }
.move-row .err { margin: 4px 0 0; font-size: 12px; flex-basis: 100%; }
/* Task 9c: the Accounts list's sign-up badges wrap inside their own cell (never across a column); the new-email box and
   its Move email button share one cell. */
.stack.picks { flex-direction: row; flex-wrap: wrap; gap: 4px; }
.move-ctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; flex: 1 1 100%; }
.move-ctl .inp { flex: 1 1 140px; min-width: 0; }
/* Emails in a table read as muted body text (mock page 10), never the monospace look. */
.tbl .mono { font-family: inherit; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; min-width: 0; }
/* An email in a table cell stays on one line and ends in an ellipsis; the full address is its title (F6). */
.tbl .email { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; min-width: 0; max-width: 100%; }
/* Reservision staff (page 14): Remove at the row's right edge; the alerts card's lines keep the .setting look. */
.tbl .cell.staff-act { justify-content: flex-end; }
.alerts-card .setting .sw-field { justify-self: end; }
/* View the site as… : a card of rows, each a full-width button. The older .viewsite-list column is undone here. */
.card.viewsite-list { display: block; }
button.row { width: 100%; margin: 0; background: none; border: 0; border-top: 1px solid var(--border); font: inherit; color: inherit; text-align: left; cursor: pointer; }
.viewsite-btn { min-height: 48px; }
.viewsite-btn:hover { background: var(--hover); }
.viewsite-btn .chev { margin-left: auto; }
/* The forms in the console's sheets (Create their org, Add staff): three boxes a row, the mock's 10 px gap. */
.owner-sheet .grid3 { gap: 10px; }

/* The org Overview (mock pages 2, 2b, 2c): drawOverview and its cards. */
/* Export and View as in the head's .right: each list right-aligned under its button (the older .menu-list's place). */
.export-menu, .viewas-menu { position: relative; display: inline-flex; }
.ov-hosts { min-width: 0; }
/* The tiles' Status value (page 2c): the mock's green dot before "Active". */
.tiles > .stat .stat-num.ok, .stat.tile .stat-num.ok { color: var(--ok-ink); }
.tiles > .stat .stat-num.ok::before, .stat.tile .stat-num.ok::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok-ink); margin-right: 8px; vertical-align: middle; }
/* Upcoming nights: each row opens its night; the date box (dateBox: span.date > small + b) is a block in its row. */
.cb .row.row-click:hover { background: var(--hover); }
.date { display: inline-block; }
.date b { display: block; font-variant-numeric: tabular-nums; }
.view-all { color: var(--muted); font-size: 13px; text-decoration: none; white-space: nowrap; }
.view-all:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
/* Put on a night from the Hosts card: the drawer holds only the button, then the night picker and Put on. */
.drawer > .facts:empty { display: none; }
.drawer:has(> .facts:empty) { grid-template-columns: minmax(0, 1fr); }
.drawer .put-night-box { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; width: 100%; }
.drawer .put-night-box .select, .drawer .put-night-pick { flex: 1 1 220px; width: auto; min-width: 0; max-width: 360px; min-height: 32px; padding: 0 10px; font-size: 13px; background: var(--page); border: 1px solid var(--border-2); border-radius: var(--r-sm); color: var(--text); cursor: pointer; }
.drawer .put-night-box .select:focus { border-color: var(--text); box-shadow: none; }
.drawer .put-night-box .btn, .drawer .put-night { flex: none; min-height: 28px; }

/* ---------- 4. the older views (kept until Checkpoint 2 redraws them; Task 10 deletes the unused) ---------- */
/* ---------- header ---------- */

.mascot { width: 34px; height: 34px; object-fit: contain; flex: none; }
.wordmark {
  font-family: var(--f-wordmark); font-size: 26px; line-height: 1; letter-spacing: 0.01em;
  text-transform: uppercase; white-space: nowrap;
}
/* CP4c (mock pages 11-13): "· New Visions" (the signed-in org) or "· Owner (0Beat)" beside the wordmark. */
.org-name { font-size: 14px; font-weight: 500; color: var(--a-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.org-name:empty { display: none; }

.who { font-size: 13px; font-weight: 500; color: var(--a-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }

.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-list {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 190px;
  background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--r);
  padding: var(--s1, 4px); display: flex; flex-direction: column; z-index: 20;
}
.menu-list a, .menu-list button { padding: 10px 12px; text-decoration: none; font-weight: 500; font-size: 14px; border-radius: 4px; }
.menu-list button { background: none; border: 0; text-align: left; width: 100%; font: inherit; font-weight: 500; font-size: 14px; color: inherit; cursor: pointer; }
.menu-list a:hover, .menu-list a:focus-visible, .menu-list button:hover, .menu-list button:focus-visible { background: var(--a-surface); outline: none; }
.menu-list button[aria-current="true"] { font-weight: 700; }

/* ---------- page ---------- */
.loading { color: var(--a-muted); }
.page-head { margin: var(--s2, 8px) 0 var(--s5, 24px); }

.h1 { font-family: var(--f-body); font-weight: 800; font-size: 34px; line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 var(--s1, 4px); }
.h2 { font-family: var(--f-body); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; margin: 0; }
.lead { font-size: 17px; font-weight: 500; margin: 0 0 var(--s2, 8px); }
.muted { color: var(--a-muted); margin: 0; }
.label { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--a-ink); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3, 12px); margin-bottom: var(--s3, 12px); flex-wrap: wrap; }
.section-actions { display: flex; gap: var(--s2, 8px); flex-wrap: wrap; }
.block { margin-top: var(--s5, 24px); }
.err { color: var(--a-err); font-weight: 500; margin: var(--s3, 12px) 0 0; }
.empty-line { padding: var(--s4, 16px) 0; }
.cb .row > .empty-line, .cb .row.empty-line { padding: 0; }
.mono { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 13px; }
.num { font-variant-numeric: var(--num, tabular-nums); }

.link { background: none; border: 0; padding: 0; cursor: pointer; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; color: var(--a-ink); }

/* ---------- pills ---------- */
.pill {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: var(--radius-pill, 999px);
  border: 1px solid var(--a-ink); font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  white-space: nowrap; vertical-align: middle; margin-left: var(--s2, 8px); background: transparent;
}

/* ---------- cards, rows ---------- */
/* The older card keeps its padding; the mock's card (header .ch, body .cb) has none. */
.card:not(:has(> .ch, > .cb)) { padding: var(--s4, 16px) var(--s5, 24px); }
.card.empty { text-align: left; padding: var(--s5, 24px); }
.card.empty .btn { margin-top: var(--s3, 12px); }
.rows { list-style: none; margin: 0; padding: 0; }
.rows-boxed { background: var(--a-card); border: 1px solid var(--a-rule); border-radius: var(--radius, 6px); padding: 0 var(--s4, 16px); }
.row { display: flex; align-items: center; gap: var(--s3, 12px); padding: var(--s3, 12px) 0; border-top: 1px solid var(--a-rule); }
.rows > .row:first-child { border-top: 0; }
.row-click { cursor: pointer; }
.row-click:hover .row-main { text-decoration: underline; text-underline-offset: 3px; }
.row-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.row-main { font-weight: 600; display: flex; align-items: center; flex-wrap: wrap; gap: 0; }
.row .muted { font-size: 13px; overflow-wrap: anywhere; }
.chev { font-size: 22px; color: var(--a-muted); line-height: 1; }
.initials {
  flex: none; width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid var(--a-rule); border-radius: 50%; background: var(--a-surface);
  font-size: 12px; font-weight: 700; letter-spacing: 0.02em;
}
.removed { opacity: 0.55; }

/* the condensed date box, as the mockup's SAT / OCT 17 */
.stamp {
  flex: none; width: 66px; padding: 6px 0 5px; border: 1px solid var(--a-ink); border-radius: 4px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: var(--f-headline); text-transform: uppercase; line-height: 1; background: var(--a-card);
}
.stamp-day { font-size: 13px; letter-spacing: 0.06em; }
.stamp-date { font-size: 19px; margin-top: 3px; white-space: nowrap; }

/* ---------- overview ---------- */

.stat { display: flex; flex-direction: column; gap: 4px; padding: var(--s4, 16px) var(--s5, 24px); border-left: 1px solid var(--a-rule); min-width: 0; }
.stat:first-child { border-left: 0; }
.stat .label { color: var(--a-muted); }
.stat-num { font-family: var(--f-headline); font-size: 44px; line-height: 1; font-variant-numeric: var(--num, tabular-nums); }
.stat-sub { font-size: 12px; color: var(--a-muted); }

/* ---------- events ---------- */

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px var(--s5, 24px); margin: var(--s4, 16px) 0 0; padding-top: var(--s4, 16px); border-top: 1px solid var(--a-rule); }
.facts dt { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--a-muted); padding-top: 2px; }
.facts dd { margin: 0; white-space: pre-line; }
.notes { white-space: pre-line; margin: var(--s3, 12px) 0 0; }

.flyer-state { font-size: 13px; }
.door-tools { display: flex; align-items: center; gap: var(--s3, 12px); flex-wrap: wrap; margin-bottom: var(--s3, 12px); }
.paste { width: 100%; resize: vertical; background: var(--a-bg); }
/* A host's name at the door: the mock's bold body text (pages 4, 7), never the old display face. */
.door-name { font-weight: 600; overflow-wrap: anywhere; }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: var(--s4, 16px); padding: var(--s5, 24px); }
.form p, .form h2 { margin: 0; }
.rows-boxed + .card { margin-top: var(--s4, 16px); }

.grid2, .grid3, .grid4 { display: grid; gap: var(--s4, 16px); }
.grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-end { align-items: end; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.field-hint { font-size: 12px; color: var(--a-muted); }
.input {
  width: 100%; min-height: 44px; padding: 10px 12px;
  background: var(--a-bg); border: 1px solid var(--a-rule); border-radius: var(--radius, 6px);
  font-size: 15px; color: var(--a-ink);
}
.input:focus { outline: none; border-color: var(--a-ink); box-shadow: inset 0 0 0 1px var(--a-ink); }
.input::placeholder { color: var(--a-muted); opacity: 0.7; }
.textarea { min-height: 80px; resize: vertical; line-height: 1.4; }
.input-num { font-variant-numeric: var(--num, tabular-nums); }
.prefix { display: flex; align-items: center; border: 1px solid var(--a-rule); border-radius: var(--radius, 6px); background: var(--a-bg); }
.prefix:focus-within { border-color: var(--a-ink); box-shadow: inset 0 0 0 1px var(--a-ink); }
.prefix > span { padding-left: 12px; color: var(--a-muted); font-weight: 600; }
.prefix .input { border: 0; box-shadow: none; padding-left: 4px; background: transparent; }
.form-actions { display: flex; align-items: center; gap: var(--s3, 12px); flex-wrap: wrap; }
.flyer-pick { display: flex; align-items: center; gap: var(--s4, 16px); flex-wrap: wrap; }
.flyer-preview { display: flex; align-items: center; gap: var(--s3, 12px); min-height: 44px; }
.flyer-preview img { width: 96px; height: 120px; object-fit: cover; border: 1px solid var(--a-rule); border-radius: 4px; background: var(--a-surface); }
.file-btn { position: relative; overflow: hidden; }
.file-btn .file { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }

/* segment */
/* segment(): the mock's square segment (pages 5, 10, 11): a quiet box, the chosen part on --hover. */
.segment { display: inline-flex; align-self: flex-start; border: 1px solid var(--border-2); border-radius: var(--r-sm); overflow: hidden; flex-wrap: wrap; max-width: 100%; }
.seg { background: transparent; border: 0; border-radius: 0; min-height: 30px; padding: 0 12px; font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.seg:hover { color: var(--text); }
.seg[aria-checked="true"] { background: var(--hover); color: var(--text); }

/* ---------- hosts ---------- */
/* 0.11.0 View as: the look-only line under the tabs (MIRROR .join-line, gold edge). */
.view-banner { border: 1px solid var(--a-rule); border-left: 3px solid var(--a-gold); border-radius: var(--radius, 6px); background: var(--a-card); padding: var(--s2, 8px) var(--s4, 16px); margin: var(--s2, 8px) 0; font-size: 13px; }
.view-banner .link { display: inline; font-size: 13px; }
.view-picker .put-on { margin-top: var(--s3, 12px); }
.testing .testing-actions { display: flex; align-items: center; gap: var(--s3, 12px); flex-wrap: wrap; margin-bottom: var(--s3, 12px); }
.testing .row { flex-wrap: wrap; }
.testing .row-actions { display: flex; gap: var(--s2, 8px); flex-wrap: wrap; margin-left: auto; }
#versions-line:empty { display: none; }

/* Hosts (mock page 7): the join line is a card holding one row; its message wraps. */
.join-msg { overflow-wrap: anywhere; }
.add-result { border-top: 1px solid var(--a-rule); padding-top: var(--s4, 16px); }
.add-result .label { margin: 0 0 6px; display: block; }
/* The one-time new link after a Reset link (C8): a card above the host table, outside it. */
.link-line { display: flex; align-items: center; gap: var(--s3, 12px); flex-wrap: wrap; }
.link-line code { background: var(--a-bg); border: 1px solid var(--a-rule); border-radius: 4px; padding: 8px 10px; overflow-wrap: anywhere; flex: 1; min-width: 0; }
/* CP4c (mock page 11): the hosts table. Host · Team · Nights · Paying guests · Account · Put on a night; each host is
   its own card, and tapping the name opens the detail panel (the facts that left the table, and the actions) under it. */
/* The hosts table's first cell: the name button is the mock's .stack (name over @ig), nothing of a button's look. */
.host-table { min-width: 0; }
.host-open { align-items: flex-start; padding: 0; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.host-open .door-name { font-size: 14px; }
.host-open:hover .door-name, .host-open[aria-expanded="true"] .door-name { text-decoration: underline; text-underline-offset: 3px; }
.host-open:focus-visible { outline: 2px solid var(--staff); outline-offset: 2px; }
.host-ig { font-size: 12px; color: var(--muted); }

.put-night-box { width: 100%; }
.put-night-box .select { min-height: 36px; }
.put-night-box .btn { min-height: 36px; }
/* The host's drawer (mock page 7) is a .drawer; Edit swaps its insides for the edit form, which takes both columns. */
.drawer > .host-edit { grid-column: 1 / -1; padding: 0; border: 0; gap: 12px; }
.acct-on { color: var(--ok-ink); font-weight: 600; }
.acct-off { color: var(--muted); }

/* ---------- settings ---------- */
.model-block { display: flex; flex-direction: column; gap: var(--s4, 16px); }
.tier-table { border: 1px solid var(--a-rule); border-radius: var(--radius, 6px); background: var(--a-bg); }
.tier-row { display: grid; grid-template-columns: 44px repeat(4, minmax(0, 1fr)); gap: var(--s3, 12px); align-items: center; padding: var(--s2, 8px) var(--s3, 12px); border-top: 1px solid var(--a-rule); }
.tier-row:first-child { border-top: 0; }
.tier-head > span { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--a-muted); }
.tier-n { font-size: 15px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.tc { display: block; min-width: 0; }
.share-preview { margin: 6px 0 0; overflow-wrap: anywhere; }
.sentence { font-size: 14px; font-weight: 600; line-height: 1.45; margin: 6px 0 0; }
/* What hosts read: the same numbered steps hosts see (mirrors app.css .rule-steps, in the admin's tokens) */
.hosts-read .rule-steps { margin: var(--s3, 12px) 0 0; padding-left: 20px; font-size: 13px; line-height: 1.45; }
.hosts-read .rule-steps li { margin-bottom: var(--s2, 8px); }
.hosts-read .rule-steps li::marker { font-weight: 700; }
.hosts-read .rule-items { list-style: disc; margin: 4px 0 0; padding-left: 18px; }
.hosts-read .rule-items li { margin-bottom: 2px; }
.hosts-read .rule-items li::marker { font-weight: 400; }
.hosts-read .rule-example { margin: var(--s3, 12px) 0 0; padding: var(--s2, 8px) var(--s3, 12px); border-left: 2px solid var(--border-2); font-size: 13px; line-height: 1.45; }
.hosts-read .rule-example span { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--a-muted); }
.hosts-read .referral-line { margin: var(--s3, 12px) 0 0; font-size: 13px; line-height: 1.45; font-weight: 600; }
.hosts-read .referral-line span { display: block; font-weight: 400; color: var(--a-muted); }

/* ---------- gate (401 / 403) ---------- */
.gate { max-width: 460px; margin: 12vh auto 0; display: flex; flex-direction: column; align-items: flex-start; gap: var(--s3, 12px); }
/* Walk 11-04: the sign-in page's email and code steps (a .gate inside the .gate) sit in the heading's column,
   left edges aligned, the box full column width up to 360px, the button below it at its own width. */
.gate .gate { margin: var(--s2, 8px) 0 0; width: 100%; max-width: 360px; align-items: stretch; }
.gate .gate > .btn { align-self: flex-start; }
body.blocked .nav, body.blocked .menu, body.blocked .menu-btn, body.blocked #signout-btn { display: none; }

/* ---------- toast, footer ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--a-ink); color: var(--a-on-ink); border-radius: var(--radius-pill, 999px);
  padding: 10px 18px; font-size: 13px; font-weight: 600; transition: opacity 150ms ease, transform 150ms ease; z-index: 50;
  max-width: calc(100vw - 32px); text-align: center;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.foot {
  max-width: var(--a-max); width: 100%; margin: 0 auto; padding: var(--s4, 16px) var(--a-gutter) var(--s5, 24px);
  display: flex; justify-content: space-between; gap: var(--s3, 12px); flex-wrap: wrap;
  font-size: 12px; color: var(--a-muted); border-top: 1px solid var(--a-rule);
}

/* ---------- narrow screens (Adrian and Bammo on phones) ---------- */
@media (max-width: 760px) {
  .grid3, .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  
  
  
  
  
  
}
@media (max-width: 520px) {
  body { font-size: 14px; }
  
  .menu { order: 2; }
  .who { order: 3; flex-basis: 100%; max-width: none; font-size: 12px; }
  .wordmark { font-size: 22px; }
  .org-name { font-size: 12px; }
  .mascot { width: 28px; height: 28px; }
  .h1 { font-size: 28px; }
  .grid2, .grid3, .grid4 { grid-template-columns: minmax(0, 1fr); }
  .card:not(:has(> .ch, > .cb)) { padding: var(--s4, 16px); }
  .form { padding: var(--s4, 16px); }
  
  .stat { padding: var(--s3, 12px) var(--s4, 16px); }
  .stat-num { font-size: 36px; }
  
  .tier-row { grid-template-columns: 28px repeat(2, minmax(0, 1fr)); }
  .tier-head { display: none; }
    .tc[data-k]::before { content: attr(data-k); display: block; font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--a-muted); margin-bottom: 2px; }
  .tier-n { grid-row: span 2; align-self: start; padding-top: 18px; }
  .segment { display: flex; width: 100%; }
  .seg { flex: 1; padding: 0 10px; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 6px; }
  .door-tools .segment { width: 100%; }
}
.form .add-result .field-hint { margin-top: var(--s2, 8px); }

/* Covers as two number boxes (10-12) */
.cover-boxes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2, 8px); }
.cover-box { display: grid; gap: 4px; }

/* ---------- 0.9.0: roles + per-night hosting ---------- */

.hosting .section-head { margin-bottom: var(--s2, 8px); }
.hosting-row .pill { margin-left: 0; flex: none; }
.hosting-row .door-name { font-size: 15px; }
.put-on-wrap { display: flex; flex-direction: column; gap: 6px; margin-top: var(--s3, 12px); padding-top: var(--s3, 12px); border-top: 1px solid var(--a-rule); }
.put-on { display: flex; align-items: center; gap: var(--s2, 8px); flex-wrap: wrap; }
.put-on .select { flex: 1 1 200px; width: auto; min-width: 0; max-width: 360px; cursor: pointer; }
.put-on .btn { flex: none; min-height: 44px; }

.pairs { display: flex; flex-direction: column; gap: 6px; margin-top: var(--s3, 12px); padding-top: var(--s3, 12px); border-top: 1px solid var(--a-rule); }
.pairs .row { display: flex; align-items: center; gap: var(--s2, 8px); }
.pairs .row .row-text { flex: 1 1 auto; min-width: 0; }
.pairs .row .btn { flex: none; }
/* 1.9.0 (Khalil 11-07 R1/K4b): groups of any size. The members as chips (a two-tap x on each in a group of 3+), and the
   tick list that makes a group. Every tap is 44px; the list wraps inside the phone, never wider. */
.group-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; min-width: 0; }
.group-chip { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; min-height: 32px; padding: 0 0 0 10px;
  border: 1px solid var(--a-rule); border-radius: 999px; font-size: 13px; }
.group-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.group-chip .group-out { min-width: 44px; min-height: 44px; margin: -6px 0; padding: 0 10px; border: 0; background: none; font-size: 16px; line-height: 1; }
.group-chip .group-out.armed { min-width: 0; font-size: 12px; color: var(--a-ink); }
.group-chip:not(:has(.group-out)) { padding-right: 10px; }
.group-pick { display: flex; flex-direction: column; gap: var(--s2, 8px); width: 100%; max-width: 100%; }
.ck-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 4px var(--s2, 8px); }
.ck { display: flex; align-items: center; gap: var(--s2, 8px); min-height: 44px; min-width: 0; cursor: pointer; }
.ck span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.group-go { display: flex; align-items: center; gap: var(--s2, 8px); flex-wrap: wrap; }
.group-go .muted { flex: 1 1 160px; min-width: 0; }
.group-go .btn { flex: none; min-height: 44px; }
/* 1.9.0 (Khalil 11-08 walk finding 6): once the tick list is open, its .actions holder takes the foot's whole row and the
   list takes the holder's whole width, so the grid's columns come from the card, not from the words in it: ticking never
   reflows the names (the count line and "Group N hosts" sit under the list, the button at a fixed minimum width). */
.actions.has-group-pick { flex: 1 1 100%; min-width: 0; }
.actions.has-group-pick > .group-pick { flex: 1 1 100%; }
.group-go .btn#group-btn { min-width: 128px; }

@media (max-width: 520px) {
  .hosting-row { flex-wrap: wrap; }
  .hosting-row .row-text { flex-basis: 60%; }
  .put-on .select { max-width: none; flex-basis: 100%; }
  .put-on .btn { width: 100%; }
  .ck-list { grid-template-columns: 1fr; }
  .group-go .btn { width: 100%; }
  .pairs .row { flex-wrap: wrap; }
}

/* ---------- 0.21.0 (Khalil 10-21) ---------- */
/* Hosting this night: tick hosts and take them all off in one go. */
.pick { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--a-ink); cursor: pointer; }

.old-toggle { margin-top: var(--s3, 12px); }
/* 0.22.0 (Khalil 10-21): a night's tag above its name, a set list. Special Event stands out in gold; the others are quieter. */
.tag-chip { align-self: flex-start; display: inline-block; font-family: var(--f-headline); font-size: 12px; line-height: 1; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 5px 8px 4px; border-radius: 3px; border: 1px solid var(--a-ink); color: var(--a-ink); margin-bottom: 6px; }
/* tagChip builds "tag-" + the tag's key (special, holiday, birthday). */
.tag-special { background: var(--a-gold); border-color: var(--a-gold); color: #000; }
.tag-birthday { border-color: var(--a-gold); }

/* ---------- CP1 accounts: Connect hosts and Waiting on NV (Hosts tab, mock page 11) ---------- */
.acct-count-line { margin: var(--s1, 4px) 0 0; }

/* Connect hosts and Waiting on NV rows (mock page 7): who, the old record or the ask, then the buttons at the right. */
.cb .row.org-row { flex-wrap: wrap; }
.org-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.org-who .mono { font-size: 12px; }
.org-arrow { color: var(--a-muted); }
.org-actions { display: flex; gap: var(--s2, 8px); flex-wrap: wrap; justify-content: flex-end; align-items: center; margin-left: auto; }
.org-actions .select { width: auto; min-height: 28px; max-width: 220px; padding: 0 10px; font-size: 12px; background: var(--page); border-color: var(--border-2); border-radius: var(--r-sm); }
.flags-line { margin: 0; }
.flags-line span + span::before { content: " · "; }

.flags-box { display: flex; flex-direction: column; gap: 6px; padding-top: var(--s3, 12px); border-top: 1px solid var(--a-rule); }
.flags-box .flags-line { margin: 0; font-size: 12px; }
/* The flags sit in a .cb row: stacked lines, not a flex row. */
.cb .row.flags-box { flex-direction: column; align-items: flex-start; gap: 6px; padding-top: 10px; }
@media (max-width: 760px) {
  .org-actions { justify-content: flex-start; margin-left: 0; }
  .org-actions .select { max-width: none; flex-basis: 100%; }
}

.event-list .copy-public { flex: none; }

/* CP4c (mock page 12): each Hosting row is "N · Label" (hint under it) on the left, its control on the right. */

.hs-ctl { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--s2, 8px) var(--s3, 12px); max-width: 100%; min-width: 0; }
.hs-pay { display: flex; flex-direction: column; align-items: flex-end; gap: var(--s2, 8px); max-width: 100%; }
.hs-money { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.hs-money .input-num { width: 96px; }
.hosting-settings .hs-ctl > .input-num, .hosting-settings .hs-ctl > input[type="time"] { width: 130px; }
.hosting-settings .pay-flat-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2, 8px); margin-top: var(--s2, 8px); }
.night-hosts { min-width: 0; }

.hosting-link .section-head { margin-bottom: var(--s2, 8px); }
@media (max-width: 520px) {
  .hs-ctl, .hs-pay { justify-content: flex-start; align-items: flex-start; }
}
.hosting-settings .pay-flat-line .input-num { width: 88px; }
.hosting-settings .tier-row { grid-template-columns: 40px minmax(0, 1fr) minmax(0, 1fr); }
.hosting-words { margin: 0; }
/* Team perk allowed tonight (mock page 5): each team a pill around its hidden checkbox. */
.team-ticks { justify-content: flex-end; }
.team-ticks > .pill { position: relative; }
.team-ticks > .pill:has(.sw-input:focus-visible) { outline: 2px solid var(--staff); outline-offset: 2px; }
.waiting-yes .row .btn { flex: none; }
@media (max-width: 760px) {
  .event-list .copy-public { display: none; }
}

/* ---------- CP3 teams: the Teams tab (mock page 10, admin side), Waiting on NV team rows ---------- */

.team-tag { margin-left: 0; letter-spacing: 0.06em; }

.team-request { margin: 0; padding: 8px 12px; border: 1px solid #6b5a2a; border-radius: var(--r-sm); color: var(--warn-ink); font-size: 13px; }

.team-edit { padding-top: var(--s3, 12px); border-top: 1px solid var(--a-rule); }
.team-edit-form { padding: 0; border: 0; }
.team-pay .pay-flat-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2, 8px); margin-top: var(--s2, 8px); }
.team-pay .pay-flat-line .input-num { width: 88px; }
.team-pay .tier-row { grid-template-columns: 40px minmax(0, 1fr) minmax(0, 1fr); }

.member-off { color: var(--a-muted); }

.org-create { margin: var(--s2, 8px) 0; }
.move-row .input { min-width: 0; width: 100%; }
.merge-pick { max-width: 16rem; }

/* ---------- 1.3.0 one login (plans/reservision-one-login.md Task 5) ---------- */

/* The two Reservision-staff tabs at the end of the laptop tab row; "View the site as…" heads its part of View as. */
.menu-head { padding: 10px 12px 4px; margin-top: 4px; border-top: 1px solid var(--a-rule);
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--a-muted); }
.menu-list button[hidden] { display: none !important; }

/* The owner step (mock pages 16 and 18): the mock's .sheet .box .kicker look; full width on a phone, a centred card on
   a laptop. Every class and id stays as the markup draws it (ownerStep, the section sheet, the promote sheet). */
body.sheet-open, body.menu-open { overflow: hidden; }
.owner-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .6);
  display: flex; justify-content: center; overflow-y: auto; padding: var(--s6, 40px) var(--a-gutter); }
/* margin: auto centres the sheet and still lets a tall one scroll from its top (no clipped kicker). */
.owner-sheet { width: 100%; max-width: 440px; margin: auto; background: var(--surface); color: var(--text);
  border: 1px solid var(--border-2); border-radius: 12px; padding: 20px;
  display: flex; flex-direction: column; gap: 12px; }
.owner-danger { border-color: #5a2a27; }
.owner-kicker { font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--staff); }
.owner-danger .owner-kicker { color: var(--bad-ink); }
.owner-title { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.owner-lead { margin: 0; font-size: 13px; line-height: 1.45; color: var(--muted); }
.owner-lead b { color: var(--text); }
.owner-sheet .field, .sheet .box .field { margin: 0; gap: 6px; }
/* The field words (NAME, EMAIL, ROLE): plain small uppercase muted labels, no border or background (mock page 10). */
.owner-sheet .field-label, .sheet .box .field-label, .drawer .field-label { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.owner-sheet .field-hint, .sheet .box .field-hint { font-size: 12px; color: var(--muted); }
.owner-sheet .input, .sheet .box .input { min-height: 34px; padding: 0 10px; font-size: 13px; background: var(--page); border: 1px solid var(--border-2); border-radius: var(--r-sm); color: var(--text); }
.owner-sheet .input:focus, .sheet .box .input:focus { border-color: var(--text); box-shadow: none; }
.owner-sheet .prefix, .sheet .box .prefix { background: var(--page); border-color: var(--border-2); border-radius: var(--r-sm); }
.owner-sheet .prefix .input, .sheet .box .prefix .input { border: 0; background: transparent; }
.owner-prove { border-top: 1px solid var(--border); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.owner-prove-head { margin: 0; font-size: 13px; font-weight: 700; }
.owner-sent { margin: 0; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.owner-sheet .owner-code { font-size: 18px; letter-spacing: 0.3em; font-variant-numeric: tabular-nums; }
.owner-again { align-self: flex-start; font-size: 13px; color: var(--muted); }
.owner-sheet .err { margin: 0; font-size: 13px; }
.owner-buttons { display: flex; flex-direction: column; gap: 8px; }
.owner-buttons .btn { width: 100%; min-height: 34px; justify-content: center; font-size: 13px; font-weight: 600; letter-spacing: 0; }
/* The action is the mock's primary button; Cancel the ghost one in muted words. */
.owner-buttons .owner-go:not(.btn-fill-danger) { background: var(--text); color: #0D0D0F; border-color: var(--text); }
.owner-buttons .owner-go:not(.btn-fill-danger):hover { background: #ffffff; }
.owner-buttons .owner-cancel { background: transparent; color: var(--muted); border-color: var(--border-2); }
.owner-buttons .owner-cancel:hover { background: var(--hover); color: var(--text); }
.btn-fill-danger { background: var(--bad-ink); border-color: var(--bad-ink); color: #0D0D0F; }
.btn-fill-danger:hover { background: var(--bad-ink); }
.owner-go:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 640px) {
  .owner-backdrop { padding: 0; align-items: stretch; }
  .owner-sheet { max-width: none; margin: 0; min-height: 100%; border-radius: 0; border-width: 0; border-top: 1px solid var(--border-2); padding: 20px var(--a-gutter) 28px; }
  .owner-danger { border-top-color: #5a2a27; }
  .owner-sheet .input, .sheet .box .input { min-height: 44px; }
  .owner-buttons .btn { min-height: 44px; }
  .owner-again { min-height: 44px; }
}

.staff-act { display: flex; justify-content: flex-end; }

@media (max-width: 760px) {
  .staff-act { grid-column: 1 / -1; justify-content: flex-start; }
}

/* The phone menu (mock page 17): the ☰ button shows at <= 640 px only, and the tabs, who line, Export, View as and
   Sign out fold into it. */
.menu-btn { display: none; place-items: center; flex: none; width: 44px; height: 44px; padding: 0;
  border-radius: 8px; border: 1px solid var(--border-2); background: transparent; color: var(--a-ink); cursor: pointer; }
.menu-btn:focus-visible, .pm-close:focus-visible, .pm-row:focus-visible, .pm-subrow:focus-visible { outline: 2px solid var(--staff); outline-offset: 2px; }
.pm { position: fixed; inset: 0; z-index: 40; overflow-y: auto; background: var(--side); color: var(--text);
  padding: 20px var(--a-gutter) 28px; display: flex; flex-direction: column; gap: var(--s4, 16px); }
/* The menu scrolls; its sections never shrink to fit the screen (a shrunk .pm-list clipped Settings, Reservision staff and Sign out). */
.pm > * { flex-shrink: 0; }
.pm-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s3, 12px); }
.pm-lockup { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pm-lockup .wordmark { font-size: 22px; }
.pm-lockup .org-name { font-size: 13px; }
.pm-close { display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0;
  border-radius: 8px; border: 1px solid var(--border-2); background: transparent; color: var(--text); cursor: pointer; }
.pm-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); }
.pm-who { padding: 14px var(--s4, 16px); display: flex; flex-direction: column; gap: 4px; }
.pm-name { font-size: 16px; font-weight: 800; }
.pm-meta { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.pm-list { display: flex; flex-direction: column; overflow: hidden; }
.pm-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s3, 12px); width: 100%;
  min-height: 48px; padding: 12px var(--s4, 16px); background: none; border: 0; border-bottom: 1px solid var(--border);
  font: inherit; font-size: 16px; font-weight: 500; color: var(--text); text-align: left; text-decoration: none; cursor: pointer; }
.pm-row:hover { background: var(--hover); }
.pm-list > .pm-row:last-child { border-bottom: 0; }
.pm-row[aria-current="page"] { background: var(--hover); font-weight: 600; }
.pm-side { color: var(--muted); font-weight: 500; font-size: 14px; white-space: nowrap; }
.pm-side:empty { display: none; }
.pm-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 8px;
  border-radius: 999px; background: var(--text); color: #0D0D0F; font-size: 12px; font-weight: 800; }
.pm-staff { border: 1px solid var(--a-staff); }
.pm-staff-label { padding: 10px var(--s4, 16px) 6px; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; color: var(--a-staff-ink); }
.pm-staff .pm-row { padding-top: 12px; padding-bottom: 12px; }
.pm-sub { display: flex; flex-direction: column; border-bottom: 1px solid var(--border); padding: 4px 0; }
.pm-subrow { width: 100%; min-height: 44px; padding: 10px var(--s4, 16px) 10px var(--s5, 24px); background: none; border: 0;
  font: inherit; font-size: 14px; font-weight: 500; color: var(--muted); text-align: left; cursor: pointer; }
.pm-subrow:hover, .pm-subrow[aria-current="true"] { color: var(--text); }
.pm-signout { color: var(--muted); }
@media (max-width: 640px) {
  .menu-btn { display: inline-grid; }

}

.req-count { font-size: 13px; color: var(--a-muted); font-variant-numeric: tabular-nums; }
/* Requests (mock page 8): the head's count and List, the pills (.pills > .pill), the stack or the list. */
.req-pills { margin: 0; }
.req-pill:focus-visible { outline: 2px solid var(--staff); outline-offset: 2px; }
.req-slot .rvs { margin: 0 auto; }
.req-list { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.req-night > .label { margin: 0 0 8px; color: var(--muted); }
@media (max-width: 640px) {
  .req-slot .rvs { max-width: none; }
}

/* Task 10b: the new-night hosting check (after SAVE on a new night, and on an unchecked upcoming night's page). */
.hosting-check { border-color: var(--border-2); }

.hosting-check .hc-ask { margin: var(--s2, 8px) 0 0; font-size: 17px; font-weight: 600; line-height: 1.4; }
.hosting-check .hc-pay { margin: var(--s2, 8px) 0 0; line-height: 1.45; }
.hosting-check .hc-source { color: var(--a-muted); }

/* ---------- 1.4.1 Your roles (plans/reservision-141-multi-org.md Task 4, mock page 22) ----------
   The Overview card and the phone menu's identity card carry the role tags. A tag takes the pill's shape;
   purple for Reservision staff, green for an org owner or a team leader (1.5.0). */

.role-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.pm-who .role-tags { margin-top: 4px; }
.tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: var(--radius-pill, 999px);
  border: 1px solid var(--a-ink); color: var(--a-ink); font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; white-space: nowrap; background: transparent;
}
.tag-staff { border-color: var(--a-staff-ink); color: var(--a-staff-ink); }
.tag-owner { border-color: var(--a-owner-ink); color: var(--a-owner-ink); }

/* ---------- 1.5.0 (plans/reservision-141-multi-org.md Task 10, mock pages 24-27) ----------
   The help bar (P25): the Reservision-staff purple above the header while staff help an org as its Admin. */
.help-banner {
  display: flex; align-items: center; justify-content: center; gap: var(--s3, 12px); flex-wrap: wrap;
  background: var(--a-staff); color: #ffffff; padding: 8px var(--a-gutter); font-size: 13px; font-weight: 600;
}
.help-banner .help-exit {
  color: #ffffff; font-weight: 700; letter-spacing: 0.08em; text-decoration: none; border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-pill, 999px); padding: 2px 10px; font-size: 11px;
}
.help-banner .help-exit:hover, .help-banner .help-exit:focus-visible { background: rgba(255, 255, 255, 0.16); outline: none; }

/* Kind tags (P24, P25): ORG on an organization, TEAM on a team row. */
.tag-kind { height: 18px; padding: 0 7px; font-size: 9px; color: var(--a-muted); border-color: var(--a-rule); flex: none; }

/* The picker (mock page 24): one row per org, the whole row a link. */
.org-picker .row { padding: 0; }
.org-pick { display: flex; align-items: center; gap: var(--s3, 12px); width: 100%; padding: var(--s3, 12px) 0; color: inherit; text-decoration: none; }
.org-pick .row-main { display: inline-flex; align-items: center; gap: 8px; }
.org-pick .org-arrow { margin-left: auto; font-size: 20px; }
/* The redesign's picker card: the .card is the box, so the list inside loses its own border and the card its padding. */
.card.org-picker-card { padding: 0; max-width: 560px; }
.org-picker-card .rows-boxed { border: 0; background: transparent; border-radius: 0; padding: 0; margin: 0; }
.org-picker-card .org-picker .row { border-top: 1px solid var(--border); }
.org-picker-card .org-picker .row:first-child { border-top: 0; }
.org-picker-card .org-pick { padding: 12px 16px; }
.org-picker-card .org-pick:hover { background: var(--hover); }

/* The org's Staff tab (mock page 27): tap a row to open its role, toggles and Remove. */
/* The staff table's rows open their editor drawer: the role segment and the toggles on the left, the buttons right. */
.tbl .tr.staff-row { cursor: pointer; }
.tbl .tr.staff-row:hover { background: var(--hover); }
.staff-edit-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.staff-edit-main .field-label + * { margin-top: 6px; }
/* The Person cell: avatar and name on one line; a long name (an email used as the name) ends in an ellipsis. */
.person-cell { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 0; }
.person-cell .stack { flex: 1 1 0; min-width: 0; }
.person-cell .stack > b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; }
.staff-toggles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; }
.staff-toggles .sw-label { font-size: 13px; }
/* Console: View the site as… */
.viewsite-list { display: flex; flex-direction: column; gap: var(--s2, 8px); align-items: flex-start; }

/* ---------- 1.5.0 Checkpoint 3 (plans/reservision-141-multi-org.md Task 14, mock pages 23b, 23c, 28, 29) ----------
   Partner nights: the PARTNER chip on the Nights tab and the night's page; the Partner organizations block on a
   night's Hosting view. */

.partner-night p { margin: var(--s2, 8px) 0 0; }
.partners .partner-row { flex-wrap: wrap; }

.partner-invite { margin-top: var(--s3, 12px); }
.rvs-partner-line { font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; }
/* Teams tab: open offers; each team's link to its own page. */
.team-offers { margin: 0; }

/* The team page (/dashboard/<org>/<team>). */
/* The team page head (mock page 12): the .head row, the emblem as the large avatar beside the name. */
.team-page-head .org-head { min-width: 0; }
.team-page-head h1 { overflow-wrap: anywhere; }
img.av { object-fit: cover; padding: 0; background: var(--hover); }
.team-member-row .row-text { min-width: 0; }
.team-member-row .row-main { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
/* A suggestion from the org (purple, like the mock's row): on the member's row and in Requests. */
.suggest-line { color: var(--a-staff-ink); font-size: 13px; overflow-wrap: anywhere; }
.row.suggested { background: #1a1724; }
.btn-suggest { border-color: var(--a-staff-ink); color: var(--a-staff-ink); }
.suggest-slot:empty { display: none; }
.suggest-form { display: flex; flex-direction: column; gap: var(--s2, 8px); margin-top: var(--s2, 8px); }

.team-org-side .hs-row, .team-yours .facts { margin-top: var(--s2, 8px); }
.team-end-row { border-top: 1px solid var(--a-rule); padding-top: var(--s3, 12px); }
/* Mock page 28: the promotion section and its confirm sheet, in the owner green. */
.team-promote .label { color: var(--a-owner-ink); }
/* The promote button (mock page 12b): the green outline in --ok-ink. */
.btn.promote { background: transparent; border-color: var(--ok-ink); color: var(--ok-ink); }
.btn.promote:hover { background: rgba(143, 211, 166, 0.08); }
.promote-sheet { border-color: var(--a-owner-ink); }
.promote-sheet .owner-kicker { color: var(--a-owner-ink); }
.promote-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.btn-promote-go { background: var(--a-owner); border-color: var(--a-owner); color: #ffffff; }
.btn-promote-go:disabled { opacity: 0.5; }

/* ---------- Checkpoint 4 (1.5.0 Task 18, mock pages 31 and 32) ---------- */
/* PAID AS HOST / TRACKED ONLY on a night with Hosts need approval tonight on. */
.pill-paid { border-color: var(--a-owner-ink); color: var(--a-owner-ink); }
.pill-tracked { border-color: var(--a-muted); color: var(--a-muted); }
.btn.pill-btn { min-height: 32px; padding: 0 12px; font-size: 10px; font-weight: 800; letter-spacing: 0.06em; flex: none;
  background: transparent; }
.btn.pill-btn.pill-paid { border-color: var(--a-owner-ink); color: var(--a-owner-ink); }
.btn.pill-btn.pill-tracked { border-color: var(--a-muted); color: var(--a-muted); }
.btn.pill-btn.armed { background: var(--a-err); border-color: var(--a-err); color: var(--a-on-ink); }
.hosting-row .pill-btn, .night-hosts .pill-btn { margin-left: 0; }
/* A tracked-only host's row: their numbers read grey (they bring names, they are not paid as a host tonight). */
.row.not-paid .row-text .muted { opacity: 0.6; }
.row.not-paid .door-name { color: var(--a-muted); }
.hosting-settings .hs-approval { border-top: 1px solid var(--a-rule); }

/* The ISO date box: 2026 over 11-07. */
.stamp-iso .stamp-date { font-size: 16px; }

/* Sections (mock page 31): the map image, tap for full screen; who holds what. */
.sections-map { display: flex; flex-direction: column; gap: var(--s3, 12px); }
.map-tap { display: flex; flex-direction: column; gap: 6px; align-items: stretch; width: 100%; padding: 0; border: 1px solid var(--a-rule);
  border-radius: var(--radius, 6px); background: var(--a-card); cursor: zoom-in; overflow: hidden; color: var(--a-muted); font: inherit; }
.map-tap:focus-visible { outline: 2px solid var(--staff); outline-offset: 2px; }
.map-img { display: block; width: 100%; height: auto; max-height: 45vh; object-fit: contain; touch-action: pinch-zoom; background: var(--a-surface); }
.map-hint { font-size: 12px; padding: 0 var(--s3, 12px) 8px; text-align: center; }

.map-full { position: fixed; inset: 0; z-index: 45; background: #000000; overflow: auto; display: flex; align-items: flex-start;
  justify-content: center; touch-action: pinch-zoom; }
.map-full-img { display: block; width: 100%; max-width: none; height: auto; touch-action: pinch-zoom; }
.map-full-close { position: fixed; top: max(12px, env(safe-area-inset-top)); right: 12px; z-index: 46; }
.sections-list { display: flex; flex-direction: column; gap: var(--s2, 8px); }
.sections-count { color: var(--a-muted); }

.sec-row .row-main { overflow-wrap: anywhere; }
.sec-name { font-weight: 800; }
.sec-free .row-main { color: var(--a-muted); }
.sec-free .sec-name { color: var(--a-ink); }
.sec-reserved { color: var(--a-staff-ink); font-weight: 600; }
.sec-note { font-size: 12px; text-align: right; flex: 0 1 auto; max-width: 45%; overflow-wrap: anywhere; }
.section-names .textarea { width: 100%; }
.sec-sheet .owner-kicker { color: var(--a-muted); }
.sections-empty .muted { margin-top: var(--s2, 8px); }

/* Display (mock page 32 bottom): this browser's date and time format. */
.display-card { display: flex; flex-direction: column; gap: var(--s3, 12px); margin-top: var(--s4, 16px); }
.display-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s3, 12px); flex-wrap: wrap; font-size: 15px; }
.display-label { font-weight: 600; }
.display-row .segment { align-self: center; }
.pm-display { gap: var(--s2, 8px); padding: 8px var(--s4, 16px) 12px var(--s5, 24px); }
.pm-display-hint { margin: 0; }

/* ---------- 4b. the Checkpoint 2 views (mock pages 3-13; plan Tasks 4, 7, 8, 9) ---------- */
/* The two-column variants: Hosts 1.4fr 1fr (page 7), Settings 1fr 1fr (page 11), the team page as drawn (page 12). */
.two.hosts-two { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.two.settings-two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.two.team-two { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
/* The night page's three tiles (page 4). */
.tiles.tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* A status pill inside a table cell or a setting's controls sits flush (the older pill's left margin is for a title). */
.cell .pill, .hs-ctl .pill, .stack .pill { margin-left: 0; }

/* A night (page 4): Hosts and their guests. A host line opens their guests, indented under it on the darker band. */
.cb .row.host-group { cursor: pointer; }
.cb .row.host-group:hover { background: var(--hover); }
.cb .row.host-group[aria-expanded="true"] { background: var(--hover); }
.row.host-group > .chev { width: 14px; flex: none; text-align: center; }
.host-group-tag { display: inline-flex; vertical-align: middle; margin-left: 6px; }
.host-group-tag:empty { display: none; }
.host-guests { background: #141416; border-top: 1px solid var(--border); }
.cb .host-guests > .row.guest { padding-left: 42px; }
.cb .host-guests > .row.guest:first-child { border-top: 0; }

/* A night · Hosting (page 5): the eight numbered rows are .setting lines; their controls sit at the right. */
.setting.hs-row .hs-ctl { justify-content: flex-end; }
.setting .input, .setting .select { width: auto; min-height: 32px; padding: 0 10px; font-size: 13px; background: var(--page); border: 1px solid var(--border-2); border-radius: var(--r-sm); color: var(--text); }
.setting .input:focus, .setting .select:focus { border-color: var(--text); box-shadow: none; }
.setting .input-num { width: 90px; }
.setting .textarea { width: 100%; min-height: 72px; padding: 8px 10px; }
.setting .prefix { background: var(--page); border-color: var(--border-2); border-radius: var(--r-sm); }
.setting .prefix .input { border: 0; background: transparent; }
.setting.hs-words, .setting.hs-foot { grid-template-columns: minmax(0, 1fr); }
.setting.hs-words .hosting-words { font-size: 12px; color: var(--muted); }
.setting.hs-foot .actions { gap: 10px; }
.setting.hs-foot .err:empty { display: none; }

/* Settings (page 11): the pay model's rows stack inside the card with the setting hairline between them. */
.cb > .model-block { gap: 0; }
.cb > .model-block > .setting:first-child { border-top: 1px solid var(--border); }
.setting.tier-ladder, .setting.preview, .setting.hosts-read { grid-template-columns: minmax(0, 1fr); }
.tbl.tier-table { background: var(--surface); border-color: var(--border); border-radius: var(--r); }
.tbl.tier-table .input { width: 100%; max-width: 120px; }
.setting.preview .k, .setting.hosts-read .k { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.setting.hosts-read #hosts-read { font-size: 13px; color: var(--text); }
.setting.display-row { font-size: 13px; }
.settings-one-night { color: var(--muted); }

/* A night · Sections (page 6): the map in the tokens; the staff purple for a section NV holds. */
.sections-map .map-tap { border-color: var(--border); background: var(--surface); border-radius: var(--r-sm); }
.sections-map .map-img { background: #141416; }
.map.map-none { min-height: 220px; height: auto; }

/* Teams (page 9) and Staff (page 10). */
.tbl .tr.ended, .tbl .tr.ended .stack b { color: var(--muted); }
.tbl .tr.removed .stack b { color: var(--muted); }
.drawer.team-pay-drawer { grid-template-columns: minmax(0, 1fr); }
.drawer.staff-edit .actions { justify-content: flex-end; }

/* A team's page (pages 12, 12b): the sub-tab count, the suggestion rows, the card's small lines. */
.subtabs .count { display: inline-block; margin-left: 4px; min-width: 20px; padding: 0 7px; border-radius: 999px; background: var(--text); color: #0D0D0F; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.card-hint { padding: 10px 16px; font-size: 12px; }
.card-lead { font-size: 13px; }
.row.member-off { color: var(--muted); }
.row.member-off .grow b { color: var(--text); }
.team-invite-card .cb .input { width: 100%; }

/* Hosts (page 7) and Requests (page 8): the remaining pieces Tasks 8 and 9 draw. */
.card.join-line .cb .row { padding: 12px 16px; }
.card.waiting-block, .tbl.team-list, .tbl.staff-list { min-width: 0; }
.drawer.host-detail .facts dd { overflow-wrap: anywhere; }
.org-row-team .org-who + .org-who > span:first-child { color: var(--text); }
.req-list-link, #toggle-ended { flex: none; }
.btn.back { text-decoration: none; }
.drawer .seg:not(button) { align-self: flex-start; }
/* A sheet's form is one column wide (440 px): the older three-box rows stack. */
.sheet .box .grid2, .sheet .box .grid3 { grid-template-columns: minmax(0, 1fr); gap: 10px; }
.sheet .box .add-result { border-top-color: var(--border); padding-top: 12px; }

/* ---------- 5. the phone (mock phone page; design-tokens rule 4: every tap target at least 44 px) ---------- */
@media (max-width: 900px) {
  .two, .two.hosts-two, .two.settings-two, .two.team-two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Tables fold: no header row; each row a two-column card whose cells print their column name (the old .oc[data-k]). */
  .tbl .th { display: none; }
  .tbl .tr { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; gap: 6px 12px; padding: 12px 14px; min-height: 0; }
  .tbl .tr.sub .cell:first-child { padding-left: 18px; }
  .tbl .tr.sub .cell:first-child::before { display: none; }
  .tbl .tr.sub { border-left: 3px solid var(--border-2); }
  .cell[data-k]::before { content: attr(data-k); display: block; flex-basis: 100%; font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
  .cell.r { justify-content: flex-start; text-align: left; }
  .cell:empty { display: none; }
  /* Folded cards have no hover for the title, so an email wraps there instead of hiding its end. */
  .tbl .email { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
  .drawer { grid-template-columns: minmax(0, 1fr); }
  .drawer .facts { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .drawer .facts dd + dt { margin-top: 8px; }
  .toolbar { align-items: stretch; }
  /* Organizations folded: the org cell (avatar, name, its line) heads the card full width; the chevron follows it. */
  #org-table .tr:not(.sub) > .cell:nth-child(2) { grid-column: 1 / -1; order: -1; }
  /* Every other folded table: the first cell (the name) heads the card full width, unless it is a tick or a chevron;
     the row's ··· sits at the card's right. */
  .tbl .tr:not(.th) > .cell:first-child:not(:has(> .chk, > button.chev, > .chev)) { grid-column: 1 / -1; }
  .tbl .tr > .cell:has(> .row-menu) { justify-content: flex-end; }
  .tiles.tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .setting.hs-row .hs-ctl, .team-ticks { justify-content: flex-start; }
}
@media (max-width: 520px) {
  /* The older header's ".menu { order: 2 }" must not reorder the head's buttons or Filter and Sort. */
  .head .right > .menu, .toolbar .menu { order: 0; }
}
@media (max-width: 640px) {
  .sb { display: none; }
  .content { margin-left: 0; }
  .ptop { display: flex; }
  .main { padding: 16px; gap: 14px; }
  .head { flex-wrap: wrap; }
  .head h1 { font-size: 20px; }
  .head .right { justify-content: flex-start; }
  .org-head { flex-wrap: wrap; gap: 12px; }
  .burger { width: 44px; height: 44px; }
  .disp-row { flex-wrap: wrap; }
  .disp-row .disp-inp, .disp-row .disp-save { min-height: 44px; }
  .btn, .btn.sm, .btn-sm, .btn.pill-btn { min-height: 44px; }
  .dots { min-width: 44px; min-height: 44px; }
  .sw { min-height: 44px; min-width: 44px; }
  /* sw()'s .sw is the drawn track: keep its size and make the whole label the 44 px target instead. */
  .sw-field { min-height: 44px; }
  .sw-field .sw { min-height: 20px; min-width: 36px; }
  .filter { min-height: 44px; }
  .pills > .pill { height: 44px; }
  .pager span, .pager button { min-width: 44px; height: 44px; }
  .inp { min-height: 44px; }
  .inp.w { min-width: 0; width: 100%; }
  .setting { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .sheet { padding: 0; place-items: stretch; }
  .sheet .box { max-width: none; min-height: 100%; border-radius: 0; border-width: 0; border-top: 1px solid var(--border-2); }
  /* The console and Overview additions: 44 px taps. */
  .input.inp { min-height: 44px; }
  .find-row .input.inp { flex: 1 1 200px; }
  .tbl button.chev { width: 44px; height: 44px; }
  .view-all { display: inline-flex; align-items: center; min-height: 44px; }
  .drawer .put-night-box .select, .drawer .put-night-pick, .drawer .put-night-box .btn, .drawer .put-night { min-height: 44px; }
  .drawer .put-night-box .select { max-width: none; flex-basis: 100%; }
  .drawer .put-night-box .btn { width: 100%; }
  /* The Checkpoint 2 views: 44 px taps. */
  .seg { min-height: 44px; }
  .host-open { min-height: 44px; justify-content: center; }
  .subtabs a, .subtabs button { min-height: 44px; display: inline-flex; align-items: center; }
  .cb .row.host-group, .cb .row.row-click { min-height: 44px; }
  .chk { width: 24px; height: 24px; }
  .setting .input, .setting .select, .org-actions .select, .sheet .box .select { min-height: 44px; }
  .staff-toggles { grid-template-columns: minmax(0, 1fr); }
  .map-full-close { min-width: 44px; }
  /* The head's and the toolbar's pop lists: the wrapped .right starts at the left edge, so a list right-aligned under
     its button would run off the screen. On a phone they hang from the whole head (full width) or the toolbar's right. */
  .head { position: relative; }
  .head .right > .menu { position: static; }
  .head .right > .menu > .menu-list { left: 0; right: 0; min-width: 0; top: calc(100% + 6px); }
  .toolbar { position: relative; }
  .toolbar .menu { position: static; }
  .toolbar .menu > .menu-list { left: auto; right: 0; max-width: 100%; }
}
@media (max-width: 480px) {
  .tiles, .tiles.tiles-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* 1.7.0 Checkpoint 2: the org's and team's banner and picture (plans/reservision-banners-sections-live.md Task 2.2).
   .head.has-banner stacks the 160 px strip above the name row, the picture square overlapping its bottom by half;
   .head.has-add is the dashed "Add a banner" strip (only roles that may set it); with neither the head is unchanged. */
.head.has-banner { flex-direction: column; align-items: stretch; gap: 0; }
.head.has-add { flex-direction: column; align-items: stretch; }
.head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.org-banner { height: 160px; border-radius: 12px; object-fit: cover; width: 100%; display: block; background: var(--hover); }
/* Only the picture square overlaps the banner (by half); the name, sub-line and actions sit below it. */
.has-banner .org-head { align-items: flex-start; padding-left: 16px; }
.has-banner .pic-wrap { margin-top: -28px; }
.has-banner .org-head > div:not(.pic-wrap) { padding-top: 10px; min-width: 0; }
.has-banner .head-row .right { padding-top: 8px; }
.org-pic { object-fit: cover; border: 2px solid var(--side); }
.av.sm.org-pic { border-width: 1px; }
.banner-add { border: 1.5px dashed var(--border); height: 72px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.banner-add-btn { background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; min-height: 44px; padding: 0 16px; }
.banner-add-btn:hover, .banner-add-btn:focus-visible { color: var(--text); }
.banner-add .img-change { display: none; }
.img-wrap { position: relative; }
.banner-wrap .img-change { position: absolute; right: 10px; bottom: 10px; opacity: 0; transition: opacity 0.15s; }
.pic-wrap .img-change { position: absolute; left: 0; top: calc(100% + 4px); opacity: 0; transition: opacity 0.15s; white-space: nowrap; z-index: 2; }
.img-wrap:hover .img-change, .img-wrap:focus-within .img-change { opacity: 1; }
@media (max-width: 640px) {
  .org-banner { height: 96px; }
  .has-banner .org-head { padding-left: 10px; }
  .img-wrap .img-change { display: none; }
}

/* 1.7.0 Checkpoint 3: section map v2 (plans/reservision-banners-sections-live.md Task 3.2; Khalil's approved mock).
   .room is the snap grid (--cols × --rows cells, aspect-ratio set from the grid); boxes sit in percent. .room.look is
   Tonight's sheet: no grid lines and the page scrolls under a finger. Colours as the mock. */
.room-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; margin-top: 16px; }
.room-card { padding: 12px; min-width: 0; }
.room { position: relative; width: 100%; aspect-ratio: 20 / 22; border-radius: 8px; overflow: hidden; background-color: #0f0f12;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: calc(100% / var(--cols, 20)) calc(100% / var(--rows, 22)); touch-action: none; user-select: none; }
.room.look { background-image: none; touch-action: auto; }
.room .trace { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; opacity: 0.28; pointer-events: none; }
.rbox { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 2px;
  border-radius: 6px; border: 1.5px solid rgba(255, 255, 255, 0.18); background: #2b2b31; color: var(--text); text-align: center;
  font-family: ui-monospace, monospace; font-weight: 600; font-size: clamp(9px, 1.6vw, 13px); line-height: 1.1; overflow: hidden; cursor: pointer; }
.rbox small { font-family: inherit; font-weight: 600; font-size: clamp(8px, 1.25vw, 10.5px); opacity: 0.92; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.room:not(.look) .rbox { cursor: grab; }
.rbox.free { background: #2b2b31; }
.rbox.held { background: #e0a43a; color: #1a1205; border-color: transparent; }
.rbox.booked { background: #3fb27f; color: #04140c; border-color: transparent; }
.rbox.reserved { background: #9b7bff; color: #0e0820; border-color: transparent; }
.rbox.land { background: #1c1c21; border-style: dashed; color: var(--muted); }
.room.look .rbox.land { cursor: default; }
.rbox.sel { box-shadow: 0 0 0 2px #ffffff; z-index: 3; }
.rbox.dragging { cursor: grabbing; opacity: 0.85; z-index: 5; }
.rbox:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }
.room-panel { padding: 14px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.room-panel h2 { font-size: 16px; margin: 0; }
.room-panel p { margin: 0; }
.room-add { display: flex; flex-direction: column; gap: 8px; }
.room-sel { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border); }
.room-sel.actions { flex-direction: row; align-items: center; flex-wrap: wrap; }
.room-panel .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.room-trace .btn.on { background: var(--hover); border-color: var(--text); }
.row-line { display: flex; gap: 10px; align-items: baseline; }
.rbox-title { font-family: ui-monospace, monospace; font-size: 15px; }
.room-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.lg-sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -2px; background: #2b2b31; }
.lg-sw.held { background: #e0a43a; }
.lg-sw.booked { background: #3fb27f; }
.lg-sw.reserved { background: #9b7bff; }
.lg-sw.free { background: #2b2b31; border: 1px solid rgba(255, 255, 255, 0.18); }
.room-byhost { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.room-byhost > div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.room-byhost .codes { font-family: ui-monospace, monospace; font-size: 12px; text-align: right; overflow-wrap: anywhere; }
.room-public { display: flex; flex-direction: column; gap: 6px; padding-top: 12px; border-top: 1px solid var(--border); }
.room-dirty { color: #e0a43a; }
.copy-list { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow: auto; }
.copy-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.copy-pick { text-align: left; }
@media (max-width: 640px) {
  .room-layout { grid-template-columns: minmax(0, 1fr); }
  .room-panel .btn, .room-tabs button { min-height: 44px; }
}

/* 1.7.0 CP4: View the site as a specific person (console only) and the Accounts drawer's Looks. */
.person-sheet .person-q { width: 100%; margin: 4px 0 10px; }
.person-list { display: flex; flex-direction: column; gap: 2px; max-height: 50vh; overflow: auto; }
.person-row { display: flex; align-items: center; gap: 10px; min-height: 48px; text-align: left; padding: 6px 8px; border-radius: 8px; }
.person-row:hover { background: var(--hover); }
.person-row .stack { min-width: 0; }
.person-row .muted { font-size: 12px; overflow-wrap: anywhere; }
.person-row .chev { margin-left: auto; }
.move-row { cursor: pointer; }
.looks { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.looks-head { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.looks-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 2px; }
@media (max-width: 640px) {
  .person-row, .view-person-btn { min-height: 44px; }
}

/* 1.7.0 CP2 fix (Khalil's staging check): Change banner / Change picture read on any image, a white banner included.
   A solid dark chip in place of the near-transparent ghost; the ghost button elsewhere is unchanged. */
.img-wrap .img-change .btn { background: rgba(13,13,15,.82); color: #F5F5F4; border: 1px solid rgba(255,255,255,.18); box-shadow: 0 2px 8px rgba(0,0,0,.35); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.img-wrap .img-change .btn:hover, .img-wrap .img-change .btn:focus-visible, .img-wrap .img-change .btn:focus-within { background: rgba(32,32,35,.9); color: #F5F5F4; }

/* 1.9.0 CP4: section map v3, several people per section (plan nv-door-groups-section-map.md; the approved 7-page mock
   docs/mocks/2026-11-07-section-map-groups). Phone first (390 px): bottom sheets, 44 px taps, the dashboard's tokens and
   the room's four status colours. Sharing a section is seating only (R2); nothing here is a pay group. */
.rbox .more { position: absolute; top: 1px; right: 3px; font-size: 8px; font-weight: 700; line-height: 1; }
.room-card .room-hint { margin: 10px 2px 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.room-layout.byperson { grid-template-columns: minmax(0, 1fr); }
.role-chip { display: inline-block; vertical-align: middle; font-family: ui-monospace, monospace; font-size: 10px; font-weight: 700; letter-spacing: .06em; color: var(--muted); border: 1px solid var(--border-2); border-radius: 4px; padding: 3px 6px; }
.sheet.sec-wrap { place-items: end center; padding: 0; }
.sheet.sec-wrap .box.sec-box { max-width: 520px; min-height: 0; max-height: 92vh; overflow-y: auto; border-radius: 18px 18px 0 0; border-width: 1px 1px 0; padding: 10px 16px 22px; box-shadow: 0 -20px 40px rgba(0, 0, 0, .55); }
.sheet.sec-pop-wrap { z-index: 41; }
.sec-box > * { flex-shrink: 0; }   /* the sheet scrolls; its rows never squash (the results list, the status segment) */
.sec-box .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--border-2); align-self: center; }
.sec-box .sh-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sec-box .sh-h h3 { margin: 0; font-family: ui-monospace, monospace; font-size: 20px; font-weight: 800; }
.sec-box .sec-title { margin: 0; font-size: 19px; font-weight: 800; }
.st-pill { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: #2b2b31; color: var(--text); white-space: nowrap; }
.st-pill.held { background: #e0a43a; color: #1a1205; }
.st-pill.booked { background: #3fb27f; color: #04140c; }
.st-pill.reserved { background: #9b7bff; color: #0e0820; }
.sec-people, .sec-list { display: flex; flex-direction: column; gap: 8px; }
.sec-person { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--page); border: 1px solid var(--border-2); border-radius: 10px; min-height: 52px; min-width: 0; }
.sec-person .stack { display: flex; flex-direction: column; min-width: 0; }
.sec-person .stack b { font-size: 15px; overflow-wrap: anywhere; }
.sec-person .stack span { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.sec-person .kind { margin-left: auto; flex: none; font-family: ui-monospace, monospace; font-size: 10px; font-weight: 700; padding: 3px 6px; border-radius: 4px; background: var(--hover); color: var(--muted); white-space: nowrap; }
.sec-person .kind.host { background: #13283d; color: #5aa9ff; }
.sec-hint { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.sec-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sec-row2.one { grid-template-columns: 1fr; }
.sec-row2 .btn, .sec-pop > .btn { min-height: 46px; border-radius: 999px; font-size: 15px; font-weight: 700; justify-content: center; }
.sec-pop .sec-cancel { min-height: 44px; align-self: center; color: var(--muted); }
.toks { display: flex; flex-wrap: wrap; gap: 8px; }
.tok { display: inline-flex; align-items: center; gap: 6px; background: var(--hover); border: 1px solid var(--border-2); border-radius: 999px; padding: 0 0 0 12px; font-size: 14px; font-weight: 600; min-height: 44px; max-width: 100%; }
.tok.typed { border-style: dashed; }
.tok .tok-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tok small { font-size: 11px; color: var(--muted); }
.tok .x { min-width: 44px; min-height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--text); font-size: 15px; cursor: pointer; }
.tok .x:focus-visible { outline: 2px solid var(--staff); outline-offset: -4px; }
.sec-edit .input { min-height: 46px; font-size: 15px; }
.sec-results { display: flex; flex-direction: column; border: 1px solid var(--border-2); border-radius: 8px; overflow: hidden; margin-top: -6px; }
.sec-results:empty { display: none; }
.sec-results > .muted { margin: 0; padding: 10px 12px; }
.lr { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--page); border: 1px solid var(--border-2); border-radius: 10px; min-height: 48px; width: 100%; text-align: left; color: var(--text); font: inherit; }
.lr.tap { cursor: pointer; }
.lr.tap:hover, .sec-results .lr:hover { background: var(--hover); }
.sec-results .lr { border: 0; border-radius: 0; border-bottom: 1px solid var(--border-2); cursor: pointer; }
.sec-results .lr:last-child { border-bottom: 0; }
.lr .nm { font-size: 14px; font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.lr .nm small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); }
.lr .where { margin-left: auto; flex: none; font-family: ui-monospace, monospace; font-size: 11px; font-weight: 700; color: var(--muted); text-align: right; max-width: 45%; overflow-wrap: anywhere; }
.lr .where.none { color: #e0a43a; }
.sec-field-btn { min-height: 46px; border: 1px solid var(--border-2); border-radius: 8px; background: var(--page); color: var(--muted); font: inherit; font-size: 15px; text-align: left; padding: 0 12px; cursor: pointer; }
.sec-type-row { display: flex; gap: 8px; }
.sec-type-row .input { flex: 1 1 auto; min-width: 0; }
.sec-type-row .btn { min-height: 46px; }
.sec-seg.segment { display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; border-radius: 10px; }
.sec-seg .seg { min-height: 44px; padding: 0 2px; white-space: normal; text-align: center; border-right: 1px solid var(--border-2); }
.sec-seg .seg:last-child { border-right: 0; }
.sec-seg .seg[aria-checked="true"] { background: #e0a43a; color: #1a1205; }
.sec-also { display: flex; flex-wrap: wrap; gap: 6px; }
.sec-also .sc { min-width: 44px; min-height: 44px; padding: 0 9px; font-family: ui-monospace, monospace; font-size: 12px; font-weight: 700; border: 1px solid var(--border-2); border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.sec-also .sc.on { background: #e0a43a; color: #1a1205; border-color: #e0a43a; }
.sec-also .sc:disabled { cursor: default; opacity: .75; }
.tg-with-sub { display: flex; flex-direction: column; gap: 2px; }
.tg-with-sub .tg-sub { padding-left: 46px; font-size: 12px; color: var(--muted); }
@media (max-width: 640px) {
  .sheet.sec-wrap .box.sec-box { max-width: none; }
}
/* 1.11.0 (Khalil 11-14 K2, K4): the Activity tab and the console's Activity page. Three filters in one row (wrapping on a
   phone, 44 px taps), the table, More, and the drawer's Before / After columns with the fold "Everything". */
.act-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.act-filters .input { flex: 1 1 180px; min-width: 0; min-height: 44px; }
.act-change { overflow-wrap: anywhere; }
.act-more { display: block; margin: 12px auto 0; min-height: 44px; min-width: 120px; }
.act-empty { padding: 16px 0; }
.drawer.act-drawer { grid-template-columns: minmax(0, 1fr); }
.act-diff { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 24px; }
.act-col h3, .act-all h3 { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.act-col dd { overflow-wrap: anywhere; }
.act-all summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 600; }
.act-pre { margin: 0 0 12px; padding: 10px; max-height: 320px; overflow: auto; background: var(--page); border: 1px solid var(--border); border-radius: 6px; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .act-filters .input { flex-basis: 100%; }
  .act-diff { grid-template-columns: minmax(0, 1fr); }
}
/* 1.12.0 (Khalil 11-07 R1): the one Add popup (docs/mocks/2026-11-08-add-popup-paid-with pages 2-3), drawn on the section
   sheet's bottom-sheet look (.sheet.sec-wrap .box.sec-box, .lr rows). Phone first: 44 px taps, the dashboard's tokens. */
.ap-box .ap-q { min-height: 46px; font-size: 15px; }
.ap-results { display: flex; flex-direction: column; border: 1px solid var(--border-2); border-radius: 8px; overflow: hidden; }
.ap-results:empty { display: none; }
.ap-results .lr { border: 0; border-radius: 0; border-bottom: 1px solid var(--border-2); cursor: pointer; }
.ap-results .lr:last-child { border-bottom: 0; }
.ap-results .lr:hover { background: var(--hover); }
.ap-row .nm { flex: 1 1 auto; }
.ap-row.ap-done { cursor: default; }
.ap-k { margin-left: auto; flex: none; font-family: ui-monospace, monospace; font-size: 10px; font-weight: 700; padding: 3px 6px; border-radius: 4px; background: var(--hover); color: var(--muted); white-space: nowrap; }
.ap-k.on { background: #13283d; color: #5aa9ff; }
.ap-k.gold { background: var(--gold); color: #1a1205; }
.ap-hint { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.ap-btn { min-height: 46px; border-radius: 999px; font-size: 15px; font-weight: 700; justify-content: center; }
.ap-empty { margin: 0; padding: 14px 12px; border: 1px dashed var(--border-2); border-radius: 8px; color: var(--muted); font-size: 14px; text-align: center; overflow-wrap: anywhere; }
.ap-panel { display: flex; flex-direction: column; gap: 10px; }
.ap-panel:empty { display: none; }
.ap-link { font-family: ui-monospace, monospace; font-size: 13px; font-weight: 600; background: var(--page); border: 1px solid var(--border-2); border-radius: 8px; padding: 10px 12px; color: #5aa9ff; overflow-wrap: anywhere; }
.ap-msg { background: var(--page); border: 1px solid var(--border-2); border-radius: 8px; padding: 10px 12px; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.ap-panel .sec-row2 .btn { min-height: 44px; border-radius: 999px; justify-content: center; }
.ap-second, .ap-close { min-height: 44px; align-self: center; color: var(--muted); }
.ap-seg.segment { display: grid; grid-template-columns: 1fr 1fr; width: 100%; border-radius: 10px; }
.ap-seg .seg { min-height: 44px; }
/* 1.13.0 (section deposits, mock page 4): the buyer's SECTION tag in green, the Asked for a section list above the hosts,
   the three buyer fields under the chips (deposit and Paid back from side by side, Pay back when below), and Settings →
   Sections (the reserve message and Who sells sections rows). Phone first: 44 px taps. */
.sec-person .kind.buyer, .ap-k.buyer { background: #10291c; color: #3fb27f; }
.tok.buyer { border-color: #3fb27f; }
.sec-requests { display: flex; flex-direction: column; gap: 6px; }
.sec-requests .lr { cursor: pointer; min-height: 52px; }
.sec-requests .lr:hover { background: var(--hover); }
.sec-requests .nm { flex: 1 1 auto; }
.sec-buyer { display: flex; flex-direction: column; gap: 10px; }
.sec-money { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 10px; align-items: end; }
.sec-fld { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sec-dollar { display: flex; align-items: center; gap: 6px; border: 1px solid var(--border-2); border-radius: 8px; background: var(--page); padding-left: 12px; font-weight: 700; }
.sec-dollar .input { border: 0; background: transparent; min-width: 0; flex: 1 1 auto; font-weight: 700; }
.sec-seg2.segment { grid-template-columns: 1fr 1fr; }
/* 1.13.2 (Khalil 11-15, decision 2026-11-15-reservision-section-buyers-many-and-dropped-buyers-marked): several buyers, one
   block of fields each; a buyer taken off stays as a greyed chip with its word and a 44 px Undo, and greyed in the sheet. */
.sec-buyer-one { display: flex; flex-direction: column; gap: 10px; }
.sec-buyer-one + .sec-buyer-one { border-top: 1px solid var(--border-2); padding-top: 10px; }
.tok.dropped { border-color: var(--border-2); border-style: dashed; opacity: 0.6; }
.tok.dropped .tok-name { text-decoration: line-through; }
.tok .undo { min-width: 44px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--staff); font-size: 13px; font-weight: 700; cursor: pointer; }
.tok .undo:focus-visible { outline: 2px solid var(--staff); outline-offset: -4px; }
.sec-person.dropped { opacity: 0.55; }
.sec-person.dropped .kind.buyer { background: var(--hover); color: var(--muted); }
.sellers { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.sellers-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; gap: 8px; align-items: center; }
.sellers-row .prefix { min-width: 0; }
.sellers-x { min-width: 44px; min-height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--text); font-size: 15px; cursor: pointer; }
.sellers-add { min-height: 44px; }
.sellers-none { margin: 0; font-size: 12px; }
.setting.sellers-setting { grid-template-columns: minmax(0, 1fr); }
.sellers-ctl { justify-content: flex-start; }
@media (max-width: 640px) {
  .sec-money { grid-template-columns: minmax(0, 1fr); }
  .sellers-row { grid-template-columns: minmax(0, 1fr) 44px; }
  .sellers-row .prefix { grid-column: 1; }
  .sellers-row .sellers-x { grid-column: 2; grid-row: 1 / span 2; }
}
