/* Subtext practice space — web. Same tokens as the iOS app and sites. */
/* Colour, type and shape tokens live in tokens.css, shared with the marketing site. */

* { box-sizing:border-box; }
html, body { height:100%; }
body {
  margin:0; background:var(--bg); color:var(--ink);
  font-family:var(--font-sans);
  font-size:1rem; line-height:1.55;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation:none !important; transition:none !important; }
}
h1 { font-size:1.548rem; letter-spacing:-.012em; margin:0 0 4px; }
h2 { font-size:1.161rem; margin:0 0 6px; }
h3 { font-size:1rem; margin:0 0 4px; }
p { margin:.4em 0 .9em; }
button { font:inherit; cursor:pointer; }
:focus-visible { outline:2.5px solid var(--accent); outline-offset:2px; border-radius:4px; }

/* ---------- shell: desktop sidebar + content ---------- */
.shell { display:grid; grid-template-columns:250px 1fr; min-height:100vh; }
.sidebar {
  border-right:1px solid var(--line); background:var(--surface);
  padding:20px 14px 16px; display:flex; flex-direction:column; gap:16px;
  position:sticky; top:0; height:100vh; overflow-y:auto; overscroll-behavior:contain;
}
.logo { display:flex; align-items:center; gap:10px; font-weight:700; font-size:1.161rem; color:var(--ink); text-decoration:none; padding:0 8px; }
.logo svg { width:26px; height:26px; flex:none; }
.modnav { display:flex; flex-direction:column; gap:1px; }
.navitem {
  position:relative; display:flex; align-items:center; gap:11px; min-height:38px; padding:0 12px; border-radius:9px;
  color:var(--ink2); text-decoration:none; font-weight:500; font-size:0.9355rem; line-height:1.2;
}
.navitem .mi { width:19px; height:19px; flex:none; display:flex; color:var(--ink3); }
.navitem .mi svg { width:19px; height:19px; }
.navitem:hover { background:var(--surface2); color:var(--ink); }
.navitem:hover .mi { color:var(--ink2); }
/* Current page: a filled wash plus a bar, so it doesn't rely on colour alone. */
.navitem.active { background:var(--wash); color:var(--ink); font-weight:600; }
.navitem.active .mi { color:var(--accent); }
.navitem.active::before { content:""; position:absolute; left:0; top:9px; bottom:9px; width:3px; border-radius:3px; background:var(--accent); }
.navitem:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }
/* Sound is still playing on another screen — visible, not hidden. */
.navitem.playing::after { content:""; width:7px; height:7px; border-radius:50%; background:var(--accent); margin-left:auto; flex:none; }
/* Group labels: the three moves, numbered like the How this works page. */
.navgroup {
  display:flex; align-items:center; gap:8px; font-size:0.7097rem; font-weight:700; letter-spacing:.07em; text-transform:uppercase;
  color:var(--ink3); padding:16px 12px 5px;
}
.navnum { width:17px; height:17px; border-radius:50%; border:1.5px solid var(--line); color:var(--ink2); font-size:0.6452rem; letter-spacing:0; display:inline-flex; align-items:center; justify-content:center; }
.sidefoot { margin-top:auto; display:flex; flex-direction:column; gap:12px; padding-top:14px; border-top:1px solid var(--line); }
.modeswitch { padding:0 4px; }
.switch { font:inherit; display:flex; align-items:center; gap:10px; width:100%; min-height:38px; background:var(--surface2); border:1px solid var(--line); border-radius:10px; padding:0 12px; color:var(--ink); cursor:pointer; font-size:0.9032rem; font-weight:600; }
.switch:hover { border-color:var(--accent); }
.switch:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.sw-label { margin-right:auto; }
.sw-track { width:34px; height:20px; border-radius:999px; background:var(--line); position:relative; flex:none; }
.sw-knob { position:absolute; top:2px; left:2px; width:16px; height:16px; border-radius:50%; background:var(--surface); box-shadow:0 0 0 1px var(--line); }
.switch[aria-checked="true"] .sw-track { background:var(--accent); }
.switch[aria-checked="true"] .sw-knob { left:16px; box-shadow:none; }
.sw-state { font-size:0.7742rem; font-weight:600; color:var(--ink3); min-width:22px; text-align:right; }
.switch[aria-checked="true"] .sw-state { color:var(--accent); }
.privline { font-size:0.7742rem; color:var(--ink3); margin:8px 2px 0; line-height:1.45; }
.navfoot { display:flex; flex-direction:column; gap:1px; }
.navitem.small { min-height:34px; font-size:0.871rem; }

.content { padding:34px 40px 60px; max-width:860px; width:100%; }
/* The content column: an optional team banner above the page itself. */
.maincol { min-width:0; }
/* A message from the Subtext team (set in /admin). Calm: no colour alarm, no
   motion, hideable for the visit. Lives outside <main> so a view redraw never
   drops it. */
.statusbanner {
  display:flex; align-items:baseline; gap:6px 14px; flex-wrap:wrap;
  max-width:780px; margin:20px 40px 0; padding:10px 16px; border-radius:12px;
  background:var(--wash); border:1px solid var(--line); color:var(--ink); font-size:0.9032rem; line-height:1.5;
}
.statusbanner[hidden] { display:none; }
.statusbanner p { margin:0; flex:1 1 260px; overflow-wrap:anywhere; }
.statusbanner .linkbtn { margin-left:0; font-size:0.871rem; }
/* Stands in for a "Turn on live AI" control while live AI is paused for everyone. */
.pausednote { font-weight:600; color:var(--ink2); }

/* ---------- mobile ---------- */
@media (max-width: 760px) {
  .shell { grid-template-columns:1fr; }
  .sidebar {
    position:sticky; height:auto; flex-direction:row; align-items:center;
    padding:10px 14px; gap:12px; border-right:none; border-bottom:1px solid var(--line);
    overflow-x:auto; z-index:20;
  }
  .logo span { display:none; }
  .modnav { flex-direction:row; overflow:visible; margin:0; padding:0; }
  .navitem { min-height:36px; padding:0 10px; white-space:nowrap; }
  .navitem .mi { display:none; }
  .navitem.active::before { left:10px; right:10px; top:auto; bottom:3px; width:auto; height:2px; }
  /* The mobile nav is a horizontal scroller, so a group heading has nothing
     to group — items just flow in the same order. */
  .navgroup { display:none; }
  /* On a phone, every screen states its own mode, so the bar keeps only the
     two footer links — never drop a destination. */
  .sidefoot { display:flex; flex-direction:row; margin:0; padding:0; border:0; gap:0; }
  .modeswitch { display:none; }
  .navfoot { flex-direction:row; }
  .content { padding:22px 18px 48px; }
  .statusbanner { margin:14px 18px 0; }
}

/* ---------- shared bits ---------- */
.sub { color:var(--ink2); font-size:0.9032rem; margin-top:0; }
.card { background:var(--surface); border:1px solid var(--line); border-radius:14px; padding:18px 20px; }
.cardlist { display:flex; flex-direction:column; gap:12px; margin-top:16px; }
.rowbtn {
  display:block; width:100%; text-align:left; background:var(--surface);
  border:1px solid var(--line); border-radius:14px; padding:16px 18px; color:var(--ink);
}
.rowbtn:hover { border-color:var(--accent); }
/* Anchor rows (field guides) must look identical to button rows. */
a.rowbtn { text-decoration:none; color:var(--ink); }
.rowbtn b { display:block; font-size:1rem; }
.rowbtn span { display:block; color:var(--ink2); font-size:0.871rem; margin-top:2px; }
.btn {
  display:inline-block; border:none; text-decoration:none; font-weight:600; font-size:0.9355rem;
  padding:11px 20px; border-radius:10px; background:var(--surface2); color:var(--ink);
}
.btn.primary { background:var(--accent); color:var(--accent-ink); }
.btn.primary:hover { background:var(--accent2); }
.btn.ghost { background:transparent; color:var(--accent); border:1.5px solid var(--accent); }
.btn:disabled { opacity:.5; cursor:default; }
.backlink { display:inline-block; color:var(--accent); text-decoration:none; font-size:0.9032rem; margin-bottom:14px; }
.backlink + .backlink { margin-left:18px; }
.lbl { display:block; font-size:0.7097rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--accent); margin-bottom:4px; }
.empty { color:var(--ink3); font-size:0.9032rem; padding:20px 0; }
textarea, input[type="text"] {
  width:100%; font:inherit; color:var(--ink); background:var(--surface);
  border:1.5px solid var(--line); border-radius:10px; padding:12px 14px; resize:vertical;
}
textarea:focus, input[type="text"]:focus { border-color:var(--accent); outline:none; }

