/* Spotlight OS — "midnight private bank" theme.
   Dark luxe by default; light theme via [data-theme="light"] on <html>.
   Typography: Playfair Display (display) + Inter (UI), system fallbacks.
   48px+ touch targets, 16px+ body text, high contrast in both themes. */

:root {
  --bg: #0b0d12;
  --card: #141922;
  --card-2: #1a2230;
  --ink: #f4efe3;
  --muted: #b3a78d;
  --faint: #7e7461;
  --line: rgba(212, 169, 78, 0.16);
  --line-strong: rgba(212, 169, 78, 0.38);
  --gold-hi: #f0d998;
  --gold: #d4a94e;
  --gold-deep: #b98a2f;
  --gold-grad: linear-gradient(135deg, #b98a2f 0%, #e9c86f 55%, #f0d998 100%);
  --gold-soft: rgba(212, 169, 78, 0.14);
  --btn-ink: #241a06;
  --green: #6ee7a8;  --green-soft: rgba(110, 231, 168, 0.12);  --green-line: rgba(110, 231, 168, 0.45);
  --red: #fca5a5;    --red-soft: rgba(252, 165, 165, 0.10);    --red-line: rgba(252, 165, 165, 0.45);
  --blue: #8ecdf5;   --blue-soft: rgba(142, 205, 245, 0.12);   --blue-line: rgba(142, 205, 245, 0.45);
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
  --top-hi: inset 0 1px 0 rgba(240, 217, 152, 0.09);
  --input-bg: #10151e;
  --radius: 16px;
}

[data-theme="light"] {
  --bg: #f7f2e6;
  --card: #fffdf6;
  --card-2: #ffffff;
  --ink: #1c2547;
  --muted: #6f6650;
  --faint: #9a917c;
  --line: rgba(150, 110, 40, 0.22);
  --line-strong: rgba(150, 110, 40, 0.45);
  --gold-hi: #8a6420;
  --gold-soft: rgba(185, 138, 47, 0.14);
  --green: #15803d;  --green-soft: #e2f4e8;  --green-line: #9ed7ae;
  --red: #b91c1c;    --red-soft: #fbe3e3;    --red-line: #f0b0b0;
  --blue: #1d4ed8;   --blue-soft: #e1ebfd;   --blue-line: #a9c2f2;
  --shadow: 0 14px 34px rgba(60, 45, 15, 0.14);
  --top-hi: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  --input-bg: #ffffff;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 480px at 50% -160px, rgba(212, 169, 78, 0.10), transparent 60%),
    radial-gradient(800px 500px at 100% 110%, rgba(28, 37, 71, 0.35), transparent 60%);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.5;
  padding-bottom: 88px;
}
[data-theme="light"] body {
  background-image:
    radial-gradient(1100px 480px at 50% -160px, rgba(212, 169, 78, 0.16), transparent 60%),
    radial-gradient(800px 500px at 100% 110%, rgba(150, 110, 40, 0.10), transparent 60%);
}

::selection { background: rgba(212, 169, 78, 0.4); }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; }

.serif, h1, h2, .brand, .brand-big, .hero-num, .stat .num, .ice-head span {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
}

