:root {
  color-scheme: dark;
  --bg: #16181d; --panel: #1d2027; --panel2: #23262e; --line: #2e323b; --fg: #e6e8ec; --muted: #8b919c;
  --accent: #5b8cff; --ok: #3fb97a; --bad: #f0616d; --warn: #e5a54b;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--fg); font: 14px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
button { font: inherit; color: var(--fg); background: var(--panel2); border: 1px solid var(--line); border-radius: 6px; padding: 6px 12px; cursor: pointer; }
button:hover:not(:disabled) { border-color: var(--muted); }
button:disabled { opacity: .45; cursor: default; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.go { background: var(--ok); border-color: var(--ok); color: #fff; }
.muted { color: var(--muted); }
.center { min-height: 100%; display: grid; place-items: center; padding: max(24px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 20px; }
.narrow { width: min(560px, 100%); }
h1 { font-size: 22px; margin: 0 0 6px; } h2 { font-size: 15px; margin: 0 0 8px; }
input.code { font: 600 24px var(--mono); letter-spacing: .25em; text-align: center; text-transform: uppercase; width: 100%; padding: 10px; background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 8px; margin: 12px 0; }
.err { color: var(--bad); min-height: 1.5em; }

/* the picker */
.setup { display: grid; gap: 12px; margin: 14px 0 4px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.setup label, .setup > div { display: grid; gap: 6px; }
.setup select, .setup input.other { font: inherit; background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; } .chip { border-radius: 999px; font-size: 13px; padding: 4px 12px; } .chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.heat { display: flex !important; grid-auto-flow: column; align-items: center; gap: 10px; } .heat input { flex: 1; accent-color: var(--accent); }
.dials { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); } .dial i { font-style: normal; color: var(--fg); margin-left: 4px; letter-spacing: 1px; }
.looks { display: flex; gap: 8px; } .look { display: grid; justify-items: center; gap: 2px; padding: 6px 8px 4px; font-size: 12px; background: var(--bg); }
.look.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); } .look .face-svg { width: 64px; height: 64px; display: block; }
.picks { display: grid; gap: 10px; margin: 16px 0; }
.pick { text-align: start; padding: 14px 16px; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.pick b { display: block; font-weight: 600; }
.status { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); display: inline-block; flex: none; }
.dot.ok { background: var(--ok); } .dot.bad { background: var(--bad); } .dot.idle { background: var(--line); }

/* the room */
.room { height: 100vh; display: grid; grid-template-rows: 44px minmax(0, 1fr) 52px; }
.top { display: flex; align-items: center; gap: 12px; padding: 0 12px; border-bottom: 1px solid var(--line); background: var(--panel); min-width: 0; }
.top .title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .spacer { flex: 1; }
.pill { font-size: 12px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); white-space: nowrap; }
.clock { font: 13px var(--mono); color: var(--muted); } .clock.over { color: var(--warn); }
.small { font-size: 12px; } .spacer { flex: 1; } .row { display: flex; gap: 8px; align-items: center; }
.body { position: relative; display: grid; grid-template-columns: 200px minmax(0, 1fr) 380px; grid-template-rows: minmax(0, 1fr) 230px; min-height: 0; }
.files { grid-column: 1; grid-row: 1 / 3; border-right: 1px solid var(--line); background: var(--panel); overflow: auto; padding: 8px 0; }
.files h3, .side h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 6px 12px; font-weight: 600; }
.file { display: flex; gap: 6px; align-items: center; width: 100%; text-align: start; border: 0; border-radius: 0; background: none; padding: 3px 12px 3px 16px; font: 13px var(--mono); color: var(--fg); }
.file.sub { padding-left: 28px; }
.file.folder { color: var(--muted); padding-top: 8px; cursor: default; } .file.folder:hover { background: none; }
.file:hover { background: var(--panel2); }
.file.on { background: #2b3550; }
.file .ro { color: var(--muted); font: 10px system-ui; margin-left: auto; white-space: nowrap; }
.file.new::after { content: "new"; font: 10px system-ui; color: var(--accent); margin-left: 6px; }
.editor-col { grid-column: 2; grid-row: 1; display: grid; grid-template-rows: 34px 1fr; grid-template-columns: minmax(0, 1fr); min-width: 0; min-height: 0; }
.tabs { display: flex; background: var(--panel); border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 0; border-right: 1px solid var(--line); border-radius: 0; background: none; font: 13px var(--mono); color: var(--muted); white-space: nowrap; }
.tab.on { background: var(--bg); color: var(--fg); }
.tab .x { opacity: .6; } .tab .x:hover { opacity: 1; }
#editor { min-height: 0; }
.side { grid-column: 3; grid-row: 1 / 3; border-left: 1px solid var(--line); background: var(--panel); display: grid; grid-template-rows: minmax(0, 2fr) minmax(0, 3fr); min-height: 0; min-width: 0; }
/* the call: the interviewer's tile, the chat log, the composer */
.call { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: 0; border-bottom: 1px solid var(--line); }
.tile { position: relative; margin: 10px 10px 6px; height: 168px; border-radius: 12px; overflow: hidden; background: radial-gradient(circle at 50% 35%, #3b4258, #20232c 70%); border: 2px solid transparent; transition: border-color .2s; }
.tile.speaking { border-color: var(--ok); } .tile.thinking { border-color: #5b6a8f; }
.tile .face { position: absolute; inset: 6px 0 0; display: grid; place-items: end center; }
.tile .face-svg { height: 100%; }
.nameplate { position: absolute; left: 8px; bottom: 8px; background: rgba(0,0,0,.55); border-radius: 6px; padding: 2px 8px; font-size: 12px; display: flex; gap: 6px; align-items: baseline; }
.nameplate span { color: #c9ced8; font-size: 11px; }
.tile .live { position: absolute; right: 8px; top: 8px; font-size: 11px; color: #c9ced8; display: flex; gap: 5px; align-items: center; background: rgba(0,0,0,.4); padding: 1px 7px; border-radius: 6px; }
.chat { overflow: auto; padding: 4px 12px; display: flex; flex-direction: column; gap: 6px; }
.chat .msg { max-width: 92%; padding: 6px 10px; border-radius: 10px; font-size: 13px; white-space: pre-wrap; }
.chat .msg b { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.chat .msg.iv { background: var(--panel2); align-self: flex-start; } .chat .msg.me { background: #2b3550; align-self: flex-end; }
.chat .msg.sys { color: var(--bad); font-size: 12px; } .chat .msg.typing span { letter-spacing: .2em; color: var(--muted); }
.composer { padding: 6px 10px 10px; }
.composer textarea { flex: 1; resize: none; background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 13px; }
.composer textarea:disabled { opacity: .5; }
/* the face (face.js): gaze, blinks, sway, expressions */
.face .head { transform-origin: 100px 170px; animation: sway 7s ease-in-out infinite; }
.face .pupil { transition: transform .35s ease; }
.face .eye { transform-box: fill-box; transform-origin: center; transition: transform .08s; }
.face.blink .eye { transform: scaleY(.12); }
.face .brow { transform-box: fill-box; transform-origin: center; transition: transform .3s; }
.face .mouth { transition: d .3s; }
.face .cheek { opacity: 0; transition: opacity .3s; }
.face.expr-smile .cheek { opacity: .35; } .face.expr-soft .cheek { opacity: .15; }
.face.expr-listening .head { animation: sway 7s ease-in-out infinite, tilt .5s ease forwards; }
.face.expr-listening .brow { transform: translateY(-2px); }
.face.expr-thinking .brow.l { transform: translateY(-2px) rotate(6deg); } .face.expr-thinking .brow.r { transform: translateY(-7px) rotate(-8deg); }
.face.expr-thinking .head { animation: sway 7s ease-in-out infinite, think .6s ease forwards; }
.face.expr-skeptical .brow.r { transform: translateY(-8px) rotate(-12deg); } .face.expr-skeptical .brow.l { transform: translateY(3px) rotate(8deg); }
.face.expr-skeptical .head { animation: sway 7s ease-in-out infinite, tilt .5s ease forwards; }
.face.expr-waiting .brow { transform: translateY(-5px); }
.face.expr-nod .head { animation: nod .55s ease-in-out 2; } .face.expr-nod .cheek { opacity: .25; }
.face.expr-flat .brow { transform: translateY(1px); }
@keyframes sway { 0%, 100% { transform: rotate(0) translateY(0); } 30% { transform: rotate(1.2deg) translateY(.5px); } 70% { transform: rotate(-1deg) translateY(-.5px); } }
@keyframes nod { 0%, 100% { transform: translateY(0) rotate(0); } 45% { transform: translateY(6px) rotate(.5deg); } }
@keyframes tilt { to { transform: rotate(-3deg); } }
@keyframes think { to { transform: rotate(3deg) translateY(-1px); } }
@media (prefers-reduced-motion: reduce) { .face .head, .face.expr-nod .head { animation: none; } }
/* the comic bubble: under the tile, over the chat log only (never the editor); whole sentences, wrapped */
.bubble-host { position: absolute; top: 188px; left: 10px; right: 10px; z-index: 20; pointer-events: none; }
.call > .tile, .call > .tiles { grid-row: 1; grid-column: 1; } .call > .chat { grid-row: 2; grid-column: 1; } .call > .composer { grid-row: 3; grid-column: 1; }
.call > .bubble-host { position: relative; inset: auto; grid-row: 2; grid-column: 1; margin: 0 10px; padding-top: 16px; min-height: 0; display: flex; flex-direction: column; }
.call > .bubble-host .bubble { flex: 0 1 auto; min-height: 0; max-height: min(150px, 100%); box-sizing: border-box; }
.bubble { position: relative; background: #fffdf4; color: #1b1b1b; border: 2px solid #1b1b1b; border-radius: 18px; padding: 9px 14px; font: 15px/1.4 "Comic Neue", "Segoe Print", system-ui, sans-serif; box-shadow: 4px 4px 0 rgba(0,0,0,.35); pointer-events: auto; transition: opacity .6s, transform .25s; max-height: 150px; overflow: auto; overflow-wrap: anywhere; }
.bubble.in { opacity: 0; transform: translateY(-4px); }
.bubble::after { content: ""; position: absolute; left: 46%; top: -18px; border: 9px solid transparent; border-bottom: 16px solid #1b1b1b; }
.bubble::before { content: ""; position: absolute; left: calc(46% + 2px); top: -12px; border: 7px solid transparent; border-bottom: 13px solid #fffdf4; z-index: 1; }
.bubble .x { position: sticky; top: 0; float: right; margin: -4px -8px 0 6px; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #6a6555; font: 16px/24px system-ui, sans-serif; cursor: pointer; }
.bubble .x:hover { background: rgba(0,0,0,.08); color: #1b1b1b; }
.bubble .more { display: block; font: 11px system-ui, sans-serif; color: #6a6555; margin-top: 3px; }
.bubble.fade { opacity: 0; }
/* the panel under the call: the AI assistant and the instructions */
.panel { display: grid; grid-template-rows: 32px minmax(0, 1fr); min-height: 0; }
.stabs { display: flex; border-bottom: 1px solid var(--line); }
.stabs button { border: 0; border-radius: 0; background: none; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding: 0 12px; }
.stabs button.on { color: var(--fg); box-shadow: inset 0 -2px var(--accent); }
.ai { display: grid; grid-template-rows: minmax(0, 1fr) auto; min-height: 0; }
.ai-log { overflow-y: auto; overflow-x: hidden; padding: 8px 12px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; min-width: 0; }
.ai-log > * { min-width: 0; max-width: 100%; box-sizing: border-box; }
.amsg p { margin: 0 0 6px; white-space: pre-wrap; overflow-wrap: anywhere; } .amsg.me { align-self: flex-end; background: #2b3550; padding: 6px 10px; border-radius: 10px; max-width: 92%; }
.amsg.ai { background: var(--panel2); padding: 6px 10px; border-radius: 10px; } .amsg.err { color: var(--bad); } .amsg.capped { color: var(--warn); }
.amsg .code { margin: 4px 0 8px; } .amsg .code pre { margin: 0; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 8px; font: 12px/1.4 var(--mono); white-space: pre; overflow-x: auto; overflow-y: hidden; max-width: 100%; box-sizing: border-box; }
/* the reply's actions stay with their block, never scrolled away */
.amsg .code { min-width: 0; max-width: 100%; }
.amsg .code .row { margin-top: 4px; } button.small { font-size: 11px; padding: 2px 8px; }
.attach { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }
.fchip { font: 11px var(--mono); padding: 1px 8px; border-radius: 999px; border: 1px solid var(--accent); color: var(--fg); background: #24304d; }
.fadd { font-size: 11px; background: var(--panel2); color: var(--fg); border: 1px solid var(--line); border-radius: 999px; padding: 1px 6px; }
.ai .composer { display: grid; gap: 6px; }
/* the toolbar */
.toolbar { display: flex; align-items: center; gap: 6px; padding: 0 14px; background: #121418; border-top: 1px solid var(--line); }
.tool { display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 64px; padding: 4px 10px; background: none; border: 0; color: var(--fg); font-size: 11px; }
.tool .ico { font-size: 15px; line-height: 18px; } .tool:hover:not(:disabled) { background: var(--panel2); }
.tool.stop { background: #c4314b; border-radius: 8px; color: #fff; margin-left: 10px; } .tool.stop:hover:not(:disabled) { background: #d8405b; }
.tool.stop.glow { box-shadow: 0 0 0 3px rgba(196,49,75,.35); }
.paused { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(10,12,16,.72); }
.paused .card { text-align: center; }
.instructions { overflow: auto; padding: 10px 14px 14px; }
.instructions .prompt { white-space: pre-wrap; margin: 6px 0 12px; }
.instructions details { margin: 8px 0; color: var(--muted); } .instructions details p { white-space: pre-wrap; margin: 4px 0; }
.tests { list-style: none; padding: 0; margin: 6px 0; font: 12px var(--mono); }
.tests li { display: flex; gap: 8px; align-items: center; padding: 2px 0; overflow-wrap: anywhere; }
.bottom { grid-column: 2; grid-row: 2; border-top: 1px solid var(--line); display: grid; grid-template-rows: 32px minmax(0, 1fr) auto; min-height: 0; background: var(--bg); }
.btabs { display: flex; gap: 2px; align-items: stretch; background: var(--panel); border-bottom: 1px solid var(--line); padding-left: 6px; }
.btabs button { border: 0; border-radius: 0; background: none; color: var(--muted); padding: 0 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.btabs button.on { color: var(--fg); box-shadow: inset 0 -2px var(--accent); }
.btabs .spacer { flex: 1; }
.term { overflow: auto; padding: 8px 12px; font: 12px/1.45 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.term .err { color: var(--bad); } .term .cmd { color: var(--accent); } .term .sys { color: var(--muted); }
.results { overflow: auto; padding: 6px 12px; font: 12px var(--mono); }
.results .row { display: grid; grid-template-columns: 14px 1fr; gap: 8px; padding: 3px 0; border-bottom: 1px solid var(--line); }
.results .row .more { grid-column: 2; }
.results .collect { border: 1px solid var(--bad); border-radius: 6px; padding: 6px 8px; margin: 4px 0 8px; display: grid; gap: 2px; }
.results .collect .msg { margin: 0; } .results .collect .goto { margin: 0; }
.results details.fail { border-bottom: 1px solid var(--line); padding: 3px 0 6px; }
.results details.fail > summary { display: flex; gap: 8px; align-items: center; cursor: pointer; list-style: none; }
.results details.fail > summary::-webkit-details-marker { display: none; }
.results details.fail > summary::before { content: "▸"; color: var(--muted); width: 10px; } .results details.fail[open] > summary::before { content: "▾"; }
.results .name { overflow-wrap: anywhere; } .results .goto { margin-left: auto; color: var(--accent); white-space: nowrap; }
.results .msg { color: var(--bad); white-space: pre-wrap; margin: 4px 0 4px 18px; }
.results pre.src { margin: 4px 0 4px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; overflow: auto; cursor: pointer; }
.results pre.src .hit { background: rgba(240,97,109,.22); display: inline-block; min-width: 100%; }
.results details.more { margin: 2px 0 2px 18px; } .results details.more summary { color: var(--muted); cursor: pointer; }
.results pre.out { margin: 4px 0; white-space: pre-wrap; color: var(--fg); background: var(--panel); border-radius: 6px; padding: 6px 8px; max-height: 260px; overflow: auto; }
.fail-line { background: rgba(240,97,109,.18); } .fail-glyph { background: var(--bad); border-radius: 50%; width: 8px !important; height: 8px !important; margin: 6px 0 0 6px; }
.prompt-line { display: flex; gap: 6px; align-items: center; border-top: 1px solid var(--line); padding: 4px 12px; font: 12px var(--mono); }
.prompt-line input { flex: 1; background: none; border: 0; color: var(--fg); font: inherit; outline: none; }
.banner.bad { background: var(--bad); }
.banner { position: fixed; left: 50%; top: 56px; transform: translateX(-50%); background: var(--ok); color: #fff; padding: 8px 16px; border-radius: 8px; font-weight: 600; z-index: 10; box-shadow: 0 6px 20px rgba(0,0,0,.4); }

/* the end screen */
.end { width: min(820px, 100%); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 14px 0; }
.stat { background: var(--panel2); border-radius: 8px; padding: 10px 12px; } .stat b { display: block; font-size: 20px; }
table { border-collapse: collapse; width: 100%; } td, th { text-align: start; padding: 6px 8px; border-bottom: 1px solid var(--line); font-size: 13px; }
.bar { position: relative; height: 34px; background: var(--panel2); border-radius: 6px; margin: 12px 0 6px; overflow: hidden; }
.bar .seg { position: absolute; top: 0; bottom: 0; border-right: 1px solid var(--bg); font-size: 11px; padding: 2px 6px; color: var(--muted); }
.bar .mark { position: absolute; bottom: 3px; width: 8px; height: 8px; border-radius: 50%; transform: translateX(-4px); }
.bar .gap { position: absolute; top: 22px; height: 4px; background: var(--warn); }
.timeline { list-style: none; padding: 0; margin: 8px 0 0; max-height: 260px; overflow: auto; font-size: 13px; }
.timeline li { display: flex; gap: 10px; padding: 3px 0; } .timeline .t { font-family: var(--mono); color: var(--muted); width: 48px; }
.narrow-warn { display: none; }
@media (max-width: 1100px) {
  .body { grid-template-columns: 150px minmax(0, 1fr) minmax(300px, 34%); grid-template-rows: minmax(0, 1fr) 200px; }
  .narrow-warn { display: block; font-size: 12px; color: var(--warn); }
}
@media (max-height: 820px) { .side .call > .tile { height: 120px; } .call > .bubble-host { top: auto; } }
/* A phone (BUG-03): the coding room as one scrolling page (the top bar and the toolbar stay), the editor, the
   terminal, the call and then the assistant, each tall enough to use; the assistant's box always under its log. */
@media (max-width: 760px) {
  .room:not(.talk):not(.callroom) { height: auto; min-height: 100vh; grid-template-rows: auto auto auto; }
  .room:not(.talk):not(.callroom) > .top { position: sticky; top: 0; z-index: 25; flex-wrap: wrap; row-gap: 4px; padding: 6px 12px; min-height: 44px; }
  .room:not(.talk):not(.callroom) > .toolbar { position: sticky; bottom: 0; z-index: 25; min-height: 52px; flex-wrap: wrap; gap: 2px; padding: 0 6px; }
  .room:not(.talk):not(.callroom) > .toolbar .tool { min-width: 0; padding: 4px 7px; }
  .room:not(.talk):not(.callroom) > .toolbar > .muted.small, .room:not(.talk):not(.callroom) > .toolbar .heat-why { display: none; }
  .room:not(.talk):not(.callroom) > .body { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-rows: auto; }
  .room:not(.talk):not(.callroom) .files { grid-column: 1; grid-row: auto; order: 0; max-height: 140px; border-right: 0; border-bottom: 1px solid var(--line); }
  .room:not(.talk):not(.callroom) .editor-col { grid-column: 1; grid-row: auto; order: 1; height: 60vh; }
  .room:not(.talk):not(.callroom) .bottom { grid-column: 1; grid-row: auto; order: 2; height: 240px; }
  .room:not(.talk):not(.callroom) .side { grid-column: 1; grid-row: auto; order: 3; grid-template-rows: auto auto; border-left: 0; border-top: 1px solid var(--line); }
  .room:not(.talk):not(.callroom) .call { height: min(520px, 80vh); }
  .room:not(.talk):not(.callroom) .panel { height: 85vh; }
}

/* M4: the heat in the toolbar (auto or fixed, the current level), its popover, and the reason line when it changes */
.heat-wrap { position: relative; }
.heat-tool .ico { font: 600 15px var(--mono); color: var(--warn); }
.heat-pop { position: absolute; bottom: 56px; left: 0; width: 330px; z-index: 40; display: grid; gap: 10px; padding: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.heat-pop h3 { margin: 0; font-size: 13px; } .heat-pop p { margin: 0; }
.heat-why { font-size: 12px; color: var(--muted); max-width: 600px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .75; transition: opacity .3s, color .3s; }
.heat-why.on { color: var(--warn); opacity: 1; }
/* the pressure check-in: one line, skippable */
.checkin { display: flex; align-items: center; gap: 6px; background: var(--panel2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px 4px 14px; }
.checkin .q { font-size: 13px; margin-right: 4px; }
.checkin .lvl { width: 30px; height: 30px; padding: 0; border-radius: 50%; font-weight: 600; }
.checkin .lvl:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.checkin .ends { margin: 0 4px; } .checkin .skip { background: none; border: 0; color: var(--muted); font-size: 12px; }
.checkin.in-card { justify-content: center; margin: 4px 0 14px; border-radius: 10px; flex-wrap: wrap; }
.nexth { margin: 2px 0 0; color: var(--warn); }
.past { display: grid; gap: 4px; margin-top: 10px; } .past a { color: var(--accent); font-size: 13px; text-decoration: none; } .past a:hover { text-decoration: underline; }

/* M4: the debrief */
.debrief { width: min(1080px, 100%); margin: 0 auto; padding: 22px 16px 60px; display: grid; gap: 14px; }
.db-nav { display: flex; gap: 14px; } .db-head h1 { margin: 6px 0 2px; } .db-head p { margin: 0; } .db-head a { text-decoration: none; }
.debrief .card h2 { margin-bottom: 12px; }
.selfrep { display: grid; gap: 14px; max-width: 720px; } .selfrep .q { display: grid; gap: 6px; } .selfrep p { margin: 0; }
.selfrep input.other { font: inherit; background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; }
.one { border-color: var(--accent); background: linear-gradient(180deg, #212841, var(--panel)); }
.one .kicker { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); font-weight: 600; }
.one .claim { font-size: 17px; margin: 6px 0; } .one p { margin: 4px 0; } .one.pending { display: flex; align-items: center; gap: 6px; }
.one .pointer { font-size: 13px; }
button.at { background: none; border: 0; padding: 0 2px; color: var(--accent); font: 12px var(--mono); }
button.at:hover { text-decoration: underline; }
/* the timeline: lanes over one time axis */
.tl { position: relative; display: grid; gap: 4px; }
.tl-row { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; }
.tl-name { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.lane { position: relative; height: 24px; background: var(--panel2); border-radius: 4px; }
.lane.heat { height: 30px; background: none; border-bottom: 1px solid var(--line); border-radius: 0; }
.hseg { position: absolute; bottom: 0; top: 0; display: flex; align-items: flex-end; gap: 4px; border-left: 1px solid var(--line); padding-left: 3px; }
.hseg i { display: block; position: absolute; left: 0; right: 0; bottom: 0; background: rgba(229,165,75,.10); border-top: 2px solid var(--warn); }
.hseg span { position: absolute; top: 0; left: 4px; font: 11px var(--mono); color: var(--warn); }
.lane.layers { height: 28px; background: none; }
.band { position: absolute; top: 0; bottom: 0; background: #2a3042; border-right: 2px solid var(--panel); border-radius: 4px; font-size: 11px; padding: 6px 6px; color: var(--muted); overflow: hidden; white-space: nowrap; }
.band.alt { background: #252a39; } .band.done { color: var(--fg); }
.budget { position: absolute; top: -2px; bottom: -2px; width: 0; border-left: 2px dashed var(--warn); }
.mk { position: absolute; top: 50%; transform: translate(-50%, -50%); width: 10px; height: 10px; padding: 0; border-radius: 50%; border: 2px solid var(--panel); background: var(--muted); font: 600 9px var(--mono); line-height: 1; display: grid; place-items: center; color: #10131a; }
.mk::before { content: ""; position: absolute; inset: -6px; } /* a bigger hit target */
.mk.ok { background: var(--ok); } .mk.bad { background: var(--panel); border-color: var(--bad); border-width: 2.5px; }
.mk.iv { background: var(--accent); border-radius: 2px; } .mk.me { background: #c9ced8; } .mk.ai { background: #a487e6; border-radius: 2px; transform: translate(-50%, -50%) rotate(45deg); }
.mk.hint { width: 20px; height: 16px; border-radius: 4px; background: var(--warn); }
.mk.pr { width: 18px; height: 18px; background: var(--panel); color: var(--fg); border: 1.5px solid var(--muted); }
.mk.pr.p4, .mk.pr.p5 { border-color: var(--bad); } .mk.pr.p1, .mk.pr.p2 { border-color: var(--ok); } .mk.pr.skip { opacity: .6; }
.mk.hc { width: 18px; height: 18px; background: var(--panel); color: var(--warn); border: 1.5px solid var(--warn); font-size: 10px; }
.mk.hit, .span.hit { box-shadow: 0 0 0 3px var(--fg); z-index: 3; }
.span { position: absolute; top: 7px; height: 10px; border-radius: 3px; padding: 0; border: 0; min-width: 3px; }
.span.silence { background: var(--warn); } .span.away { background: #4a5263; opacity: .55; top: 3px; height: 18px; } .span.away.unknown { background: repeating-linear-gradient(90deg, #4a5263 0 2px, transparent 2px 6px); } .span.pause { background: repeating-linear-gradient(45deg, #3a3f4b 0 4px, transparent 4px 8px); top: 3px; height: 18px; }
.axis { position: relative; height: 16px; } .axis span { position: absolute; transform: translateX(-50%); font: 10px var(--mono); color: var(--muted); }
.axis span:first-child { transform: none; }
/* a phone: every other time label, so neighbours never print over each other ("00:0005:00") */
@media (max-width: 520px) { .axis span:nth-child(even) { display: none; } }
.tip { position: absolute; z-index: 10; width: 260px; background: #0f1116; border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; font-size: 12px; pointer-events: none; box-shadow: 0 6px 20px rgba(0,0,0,.5); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 10px 0 0 76px; } .legend span { display: inline-flex; align-items: center; gap: 5px; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 50%; } .lg.ok { background: var(--ok); } .lg.bad { border: 2.5px solid var(--bad); }
.lg.silence { background: var(--warn); border-radius: 2px; height: 6px; width: 14px; } .lg.away { background: #4a5263; opacity: .7; border-radius: 2px; width: 14px; } .lg.pause { background: repeating-linear-gradient(45deg, #5a5f6b 0 3px, transparent 3px 6px); border-radius: 2px; width: 14px; }
.lg.iv { background: var(--accent); border-radius: 2px; } .lg.hint { background: var(--warn); border-radius: 3px; width: 14px; } .lg.me { background: #c9ced8; } .lg.ai { background: #a487e6; transform: rotate(45deg); border-radius: 2px; }
.lg.lbudget { width: 0; height: 12px; border-left: 2px dashed var(--warn); border-radius: 0; }
.detail { margin: 12px 0 0 76px; }
ul.moments { list-style: none; padding: 0; margin: 0; display: grid; gap: 3px; font-size: 13px; }
ul.moments li { display: grid; grid-template-columns: 52px 1fr; gap: 8px; color: var(--muted); } ul.moments li.hit { color: var(--fg); }
ul.moments .t { font-family: var(--mono); } ul.moments .q { color: var(--fg); opacity: .85; }
.ins { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.ins ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; } .ins li p { margin: 2px 0; }
.ins .skill { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.cmp td:first-child { color: var(--muted); white-space: nowrap; } .cm { font-weight: 700; } .cm.ok { color: var(--ok); } .cm.warn { color: var(--warn); } .cm.muted { color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.tile-m { text-align: start; display: grid; gap: 2px; background: var(--panel2); padding: 10px 12px; border-radius: 8px; }
.tile-m b { font-size: 20px; font-family: var(--mono); } .tile-m .lbl { font-size: 12px; } .tile-m.flat { cursor: default; }
.next { border-color: #3c5a44; } .next p { margin: 4px 0; }
details.all summary { cursor: pointer; color: var(--muted); } details.all ul { margin-top: 10px; max-height: 420px; overflow: auto; }
@media (max-width: 760px) { .ins { grid-template-columns: 1fr; } .tl-row { grid-template-columns: 52px minmax(0, 1fr); } .legend, .detail { margin-left: 0; } }

/* M7: the kinds of session in the picker, a child's setup, a baseline note, a topic filter */
.kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 12px 0 4px; }
.kind { display: grid; gap: 2px; text-align: start; padding: 10px 12px; border-radius: 10px; background: var(--bg); }
.kind.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: #1f2638; }
.setup-kid { display: grid; gap: 10px; } .setup-kid > div, .setup-kid label { display: grid; gap: 6px; }
.setup-kid input.other { font: inherit; background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; }
.baseline { color: var(--warn); } .topics { align-items: center; margin-top: 10px; } .pick.go-pick { border-color: var(--accent); }

/* M7: a child's face (face.js, the same renderer with a child's proportions and expressions) */
.face .tears { opacity: 0; transition: opacity .4s; }
.face.kid .brow { transition: transform .3s; }
.face.expr-away .head { animation: sway 7s ease-in-out infinite, turn .5s ease forwards; }
.face.expr-defiant .brow.l { transform: translateY(3px) rotate(16deg); } .face.expr-defiant .brow.r { transform: translateY(3px) rotate(-16deg); }
.face.expr-whiny .brow.l { transform: translateY(-2px) rotate(-14deg); } .face.expr-whiny .brow.r { transform: translateY(-2px) rotate(14deg); }
.face.expr-crying .brow.l { transform: translateY(-3px) rotate(-18deg); } .face.expr-crying .brow.r { transform: translateY(-3px) rotate(18deg); }
.face.expr-crying .eye { transform: scaleY(.4); } .face.expr-crying .tears { opacity: .95; } .face.expr-crying .cheek { opacity: .4; }
.face.expr-crying .head { animation: sob .9s ease-in-out infinite; }
.face.expr-calming .brow { transform: translateY(-1px); } .face.expr-calming .cheek { opacity: .12; }
.face.expr-cooperative .cheek { opacity: .25; } .face.expr-cooperative .brow { transform: translateY(-2px); }
@keyframes turn { to { transform: rotate(-5deg) translateX(-5px); } }
@keyframes sob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(2px); } }

/* M7: the conversation surface: the face big and centred, the conversation as comic bubbles, the scene clock */
.room.talk .body, .talk-body { position: relative; display: grid; grid-template-columns: minmax(280px, 42%) minmax(0, 1fr); min-height: 0; }
.talk-stage { display: grid; align-content: center; justify-items: center; gap: 18px; padding: 24px; border-right: 1px solid var(--line); background: radial-gradient(circle at 50% 40%, #232a3a, var(--bg) 70%); }
.talk-stage .tile { width: min(340px, 100%); height: min(340px, 46vh); margin: 0; border-radius: 50%; }
.talk-stage .tile .face { inset: 10px 0 0; }
.talk-stage .nameplate { left: 50%; transform: translateX(-50%); bottom: 10px; white-space: nowrap; }
.talk-body.kid .talk-stage .tile { background: radial-gradient(circle at 50% 35%, #4a4f3b, #23261f 72%); }
.talk-goal { display: grid; gap: 4px; text-align: center; max-width: 360px; }
.talk-goal .kicker { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); font-weight: 600; }
.talk-goal b { font-size: 17px; }
.talk-thread { position: relative; display: grid; grid-template-rows: minmax(0, 1fr) auto; min-height: 0; }
.talk-thread .chat { padding: 18px 22px; gap: 12px; }
.talk-thread .chat .msg { font: 16px/1.4 "Comic Neue", "Segoe Print", system-ui, sans-serif; padding: 9px 14px; border-radius: 18px; max-width: 78%; box-shadow: 3px 3px 0 rgba(0,0,0,.35); white-space: pre-wrap; }
.talk-thread .chat .msg.iv { background: #fffdf4; color: #1b1b1b; border: 2px solid #1b1b1b; border-bottom-left-radius: 4px; }
.talk-thread .chat .msg.iv b { color: #6a6555; }
.talk-thread .chat .msg.me { background: #2b3550; border: 2px solid #3e4b70; border-bottom-right-radius: 4px; }
.talk-thread .chat .msg .act { display: block; font-style: italic; color: #6a6555; font-size: 14px; }
.talk-thread .chat .msg.typing { background: var(--panel2); color: var(--muted); border: 0; box-shadow: none; }
.talk-thread .chat .msg.sys.offer { align-self: center; color: var(--fg); background: var(--panel2); border: 1px solid var(--warn); box-shadow: none; font: 13px system-ui, sans-serif; }
.talk-thread .chat .msg.sys.offer button { margin-left: 6px; }
.talk-thread .composer textarea { font-size: 15px; }
.talk-thread .bubble-host { display: none; }
.scene-clock { font: 600 15px var(--mono); color: var(--warn); background: rgba(229,165,75,.12); border: 1px solid rgba(229,165,75,.4); border-radius: 999px; padding: 2px 12px; }
.scene-clock.low { color: #fff; background: #b8473c; border-color: #b8473c; }
@media (max-width: 900px) { .talk-body { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); } .talk-stage { border-right: 0; border-bottom: 1px solid var(--line); padding: 12px; } .talk-stage .tile { height: 180px; width: 180px; } }

/* M7: the debrief's conversation lanes: your lines by tone, the child's level, the tone tags */
.mk.tone-esc, .lg.tone-esc { background: var(--bad); } .mk.tone-reg, .lg.tone-reg { background: var(--ok); } .mk.tone-flat { background: #c9ced8; }
.mk.tg { width: 9px; height: 9px; border-radius: 2px; } .mk.tg.esc { background: var(--bad); } .mk.tg.reg { background: var(--ok); transform: translate(-50%, -50%) rotate(45deg); }
.lane.level { height: 30px; }
.lv { position: absolute; bottom: 2px; width: 7px; transform: translateX(-50%); padding: 0; border: 0; border-radius: 2px 2px 0 0; background: linear-gradient(180deg, var(--bad), var(--warn)); opacity: .85; }
.lv.hit { box-shadow: 0 0 0 2px var(--fg); }

/* The call surface (spike): the shared screen big on the left, the faces and the conversation on the right */
.cl-body { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 380px; min-height: 0; }
.cl-main { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto auto; gap: 10px; padding: 12px 14px; min-height: 0; min-width: 0; }
.cl-goal { display: grid; gap: 2px; } .cl-goal b { font-size: 15px; }
.cl-screen { position: relative; min-height: 0; border-radius: 10px; background: #0d0f13; border: 1px solid var(--line); overflow: hidden; }
.cl-preview { position: absolute; inset: 0; display: grid; place-items: center; }
.cl-preview video { width: 100%; height: 100%; object-fit: contain; display: none; }
.cl-preview.on video { display: block; cursor: crosshair; } .cl-preview.on .cl-empty { display: none; }
.cl-empty { display: grid; gap: 8px; max-width: 420px; text-align: center; padding: 20px; }
.cl-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cl-mark { position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; border: 3px solid #ff2d2d; border-radius: 50%; pointer-events: none; }
.cl-sent { position: absolute; right: 12px; top: 12px; display: flex; gap: 8px; align-items: center; background: rgba(20,24,32,.92); border: 1px solid var(--ok); color: #fff; border-radius: 8px; padding: 6px 10px 6px 6px; font-weight: 600; }
.cl-sent img { width: 72px; border-radius: 4px; } .cl-sent.flash { animation: sentin .25s ease-out; }
@keyframes sentin { from { transform: translateY(-8px); opacity: 0; } }
.cl-pointing { position: absolute; inset: 12px; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 6px; background: rgba(13,15,19,.96); border: 2px solid var(--warn); border-radius: 10px; padding: 8px; }
.cl-pointing-head { display: flex; justify-content: space-between; align-items: center; color: var(--warn); }
.cl-pointing-img { position: relative; justify-self: center; align-self: start; max-height: 100%; }
.cl-pointing-img img { display: block; max-width: 100%; max-height: calc(100vh - 260px); }
.cl-point { position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; border: 4px solid var(--warn); box-shadow: 0 0 0 4px rgba(229,165,75,.35); animation: ping 1.2s ease-out infinite; }
@keyframes ping { 50% { box-shadow: 0 0 0 12px rgba(229,165,75,0); } }
.cl-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cl-show { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; }
.cl-show kbd { font: 11px var(--mono); color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }
.cl-show.pulse:not(:disabled) { background: var(--warn); border-color: var(--warn); color: #1b1b1b; animation: pulse 1s ease-in-out infinite; }
.cl-show.pulse:disabled { border-color: var(--warn); }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(229,165,75,.3); } }
.cl-controls button.on, .cl-controls button.rec { border-color: var(--ok); color: var(--ok); }
.cl-controls button.rec { border-color: var(--bad); color: var(--bad); }
.cl-check { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.cl-data { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cl-side { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; border-left: 1px solid var(--line); background: var(--panel); min-height: 0; }
.cl-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 10px 4px; }
.cl-tiles .tile { margin: 0; height: 150px; }
.cl-cam { position: relative; height: 150px; border-radius: 12px; overflow: hidden; background: #20232c; border: 2px solid transparent; }
.cl-cam video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: none; } .cl-cam.on video { display: block; } .cl-cam.on .cl-cam-off { display: none; }
.cl-cam-off { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 28px; }
.cl-camrow { display: flex; gap: 8px; align-items: center; padding: 0 10px 6px; }
.cl-side .bubble-host { display: none; }
.chat .msg.sys.frame, .chat .msg.sys.ask { align-self: center; display: flex; gap: 8px; align-items: center; color: var(--fg); background: var(--panel2); border: 1px solid var(--line); }
.chat .msg.sys.frame img { width: 64px; border-radius: 3px; } .chat .msg.sys.frame.glance { border-color: var(--warn); } .chat .msg.sys.ask { border-color: var(--warn); }
@media (max-width: 900px) { .cl-body { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); } .cl-side { border-left: 0; border-top: 1px solid var(--line); } }
/* the debrief's Shown lane: each frame as its thumbnail */
.lane.shown { height: 34px; }
.mk.fr { width: 44px; height: 26px; border-radius: 3px; background: #3a4258 center / cover no-repeat; border: 2px solid var(--accent); }
.mk.fr.glance { border-color: var(--warn); } .mk.fr.interviewer_ask { border-color: var(--ok); }
.lg.fr { background: var(--accent); }
.moments img.fr-big { display: block; max-width: 360px; margin-top: 6px; border-radius: 4px; border: 1px solid var(--line); }
/* the sources (the screen, the whiteboard, the doc) and the tools launcher */
.cl-tabs { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cl-tab { border-radius: 999px; font-size: 13px; padding: 3px 12px; } .cl-tab.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.cl-tools { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cl-tool { font-size: 12px; color: var(--fg); text-decoration: none; border: 1px solid var(--line); border-radius: 6px; padding: 3px 8px; background: var(--panel2); }
.cl-tool:hover { border-color: var(--muted); }
.cl-board { position: absolute; inset: 0; background: #fff; } .cl-board-host { position: absolute; inset: 0; } .cl-board-host > p { padding: 20px; color: #555; }
.cl-doc { position: absolute; inset: 0; display: grid; }
.cl-doc-in { resize: none; border: 0; padding: 18px 22px; background: #fdfdfb; color: #1b1b1b; font: 15px/1.55 var(--mono); }
.cl-doc-ico { display: inline-grid; place-items: center; width: 40px; height: 30px; background: #fdfdfb; color: #1b1b1b; border-radius: 3px; font-weight: 700; }
.mk.fr.doc { display: grid; place-items: center; color: #1b1b1b; background: #fdfdfb; font-size: 14px; }
/* A meeting (meet.ts): everyone on the call gets a tile in the call's grid; the debrief says how it ended. */
.cl-people { display: contents; }
.db-ending { margin: 6px 0 0 !important; } .db-ending.resolved b { color: var(--ok); } .db-ending.walked_out b { color: #e0795f; }

/* Founders' dogfood C: the room's picker on a phone and in Telegram Desktop: every control a 44×44 target. */
.setup select, .setup input.other { min-height: 44px; }
/* WebKit draws a native select at its own height: ours, with a chevron, so it takes the 44px. */
.setup select { -webkit-appearance: none; appearance: none; padding-inline-end: 28px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23888' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.chips .chip, .kind { min-height: 44px; }
.chips .chip { min-width: 44px; }
