/* Warm, rounded, light (Keenan 11-07: not "a cold war building"). White cards float on a warm ground,
   pill buttons, ASG red used as a soft tint for "you are here" and selected answers. */
:root {
  --bg: #f6f3f1; --paper: #fff; --ink: #1c1b1d; --mute: #6c6a6e; --line: #e9e3df; --fill: #f8f5f3;
  --red: #c4161c; --soft: #fdf1f0; --ok: #2f7d4f; --oksoft: #e3f2e8; --warn: #9a6a00; --warnsoft: #fbf1d9;
  --shadow: 0 1px 2px rgba(60,30,20,.05), 0 10px 30px rgba(60,30,20,.07);
  --display: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box }
html, body { margin: 0 }
body { background: var(--bg); color: var(--ink); font: 16px/1.5 var(--body); -webkit-font-smoothing: antialiased }
button, input, select, textarea { font: inherit; color: inherit }
a { color: var(--red) }
h1, h2, h3 { font-family: var(--display); line-height: 1.2; margin: 0; text-wrap: balance }
.loading { padding: 40px; color: var(--mute) }
.muted { color: var(--mute) }
.small { font-size: 13px }

/* top bar */
.bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--paper); padding: 12px max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left)); box-shadow: 0 1px 0 var(--line); position: sticky; top: 0; z-index: 5 }
.bar .logo { height: 36px; width: auto }
.bar .title { font: 600 15px/1.2 var(--display) }
.tabs { display: flex; gap: 4px; flex-wrap: wrap }
.tab { border: 0; background: none; border-radius: 999px; padding: 8px 15px; color: var(--mute); font-weight: 600; cursor: pointer }
.tab.on { background: var(--soft); color: var(--red) }
.bar .right { margin-left: auto; display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--mute) }
.linkbtn { background: none; border: 0; color: var(--mute); cursor: pointer; text-decoration: underline; padding: 0 }

/* buttons, fields */
.btn { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 10px 18px; font-weight: 600; cursor: pointer }
.btn:hover { border-color: var(--mute) }
.btn.pri { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 4px 14px rgba(196,22,28,.22) }
.btn.pri:hover { filter: brightness(1.06) }
.btn[disabled] { opacity: .5; cursor: default; box-shadow: none }
.btn.small { padding: 7px 12px; font-size: 13px }
.btn.danger { color: var(--red) }
:focus-visible { outline: 3px solid rgba(196,22,28,.35); outline-offset: 2px }
label.field { display: grid; gap: 6px }
label.field > span { font-weight: 600; font-size: 15px }
input[type=text], input[type=email], input[type=date], input[type=time], input[type=number], select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 11px 14px; background: var(--paper); }
textarea { min-height: 96px; resize: vertical; line-height: 1.5 }
textarea.tall { min-height: 150px }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--soft) }
.check { display: flex; gap: 8px; align-items: center; font-size: 15px }

/* layout */
.page { max-width: 1120px; margin: 0 auto; padding: 24px max(16px, env(safe-area-inset-right)) 64px max(16px, env(safe-area-inset-left)); display: grid; gap: 20px }
.card { background: var(--paper); border-radius: 20px; padding: 22px; box-shadow: var(--shadow); display: grid; gap: 14px; min-width: 0 }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap }
.row .spacer { margin-left: auto }

/* sign in */
.center { min-height: 100vh; display: grid; place-items: center; padding: 16px }
.signin { max-width: 420px; width: 100%; text-align: center }
.signin img { height: 44px; justify-self: center }