/* ---------- home ---------- */
.modgrid { display:grid; grid-template-columns:repeat(auto-fill, minmax(230px, 1fr)); gap:14px; margin-top:20px; }
.modcard {
  text-align:left; background:var(--surface); border:1px solid var(--line); border-radius:14px;
  padding:20px; color:var(--ink); text-decoration:none; display:block;
}
.modcard:hover { border-color:var(--accent); }
.modcard .mi { width:38px; height:38px; border-radius:10px; background:var(--wash); color:var(--accent); display:flex; align-items:center; justify-content:center; margin-bottom:12px; }
.modcard .mi svg { width:20px; height:20px; }
.modcard b { font-size:1.032rem; }
.modcard p { color:var(--ink2); font-size:0.871rem; margin:4px 0 0; }

/* ---------- rehearse chat ---------- */
.framing { background:var(--wash); border:1px dashed var(--accent); border-radius:12px; padding:12px 16px; font-size:0.871rem; margin-bottom:16px; }
.chat { display:flex; flex-direction:column; gap:10px; margin:18px 0; }
.bubble { max-width:78%; padding:10px 14px; border-radius:16px; font-size:0.9355rem; white-space:pre-wrap; }
.bubble.them { background:var(--bubble-them); color:var(--ink); border-bottom-left-radius:5px; align-self:flex-start; }
/* --accent-ink, not #fff. Light: accent-ink IS #fff on the dark teal (5.82:1).
   Dark: the bubble is a brighter teal where white is only 3.28:1, and
   accent-ink flips to dark ink for 5.14:1. */
.bubble.me { background:var(--bubble-me); color:var(--accent-ink); border-bottom-right-radius:5px; align-self:flex-end; }
.bubble.thinking { color:var(--ink3); background:var(--bubble-them); font-style:italic; }
/* ---------- scenario map ---------- */
/* The map needs more room than the reading-width content column, so this one
   view opts out of the 860px cap. */
.content.wide { max-width:1500px; padding-left:24px; padding-right:24px; }
.maplayout { display:grid; grid-template-columns:minmax(0,1fr) 340px; gap:22px; align-items:start; }
@media (max-width:1100px) { .maplayout { grid-template-columns:1fr; } }
.mapcanvaswrap { background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:16px; overflow-x:auto; }
.maplegend { display:flex; flex-wrap:wrap; gap:16px; align-items:center; font-size:0.8065rem; color:var(--ink2); margin-bottom:14px; }
.maplegend i.sw { display:inline-block; width:11px; height:11px; border-radius:3px; margin-right:6px; vertical-align:-1px; border:1.5px solid var(--line); background:var(--bg); }
.maplegend i.sw.done { background:var(--accent); border-color:var(--accent); }
.maplegend i.sw.focus { background:var(--surface); border:2.5px solid var(--accent); }
.maplegend .hint { color:var(--ink3); margin-left:auto; }
.maplegend .lockleg { color:var(--ink3); }
.mapcanvas { position:relative; }
.mapedges { position:absolute; inset:0; overflow:visible; pointer-events:none; }
/* Solid line = this path is open, the node at its end can be practised now.
   Dashed = still waiting on the node before it. */