.gold-text {
  background: var(--gold-grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* ---------- Header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 16, 23, 0.96);
  border-bottom: 1px solid var(--line-strong);
  padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between;
}
[data-theme="light"] .topbar { background: rgba(255, 253, 246, 0.96); }
.brand {
  font-weight: 700; font-size: 22px; letter-spacing: 1.5px;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand .dot { color: var(--gold); }
.userchip { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.userchip #username { font-weight: 600; }
.userchip .role {
  background: var(--gold-grad); color: var(--btn-ink);
  font-weight: 800; font-size: 12px; letter-spacing: 1px;
  padding: 4px 12px; border-radius: 999px; text-transform: uppercase;
}
.linkbtn {
  background: none; border: none; color: var(--muted); font-size: 15px;
  min-height: 44px; min-width: 44px; padding: 8px 6px; cursor: pointer;
  text-decoration: underline; font-family: inherit;
}
.themebtn {
  width: 44px; height: 44px; border-radius: 50%;
  background: transparent; border: 1px solid var(--line-strong);
  color: var(--gold-hi); font-size: 20px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ---------- Layout ---------- */
#view { max-width: 640px; margin: 0 auto; padding: 18px 16px 24px; }
h1 { font-size: 30px; font-weight: 700; margin: 8px 0 16px; letter-spacing: .3px; }
h2 { font-size: 22px; font-weight: 700; margin: 24px 0 12px; }
h3 { font-size: 18px; margin: 16px 0 8px; }
p.muted, .muted { color: var(--muted); }

/* ---------- Cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; margin-bottom: 14px;
  box-shadow: var(--shadow), var(--top-hi);
}
.card.tappable { cursor: pointer; }
.card.tappable:active { filter: brightness(1.12); }
.stat-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.stat { text-align: center; padding: 14px 6px; }
.stat .num {
  font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat .lbl { font-size: 13px; color: var(--muted); margin-top: 4px; letter-spacing: .4px; }
.hero-num {
  font-size: 40px; font-weight: 700; font-variant-numeric: tabular-nums;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.kv .v, table.grid td.num { font-variant-numeric: tabular-nums; }

/* ---------- Badges ---------- */
.badge {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .4px;
  padding: 5px 13px; border-radius: 999px; white-space: nowrap;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04); color: var(--muted);
  text-transform: capitalize;
}
.badge.gold { border-color: rgba(240, 217, 152, 0.55); color: var(--gold-hi); background: var(--gold-soft); }
.badge.green { border-color: var(--green-line); color: var(--green); background: var(--green-soft); }
.badge.red { border-color: var(--red-line); color: var(--red); background: var(--red-soft); }
.badge.blue { border-color: var(--blue-line); color: var(--blue); background: var(--blue-soft); }
.badge.dark { border-color: var(--line-strong); background: #05070c; color: var(--ink); }
[data-theme="light"] .badge.dark { background: #1c2547; color: #f4efe3; }

/* ---------- Buttons ---------- */
.btn {
  display: block; width: 100%;
  min-height: 54px; padding: 14px 18px;
  font-size: 18px; font-weight: 700; letter-spacing: .3px;
  border: none; border-radius: var(--radius);
  background: var(--gold-grad); color: var(--btn-ink); cursor: pointer;
  box-shadow: 0 6px 18px rgba(185, 138, 47, 0.35), var(--top-hi);
  font-family: inherit;
}
.btn:active { transform: scale(.99); filter: brightness(.94); }
.btn.secondary {
  background: transparent; color: var(--gold-hi);
  border: 1px solid var(--line-strong); box-shadow: none;
}
.btn.danger { background: linear-gradient(135deg, #991b1b, #dc2626); color: #fff; }
/* Team Accounts: an offboarded member's row sits dimmed at the bottom. */
.arow.offboarded { opacity: .55; }
.btn.green { background: linear-gradient(135deg, #166534, #22c55e); color: #fff; }
.btn.blue { background: linear-gradient(135deg, #1e3a8a, #3b82f6); color: #fff; }
.btn.small { min-height: 48px; font-size: 16px; padding: 10px 16px; width: auto; display: inline-block; }
.btnrow { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.btnrow .btn { flex: 1; min-width: 140px; }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 6px; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%; font-size: 18px; padding: 14px;
  border: 1px solid var(--line-strong); border-radius: 12px;
  background: var(--input-bg); color: var(--ink); font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 169, 78, 0.22);
}
.field textarea { min-height: 120px; resize: vertical; }
.field .hint { font-size: 14px; color: var(--muted); margin-top: 4px; }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.passwrap { position: relative; }
.passwrap input { padding-right: 60px; }
.passeye {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  min-width: 44px; min-height: 44px; padding: 0;
  background: transparent; border: none; border-radius: 10px;
  font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted);
  display: flex; align-items: center; justify-content: center;
}
.passeye:active { background: var(--line); }

/* ---------- Lists ---------- */
.listrow {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 16px;
}
.listrow + .listrow { border-top: 1px solid var(--line); }
.listrow .title { font-weight: 700; font-size: 18px; }
.listrow .sub { font-size: 14px; color: var(--muted); margin-top: 2px; }
.chev { color: var(--gold); font-size: 22px; }

/* ---------- Progress ---------- */
.progress { height: 14px; background: var(--gold-soft); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; margin: 10px 0; }
.progress > div { height: 100%; background: var(--gold-grad); border-radius: 999px; }

/* ---------- Banner / toast ---------- */
.banner {
  background: var(--red-soft); color: var(--red); border: 1px solid var(--red-line);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px;
  font-weight: 600; font-size: 16px;
}
.banner.ok { background: var(--green-soft); color: var(--green); border-color: var(--green-line); }
.empty {
  text-align: center; color: var(--muted); padding: 34px 16px;
  border: 1px dashed var(--line-strong); border-radius: var(--radius); margin-bottom: 12px;
  background: rgba(212, 169, 78, 0.04);
}

/* ---------- Bottom nav ---------- */
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: rgba(13, 16, 23, 0.97); border-top: 1px solid var(--line-strong);
  display: flex; justify-content: space-around;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
[data-theme="light"] .bottomnav { background: rgba(255, 253, 246, 0.97); }
.bottomnav a {
  flex: 1; text-decoration: none; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-height: 60px; justify-content: center; border-radius: 10px;
  font-size: 12px; font-weight: 700; letter-spacing: .3px;
}
.bottomnav a .ico { font-size: 24px; line-height: 1; }
.bottomnav a.active { color: var(--gold-hi); }

/* ---------- Login: the front door ---------- */
/* The logged-out root is the Opportunity landing page (2026-10-20): ONE
   page, per-door variants (universal root · /apply job ad · /referred ·
   /operate). Hero, story cards, doors and forms share this styling; the
   copy lives in LANDING_VARIANTS in app.js. The sign-in form itself keeps
   the .card/.field/.btn styling it always had. */
.landing { max-width: 560px; margin: 0 auto; }
.land-hero { text-align: center; margin-bottom: 22px; }
.land-hero-img {
  width: 100%; height: auto; display: block;
  border-radius: var(--radius); border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}
.land-eyebrow {
  margin-top: 20px; font-size: 12px; font-weight: 800;
  letter-spacing: 2.2px; color: var(--gold);
}
.land-h1 { font-size: 34px; line-height: 1.18; margin: 10px 0 12px; }
.land-sub { color: var(--muted); font-size: 18px; margin: 0 0 20px; }
.land-doors { display: flex; flex-direction: column; gap: 12px; }
.topbar[hidden], .bottomnav[hidden] { display: none !important; }
.land-doorhint { color: var(--muted); font-size: 15.5px; line-height: 1.5; margin: 14px 0 0; }
.land-doorhint strong { color: var(--ink, #f3ead2); }
.userchip .loggedin-label { color: var(--green, #57c98a); font-weight: 700; font-size: 13.5px; letter-spacing: .02em; white-space: nowrap; }
#signinSection { margin-bottom: 22px; }
#signinSection .card { padding: 24px; }
.land-sec { padding: 20px 22px; margin-bottom: 14px; }
.land-sec h2 { margin: 0 0 8px; font-size: 21px; }
.land-sec p { margin: 0; color: var(--muted); }
.land-sec p strong { color: var(--ink); }
.land-proof {
  text-align: center; color: var(--gold-hi); font-weight: 700;
  font-size: 18px; margin: 22px 0;
}
/* Referral-door welcome line (under the sub, above the doors). */
.land-warm {
  color: var(--gold-hi); font-size: 17px; font-weight: 600;
  margin: 0 0 20px; line-height: 1.5;
}
/* Universal-root fork: three quiet text doors under the Sign In door. */
.land-fork {
  display: flex; flex-direction: column; gap: 12px; margin-top: 22px;
}
.land-fork a {
  color: var(--gold-hi); font-weight: 700; font-size: 17px;
  text-decoration: none; min-height: 32px;
}
.land-fork a:hover { text-decoration: underline; }
/* Operator door's way back to the universal root. */
.land-back { text-align: center; margin: 18px 0 4px; }
.land-back a { color: var(--muted); font-size: 15px; text-decoration: none; }
.land-back a:hover { text-decoration: underline; }
.land-foot { text-align: center; color: var(--faint); font-size: 14px; margin: 26px 0 8px; }
/* Simple front page (William, 2026-11-09): the ROOT door shows ONLY
   the board picture and the two doors — sized so the whole first
   view fits a phone screen with no scrolling. The picture is never
   cropped (no object-fit): it scales whole, lockup band included. */
body:has(.landing--simple) { padding-bottom: 0; }
.landing--simple .land-hero { margin-bottom: 0; }
.landing--simple .land-hero-img { max-width: 350px; margin: 0 auto; }
.landing--simple .land-doors { margin-top: 14px; }
/* Speakers note on the simple front page (William, 2026-11-09):
   she starts talking the moment they log in, so they are told to
   turn their speakers up BEFORE the tap. */
.land-speakers { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
/* Pre-watch: no tabs until she has watched (William, 2026-11-09).
   chrome() also gates these in JS and toggles body.prewatch on
   every navigation; this rule is the belt to those suspenders. */
body.prewatch #bottomnav, body.prewatch #trainOrb, body.prewatch #mbTab { display: none !important; }
.consent-row {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 6px 0 16px; font-size: 16px; cursor: pointer;
}
.consent-row input { width: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--gold-deep); }
.apply-err { color: var(--red); min-height: 1.4em; margin-bottom: 10px; font-weight: 600; }
.apply-done {
  background: var(--green-soft); border: 1px solid var(--green-line);
  border-radius: 12px; padding: 18px; font-size: 17px; line-height: 1.55;
}
/* Honeypot: present in the DOM for bots, invisible to people. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
details.setup { margin-top: 18px; font-size: 15px; }
details.setup summary { cursor: pointer; min-height: 44px; color: var(--gold-hi); font-weight: 700; }

/* ---------- Misc ---------- */
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 16px; }
.kv + .kv { border-top: 1px solid var(--line); }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 700; text-align: right; }
table.grid { width: 100%; border-collapse: collapse; font-size: 15px; }
table.grid th, table.grid td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
table.grid th { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .6px; }
.right { text-align: right; }
.mt { margin-top: 14px; }
.center { text-align: center; }
.spinner { text-align: center; padding: 40px; color: var(--muted); font-size: 18px; }
.slot { border-left: 6px solid var(--line-strong); }
.slot.paid { border-left-color: var(--green); }
.slot.pitched { border-left-color: var(--gold); }
.opportunity { border-left: 6px solid var(--gold); }

/* ---------- Test mode banner ---------- */
.testmode {
  position: sticky; top: 0; z-index: 60;
  text-align: center; font-weight: 700; font-size: 14px; letter-spacing: .5px;
  padding: 10px 12px;
  background: #2e2208; color: #ffd75e;
  border-bottom: 1px solid rgba(240, 217, 152, 0.45);
}
[data-theme="light"] .testmode { background: #fdf3d0; color: #7c5200; border-bottom-color: #d9b64f; }

/* ---------- Agent Ice: the concierge bell ---------- */
.ice-fab {
  position: fixed; right: 14px; bottom: 92px; z-index: 60;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--gold-grad); font-size: 30px; line-height: 1;
  border: 1px solid rgba(255, 255, 255, 0.4); cursor: pointer; min-height: 60px;
  box-shadow: 0 8px 24px rgba(185, 138, 47, 0.5), var(--top-hi);
  display: flex; align-items: center; justify-content: center;
}
.ice-fab:active { transform: scale(.96); }
.ice-panel {
  position: fixed; left: 12px; right: 12px; bottom: 164px; z-index: 60;
  max-width: 480px; margin: 0 auto; max-height: 58vh;
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line-strong); border-radius: 18px;
  box-shadow: var(--shadow), var(--top-hi); overflow: hidden;
}
.ice-panel[hidden] { display: none; }
.ice-head {
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--line-strong);
  color: var(--gold-hi); font-weight: 700; font-size: 19px; letter-spacing: .5px;
  padding: 12px 14px;
}
.ice-x {
  background: none; border: 1px solid var(--line); border-radius: 50%;
  color: var(--muted); font-size: 16px; cursor: pointer;
  width: 44px; height: 44px; min-width: 44px; min-height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
}
.ice-msgs {
  flex: 1; overflow-y: auto; padding: 14px;
  display: flex; flex-direction: column; gap: 10px; min-height: 120px;
}
.ice-msg {
  max-width: 88%; padding: 11px 14px; border-radius: 14px;
  font-size: 16px; line-height: 1.5; white-space: pre-wrap; word-break: break-word;
}
.ice-msg.user {
  align-self: flex-end; background: var(--gold-grad); color: var(--btn-ink); font-weight: 600;
}
.ice-msg.ice { align-self: flex-start; background: var(--card-2); color: var(--ink); border: 1px solid var(--line); }
.ice-msg.typing { color: var(--muted); }
.ice-chips {
  display: flex; gap: 8px; overflow-x: auto; padding: 10px 12px;
  border-top: 1px solid var(--line);
}
.ice-chip {
  flex: 0 0 auto; padding: 10px 16px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: transparent; color: var(--gold-hi);
  font-weight: 700; font-size: 14px; cursor: pointer; min-height: 44px; font-family: inherit;
}
.ice-inputrow {
  display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}
.ice-inputrow input {
  flex: 1; font-size: 16px; padding: 12px; border-radius: 12px;
  border: 1px solid var(--line-strong); min-height: 48px;
  background: var(--input-bg); color: var(--ink); font-family: inherit;
}
.ice-inputrow input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212, 169, 78, 0.22); }
.ice-inputrow input::placeholder { color: var(--faint); }
.ice-inputrow .btn { min-height: 48px; width: auto; padding: 10px 20px; }

/* lead-card: grades, footprint, DM composer */
.bar { display:inline-block; width:90px; height:8px; border-radius:99px; background:var(--line); vertical-align:middle; margin-right:8px; overflow:hidden; }
.bar > span { display:block; height:100%; border-radius:99px; background:linear-gradient(90deg, var(--gold-deep), var(--gold-hi)); }
.fp-row { display:flex; gap:10px; align-items:flex-start; padding:8px 0; border-bottom:1px solid var(--line); font-size:16px; }
.fp-row:last-child { border-bottom:none; }
.fp-ico { flex:0 0 30px; text-align:center; }
.fp-body { flex:1; }
.fp-sub { color:var(--faint); font-size:14px; margin-top:2px; }
.modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,.65); z-index:2000; display:flex; align-items:flex-end; justify-content:center; }
.modal { width:100%; max-width:560px; max-height:88vh; overflow-y:auto; background:var(--bg-card); border:1px solid var(--line-strong); border-radius:18px 18px 0 0; padding:18px; }
.modal textarea { width:100%; min-height:150px; font-size:16px; padding:12px; border-radius:12px; border:1px solid var(--line-strong); background:var(--input-bg); color:var(--ink); font-family:inherit; }
.modal .btnrow { display:flex; gap:10px; margin-top:12px; }
.modal .btnrow .btn { flex:1; }

/* recruiting command */
.grid2 { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
@media (max-width:480px){ .grid2 { grid-template-columns:1fr; } }
.btn.sm { min-height:44px; padding:8px 14px; font-size:14px; width:auto; }
.stageSel { font-size:15px; padding:10px; border-radius:10px; border:1px solid var(--line-strong);
  background:var(--input-bg); color:var(--ink); font-family:inherit; min-height:44px; max-width:170px; }

/* ice voice mode */
#iceMic.listening { background: #7a1f1f; border-color: #c0392b; animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }
.ice-inputrow #iceMic { width: auto; padding: 10px 14px; }

/* ---------- Ice: compact side dock ---------- */
.ice-panel {
  left: auto; right: 12px; bottom: 292px; margin: 0;
  width: 302px; max-width: calc(100vw - 24px); max-height: 46vh;
  border-radius: 16px;
}
.ice-panel.min .ice-head,
.ice-panel.min .ice-msgs,
.ice-panel.min .ice-chips,
.ice-panel.min .ice-inputrow { display: none; }
/* The ONE close control (coachlive, 2026-10-29 — William: "take all
   that out" on tap-once/tap-twice): a plain, unmistakable Done button
   in the panel head. Ending a conversation is a single deliberate tap
   on a labelled button — there is no gesture to learn and no hint
   line teaching one (the old .ice-taphint rule retired with it). */
.ice-done {
  font: inherit; font-weight: 800; font-size: 13.5px; letter-spacing: .02em;
  color: #14100a; background: var(--gold-grad, linear-gradient(180deg, #ffe9a8, #e9b949));
  border: 0; border-radius: 999px; padding: 6px 14px; margin-right: 6px;
  cursor: pointer; min-height: 34px;
}
.ice-done:active { filter: brightness(0.92); }
.ice-minibar {
  display: none; align-items: center; gap: 8px;
  padding: 12px 14px; cursor: pointer; font-size: 14px; color: var(--gold-hi); font-weight: 700;
}
.ice-panel.min .ice-minibar { display: flex; }
.ice-minibar .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); flex: 0 0 auto; }
.ice-panel.min.talking .ice-minibar .dot { animation: pulse 1s infinite; background: var(--gold-hi); }

/* slim edge tab to summon her back — labeled with its own instruction
   (William, 2026-10-28): the words run down the edge so the tab itself
   says what a tap on it does */
#iceTab {
  position: fixed; z-index: 60; right: 0; bottom: 130px;
  background: var(--gold-grad); border: 1px solid rgba(255, 255, 255, 0.35); border-right: none;
  border-radius: 12px 0 0 12px; font-size: 22px; padding: 12px 7px; cursor: pointer; min-height: 56px;
  box-shadow: -4px 0 16px rgba(185, 138, 47, 0.4);
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  color: var(--btn-ink); font-family: inherit;
}
#iceTab[hidden] { display: none; }
/* Onevoice (FIX 2): while the training tour is open the desk tab
   is OUT of the course entirely — hidden and inert (TourUI.
   syncIceTab toggles this class from syncLock, which layout()
   drives on every paint). Miss Blizzard is already on stage; a second
   door with a second name crowding his corner got a rep lost. */
#iceTab.tour-hidden { display: none !important; }
#iceTab .ice-tab-label {
  writing-mode: vertical-rl;
  font-size: 15px; font-weight: 800; letter-spacing: 0.14em; line-height: 1;
  user-select: none; -webkit-user-select: none;
}

/* Miss Blizzard's training orb (Mr. Blizzard, 2026-11-14 -- this
   REPLACES the big gold Train tab that stuck out of the left edge):
   a small glowing gold orb in a circular dock, half-tucked into
   the BOTTOM-RIGHT corner like the coach bubble he pointed at on
   the IONOS page. At rest it is TRANSLUCENT -- almost see-through --
   so it never blocks the work on a small phone screen. While Miss
   Blizzard is speaking (.speaking) it comes forward at full
   strength; hover/focus does the same. Paused: dimmer still, with
   a small play badge so Resume reads at a glance. */
#trainOrb {
  position: fixed; z-index: 60; right: -6px; bottom: 84px;
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(16, 20, 32, 0.38);
  border: 1px solid rgba(212, 169, 78, 0.55);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0; font-family: inherit;
  opacity: 0.55;
  transition: opacity 0.25s ease, box-shadow 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}