/* player */
.player { display: grid; grid-template-columns: 280px minmax(0, 1fr); min-height: calc(100vh - 56px) }
.curr { background: var(--paper); border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 3px }
.prog { padding: 4px 10px 14px; display: grid; gap: 7px }
.prog .top { display: flex; justify-content: space-between; font-size: 13px; color: var(--mute); font-weight: 600 }
.prog .top b { color: var(--ink); font-variant-numeric: tabular-nums }
.track { height: 8px; border-radius: 999px; background: var(--fill); overflow: hidden }
.track i { display: block; height: 100%; background: var(--red); border-radius: 999px; transition: width .3s }
.navitem { display: flex; gap: 9px; align-items: baseline; width: 100%; text-align: left; border: 0; background: none; border-radius: 12px; padding: 9px 10px; font-size: 14px; cursor: pointer; color: var(--ink) }
.navitem.sec { font-weight: 600 }
.navitem.sub { padding-left: 32px; font-size: 13.5px; color: var(--mute) }
.navitem .tick { width: 15px; flex: 0 0 15px; text-align: center; color: var(--mute) }
.navitem.done .tick { color: var(--ok) }
.navitem.now { background: var(--soft); color: var(--red); font-weight: 600 }
.navitem.now .tick { color: var(--red) }
.navitem.locked { cursor: default; opacity: .6 }
.navitem.locked .tick { font-size: 11px }
.navitem:not(.locked):not(.now):hover { background: var(--fill) }
.main { padding: 26px max(16px, 3vw) 64px; display: grid; gap: 18px; align-content: start; min-width: 0 }
.main > * { max-width: 760px; width: 100% }
.hello { display: flex; align-items: center; gap: 12px; flex-wrap: wrap }
.av { width: 42px; height: 42px; border-radius: 50%; background: var(--soft); color: var(--red); display: grid; place-items: center; font: 700 15px/1 var(--display); flex: 0 0 auto }
.hello b { font: 700 21px/1.2 var(--display); display: block }
.gate { background: var(--paper); border-radius: 18px; padding: 20px; box-shadow: var(--shadow); display: grid; gap: 6px }
.gate b { font: 700 20px/1.25 var(--display) }
.gate .when { justify-self: start; background: var(--soft); color: var(--red); border-radius: 999px; padding: 6px 12px; font-weight: 600; font-size: 13px }
.gate.ok { background: var(--oksoft) }
.gate.ok b { color: var(--ok) }
.step h2 { font-size: 24px }
.qs { display: grid; gap: 18px }
.saved { font-size: 13px; color: var(--ok); font-weight: 600 }
.saved.err { color: var(--red) }

/* assessment */
.which { display: grid; gap: 8px }
.which .head { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font: 700 12px/1.2 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); padding: 0 4px }
.pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px }
.opt { display: flex; gap: 10px; align-items: center; text-align: left; border: 1px solid var(--line); background: var(--paper); border-radius: 14px; padding: 11px 13px; font-size: 14.5px; cursor: pointer; min-height: 48px }
.opt::before { content: ""; width: 14px; height: 14px; border: 1.5px solid var(--mute); border-radius: 50%; flex: 0 0 auto }
.opt.sel { border-color: var(--red); background: var(--soft) }
.opt.sel::before { background: var(--red); border-color: var(--red); box-shadow: inset 0 0 0 2px var(--soft) }
.totals { display: flex; gap: 18px; flex-wrap: wrap; font: 600 16px/1.2 var(--display); background: var(--paper); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); position: sticky; bottom: 12px }
.totals b { color: var(--red); font-variant-numeric: tabular-nums }
@media (max-width: 560px) { .pick, .which .head { grid-template-columns: 1fr } .which .head span:last-child { display: none } .pick { padding-bottom: 8px; border-bottom: 1px solid var(--line) } }

/* tables */
.tablewrap { overflow-x: auto }
table { width: 100%; border-collapse: collapse; font-size: 14.5px }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle }
th { font: 600 12px/1.2 var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--mute) }
tr:last-child td { border-bottom: 0 }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap }
tr.click { cursor: pointer }
tr.click:hover td { background: var(--fill) }
.pill { display: inline-block; font: 600 12px/1 var(--body); padding: 5px 10px; border-radius: 999px; white-space: nowrap }
.pill.ok { background: var(--oksoft); color: var(--ok) }
.pill.warn { background: var(--warnsoft); color: var(--warn) }
.pill.no { background: var(--fill); color: var(--mute) }
.pill.red { background: var(--soft); color: var(--red) }
.stat { display: grid; gap: 2px }
.stat b { font: 700 28px/1 var(--display); font-variant-numeric: tabular-nums }
.notice { border-radius: 14px; padding: 12px 14px; background: var(--fill); font-size: 14.5px }
.notice.ok { background: var(--oksoft); color: var(--ok) }
.notice.err { background: var(--soft); color: var(--red) }
.answers dl { display: grid; gap: 4px; margin: 0 }
.answers dt { font-weight: 600; margin-top: 10px }
.answers dd { margin: 0; white-space: pre-wrap; color: var(--ink) }
.answers dd.empty { color: var(--red) }

