/* Prioritisation and roadmap pieces, on top of the shared Daylight styles (tokens.css, styles.css). */

/* statuses */
.pill.discuss { background: var(--wrong-soft); color: var(--wrong-text); margin-left: var(--sp-2); }
.pill.o-resolved { background: var(--right-soft); color: var(--right-text); }
.pill.o-dtsc, .pill.o-board { background: var(--notice); }

/* ranking table */
.t.rank .rankn { font-family: var(--font-display); font-size: 1.25rem; font-weight: 800; }
.t.rank .rname { display: inline-flex; align-items: center; gap: var(--sp-2); }
.t.rank .rname .sq { width: 1.75rem; height: 1.75rem; border-radius: 8px; }
.t.rank td.score { font-weight: 800; white-space: nowrap; }
.sbar { display: inline-block; vertical-align: middle; width: 3.5rem; height: 0.5rem; margin-right: var(--sp-2); border-radius: var(--r-pill); background: var(--sunk); overflow: hidden; }
.sbar i { display: block; height: 100%; background: var(--ink); border-radius: var(--r-pill); }
tr.flagrow { background: var(--wrong-soft); }
td.bad { color: var(--wrong-text); font-weight: 800; }
tr.tap { cursor: pointer; }

/* scoring: one row per initiative with a 1–10 segmented control (fits a phone: ten buttons across) */
.plist { display: grid; gap: var(--sp-3); margin: var(--sp-4) 0; }
.prow { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: var(--sp-3) var(--sp-4); }
.prow.done { background: var(--sunk); border-color: transparent; }
.prow.split { border-color: var(--wrong-text); }
.prow__head { display: flex; align-items: center; gap: var(--sp-3); }
.prow__head .sq { flex: none; width: 2rem; height: 2rem; border-radius: 8px; }
.prow__head .wt { display: grid; min-width: 0; }
.prow__head .wt b { font-family: var(--font-display); font-size: var(--t-3); line-height: 1.2; }
.prow__head .wt small { color: var(--muted); font-size: var(--t-small); }
.prow__why { margin-top: var(--sp-2); }
.prow__why summary { cursor: pointer; font-size: var(--t-small); color: var(--muted); }
.prow__why input, .prow textarea { width: 100%; margin-top: var(--sp-2); }
.prow .row { margin-top: var(--sp-2); align-items: flex-start; }
.prow .row textarea { flex: 1; min-width: 12rem; margin-top: 0; }
.prio10 { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; margin-top: var(--sp-3); }
.prio10 .pb { min-height: 2.75rem; min-width: 0; padding: 0; border: 2px solid var(--line-strong); border-radius: var(--r-m); background: var(--surface); color: var(--ink); font-family: var(--font-display); font-size: 1.125rem; font-weight: 800; cursor: pointer; box-shadow: none; }
.prio10 .pb[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.prio10 .pb:disabled { opacity: 0.55; cursor: default; }
/* phones: two rows of five (1-5, 6-10), so each button is a full-size target (about 60 x 44 px at 375 px) */
@media (max-width: 30rem) { .prio10 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; } .prio10 .pb { min-height: 2.75rem; font-size: 1.125rem; } }
/* free text shown in tables and lists reads in its own direction (an Arabic reason right to left) */
td, li, .lostdraft, .usertext, .card h3, .syscard__rec, .wt b, .wt small { unicode-bidi: plaintext; }
/* typed line breaks show as typed (parking lot, decision options, actions) */
.usertext { white-space: pre-line; }
/* long words (an email address as a name) wrap rather than widen the page */
.main, .side, #who, .eyebrow, .card, .wt, .usertext, h1, h2, h3 { overflow-wrap: anywhere; min-width: 0; }
/* iPhone zooms in on any box under 16px: every box is 16px or more on phones */
@media (max-width: 40rem) { input, select, textarea, .gpick select { font-size: max(1rem, 16px); } }
/* large text on a narrow phone: the header wraps and the pill may break, so nothing runs off the side */
@media (max-width: 30rem) { .side__top, html.simple .side__top { flex-wrap: wrap; } html.simple .side__note, #who { min-width: 0; flex: 1 1 10rem; } .sync { white-space: normal; max-width: 100%; } .rowcard__count { white-space: normal; } .rowcard { flex-wrap: wrap; } .prow .row { flex-wrap: wrap; } html, body { overflow-x: clip; } }
.progressline.sticky { position: sticky; top: 0; z-index: 2; background: var(--bg); padding: var(--sp-2) 0; }
/* a group's members: how many gave each score, 1 to 10 */
.mstats { display: grid; gap: var(--sp-2); margin-top: var(--sp-2); font-size: var(--t-small); color: var(--muted); }
.dist { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; align-items: stretch; height: 3.25rem; }
.dcol { position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.dcol i { display: block; width: 100%; min-height: 2px; flex: none; background: var(--s-field); border-radius: 4px 4px 0 0; }
.dcol small { font-size: 0.6875rem; line-height: 1; margin-top: 2px; }
.dcol b { position: absolute; top: 0; font-size: 0.6875rem; color: var(--ink); }
tr.outrow td, tr.outrow th { color: var(--muted); }
.gc.on.ghost { background: var(--line-strong); opacity: 0.45; }
.ghostnote { font-style: italic; }
svg.dumbbell { max-height: none; }
svg.matrix .ml.out { fill: var(--muted); }

/* gantt: one row per initiative, one cell per period; the line after 2028 Q2 is the Phase 1 gate */
.gantt { display: grid; gap: 2px; overflow-x: auto; margin: var(--sp-4) 0; }
.gantt.big { margin: 0; padding: var(--sp-3) var(--sp-4); }
.grow { display: grid; grid-template-columns: minmax(14rem, 22rem) minmax(26rem, 1fr); align-items: center; gap: var(--sp-3); padding: var(--sp-2) 0; border: 0; border-bottom: 1px solid var(--line); background: none; border-radius: 0; text-align: left; font: inherit; color: inherit; width: 100%; min-height: 0; box-shadow: none; }
button.grow { cursor: pointer; }
@media (hover: hover) { button.grow:hover { background: var(--sunk); transform: none; } }
.grow.unplaced .gl { color: var(--muted); }
.ghead { border-bottom: 2px solid var(--ink); font-size: 0.75rem; font-weight: 800; color: var(--muted); }
.ghead .gc { white-space: pre-line; text-align: center; line-height: 1.15; background: none; height: auto; }
.gl { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; font-size: var(--t-small); line-height: 1.25; flex-wrap: wrap; }
.gl .sq { width: 1.6rem; height: 1.6rem; border-radius: 7px; }
.gl small { color: var(--muted); }
.gl .pill { margin-left: 0; }
.gpick { display: flex; gap: var(--sp-2); flex-basis: 100%; }
.gpick select { min-height: 2.25rem; padding: 2px var(--sp-2); font-size: 0.875rem; flex: 1; }
.gcells, .gline { display: grid; grid-template-columns: repeat(12, minmax(2.2rem, 1fr)); gap: 2px; }
.gcells.stack2 { grid-template-columns: 1fr; gap: 3px; }
.gc { height: 1.5rem; border-radius: 5px; background: var(--sunk); }
.gc.on { background: var(--s-field); }
.gc.gate { box-shadow: inset -3px 0 0 -1px var(--ink); }
.ghead .gc.gate { box-shadow: none; text-decoration: underline; color: var(--ink); }
.gline.props .gc { height: 0.9rem; background: none; box-shadow: none; font-size: 0.75rem; line-height: 0.9rem; text-align: center; letter-spacing: -1px; color: var(--muted); }

/* constraint findings */
.findings { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-2); }
.fd { display: flex; align-items: flex-start; gap: var(--sp-3); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-m); background: var(--sunk); }
.fd .fdi { flex: none; display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; font-weight: 800; font-size: 0.8125rem; background: var(--line-strong); color: var(--surface); }
.fd > span:nth-child(2) { flex: 1; }
.fd.bad { background: var(--wrong-soft); }
.fd.bad .fdi { background: var(--wrong-text); }
.fd.warn { background: var(--notice); }
.fd.warn .fdi { background: var(--ink); }

