/* scorecard (v2.4.0) */

/* ==========================================================================================================================
   The room (v2.4.0): the facilitator's side of the scorecard. Big screen "Teams compared" (.screen-room-*), the money story on
   "Strategies compared" (.screen-money-*), the control room's debrief guide (.room-*) and the printed debrief sheet (.print-room-*).
   A band against HSO's path is coloured calmly: teal ahead, neutral on the path, amber behind, a deeper amber well behind. Red never
   marks a band: being behind HSO's path is a difference to talk about, not an alarm (CLAUDE.md principle 1).
   ========================================================================================================================== */

/* ---------- big screen: Teams compared ---------- */
.screen-room { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; gap: calc(var(--u) * .9); min-height: 0; }
.screen-room .screen-board-head { margin-bottom: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: end; gap: calc(var(--u) * 2.4); }
.screen-room .screen-lede.screen-room-lede { color: #fff; font-weight: 600; font-size: calc(var(--u) * 1.2); max-width: none; line-height: 1.3; margin: 0 0 calc(var(--u) * .35); }
.screen-room-table { display: grid; grid-template-rows: auto repeat(var(--n, 4), minmax(0, 1fr)); gap: calc(var(--u) * .45); min-height: 0; }
.screen-room-row {
  display: grid; align-items: center; gap: calc(var(--u) * .8);
  grid-template-columns: calc(var(--u) * 2.2) minmax(0, 3.35fr) repeat(5, minmax(0, 1fr)) minmax(0, 1.1fr);
  padding: calc(var(--u) * .5) calc(var(--u) * 1) calc(var(--u) * .5) calc(var(--u) * .6); border-radius: calc(var(--u) * 1); background: var(--panel);
  border: 1px solid rgba(255, 255, 255, .1); border-left: calc(var(--u) * .25) solid var(--c);
  animation: screen-slide .8s var(--ease) both; animation-delay: calc(var(--i) * 110ms); min-height: 0; overflow: hidden;
}
.screen-room-row.is-head { background: none; border: 0; padding-top: 0; padding-bottom: 0; animation: none; font-size: var(--t-min); font-weight: 700; color: var(--on-dark-2); align-items: end; line-height: 1.2; }
.screen-room-ph { display: flex; align-items: center; justify-content: center; gap: calc(var(--u) * .4); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.screen-room-ph i { flex: none; width: calc(var(--u) * .7); height: calc(var(--u) * .7); border-radius: 50%; }
.screen-room-ph.is-index { color: #fff; }
.screen-room-team { min-width: 0; }
.screen-room-name { display: flex; align-items: baseline; gap: calc(var(--u) * .7); min-width: 0; font-size: calc(var(--u) * 1.4); font-weight: 700; line-height: 1.15; }
.screen-room-name span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: none; max-width: 60%; }
.screen-room-name small { font-size: var(--t-min); font-weight: 650; color: var(--on-dark-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.screen-room-story { font-size: var(--t-min); color: var(--on-dark-2); line-height: 1.3; margin-top: calc(var(--u) * .25);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.screen-room-cell {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-width: 0;
  border-radius: calc(var(--u) * .7); padding: calc(var(--u) * .45) calc(var(--u) * .4); min-height: calc(var(--u) * 4.2);
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1);
}
.screen-room-cell b { font-size: calc(var(--u) * 1.3); font-weight: 750; line-height: 1.1; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.screen-room-cell small { font-size: var(--t-min); font-weight: 700; color: var(--on-dark-2); font-variant-numeric: tabular-nums; line-height: 1.15; margin-top: calc(var(--u) * .15); }
.screen-room-cell.is-ahead { background: rgba(0, 189, 157, .14); border-color: rgba(0, 189, 157, .45); }
.screen-room-cell.is-ahead b { color: var(--teal-on-navy-text); }
.screen-room-cell.is-wellAhead { background: rgba(0, 189, 157, .28); border-color: rgba(0, 189, 157, .75); }
.screen-room-cell.is-wellAhead b { color: #B5F5E7; }
.screen-room-cell.is-behind { background: rgba(242, 185, 73, .13); border-color: rgba(242, 185, 73, .45); }
.screen-room-cell.is-behind b { color: #F7D58E; }
.screen-room-cell.is-wellBehind { background: rgba(242, 185, 73, .3); border-color: rgba(242, 185, 73, .85); }
.screen-room-cell.is-wellBehind b { color: #FFE3A6; }
.screen-room-cell.is-index { border-width: 2px; }
.screen-room-cell.is-index b { font-size: calc(var(--u) * 1.4); }
.screen-room-cell.is-none b { color: var(--on-dark-2); }
/* six to eight teams: one line of story, lower cells */
.screen-room.is-dense .screen-room-table { gap: calc(var(--u) * .4); }
.screen-room.is-dense .screen-room-row:not(.is-head) { padding-top: calc(var(--u) * .4); padding-bottom: calc(var(--u) * .4); }
.screen-room.is-dense .screen-room-story { -webkit-line-clamp: 1; }
.screen-room.is-dense .screen-room-cell { min-height: calc(var(--u) * 3.3); padding-top: calc(var(--u) * .25); padding-bottom: calc(var(--u) * .25); }
/* seven or eight teams: the name and its story on one line, each cell on one line */
.screen-room.is-xdense .screen-room-cell { flex-direction: row; gap: calc(var(--u) * .3); min-height: 0; padding: calc(var(--u) * .2) calc(var(--u) * .2); }
.screen-room.is-xdense .screen-room-cell b { font-size: calc(var(--u) * 1.05); }
.screen-room.is-xdense .screen-room-cell small { margin-top: 0; font-size: calc(var(--u) * .95); flex: none; }
.screen-room.is-xdense .screen-room-row:not(.is-head) { padding-top: calc(var(--u) * .25); padding-bottom: calc(var(--u) * .25); }
.screen-room.is-xdense .screen-room-team { display: flex; align-items: baseline; gap: calc(var(--u) * .7); }
.screen-room.is-xdense .screen-room-name { font-size: calc(var(--u) * 1.2); flex: none; max-width: 45%; }
.screen-room.is-xdense .screen-room-name span { max-width: 100%; }
.screen-room.is-xdense .screen-room-name small { display: none; }
.screen-room.is-xdense .screen-room-story { margin: 0; flex: 1; min-width: 0; display: block; white-space: nowrap; text-overflow: ellipsis; }

/* worth a question: the room's contrasts */
.screen-room-worth { display: flex; flex-direction: column; gap: calc(var(--u) * .5);
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .12); border-radius: calc(var(--u) * 1.1); padding: calc(var(--u) * .9) calc(var(--u) * 1.2); }
.screen-room-worth-h { margin: 0; }
.screen-room-contrasts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: calc(var(--u) * 1.4); }
.screen-room-worth.has-1 .screen-room-contrasts { grid-template-columns: minmax(0, 1fr); }
.screen-room-worth.has-2 .screen-room-contrasts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.screen-room-contrasts li { display: flex; gap: calc(var(--u) * .6); min-width: 0; animation: screen-rise .8s var(--ease) both; animation-delay: calc(var(--i) * 140ms + 400ms); }
.screen-room-dot { flex: none; width: calc(var(--u) * .8); height: calc(var(--u) * .8); border-radius: 50%; margin-top: calc(var(--u) * .4); }
.screen-room-contrasts b { display: block; font-size: calc(var(--u) * 1.3); font-weight: 750; line-height: 1.25; color: #fff; }
.screen-room-contrasts span { display: block; font-size: var(--t-min); color: var(--on-dark-2); line-height: 1.3; margin-top: calc(var(--u) * .2); }
.screen-room-none, .screen-room-onpath { margin: 0; font-size: var(--t-min); color: var(--on-dark-2); line-height: 1.3; }
.screen-room-none { font-size: calc(var(--u) * 1.3); color: #fff; font-weight: 650; }
.screen-room.is-dense .screen-room-contrasts span { display: none; }

/* ---------- big screen: Strategies compared, the money story ---------- */
.screen-strat-row.screen-money-row { grid-template-columns: calc(var(--u) * 2.6) minmax(0, 1.55fr) minmax(0, 1.2fr) minmax(0, .9fr) minmax(0, .85fr) minmax(0, 1.1fr) minmax(0, 1.25fr) minmax(0, .55fr); }
.screen-strat-table.has-growth .screen-strat-row.screen-money-row { grid-template-columns: calc(var(--u) * 2.6) minmax(0, 1.5fr) minmax(0, 1.1fr) minmax(0, .85fr) minmax(0, .8fr) minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, .55fr) minmax(0, .65fr); }
.screen-money-row.is-head .screen-money-hero { color: #fff; }
.screen-money-leader { color: var(--teal-on-navy-text); }
.screen-money-locked { display: flex; flex-direction: column; gap: calc(var(--u) * .35); min-width: 0; }
.screen-money-locked b { font-size: calc(var(--u) * 1.9); font-weight: 800; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; color: #fff; white-space: nowrap; }
/* the rows share the height left, so a fourth or sixth team never drops off the bottom */
.screen-strat.screen-money { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; }
.screen-money .screen-strat-table { display: grid; grid-template-rows: auto repeat(var(--n, 4), minmax(0, 1fr)) auto; align-content: start; }
.screen-money .screen-strat-row:not(.is-head) { min-height: 0; overflow: hidden; }
.screen-money .screen-out-tags.is-one { margin-top: calc(var(--u) * .2); }
/* the share of the potential value is in the control room; here the value a year beside it says enough */
.screen-money .screen-strat-e2e small { display: none; }
/* four slide names in the footer: the full-screen button keeps to one line, and who is online gives way in the debrief */
.screen-foot .screen-fs { white-space: nowrap; flex: none; }
.screen-ph-debrief .screen-foot-online { display: none; }
.screen-money-fig { display: flex; flex-direction: column; align-items: flex-end; text-align: right; min-width: 0; }
.screen-money-fig b { font-size: calc(var(--u) * 1.4); font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; color: #fff; line-height: 1.15; }
.screen-money-fig.is-up b { color: var(--teal-on-navy-text); }
.screen-money-fig small { font-size: var(--t-min); font-weight: 650; color: var(--on-dark-2); white-space: nowrap; line-height: 1.2; }
.screen-strat-table.is-dense .screen-money-locked b { font-size: calc(var(--u) * 1.6); }
.screen-strat-table.is-dense .screen-money-fig small { display: none; }

/* ---------- control room: a band against HSO's path as a chip (the guide, the leaderboard) ---------- */
.room-band { display: inline-flex; align-items: baseline; gap: 6px; border-radius: 8px; padding: 3px 8px; font-size: var(--fs-sm); line-height: 1.25;
  background: var(--band); border: 1px solid var(--hairline); color: var(--ink); white-space: nowrap; }
.room-band em { font-style: normal; color: var(--muted); font-weight: var(--fw-strong); }
.room-band b { font-weight: var(--fw-bold); }
.room-band small { font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; font-weight: var(--fw-strong); }
.room-band.is-ahead { background: var(--teal-soft); border-color: var(--teal-line); }
.room-band.is-ahead b { color: var(--teal-ink); }
.room-band.is-wellAhead { background: #CDEFE7; border-color: var(--teal-ui); }
.room-band.is-wellAhead b { color: var(--teal-deep); }
.room-band.is-behind { background: var(--amber-soft); border-color: var(--amber-line); }
.room-band.is-behind b { color: var(--amber-ink); }
.room-band.is-wellBehind { background: #F8E2AE; border-color: var(--amber-ui); }
.room-band.is-wellBehind b, .room-band.is-wellBehind small { color: var(--amber-ink); }
.admin-lb-right { display: inline-flex; align-items: baseline; gap: 10px; }
.room-band-lb { font-size: var(--fs-xs); padding: 1px 7px; }
.room-lb-promise { font-size: var(--fs-xs); color: var(--muted); font-weight: var(--fw-strong); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- control room: the debrief guide ---------- */
.room-guide { margin-top: 20px; }
.room-guide-head { flex-wrap: wrap; }
.room-guide-head .grow { min-width: 280px; max-width: 760px; }
.room-guide-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.room-k { font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.room-k-teams { margin-top: 18px; }
.room-guide-room { background: var(--band); border-radius: 12px; padding: 14px 16px; }
.room-contrasts { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px 24px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.room-contrasts li { display: flex; gap: 10px; min-width: 0; }
.room-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; }
.room-contrast-head { font-weight: var(--fw-bold); color: var(--ink); line-height: 1.35; }
.room-contrast-why { font-size: var(--fs-sm); color: var(--ink-2); margin-top: 2px; line-height: 1.4; }
.room-ask { font-size: var(--fs-sm); margin-top: 6px; line-height: 1.4; }
.room-ask-k { display: block; font-weight: var(--fw-bold); color: var(--teal-ink); }
.room-ask-q { color: var(--ink); }
.room-onpath { margin-top: 10px; }
.room-teams { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(520px, 1fr)); }
@media (max-width: 720px) { .room-teams { grid-template-columns: minmax(0, 1fr); } }
.room-team { border: 1px solid var(--hairline); border-left: 4px solid var(--c); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; background: var(--surface); }
.room-team-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.room-sw { display: none; }
.room-team-name { flex: 1; min-width: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; }
.room-team-name b { color: var(--ink); font-size: var(--fs-base); }
.room-team-name span { font-size: var(--fs-sm); color: var(--muted); }
.room-team-story { margin: 0; font-size: var(--fs-md); color: var(--ink); line-height: 1.4; font-weight: var(--fw-strong); }
/* the five scores as a strip of equal cells: the score, then its word and gap (the big screen's row in small) */
.room-bands { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.room-bands .room-band { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 0 4px; padding: 4px 7px; white-space: nowrap; min-width: 0; }
.room-bands .room-band em { grid-column: 1 / -1; font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; }
.room-bands .room-band b { overflow: hidden; text-overflow: ellipsis; }
.room-team-facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; font-size: var(--fs-sm); }
.room-team-facts dt { font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.room-team-facts dd { margin: 2px 0 0; color: var(--ink); line-height: 1.4; }
.room-why { color: var(--ink-2); font-size: var(--fs-xs); margin-top: 2px; }
.room-team-ask { background: var(--tint); border-radius: 10px; padding: 8px 12px; }
.room-team-ask .room-k { color: var(--teal-ink); margin-bottom: 4px; }
.room-team-ask ol { margin: 0; padding-left: 18px; font-size: var(--fs-sm); color: var(--ink); line-height: 1.45; }
.room-team-ask li + li { margin-top: 3px; }
.room-team-foot { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 4px 8px; font-size: var(--fs-xs); color: var(--muted); border-top: 1px solid var(--hairline); padding-top: 8px; margin-top: auto; }
.room-team-foot .room-foot-money { grid-column: 1 / -1; }
.room-promise { font-weight: var(--fw-bold); border-radius: 6px; padding: 1px 7px; font-size: var(--fs-xs); }
.room-promise.is-met { background: var(--teal-soft); color: var(--teal-deep); }
.room-promise.is-partly { background: var(--amber-soft); color: var(--amber-ink); }
.room-promise.is-missed { background: var(--salmon-soft); color: var(--salmon-ink); }
.room-foot-money { color: var(--ink-2); font-weight: var(--fw-strong); }

/* ---------- print: the debrief sheet, every team on one A4 page in landscape ---------- */
@page print-a4-landscape { size: A4 landscape; margin: 8mm; }
/* one page for up to six teams in either language; more flow onto a second page rather than being cut off */
.print-sheet.print-sheet-room { width: 297mm; height: auto; min-height: 210mm; overflow: visible; padding: 8mm; page: print-a4-landscape; font-size: 7.3pt; line-height: 1.3; display: flex; flex-direction: column; gap: 2.4mm; }
.print-sheet-room .print-team-head { padding-bottom: 2.5mm; }
.print-room-audience { margin: 0; font-size: 7.6pt; color: var(--print-grey); }
.print-room-worth { border: .25mm solid var(--print-line); border-radius: 2mm; padding: 2mm 3mm; background: #F6F8FA; }
.print-room-worth h2 { margin: 0 0 1.4mm; font-size: 6.8pt; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--teal-ink); }
.print-room-worth ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4mm; }
.print-room-worth li { display: flex; flex-direction: column; gap: .5mm; }
.print-room-worth b { color: var(--print-ink); font-size: 8pt; line-height: 1.3; }
.print-room-worth span { color: var(--print-grey); }
.print-room-q em { font-style: normal; font-weight: 700; color: var(--teal-ink); }
.print-room-worth p { margin: 1.4mm 0 0; color: var(--print-muted); }
.print-room-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.print-room-table th { text-align: left; font-size: 6.6pt; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--print-muted); padding: 0 2mm 1.2mm; border-bottom: .3mm solid var(--print-ink); }
.print-room-table th:nth-child(1) { width: 17%; }
.print-room-table th:nth-child(2) { width: 26%; }
.print-room-table th:nth-child(3) { width: 17%; }
.print-room-table th:nth-child(4) { width: 27%; }
.print-room-table th:nth-child(5) { width: 13%; }
.print-room-table td { vertical-align: top; padding: 1.5mm 2mm; border-bottom: .2mm solid var(--print-line); }
.print-room-team { border-left: 1.2mm solid var(--c); }
.print-room-team b { display: block; color: var(--print-ink); font-size: 9pt; }
.print-room-team > span { display: block; color: var(--print-muted); font-size: 6.8pt; }
.print-room-team p { margin: 1mm 0 0; color: var(--print-ink); font-weight: 600; }
.print-room-cells { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1mm; }
.print-room-cell { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 1mm; align-items: baseline; border-radius: 1mm; padding: .6mm 1.2mm; background: #F1F4F7; border: .2mm solid #E1E7EC; min-width: 0; }
.print-room-cell em { grid-column: 1 / -1; font-style: normal; font-size: 6.2pt; color: var(--print-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.print-room-cell b { color: var(--print-ink); font-size: 7.2pt; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.print-room-cell small { font-size: 6.6pt; color: var(--print-muted); font-variant-numeric: tabular-nums; }
.print-room-cell.is-ahead { background: var(--teal-soft); border-color: var(--teal-line); }
.print-room-cell.is-ahead b { color: var(--teal-ink); }
.print-room-cell.is-wellAhead { background: #CDEFE7; border-color: var(--teal-ui); }
.print-room-cell.is-wellAhead b { color: var(--teal-deep); }
.print-room-cell.is-behind { background: var(--amber-soft); border-color: var(--amber-line); }
.print-room-cell.is-behind b { color: var(--amber-ink); }
.print-room-cell.is-wellBehind { background: #F8E2AE; border-color: var(--amber-ui); }
.print-room-cell.is-wellBehind b, .print-room-cell.is-wellBehind small { color: var(--amber-ink); }
.print-room-cell.is-index { border-width: .4mm; }
.print-room-why div + div { margin-top: 1.2mm; }
.print-room-why em { display: block; font-style: normal; font-size: 6.2pt; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--print-muted); }
.print-room-why b { color: var(--print-ink); }
.print-room-why span { display: block; font-size: 6.8pt; color: var(--print-grey); }
.print-room-ask ol { margin: 0; padding-left: 3.6mm; color: var(--print-ink); }
.print-room-ask li + li { margin-top: .8mm; }
.print-room-promise b, .print-room-promise span { display: block; }
.print-room-pr { font-size: 7.2pt; }
.print-room-pr.is-met { color: var(--teal-ink); }
.print-room-pr.is-partly { color: var(--amber-ink); }
.print-room-pr.is-missed { color: var(--salmon-ink); }
.print-room-promise span { font-size: 6.6pt; color: var(--print-grey); margin-top: .4mm; }
.print-room-money { font-weight: 600; color: var(--print-ink) !important; margin-top: 1.2mm !important; }
.print-sheet-room.is-dense { font-size: 6.8pt; gap: 1.8mm; }
.print-sheet-room.is-dense .print-room-table td { padding-top: 1.2mm; padding-bottom: 1.2mm; }
@media print {
  .print-sheet.print-sheet-room { width: 281mm; height: auto; min-height: 194mm; padding: 0; break-inside: auto; }
}

/* scorecard (v2.4.0): the debrief's "How did you do?" and "Where did the money go?", the closing questions, a round's "Where did your
   profit go?" and the index against HSO's path on the verdict (player/scorecard-view.js). Calm colours (CLAUDE.md principle 1): teal
   ahead of HSO's path, neutral on it, amber behind; salmon only for a real cost (an incident). The pillar hues mark the pillars. */

/* ---------- shared bits ---------- */
.sc-k { font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sc-band { display: inline-flex; align-items: baseline; gap: 4px; padding: 2px 9px; border-radius: var(--radius-pill); font-size: var(--fs-xs); font-weight: var(--fw-bold); white-space: nowrap; background: var(--band-2); color: var(--ink-2); }
.sc-band small { font-size: 11px; font-weight: var(--fw-strong); font-variant-numeric: tabular-nums; }
.sc-band.is-ahead { background: var(--teal-soft); color: var(--teal-deep); }
.sc-band.is-behind { background: var(--amber-soft); color: var(--amber-ink); }
.sc-key { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; margin-right: 5px; }
.sc-key.is-hso { width: 3px; height: 12px; border-radius: 1px; background: var(--ink); }
.sc-key.is-start { width: 0; height: 12px; border-left: 2px dashed var(--border-strong); border-radius: 0; }
.sc-key.is-spent { background: var(--steel); }
.sc-key.is-left { background: var(--band-2); box-shadow: inset 0 0 0 1px var(--border); }
.sc-logic { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 7px 12px; border-radius: var(--radius-sm); background: var(--tint); color: var(--ink); font-size: var(--fs-xs); line-height: 1.45; }
.sc-logic svg { flex: none; margin-top: 1px; color: var(--steel); }

/* ---------- how did you do? ---------- */
.sc-score { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 18px; align-items: start; }
.sc-index { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px 14px; border-radius: var(--radius); background: var(--band); }
.sc-index-k { font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--muted); }
.sc-index-main { display: flex; align-items: baseline; gap: 6px; }
.sc-index-v { font-size: 40px; line-height: 1; font-weight: var(--fw-heavy); color: var(--ink); font-variant-numeric: tabular-nums; }
.sc-index-of { font-size: var(--fs-xs); color: var(--muted); }
.sc-index-list { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: var(--fs-xs); color: var(--ink-2); line-height: 1.35; }
.sc-index-list li { display: flex; align-items: center; }
.sc-index-say { color: var(--muted); }
.sc-index-rank { font-weight: var(--fw-bold); color: var(--ink); }

.sc-pillars { min-width: 0; }
.sc-row { display: grid; grid-template-columns: minmax(196px, 1fr) minmax(120px, .7fr) 128px minmax(0, 2.3fr); column-gap: 14px; align-items: center; }
.sc-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.sc-row { padding: 4px 10px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--hairline); min-height: 42px; }
.sc-row.is-behind { border-color: var(--amber-line); }
.sc-row.is-ahead { border-color: var(--teal-line); }
.sc-name { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sc-name b { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; font-size: var(--fs-sm); color: var(--ink); }
.sc-name > span { font-size: var(--fs-xs); color: var(--muted); line-height: 1.3; }
.sc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.sc-tag { padding: 0 7px; border-radius: var(--radius-pill); font-size: 10.5px; font-weight: var(--fw-bold); letter-spacing: .02em; line-height: 17px; }
.sc-tag.is-strong { background: var(--teal-soft); color: var(--teal-deep); }
.sc-tag.is-weak { background: var(--amber-soft); color: var(--amber-ink); }
.sc-bar { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sc-bar-track { position: relative; flex: 1; height: 10px; border-radius: 5px; background: var(--band-2); }
.sc-bar-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: var(--c); opacity: .85; }
.sc-mark { position: absolute; top: -4px; bottom: -4px; margin-left: -1.5px; }
.sc-mark.is-hso { width: 3px; border-radius: 1px; background: var(--ink); box-shadow: 0 0 0 1.5px var(--surface); }
.sc-mark.is-start { width: 0; margin-left: -1px; border-left: 2px dashed var(--border-strong); }
.sc-bar-v { flex: none; min-width: 22px; text-align: right; font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--ink); font-variant-numeric: tabular-nums; }
.sc-band-cell { min-width: 0; }
.sc-read { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: var(--fs-xs); line-height: 1.35; }
.sc-reading { color: var(--ink-2); }
.sc-moved { color: var(--ink); }
.sc-moved.is-none { color: var(--muted); }
.sc-moved-k { margin-right: 6px; font-weight: var(--fw-bold); color: var(--muted); }
.sc-moved-k::after { content: ':'; }
.sc-sep { margin: 0 6px; color: var(--muted); }
.sc-delta { font-weight: var(--fw-bold); white-space: nowrap; font-variant-numeric: tabular-nums; }
.sc-delta.is-cost { color: var(--amber-ink); }
.sc-delta.is-gain { color: var(--teal-ink); }
.sc-score.is-plain { grid-template-columns: 210px minmax(0, 1fr); }

/* ---------- where did the money go? (debrief) and where did your profit go? (results) ---------- */
.sc-money { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; align-items: start; }
.sc-money-side { display: flex; flex-direction: column; gap: 10px; }
.sc-money-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sc-budget, .sc-exit, .sc-promise { padding: 9px 14px; border-radius: var(--radius); background: var(--band); }
.sc-budget .sc-k, .sc-exit .sc-k, .sc-promise .sc-k { font-size: var(--fs-sm); letter-spacing: 0; text-transform: none; color: var(--ink); }
.sc-budget-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.sc-budget-head b { flex: none; white-space: nowrap; font-size: var(--fs-lg); font-weight: var(--fw-heavy); color: var(--ink); font-variant-numeric: tabular-nums; }
.sc-budget-sub { margin-top: 2px; font-size: var(--fs-xs); color: var(--ink-2); line-height: 1.4; }
.sc-budget-bar { margin: 8px 0 6px; height: 10px; border-radius: 5px; background: var(--band-2); box-shadow: inset 0 0 0 1px var(--border); overflow: hidden; }
.sc-budget-bar i { display: block; height: 100%; background: var(--steel); }
.sc-budget-list { margin: 0; display: flex; flex-direction: column; gap: 3px; font-size: var(--fs-xs); }
.sc-budget-list div { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: baseline; }
.sc-budget-list dt { display: flex; align-items: center; font-weight: var(--fw-bold); color: var(--ink); white-space: nowrap; }
.sc-budget-list dd { margin: 0; color: var(--muted); text-align: right; }
.sc-budget-list dd b { color: var(--ink); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.sc-budget-list dd span { display: block; line-height: 1.35; }
.sc-budget-head b.sc-exit-v { color: var(--teal-deep); }
.sc-promise-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 2px; }
.sc-promise-table { width: 100%; border-collapse: collapse; font-size: var(--fs-xs); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.sc-promise-table th, .sc-promise-table td { padding: 1px 0; text-align: right; font-weight: var(--fw-regular); }
.sc-promise-table thead th { font-size: 11px; color: var(--muted); }
.sc-promise-table tbody th { text-align: left; font-weight: var(--fw-bold); color: var(--ink); }
.sc-promise-table td b { color: var(--ink); }
.sc-promise-mark { width: 22px; color: var(--teal-ink); }
.sc-promise-mark span { display: inline-flex; vertical-align: -2px; }
.sc-promise-table tr.is-short .sc-promise-mark { color: var(--amber-ink); }
.sc-promise-note { margin: 4px 0 0; font-size: 11.5px; color: var(--muted); line-height: 1.35; }

.sc-fall.results-bx-chart { padding-top: 16px; max-width: none; column-gap: 8px; }
.sc-fall .results-bx-plot { height: 124px; }
.sc-fall .results-bx-lbl { margin-top: 5px; font-weight: var(--fw-strong); }
.results-bx.is-warn .results-bx-bar { background: var(--amber); }
.results-bx.is-warn .results-bx-v { color: var(--amber-ink); }

.sc-profit { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 20px; align-items: start; }
.sc-profit-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sc-profit-side { display: flex; flex-direction: column; gap: 10px; }
.sc-profit .sc-fall .results-bx-plot { height: 112px; }

/* ---------- the verdict's index against HSO's path ---------- */
.sc-verdict-path { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 8px; margin: -8px 0 2px; text-align: center; font-size: var(--fs-xs); color: var(--ink-2); }

/* ---------- the closing questions ---------- */
.sc-prompts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sc-prompts li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 18px; border-radius: var(--radius); background: var(--tint); border-left: 4px solid var(--teal-ui); font-size: var(--fs-lg); font-weight: var(--fw-strong); line-height: 1.4; color: var(--ink); }
.sc-prompt-n { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface); color: var(--teal-deep); font-size: var(--fs-sm); font-weight: var(--fw-heavy); }
.debrief-close.has-prompts { max-width: none; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 4px 24px; align-items: start; }
.sc-close-next { display: flex; flex-direction: column; gap: 4px; }
.sc-close-next .debrief-sub-k:not(:first-child) { margin-top: 8px; }
.debrief-close.has-prompts .debrief-walk { font-size: var(--fs-md); padding: 8px 14px; gap: 10px; }
.debrief-close.has-prompts .debrief-teasers li { padding: 6px 12px; font-size: var(--fs-sm); line-height: 1.4; }
.debrief-close.has-prompts .debrief-close-foot { grid-column: 1 / -1; margin-top: 6px; }

/* ---------- the money logic where the budget is shown (Build's plan panel, Evaluate's promise readout) ---------- */
.build-pm-logic { margin: 5px 0 0; font-size: 11.5px; line-height: 1.35; color: var(--muted); }
.sc-logic-line { display: flex; gap: 6px; align-items: flex-start; margin: 6px 0 0; font-size: var(--fs-xs); line-height: 1.4; color: var(--muted); }
.sc-logic-line svg { flex: none; margin-top: 1px; color: var(--steel); }

/* ---------- narrower windows ---------- */
@media (max-width: 1100px) {
  .sc-score, .sc-money, .sc-profit { grid-template-columns: minmax(0, 1fr); }
  .sc-index { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
  .sc-index-list { flex-direction: row; flex-wrap: wrap; gap: 4px 12px; }
}
@media (max-width: 760px) {
  .sc-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; }
  .sc-bar { grid-column: 1 / -1; grid-row: 2; }
  .sc-read { grid-column: 1 / -1; }
}
