/* Dojo: cream and black, minimal. Plain CSS, no build step. */
:root {
  --bg: #f3eee3; --surface: #faf7ef; --surface-2: #ece6d8; --ink: #121212; --muted: #625d4e; --line: #d9d2bf;
  --accent: #121212; --accent-soft: #e6dfcd; --accent-ink: #faf7ef;
  --live: #121212; --good: #2f6b47; --good-soft: #e1e6d3; --bad: #a3382b; --bad-soft: #efdcd1;
  --owner-bubble: #e6dfcd; --agent-bubble: #121212; --agent-ink: #faf7ef;
  --radius: 10px; --radius-sm: 8px;
  --font: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e0d; --surface: #171715; --surface-2: #22221f; --ink: #f1ecdf; --muted: #9a9585; --line: #2e2d29;
    --accent: #f1ecdf; --accent-soft: #26251f; --accent-ink: #0e0e0d;
    --live: #f1ecdf; --good: #8fc79f; --good-soft: #1b2a20; --bad: #e58a7c; --bad-soft: #301d19;
    --owner-bubble: #22221f; --agent-bubble: #f1ecdf; --agent-ink: #0e0e0d;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
h1 { font-family: var(--serif); font-weight: 400; font-size: 2.6rem; line-height: 1.05; margin: 0 0 .6rem; letter-spacing: -.01em; }
h2 { font-size: 1rem; margin: 0 0 .7rem; font-weight: 600; }
.muted, .hint { color: var(--muted); }
.hint { font-size: .85rem; margin: .5rem 0 0; min-height: 1.4em; }

/* Top bar */
.topbar { display: flex; align-items: center; gap: 2rem; padding: .9rem 1.6rem; background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.brand { font-family: var(--serif); font-size: 1.5rem; color: var(--ink); text-decoration: none; white-space: nowrap; letter-spacing: -.01em; }
.topbar nav { display: flex; gap: 1.3rem; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.navlink { background: none; border: 0; padding: .3rem 0; cursor: pointer; color: var(--muted); font-size: .9rem; white-space: nowrap; border-bottom: 1px solid transparent; transition: color .15s; }
@media (hover: hover) and (pointer: fine) { .navlink:hover { color: var(--ink); } }
.navlink.active { color: var(--ink); border-bottom-color: var(--ink); }
.provider { margin-left: auto; font-size: .75rem; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }

main { max-width: 960px; margin: 0 auto; padding: 3rem 1.5rem 6rem; }
.lede { font-size: 1.05rem; color: var(--muted); max-width: 60ch; margin: 0 0 1.4rem; }
.step { margin-top: 3rem; display: flex; align-items: baseline; gap: .6rem; font-family: var(--serif); font-weight: 400; font-size: 1.6rem; letter-spacing: -.01em; }
.count { color: var(--muted); font-family: var(--font); font-size: .85rem; }

/* Buttons */
.btn { border: 1px solid var(--ink); background: transparent; color: var(--ink); padding: .55rem 1.1rem; border-radius: 99px; cursor: pointer; font-size: .9rem; transition: background .15s, color .15s, transform .1s; }
@media (hover: hover) and (pointer: fine) { .btn:hover { background: var(--ink); color: var(--accent-ink); } }
.btn.primary { background: var(--ink); color: var(--accent-ink); }
@media (hover: hover) and (pointer: fine) { .btn.primary:hover { background: transparent; color: var(--ink); } }
.btn.danger { border-color: var(--bad); color: var(--bad); }
@media (hover: hover) and (pointer: fine) { .btn.danger:hover { background: var(--bad); color: var(--surface); } }
.btn.big { padding: .8rem 1.8rem; font-size: 1rem; }
.btn:disabled { opacity: .35; cursor: not-allowed; pointer-events: none; }
a.btn { text-decoration: none; display: inline-block; }
a.btn.primary { color: var(--accent-ink); }
.quick { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.2rem; }

/* Inputs */
.filters { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filters input { flex: 1 1 260px; }
.filters input, .filters select, .typebox input, .field input, .field select, .field textarea, .pdetail input, .pdetail select, .pdetail textarea {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .55rem .8rem; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); }
input[type=range] { width: 100%; max-width: 420px; accent-color: var(--ink); }
input[type=checkbox] { accent-color: var(--ink); }
.field { display: grid; gap: .3rem; font-size: .8rem; color: var(--muted); margin-bottom: .8rem; border: 0; padding: 0; }
.field textarea { min-height: 5rem; resize: vertical; }
.check { display: flex; align-items: center; gap: .45rem; font-size: .9rem; }
.checks { display: grid; gap: .35rem; }

/* Cards */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.3rem; }
.panel h2 { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; margin-bottom: 1rem; }
.panel.wide { grid-column: 1 / -1; }
.panel ul, .panel ol { margin: 0; padding-left: 1.2rem; display: grid; gap: .55rem; }
details.panel summary { cursor: pointer; font-weight: 600; }
details.panel[open] summary { margin-bottom: 1rem; }
.report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; margin: 1.1rem 0; }
.empty { color: var(--muted); padding: 1.2rem 0; }

/* Setup */
.intro { padding: 0 0 2rem; border-bottom: 1px solid var(--line); }
.intro h1 { font-size: 3.2rem; }
.intro .lede { margin-bottom: 0; }
.scenarios { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: .7rem; }
.scenario, .persona { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; transition: border-color .15s, background .15s; }
.scenario { padding: 1rem 1.1rem; }
@media (hover: hover) and (pointer: fine) { .scenario:hover, .persona:hover { border-color: var(--ink); } }
.scenario strong { display: block; margin-bottom: .2rem; }
.scenario span { color: var(--muted); font-size: .85rem; }
.scenario[aria-pressed="true"], .persona[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--accent-ink); }
.scenario[aria-pressed="true"] span, .persona[aria-pressed="true"] .traits { color: color-mix(in srgb, var(--accent-ink) 70%, transparent); }
.personas { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: .6rem; max-height: 520px; overflow-y: auto; padding: 2px; scrollbar-width: thin; }
.persona { padding: .7rem .9rem; display: grid; grid-template-columns: 52px 1fr; gap: .8rem; align-items: center; }
.ptext { display: grid; gap: .15rem; min-width: 0; }
.pface { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.pface .face-svg, .face-stage .face-svg { display: block; width: 100%; height: 100%; }
.persona .who { font-weight: 600; }
.persona .biz { font-size: .88rem; }
.persona .traits { font-size: .78rem; color: var(--muted); }
.dots { letter-spacing: 2px; font-size: .75rem; }
.startbar { position: sticky; bottom: 0; margin-top: 2rem; padding: 1rem 0; background: var(--bg); border-top: 1px solid var(--ink); display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }

/* Session */
.session-head, .report-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.transcript { margin: 1.5rem 0; display: flex; flex-direction: column; gap: .6rem; min-height: 300px; max-height: 52dvh; overflow-y: auto; padding: 1.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); scrollbar-width: thin; }
.transcript.small { max-height: none; min-height: 0; border: 0; padding: 0; background: none; }
.line { max-width: 75%; padding: .55rem .9rem; border-radius: 14px; overflow-wrap: anywhere; animation: pop .25s var(--ease-out) both; }
.line.owner { background: var(--owner-bubble); align-self: flex-start; border-bottom-left-radius: 3px; }
.line.agent { background: var(--agent-bubble); color: var(--agent-ink); align-self: flex-end; border-bottom-right-radius: 3px; }
.line.event { align-self: center; background: none; color: var(--muted); font-size: .85rem; font-style: italic; }
.line.thinking { opacity: .5; }
.focus-tag { display: inline-block; margin: .5rem 0 0; font-size: .85rem; background: var(--accent-soft); border: 1px solid var(--line); border-radius: 99px; padding: .2rem .8rem; max-width: 62ch; }