/* consensus */
.opts.cons { margin: var(--sp-3) 0; }
.opts.cons .opt[aria-pressed='true'].lv1 { background: var(--wrong-text); border-color: var(--wrong-text); color: #fff; }
.cscard.blocked { border-color: var(--wrong-text); }
.cscard.ok { background: var(--sunk); }
.cscard .row input { flex: 1; min-width: 12rem; }
td.lvl { font-weight: 800; }
td.lvl.l1 { background: var(--wrong-soft); color: var(--wrong-text); }
td.lvl.l2 { background: var(--notice); }
td.lvl.l5, td.lvl.l4 { color: var(--right-text); }

/* matrix */
svg.matrix { display: block; width: 100%; height: auto; max-height: 72vh; }
svg.matrix .mq { font-family: var(--font-display); font-weight: 800; font-size: 18px; }
svg.matrix .mt { font-size: 13px; fill: var(--muted); }
svg.matrix .ma { font-size: 14px; font-weight: 700; fill: var(--ink); }
svg.matrix .ml { font-size: 12px; font-weight: 800; fill: var(--ink); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; }

/* facilitator: stage picker, group names */
.opts.stages .opt { display: inline-flex; align-items: center; gap: var(--sp-2); text-align: left; padding: var(--sp-2) var(--sp-4); }
.opts.stages .opt span { display: grid; }
.opts.stages .opt small { font-weight: 500; opacity: 0.8; }
.gnames { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: var(--sp-2) var(--sp-4); margin-bottom: var(--sp-3); }
.gnames label { display: grid; gap: 2px; font-weight: 700; font-size: var(--t-small); }
html.display .gantt.big .grow { padding: 4px 0; }

/* wide tables scroll inside their panel instead of squeezing */
.t.rank { min-width: 64rem; }
.t.rank th, .t.rank td { white-space: nowrap; overflow-wrap: normal; }
.t.rank tbody th { white-space: normal; min-width: 16rem; }
.gl > span:not(.sq):not(.gpick) { flex: 1 1 10rem; min-width: 0; }
@media (max-width: 40rem) {
  .grow { grid-template-columns: minmax(0, 1fr); gap: var(--sp-2); }
  .gcells, .gline { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .ghead .gl { display: none; }
  .ghead .gc { font-size: 0.625rem; }
}

/* ---------- lessons from the NHO workshop day ---------- */
/* short task instructions on each participant screen (open until closed, remembered per screen) */
.howto { margin: var(--sp-2) 0 var(--sp-3); border-inline-start: 4px solid var(--ink); }
.howto summary { font-size: 1.05rem; font-weight: 700; cursor: pointer; }
.howto .steps { margin-bottom: var(--sp-2); }
/* the one-line hint under an on-page box, and the "tap it again to take it back" line under an answer */
.boxhint { margin: 2px 0 var(--sp-1); }
.prow .boxhint, .cscard .boxhint { margin-top: var(--sp-1); }
.gl .boxhint { flex-basis: 100%; }
.takeback { margin: var(--sp-1) 0 0; }
.formhow { margin: 0 0 var(--sp-2); }
/* two fields side by side: the controls line up even when one hint is longer */
.two > div { display: flex; flex-direction: column; }
.two > div > select, .two > div > input { margin-top: auto; }
/* "Loading the list…" until the first page of cards has arrived */
.card.loading { max-width: 36rem; margin: var(--sp-6) auto; text-align: center; }
/* reported problems, sign-ins and people (facilitator tools) and the participants' "Report a problem" link */
.problems .small, .signins .small { font-size: var(--t-small); }
.problems .muted, .signins .muted { color: var(--muted); }
.problems td, .signins td { vertical-align: top; }
.problems .nowrap, .problems td button, .signins td button { white-space: nowrap; }
.problems table.t td { overflow-wrap: normal; }
.problems td:nth-child(2) { min-width: 8rem; }
.problems table.t td:nth-child(3) { min-width: 16rem; overflow-wrap: anywhere; }
.problems tr.muted td { color: var(--muted); }
.problems details { margin-top: var(--sp-1); }
.problems pre.out { max-height: 14rem; margin: var(--sp-1) 0 0; }
.reportbtn { min-height: 0; font-size: var(--t-small); font-weight: 600; color: var(--muted); }
html:not(.simple) .reportbtn { justify-self: start; }
.prevline { margin: var(--sp-2) 0 0; }
/* typing that has not reached the workshop yet is never shown as if it were saved */
.boxhint.unsaved { color: var(--wrong-text); font-weight: 600; }
.draftnote { overflow-wrap: anywhere; }
.warn-text { color: var(--wrong-text); }
/* the dialog on browsers without <dialog>.showModal() (Safari before 15.4): shown as a fixed panel over a dimmed page */
#dialog.dialog-fallback:not([open]) { display: none; }
#dialog.dialog-fallback[open] { display: block; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); margin: 0; z-index: 1000; overflow: auto; }
html.dialog-open body::after { content: ''; position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgb(16 12 40 / 0.5); z-index: 999; }
/* roadmap and commitments workshop: start / end lists wide enough for "2026 Q4"; an initiative's agreed window above its projects */
.gpick select { min-width: 6.75rem; flex: 0 1 8rem; }
.gc.on.window { background: var(--cat-5-soft); box-shadow: inset 0 0 0 1px var(--cat-5-deep); }
.grow.inihead { border-bottom: 1px dashed var(--line-strong); }
.grow.inihead .gl small { color: var(--muted); }
ul.plain { list-style: none; padding: 0; margin: var(--sp-2) 0 0; }
ul.plain li { padding: 2px 0; }
/* (last in the file, so it wins) iPhone zooms in on any box under 16px: every box is 16px or more on phones */
@media (max-width: 40rem) { input, select, textarea, .gpick select, .gpick input { font-size: max(1rem, 16px) !important; } }