/* slides */
.main.wide > * { max-width: 980px }
.slide { width: min(100%, max(420px, calc((100vh - 230px) * 4 / 3))); background: var(--paper); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; line-height: 0 }
.slide img { width: 100%; height: auto; aspect-ratio: 4 / 3; display: block; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; -webkit-touch-callout: none; background: #fff }
#livebadge { margin-left: auto }
.live { border: 0; background: var(--soft); color: var(--red); border-radius: 999px; padding: 7px 13px; font-weight: 600; font-size: 13px; cursor: pointer }
.live.on { background: var(--oksoft); color: var(--ok); cursor: default; display: inline-block }
.navitem .extag { margin-left: auto; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--red); opacity: .75 }
.exercise .tag { justify-self: start; background: var(--soft); color: var(--red); border-radius: 999px; padding: 5px 11px; font: 700 11px/1 var(--body); letter-spacing: .08em; text-transform: uppercase }
.exercise h3 { font-size: 22px }
.exercise .opp { margin: 0; font-size: 15px }
.pic { display: grid; gap: 14px }
.how { margin: 0; padding-left: 22px; display: grid; gap: 6px; font-size: 15.5px }
.prev { background: var(--fill); border-radius: 14px; padding: 12px 16px; display: grid; gap: 4px; font-size: 15px; white-space: pre-wrap }
.template { white-space: pre-wrap; font-size: 15px; line-height: 1.6; background: var(--fill); border-radius: 14px; padding: 14px 16px }