.controls { display: grid; justify-items: center; gap: .55rem; }
.mic { width: 92px; height: 92px; border-radius: 999px; border: 1px solid var(--ink); background: var(--ink); color: var(--accent-ink); cursor: pointer; display: grid; place-items: center; transition: transform .15s; touch-action: none; }
@media (hover: hover) and (pointer: fine) { .mic:hover { transform: scale(1.04); } }
.mic svg { width: 36px; height: 36px; fill: currentColor; }
.mic.live { background: var(--bg); color: var(--ink); border-width: 2px; transform: scale(1.06); box-shadow: 0 0 0 8px color-mix(in srgb, var(--ink) 14%, transparent); animation: pulse 1.2s infinite; }
.mic:disabled { opacity: .35; cursor: wait; }
@keyframes pulse { 50% { box-shadow: 0 0 0 16px color-mix(in srgb, var(--ink) 5%, transparent); } }
.status { margin: .3rem 0 0; color: var(--muted); text-align: center; font-size: .9rem; }
.interim { margin: 0; min-height: 1.5em; font-style: italic; text-align: center; max-width: 60ch; }
.typebox { width: 100%; max-width: 560px; }
.typebox input { width: 100%; border-radius: 99px; padding: .65rem 1.2rem; }
.meter { width: 220px; height: 3px; background: var(--line); overflow: hidden; }
.meter div { height: 100%; width: 0; background: var(--ink); transition: width .08s linear; }

