/* My Crusader — Member Stage. Design language lifted from the public hub:
   near-black ground, gold accents, Georgia serif headings. */
:root{
  --bg:#0b0b0d; --panel:#141417; --line:#26262b;
  --gold:#c9a227; --ink:#ece9e2; --dim:#a7a49b; --ok:#7fc97f;
  --bad:#e07a5f;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;background:var(--bg);color:var(--ink);
  font-family:-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  /* Last-resort guard only: every element below is fixed to fit on its
     own — this just keeps a stray wide node from ever pushing the page
     sideways. clip (not hidden) leaves position:sticky working. */
  overflow-x:clip}
h1,h2,h3,.serif{font-family:Georgia,'Times New Roman',serif}
a{color:var(--gold)}
header.bar{position:sticky;top:0;z-index:10;background:var(--bg);
  border-bottom:1px solid var(--line);padding:.7rem 1rem;
  display:flex;align-items:center;gap:.8rem;flex-wrap:wrap}
header.bar .brand{font-family:Georgia,serif;font-size:1.15rem;color:var(--gold);
  text-decoration:none;letter-spacing:.02em}
header.bar nav{margin-left:auto;display:flex;gap:.35rem 1rem;font-size:.92rem;
  flex-wrap:wrap;justify-content:flex-end}
header.bar nav a{color:var(--ink);text-decoration:none}
header.bar nav a:hover{color:var(--gold)}
.wrap{max-width:1060px;margin:0 auto;padding:1.2rem 1rem 3rem}
.card{background:var(--panel);border:1px solid var(--line);border-radius:10px;
  padding:1rem 1.1rem;margin-bottom:1rem}
.card h2{margin:.1rem 0 .6rem;color:var(--gold);font-size:1.25rem}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:1rem}
.stat{font-size:2rem;color:var(--gold);font-family:Georgia,serif}
.muted{color:var(--dim);font-size:.92rem}
label{display:block;font-size:.85rem;color:var(--dim);margin:.6rem 0 .25rem}
input,select,textarea{width:100%;background:#0e0e10;color:var(--ink);
  border:1px solid var(--line);border-radius:6px;padding:.55rem .6rem;font:inherit}
textarea{min-height:90px}
button,.btn{display:inline-block;
  /* ITEM 7 (Nov 16, 2026): the flat gold base is retired under Wayne's
     button law (Nov 13, 2026). Every unclassed button now inherits the
     on-law treatment — dark glass fill, iridescent rim, light text at
     full contrast, moderate 14px radius. The .ghost / .danger quiet
     variants below are unchanged; button.pill further down is Wayne's
     Nov 8, 2026 identity-chip ruling and stays untouched by design. */
  background:linear-gradient(160deg, rgba(190,255,245,.16), rgba(9,49,61,.72));
  color:var(--ink);border:1px solid rgba(220,255,250,.38);
  border-radius:14px;padding:.55rem 1rem;font-weight:600;cursor:pointer;
  text-decoration:none;font-size:.95rem;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.35), 0 4px 12px rgba(0,24,26,.30)}
button.ghost,.btn.ghost{background:transparent;color:var(--gold);
  border:1px solid var(--gold)}
button.danger{background:transparent;color:var(--bad);border:1px solid var(--bad)}
button:disabled{opacity:.5;cursor:default}
table{width:100%;border-collapse:collapse;font-size:.93rem}
th,td{border-bottom:1px solid var(--line);padding:.45rem .4rem;text-align:left;
  vertical-align:top}
/* Long unbroken cell content (emails, filenames, hashes) wraps inside
   its cell instead of stretching the table past the screen. */
td{overflow-wrap:anywhere}
th{color:var(--gold);font-family:Georgia,serif;font-weight:600}
.pill{display:inline-block;border:1px solid var(--gold);color:var(--gold);
  border-radius:999px;padding:.05rem .55rem;font-size:.78rem;text-transform:capitalize}
/* Identity chips as BUTTONS (Wayne, Nov 8, 2026, ~1:26 PM): the bare
   <button> base paints a full gold fill that washed the name out —
   "way too bright, I can't even see the lettering." The chips keep the
   ORIGINAL pill look (transparent dark ground, gold lettering) with
   ONLY the outline brighter than the original: the border runs
   #e3bc3f (a step above the original --gold #c9a227) at 2px. The
   active chip carries a faint gold tint so the selected state reads
   without ever going full gold; its name stays gold and legible. */
button.pill{background:transparent;color:var(--gold);border:2px solid #e3bc3f;
  border-radius:999px;padding:.05rem .55rem;font-size:.78rem;font-weight:600;
  text-transform:capitalize}
button.pill.ok{background:rgba(201,162,39,.16);color:var(--gold);
  border-color:#e3bc3f}
/* Dictation listening state (Nov 8, 2026): while the mic is live the
   Dictate button carries this style on top of its changed label, so
   a hot mic is never ambiguous. */
button.dictating{border-color:#e3bc3f;color:#e3bc3f;
  box-shadow:0 0 0 2px rgba(227,188,63,.45)}
.pill.ok{border-color:var(--ok);color:var(--ok)}
.pill.bad{border-color:var(--bad);color:var(--bad)}
/* Sub-tab rows: every tab on one line, inside the screen — equal-width
   flex cells that shrink to fit, never a row you scroll sideways. A
   long label wraps inside its own cell instead. */
.tabs{display:flex;gap:.4rem;flex-wrap:nowrap;margin-bottom:1rem}
.tabs button{flex:1 1 0;min-width:0;padding:.5rem .15rem;font-size:.82rem;
  line-height:1.2;text-align:center;background:transparent;color:var(--dim);
  border:1px solid var(--line)}
.tabs button.on{color:var(--ink);background:linear-gradient(160deg,rgba(190,255,245,.30),rgba(38,140,163,.34) 55%,rgba(9,49,61,.55));border-color:rgba(220,255,250,.75);box-shadow:0 0 12px rgba(95,242,223,.30)}
/* The Vault desk index (Nov 8, 2026 — Wayne's redesign): twelve desks
   outgrew the one-row .tabs pattern, so the Vault's bar is a grouped
   grid of tiles instead — group headings, icon above label, the full
   label always readable. The grid wraps on its own: 3 columns on a
   phone, more as the screen widens, never a sideways scroll and never
   a crushed row. Vault-only; the short .tabs rows elsewhere are
   untouched. Active tile carries the same lit gold as .tabs button.on. */
.vtabs{margin-bottom:1rem}
.vtab-group{font-family:Georgia,serif;color:var(--gold);font-size:.78rem;
  letter-spacing:.14em;text-transform:uppercase;margin:.9rem 0 .45rem}
.vtabs .vtab-group:first-child{margin-top:0}
.vtab-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:.5rem}
.vtab-grid button{display:flex;flex-direction:column;align-items:center;
  justify-content:center;gap:.3rem;min-height:64px;min-width:0;
  padding:.6rem .3rem;background:transparent;color:var(--dim);
  border:1px solid var(--line);border-radius:10px;font-size:.9rem;
  line-height:1.25;text-align:center;cursor:pointer}
