/* The team's own screens in Puzzle studio: the control screen (Control Room,
   CAE Dilemma), the Know BDO role cards, result squares, prize and services,
   and the follow-up card every final screen carries. Tokens and shared parts
   are in base.css and play.css. */

/* ---- Control: no clock while reading; the pillars as tiles on the band ---- */
.play.ctl-calm .qhead .timer { visibility: hidden; }
.band .steps.pillars { list-style: none; margin: 14px 0 0; padding: 0; }
.steps.pillars li { flex: 1; min-width: 0; display: grid; gap: 6px; }
.steps.pillars li.now { flex: 1.6; }
.steps.pillars li > i { flex: none; width: 100%; background: rgba(255, 255, 255, .28); }
.steps.pillars li.done > i { background: var(--white); }
.steps.pillars li.now > i { background: var(--red); }
.steps.pillars span { font-size: 13px; font-weight: 600; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.steps.pillars li.now span { font-weight: 700; }

.ctl { display: flex; flex-direction: column; flex: 1; }
.ctl .stage { gap: 12px; }
.ctl h2.prompt { font-size: 26px; font-weight: 900; letter-spacing: -0.02em; }
.ctl .setup { font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.ctl .ctl-go { margin-top: auto; padding-top: 8px; }
.ctl .ctl-go .hint { margin-bottom: 4px; }
.ctl .fb-foot { margin-top: auto; padding: 18px 22px 20px; display: grid; gap: 14px; }

/* What is at risk: the figure is the loudest thing on the card */
.ctl .atrisk { display: grid; gap: 2px; padding: 12px 16px 14px; border: 2px solid var(--line); border-radius: var(--r-tile); background: var(--card); }
.ctl .atrisk > span { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.ctl .atrisk > b { font: 900 36px/1.05 var(--display); letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.ctl .atrisk p { font-size: 14px; line-height: 1.4; color: var(--ink-2); }
.ctl .atrisk.long > b { font-size: 22px; letter-spacing: -0.01em; }
.ctl .atrisk .strong { font-size: 16px; font-weight: 600; color: var(--ink); }

/* The flow: nodes joined left to right; the link where it went wrong is red with a cross */
.flowbox { display: grid; gap: 12px; }
.flow { list-style: none; margin: 0; padding: 0; display: grid; align-items: center; }
.flow .node { display: grid; place-items: center; min-height: 56px; padding: 8px 4px; border: 2px solid var(--line); border-radius: 10px; background: var(--card); font-size: 13px; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; text-align: center; overflow-wrap: break-word; hyphens: auto; }
.flow .node.agent { border-color: var(--accent, var(--blue)); box-shadow: 0 var(--edge-sm) 0 var(--accent, var(--blue)); margin-bottom: var(--edge-sm); }
.flow .link { position: relative; height: 2px; background: var(--line-2); }
.flow .link::after { content: ''; position: absolute; right: -1px; top: 50%; width: 0; height: 0; border-left: 6px solid var(--line-2); border-top: 5px solid transparent; border-bottom: 5px solid transparent; transform: translateY(-50%); }
.flow .link.bad { height: 3px; background: var(--red-text); }
.flow .link.bad::after { border-left-color: var(--red-text); }
.flow .x, .flag .x { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--red-text); color: var(--white); flex: none; }
.flow .x { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.flow .x svg, .flag .x svg { width: 13px; height: 13px; }
.flag { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--ink); }
/* A dilemma's timeline runs down a rail */
.tline { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tline li { position: relative; padding-left: 24px; font-size: 14px; font-weight: 600; line-height: 1.35; }
.tline li::before { content: ''; position: absolute; left: 0; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--card); border: 3px solid var(--accent, var(--blue)); }
.tline li + li::after { content: ''; position: absolute; left: 5px; bottom: calc(100% - 3px); height: 14px; width: 2px; background: var(--line-2); }

details.again, details.whyd, details.srcs { font-size: 14px; color: var(--ink-2); }
details.again summary, details.whyd summary, details.srcs summary { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 700; color: var(--blue); cursor: pointer; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details.again summary::after, details.whyd summary::after, details.srcs summary::after { content: ''; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .15s; }
details[open] > summary::after { transform: rotate(-135deg) translateY(-1px); }
details.again p, details.whyd p { line-height: 1.5; padding-bottom: 4px; }

/* How the room voted: one card per option, a bar in its colour, the count; your vote named, no verdict */
.votes { padding: 0 22px; display: grid; gap: 10px; }
.votes .roomh { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.votes .roomh h3 { font-size: 18px; }
.votes .roomh span { font-size: 13px; color: var(--ink-3); }
.vsplit { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.vsplit li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; grid-template-areas: 'chip text ct' 'bar bar bar'; gap: 8px 10px; align-items: center; padding: 10px 12px 12px; border: 2px solid var(--line); border-radius: var(--r-tile); background: var(--card); }
.vsplit li.is-mine { border-color: var(--ink-2); }
.vsplit .chip { grid-area: chip; }
.vsplit .tx { grid-area: text; font-size: 14px; font-weight: 600; line-height: 1.3; }
.vsplit .tx small { display: block; margin-top: 2px; font-size: 13px; font-weight: 700; color: var(--ink); }
.vsplit .ct { grid-area: ct; min-width: 24px; text-align: right; font: 800 20px/1 var(--display); color: var(--ink-2); }
.vsplit .bar { grid-area: bar; height: 14px; border-radius: 5px; }
.vsplit .bar i { border-radius: 5px; }
.votes .hint { margin-top: 2px; }

/* The guidance: one card per call, then the take-away, then the score */
.calls { list-style: none; margin: 0; padding: 0 22px; display: grid; gap: 14px; }
.call { display: grid; gap: 10px; padding: 14px; border: 2px solid var(--line); border-radius: var(--r-sheet); background: var(--card); }
.call-h { display: flex; align-items: center; gap: 12px; }
.call-h b { font: 800 19px/1.1 var(--display); letter-spacing: -0.01em; }
.call .pts { margin-left: auto; min-width: 52px; height: 34px; padding: 0 10px; border-radius: 9px; display: grid; place-items: center; font: 900 17px/1 var(--display); font-variant-numeric: tabular-nums; background: var(--well); color: var(--ink-2); }
.call.yes .pts { background: var(--ok); color: var(--white); }
.call.part .pts { background: var(--o3); color: var(--ink); }
.call.no .pts { background: var(--red-soft); color: var(--red-text); }
.pk { display: grid; grid-template-columns: 30px minmax(0, 1fr) 22px; gap: 10px; align-items: center; padding: 8px 10px; border: 2px solid var(--line); border-radius: 12px; }
.pk .tx { font-size: 14px; font-weight: 600; line-height: 1.3; }
.pk .tx small { display: block; margin-top: 2px; font-size: 13px; font-weight: 700; color: var(--ink-3); }
.pk .vm { width: 22px; height: 22px; }
.pk.yes { border-color: var(--ok); } .pk.yes small, .pk.yes .vm { color: var(--ok); }
.pk.part { border-color: var(--o3); } .pk.part small { color: #6b4b00; }
.pk.no { border-color: var(--red-text); } .pk.no small, .pk.no .vm { color: var(--red-text); }
.pk.none { grid-template-columns: minmax(0, 1fr); border-style: dashed; border-color: var(--line-2); }
.call .room { display: grid; gap: 6px; margin-top: 6px; font-size: 13px; line-height: 1.4; color: var(--ink-3); }
.call .room .stack { display: flex; gap: 2px; height: 10px; border-radius: 4px; overflow: hidden; background: var(--well); }
.call .room .stack i { display: block; background: var(--c); }
.call .room b { font-weight: 800; font-size: 15px; color: var(--ink); }
.ctrl { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: start; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.ctrl .chip { background: var(--blue); }
.ctrl b, .call .why b { color: var(--ink); font-weight: 700; }
.call .why { font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.takeaway { margin: 2px 22px 0; padding: 18px; border-radius: var(--r-sheet); background: var(--blue-soft); display: grid; gap: 12px; }
.takeaway h3 { font-size: 18px; color: var(--blue-deep); }
.takeaway .obs { font-size: 15px; line-height: 1.5; font-weight: 600; color: var(--ink); }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.checklist button { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: start; width: 100%; min-height: 44px; padding: 10px 0; border: 0; background: none; font: 400 14px/1.4 var(--body); text-align: left; color: var(--ink); cursor: pointer; }
.checklist i { display: grid; place-items: center; width: 24px; height: 24px; margin-top: -1px; border: 2px solid var(--blue); border-radius: 6px; background: var(--white); color: var(--white); transition: background .12s; }
.checklist i svg { width: 14px; height: 14px; opacity: 0; }
.checklist button[aria-checked='true'] i { background: var(--blue); }
.checklist button[aria-checked='true'] i svg { opacity: 1; }
.ctl [tabindex='-1']:focus, .pz-card[tabindex='-1']:focus { outline: none; }
details.srcs { margin: 0 22px; }
details.srcs ul { margin: 0; padding: 0 0 6px 18px; display: grid; gap: 4px; font-size: 13px; line-height: 1.4; color: var(--ink-3); }
.ctl-score { margin: 4px 22px 0; padding-top: 16px; border-top: 2px solid var(--line); display: grid; gap: 6px; }
.ctl-score .big { font-size: 64px; }
.ctl-score p:last-child { font-size: 14px; color: var(--ink-2); text-wrap: balance; }
.ctl.debrief { gap: 16px; }
.debrief .stage { padding-bottom: 0; }
.debrief .takeaway, .debrief .ctl-score { margin-top: 0; }
.debrief .fb-foot { padding-top: 4px; }
@media (prefers-reduced-motion: no-preference) {
  .call { animation: rise 520ms cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(150ms + var(--i, 0) * 90ms); }
}

/* ---- Know BDO: four role cards, two by two ---- */
.roles { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.opt.role { flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 22px; min-height: 136px; padding: 16px 14px; font: 900 clamp(16px, 5vw, 22px)/1.1 var(--display); letter-spacing: -0.01em; overflow-wrap: anywhere; }
.opt.role .txt { min-width: 0; }
.opt.role .chip { width: 44px; height: 44px; border-radius: 11px; } .opt.role .chip svg { width: 22px; height: 22px; }
.opt.role[aria-pressed='true'] { border-color: var(--c); }
.roles-note { min-height: 22px; font-size: 14px; color: var(--ink-3); }

/* Result squares: one per question, green with a tick or red-edged with a cross */
.kb { display: grid; gap: 12px; }
.kb ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.kb li { aspect-ratio: 1; max-height: 72px; display: grid; place-items: center; border: 2px solid var(--line); border-radius: 12px; background: var(--well); color: var(--ink-3); box-shadow: 0 4px 0 var(--line-2); margin-bottom: 4px; }
.kb li.r { background: var(--ok); border-color: var(--ok); color: var(--white); box-shadow: 0 4px 0 var(--ok-deep); }
.kb li.w { background: var(--card); border-color: var(--red-text); color: var(--red-text); box-shadow: 0 4px 0 var(--red-text); }
.kb li svg { width: 28px; height: 28px; }
.kb .kbline { font-size: 15px; color: var(--ink-2); }
.kb .kbline b { font: 900 18px/1 var(--display); color: var(--ink); }

/* Prizes */
.pz-note { padding: 14px 16px; border-radius: var(--r-tile); background: var(--well); font-size: 14px; color: var(--ink-2); }
.pz-note .btn { margin-top: 10px; }
.prize { display: grid; }
.prize.special .flood { background: var(--ok); color: var(--white); padding: 18px 18px calc(var(--cut) + 34px); border-radius: var(--r-sheet) var(--r-sheet) 0 0; clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), 0 100%); }
.prize.special .verdict { display: flex; align-items: center; gap: 12px; }
.prize.special .tick { width: 44px; height: 44px; border-radius: 50%; background: var(--white); color: var(--ok); display: grid; place-items: center; flex: none; }
.prize.special .tick svg { width: 24px; height: 24px; }
.prize.special .verdict b { font: 900 26px/1.05 var(--display); letter-spacing: -0.02em; }
.pz-won { margin-top: 14px; font-size: 14px; font-weight: 600; }
.pz-name { font: 900 30px/1.08 var(--display); letter-spacing: -0.02em; text-wrap: balance; }
.pz-code { position: relative; display: grid; gap: 4px; justify-items: center; text-align: center; padding: 14px 16px 16px; border: 2px solid var(--line); border-radius: var(--r-tile); background: var(--card); color: var(--ink); }
.prize.special .pz-code { margin: calc(-1 * var(--cut) - 22px) 14px 0; box-shadow: 0 6px 0 var(--ok-deep); }
.pz-code > span { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.pz-code b { font: 900 52px/1 var(--display); letter-spacing: 0.12em; padding-left: 0.12em; font-variant-numeric: tabular-nums; }
.pz-code small { font-size: 13px; line-height: 1.4; color: var(--ink-2); }
.pz-card { display: grid; gap: 8px; padding: 18px; border: 2px solid var(--line); border-radius: var(--r-sheet); background: var(--card); box-shadow: 0 6px 0 var(--blue); margin-bottom: 6px; text-align: center; }
.pz-card .pz-won { margin: 0; color: var(--ink-3); }
.pz-card .pz-name { color: var(--ink); }
.pz-card .pz-code { border: 0; padding: 8px 0 0; border-top: 2px solid var(--line); border-radius: 0; }
.pz-card.none h3 { font-size: 24px; letter-spacing: -0.02em; }
.pz-card.none .pz-line { font-size: 15px; color: var(--ink-2); }

/* A prize kept for the day, on the intro and on a practice final */
.pz-strip { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 14px; border: 2px solid var(--ok); border-radius: var(--r-tile); background: var(--card); box-shadow: 0 var(--edge-sm) 0 var(--ok-deep); margin-bottom: var(--edge-sm); }
.pz-strip .chip { background: var(--ok); }
.pz-strip p { font-size: 14px; line-height: 1.4; color: var(--ink-2); }
.pz-strip p b { display: block; font: 800 17px/1.2 var(--display); letter-spacing: -0.01em; color: var(--ink); }
.pz-strip p b.num { display: inline; font-size: 16px; letter-spacing: 0.08em; }

/* The wheel: segments in the option colours, the red marker at the top, a white disc on its edge */
.wheel-wrap { display: grid; gap: 18px; justify-items: center; }
.wheel { position: relative; width: 260px; height: 260px; border-radius: 50%; background: var(--card); box-shadow: 0 0 0 2px var(--line), 0 6px 0 var(--line-2); margin: 14px 0 6px; }
.wheel .disc { width: 260px; height: 260px; transform: rotate(var(--rot, 0deg)); transition: transform 2.6s cubic-bezier(.12, .72, .16, 1); }
.wheel .disc text { font: 700 13px var(--body); }
.wheel .ptr { position: absolute; left: 50%; top: -14px; width: 28px; height: 32px; transform: translateX(-50%); }
.wheel-wrap .btn, .wheel-wrap .pz-card { width: 100%; }

/* How BDO can help: each service is a card that opens its page */
.help { display: grid; gap: 10px; }
.help h3 { font-size: 20px; }
.svc { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.svc a, .svc .s { display: grid; gap: 3px; min-height: 44px; padding: 12px 14px; border: 2px solid var(--line); border-radius: var(--r-tile); background: var(--card); color: var(--ink); text-decoration: none; }
.svc a { box-shadow: 0 var(--edge-sm) 0 var(--line-2); margin-bottom: var(--edge-sm); transition: transform .08s, box-shadow .08s; }
.svc a:active { transform: translateY(var(--edge-sm)); box-shadow: 0 0 0 var(--line-2); }
.svc b { font-size: 15px; font-weight: 700; line-height: 1.3; color: var(--blue); }
.svc small { font-size: 13px; line-height: 1.4; color: var(--ink-3); }

/* The follow-up card on every final screen */
.followup { display: grid; gap: 14px; padding: 16px; border: 2px solid var(--line); border-radius: var(--r-sheet); background: var(--card); }
.followup p { font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.followup p b { display: block; margin-bottom: 4px; font: 800 20px/1.15 var(--display); letter-spacing: -0.01em; color: var(--ink); }
.followup .btn { margin-bottom: var(--edge); }
.followup.done { grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 12px; }
.followup.done .chip { background: var(--blue); }
.followup.done p { color: var(--ink); font-weight: 600; }