/* Report */
.report-head { justify-content: flex-start; align-items: center; gap: 1.8rem; }
.overall { font-family: var(--serif); font-size: 4.6rem; line-height: 1; min-width: 6rem; }
.overall small { font-family: var(--font); font-size: 1rem; color: var(--muted); }
.outcome { margin: .3rem 0 0; font-weight: 600; }
.outcome.meeting_booked { color: var(--good); } .outcome.hung_up { color: var(--bad); }
.summary { font-size: 1.05rem; max-width: 70ch; margin: 1.4rem 0; }
.bar { display: grid; grid-template-columns: 9.5rem 1fr 2rem; align-items: center; gap: .7rem; margin: .5rem 0; font-size: .88rem; }
.bar .track, .qrow .track { height: 3px; background: var(--line); }
.bar .fill, .qrow .fill { height: 100%; background: var(--ink); transform-origin: left; animation: grow .9s var(--ease-out) .15s both; }
.bar .fill.low, .qrow .fill.low { background: var(--bad); } .bar .fill.high, .qrow .fill.high { background: var(--good); }
.bar b { text-align: right; }
.speech { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.speech div { display: grid; }
.speech strong { font-family: var(--serif); font-weight: 400; font-size: 2rem; line-height: 1.1; }
.speech span { font-size: .8rem; color: var(--muted); }
.lineswap { padding: .8rem 0; border-top: 1px solid var(--line); }
.lineswap:first-child { border-top: 0; padding-top: 0; }
.lineswap p { margin: 0; color: var(--muted); font-size: .85rem; }
.lineswap q { display: block; margin-top: .3rem; font-family: var(--serif); font-size: 1.2rem; quotes: none; }
#r-compliance li.flag { color: var(--bad); }
.tonality { margin-top: .8rem; font-size: .88rem; color: var(--muted); }

/* Progress */
.stats { display: flex; gap: 3rem; flex-wrap: wrap; margin: 1.4rem 0 1.6rem; }
.stats div { display: grid; }
.stats strong { font-family: var(--serif); font-weight: 400; font-size: 3rem; line-height: 1; }
.stats span { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.chart svg { width: 100%; height: 180px; display: block; }
.chart .axis { stroke: var(--line); } .chart .ln { fill: none; stroke: var(--ink); stroke-width: 1.8; }
.chart .pt { fill: var(--bg); stroke: var(--ink); stroke-width: 1.8; } .chart text { fill: var(--muted); font-size: 11px; }
.history { display: grid; }
.hrow { display: grid; grid-template-columns: 7rem 1fr 9rem 3rem; gap: .8rem; align-items: center; background: none; border: 0; border-bottom: 1px solid var(--line); padding: .8rem .2rem; cursor: pointer; text-align: left; transition: background .15s; }
@media (hover: hover) and (pointer: fine) { .hrow:hover { background: var(--surface); } }
.hrow b { text-align: right; font-family: var(--serif); font-weight: 400; font-size: 1.3rem; }

/* Learn */
.learn { display: grid; grid-template-columns: 16rem 1fr; gap: 2rem; align-items: start; margin-top: 1.5rem; }
.lesson-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; counter-reset: l; position: sticky; top: 4.5rem; }
.lesson-list button { width: 100%; text-align: left; background: none; border: 0; border-left: 2px solid transparent; padding: .5rem .75rem; cursor: pointer; display: flex; gap: .7rem; color: var(--muted); transition: color .15s; }
@media (hover: hover) and (pointer: fine) { .lesson-list button:hover { color: var(--ink); } }
.lesson-list button::before { counter-increment: l; content: counter(l, decimal-leading-zero); font-size: .75rem; padding-top: .15rem; min-width: 1.4rem; }
.lesson-list button[aria-current="true"] { border-left-color: var(--ink); color: var(--ink); font-weight: 600; }
.lesson { padding: 1.6rem 1.8rem; }
.lesson h2 { font-family: var(--serif); font-weight: 400; font-size: 2rem; text-transform: none; letter-spacing: -.01em; color: var(--ink); margin-bottom: .2rem; }
.lesson .src { color: var(--muted); font-size: .85rem; margin: 0 0 1rem; }
.lesson h3 { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 1.5rem 0 .4rem; }
.lesson p { max-width: 68ch; margin: 0; }
.lesson .say { margin: 0; padding-left: 1.2rem; display: grid; gap: .5rem; }
.lesson .avoid { background: var(--bad-soft); border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent); border-radius: var(--radius-sm); padding: .7rem .95rem; color: var(--ink); }
.lesson .btn { margin-top: 1.5rem; }