.vtab-grid button .vtab-ico{font-size:1.35rem;line-height:1}
.vtab-grid button .vtab-label{overflow-wrap:anywhere}
.vtab-grid button.on{color:var(--ink);background:linear-gradient(160deg,rgba(190,255,245,.30),rgba(38,140,163,.34) 55%,rgba(9,49,61,.55));border-color:rgba(220,255,250,.75);box-shadow:0 0 12px rgba(95,242,223,.30)}
.vtab-grid button:focus-visible{outline:none;box-shadow:0 0 0 2px rgba(232,200,90,.8),0 0 12px rgba(232,200,90,.30)}
@media (min-width:640px){.vtab-grid{grid-template-columns:repeat(4,1fr)}}
@media (min-width:960px){.vtab-grid{grid-template-columns:repeat(6,1fr)}}
.notice{border:1px solid var(--gold);border-radius:8px;padding:.7rem .9rem;
  background:#191712;margin-bottom:1rem}
.error{color:var(--bad);min-height:1.2em;font-size:.92rem}
.soon{border:1px dashed var(--gold);border-radius:10px;padding:1rem 1.1rem;
  background:#12100a}
.soon .tag{color:var(--gold);font-family:Georgia,serif;letter-spacing:.08em;
  text-transform:uppercase;font-size:.8rem}
.avatar-slot{width:84px;height:84px;border-radius:50%;border:2px solid var(--gold);
  object-fit:cover;background:#0e0e10}
.mono{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:.8rem;
  word-break:break-all}
pre.letter{white-space:pre-wrap;background:#0e0e10;border:1px solid var(--line);
  border-radius:8px;padding:1rem;font-family:Georgia,serif;line-height:1.5}
.row{display:flex;gap:.6rem;flex-wrap:wrap;align-items:center}
.spacer{flex:1}

/* The badge: nickname, number, chapter, commission date. */
.badge{display:flex;gap:1rem;align-items:center;border:1px solid var(--gold);
  border-radius:10px;padding:.9rem 1.1rem;background:linear-gradient(135deg,#1d1a10,#141417)}
.badge .shield{font-size:2.6rem;line-height:1}
.badge .bno{font-family:Georgia,serif;color:var(--gold);font-size:1.3rem;letter-spacing:.06em}
/* A long nickname/commission line wraps inside the badge, never past it. */
.badge>div{min-width:0;overflow-wrap:anywhere}
.welcome{border:1px solid var(--gold);border-radius:10px;padding:1.1rem 1.2rem;
  background:linear-gradient(135deg,#1d1a10,#141417);margin-bottom:1rem}

/* The Keep: banner, message stream, composer. */
.keep-banner{border:1px solid var(--gold);border-radius:8px;padding:.7rem .9rem;
  background:#191712;margin-bottom:1rem;font-family:Georgia,serif}
.keep-banner .who{color:var(--gold);font-size:.78rem;letter-spacing:.1em;text-transform:uppercase}
.keep-stream{display:flex;flex-direction:column;gap:.55rem;max-height:60vh;
  overflow-y:auto;padding:.4rem .1rem}
.keep-msg{background:#0e0e10;border:1px solid var(--line);border-radius:8px;
  padding:.5rem .7rem;font-size:.95rem}
.keep-msg .meta{color:var(--dim);font-size:.78rem;margin-bottom:.15rem}
.keep-msg .meta b{color:var(--gold)}
.keep-msg.operator{border-color:var(--gold)}

/* Crusader AI: the room chat — thread, messages, monthly allowance meter.
   Values mirror The Keep's stream so the two halls feel like one building. */
.ai-thread{display:flex;flex-direction:column;gap:.55rem;max-height:50vh;
  overflow-y:auto;padding:.4rem .1rem}
.ai-msg{background:#0e0e10;border:1px solid var(--line);border-radius:8px;
  padding:.5rem .7rem;font-size:.95rem}
.ai-msg .meta{color:var(--dim);font-size:.78rem;margin-bottom:.15rem}
.ai-msg .meta b{color:var(--gold)}
.ai-msg.ai{border-color:var(--gold)}
.ai-bar{height:8px;background:#0e0e10;border:1px solid var(--line);
  border-radius:999px;overflow:hidden;margin:.5rem 0 .3rem}
.ai-bar-fill{height:100%;background:var(--gold);width:0%}

/* Commission certificate: a paper sheet inside the dark UI. */
.cert-sheet{background:#f7f2e3;color:#1c1a14;border:3px double var(--gold);
  border-radius:4px;padding:2.6rem 2.2rem;text-align:center;max-width:760px;margin:0 auto}
.cert-sheet .c-brand{letter-spacing:.35em;color:#8a6d14;font-size:.85rem;text-transform:uppercase}
.cert-sheet h1{font-size:2.1rem;margin:.6rem 0 .2rem;color:#1c1a14}
.cert-sheet .c-name{font-family:Georgia,serif;font-size:1.9rem;border-bottom:1px solid #b39b3f;
  display:inline-block;padding:0 1.6rem .3rem;margin:.8rem 0 .4rem;
  max-width:100%;overflow-wrap:break-word}
.cert-sheet .c-line{font-size:1rem;line-height:1.65;margin:.4rem 0}
.cert-sheet .c-sig{font-family:Georgia,serif;font-style:italic;font-size:1.25rem;margin-top:1.6rem}
.cert-sheet .c-seal{font-size:2.4rem;margin:.6rem 0 0}
/* App-feel page transition: the content of each page settles in on load.
   Light by design — pages stay separate documents, this is just the door
   swinging. Off entirely for readers who ask for reduced motion. */
@keyframes pageIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.wrap{animation:pageIn .22s ease-out}
@media (prefers-reduced-motion: reduce){
  .wrap{animation:none}
}

/* Sub-tab views (the Vault's desks, the room's doors): switching views
   replays the page transition — the same 220ms fade + rise as .wrap —
   so a tab change feels like stepping through a door in the same
   building, never a jump cut. The animation restarts on its own each
   time a hidden view is shown again. */
.subview{animation:pageIn .22s ease-out}
@media (prefers-reduced-motion: reduce){
  .subview{animation:none}
}

/* Bottom tab bar: fixed app-style navigation, rendered by tabBar() in
   app.js into each page's <nav class="tabbar" id="tabbar">. */
.tabbar{position:fixed;left:0;right:0;bottom:0;z-index:20;display:flex;
  background:#0e0e10;border-top:1px solid var(--line);
  /* Facebook's courtesy: the bar slides away on a downward scroll and
     returns on the first upward one (wired in app.js). The slide runs
     in the app's ease language; reduced-motion readers never get it —
     app.js doesn't wire the hiding for them at all. */
  transition:transform .25s ease-out}
.tabbar.bar-hidden{transform:translateY(100%)}
@media (prefers-reduced-motion: reduce){
  .tabbar{transition:none}
}
.tabbar a{flex:1 1 0;min-width:0;text-align:center;color:var(--dim);text-decoration:none;
  padding:.45rem 0 .6rem;font-size:.76rem;letter-spacing:.02em;
  white-space:nowrap;overflow:hidden}
.tabbar a .tic{display:block;font-size:1.25rem;line-height:1.25}
.tabbar a.on{color:var(--gold)}
/* The bar floats over the page's foot: give tabbed pages room to end. */
body.has-tabbar .wrap{padding-bottom:6.5rem}

/* Home doors: big tappable cards, one per destination. */
a.door{display:block;text-decoration:none;color:var(--ink)}
a.door:hover{border-color:var(--gold)}
a.door h3{font-family:Georgia,serif;color:var(--gold);margin:.1rem 0 .35rem;
  font-size:1.3rem}
a.door p{margin:0}
a.door .tic{font-size:1.5rem;line-height:1}

/* Petrie's herald pop stood here until Nov 10, 2026 — deleted
   whole on Wayne's order (see app.js, the badge feed). No floating
   card interrupts any screen now; the badge styles below are the
   notification surfaces that remain. */
.tab-badge{display:inline-block;background:var(--bad);color:#fff;border-radius:999px;
  font-size:.68rem;line-height:1.35;padding:.02rem .38rem;margin-left:.25rem;vertical-align:top}

/* Facebook template (Wayne's ruling, Nov 6, 2026): the top bar is
   the wordmark left, then round icon buttons right — Search, the
   bell, the avatar circle — in Facebook's order and shape, wearing
   this app's own dark + gold. The bell's badge sits on its corner,
   fed by the same live unread count as the Alerts tab. */
header.bar .topbtns{margin-left:auto;display:flex;gap:.5rem;align-items:center}
header.bar .topbtn{position:relative;width:2.3rem;height:2.3rem;border-radius:50%;
  background:var(--panel);border:1px solid var(--line);display:flex;align-items:center;
  justify-content:center;font-size:1.15rem;line-height:1;text-decoration:none;color:var(--ink)}
header.bar .topbtn:hover{border-color:var(--gold)}
header.bar .topbtn .tab-badge{position:absolute;top:-.3rem;right:-.5rem;margin-left:0}
header.bar .topavatar{overflow:hidden;padding:0}
header.bar .topavatar img{width:100%;height:100%;object-fit:cover;display:block}

/* The Menu (menu.html): every door in the app as one clean vertical
   list — icon, label, one plain line — grouped Work / Office /
   Account. Rows are cards you tap, not buttons in a row. */
.menu-sec{font-family:Georgia,serif;color:var(--gold);margin:1.4rem 0 .6rem;font-size:1.15rem}
a.mrow{display:flex;align-items:center;gap:.75rem;background:var(--panel);border:1px solid var(--line);
  border-radius:10px;padding:.7rem .85rem;margin-bottom:.5rem;text-decoration:none;color:var(--ink)}
a.mrow:hover{border-color:var(--gold)}
a.mrow .tic{font-size:1.35rem;line-height:1;flex:0 0 auto}
a.mrow .what{flex:1 1 auto;min-width:0}
a.mrow .what .lbl{display:block;font-size:1rem}
a.mrow .what .sub{display:block;color:var(--dim);font-size:.82rem;margin-top:.1rem}
a.mrow .go{color:var(--dim);flex:0 0 auto;font-size:1.1rem}
/* ---------- Sentinel chat: the full-view conversation (Wayne,
   Nov 8, 2026, ~8:37 PM) ----------
   "When I click Sentinel, I want to be taken into a chat that looks
   almost identical to Muse... all the work's done in [Sentinel's
   chat]. But not Muse. I want it to look like this chat though so
   I'm comfortable with it." The center page's chat becomes a
   full-viewport conversation: one flowing thread (his words in a
   bubble on the right, Sentinel's as open text on the left), a
   floating composer fixed at the bottom with a growing rounded
   input, round icon controls (attach, dictate) and a round gold
   send button, and a visible working state while Sentinel answers.
   Same dark + gold language as the rest of the app — the shape is
   the Muse chat's, the building is this one. Center-only: every
   rule below is scoped under body.center-chat so no other page's
   chrome moves. The page's bottom tab bar (the app's full bottom
   row — Command, War Room, Records, Alerts, Menu) stays exactly as
   tabBar() renders it, BELOW the composer; the composer lifts to
   sit above it. The room's other sections (status, oversight,
   uploads, matters, drafts, teaching, worker board) stay below the
   chat, reached by scrolling past it — nothing was removed. */
body.center-chat .wrap{padding-top:.6rem}
/* The composer's lift (Nov 11, 2026 — the composer replica build):
   on phone widths the composer floats ABOVE the decorated dock —
   the geometry of Wayne's Muse app screenshots (dock below, the
   pill floating over it with a clear gap) — instead of sitting in
   the dock's band at 3.4rem, where the dock's own buttons covered
   the mic, the send arrow and the stop square (the voice-bar test's
   0/25 hit-test grids: a finger could not reach the voice controls
   inside the open chat). The lift is computed from the design
   system's own dock tokens, so it tracks the dock at any phone
   width; wider layouts keep the historic 3.4rem seat. */
body.center-chat{--composer-lift:3.4rem}
@media (max-width:700px){
  body.center-chat{--composer-lift:calc(var(--dock-height,94px) + var(--dock-bottom,22px) + .7rem)}
}
/* Dedicated chat view (Wayne, Nov 8, 2026, ~8:54 PM): "When I go into
   the chat with him, there shouldn't be any of the pre-existing stuff
   flying around when I'm scrolling up or down. The only thing that
   should be in there is me and his chat. Nothing else." The chat is a
   fixed, full-viewport layer of its own: heading, thread, composer —
   plus the app's bottom row, which stays put. The room (every other
   section of this page) lives behind it and is neither in the chat's
   scroll flow nor visible through it; leaving the chat (the Room
   button in the chat head) returns to the room exactly as it was.
   In room view the stage and composer are not rendered at all. */
.chat-stage{display:none}
body.chat-open{overflow:hidden}
body.chat-open header.bar{display:none}
body.chat-open .tabbar{transform:none !important}
body.chat-open .wrap > :not(.chat-stage):not(.chat-composer){visibility:hidden}
body.chat-open .chat-stage{display:flex;flex-direction:column;
  position:fixed;inset:0;z-index:14;box-sizing:border-box;
  background:#000;padding:calc(.55rem + env(safe-area-inset-top))
  calc(.8rem + env(safe-area-inset-right))
  calc(var(--composer-lift,3.4rem) + var(--composer-h,5rem) + .35rem)
  calc(.8rem + env(safe-area-inset-left))}
body.chat-open #seededBrief,body.chat-open #workerNote{display:none !important}
body:not(.chat-open) .chat-composer{display:none}
.chat-enter{display:block;width:100%;margin:.4rem 0 .8rem;padding:.8rem 1rem;
  background:#17171a;border:1px solid #e3bc3f;border-radius:14px;
  color:var(--gold);font-size:1rem;cursor:pointer;text-align:left}
body.chat-open .chat-enter{display:none}
/* The chat head's three controls are ONE uniform round family
   (Wayne, Nov 11, 2026 — reshape order with his phone screenshot):
   2.75rem circles — a check for Approvals (badge on its corner),
   the shield for Leadership, a back arrow for Room. The old text
   pills made the head row overflow a phone screen and pushed the
   Room pill off the right edge. */
.chat-exit{margin-left:0;flex:0 0 auto;width:2.75rem;height:2.75rem;
  border-radius:50%;padding:0;display:inline-flex;align-items:center;
  justify-content:center;background:transparent;position:relative;
  border:1px solid var(--line);color:var(--dim);
  font-size:1.05rem;cursor:pointer}
.chat-exit:hover{color:var(--gold);border-color:#e3bc3f}
.chat-head{display:flex;align-items:center;gap:.55rem;padding:.15rem .1rem .55rem}
.chat-head .chat-id{flex:1 1 auto;min-width:0}
.chat-head .ctl-glyph{font-size:1.12rem;line-height:1}
.chat-head #approvalsBtn .ctl-glyph{color:var(--gold)}
.chat-head #approvalsBtn .tab-badge{position:absolute;top:-.32rem;
  right:-.5rem;margin-left:0}
.chat-head .chat-ava{width:34px;height:34px;border-radius:50%;flex:0 0 auto;
  border:1px solid var(--gold);background:#0e0e10;color:var(--gold);
  display:flex;align-items:center;justify-content:center;font-size:1.05rem}
.chat-head .chat-title{font-family:Georgia,serif;color:var(--gold);
  font-size:1.3rem;line-height:1.15;white-space:nowrap;overflow:hidden;
  text-overflow:ellipsis}
.chat-head .chat-sub{color:var(--dim);font-size:.8rem;white-space:nowrap;
  overflow:hidden;text-overflow:ellipsis}
.chat-scroll{flex:1 1 auto;overflow-y:auto;padding:.4rem .1rem .8rem;
  display:flex;flex-direction:column;gap:1.05rem;scroll-behavior:auto;
  overscroll-behavior:contain;-webkit-tap-highlight-color:transparent;
  overflow-anchor:auto}
/* Layout containment on message nodes (smoothness audit, Nov 9,
   2026): each message lays out and paints independently, so a long
   thread never reflows the whole column when one row lands —
   content-visibility keeps off-screen rows unrendered until they
   approach, the built-in windowing every smooth messenger relies
   on, with an intrinsic-size placeholder so the scrollbar and the
   scroll anchoring stay honest. */
.chat-scroll .msg{contain:layout style;content-visibility:auto;
  contain-intrinsic-size:auto 90px}
.chat-empty{color:var(--dim);text-align:center;margin:auto 0;padding:2rem 1rem}
/* Visual parity with Wayne's Muse chat (Nov 9, 2026 — his
   screenshot: "This is how it should look"): centered small gray
   timestamps between exchanges; HIS messages right-aligned WHITE
   bubbles with dark text; the AI's replies large dark rounded CARD
   bubbles, light text, roomy padding, near-full width. */
.chat-time{align-self:center;color:#8a8a8a;font-size:.75rem;
  margin:.15rem 0 .55rem;letter-spacing:.02em}
.msg{display:flex;flex-direction:column;max-width:100%}
.msg .who{font-size:.72rem;letter-spacing:.08em;text-transform:uppercase;
  color:var(--dim);margin-bottom:.3rem}
.msg.me{align-items:flex-end}
.msg.me .bubble{background:#ffffff;color:#111111;border:none;
  border-radius:22px;padding:.65rem 1rem;max-width:min(85%,560px);
  white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.5}
.msg.ai{align-items:stretch}
.msg.ai .card{background:#1c1c1e;border-radius:28px;
  padding:1.15rem 1.25rem;max-width:min(97%,680px);align-self:flex-start;
  box-shadow:0 4px 18px rgba(0,0,0,.35)}
.msg.ai .body{color:var(--ink);white-space:pre-wrap;
  overflow-wrap:anywhere;line-height:1.6}
.msg.ai .who{color:var(--gold)}
.msg.working{flex-direction:row;align-items:center;gap:.5rem;
  align-self:flex-start;background:#1c1c1e;border-radius:999px;
  padding:.55rem .9rem}
.msg.working .who{margin:0}
.msg.working .dots{display:inline-flex;gap:.3rem}
.msg.working .dots i{width:7px;height:7px;border-radius:50%;
  background:var(--gold);opacity:.25;animation:chatPulse 1.2s infinite}
.msg.working .dots i:nth-child(2){animation-delay:.18s}
.msg.working .dots i:nth-child(3){animation-delay:.36s}
@keyframes chatPulse{0%,100%{opacity:.25}50%{opacity:1}}
@media (prefers-reduced-motion: reduce){
  .msg.working .dots i{animation:none;opacity:.7}
  .chat-scroll{scroll-behavior:auto}
}
.chat-composer{position:fixed;left:0;right:0;bottom:var(--composer-lift,3.4rem);z-index:15;
  padding:.5rem .8rem calc(.55rem + env(safe-area-inset-bottom));
  background:linear-gradient(to top,#000 72%,rgba(0,0,0,0))}
/* The composer as the reference's dark PILL: "+" attach at the left
   INSIDE the pill, the growing field, the mic inside at the right,
   and a round WHITE send button at the pill's right end. While a
   dictation recording runs (form.recording) the send button reads
   as the stop square, like the reference's busy state. */
.chat-composer .box{max-width:820px;margin:0 auto;display:flex;
  align-items:flex-end;gap:.3rem;background:#27282d;
  border:1px solid rgba(255,255,255,.08);border-radius:999px;padding:.35rem .4rem;
  box-shadow:0 10px 30px rgba(0,0,0,.55)}
.chat-composer textarea{flex:1 1 auto;min-height:0;height:auto;
  max-height:38dvh;overflow-y:auto;background:transparent;border:0;
  border-radius:0;padding:.5rem .2rem;resize:none;font-size:1rem;
  line-height:1.4;color:var(--ink)}
.chat-composer textarea:focus{outline:none}
.chat-composer .box:focus-within{border-color:#e3bc3f}
.cbtn{flex:0 0 auto;width:40px;height:40px;border-radius:50%;padding:0;
  display:flex;align-items:center;justify-content:center;font-size:1.12rem;
  line-height:1;background:transparent;color:var(--dim);
  border:1px solid transparent;cursor:pointer}
#chatAttach{font-size:1.5rem;font-weight:300}
.cbtn:hover{color:var(--gold);border-color:var(--line)}
.cbtn.send{background:#ffffff;color:#111111;font-weight:700;
  border-color:transparent}
.cbtn.send:disabled{opacity:.45;cursor:default}
/* The white round button is STATE-DRIVEN (Wayne's second
   screenshot, Nov 9, 2026 — the composer at rest): with the box
   EMPTY and nothing recording, NO send button shows — the mic is
   the resting right-side control. The button appears the moment
   there is text to send (form.has-text, maintained by
   chatSyncSend in center.html from the same input event the
   growing composer already rides) or while dictation records —
   then it reads as the stop square. */
.chat-composer:not(.has-text):not(.recording) .cbtn.send{display:none}
.chat-composer.recording .cbtn.send{font-size:0}
.chat-composer.recording .cbtn.send::after{content:"■";font-size:1rem;
  color:#111111;line-height:1}
.cbtn.dictating{color:#e3bc3f;border-color:#e3bc3f;
  box-shadow:0 0 0 2px rgba(227,188,63,.45)}
/* Bottom icon row in the chat view: the app's five destinations
   (Command / War Room / Records / Alerts / Menu) rendered as simple
   monochrome glyphs like the reference row — labels dim, the active
   destination white. tabBar() markup is shared by every page and is
   NOT changed; this styling applies only while the chat is open. */
body.chat-open .tabbar .tic{filter:grayscale(1)}
body.chat-open .tabbar a{color:var(--dim)}
body.chat-open .tabbar a.on{color:#ffffff}
.chat-meta{max-width:820px;margin:.35rem auto 0}
.chat-meta .error{min-height:0;margin:0}
.chat-meta .muted{margin:.15rem 0 0}
.chat-attach-name{color:var(--gold);font-size:.85rem}
/* The voice bar (Nov 11, 2026): while a voice take runs, the bar
   REPLACES the composer pill in the same footprint — same width,
   same pill, same shadow — so nothing on screen jumps. Trash at
   the left, the timer, the live waveform (or the working dots,
   or the held readout), the stop square, and at the right the
   MIC BUTTON ITSELF wearing the send-arrow face (v37: the
   component adds .vb-send to the mic element and the page moves
   that one element into the bar — there is no separate send
   button, exactly the Muse chat's one transforming button). */
.chat-composer.voice-on .box{display:none}
.chat-composer .voice-bar{max-width:820px;margin:0 auto;display:flex;
  align-items:center;gap:.4rem;background:#27282d;
  border:1px solid rgba(255,255,255,.08);border-radius:999px;padding:.35rem .4rem;
  box-shadow:0 10px 30px rgba(0,0,0,.55)}
.chat-composer .voice-bar[hidden]{display:none}
.vb-time{flex:0 0 auto;min-width:2.7rem;text-align:center;
  font-variant-numeric:tabular-nums;color:var(--ink);font-size:.98rem}
.vb-mid{flex:1 1 auto;display:flex;align-items:center;
  justify-content:center;min-height:40px;min-width:0}
#vbWave{width:100%;height:36px;display:block}
.vb-dots{display:inline-flex;gap:.3rem;align-items:center}
.vb-dots i{width:7px;height:7px;border-radius:50%;background:#d9d9de;
  animation:thinkWave 1.05s ease-in-out infinite}
.vb-dots i:nth-child(2){animation-delay:.16s}
.vb-dots i:nth-child(3){animation-delay:.32s}
.vb-read{color:var(--dim);font-size:.92rem;line-height:1.35;
  overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;
  -webkit-box-orient:vertical}
.cbtn.vb-send{background:#ffffff;color:#111111;font-weight:700;
  border-color:transparent;font-size:1.15rem}
.cbtn.vb-send:disabled,.cbtn.vb-stop:disabled{opacity:.45;cursor:default}
/* The replica's faces (Nov 11, 2026 — Wayne's Muse app
   screenshots as the spec): drawn glyphs, not emoji. The mic and
   the trash are light outline icons; the stop is a WHITE square
   inside its own dark circle; the send stays the white circle
   with the black arrow (.vb-send / .cbtn.send above). */
.chat-composer .cbtn svg{width:22px;height:22px;display:block}
.chat-composer #micBtn{color:#e8e8ec}
.chat-composer .vb-discard{color:#e8e8ec}
.chat-composer .vb-stop{background:#3d3d41;color:#ffffff;
  border-color:transparent}
.chat-composer .vb-stop svg{width:17px;height:17px}
.chat-composer .vb-stop:hover{background:#4a4a4f;color:#ffffff}
.chat-composer textarea::placeholder{color:#8e8e96}
.vb-time{color:#a7a7ae}
/* The thinking pill (Wayne, Nov 11, 2026, with his screenshot of
   the Muse app): while Sentinel is thinking, three light dots
   sit in their OWN small dark pill at the bottom-LEFT of the
   chat, floating just above the composer pill — not a row in the
   thread. The dots undulate in sequence, a wave traveling through
   them (his words: "like a worm path") — each dot rises and
   settles in turn, never a plain blink. The pill is a child of
   the composer form, so it rides the composer's lift and width
   exactly, and chatHideWorking removes it the moment the reply
   lands. */
.think-pill{position:absolute;left:.8rem;bottom:calc(100% + .15rem);
  display:flex;align-items:center;gap:5px;background:#26262b;
  border:1px solid rgba(255,255,255,.06);border-radius:999px;
  padding:.6rem .85rem;box-shadow:0 6px 18px rgba(0,0,0,.45);z-index:16}
.think-pill i{width:7px;height:7px;border-radius:50%;background:#c9c9cf;
  animation:thinkWave 1.05s ease-in-out infinite}
.think-pill i:nth-child(2){animation-delay:.16s}
.think-pill i:nth-child(3){animation-delay:.32s}
@keyframes thinkWave{0%,55%,100%{transform:translateY(0)}
  27%{transform:translateY(-4.5px)}}
@media (prefers-reduced-motion: reduce){
  .vb-dots i{animation:none;opacity:.7}
  .think-pill i{animation:none}
}

@media print{
  body{background:#fff}
  header.bar,.tabbar,.noprint{display:none !important}
  .wrap{max-width:none;padding:0}
  .cert-sheet{border-width:2px;max-width:none;margin:0}
}

/* WS7 accessibility (closure round 2, Nov 7, 2026): visible keyboard focus.
   This stylesheet previously carried no :focus rules at all; the hub's gold
   treatment is the house standard — same colour, same offset.
   PRESS FEEL (Wayne's order, Nov 9, 2026): the rectangular outline is
   GONE app-wide — focus reads as a soft glow that follows the control's
   own rounded shape, and touch feedback is the press itself (see the
   PRESS FEEL block at the foot of this file). */
:focus-visible{outline:none;box-shadow:0 0 0 2px rgba(232,200,90,.8),0 0 12px rgba(232,200,90,.30)}

/* CAMERA (Phase B, Nov 9, 2026): the evidence-recording sheet driven
   by assets/camera.js. Bottom-anchored on phones, centered on wider
   screens; the panel RISES on entry (Wayne's opening experience — the
   choices come up out of the camera button's tap) and the rise is
   removed whole under prefers-reduced-motion, where the panel simply
   appears. z-index 40 sits above the tab bar (20):
   while the sheet is up, it is the only thing being decided. */
.cam-wrap{position:fixed;inset:0;z-index:40;background:rgba(0,0,0,.55);
  display:flex;align-items:flex-end;justify-content:center}
.cam-wrap[hidden]{display:none}
/* While the Record evidence sheet is open, the page's own back
   pill steps aside (v40 law: one way back per surface — inside
   the sheet, the sheet's Back/Close are the ways). visibility,
   never display: the pill's box stays put, so nothing shifts
   when the sheet closes and the pill returns. */
body.mcam-open #mcBack{visibility:hidden}
.cam-sheet{background:var(--panel);border:1px solid var(--line);
  border-radius:14px 14px 0 0;width:100%;max-width:560px;max-height:92vh;
  overflow:auto;padding:1rem}
@media(min-width:640px){
  .cam-wrap{align-items:center;padding:1rem}
  .cam-sheet{border-radius:14px}
}
@keyframes cam-rise{from{transform:translateY(16px) scale(.98);opacity:.35}
  to{transform:none;opacity:1}}
.cam-pop{animation:cam-rise .18s ease-out}
.cam-open{width:100%;font-size:1.05rem;padding:.7rem 1rem}
.row .cam-open{width:auto}
.cam-warn{border:2px solid var(--gold);border-radius:10px;padding:.8rem;
  margin:.6rem 0;white-space:pre-wrap;font-weight:600;line-height:1.5}
.cam-agreement{white-space:pre-wrap;max-height:38vh;overflow:auto;
  border:1px solid var(--line);border-radius:10px;padding:.8rem;
  margin:.6rem 0;font-size:.92rem;line-height:1.55}
.cam-choice{display:block;width:100%;text-align:left;margin:.45rem 0;
  padding:.75rem .9rem}
.cam-video{width:100%;border-radius:10px;background:#000;margin:.4rem 0}
@keyframes cam-blink{50%{opacity:.2}}
.cam-rec-dot{display:inline-block;width:.65rem;height:.65rem;border-radius:50%;
  background:#e5484d;animation:cam-blink 1.2s ease-in-out infinite}
.cam-prog{height:.6rem;background:#222227;border-radius:99px;overflow:hidden;
  margin:.6rem 0}
.cam-prog>i{display:block;height:100%;background:var(--gold);width:0;
  transition:width .2s ease}
@media (prefers-reduced-motion: reduce){
  .cam-pop{animation:none}
  .cam-rec-dot{animation:none}
  .cam-prog>i{transition:none}
}

/* ---------- View-as switcher (Nov 9, 2026 — Wayne's order) ----------
   The operator's 👁 button floats above the tab bar on the left. The
   lens bar pins directly above the tab bar — the same 3.4rem offset
   the chat composer uses — in the app's dark + gold language, with
   the Sentinel chips' bright-gold 2px outline on its controls. */
.viewas-fab{position:fixed;left:.8rem;bottom:4.6rem;z-index:30;
  background:#0e0e10;color:var(--gold);border:2px solid #e3bc3f;
  border-radius:14px;padding:.5rem .95rem;font-size:.92rem;
  box-shadow:0 4px 18px rgba(0,0,0,.5);cursor:pointer}
.viewas-wrap{position:fixed;inset:0;z-index:35;background:rgba(0,0,0,.55);
  display:flex;align-items:flex-end;justify-content:center}
.viewas-sheet{background:#141416;border-top:2px solid #e3bc3f;
  border-radius:14px 14px 0 0;width:min(30rem,100%);padding:1rem .9rem 1.2rem;
  display:flex;flex-direction:column;gap:.55rem}
/* v47: the chooser sheet is a native <dialog> (showModal) — it
   keeps the bottom-sheet anchoring the wrap used to give it, and
   the UA backdrop takes the old wrap's dim. */
dialog.viewas-sheet{border:none;position:fixed;top:auto;bottom:0;left:0;right:0;
  margin:0 auto;max-height:88vh;overflow:auto}
dialog.viewas-sheet::backdrop{background:rgba(0,0,0,.55)}
.viewas-sheet-title{color:var(--gold);font-weight:600;margin-bottom:.2rem}
.viewas-opt{display:flex;align-items:center;gap:.7rem;text-align:left;
  background:#0e0e10;color:inherit;border:1px solid var(--line);
  border-radius:10px;padding:.6rem .7rem;cursor:pointer;width:100%}
.viewas-opt-icon{font-size:1.3rem}
.viewas-opt-text{display:flex;flex-direction:column;flex:1}
.viewas-opt-text small{color:var(--dim)}
.viewas-opt-here{color:var(--gold);font-size:.78rem;white-space:nowrap}
.viewas-cancel{background:transparent;color:var(--dim);border:1px solid var(--line);
  border-radius:10px;padding:.55rem;cursor:pointer}
.viewas-bar{position:fixed;left:0;right:0;bottom:3.4rem;z-index:25;
  display:flex;align-items:center;gap:.6rem;background:#14100a;
  border-top:2px solid #e3bc3f;border-bottom:1px solid var(--line);
  padding:.45rem .7rem}
.viewas-bar-switch{background:transparent;color:var(--gold);
  border:2px solid #e3bc3f;border-radius:14px;padding:.3rem .8rem;
  font-size:.9rem;cursor:pointer;white-space:nowrap}
.viewas-bar-note{color:var(--dim);font-size:.8rem;flex:1;text-align:center}
/* ITEM 7 (Nov 16, 2026): flat gold fill retired — dark glass + light text. */
.viewas-bar-back{background:linear-gradient(160deg, rgba(190,255,245,.16), rgba(9,49,61,.72));color:var(--ink);border:1px solid rgba(220,255,250,.38);
  border-radius:14px;padding:.4rem .85rem;font-size:.9rem;font-weight:600;
  cursor:pointer;white-space:nowrap}
/* While a lens is on, page content clears the pinned bar, and the
   camera's mount points stand down: recording is a write, previews
   are read-only, and the door says so by its absence (the bar above
   it states the rule). camera.js itself is untouched. */
body.mc-viewas .wrap{padding-bottom:9.5rem}
body.mc-viewas [data-mc-camera]{display:none!important}
/* The visitor page: a full-height column — header, the pinned
   viewing-as bar, the public site in its frame, the tab bar fixed
   over the bottom (the body's .wrap clearance does not apply here;
   the frame takes the remaining height and the tab bar overlays
   nothing but its own strip). */
body.visitor-body{display:flex;flex-direction:column;height:100dvh;margin:0}
.visitor-bar{display:flex;align-items:center;gap:.6rem;background:#14100a;
  border-bottom:2px solid #e3bc3f;padding:.45rem .7rem}
.visitor-bar-label{color:var(--gold);font-size:.9rem;flex:1}
.visitor-back{background:linear-gradient(160deg, rgba(190,255,245,.16), rgba(9,49,61,.72));color:var(--ink);border:1px solid rgba(220,255,250,.38);
  border-radius:14px;padding:.4rem .85rem;font-size:.9rem;font-weight:600;
  cursor:pointer;white-space:nowrap}
.visitor-frame{flex:1;width:100%;border:0;display:block;background:#fff}
/* Staff name marker (Wayne, Nov 9, 2026): in comments and chats,
   administration — operator, Crusaders (generals), secretary — is
   told by NAME COLOR alone: staff names render this one blue at
   every level; everybody else's name keeps its ordinary color.
   No badges, no frames, no labels — the color is the marker.
   #4DA3FF: a true azure (hue ~213°) chosen to stay unmistakably
   "blue" beside the palette's cyan-mint rim (#5FF2DF, hue ~171°)
   and legible on the deep-teal glass and the app's dark ground. */
.mc-staffname{color:#4DA3FF!important}

/* ---------- PRESS FEEL (Wayne's order, Nov 9, 2026) ----------
   The standard is the Muse / ChatGPT apps: when a finger lands,
   NO square outline, NO boxy frame, NO grey tap rectangle — the
   button itself answers, softly, inside its own rounded shape:
   a gentle settle (scale) and a breath of brightness, eased.
   The browser's tap-highlight rectangle is switched off on every
   element, and the dock cells take no focus ring at all (the
   station light + the press are their feedback). Keyboard focus
   keeps a visible signal as a glow that follows the control's own
   border-radius (the :focus-visible rules above), never a detached
   rectangle. */
*{-webkit-tap-highlight-color:transparent}
.tabbar a:focus-visible{outline:none;box-shadow:none}
.tabbar a,.topbtn,button,.btn,.feed-tab,.chipbtn,.plain-button,.vtab-grid button,a.door,.open-file,a.mrow{
  transition:transform .13s ease,filter .13s ease,box-shadow .13s ease}
.tabbar a:active{transform:scale(.93);filter:brightness(1.28)}
.topbtn:active{transform:scale(.9);filter:brightness(1.2)}
button:active:not(:disabled),.btn:active{transform:scale(.965);filter:brightness(.93)}
.chipbtn:active,.plain-button:active{transform:scale(.93)}
.feed-tab:active{transform:scale(.96)}
.vtab-grid button:active{transform:scale(.96)}
a.door:active{transform:scale(.985);filter:brightness(1.07)}
.open-file:active{transform:scale(.965)}
a.mrow:active{transform:scale(.985);filter:brightness(1.2)}
@media (prefers-reduced-motion: reduce){
  .tabbar a,.topbtn,button,.btn,.feed-tab,.chipbtn,.plain-button,.vtab-grid button,a.door,.open-file,a.mrow{transition:none}
  .tabbar a:active,.topbtn:active,button:active:not(:disabled),.btn:active,.chipbtn:active,
  .plain-button:active,.feed-tab:active,.vtab-grid button:active,a.door:active,.open-file:active,a.mrow:active{transform:none}
}

/* OWL SPLASH — REFRESH ON OPEN (v42, Nov 11, 2026 — Wayne's
   order, replacing the Nov 9 tap-to-update bar, whose styles these
   were): every cold open lands on the owl — the app's icon face,
   centered on the app's dark ground — while app.js refreshes the
   shell behind it (floor ~3s, hard ceiling ~7s; warm returns never
   see it). The overlay sits above everything (z-index 200) and is
   removed the moment the refresh settles; it is an <aside> built by
   mcOpenRefresh in app.js, never markup a page can strand. */
.mc-splash{position:fixed;inset:0;z-index:200;display:flex;flex-direction:column;
  align-items:center;justify-content:center;gap:1.1rem;background:#002d34}
.mc-splash-owl{width:9.5rem;height:9.5rem;border-radius:2rem;
  box-shadow:0 10px 40px rgba(0,0,0,.55)}
.mc-splash-word{color:#f3e9cf;font-size:1.35rem;font-weight:700;letter-spacing:.02em}

/* ---------- THE WAY BACK (Wayne's order, Nov 11, 2026) ----------
   Every button pushed on this app has a way back: ONE standard
   back button — the "‹ Back" pill, top-left of the content area —
   mounted by mcBackMount() in app.js on every shell page that
   has no back of its own. v40 DEDUP (Wayne's order, Nov 11,
   2026): the pill stands down wherever a room already had a
   back — the front door (home), the sign-in door (auth), the
   view-as lens (visitor, its own Back to Operator), the two
   doll rooms (files / rights, their own crumb-row Back), the
   profile page (its own "← People" link), the rooms pages
   (their own "← All rooms"), and any page that already prints
   its own "← Back…" link at the top (case, certificate,
   center, vault, welcome — that link stands alone now, its
   text, target and look untouched; vault's is harness-pinned
   verbatim). Exactly one back per screen, the original one
   wherever an original existed. */
.wrap > .mc-backbtn{margin:.35rem 0 .6rem}
.mc-backbtn{display:inline-flex;align-items:center;border-radius:14px;
  border:1px solid #6aa7ac80;background:#0d313c;color:#d3fff3!important;
  padding:10px 15px;min-height:44px;font:inherit;cursor:pointer;
  text-decoration:none;-webkit-tap-highlight-color:transparent}
.mc-backbtn:active{background:#134552}