#trainOrb[hidden] { display: none; }
#trainOrb .train-orb-face { width: 36px; height: 36px; pointer-events: none; }
#trainOrb:hover, #trainOrb:focus-visible, #trainOrb.speaking {
  opacity: 1;
  box-shadow: 0 0 0 3px rgba(212, 169, 78, 0.35), 0 4px 16px rgba(185, 138, 47, 0.45);
  outline: none;
}
#trainOrb.paused { opacity: 0.4; }
#trainOrb .train-orb-badge {
  position: absolute; right: 1px; bottom: 1px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--gold, #d4a94e); color: #141414;
  font-size: 9px; line-height: 16px; text-align: center;
  display: none; pointer-events: none;
}
#trainOrb.paused .train-orb-badge { display: block; }

/* Training lock (2026-11-14): while a rep is locked to training,
   the bottom nav and the Miss Blizzard side tab are gone -- the
   orb and the training ground are all there is. */
body.tlock #bottomnav, body.tlock #mbTab { display: none !important; }

/* ---------- ice panel: desktop/layout fixes ---------- */
.ice-panel, .ice-panel * { box-sizing: border-box; }
.ice-head { font-size: 16px; gap: 8px; }
.ice-head > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 1 auto; min-width: 0; }
.ice-head > span:last-child { flex: 0 0 auto; display: inline-flex; gap: 6px; }
.ice-panel .ice-x { width: 36px; height: 36px; min-width: 36px; min-height: 36px; font-size: 15px; }
.ice-msgs { overflow-x: hidden; }
.ice-msg { overflow-wrap: anywhere; }
.ice-inputrow { gap: 8px; }
.ice-inputrow input { min-width: 0; flex: 1 1 auto; }
.ice-inputrow .btn { flex: 0 0 auto; }
.ice-inputrow #iceSend { padding: 10px 14px; }
.ice-inputrow #iceMic { padding: 10px 12px; }