/* present: the wall */
.present { position: fixed; inset: 0; background: #111; display: grid; place-items: center }
.present img { width: 100vw; height: 100vh; object-fit: contain; display: block; cursor: pointer; user-select: none; -webkit-user-drag: none }
.pctl { position: fixed; right: 16px; bottom: 16px; display: flex; gap: 4px; align-items: center; background: rgba(0,0,0,.66); color: #fff; border-radius: 999px; padding: 6px 10px; font-size: 14px; transition: opacity .3s; flex-wrap: wrap }
.pctl button { background: none; border: 0; color: #fff; padding: 7px 11px; border-radius: 999px; cursor: pointer; font-weight: 600 }
.pctl button:hover { background: rgba(255,255,255,.15) }
.pctl span { padding: 0 6px; font-variant-numeric: tabular-nums }
.pctl .pwarn { color: #ffb4b0 }
.present.idle .pctl { opacity: 0 }
.present.idle, .present.idle img { cursor: none }

@media (max-width: 820px) {
  .player { grid-template-columns: minmax(0, 1fr) }
  .curr { border-right: 0; border-bottom: 1px solid var(--line) }
  .curr.folded .navitem, .curr.folded .prog ~ * { display: none }
  .coursebtn { display: inline-flex !important }
}
.coursebtn { display: none; margin: 0 10px 6px }
@media (prefers-reduced-motion: reduce) { * { transition: none !important } }

/* the wall: first click goes full screen */
.fshint { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: rgba(0,0,0,.7); color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 600; pointer-events: none }
.fshint[hidden] { display: none }

/* exercise countdown (participants and Teach) */
.count { font: 700 18px/1.2 var(--display); color: var(--red); font-variant-numeric: tabular-nums }
.count.up { color: var(--warn) }
.notice.warn { background: var(--warnsoft); color: var(--warn) }
.nowrap { white-space: nowrap }
.ok { color: var(--ok) }

/* Teach: the facilitator's screen. Slide and timer left, guide / class / run of show right, the day along the bottom. */
.teach { max-width: 1440px; margin: 0 auto; padding: 16px max(16px, env(safe-area-inset-right)) 32px max(16px, env(safe-area-inset-left)); display: grid; gap: 14px }
.tbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; position: sticky; top: 61px; z-index: 4; background: var(--bg); padding: 6px 0 }
.tbar .spacer { margin-left: auto }
.tbar .clock { display: flex; gap: 8px; align-items: center; color: var(--mute); font-size: 14px }
.tbar .clock b { font: 700 20px/1 var(--display); color: var(--ink); font-variant-numeric: tabular-nums }
.tbar .onwall { font-size: 14px; color: var(--mute); background: var(--paper); border-radius: 999px; padding: 6px 12px; box-shadow: var(--shadow) }
.tbar .onwall b { color: var(--ink) }
.tgrid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start }
@media (max-width: 900px) { .tgrid { grid-template-columns: minmax(0, 1fr) } }
.tleft { display: grid; gap: 12px; min-width: 0 }
.tleft .slide { width: 100% }
.tright { position: sticky; top: 122px; max-height: calc(100vh - 140px); overflow-y: auto; align-content: start }
@media (max-width: 900px) { .tright { position: static; max-height: none } }
.ptabs { display: flex; gap: 4px; flex-wrap: wrap }
.ptabs .tab { background: var(--fill); font-size: 14px; padding: 7px 13px }
.ptabs .tab.on { background: var(--ink); color: var(--paper) }
#tpanel { display: grid; gap: 12px; min-width: 0 }
#tpanel h3 { font-size: 20px }
.timer { background: var(--soft); box-shadow: none; gap: 10px; padding: 16px 18px }
.timer .count { font-size: 30px }
.guide { display: grid; gap: 12px }
.gblock { display: grid; gap: 4px }
.gblock > b { font: 700 11.5px/1.3 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--mute) }
.gblock > b .small { text-transform: none; letter-spacing: 0; font-weight: 500 }
.gblock ul { margin: 0; padding-left: 18px; display: grid; gap: 5px; font-size: 15px }
.gblock p { margin: 0; font-size: 15px }
.watch { background: var(--warnsoft); color: var(--warn); border-radius: 14px; padding: 12px 14px; font-size: 14.5px; display: grid; gap: 4px }
.watch b { font: 700 11.5px/1.2 var(--body); letter-spacing: .08em; text-transform: uppercase }
.watch p { margin: 0 }
.guide textarea { min-height: 84px }
.clist { display: grid; gap: 2px }
.crow { display: grid; grid-template-columns: minmax(110px, auto) minmax(0, 1fr) auto; gap: 10px; align-items: baseline; text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 12px; cursor: pointer; font-size: 14.5px; width: 100% }
.crow:hover, .crow.open { background: var(--fill) }
.crow.static { cursor: default }
.crow.static:hover { background: none }
.crow .cn { font-weight: 600; white-space: nowrap }
.crow .cs { color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.crow .cc { color: var(--mute); font-size: 13px; font-variant-numeric: tabular-nums }
.cfull { background: var(--fill); border-radius: 12px; padding: 12px 14px; margin: 0 0 6px; display: grid; gap: 10px }
.ctext { white-space: pre-wrap; font-size: 15px }
.bars { display: grid; gap: 6px }
.barrow { display: grid; grid-template-columns: 70px minmax(0, 1fr) 28px; gap: 8px; align-items: center; font-size: 13px; color: var(--mute); font-variant-numeric: tabular-nums }
.barrow i { display: block; height: 12px; min-width: 2px; border-radius: 999px; background: var(--red) }
.barrow b { color: var(--ink) }
#tpanel table { width: 100%; border-collapse: collapse; font-size: 14px }
#tpanel th, #tpanel td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top }
#tpanel th { font: 600 11.5px/1.2 var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--mute) }
#tpanel tr.click { cursor: pointer }
#tpanel tr.click:hover td { background: var(--fill) }
#tpanel tr.here td { background: var(--soft) }
.strip { display: flex; gap: 4px; overflow-x: auto; background: var(--paper); border-radius: 16px; box-shadow: var(--shadow); padding: 8px }
.strip button { flex: 1 0 auto; min-width: 92px; border: 0; background: none; border-radius: 10px; padding: 8px 10px; text-align: left; cursor: pointer; display: grid; gap: 2px; font-size: 13px; color: var(--mute); border-top: 4px solid var(--line) }
.strip button b { font-weight: 600; color: var(--ink); font-size: 13px }
.strip button:hover { background: var(--fill) }
.strip button.on { border-top-color: var(--red); background: var(--soft) }

/* role play lead sheet (participant handout) */
.lead { border: 1.5px solid var(--line); border-radius: 12px; padding: 16px 18px; background: var(--fill); display: grid; gap: 12px; max-width: 680px }
.lead h3 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute) }
.lead dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0 }
.lead dt { font-weight: 700 } .lead dd { margin: 0; white-space: pre-line }
.lead p { margin: 4px 0 0; white-space: pre-line }
@media (max-width: 520px) { .lead dl { grid-template-columns: 1fr } .lead dd { margin-bottom: 6px } }
.leadlock { border: 1.5px dashed var(--line); border-radius: 12px; padding: 22px; text-align: center; color: var(--mute) }