.edge .edgeline { fill:none; stroke:var(--line); stroke-width:2; }
.edge.locked .edgeline { stroke-dasharray:5 5; }
.edge.open .edgeline { stroke:var(--accent); opacity:.6; stroke-width:2.5; }
.edge .edgehit { fill:none; stroke:transparent; stroke-width:20; pointer-events:stroke; cursor:help; }
.edge:hover .edgeline { stroke:var(--accent); opacity:1; stroke-width:2.5; }
.bandlabel {
  position:absolute; left:0; display:flex; align-items:center; font-size:0.7097rem; font-weight:700;
  letter-spacing:.07em; text-transform:uppercase; color:var(--ink3); line-height:1.35;
}
.mapnode {
  position:absolute; text-align:left; border-radius:13px; padding:12px 13px; cursor:pointer;
  background:var(--bg); border:1.5px solid var(--line); color:var(--ink2);
  display:flex; flex-direction:column; gap:3px; overflow:hidden;
}
.mapnode .k { font-size:0.6129rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--ink3); }
.mapnode b {
  font-size:0.871rem; color:var(--ink); line-height:1.25;
  display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden;
}
.mapnode .s {
  font-size:0.7097rem; color:var(--ink3); line-height:1.35;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.mapnode .runs { margin-top:auto; font-size:0.6452rem; color:var(--ink3); }
.mapnode .runs.locked { color:var(--ink3); font-weight:600; }
.lockednote { margin-top:14px; background:var(--surface2); border-radius:12px; padding:14px 16px; }
.lockednote b { display:block; font-size:0.9032rem; color:var(--ink); margin-bottom:5px; }
.lockednote p { font-size:0.8065rem; color:var(--ink2); margin:0 0 12px; }
.mapnode:hover { border-color:var(--accent); }
.mapnode.done { background:var(--wash); border-color:color-mix(in srgb, var(--accent) 45%, transparent); }
.mapnode.done .k, .mapnode.done .chk { color:var(--accent); }
.mapnode.focus { background:var(--surface); border:2.5px solid var(--accent); box-shadow:0 0 0 4px var(--wash); }
.mapnode.focus .k { color:var(--accent); }
.mapnode.sel { outline:2px solid var(--accent); outline-offset:2px; }
.mappanel { display:flex; flex-direction:column; gap:16px; }
.mapdetail h2, .mapreport h2 { font-size:1.226rem; margin:6px 0 8px; }
.detailhead { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.statechip { font-size:0.6774rem; font-weight:700; letter-spacing:.05em; text-transform:uppercase; padding:3px 9px; border-radius:999px; background:var(--surface2); color:var(--ink3); }
.statechip.done { background:var(--wash); color:var(--accent); }
.statechip.focus { background:var(--accent); color:var(--accent-ink); }
.prereqnote { background:var(--surface2); border-radius:10px; padding:10px 12px; font-size:0.8065rem; color:var(--ink2); margin:10px 0; }
.detailtext { font-size:0.871rem; color:var(--ink2); margin:4px 0 12px; }
.donumbers { margin:6px 0 14px; padding-left:20px; }
.donumbers li { font-size:0.8387rem; line-height:1.5; margin:6px 0; color:var(--ink2); }
.donumbers li b { color:var(--accent); }
.scriptprev { display:flex; flex-direction:column; gap:7px; margin:6px 0 14px; }
.scriptprev .sp { font-size:0.8065rem; line-height:1.45; padding:9px 12px; border-radius:11px; }
.scriptprev .sp.them { background:var(--surface2); color:var(--ink); }
.scriptprev .sp.me { background:var(--wash); color:var(--ink); border:1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.winlist { margin:6px 0 0; padding-left:20px; }
.winlist li { font-size:0.8387rem; color:var(--ink2); margin:5px 0; }
.reportnums { display:flex; gap:10px; margin:10px 0 16px; }
.reportnums div { flex:1; background:var(--surface2); border-radius:11px; padding:12px 14px; }
.reportnums b { display:block; font-size:1.419rem; font-family:var(--font-sans); }
.reportnums span { font-size:0.7419rem; color:var(--ink3); }
.bandbar { margin:11px 0; }
.bandbarhead { display:flex; justify-content:space-between; font-size:0.8065rem; color:var(--ink2); margin-bottom:5px; }
.bandbarhead .of { color:var(--ink3); }
.bandbar .track { height:6px; border-radius:3px; background:var(--surface2); overflow:hidden; }
.bandbar .track i { display:block; height:100%; background:var(--accent); border-radius:3px; }
.srrow { display:flex; justify-content:space-between; gap:12px; font-size:0.8065rem; color:var(--ink2); margin:8px 0; }
.srrow b { color:var(--ink); white-space:nowrap; }
.selfreport { margin:16px 0; }
.srcheck { display:flex; gap:9px; align-items:flex-start; font-size:0.871rem; color:var(--ink); margin:9px 0; cursor:pointer; }
.srcheck input { margin-top:3px; accent-color:var(--accent); }

.guidesteps { margin:0 0 20px; padding-left:22px; }
.guidesteps li { margin:10px 0; font-size:0.9355rem; line-height:1.55; }
.guidesteps li b { color:var(--accent); }
.chiphint { font-size:0.8065rem; color:var(--ink3); margin:0 0 7px; }
.replychips { display:flex; flex-direction:column; gap:8px; margin-bottom:12px; }
.replychip {
  text-align:left; padding:11px 14px; border-radius:12px; font-size:0.871rem; line-height:1.45;
  border:1.5px solid var(--line); background:var(--surface); color:var(--ink); cursor:pointer;
}
.replychip:hover { border-color:var(--accent); }
.rowbtn b .tag {
  display:inline-block; font-size:0.6774rem; font-weight:700; letter-spacing:.05em; text-transform:uppercase;
  color:var(--accent); background:var(--wash); padding:2px 7px; border-radius:999px; vertical-align:middle; margin-left:6px;
}
.chatbar { display:flex; gap:10px; align-items:flex-end; }
.chatbar textarea { flex:1; min-height:44px; max-height:140px; }
.chatactions { display:flex; gap:10px; margin-top:14px; flex-wrap:wrap; }

/* ---------- debrief / decode cards ---------- */
.threecard { display:flex; flex-direction:column; gap:14px; margin-top:16px; }
.threecard .card p { margin:2px 0 0; font-size:0.9355rem; }
.threecard .card ul { margin:4px 0 0; padding-left:18px; font-size:0.9355rem; }
.threecard .card li { margin:4px 0; }

/* ---------- energy ---------- */
.loadpick { display:flex; flex-wrap:wrap; gap:8px; margin:10px 0 14px; } /* wraps: Calm now has 7 timer options */
.loadpick button {
  flex:1; padding:12px 0; border-radius:10px; border:1.5px solid var(--line);
  background:var(--surface); color:var(--ink); font-weight:600;
}
.loadpick button[aria-pressed="true"] { border-color:var(--accent); background:var(--wash); color:var(--accent); }
.weekbars { display:flex; align-items:flex-end; gap:10px; height:120px; margin:18px 0 6px; }
.weekbars .col { flex:1; display:flex; flex-direction:column; align-items:center; gap:6px; font-size:0.7419rem; color:var(--ink2); height:100%; justify-content:flex-end; }
.weekbars .bar { width:100%; border-radius:6px 6px 2px 2px; background:var(--accent); opacity:.85; min-height:4px; }
.weekbars .col.today { font-weight:700; color:var(--ink); }
.weekbars .col.today .bar { opacity:1; }
.masknote { background:var(--surface2); border-radius:10px; padding:12px 16px; font-size:0.871rem; color:var(--ink2); }

/* ---------- drills ---------- */
.drillline { font-family:var(--font-serif); font-size:1.226rem; font-weight:600; margin:8px 0 2px; }
.readings { display:flex; flex-direction:column; gap:10px; margin-top:14px; }
.reveal { margin-top:16px; }
.reveal .match { font-weight:600; color:var(--accent); }

/* ---------- progress feed ---------- */
.feed { display:flex; flex-direction:column; gap:12px; margin-top:16px; }
.feed .card .when { font-size:0.7742rem; color:var(--ink3); margin-top:6px; }

/* ---------- account ---------- */
.pwfield {
  width:100%; font:inherit; color:var(--ink); background:var(--surface);
  border:1.5px solid var(--line); border-radius:10px; padding:12px 14px;
}
.pwfield:focus { border-color:var(--accent); outline:none; }
.acctcard { margin-bottom:14px; }
.acctcard h3 { font-size:1.032rem; margin:0 0 4px; }
.acctemail { margin:2px 0 10px; font-weight:600; overflow-wrap:anywhere; }
.acctline { font-size:0.9032rem; color:var(--ink2); margin:4px 0 6px; line-height:1.5; }
.acctswitch { margin-top:12px; }
.acctswitch .quiet, .srcheck .quiet { color:var(--ink3); font-size:0.8387rem; }
.acctsub { margin-top:10px; padding-top:12px; border-top:1px solid var(--line); }
.acctmsg { font-size:0.871rem; color:var(--ink2); margin:8px 0 0; }
.acctmsg:empty { display:none; }
.acctnote { font-size:0.9032rem; color:var(--ink); background:var(--wash); border-radius:10px; padding:10px 14px; margin:0 0 14px; }
.forgotbox { margin-top:8px; padding-top:10px; border-top:1px solid var(--line); }

/* ---------- synced record: status line + "Your record" ----------
   Plain text, no icon, no colour for good/bad: where the record is, said once.
   An error only differs in weight, never in a warning colour. */
.syncstatus { font-size:0.8387rem; color:var(--ink2); margin:12px 0 0; line-height:1.5; }
.syncstatus a { color:var(--accent); font-weight:600; }
.syncstatus.is-error { color:var(--ink); font-weight:600; }
.record { margin:18px 0 6px; }
.record h2 { margin-bottom:10px; }
.recordnums { display:grid; grid-template-columns:repeat(auto-fit, minmax(150px, 1fr)); gap:10px; margin:0 0 16px; }
.recordnums div { background:var(--surface2); border-radius:11px; padding:10px 14px; }
.recordnums dt { font-size:0.8065rem; color:var(--ink2); }
.recordnums dd { margin:2px 0 0; font-size:1.161rem; font-weight:600; color:var(--ink); }
.packcounts { list-style:none; margin:2px 0 0; padding:0; display:grid; grid-template-columns:repeat(auto-fit, minmax(220px, 1fr)); column-gap:24px; }
.packcounts li { display:flex; justify-content:space-between; gap:12px; font-size:0.871rem; color:var(--ink2); padding:6px 0; border-bottom:1px solid var(--line); }
.packcounts li span:last-child { color:var(--ink); white-space:nowrap; }

/* ---------- crisis overlay ---------- */
.crisis-overlay {
  position:fixed; inset:0; background:var(--scrim); display:flex;
  align-items:center; justify-content:center; padding:20px; z-index:100;
}
.crisis-overlay[hidden] { display:none; }
.crisis-card { background:var(--surface); border-radius:16px; padding:26px 28px; max-width:480px; }
.crisis-card h2 { margin-top:0; }
.crisis-card ul { padding-left:20px; }

/* Live call room code — big, spaced, and selectable. */
.roomcode {
  font-size:2.194rem; letter-spacing:.22em; font-weight:700; margin:6px 0 2px;
  font-variant-numeric:tabular-nums; user-select:all; color:var(--ink);
}

/* Drill kind — names which reading skill this puzzle trains. */
.drillkind {
  display:inline-block; font-size:0.6774rem; font-weight:700; letter-spacing:.06em;
  text-transform:uppercase; color:var(--accent); background:var(--wash);
  padding:4px 10px; border-radius:999px; margin-bottom:10px;
}

/* ---- accessibility helpers ----
   .sronly labels inputs whose visible cue is only a placeholder — placeholders
   disappear on focus and aren't announced as names by every screen reader.
   The skip link is the keyboard escape from the module nav, which is long. */
.sronly {
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0;
}
.skiplink {
  position:absolute; left:8px; top:-56px; z-index:200;
  background:var(--accent); color:var(--accent-ink);
  padding:10px 16px; border-radius:0 0 10px 10px;
  text-decoration:none; font-weight:600; font-size:0.9355rem;
  transition:top .12s ease;
}
.skiplink:focus { top:0; }

/* ---------- what's new ---------- */
.rel { margin-bottom: 34px; }
.rel:last-of-type { margin-bottom: 18px; }
.relhead { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.relhead time { font-size: 0.8065rem; font-weight: 700; color: var(--ink2); letter-spacing: .02em; }
.relnow {
  font-size: 0.6774rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; background: var(--wash); color: var(--accent);
}
.rellede { color: var(--ink2); font-size: 0.9355rem; margin: 0 0 4px; }
.relitem b { display: flex; align-items: center; gap: 10px; font-size: 0.9677rem; }
.relitem p { margin: 6px 0 0; color: var(--ink2); font-size: 0.9032rem; }
/* Change type is state, so it carries its own colour rather than the accent. */
.relkind {
  font-size: 0.6452rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 5px; flex: none;
}
.relkind.new      { background: var(--wash); color: var(--accent); }
.relkind.improved { background: var(--surface2); color: var(--ink2); }
.relkind.fixed    { background: var(--amber-wash); color: var(--amber-ink); }

/* ---------- how it works ---------- */
.howstep b { display:flex; align-items:center; gap:11px; font-size:1rem; }
.hownum {
  display:inline-flex; align-items:center; justify-content:center;
  width:26px; height:26px; border-radius:999px; flex:none;
  background:var(--wash); color:var(--accent); font-size:0.8387rem; font-weight:700;
}
.howstep p { margin:8px 0 0; color:var(--ink2); font-size:0.9032rem; }
/* Each step links to the thing it describes, so the page is a way in rather
   than a description of one. */
.howlinks { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.howlinks .btn { padding:7px 13px; font-size:0.871rem; }

/* ---------- feedback ---------- */
#feedbackContact { margin-top: 10px; }
.fbitem { border-top: 1px solid var(--line); padding: 12px 0; }
.fbitem:first-of-type { border-top: 0; padding-top: 0; }
.fbhead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fbwhen { font-size: 0.7742rem; color: var(--ink3); }
.fbwhere {
  font-size: 0.7097rem; color: var(--accent); background: var(--wash);
  padding: 2px 8px; border-radius: 999px;
}
/* Status is the one control here, so it gets room to be tapped. */
.fbstatus {
  margin-left: auto; font: inherit; font-size: 0.871rem;
  color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: 8px; padding: 6px 10px;
}
.fbstatus:focus { border-color: var(--accent); outline: none; }
.fbtext { margin: 8px 0 0; font-size: 0.9355rem; white-space: pre-wrap; }
.fbcontact { margin: 6px 0 0; font-size: 0.8387rem; color: var(--ink2); }

/* ---------- rehearse: mode line + scene end ----------
   The sidebar mode badge is hidden under 760px, so on a phone this line is the
   only statement of whether replies are scripted. It sits right under the
   framing, before the first bubble. */
.modeline { font-size:0.8065rem; color:var(--ink3); margin:-6px 0 16px; line-height:1.5; }
.linkbtn {
  background:none; border:0; padding:0; margin-left:4px;
  color:var(--accent); font:inherit; font-weight:600; text-decoration:underline; cursor:pointer;
}
.sceneend {
  color:var(--ink2); font-size:0.871rem; background:var(--surface2);
  border-radius:12px; padding:12px 16px; margin:0;
}

/* ---------- hear it (synthetic voice examples) ---------- */
.hearcard { margin-top:14px; }
.hearrow { border-top:1px solid var(--line); padding:12px 0 4px; }
.hearrow:first-of-type { border-top:0; padding-top:4px; }
.hearline { font-size:0.9677rem; font-weight:600; margin-bottom:8px; }
.hearbtns { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.hearbtns .btn { padding:8px 14px; font-size:0.871rem; }
.hearnote { font-size:0.8387rem; color:var(--ink2); margin:8px 0 0; }

/* ---------- polish pass (bounded) ----------
   Beta feedback: "layout good, appearance only ok." Kept strictly inside the
   design guidelines — no palette or motion changes. Three things only: one
   card padding used everywhere, one header rhythm, and bubbles that breathe. */
.rowbtn, .modcard { padding:18px 20px; }
.modcard .mi { margin-bottom:14px; }
h1 { margin-bottom:6px; }
.sub { margin:0 0 18px; line-height:1.5; }
.bubble { max-width:72%; line-height:1.45; }
.empty { line-height:1.5; }
.cardlist { gap:12px; }

/* ===== call branch ===== */
/* Live call: the "needs a second person" note on the start screen, and the
   quiet note that appears after a long wait. Plain text, no box — a fact,
   not a warning. */
.callneeds, .callwait { color:var(--ink2); font-size:0.9032rem; line-height:1.5; margin:-8px 0 18px; }
.callneeds a, .callwait a { color:var(--accent); }
.callwait a { display:inline-block; margin-top:4px; }
/* ===== decode branch ===== */
/* Decode: the note that says what a card is (example vs. reading) sits at the
   top of the card, quieter than the reading itself. */
.decodenote { font-size:0.871rem; color:var(--ink2); line-height:1.5; margin:0 0 14px; padding-bottom:12px; border-bottom:1px solid var(--line); }
#decodeModeLine { margin:0 0 12px; }
.rowbtn .when { font-size:0.7742rem; color:var(--ink3); margin-top:6px; }
/* Scripts: an empty Saved section is one quiet line, not an empty box. */
.quietline { font-size:0.8387rem; color:var(--ink3); margin:8px 0 0; line-height:1.5; }
/* ===== home branch ===== */
/* Start-here card: one calm card above the module grid, not a hero. */
.starthere { margin:0 0 20px; }
.starthere p { margin:2px 0 0; font-size:0.9355rem; color:var(--ink2); }
.starthere-actions { display:flex; flex-wrap:wrap; align-items:center; gap:10px 14px; margin-top:12px; }
.starthere-quiet { color:var(--accent); font-size:0.9032rem; }
.starthere p.starthere-rest {
  margin-top:14px; padding-top:12px; border-top:1px solid var(--line); color:var(--ink2);
}
.starthere-rest a { color:var(--accent); }
/* Energy: today's saved value, and a readable 30-day log with notes. */
.energy-saved { font-size:0.871rem; color:var(--ink2); }
.energylog { display:flex; flex-direction:column; margin-top:10px; }
.energyrow {
  display:flex; flex-wrap:wrap; align-items:baseline; gap:2px 12px;
  padding:10px 0; border-top:1px solid var(--line);
}
.energyrow:first-child { border-top:0; padding-top:0; }
.energyday { font-weight:600; font-size:0.9032rem; min-width:120px; }
.energyload { font-size:0.871rem; color:var(--ink2); }
.energynote { flex-basis:100%; margin:2px 0 0; font-size:0.9032rem; color:var(--ink2); white-space:pre-wrap; }
/* Drills: kind chips. The selected one carries aria-current. */
.drillchips { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 16px; }
.drillchip {
  font-size:0.871rem; font-weight:600; text-decoration:none; color:var(--ink2);
  background:var(--surface); border:1.5px solid var(--line); border-radius:999px; padding:6px 13px;
}
.drillchip:hover { border-color:var(--accent); }
.drillchip[aria-current="true"] { border-color:var(--accent); background:var(--wash); color:var(--accent); }
/* Progress: feed items that link back to their module, and saved debriefs. */
a.feedlink { display:block; text-decoration:none; color:var(--ink); }
a.feedlink:hover { border-color:var(--accent); }
.debriefitem summary { cursor:pointer; list-style-position:outside; }
.debriefitem summary b { font-size:1rem; }
.debriefitem summary .when { display:block; }
.debrieftry { display:block; margin-top:10px; font-size:0.9355rem; color:var(--ink); }
.debriefbody { margin-top:14px; padding-top:12px; border-top:1px solid var(--line); }
.debriefbody ul { margin:4px 0 12px; padding-left:18px; font-size:0.9355rem; }
.debriefbody li { margin:4px 0; }
.debriefself { font-size:0.9032rem; color:var(--ink2); margin:0; }
/* Account: sign-in is the last, optional section. */
.signin-head { margin-top:30px; }
/* ===== map branch ===== */
/* Pack rows: the lock is stated where the tap happens. */
.rowbtn .lockcap { color:var(--ink3); font-size:0.8065rem; font-weight:600; margin-top:6px; }
/* Map detail on narrow screens: the panel stacks below the canvas, so a node
   tap scrolls it into view (clearing the sticky top bar) and it offers a way
   back up to the node. Hidden where the panel sits beside the canvas. */
.mapbacktomap { display:none; }
@media (max-width:1100px) {
  .mapdetail { scroll-margin-top:16px; }
  .mapbacktomap {
    display:inline-block; background:none; border:none; padding:0 0 10px; cursor:pointer;
    color:var(--accent); font-weight:600; font-size:0.8387rem;
  }
}
@media (max-width:760px) {
  .mapdetail { scroll-margin-top:76px; }
}
.mapdetail h2:focus:not(:focus-visible) { outline:none; }
/* The map is tall now that every scenario is on it: side by side, the panel
   stays in view while you move down the canvas. */
@media (min-width:1101px) {
  .mappanel { position:sticky; top:16px; max-height:calc(100vh - 32px); overflow-y:auto; }
}
/* ===== rehearse branch =====
   Rehearse root (mode line, "something real" row, continue row), the custom
   form, the chat's end note + "lines for this", and the debrief's next steps.
   Existing tokens only. */
.customrow { background:var(--wash); border:1px dashed var(--accent); }
.customrow:hover { border-style:solid; }
.packhead { margin-top:28px; }
.rehearsenote { margin:0 0 14px; }
.customform label { display:block; font-weight:600; font-size:0.9355rem; margin:16px 0 6px; }
.customform label .opt { font-weight:400; color:var(--ink3); font-size:0.8387rem; margin-left:4px; }
.customform .hint { font-size:0.8065rem; color:var(--ink3); margin:6px 0 0; }
.customform .formmsg { font-size:0.871rem; color:var(--ink2); margin:10px 0 0; min-height:1px; }
.customform .formmsg:empty { margin:0; }
.endnote { font-size:0.8065rem; color:var(--ink3); margin:8px 0 0; line-height:1.5; }
.endnote:empty { display:none; }
#retryWrap .endnote { margin:0 0 10px; }
.chatlines { font-size:0.8387rem; color:var(--ink2); margin:16px 0 0; line-height:1.5; }
.chatlines a { color:var(--accent); font-weight:600; }
.debriefmode { margin:-6px 0 6px; }
.readback { margin:4px 0 0; padding-left:20px; font-size:0.9355rem; }
.readback li { margin:4px 0; white-space:pre-wrap; }
.nextsteps { margin-top:22px; }
.nextsteps .cardlist { margin-top:6px; }

/* ===== How this works: visual walkthrough ===== */
.howthread { margin:4px 0 22px; font-size:0.9032rem; color:var(--ink2); }
.howthread .lbl { display:block; margin-bottom:3px; }
.howflow { list-style:none; margin:0; padding:0; }
.howmove { position:relative; display:grid; grid-template-columns:34px minmax(0,1fr) minmax(0,1fr); gap:0 18px; padding-bottom:30px; }
.howmove:last-child { padding-bottom:6px; }
/* The rail: a quiet line joining the three numbers, so the order is visible. */
.howmove:not(:last-child)::before { content:""; position:absolute; left:16px; top:38px; bottom:6px; width:2px; background:var(--line); }
.howmove .hownum { grid-column:1; grid-row:1 / span 2; width:34px; height:34px; font-size:0.9677rem; position:relative; z-index:1; background:var(--bg); border:2px solid var(--accent); }
.howfig { grid-column:2; align-self:start; margin:0; background:var(--surface2); border:1px solid var(--line); border-radius:14px; padding:16px; display:flex; flex-direction:column; gap:10px; min-width:0; }
.howtext { grid-column:3; min-width:0; }
.howtext h2 { font-size:1.161rem; margin:4px 0 6px; }
.howtext p { margin:0 0 8px; color:var(--ink2); font-size:0.9032rem; line-height:1.55; }
.howtext .howeg { background:var(--wash); color:var(--ink); border-radius:10px; padding:9px 12px; font-size:0.871rem; }
.howtext .howeg b { color:var(--accent); font-weight:700; }
@media (max-width: 760px) {
  .howmove { grid-template-columns:34px minmax(0,1fr); gap:12px 14px; }
  .howfig { grid-column:2; grid-row:1; }
  .howtext { grid-column:2; grid-row:2; }
}
.hf-lbl { display:block; font-size:0.7097rem; font-weight:700; letter-spacing:.07em; text-transform:uppercase; color:var(--ink3); margin-bottom:6px; }
.hf-bubble { max-width:86%; padding:8px 12px; border-radius:14px; font-size:0.871rem; line-height:1.4; }
.hf-bubble.them { background:var(--bubble-them); color:var(--ink); border-bottom-left-radius:4px; align-self:flex-start; }
.hf-bubble.me { background:var(--bubble-me); color:var(--accent-ink); border-bottom-right-radius:4px; align-self:flex-end; }
.hf-arrow { display:flex; align-items:center; gap:8px; font-size:0.7742rem; color:var(--ink3); padding-left:14px; }
.hf-arrow span { width:2px; height:18px; background:var(--accent); border-radius:2px; position:relative; }
.hf-arrow span::after { content:""; position:absolute; left:-4px; bottom:-2px; border:5px solid transparent; border-top-color:var(--accent); border-bottom:0; }
.hf-rule { background:var(--surface); border:1px solid var(--line); border-left:3px solid var(--accent); border-radius:10px; padding:10px 12px; }
.hf-row { display:grid; grid-template-columns:62px 1fr; gap:8px; font-size:0.871rem; line-height:1.45; padding:3px 0; }
.hf-row i { font-style:normal; font-size:0.7742rem; color:var(--ink3); padding-top:1px; }
.hf-row b { color:var(--accent); }
.hf-takes { display:flex; gap:6px; }
.hf-takes span { font-size:0.7419rem; color:var(--ink3); border:1px dashed var(--line); border-radius:999px; padding:2px 9px; }
.hf-chat { background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:10px 12px; display:flex; flex-direction:column; gap:7px; box-shadow:4px 4px 0 -1px var(--surface2), 4px 4px 0 0 var(--line), 8px 8px 0 -1px var(--surface2), 8px 8px 0 0 var(--line); margin:0 8px 8px 0; }
.hf-chips { display:flex; flex-wrap:wrap; gap:6px; margin-top:4px; }
.hf-chips span { font-size:0.7419rem; border:1px solid var(--line); border-radius:999px; padding:3px 9px; color:var(--ink2); background:var(--surface2); }
.hf-script { background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:10px 12px; font-size:0.9032rem; line-height:1.45; }
.hf-map, .hf-energy { background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:10px 12px; }
.hf-legend { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.hf-nodes { display:flex; flex-direction:column; align-items:flex-start; }
.hf-node { font-size:0.7742rem; line-height:1.3; border-radius:8px; padding:5px 8px; border:1.5px solid var(--line); color:var(--ink2); }
.hf-node.done { background:var(--accent); border-color:var(--accent); color:var(--accent-ink); }
.hf-node.next { border-color:var(--accent); color:var(--ink); background:var(--wash); }
.hf-node.todo { border-style:dashed; color:var(--ink3); }
.hf-edge { width:2px; height:10px; margin-left:16px; background:var(--accent); flex:none; }
.hf-edge.dashed { background:none; border-left:2px dashed var(--line); width:0; }
.hf-energy { display:flex; align-items:center; gap:10px; }
.hf-energy .hf-lbl { margin:0; }
.hf-dots { display:flex; gap:4px; }
.hf-dots i { width:14px; height:14px; border-radius:4px; background:var(--surface2); border:1px solid var(--line); }
.hf-dots i.on { background:var(--accent); border-color:var(--accent); }
.hf-note { font-size:0.7742rem; color:var(--ink3); }
.howwhy { margin-top:30px; }
.howprinciples { display:grid; grid-template-columns:repeat(auto-fit, minmax(240px, 1fr)); gap:12px; }
.howprinciples .card p { margin:10px 0 0; font-size:0.9032rem; color:var(--ink2); line-height:1.5; }
.hf-debrief { display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; }
.hf-debrief span { flex:1 1 90px; font-size:0.7742rem; line-height:1.3; background:var(--surface2); border:1px solid var(--line); border-radius:8px; padding:8px; color:var(--ink); }
.hf-legend { margin-top:6px; }
.howcta { margin-top:22px; display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.howcta .empty { flex-basis:100%; padding:0; margin:0 0 4px; }

/* ===== How this works: whole-app map + per-part detail ===== */
.howjump { display:flex; flex-wrap:wrap; gap:6px; margin:6px 0 8px; }
.howjump button { font:inherit; font-size:0.8387rem; background:var(--surface); border:1px solid var(--line); color:var(--ink2); border-radius:999px; padding:6px 12px; cursor:pointer; min-height:32px; }
.howjump button:hover { border-color:var(--accent); color:var(--ink); }
.howsec { padding-top:26px; scroll-margin-top:16px; }
.howsec > h2 { font-size:1.29rem; margin:0 0 4px; }
.sysmap { display:grid; grid-template-columns:minmax(0,1fr) 22px minmax(0,1fr) 22px minmax(0,1fr); align-items:start; margin-top:10px; }
.sm-col { display:flex; flex-direction:column; gap:8px; min-width:0; }
.sm-head { display:flex; gap:10px; align-items:flex-start; padding:4px 2px 6px; }
.sm-head b { display:block; font-size:0.9677rem; }
.sm-head span span { display:block; font-size:0.8065rem; color:var(--ink2); line-height:1.35; }
.sm-head .hownum { width:28px; height:28px; font-size:0.8387rem; }
.sm-arrow { align-self:center; justify-self:center; width:0; height:0; border:7px solid transparent; border-left:9px solid var(--accent); border-right:0; margin-top:-40px; }
.howtile { font:inherit; text-align:left; display:flex; gap:10px; align-items:flex-start; background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:10px 12px; cursor:pointer; color:var(--ink); width:100%; }
.howtile:hover { border-color:var(--accent); }
.howtile .mi { flex:none; width:30px; height:30px; border-radius:8px; background:var(--wash); color:var(--accent); display:flex; align-items:center; justify-content:center; }
.howtile .mi svg { width:17px; height:17px; }
.ht-body { min-width:0; }
.ht-body b { display:block; font-size:0.9032rem; }
.ht-body > span { display:block; font-size:0.8065rem; color:var(--ink2); line-height:1.4; margin-top:1px; }
.ht-body .ht-leads { color:var(--accent); font-weight:600; margin-top:4px; }
.sm-loop { display:flex; gap:10px; align-items:flex-start; margin:14px 0 0; background:var(--wash); border-radius:12px; padding:11px 14px; font-size:0.871rem; line-height:1.5; }
.sm-loop > span:first-child { color:var(--accent); font-size:1.161rem; line-height:1.1; }
.sm-around { margin-top:14px; }
.sm-around-row { display:grid; grid-template-columns:repeat(auto-fit, minmax(220px, 1fr)); gap:8px; }
@media (max-width: 760px) {
  .sysmap { grid-template-columns:minmax(0,1fr); gap:6px; }
  .sm-arrow { margin:2px 0 0 18px; justify-self:start; border:7px solid transparent; border-top:9px solid var(--accent); border-bottom:0; }
}
.howmodes { display:grid; grid-template-columns:repeat(auto-fit, minmax(250px, 1fr)); gap:12px; margin-top:10px; }
.hm-card ul { margin:4px 0 0; padding-left:18px; font-size:0.9032rem; line-height:1.5; color:var(--ink); }
.hm-card li { margin:3px 0; }
.hm-privacy { margin:10px 0 0; padding-top:10px; border-top:1px solid var(--line); font-size:0.8387rem; color:var(--ink2); }
.howtext h3 { font-size:1.097rem; margin:4px 0 6px; }
.hp-group { margin-top:16px; }
.hp-group > h3 { display:flex; align-items:center; gap:9px; font-size:0.9677rem; margin:0 0 8px; }
.hp-group > h3 .hownum { width:26px; height:26px; font-size:0.8065rem; }
.howpart { background:var(--surface); border:1px solid var(--line); border-radius:12px; margin-bottom:8px; scroll-margin-top:16px; }
.howpart > summary { list-style:none; display:flex; gap:10px; align-items:center; padding:11px 14px; cursor:pointer; border-radius:12px; }
.howpart > summary::-webkit-details-marker { display:none; }
.howpart > summary::after { content:"+"; margin-left:auto; color:var(--ink3); font-size:1.161rem; line-height:1; }
.howpart[open] > summary::after { content:"−"; }
.howpart > summary .mi { flex:none; width:30px; height:30px; border-radius:8px; background:var(--wash); color:var(--accent); display:flex; align-items:center; justify-content:center; }
.howpart > summary .mi svg { width:17px; height:17px; }
.howpart > summary b { display:block; font-size:0.9355rem; }
.hp-line { display:block; font-size:0.8065rem; color:var(--ink2); }
.howpart > *:not(summary) { margin-left:14px; margin-right:14px; }
.howpart > .btn { margin-bottom:14px; display:inline-block; }
.hp-flow { display:grid; grid-template-columns:minmax(0,1fr) 16px minmax(0,1fr) 16px minmax(0,1fr); align-items:stretch; gap:0 4px; margin-top:4px; }
.hp-step { background:var(--surface2); border:1px solid var(--line); border-radius:10px; padding:10px 12px; font-size:0.871rem; line-height:1.45; min-width:0; }
.hp-step ul { margin:0; padding-left:16px; }
.hp-step li { margin:2px 0; }
.hp-where { display:inline-block; font-size:0.7097rem; color:var(--ink3); border:1px solid var(--line); border-radius:999px; padding:0 7px; margin-left:2px; }
.hp-arrow { align-self:center; justify-self:center; width:0; height:0; border:6px solid transparent; border-left:8px solid var(--accent); border-right:0; }
.hp-flow:not(:has(.hp-step:nth-of-type(3))) { grid-template-columns:minmax(0,1fr) 16px minmax(0,1fr); }
.hp-stored { font-size:0.8387rem; color:var(--ink2); margin:10px 14px 12px; line-height:1.45; }
.hp-stored .hf-lbl { display:inline; margin-right:8px; }
@media (max-width: 760px) {
  .hp-flow, .hp-flow:not(:has(.hp-step:nth-of-type(3))) { grid-template-columns:minmax(0,1fr); gap:4px; }
  .hp-arrow { justify-self:start; margin-left:16px; border:6px solid transparent; border-top:8px solid var(--accent); border-bottom:0; }
}

/* ===== user survey ===== */
.sv-facts { display:grid; gap:12px; }
.sv-facts > div { font-size:0.9355rem; line-height:1.5; }
.sv-facts .lbl { display:block; margin-bottom:2px; }
.sv-note { background:var(--wash); border-radius:10px; padding:10px 14px; font-size:0.9032rem; margin:0 0 14px; }
.sv-step { font-size:0.8065rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--accent); margin:0 0 4px; }
.sq { border:1px solid var(--line); background:var(--surface); border-radius:12px; padding:14px 16px 12px; margin:0 0 12px; min-width:0; }
.sq-text { display:block; font-weight:600; font-size:1rem; line-height:1.4; margin:0 0 10px; padding:0; color:var(--ink); }
legend.sq-text { float:left; width:100%; }
legend.sq-text + * { clear:both; }
.sq-opts { display:flex; flex-direction:column; gap:6px; }
.sq-opt { display:flex; align-items:flex-start; gap:10px; padding:9px 11px; border:1px solid var(--line); border-radius:9px; cursor:pointer; font-size:0.9355rem; line-height:1.4; background:var(--bg); }
.sq-opt:hover { border-color:var(--accent); }
.sq-opt input { margin:2px 0 0; width:18px; height:18px; accent-color:var(--accent); flex:none; }
.sq-opt:has(input:checked) { border-color:var(--accent); background:var(--wash); }
.sq-opt:has(input:focus-visible) { outline:2px solid var(--accent); outline-offset:2px; }
.sq-opts.scale .sq-opt b { display:inline-block; min-width:16px; color:var(--accent); }
.sq textarea, .sq input[type=email] { width:100%; }
.sq-money { display:inline-flex; align-items:center; gap:6px; }
.sq-money input { width:120px; }
.sq-per { font-size:0.871rem; color:var(--ink2); }
.sq-hint { font-size:0.8387rem; color:var(--ink3); margin:6px 0 0; }
.sv-err { min-height:1.2em; font-size:0.9032rem; color:var(--ink2); margin:4px 0 0; }
.sv-nav { justify-content:space-between; }
.sv-invite p { margin:4px 0 12px; font-size:0.9355rem; color:var(--ink2); }
.sr-h { margin-top:28px; }
.sr-gates { display:grid; grid-template-columns:repeat(auto-fit, minmax(210px, 1fr)); gap:10px; margin-top:8px; }
.sr-gate { display:flex; flex-direction:column; gap:3px; border-left:3px solid var(--line); }
.sr-gate.pass { border-left-color:var(--accent); }
.sr-gate.miss { border-left-color:var(--amber-ink); }
.sr-gate b { font-size:0.9032rem; line-height:1.35; }
.sr-state { font-size:0.7097rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--ink3); }
.sr-gate.pass .sr-state { color:var(--accent); }
.sr-gate.miss .sr-state { color:var(--amber-ink); }
.sr-big { font-size:1.548rem; font-weight:700; margin-top:4px; }
.sr-n { font-size:0.8065rem; color:var(--ink3); }
.sr-src { font-size:0.7742rem; color:var(--ink2); margin-top:4px; }
.sr-part { margin:22px 0 8px; font-size:1.032rem; }
.sr-q { background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:12px 14px; margin-bottom:10px; }
.sr-q > b { display:block; font-size:0.9032rem; margin-bottom:2px; }
.sr-row { display:grid; grid-template-columns:minmax(0,1fr) 120px 70px; gap:10px; align-items:center; font-size:0.8387rem; padding:3px 0; }
.sr-bar { height:8px; background:var(--surface2); border-radius:4px; overflow:hidden; }
.sr-bar i { display:block; height:100%; background:var(--accent); border-radius:4px; }
.sr-val { text-align:right; color:var(--ink2); font-variant-numeric:tabular-nums; }
.sr-texts { margin-bottom:10px; }
.sr-texts summary { cursor:pointer; }
.sr-texts ul { margin:10px 0 0; padding-left:18px; font-size:0.9032rem; line-height:1.5; }
.sr-texts li { margin:6px 0; }
.sr-contacts { font-size:0.9032rem; }
@media (max-width: 760px) { .sr-row { grid-template-columns:minmax(0,1fr) 70px; } .sr-bar { display:none; } }

/* ---------- account-only live AI, the allowance, and where work is kept ----------
   Plain lines in context: no box, no icon, no warning colour, no bar. */
.inlinelink { color:var(--accent); font-weight:600; }
.privline .inlinelink { font-weight:600; }
.ailine { margin-top:6px; color:var(--ink2); }
.keptline { margin-top:6px; }
.keptnote { font-size:0.8387rem; color:var(--ink2); line-height:1.5; margin:12px 0 0; }
.starthere .keptnote.starthere-kept { margin-top:14px; padding-top:12px; border-top:1px solid var(--line); font-size:0.8387rem; color:var(--ink2); }
.keptnote.debriefkept { margin:12px 0 4px; }
.allowline { font-size:0.9032rem; color:var(--ink); margin:12px 0 0; }
.allowline[hidden] { display:none; }
#aiSettingsCard .quietline { margin-top:8px; }
.signin-head:focus { outline:none; }

/* ---------- "After the first rehearsal" pulse ----------
   A small inline card under the first debrief. Same option rows as the
   survey, just flatter: no box inside the box. */
.pulse { margin-top:22px; }
.pulse h2 { font-size:1.097rem; margin:0 0 4px; }
.pulse-intro { font-size:0.9032rem; color:var(--ink2); margin:0 0 12px; }
.pulse .sq.pulse-q { border:0; background:none; padding:0; margin:0 0 14px; }
.pulse .sq-text { font-size:0.9355rem; margin-bottom:8px; }
.pulse textarea { min-height:64px; }
.pulse-msg { font-size:0.9032rem; color:var(--ink2); margin:0; min-height:0; }
.pulse-msg:empty { display:none; }
.pulse-fine { font-size:0.8065rem; color:var(--ink3); margin:8px 0 0; }
.pulse-done { font-size:0.9355rem; color:var(--ink); background:var(--wash); border-radius:10px; padding:10px 14px; margin:22px 0 0; }

/* ===== in-app choice dialog (replaces the browser's confirm box) ===== */
.choicedlg { border:1px solid var(--line); border-radius:16px; background:var(--surface); color:var(--ink);
  padding:22px 22px 18px; width:min(460px, calc(100vw - 32px)); box-shadow:0 18px 50px rgba(0,0,0,.18); }
.choicedlg::backdrop { background:var(--scrim); }
.choicedlg .lbl { margin:0 0 6px; }
.choicedlg h2 { font-size:1.226rem; line-height:1.3; margin:0 0 8px; text-wrap:balance; }
.choicedlg p#choiceDlgBody { margin:0 0 18px; color:var(--ink2); font-size:0.9355rem; line-height:1.55; }
.choicedlg-actions { display:flex; flex-direction:column; gap:10px; align-items:stretch; }
.choicedlg-btn { display:flex; flex-direction:column; align-items:flex-start; gap:2px; text-align:left; width:100%; padding:12px 14px; min-height:48px; }
.choicedlg-btn span { font-weight:600; }
.choicedlg-btn small { font-size:0.8065rem; font-weight:400; color:var(--ink2); line-height:1.4; }
.choicedlg-btn.primary small { color:inherit; opacity:.9; }
.choicedlg-cancel { align-self:center; margin-top:2px; padding:8px 12px; min-height:36px; }
.choicedlg-btn:focus-visible, .choicedlg-cancel:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
/* No entrance animation: the design guidelines rule out decorative motion. */

/* ===== shared look with the marketing site =====
   Page headings in Charter, like the marketing site and the iPhone app;
   everything you click or scan stays in the system sans. */
.content h1, .content h2 { font-family:var(--font-serif); letter-spacing:-.01em; }
.content h1 { font-size:1.806rem; line-height:1.15; }

/* ===== signing in: the sidebar entry and the Account card ===== */
.authentry:empty { display:none; }
.authbtn { display:flex; justify-content:center; width:100%; background:var(--accent); color:var(--accent-ink); text-align:center; padding:10px 12px; font-size:0.9032rem; }
.authbtn:hover { background:var(--accent2); }
.authbtn .authshort { display:none; }
.authwho { display:block; padding:6px 12px; font-size:0.8387rem; color:var(--ink2); text-decoration:none; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; border-radius:var(--radius-btn); }
.authwho::before { content:"Signed in · "; color:var(--ink3); }
.authwho:hover { background:var(--surface2); color:var(--ink); }
.authbtn:focus-visible, .authwho:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
@media (max-width: 760px) {
  .authentry { flex:none; }
  .sidebar .authbtn { width:auto; padding:8px 14px; }
  .authbtn .authlong { display:none; }
  .authbtn .authshort { display:inline; }
  .authwho { max-width:150px; }
  .authwho::before { content:""; }
}
.authcard { max-width:520px; padding:22px 22px 18px; margin:6px 0 14px; }
.authcard .authtitle { font-size:1.419rem; margin:0 0 12px; }
.authtabs { display:grid; grid-template-columns:1fr 1fr; gap:4px; background:var(--surface2); border-radius:var(--radius-btn); padding:4px; margin:0 0 16px; }
.authtabs [role=tab] { font:inherit; font-weight:600; font-size:0.9355rem; border:0; border-radius:8px; padding:9px 10px; min-height:40px; background:transparent; color:var(--ink2); cursor:pointer; }
.authtabs [role=tab][aria-selected="true"] { background:var(--surface); color:var(--ink); box-shadow:0 0 0 1px var(--line); }
.authtabs [role=tab]:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }
.authgoogle { min-height:44px; }
.author { display:flex; align-items:center; gap:10px; margin:14px 0; color:var(--ink3); font-size:0.8387rem; }
.author::before, .author::after { content:""; flex:1; height:1px; background:var(--line); }
#authForm { display:flex; flex-direction:column; gap:6px; }
#authForm input[type=email], #authForm input[type=password] { width:100%; margin-bottom:6px; }
.authsubmit { margin-top:8px; width:100%; padding:12px 16px; font-size:0.9677rem; }
.authsmall { margin:0 0 4px; }
.authswitch { margin:12px 0 0; font-size:0.9032rem; color:var(--ink2); }
.authswitch .linkbtn { margin-left:2px; }
.authwhy { max-width:520px; margin-bottom:22px; }
.authwhy summary { cursor:pointer; font-weight:600; font-size:0.9355rem; }
.authwhy p { margin:10px 0 0; font-size:0.9032rem; color:var(--ink2); line-height:1.55; }
.acctsection { font-size:1.29rem; margin:8px 0 10px; }

/* ===================================================================
   Design F · made for them (Oct 2026)
   Comfort first (Look and Text in the top bar), plain "what to expect"
   tags, a record that reads like a collection, Atkinson Hyperlegible for
   everything you read at a glance, Charter for headings. Sizes are rem, so
   the Text setting scales the whole page. Sentence case everywhere: all
   capitals are harder to read, and this audience reads closely.
   =================================================================== */
html { font-size:17px; }
html[data-text="s"] { font-size:15.5px; }
html[data-text="l"] { font-size:19.5px; }
body { line-height:1.6; }
:focus-visible { outline:3px solid var(--focus); outline-offset:2px; }

/* ---- top bar: logo, comfort controls, account ---- */
.topbar {
  position:sticky; top:0; z-index:30; display:flex; align-items:center; flex-wrap:wrap; gap:10px 18px;
  padding:10px 22px; background:var(--surface); border-bottom:1px solid var(--line);
}
.topbar .logo { padding:0; font-size:1.1rem; }
.topbar .logo svg { width:28px; height:28px; }
.comfortbar { display:flex; align-items:center; flex-wrap:wrap; gap:8px 16px; margin-left:auto; }
.comforttoggle { display:none; }
.seggroup { display:flex; align-items:center; gap:8px; }
.seglabel { font-size:.82rem; color:var(--ink2); }
.seg { display:flex; gap:2px; padding:3px; border-radius:var(--radius-btn); background:var(--chip); border:1px solid var(--line-strong); }
.segbtn {
  font:inherit; font-size:.85rem; min-height:36px; min-width:36px; padding:0 11px; border:0; border-radius:9px;
  background:transparent; color:var(--ink); cursor:pointer;
}
.segbtn:hover { background:var(--surface2); }
.segbtn[aria-pressed="true"] { background:var(--accent); color:var(--accent-ink); font-weight:700; }
.segbtn.segA { font-weight:700; padding:0 9px; }
.statuschips { display:flex; gap:6px; }
.statuschip {
  font-size:.8rem; color:var(--ink2); text-decoration:none; padding:5px 11px; border-radius:999px;
  border:1px solid var(--line-strong); background:var(--surface);
}
a.statuschip:hover { color:var(--ink); border-color:var(--accent); }
.topbar .authentry { flex:none; }
.topbar .authbtn { width:auto; padding:9px 16px; min-height:40px; }
.topbar .authwho { max-width:220px; }

/* ---- side menu under the top bar ---- */
.sidebar { top:var(--topbar-h, 61px); height:calc(100vh - var(--topbar-h, 61px)); padding-top:14px; }
.navitem { min-height:42px; font-size:.95rem; border-radius:10px; }
.navgroup { font-size:.82rem; font-weight:700; letter-spacing:0; text-transform:none; color:var(--ink2); padding:16px 12px 5px; }
.navnum { border-color:var(--line-strong); }

/* ---- shapes ---- */
.btn { display:inline-flex; align-items:center; justify-content:center; min-height:44px; border-radius:var(--radius-btn); padding:10px 20px; }
.btn:not(.primary):not(.ghost):not(.authbtn) { border:1px solid var(--line-strong); background:var(--chip); }
.card, .rowbtn, .modcard, .sq, .sr-q, .howpart, .mapcanvaswrap { border-radius:var(--radius-card); }
textarea, input[type="text"], input[type="email"], input[type="password"], .pwfield, select { border-color:var(--line-strong); border-radius:var(--radius-btn); }
.replychip, .sq-opt, .loadpick button { border-color:var(--line-strong); }
.content { max-width:880px; }
.content h1 { font-size:2rem; }
.content h2 { font-size:1.3rem; }

/* Labels and pills: sentence case, readable size, no letter-spacing. */
.lbl, .statechip, .drillkind, .relnow, .relkind, .sv-step, .sr-state, .mapnode .k, .hf-lbl, .bandlabel, .rowbtn b .tag {
  text-transform:none; letter-spacing:0;
}
.lbl { font-size:.85rem; }
.statechip, .relnow, .relkind, .drillkind { font-size:.78rem; border-radius:var(--radius-chip); }
.mapnode .k { font-size:.72rem; }
.bandlabel, .hf-lbl, .sv-step, .sr-state { font-size:.8rem; }

/* ---- what to expect: scene tags ---- */
.scenetags { display:flex; flex-wrap:wrap; gap:6px; margin:12px 0 2px; }
.rowbtn .scenetags { margin:8px 0 0; }
.rowbtn span.scenetags { display:flex; color:var(--ink2); }
.stag {
  display:inline-block; font-size:.8rem; line-height:1.4; padding:3px 10px; border-radius:var(--radius-chip);
  background:var(--chip); border:1px solid var(--line); color:var(--ink);
}
.rowbtn .stag { display:inline-block; margin:0; font-size:.78rem; color:var(--ink); }

/* ---- Home ---- */
.content.homewide { max-width:1200px; }
.homegrid { display:flex; flex-wrap:wrap; gap:26px; align-items:flex-start; }
.homemain { flex:999 1 560px; min-width:0; display:flex; flex-direction:column; gap:30px; }
.homeside { flex:1 1 280px; min-width:0; display:flex; flex-direction:column; gap:18px; }
.homemain > section > h2, .homeside h2 { margin:0 0 10px; }
.nextcard { padding:24px 26px; }
.nextlast { margin:0 0 4px; color:var(--ink2); font-size:.92rem; }
.nextcard .nexttitle { font-size:2rem; line-height:1.2; margin:4px 0 6px; }
.nextwhat { margin:0; color:var(--ink2); }
.nextactions { display:flex; flex-wrap:wrap; align-items:center; gap:10px 12px; margin-top:16px; }
.nextactions .btn.primary { min-height:48px; padding:0 22px; }
.linkish { color:var(--link); font-weight:600; padding:10px 4px; }
.nextheavy { margin:14px 0 0; padding-top:12px; border-top:1px solid var(--line); color:var(--ink2); }
.interestgrid { display:grid; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); gap:12px; }
.interest {
  display:flex; flex-direction:column; gap:4px; padding:16px 18px; border-radius:var(--radius-card);
  border:1px solid var(--line); background:var(--surface); color:var(--ink); text-decoration:none;
}
.interest:hover { border-color:var(--accent); }
.interest-icon { color:var(--accent); width:28px; height:28px; display:flex; }
.interest-icon svg { width:26px; height:26px; }
.interest b { font-size:1.02rem; margin-top:4px; }
.interest-what { font-size:.88rem; color:var(--ink2); line-height:1.45; }
.interest-record { font-size:.82rem; color:var(--ink2); margin-top:auto; padding-top:6px; }
.toolrow { display:flex; flex-wrap:wrap; gap:8px; }
.toolchip {
  display:inline-flex; align-items:center; gap:8px; min-height:44px; padding:0 14px; border-radius:var(--radius-btn);
  border:1px solid var(--line-strong); background:var(--surface); color:var(--ink); text-decoration:none; font-size:.92rem;
}
.toolchip:hover { border-color:var(--accent); }
.toolchip .mi { width:18px; height:18px; display:flex; color:var(--accent); }
.toolchip .mi svg { width:18px; height:18px; }
.recordchips { list-style:none; margin:10px 0 8px; padding:0; display:flex; flex-wrap:wrap; gap:6px; }
.recordchips li { font-size:.82rem; padding:4px 10px; border-radius:999px; background:var(--wash); color:var(--ink); }
.recordline { font-size:.88rem; color:var(--ink2); margin:6px 0 8px; }
.homeload { margin:10px 0 4px; }
.loadends { display:flex; justify-content:space-between; font-size:.82rem; color:var(--ink2); }
.loadpick button { min-height:44px; }
.loadpick button[aria-pressed="true"] { background:var(--accent); color:var(--accent-ink); border-color:var(--accent); }
.homeside .keptnote { margin:0; }

/* ---- phones ---- */
@media (max-width: 760px) {
  .topbar { position:static; padding:10px 16px; gap:10px; }
  .topbar .logo span { display:inline; }
  .comforttoggle {
    display:inline-flex; align-items:center; margin-left:auto; min-height:40px; padding:0 12px;
    border-radius:var(--radius-btn); border:1px solid var(--line-strong); background:var(--chip); color:var(--ink); font-size:.88rem;
  }
  .comfortbar { display:none; order:5; flex-basis:100%; margin:0; padding:8px 0 2px; gap:10px 14px; }
  .topbar.comfort-open .comfortbar { display:flex; }
  .sidebar { top:0; height:auto; padding-top:10px; }
  .content.homewide { max-width:none; }
  .nextcard { padding:18px; }
  .nextcard .nexttitle { font-size:1.6rem; }
}

/* ---- Account: jump list + five numbered sections ---- */
.acctlayout { display:flex; flex-wrap:wrap; gap:24px; align-items:flex-start; margin-top:8px; }
.acctjump { flex:1 1 170px; max-width:200px; position:sticky; top:calc(var(--topbar-h, 61px) + 16px); display:flex; flex-direction:column; gap:2px; }
.acctjump-lbl { font-size:.8rem; color:var(--ink2); padding:0 10px 6px; }
.acctjump button { font:inherit; font-size:.92rem; text-align:left; min-height:40px; padding:0 10px; border:0; border-radius:10px; background:transparent; color:var(--ink); cursor:pointer; }
.acctjump button:hover { background:var(--surface2); }
.acctmain { flex:999 1 480px; min-width:0; display:flex; flex-direction:column; gap:26px; }
.acctsec { scroll-margin-top:calc(var(--topbar-h, 61px) + 12px); }
.acctsec-h { font-size:1.3rem; margin:0 0 10px; }
.acctsec-h:focus:not(:focus-visible) { outline:none; }
.acctsec .card { margin-bottom:12px; }
.acctpair { display:grid; grid-template-columns:repeat(auto-fit, minmax(260px, 1fr)); gap:12px; align-items:start; }
.acctpair .card { margin:0 !important; }
.comfortslot { display:flex; flex-wrap:wrap; gap:12px 22px; }
@media (max-width: 760px) {
  .acctjump { position:static; max-width:none; flex-direction:row; flex-wrap:wrap; gap:6px; }
  .acctjump-lbl { flex-basis:100%; padding:0; }
  .acctjump button { border:1px solid var(--line-strong); background:var(--surface); min-height:40px; }
  .acctsec { scroll-margin-top:12px; }
}

/* Tap targets: standalone links and toggles get a 44px row. */
.backlink { display:inline-flex; align-items:center; min-height:44px; margin-bottom:6px; }
.authswitch .linkbtn, #forgotBtn { display:inline-flex; align-items:center; min-height:44px; }
details:not(.howpart) > summary { min-height:44px; padding-block:10px; }
input[type="range"] { min-height:32px; }

/* ---- Simpler pass (Oct 2026): one Look & text button, quieter tags ---- */
/* The top bar is the logo, one "Look & text" button, Calm Sound while it
   plays, and sign-in. The controls open in a small panel under the button. */
.comforttoggle {
  display:inline-flex; align-items:center; margin-left:auto; min-height:40px; padding:0 14px;
  border-radius:var(--radius-btn); border:1px solid var(--line-strong); background:var(--chip); color:var(--ink);
  font:inherit; font-size:.9rem; cursor:pointer;
}
.comforttoggle[aria-expanded="true"] { border-color:var(--accent); }
.comfortbar {
  display:none; position:absolute; right:22px; top:calc(100% + 6px); z-index:40;
  flex-direction:column; align-items:flex-start; gap:12px; margin:0; padding:16px 18px;
  background:var(--surface); border:1px solid var(--line-strong); border-radius:var(--radius-card);
  box-shadow:0 12px 32px rgba(0,0,0,.14);
}
.topbar.comfort-open .comfortbar { display:flex; }
.comfortbar .seggroup { flex-direction:column; align-items:flex-start; gap:6px; }
.soundchip {
  display:inline-flex; align-items:center; min-height:40px; padding:0 12px; border-radius:var(--radius-btn);
  color:var(--link); font-size:.9rem; font-weight:700;
}
.soundchip[hidden] { display:none; }
/* What to expect: plain text with dots between, not a row of outlined boxes. */
.scenetags { gap:0; color:var(--ink2); }
.stag, .rowbtn .stag { padding:0; border:0; background:none; border-radius:0; font-size:.9rem; color:var(--ink2); }
.rowbtn .stag { font-size:.82rem; }
/* The dot trails each tag, so a wrapped line never starts with one. */
.stag { white-space:nowrap; }
.stag:not(:last-child)::after { content:"·"; margin:0 .5em; color:var(--ink3); }
/* Home */
.nextlast { font-size:.95rem; }
.nextactions { gap:6px 18px; }
.seeall { margin:12px 0 0; }
.homeprivacy { margin:0; }
.homeside .loadpick + .loadends { margin-bottom:2px; }
@media (max-width: 760px) {
  .comfortbar { position:static; flex-basis:100%; order:5; padding:12px 0 4px; border:0; box-shadow:none; background:none; flex-direction:row; flex-wrap:wrap; }
}