/* Business views */
.counters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .7rem; margin: 1.4rem 0 .6rem; }
.counter { display: grid; grid-template-columns: auto auto; align-items: center; gap: .1rem .9rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem .8rem .7rem 1.1rem; }
.counter strong { font-family: var(--serif); font-weight: 400; font-size: 2.2rem; line-height: 1; grid-row: span 2; min-width: 1.6ch; }
.counter span { font-size: .78rem; color: var(--muted); }
.counter button { grid-column: 2; border: 1px solid var(--ink); background: transparent; border-radius: 99px; padding: .05rem .65rem; cursor: pointer; font-size: .8rem; justify-self: start; transition: background .15s, color .15s; }
@media (hover: hover) and (pointer: fine) { .counter button:hover { background: var(--ink); color: var(--accent-ink); } }
.lead-head { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.lead-head .step { margin-bottom: .5rem; }
.leadlist { display: grid; gap: .5rem; }
.lead { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1.1rem; display: grid; grid-template-columns: 1fr auto; gap: .3rem 1rem; align-items: start; transition: border-color .15s; }
@media (hover: hover) and (pointer: fine) { .lead:hover { border-color: var(--ink); } }
.lead .lname { font-weight: 600; }
.lead .lmeta { font-size: .85rem; color: var(--muted); }
.lead .tag { display: inline-block; font-size: .7rem; border: 1px solid var(--good); color: var(--good); border-radius: 99px; padding: 0 .5rem; margin-left: .45rem; vertical-align: 1px; }
.lead .acts { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: flex-end; }
.lead .acts .btn { padding: .25rem .7rem; font-size: .82rem; border-color: var(--line); color: var(--muted); }
.lead .acts .btn.primary { border-color: var(--ink); color: var(--accent-ink); }
.lead .acts .btn[data-lead="dnc"] { color: var(--bad); }
.lead > :first-child { min-width: 0; overflow-wrap: anywhere; }
#view-today .report-grid { grid-template-columns: 1fr 1fr; }
.lead .draft { grid-column: 1 / -1; }
.draft pre, .ai-out pre { white-space: pre-wrap; font-family: var(--font); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .9rem 1rem; margin: .5rem 0; font-size: .92rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1.1rem 0; }
.chip { border: 1px solid var(--line); background: transparent; border-radius: 99px; padding: .28rem .85rem; cursor: pointer; font-size: .85rem; color: var(--muted); transition: background .15s, color .15s, border-color .15s; }
@media (hover: hover) and (pointer: fine) { .chip:hover { color: var(--ink); border-color: var(--ink); } }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--accent-ink); border-color: var(--ink); }
.crm { display: grid; grid-template-columns: minmax(250px, 340px) 1fr; gap: 1.2rem; align-items: start; }
.plist { display: grid; gap: .45rem; max-height: 75vh; overflow-y: auto; padding: 2px; scrollbar-width: thin; }
.prow { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .6rem .85rem; cursor: pointer; display: grid; gap: .1rem; transition: border-color .15s; }
@media (hover: hover) and (pointer: fine) { .prow:hover { border-color: var(--muted); } }
.prow[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.prow .due { color: var(--bad); font-size: .8rem; font-weight: 600; }
.prow span { font-size: .83rem; color: var(--muted); }
.pdetail { position: sticky; top: 4.5rem; }
.pdetail form { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem .9rem; }
.pdetail form .full { grid-column: 1 / -1; }
.pdetail h3 { margin: 1.5rem 0 .6rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.timeline { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .55rem; }
.timeline li { border-left: 1px solid var(--ink); padding-left: .8rem; font-size: .9rem; }
.timeline time { color: var(--muted); font-size: .78rem; display: block; }
.writer { display: flex; flex-wrap: wrap; gap: .4rem; }
.writer .btn { padding: .3rem .8rem; font-size: .84rem; }
.logform { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.fu { display: grid; }
.fu button { text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: .55rem .2rem; cursor: pointer; transition: background .15s; }
@media (hover: hover) and (pointer: fine) { .fu button:hover { background: var(--bg); } }
.fu button span { color: var(--muted); font-size: .83rem; display: block; }
[hidden] { display: none !important; }

.toast { position: fixed; bottom: 1.6rem; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--accent-ink); padding: .75rem 1.3rem; border-radius: 99px; max-width: 90vw; z-index: 10; font-size: .9rem; }

@media (max-width: 820px) { .crm { grid-template-columns: 1fr; } .pdetail { position: static; } .pdetail form, .logform { grid-template-columns: 1fr; } .lead { grid-template-columns: 1fr; } .lead .acts { justify-content: flex-start; } }
@media (max-width: 760px) { .learn { grid-template-columns: 1fr; gap: 1rem; } .lesson-list { position: static; } }
@media (max-width: 640px) {
  h1, .intro h1 { font-size: 2.1rem; }
  main { padding: 1.8rem 1rem 6rem; }
  .line { max-width: 90%; }
  .hrow { grid-template-columns: 1fr 3rem; }
  .hrow .hide-sm { display: none; }
  .bar { grid-template-columns: 7.5rem 1fr 2rem; }
  .provider { display: none; }
  .topbar { gap: 1rem; padding: .7rem 1rem; }
  .counter { flex: 1 1 45%; }
}

/* ---------- Product knowledge, faces and quizzes ---------- */
.tabs { display: flex; gap: 1.6rem; border-bottom: 1px solid var(--line); margin-top: 1.6rem; }
.tab { background: none; border: 0; padding: .6rem 0; margin-bottom: -1px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
@media (hover: hover) and (pointer: fine) { .tab:hover { color: var(--ink); } }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
.banner { background: var(--accent-soft); border: 1px solid var(--line); border-radius: 8px; padding: .7rem .9rem; font-size: .85rem; margin-bottom: 1.3rem; }
.lesson .para + .para { margin-top: .8rem; }
.keynums { margin: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.keynums div { display: grid; grid-template-columns: minmax(8rem, 15rem) 1fr; gap: 1rem; padding: .6rem .9rem; border-top: 1px solid var(--line); }
.keynums div:first-child { border-top: 0; }
.keynums dt { color: var(--muted); font-size: .85rem; }
.keynums dd { margin: 0; font-weight: 550; }
.tablewrap { overflow-x: auto; margin-top: 1.2rem; }
.ptable { border-collapse: collapse; width: 100%; font-size: .88rem; min-width: 560px; }
.ptable th, .ptable td { text-align: left; padding: .65rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.ptable thead th { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.ptable tbody th { font-weight: 650; white-space: nowrap; }
.examples { display: grid; gap: .7rem; }
.example { border: 1px solid var(--line); border-radius: 10px; padding: .8rem 1rem; background: var(--bg); }
.example strong { display: block; }
.example .fit { display: block; color: var(--good); font-size: .85rem; font-weight: 600; margin: .1rem 0 .35rem; }
.lesson .example p { font-size: .92rem; }
.oneline { margin: 0; padding: .8rem 1.1rem; background: var(--accent-soft); border-radius: var(--radius-sm); font-family: var(--serif); font-size: 1.3rem; line-height: 1.35; max-width: 60ch; }
.panel li.flag { color: var(--bad); }

.quiz { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; background: var(--bg); }
.qcount { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 0 0 .3rem !important; }
.qtext { font-family: var(--serif); font-size: 1.35rem; line-height: 1.25; margin: 0 0 .9rem !important; }
.choices { display: grid; gap: .5rem; }
.choice { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .7rem 2.6rem .7rem 1rem; cursor: pointer; position: relative; transition: border-color .15s, background .3s; }
@media (hover: hover) and (pointer: fine) { .choice:hover:not(:disabled) { border-color: var(--ink); } }
.choice:disabled { cursor: default; }
.choice.correct { background: var(--good-soft); border-color: var(--good); }
.choice.correct::after, .choice.wrong::after { position: absolute; right: 1rem; top: 50%; margin-top: -.75em; font-weight: 700; }
.choice.correct::after { content: "\2713"; color: var(--good); animation: tick .4s ease both; }
.choice.wrong { background: var(--bad-soft); border-color: var(--bad); animation: shake .4s ease; }
.choice.wrong::after { content: "\2715"; color: var(--bad); }
.why { margin: .9rem 0 .7rem !important; padding: .7rem .9rem; border-radius: 8px; font-size: .92rem; animation: rise .3s ease both; }
.why.ok { background: var(--good-soft); } .why.no { background: var(--bad-soft); }
.qresult { font-family: var(--serif); font-size: 3.4rem; line-height: 1; margin: 0 0 .4rem !important; }
.qrow { display: grid; grid-template-columns: minmax(0, 1fr) 8rem 2.6rem; gap: .8rem; align-items: center; margin: .55rem 0; font-size: .9rem; }
.qrow span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qrow b { text-align: right; }

.face-stage { width: 190px; height: 190px; margin: 1.4rem auto 0; border-radius: 50%; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); transition: opacity .9s ease, transform .9s ease; }
.face-stage:empty { display: none; }
.face-stage.face-gone { opacity: 0; transform: scale(.94); }
.face-stage + .transcript { margin-top: 1.2rem; }
.face-live .face-all { transform-box: view-box; transform-origin: 50% 100%; animation: breathe 4.4s ease-in-out infinite; }

/* ---------- Motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadein { from { opacity: 0; } }
@keyframes toastUp { from { opacity: 0; transform: translate(-50%, 18px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes shake { 20% { transform: translateX(-5px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }
@keyframes tick { from { opacity: 0; transform: scale(0) rotate(-40deg); } 60% { transform: scale(1.3) rotate(0); } to { opacity: 1; transform: scale(1); } }
@keyframes bump { 40% { transform: scale(1.4); } }
@keyframes breathe { 50% { transform: translateY(-1.2px) scale(1.012); } }

.view:not([hidden]) { animation: rise .32s ease both; }
.lesson.swap { animation: rise .3s ease both; }
.entering :is(.leadlist, .plist, .personas, .scenarios, .lesson-list, .history, .report-grid, .counters, .stats, .chips) > * { animation: rise .42s var(--ease-out) both; animation-delay: .4s; }
.entering :is(.leadlist, .plist, .personas, .scenarios, .lesson-list, .history, .report-grid, .counters, .stats, .chips) > :nth-child(1) { animation-delay: 0s; }
.entering :is(.leadlist, .plist, .personas, .scenarios, .lesson-list, .history, .report-grid, .counters, .stats, .chips) > :nth-child(2) { animation-delay: .04s; }
.entering :is(.leadlist, .plist, .personas, .scenarios, .lesson-list, .history, .report-grid, .counters, .stats, .chips) > :nth-child(3) { animation-delay: .08s; }
.entering :is(.leadlist, .plist, .personas, .scenarios, .lesson-list, .history, .report-grid, .counters, .stats, .chips) > :nth-child(4) { animation-delay: .12s; }
.entering :is(.leadlist, .plist, .personas, .scenarios, .lesson-list, .history, .report-grid, .counters, .stats, .chips) > :nth-child(5) { animation-delay: .16s; }
.entering :is(.leadlist, .plist, .personas, .scenarios, .lesson-list, .history, .report-grid, .counters, .stats, .chips) > :nth-child(6) { animation-delay: .2s; }
.entering :is(.leadlist, .plist, .personas, .scenarios, .lesson-list, .history, .report-grid, .counters, .stats, .chips) > :nth-child(7) { animation-delay: .24s; }
.entering :is(.leadlist, .plist, .personas, .scenarios, .lesson-list, .history, .report-grid, .counters, .stats, .chips) > :nth-child(8) { animation-delay: .28s; }
.entering :is(.leadlist, .plist, .personas, .scenarios, .lesson-list, .history, .report-grid, .counters, .stats, .chips) > :nth-child(9) { animation-delay: .32s; }
.entering :is(.leadlist, .plist, .personas, .scenarios, .lesson-list, .history, .report-grid, .counters, .stats, .chips) > :nth-child(10) { animation-delay: .36s; }
.btn:active:not(:disabled), .chip:active, .scenario:active, .persona:active, .navlink:active, .counter button:active, .choice:active:not(:disabled) { transform: scale(.96); }
.counter strong.bump { animation: bump .35s ease; }
.toast:not([hidden]) { animation: toastUp .3s ease both; }
.chart .ln { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.1s ease .1s forwards; }
.chart .pt { animation: fadein .3s ease both; }

@media (max-width: 640px) { .keynums div { grid-template-columns: 1fr; gap: .1rem; } .face-stage { width: 150px; height: 150px; } .qrow { grid-template-columns: minmax(0, 1fr) 5rem 2.4rem; } }
/* Reduced motion: no movement, state changes are instant. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

.replaybtn { margin-top: .6rem; font-size: .8rem; padding: .3rem .9rem; }
.replay { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .7rem; margin-top: .7rem; }
.rp { border: 1px solid var(--line); border-radius: 12px; padding: .7rem .9rem; background: var(--surface-2); }
.rp.now { border-color: var(--good); }
.rp small { text-transform: uppercase; letter-spacing: .09em; font-size: .68rem; color: var(--muted); }
.rp p { margin: .3rem 0 0; font-size: .88rem; }