/* ---------- first-board progress + view toggle ---------- */
.viewtoggle {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  margin: 2px 0 12px;
}
.seg {
  display: inline-flex; background: var(--card-2); border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 3px;
}
.segb {
  border: none; background: transparent; color: var(--muted); font-weight: 800;
  font-size: 14px; padding: 8px 18px; border-radius: 999px; cursor: pointer; font-family: inherit;
}
.segb.on { background: var(--gold-grad); color: var(--btn-ink); }
.pbar {
  height: 14px; border-radius: 999px; background: var(--card-2);
  border: 1px solid var(--line-strong); overflow: hidden; margin: 12px 0 6px;
}
.pfill {
  height: 100%; width: 0; border-radius: 999px;
  background: var(--gold-grad); transition: width 0.7s ease;
}
.step {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 4px; border-top: 1px solid var(--line);
}
.step:first-of-type { border-top: none; }
.step[data-href] { cursor: pointer; }
.step-ico { font-size: 22px; flex: 0 0 auto; }
.step .title { font-weight: 700; font-size: 16px; }
.step .sub { color: var(--muted); font-size: 14px; }
.step .chev { margin-left: auto; color: var(--gold); font-size: 22px; }

/* ---------- call mode ---------- */
.cm-progress { color: var(--muted); font-weight: 700; font-size: 15px; margin: 4px 0 2px; }
.cm-card { text-align: left; }
.cm-name { font-size: 26px; font-weight: 800; margin-top: 8px; line-height: 1.2; }
.cm-script { font-size: 18px; line-height: 1.55; }
.obj { border-top: 1px solid var(--line); padding: 10px 0 2px; }
.obj summary { cursor: pointer; font-weight: 700; color: var(--gold-hi); font-size: 16px; padding: 4px 0; }
.obj p { color: var(--ink); font-size: 16px; line-height: 1.5; margin: 6px 0 10px; }
.cm-call { display: block; text-align: center; font-size: 20px; padding: 16px; margin: 6px 0 2px; text-decoration: none; }
.cm-outcomes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cm-outcomes .btn { min-height: 56px; font-size: 17px; }
.cm-outcomes .btn:last-child { grid-column: 1 / -1; }
.reportmsg {
  white-space: pre-wrap; word-break: break-word; font-family: inherit;
  background: var(--card-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; font-size: 15px; line-height: 1.55; margin: 12px 0;
}

/* ---------- blueprint reference (admin) ---------- */
.bp { text-align: left; overflow-wrap: break-word; }
.bp h1 { font-size: 26px; margin: 18px 0 10px; }
.bp h2 { font-size: 22px; margin: 22px 0 8px; color: var(--gold-hi); }
.bp h3 { font-size: 18px; margin: 18px 0 6px; }
.bp p, .bp li { font-size: 15.5px; line-height: 1.6; color: var(--ink); }
.bp ul, .bp ol { padding-left: 22px; }
.bp table { width: 100%; border-collapse: collapse; font-size: 14px; display: block; overflow-x: auto; }
.bp th, .bp td { border: 1px solid var(--line); padding: 6px 8px; text-align: left; }
.bp code { background: var(--card-2); padding: 1px 5px; border-radius: 6px; font-size: 13.5px; }
.bp pre { background: var(--card-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; overflow-x: auto; }
.bp pre code { background: none; padding: 0; }
.bp blockquote { border-left: 3px solid var(--gold); margin: 12px 0; padding: 4px 14px; color: var(--muted); }
.bp a { color: var(--gold-hi); }

/* Rep Agreement (migration 017): the readable text box a rep must
   scroll to the end of, and the finger-signature pad. The pad is
   paper-white on purpose — the stored PNG is the legal artifact and
   must read like ink on paper in any theme. */
.agr-text { max-height: 46vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.agr-text h3:first-child { margin-top: 0; }
.sigpad {
  width: 100%; height: 190px; display: block;
  background: #fff; border: 2px dashed var(--line-strong); border-radius: 12px;
  touch-action: none; cursor: crosshair;
}

/* Mock-up generator handwriting fonts (canvas) */
@font-face { font-family: "Kalam"; src: url("/fonts/Kalam-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Caveat"; src: url("/fonts/Caveat.ttf") format("truetype"); font-display: swap; }

/* ---------- Pitch Mode: sell the rep, then the room ---------- */

/* Home: gold Pitch entry card + rotating proof line */
.card.pitch-gold {
  background: linear-gradient(135deg, #1c1608, #241b09);
  border-color: var(--gold-deep);
}
.proofline {
  text-align: center; color: var(--muted); font-size: 15px; font-style: italic;
  min-height: 22px; margin: -4px 6px 14px; transition: opacity .35s ease;
}
.proofline.fade { opacity: 0; }

/* The Pitch deck (rep-facing) */
.pitch-top {
  display: flex; align-items: center; justify-content: space-between; margin: 4px 0 14px;
}
.pitch-top .pitch-brand {
  font-family: "Playfair Display", Georgia, serif; font-weight: 700;
  letter-spacing: 2.5px; color: var(--gold-hi); font-size: 16px;
}
.pitch-count { color: var(--faint); font-size: 14px; font-weight: 700; letter-spacing: 1px; }
.pitch-stage { min-height: 52vh; cursor: pointer; animation: pitchIn .3s ease; }
@keyframes pitchIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.pitch-eyebrow {
  color: var(--gold); font-weight: 800; letter-spacing: 3px; font-size: 14px; margin-bottom: 10px;
}
.pitch-title {
  font-family: "Playfair Display", Georgia, serif; font-size: 34px; line-height: 1.15;
  color: var(--gold-hi); margin: 0 0 16px; font-weight: 700;
}
.pitch-body { font-size: 20px; line-height: 1.6; color: var(--ink); margin: 0 0 16px; }
.pitch-img {
  width: 100%; border-radius: 12px; border: 1px solid var(--line-strong);
  box-shadow: var(--shadow); display: block; margin-bottom: 16px;
}
.pitch-live {
  border-left: 3px solid var(--gold); background: var(--gold-soft);
  padding: 12px 16px; border-radius: 0 12px 12px 0; font-size: 18px; font-weight: 700;
}
.pitch-dots { display: flex; gap: 8px; justify-content: center; margin: 18px 0 14px; }
.pitch-dots span {
  width: 9px; height: 9px; border-radius: 999px; background: var(--card-2);
  border: 1px solid var(--line-strong); transition: background .25s ease;
}
.pitch-dots span.on { background: var(--gold-grad); border-color: var(--gold-deep); }
.pitch-nav { display: flex; gap: 10px; align-items: stretch; }
.pitch-nav .btn { flex: 1; }
.btn.ghost {
  background: var(--card-2); color: var(--ink); border: 1px solid var(--line-strong);
  box-shadow: none;
}
.pitch-hint { text-align: center; color: var(--faint); font-size: 13.5px; margin-top: 10px; }

/* Presenter mode (customer-facing): full-screen, app chrome hidden */
body.presenting #topbar, body.presenting #bottomnav, body.presenting #testmode,
body.presenting #icePanel,
body.presenting #iceTab, body.presenting #trainOrb { display: none !important; }
.present-wrap {
  position: fixed; inset: 0; z-index: 1200; overflow-y: auto;
  background: #0b0d12; color: #f4efe3;
  padding: 26px 22px 30px; display: flex; flex-direction: column;
}
.present-exit {
  position: absolute; top: 14px; right: 14px; width: 46px; height: 46px;
  border-radius: 999px; border: 1px solid rgba(212, 169, 78, .45);
  background: rgba(20, 25, 34, .85); color: #f0d998; font-size: 20px; cursor: pointer;
}
.present-stage { flex: 1; display: flex; flex-direction: column; justify-content: center;
  max-width: 720px; width: 100%; margin: 0 auto; animation: pitchIn .3s ease; }
.present-eyebrow {
  color: #d4a94e; font-weight: 800; letter-spacing: 3px; font-size: 13.5px;
  text-align: center; margin-bottom: 12px;
}
.present-title {
  font-family: "Playfair Display", Georgia, serif; font-size: 38px; line-height: 1.15;
  color: #f0d998; text-align: center; margin: 0 0 18px; font-weight: 700;
}
.present-body { font-size: 21.5px; line-height: 1.6; text-align: center; color: #f4efe3; margin: 0 0 18px; }
.present-img {
  width: 100%; max-height: 52vh; object-fit: contain; border-radius: 14px;
  border: 1px solid rgba(212, 169, 78, .38); background: #141922; display: block; margin-bottom: 20px;
}
.present-price {
  font-family: "Playfair Display", Georgia, serif; font-size: 52px; color: #f0d998;
  text-align: center; line-height: 1.1; margin-bottom: 6px;
}
.present-foot {
  text-align: center; color: #b3a78d; font-size: 16.5px; margin-top: 10px; line-height: 1.5;
}
.present-foot .who { color: #f4efe3; font-weight: 700; }
.present-choose { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.present-dots { display: flex; gap: 8px; justify-content: center; margin: 20px 0 14px; }
.present-dots span {
  width: 9px; height: 9px; border-radius: 999px; background: #1a2230;
  border: 1px solid rgba(212, 169, 78, .38);
}
.present-dots span.on { background: linear-gradient(135deg, #b98a2f, #f0d998); }
.present-nav { display: flex; gap: 10px; max-width: 720px; width: 100%; margin: 0 auto; }
.present-nav .btn { flex: 1; }
.present-nav .btn.ghost { background: #1a2230; color: #f4efe3; border-color: rgba(212, 169, 78, .38); }

/* ================= Ice Guided Tour (2026-10-22) =================
   The Training Center inside the real app: four dim panels leave ONE
   element lit (the "hole"), a gold ring marks it, and Ice's caption
   card teaches from the bottom (or top, when the target sits low).
   z-index 3000+ sits above everything app-side — including the DM
   composer modal (2000), which the tour deliberately teaches through —
   and below nothing else. Tour off = none of this exists in the DOM. */
.tour-dim { position: fixed; background: rgba(3, 6, 12, 0.78); z-index: 3000; }
.tour-ring {
  position: fixed; z-index: 3001; pointer-events: none;
  border: 3px solid var(--gold); border-radius: 14px;
  box-shadow: 0 0 0 4px rgba(212, 169, 78, 0.35), 0 0 34px rgba(212, 169, 78, 0.45);
  transition: all 0.3s ease;
}
.tour-card {
  position: fixed; left: 10px; right: 10px; z-index: 3002;
  background: var(--card); color: var(--ink);
  border: 1.5px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: var(--shadow), var(--top-hi);
  padding: 16px 16px 14px;
  /* Lockfix (2026-10-30, FIX B): the lesson card NEVER scrolls.
     It used to carry a half-screen height cap + a vertical auto
     overflow — a rep could drag the words out from under Miss Blizzard's
     voice (Doug did).
     Now the card fits by SHRINKING (the .fit-1/2/3 levels below,
     applied by TourUI.fitCard) and the overflow backstop clips
     rather than scrolls. The card also takes no part in page
     gestures: no touch scrolling, no text selection, no
     long-press callouts. */
  max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px);
  overflow: hidden;
  touch-action: none;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
  animation: pitchIn 0.25s ease;
}
.tour-card input, .tour-card textarea { -webkit-user-select: text; user-select: text; }
/* Lockfix fit levels: each step tightens type + spacing until the
   whole card fits the viewport (TourUI.fitCard measures and
   steps). Level 3 is the floor — below it the backstop clips. */
.tour-card.fit-1 { padding: 13px 14px 11px; }
.tour-card.fit-1 .tour-say { font-size: 16px; line-height: 1.42; }
.tour-card.fit-2 { padding: 11px 12px 9px; }
.tour-card.fit-2 .tour-say { font-size: 14.5px; line-height: 1.36; }
.tour-card.fit-2 .tour-hint { font-size: 13.5px; margin-top: 7px; }
.tour-card.fit-2 .tour-nav { margin-top: 9px; }
.tour-card.fit-2 .tour-opts { gap: 7px; margin-top: 8px; }
.tour-card.fit-3 { padding: 9px 10px 8px; }
.tour-card.fit-3 .tour-say { font-size: 13px; line-height: 1.3; }
.tour-card.fit-3 .tour-hint { font-size: 12.5px; margin-top: 6px; }
.tour-card.fit-3 .tour-nav { margin-top: 7px; gap: 7px; }
.tour-card.fit-3 .tour-opts { gap: 6px; margin-top: 6px; }
.tour-card.fit-3 .tour-opt { padding: 8px 10px; }
/* Lockfix (FIX B): the scroll lock on the page itself, held by
   TourUI.syncLock exactly while a course (or its offer) is open. */
html.tour-lock, body.tour-lock { overflow: hidden !important; overscroll-behavior: none; }
/* Lockfix (FIX B): the shield — a transparent sheet over the
   whole viewport at the dims' level (3000), painted after them,
   under the stage (3001), the card (3002) and the live panel
   (3005). While the course is open it
   swallows every tap/swipe/drag aimed at the app beneath —
   including through the dims' lit hole — so the ONLY things a
   rep can touch are the course's own lawful controls above it. */
.tour-shield {
  position: fixed; inset: 0; z-index: 3000;
  background: transparent; touch-action: none;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
}
/* Lockfix (FIX A): the resume brief's start line — the biggest,
   plainest thing on the card, because the whole card is the
   button and it says so. */
.tour-card.start-surface { cursor: pointer; }
.tour-start-line {
  margin-top: 14px; padding: 16px 12px; text-align: center;
  font-size: 21px; font-weight: 800; line-height: 1.35; color: var(--gold-hi);
  border: 2px dashed rgba(240, 217, 152, 0.65); border-radius: var(--radius);
  background: rgba(240, 217, 152, 0.10);
}
.tour-card.bottom { bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
.tour-card.top { top: calc(10px + env(safe-area-inset-top, 0px)); }
/* Stagefix: while Miss Blizzard's stage is up (body.coach-on, toggled by
   CoachUI.showStage/hideStage), a BOTTOM card narrows from the
   right so its words, buttons and quiz answers sit clear of his
   118px stage box (right: 10px + 118px wide + breathing room).
   The side tabs keep their own places: Tap to talk (right edge)
   and Train (left edge) ride at z 60, far under the tour layers
   (dims 3000 / stage 3001 / card 3002); both hide while
   presenting, and outside the tour the stage is hidden — so the
   bottom-right stage never sits on a tappable tab. */
body.coach-on .tour-card.bottom { right: 140px; }
@media (max-width: 380px) {
  body.coach-on .tour-card.bottom { right: 132px; }
}
.tour-eyebrow {
  color: var(--gold); font-weight: 800; letter-spacing: 2px;
  font-size: 12.5px; margin-bottom: 6px;
}
.tour-say { font-size: 17.5px; line-height: 1.5; }
/* Karaoke captions (stagefix): while a recorded line plays, the
   current word wears a gold pill — background + bold + dark text
   is the legible pick for low vision (a color-only change would
   vanish for tired eyes). With reduced motion there is no sweep:
   the whole line is lit for the clip's duration (.karaoke-line,
   set from JS off the same media query). */
.tour-say .kw { border-radius: 5px; padding: 0 1px; }
.tour-say .kw-on { background: var(--gold-grad); color: #221806; font-weight: 800; box-shadow: 0 0 0 1px rgba(240, 217, 152, 0.65); }
.tour-say.karaoke-line { background: rgba(240, 217, 152, 0.14); border-radius: 8px; box-shadow: inset 3px 0 0 var(--gold); padding: 4px 8px; margin-left: -8px; margin-right: -8px; }
.tour-nav { display: flex; gap: 10px; margin-top: 14px; }
.tour-nav .btn { flex: 1; }
.tour-x {
  position: absolute; top: 8px; right: 10px; width: 38px; height: 38px;
  border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--card-2); color: var(--ink); font-size: 16px; cursor: pointer;
}
.tour-hint { color: var(--gold-hi); font-weight: 700; font-size: 15.5px; margin-top: 10px; }
.tour-opts { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.tour-opt { text-align: left; width: 100%; }
.tour-opt.right { border-color: var(--green-line); background: var(--green-soft); }
.tour-opt.wrong { border-color: var(--red-line); background: var(--red-soft); opacity: 0.55; }
.tour-shake { animation: tourShake 0.4s ease; }
@keyframes tourShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}
.tour-dots { display: flex; gap: 6px; margin-top: 12px; }
.tour-dots span { width: 8px; height: 8px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line-strong); }
.tour-dots span.on { background: var(--gold-grad); }

/* ---------- Miss Blizzard — the dual ghost hologram (Training Rebuild) ----------
   A still treated as light: translucent gold forms, scanline haze,
   a slow breathing glow, and — while he speaks — shimmer streaks
   riding the voice (sync the light, barely move the lips; that's the
   canon for this hologram). The stage floats above the tour dim
   (z 3000) but below the tour card (3002); his panel rides above
   everything (3005) because a live question outranks the lesson. */
.badge.struggle { border-color: #e5484d; color: #ffb4b4; background: rgba(229, 72, 77, 0.16); font-weight: 800; }
.ice-confirm {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 10px 12px; border-top: 1px solid rgba(240, 217, 152, 0.45);
  background: var(--gold-soft);
}
.ice-confirm-text { flex: 1 1 180px; font-size: 14.5px; }
.ice-confirm-btns { display: flex; gap: 8px; }
.coach-stage {
  /* Stagefix (2026-10-30, Doug's live session): the face comes
     DOWN by the words — bottom-right, beside the caption card,
     where the old desk avatar used to sit — instead of floating
     top-right, far from what he's reading. A bottom tour card
     yields its right edge to him while he's up (body.coach-on
     below), so he never covers the bubble text, its primary
     controls, or quiz answers; a top-flipped card needs no yield
     (he's at the other end of the screen). His glow spills past
     the box by design — light, not content. */
  position: fixed; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); right: 10px; z-index: 3001;
  width: 118px; text-align: center; pointer-events: none;
  /* CoachGlow writes this from the narration audio itself
     (analyser RMS; a syllabic approximation for the device
     voice): 0 at rest, surging toward 1 on words/syllables.
     Every level-driven rule below degrades to the static
     treatment when it stays 0. */
  --coach-level: 0;
}
.coach-stage[hidden] { display: none; }
.coach-stage > * { pointer-events: auto; }
/* Coachfix (field report, 2026-10-29): the first treatment was
   too faint to read on a real phone — a 7%-alpha scanline drift
   and nothing else, and the one-shot flare animation silently
   replaced the breathing glow after the first section change.
   Now the hologram reads in a STILL frame (static scanline
   texture + edge light + double glow), and in motion (a bright
   scan band sweeping the head, a periodic glitch slice, a
   stronger speech pulse). Animations split by property so they
   compose instead of replacing each other: breathe = transform/
   opacity on the frame, pulse/flare = filter on the frame,
   glitch = transform/filter on the image itself. */
.coach-holo {
  position: relative; width: 118px; height: 118px; margin: 0 auto;
  border-radius: 30px; overflow: hidden; cursor: pointer;
  /* Lockfix (FIX B): the stage is a lawful surface ABOVE the
     shield, so it carries its own gesture discipline — no
     long-press callout, no selection, no touch scrolling. */
  touch-action: none; -webkit-touch-callout: none;
  -webkit-user-select: none; user-select: none;
  /* Stage Treatment V2 (coachlive, William 2026-10-29 ~23:46): a
     brighter rim + a hotter lit backdrop, so the screen-blended
     head (below) dissolves INTO the light at its edges instead of
     sitting in a frame — projected, not pasted. */
  border: 1px solid rgba(170, 232, 255, 0.88);
  background: radial-gradient(circle at 50% 35%, rgba(240, 217, 152, 0.34), rgba(16, 26, 44, 0.5) 62%, rgba(5, 7, 12, 0.55) 78%);
  /* The glow breathes with his voice: halo size and strength ride
     --coach-level (base values = the static treatment at rest). */
  box-shadow:
    0 0 calc(26px + var(--coach-level) * 34px) rgba(240, 200, 110, calc(0.4 + var(--coach-level) * 0.38)),
    0 0 calc(52px + var(--coach-level) * 46px) rgba(110, 190, 255, calc(0.3 + var(--coach-level) * 0.42)),
    inset 0 0 22px rgba(160, 220, 255, 0.28);
  animation: coachBreathe 5.2s ease-in-out infinite;
}
.coach-holo::before {
  /* Static scanline texture — the hologram's fingerprint, visible
     even in a screenshot: fine light lines across the whole head.
     V2: stronger presence (0.17 → 0.26 alpha) — the deeper ghost
     needs the lines to keep the head readable as a projection. */
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(170, 228, 255, 0.26) 0 1px, transparent 1px 3px);
  mix-blend-mode: screen;
}
.coach-holo::after {
  /* A hard light line at the projection's base + a soft top sheen.
     Its strength follows the voice level. */
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    linear-gradient(to top, rgba(170, 228, 255, 0.35), transparent 14%),
    linear-gradient(to bottom, rgba(255, 244, 205, 0.13), transparent 30%);
  mix-blend-mode: screen;
  opacity: calc(0.62 + var(--coach-level) * 0.38);
}
.coach-holo img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0.92; transition: opacity 0.55s ease;
  filter: saturate(1.12) brightness(1.09) contrast(1.04);
  animation: coachGlitch 6.5s steps(1, end) infinite;
  /* Stage Treatment V2 — DEEPER GHOST: the head is SCREEN-blended
     against the lit backdrop, so its darks fall away and what
     remains is the light of the face — a projection, not a photo
     in a frame. Features stay lit (brightness above), so he still
     reads clearly as Miss Blizzard at phone size. */
  mix-blend-mode: screen;
  /* Stage Treatment V2 — SPEECH MICRO-MOTION: the whole head leans
     and swells almost imperceptibly with the smoothed voice level
     (translate/scale are the independent transform properties, so
     they COMPOSE with the glitch animation's transform instead of
     fighting it). Amplitudes are tiny on purpose (~2px, ~1.2%):
     breath and emphasis, never jitter. The short transitions are
     a second low-pass over CoachGlow's already-smoothed level. */
  translate: 0 calc(var(--coach-level) * -2px);
  scale: calc(1 + var(--coach-level) * 0.012);
  transition: opacity 0.55s ease, translate 0.16s ease-out, scale 0.16s ease-out;
}
.coach-mouthbloom {
  /* Stage Treatment V2 — THE MOUTH BLOOM: a soft ball of light low
     on the face that swells with every syllable, so the speech
     visibly comes FROM him — with the sound OFF you can still tell
     he's talking. Deliberately a bloom of light, NOT a mouth
     shape: animating a still photo's lips reads fake (William's
     canon), so the light does the talking. Position is a soft
     zone (lower-center of the head), never a precise lip track. */
  /* Gold Miss Blizzard (2026-11-01): the zone rides HIGHER than the retired
     hologram's (top 47%): on the gold head-and-shoulders framing the
     mouth sits at ~42% of the stage box, so the bloom zone is
     30%–60% with its heart on the mouth. */
  position: absolute; left: 24%; top: 30%; width: 52%; height: 30%;
  z-index: 2; pointer-events: none; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 240, 196, 0.85), rgba(240, 200, 110, 0.35) 55%, transparent 72%);
  mix-blend-mode: screen; filter: blur(3px);
  opacity: calc(0.08 + var(--coach-level) * 0.8);
  transform: scale(calc(0.82 + var(--coach-level) * 0.38));
  transition: opacity 0.12s ease-out, transform 0.12s ease-out;
}
.coach-holo img.off { opacity: 0; }
.coach-wave {
  /* The electrical wave ring around the face (coachfix addition,
     William's canon: light synced WITH the voice). Conic arcs of
     light, masked to a ring; invisible at rest (level 0), flaring
     and swelling on words as CoachGlow spends the audio level.
     Transform/opacity only. */
  position: absolute; inset: -16%; z-index: 1; pointer-events: none; border-radius: 50%;
  background: conic-gradient(from 0deg,
    transparent 0deg 40deg, rgba(170, 228, 255, 0.55) 62deg, transparent 112deg,
    rgba(255, 242, 200, 0.5) 178deg, transparent 228deg,
    rgba(170, 228, 255, 0.45) 298deg, transparent 360deg);
  -webkit-mask: radial-gradient(circle, transparent 57%, #000 63%, #000 71%, transparent 77%);
  mask: radial-gradient(circle, transparent 57%, #000 63%, #000 71%, transparent 77%);
  mix-blend-mode: screen;
  opacity: calc(var(--coach-level) * 0.95);
  animation: coachWaveSpin 14s linear infinite;
}
.coach-scanline {
  /* The moving scan band: a bright bar of light that sweeps down
     the head and loops — unmistakably a projection, not a photo. */
  position: absolute; left: 0; right: 0; top: -38%; height: 36%; z-index: 3; pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgba(170, 228, 255, 0.30) 42%, rgba(255, 242, 200, 0.45) 50%, rgba(170, 228, 255, 0.30) 58%, transparent);
  mix-blend-mode: screen;
  animation: coachScan 3.4s linear infinite;
  /* The band brightens with the voice level. */
  filter: brightness(calc(1 + var(--coach-level) * 0.9));
}
.coach-stage.speaking .coach-holo {
  animation: coachSpeakPulse 1.15s ease-in-out infinite, coachBreathe 5.2s ease-in-out infinite;
  box-shadow:
    0 0 calc(44px + var(--coach-level) * 30px) rgba(240, 200, 110, calc(0.65 + var(--coach-level) * 0.3)),
    0 0 calc(70px + var(--coach-level) * 40px) rgba(110, 190, 255, calc(0.45 + var(--coach-level) * 0.35)),
    inset 0 0 28px rgba(160, 220, 255, 0.4);
}
.coach-stage.speaking .coach-scanline { animation-duration: 1.5s; }
/* Stage Treatment V2 — while he's talking, the wave ring holds a
   visible floor (not just syllable spikes) and swells harder, so
   the "he's talking" read survives a glance at the phone. */
.coach-stage.speaking .coach-wave { opacity: calc(0.3 + var(--coach-level) * 0.85); }
.coach-stage.flare .coach-holo { animation: coachFlare 0.65s ease, coachBreathe 5.2s ease-in-out infinite; }
@keyframes coachBreathe {
  0%, 100% { transform: translateY(0); opacity: 0.94; }
  50% { transform: translateY(-3px); opacity: 1; }
}
@keyframes coachSpeakPulse {
  0%, 100% { filter: brightness(1); }
  30% { filter: brightness(1.24); }
  55% { filter: brightness(0.94); }
  80% { filter: brightness(1.15); }
}
@keyframes coachFlare {
  0% { filter: brightness(1); }
  35% { filter: brightness(1.85); }
  100% { filter: brightness(1); }
}
@keyframes coachScan {
  from { transform: translateY(-10%); }
  to { transform: translateY(430%); }
}
@keyframes coachWaveSpin {
  from { transform: rotate(0deg) scale(calc(1 + var(--coach-level) * 0.07)); }
  to { transform: rotate(360deg) scale(calc(1 + var(--coach-level) * 0.07)); }
}
@keyframes coachGlitch {
  /* A brief slice-shift + flicker burst late in each 6.5s cycle;
     the image sits perfectly still the rest of the time. */
  0%, 88%, 91%, 94.5%, 100% { transform: translateX(0); filter: saturate(1.12) brightness(1.09) contrast(1.04); }
  89% { transform: translateX(-3px) skewX(-2.5deg); filter: saturate(1.6) brightness(1.35) contrast(1.1); }
  90% { transform: translateX(3px); filter: saturate(0.9) brightness(1.2); }
  92.5% { transform: translateX(-2px); filter: brightness(1.5); }
  93.5% { transform: translateX(1px); filter: brightness(1.15); }
}
@media (prefers-reduced-motion: reduce) {
  /* Calmed, not removed: the still-frame treatment (scanline
     texture, base light, glow) stays; the fast motion goes. */
  .coach-holo { animation: coachBreathe 9s ease-in-out infinite; }
  .coach-holo img { animation: none; }
  .coach-scanline { animation-duration: 9s; opacity: 0.55; }
  /* Calmed audio-reactivity: no wave motion — the level still
     drives the glow, at a gentler spend. */
  .coach-wave { animation: none; opacity: calc(var(--coach-level) * 0.55); }
  .coach-stage.speaking .coach-holo { animation: coachBreathe 9s ease-in-out infinite; }
  /* Stage Treatment V2 under reduced motion: the head's speech
     MICRO-MOTION is dropped outright (no lean, no swell), while
     the mouth bloom + glow keep answering the voice level — the
     light still talks, the head stays still. */
  .coach-holo img { translate: none; scale: none; transition: opacity 0.55s ease; }
}
.coach-name {
  margin-top: 5px; font-weight: 800; font-size: 13.5px; letter-spacing: 0.06em;
  color: var(--gold-hi); text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
}
/* Coachlive: the live-conversation entry button on the tour card —
   one big, forgiving target. Starting the live lesson is the whole
   interaction; there is nothing precise to tap after it. */
.tour-live-go { font-size: 19px; padding: 16px; width: 100%; min-height: 58px; }
.coach-hey { margin-top: 5px; }
.coach-wake {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  margin-top: 5px; font-size: 11.5px; color: var(--gold-hi);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8); cursor: pointer;
}
.coach-wake[hidden] { display: none; }
.coach-panel { z-index: 3005; bottom: 110px; }
.coach-pad {
  margin-top: 12px; padding: 20px 10px; text-align: center; cursor: pointer;
  border: 2px dashed rgba(240, 217, 152, 0.6); border-radius: 16px;
  background: radial-gradient(circle at 50% 30%, rgba(240, 217, 152, 0.16), rgba(5, 7, 12, 0.25) 80%);
  font-size: 30px; user-select: none; -webkit-user-select: none;
}
.coach-pad span { display: block; margin-top: 4px; font-size: 13.5px; font-weight: 700; color: var(--gold-hi); }
.coach-pad:active { transform: scale(0.98); }

/* Flowfix (2026-10-30): the open-mic indicator and listen mode.
   Pilloff (2026-10-31 — William's own field test): the labeled
   breakout pill that used to be styled here is REMOVED entirely,
   CSS and all — on his phone it rendered as a dark bubble right
   across Miss Blizzard's face, and his word was "we got to remove that."
   There is no floating pill rule, no shrunk-stage companion rule,
   nothing left to drift over the face: the breakout doors are
   the stage gesture (tap the picture) and the open mic (just
   talk), both taught in the opener. The stage runs full-size,
   always. */
/* The mic pill rides the stage: a live dot while Miss Blizzard listens,
   grey when muted. In listen mode the picture minimizes away and
   this pill is the whole stage — the mode is visible at a glance. */
.coach-mic-pill {
  display: flex; align-items: center; gap: 7px;
  touch-action: none; -webkit-touch-callout: none;
  -webkit-user-select: none; user-select: none;
  margin-top: 6px; padding: 5px 9px; border-radius: 999px;
  background: rgba(10, 14, 24, 0.88); border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff; font-size: 11px; pointer-events: auto;
}
.coach-mic-pill[hidden] { display: none; }
.coach-mic-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #666; flex: none;
}
.coach-mic-dot.live { background: #3ddc74; animation: coach-mic-pulse 1.6s ease-in-out infinite; }
.coach-mic-dot.muted { background: #e0483e; animation: none; }
@keyframes coach-mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(61, 220, 116, 0.55); }
  50% { box-shadow: 0 0 0 6px rgba(61, 220, 116, 0); }
}
.coach-mic-pill button {
  background: none; border: none; font-size: 15px; cursor: pointer; padding: 2px 4px; line-height: 1;
}
.coach-stage.listen-mode .coach-holo,
.coach-stage.listen-mode .coach-name,
.coach-stage.listen-mode .coach-hey,
.coach-stage.listen-mode .coach-wake { display: none; }
.coach-stage.listen-mode { width: auto; }
@media (prefers-reduced-motion: reduce) {
  .coach-mic-dot.live { animation: none; }
}
}

/* ================= apply wizard (2026-11-01 applyfee) =================
   The /apply door's 5-step application. Mobile-first: one short step
   at a time, big tap targets, swipe or Continue; on desktop the same
   card simply sits centered at landing width. Field inputs reuse
   .field above — this block is layout + wizard furniture only. */
.careers-salary {
  font-family: 'Playfair Display', serif; font-weight: 800;
  font-size: clamp(24px, 6vw, 34px); line-height: 1.15; color: var(--gold, #c9a227);
  margin: 10px 0;
}
.careers-how-h { margin: 14px 0 6px; font-size: 16px; }
.careers-how { margin: 0 0 14px; padding-left: 22px; }
.careers-how li { margin: 4px 0; }
.careers .btn { padding: 14px 28px; font-size: 1.05rem; }
.wiz-progress {
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 700; margin-bottom: 14px;
}
.wiz-dots { display: inline-flex; gap: 6px; }
.wiz-dots .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--line-strong, #444); display: inline-block;
}
.wiz-dots .dot.on { background: var(--gold, #c9a227); }
.wiz-step .consent-row { margin: 10px 0; }
.wiz-nav { display: flex; gap: 10px; margin-top: 20px; }
.wiz-nav .btn { flex: 1; padding: 16px; font-size: 1.05rem; }
.wiz-fee-h { margin: 2px 0 8px; font-size: 20px; }
.wiz-fee-copy { line-height: 1.5; }
.wiz-cardrow { display: flex; gap: 12px; }
.wiz-cardrow .field { flex: 1; }
.wiz-stripe-el {
  padding: 14px 12px; border-radius: 8px; border: 1px solid var(--line-strong, #444);
  background: var(--input-bg, #000);
}
.wiz-swipe { margin-top: 10px; text-align: center; }
.wiz-plan-row {
  display: flex; gap: 10px; align-items: flex-start;
  border: 1px solid var(--line-strong, #444); border-radius: 8px;
  padding: 12px; line-height: 1.5;
}
.wiz-plan-row input { margin-top: 4px; width: 20px; height: 20px; flex: none; }
.wiz-code { margin-top: 18px; }
.wiz-code label { font-weight: 600; }
.wiz-coderow { display: flex; gap: 10px; margin-top: 6px; }
.wiz-coderow input {
  flex: 1; padding: 12px; border-radius: 8px; font-size: 1rem;
  border: 1px solid var(--line-strong, #444);
  background: var(--input-bg, #000); color: inherit;
  text-transform: uppercase; letter-spacing: 1px;
}
.wiz-coderow .btn { flex: none; padding: 12px 20px; }
@media (min-width: 720px) {
  .wiz-nav .btn { flex: 0 1 220px; }
  .wiz-nav { justify-content: space-between; }

/* Team Cards (2026-11-07): Admin → Team Accounts as CRM profile cards. */
.tc-strip { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--card-2); margin-bottom: 12px; font-size: 15.5px; }
.tc-controls { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin-bottom: 12px; }
.tc-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.tc-manage { padding: 12px 14px; margin-bottom: 12px; }
.tc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.tc-card { border: 1px solid var(--line-strong); border-radius: 12px; background: var(--card-2); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.tc-card.offboarded, .tc-focus.offboarded { opacity: .62; }
.tc-top { display: flex; gap: 12px; align-items: flex-start; }
.tc-ava { flex: none; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; color: #10131a; }
.tc-ava.big { width: 58px; height: 58px; font-size: 21px; }
.tc-id { flex: 1; min-width: 0; }
.tc-name { font-weight: 700; font-size: 16.5px; }
.tc-name.big { font-size: 20px; }
.tc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tc-mini { display: flex; flex-direction: column; gap: 3px; font-size: 14.5px; color: var(--muted); }
.tc-focus { border: 1px solid var(--line-strong); border-radius: 12px; background: var(--card-2); padding: 16px; }
.tc-focusnav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.tc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 12px; }
@media (max-width: 720px) { .tc-cols { grid-template-columns: 1fr; } }
.tc-block h3 { margin: 0 0 8px; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); }
.tc-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.tc-stats div { display: flex; flex-direction: column; }
.tc-stats strong { font-size: 19px; }
.tc-stats span { font-size: 13px; color: var(--muted); }
.tc-report { margin: 12px 0 0; padding: 10px 12px; border-left: 3px solid var(--gold); background: rgba(201, 168, 106, .08); font-size: 15px; }

/* ---------- Agent ORB (2026-11-08 - faces off, William) ----------
   "No faces for now just an orb." Every agent/coach presence renders
   as this small glowing orb instead of a face image, behind
   AGENT_ORB_ENABLED in app.js (original face code/assets untouched).
   Orb mode on the training stage: 40px, bottom-right corner, fixed,
   pointer-events off - it cannot cover the lesson card, the quiz
   answers, or the one-call-to-action send path. Its glow still rides
   CoachGlow's --coach-level, so the light answers the narration
   exactly as the face's light did. */
.agent-orb {
  display: block; border-radius: 50%;
  background: radial-gradient(circle at 35% 32%,
    #fff6d8 0%, #f0d998 26%, #d4a94e 48%,
    rgba(110, 190, 255, 0.55) 74%, rgba(110, 190, 255, 0.12) 100%);
  box-shadow:
    0 0 calc(14px + var(--coach-level, 0) * 26px) rgba(240, 200, 110, 0.65),
    0 0 calc(30px + var(--coach-level, 0) * 40px) rgba(110, 190, 255, 0.40),
    inset 0 0 12px rgba(255, 255, 255, 0.35);
  animation: agentOrbPulse 4.5s ease-in-out infinite;
}
.coach-stage.orb-mode { width: auto; pointer-events: none; }
.coach-stage.orb-mode .agent-orb { width: 40px; height: 40px; }
.agent-orb--stage { width: 64px; height: 64px; margin: 27px auto; }
@keyframes agentOrbPulse {
  0%, 100% { transform: scale(1); opacity: 0.92; }
  50% { transform: scale(1.06); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .agent-orb { animation: none; }
}

/* (The 2026-11-13 Training on/off switch CSS went with the Train
   tab it lived on -- removed 2026-11-14. Training is pause/resume
   now; the paused state rides on the orb's .paused class above.) */
