/* Can You Afford Risk? — Prolancit course shell
   Layout idea: calm brand bar · one focused screen · control dock.
   Paired comparisons carry the story: pale green = Asha, pale blue = Rohan.
   Colors and type follow Prolancit Brand Guidelines v1.0. */
:root {
  --green: #2F4F4F;        /* Prolancit Green: H1, key statements */
  --blue: #2F6F8F;         /* Prolancit Blue: H2, links, interface */
  --charcoal: #243236;     /* body text */
  --slate: #5D666A;        /* secondary copy */
  --pale-green: #EEF4F2;
  --pale-blue: #EEF5F8;
  --ivory: #F6F4EF;
  --line: #D9E3E6;
  --white: #FFFFFF;
  --amber: #8A5A12;        /* semantic: review / caution, always with a label */
  --amber-bg: #FBF4E8;
  --ok: #2E6B52;           /* semantic: correct, always with a label */
  --ok-bg: #EAF4EF;
  --loss: #9AA5AA;         /* neutral grey for the illustrated loss */
  --focus: #E0A526;

  --font: "Inter", system-ui, Arial, sans-serif;
  --r: 14px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  display: grid; grid-template-rows: auto 1fr auto auto; grid-template-columns: minmax(0, 1fr);
  background: var(--white); color: var(--charcoal);
  font: 400 1.0625rem/1.55 var(--font);
  font-feature-settings: "cv11", "ss01";
}
img { max-width: 100%; display: block; }
button, select { font: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--green); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { top: 12px; }
.ico { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- brand bar ---------- */
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 10px clamp(16px, 3vw, 32px);
  background: var(--white); border-bottom: 1px solid var(--line);
}
.logo { width: 132px; height: auto; }
.rule { width: 1px; height: 26px; background: var(--line); }
.course-title { margin: 0; font-weight: 600; font-size: .95rem; color: var(--green); flex: 1; }
.screen-count { margin: 0; font-size: .85rem; color: var(--slate); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- stage ---------- */
main { overflow-y: auto; outline: none; position: relative; background: var(--white); }
.stage { max-width: 1080px; margin: 0 auto; padding: clamp(20px, 3.5vw, 36px) clamp(16px, 3vw, 32px) 40px; }
.screen-root { display: grid; gap: 22px; }
h1 { font-weight: 700; font-size: clamp(1.55rem, 2.8vw, 2.05rem); line-height: 1.2; letter-spacing: -.02em; color: var(--green); margin: 0; text-wrap: balance; outline: none; }
h2 { font-weight: 600; font-size: 1.15rem; line-height: 1.3; color: var(--blue); margin: 0; }
h3 { font-weight: 600; font-size: 1rem; margin: 0; color: var(--green); }
p { margin: 0; }
.eyebrow { font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); }
.lede { font-size: 1.15rem; color: var(--charcoal); max-width: 62ch; }
.muted { color: var(--slate); }
.instr { color: var(--blue); font-size: .95rem; display: flex; gap: 8px; align-items: center; }
.instr .ico { width: 18px; height: 18px; }

/* staged reveal */
[data-step] { transition: opacity .55s ease, transform .55s cubic-bezier(.2,.7,.2,1); }
.pre [data-step]:not(.in) { opacity: 0; transform: translateY(14px); }

/* ---------- layout helpers ---------- */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px; align-items: start; }
.split.rev { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stack { display: grid; gap: 14px; }
.photo { border-radius: var(--r); overflow: hidden; aspect-ratio: 4 / 3; background: var(--pale-blue); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo.wide { aspect-ratio: 16 / 7; }
.photo.pos-l img { object-position: 0% 50%; }
.photo.tall { aspect-ratio: 4 / 4.4; }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; display: grid; gap: 10px; align-content: start; }
.card.g { background: var(--pale-green); border-color: #DCE9E4; }
.card.b { background: var(--pale-blue); border-color: #D8E7EE; }
.card.iv { background: var(--ivory); border-color: #E8E4DA; }
.card-h { display: flex; align-items: center; gap: 10px; }
.card-h .ico { color: var(--blue); }
.card.g .card-h .ico { color: var(--green); }

.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.list li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.4; }
.list li .ico { width: 20px; height: 20px; margin-top: 1px; color: var(--blue); }
.card.g .list li .ico { color: var(--green); }

.callout {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px 20px; border-radius: var(--r);
  background: var(--ivory); border-left: 4px solid var(--green); font-weight: 500; font-size: 1.05rem;
}
.callout .ico { color: var(--green); margin-top: 2px; }
.callout.blue { border-left-color: var(--blue); background: var(--pale-blue); }
.callout.blue .ico { color: var(--blue); }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px; background: var(--white); border: 1px solid var(--line); font-size: .95rem; font-weight: 500; }
.chip .ico { width: 18px; height: 18px; color: var(--blue); }
.pre .chips [data-step]:not(.in) { transform: scale(.92); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: .8rem; font-weight: 600; background: var(--ivory); color: var(--slate); border: 1px solid #E5E0D4; }
.badge .ico { width: 14px; height: 14px; }

/* person block */
.who { display: flex; align-items: center; gap: 12px; }
.portrait { width: 56px; height: 56px; border-radius: 50%; flex: none; box-shadow: 0 0 0 3px var(--white); }
.portrait.lg { width: 112px; height: 112px; }
.portrait.xl { width: 168px; height: 168px; }
.who .name { font-weight: 700; font-size: 1.15rem; }
.g .who .name, .who.g .name { color: var(--green); }
.b .who .name, .who.b .name { color: var(--blue); }
.amt { font-weight: 600; font-variant-numeric: tabular-nums; }
.sep { margin: 0 .3em; color: var(--slate); }
blockquote { margin: 0; font-size: 1.15rem; line-height: 1.45; }
.quote { position: relative; padding-left: 18px; border-left: 3px solid currentColor; }

.cast { display: grid; gap: 18px; justify-items: center; text-align: center; }
.cast figure { margin: 0; display: grid; gap: 6px; justify-items: center; }
.cast figcaption { font-weight: 700; }

/* named splits */
.split.s-cast { grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); }
.split.s-fig { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); align-items: center; }
.bar .ls { display: none; }
.awaiting .option, .awaiting .seg { opacity: .55; cursor: not-allowed; }
.awaiting .option:hover { border-color: var(--line); }
.awaiting .seg label { cursor: not-allowed; }
.awaiting .seg label:hover { background: transparent; }
.loss-key { display: none; align-items: center; gap: 8px; font-size: .85rem; color: var(--slate); }
.loss-key .sw { width: 22px; height: 14px; border-radius: 3px; background: repeating-linear-gradient(135deg, #B9C2C6 0 4px, #A9B3B8 4px 8px); }

/* arrows between columns */
.flow { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: stretch; }
.flow-arrow { display: grid; place-items: center; color: var(--slate); font-size: .8rem; text-align: center; gap: 4px; align-content: center; }
.flow-arrow .ico { width: 30px; height: 30px; color: var(--blue); }

/* ---------- Screen 01 hero ---------- */
.hero-screen main { background: #0E1622; }
.hero-screen .stage { max-width: none; padding: 0; min-height: 100%; }
.hero { position: relative; min-height: 100%; color: #fff; display: grid; align-items: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,18,28,.94) 0%, rgba(10,18,28,.82) 38%, rgba(10,18,28,.25) 75%, rgba(10,18,28,.1) 100%); }
.hero-inner { position: relative; padding: clamp(28px, 6vw, 72px) clamp(20px, 6vw, 80px); max-width: 680px; display: grid; gap: 18px; }
.hero h1 { color: #fff; font-size: clamp(2.2rem, 5vw, 3.4rem); letter-spacing: -.03em; }
.hero .sub { font-size: clamp(1.1rem, 2vw, 1.35rem); font-weight: 600; color: #BFD9E6; }
.hero .hook { font-size: 1.12rem; color: #E6EEF2; line-height: 1.55; }
.hero .goals { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 8px; }
.hero .goals li { display: flex; gap: 10px; align-items: center; color: #DCE7EC; font-size: .98rem; }
.hero .goals .ico { color: #8FC2D8; width: 18px; height: 18px; }
.hero .meta { font-size: .9rem; color: #A9BCC6; }
.btn.begin { justify-self: start; margin-top: 6px; min-height: 52px; padding: 12px 30px; font-size: 1.05rem; background: #fff; color: var(--green); border-color: #fff; }
.btn.begin:hover { background: #E8F1F4; border-color: #E8F1F4; }
/* Begin pulses on every visit until it is selected (the click leaves the screen). */
.btn.begin { animation: beginPulse 1.8s ease-in-out infinite; }
@keyframes beginPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,.55); } 50% { box-shadow: 0 0 0 12px rgba(255,255,255,0); } }

/* ---------- Screen 07 bars ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 260px)); gap: 16px; }
.tile { border-radius: var(--r); padding: 16px 18px; border: 1px solid var(--line); display: grid; gap: 4px; }
.tile .k { font-size: .85rem; color: var(--slate); font-weight: 500; }
.tile .v { font-size: 1.9rem; font-weight: 700; color: var(--green); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.tile.after .v { color: var(--blue); }
.bars { display: grid; gap: 18px; }
.barrow { display: grid; grid-template-columns: 150px 1fr; gap: 14px; align-items: center; }
.bar { position: relative; height: 46px; border-radius: 10px; background: var(--pale-blue); overflow: hidden; display: flex; }
.bar .keep { height: 100%; width: 100%; background: var(--blue); display: flex; align-items: center; padding-left: 14px; color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; transition: width 1.4s cubic-bezier(.6,0,.2,1); }
.barrow.asha .bar .keep { background: var(--green); }
.bar .lost { height: 100%; width: 0; background: repeating-linear-gradient(135deg, #B9C2C6 0 8px, #A9B3B8 8px 16px); display: flex; align-items: center; justify-content: center; color: var(--charcoal); font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; transition: width 1.4s cubic-bezier(.6,0,.2,1); }
.bars.fell .bar .keep { width: 80%; }
.bars.fell .bar .lost { width: 20%; }
.scale { display: grid; grid-template-columns: 150px 1fr; gap: 14px; font-size: .78rem; color: var(--slate); }
.scale .ticks { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; }

/* ---------- Screen 10 timeline ---------- */
.tl { display: grid; gap: 14px; }
.tl-row { display: grid; grid-template-columns: 70px 1fr; gap: 12px; align-items: center; }
.tl-track { position: relative; height: 34px; border-radius: 8px; background: repeating-linear-gradient(90deg, var(--pale-blue) 0 calc(100%/7 - 2px), #fff calc(100%/7 - 2px) calc(100%/7)); border: 1px solid var(--line); }
.tl-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 8px; display: flex; align-items: center; justify-content: flex-end; padding-right: 10px; color: #fff; font-weight: 600; font-size: .85rem; white-space: nowrap; transition: width 1.2s cubic-bezier(.6,0,.2,1); }
.tl-fill.a { background: var(--green); }
.tl-fill.r { background: var(--blue); }
.tl-fill.a span { position: absolute; left: calc(100% + 8px); color: var(--green); }
.in .tl-fill.a { width: 10.7%; }
.in .tl-fill.r { width: 100%; }
.tl-axis { display: grid; grid-template-columns: 70px 1fr; gap: 12px; font-size: .75rem; color: var(--slate); }
.tl-axis .ticks { display: flex; justify-content: space-between; }

/* ---------- Screen 11 income bar ---------- */
.income { display: grid; gap: 8px; }
.income-bar { display: flex; height: 54px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.income-bar > div { display: flex; align-items: center; justify-content: center; font-size: .85rem; font-weight: 600; color: #fff; text-align: center; padding: 0 6px; line-height: 1.15; }
.income-bar .h { flex: 44; background: #46666A; }
.income-bar .l { flex: 26; background: #2F6F8F; }
.income-bar .d { flex: 22; background: #5A8597; }
.income-bar .rem { flex: 8; background: var(--ivory); color: var(--charcoal); border-left: 2px dashed #B9B3A6; }
.income-key { font-size: .78rem; color: var(--slate); }
.pre .income-bar > div:not(.in) { opacity: 0; }
.income-bar > div { transition: opacity .5s ease; }

/* ---------- Screen 12 funds ---------- */
.funds { display: grid; gap: 14px; }
.fundrow { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; }
.pots { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.pot { border-radius: 10px; padding: 10px 12px; display: grid; gap: 2px; min-width: 150px; border: 2px solid; background: #fff; }
.pot .k { font-size: .8rem; color: var(--slate); }
.pot .v { font-weight: 600; }
.pot.goal { border-color: var(--blue); }
.pot.res { border-color: var(--green); }
.pot.small { min-width: 110px; border-style: dashed; }
.pot .ico { width: 18px; height: 18px; }
.gap { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--slate); }

/* ---------- interactions ---------- */
.question { font-weight: 600; font-size: 1.12rem; color: var(--charcoal); margin: 0 0 12px; padding: 0; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.options { display: grid; gap: 12px; }
.options.two-col { grid-template-columns: 1fr 1fr; }
.option {
  position: relative; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: 12px; cursor: pointer; background: var(--white); border: 2px solid var(--line);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.option input { position: absolute; opacity: 0; pointer-events: none; }
.letter { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .9rem; color: var(--blue); border: 2px solid currentColor; background: var(--white); }
.otext { line-height: 1.4; }
.option:hover { border-color: #9BBFCF; }
.option:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.option:has(input:checked) { border-color: var(--blue); background: #F4F9FB; box-shadow: 0 2px 10px rgba(47,111,143,.12); }
.option:has(input:checked) .letter { background: var(--blue); color: #fff; border-color: var(--blue); }
.tag { grid-column: 2; font-size: .8rem; font-weight: 600; letter-spacing: .01em; display: flex; align-items: center; gap: 6px; }
.tag:empty { display: none; }
.tag .ico { width: 15px; height: 15px; stroke-width: 2.4; }
.option.is-correct { border-color: var(--ok); background: var(--ok-bg); }
.option.is-correct .letter { background: var(--ok); border-color: var(--ok); color: #fff; }
.option.is-correct .tag { color: var(--ok); }
.option.is-picked { border-color: var(--amber); background: var(--amber-bg); }
.option.is-picked .letter { background: var(--amber); border-color: var(--amber); color: #fff; }
.option.is-picked .tag { color: var(--amber); }
.locked .option { cursor: default; }
.explore .option { cursor: pointer; }

.actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* segmented choice rows (Screens 08, 14) */
.rows { display: grid; gap: 12px; }
.crow { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.crow .stmt { line-height: 1.4; }
.crow .status { grid-column: 1 / -1; font-size: .88rem; display: none; gap: 8px; align-items: flex-start; }
.crow .status .ico { width: 16px; height: 16px; stroke-width: 2.4; margin-top: 2px; }
.crow.ok { border-color: var(--ok); background: var(--ok-bg); }
.crow.ok .status { display: flex; color: var(--ok); }
.crow.review { border-color: var(--amber); background: var(--amber-bg); }
.crow.review .status { display: flex; color: var(--amber); }
.crow.reveal .status { color: var(--charcoal); }
.crow.reveal .status b { color: var(--ok); }
.seg { display: inline-flex; border: 2px solid var(--line); border-radius: 12px; padding: 3px; gap: 3px; background: #fff; }
.seg label { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 9px; cursor: pointer; font-weight: 600; font-size: .92rem; color: var(--slate); white-space: nowrap; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:hover { background: var(--pale-blue); }
.seg label:has(input:checked) { background: var(--blue); color: #fff; }
.seg label:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 1px; }
.seg label:has(input:disabled) { cursor: default; }
.seg label:has(input:disabled):hover { background: transparent; }
.seg label:has(input:disabled:checked) { background: var(--slate); }
.seg .mini { width: 24px; height: 24px; border-radius: 50%; }

/* ---------- buttons ---------- */
.btn { min-height: 44px; padding: 8px 22px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: .98rem; border: 2px solid var(--blue); display: inline-flex; align-items: center; gap: 8px; }
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:hover { background: #255C77; border-color: #255C77; }
.btn.ghost { background: var(--white); color: var(--blue); }
.btn.ghost:hover { background: var(--pale-blue); }
.btn:disabled, .btn[aria-disabled="true"] { background: #E3EAED; border-color: #E3EAED; color: #6F8288; cursor: not-allowed; }
.btn[hidden] { display: none; }

/* ---------- captions ---------- */
.captions { display: flex; justify-content: center; padding: 0 16px 10px; pointer-events: none; background: transparent; }
.captions[hidden] { display: none; }
.captions p:empty { display: none; }
.captions p { margin: 0; max-width: 820px; padding: 8px 16px; border-radius: 8px; background: rgba(28, 40, 44, .9); color: #fff; font-size: 1rem; text-align: center; line-height: 1.4; }
.hero-screen .captions { background: #0E1622; }

/* ---------- dock ---------- */
.dock { display: grid; grid-template-columns: minmax(150px, 1fr) auto minmax(150px, 1fr); align-items: center; gap: 16px; padding: 10px clamp(16px, 3vw, 32px); background: var(--white); border-top: 1px solid var(--line); }
.progress-wrap { display: flex; align-items: center; gap: 12px; }
.icon-btn.home { border: 1px solid var(--line); flex: none; }
.icon-btn.home[hidden] { display: none; }
.btn[hidden], #btn-back[hidden] { display: none; }
.progress { display: grid; gap: 7px; font-size: .88rem; color: var(--slate); font-variant-numeric: tabular-nums; }
.track { width: min(220px, 100%); height: 6px; border-radius: 99px; background: #E3EAED; overflow: hidden; }
.fill { height: 100%; width: 0; background: var(--green); border-radius: inherit; transition: width .6s ease; }
.narration { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px; background: var(--white); border: 1px solid var(--line); border-radius: 99px; padding: 4px 8px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--blue); display: grid; place-items: center; cursor: pointer; }
.icon-btn svg { width: 22px; height: 22px; fill: currentColor; }
.icon-btn:hover:not(:disabled) { background: var(--pale-blue); }
.icon-btn:disabled { color: #A7B6BB; cursor: not-allowed; }
#btn-play { background: var(--blue); color: #fff; }
#btn-play:disabled { background: #E3EAED; color: #94A6AC; }
#btn-play .i-pause, #btn-play.is-playing .i-play { display: none; }
#btn-play.is-playing .i-pause { display: block; }
#btn-play.nudge { animation: nudge 1.6s ease-in-out infinite; }
#btn-mute .i-muted, #btn-mute[aria-pressed="true"] .i-vol { display: none; }
#btn-mute[aria-pressed="true"] .i-muted { display: block; }
.narr-time { font-size: .82rem; color: var(--slate); font-variant-numeric: tabular-nums; padding: 0 4px; }
.narr-time:empty { display: none; }
.narr-status { font-size: .82rem; color: var(--amber); padding: 0 4px; }
.narr-status:empty { display: none; }
.text-btn { min-height: 34px; padding: 4px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--white); color: var(--blue); font-weight: 600; font-size: .82rem; cursor: pointer; }
.text-btn:hover { background: var(--pale-blue); }
#btn-cc[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.nav { display: flex; gap: 12px; justify-content: flex-end; }

/* ---------- panels ---------- */
.panel { border: 0; padding: 0; border-radius: 18px; width: min(640px, calc(100% - 32px)); max-height: calc(100% - 48px); box-shadow: 0 24px 60px rgba(20, 36, 40, .28); color: var(--charcoal); background: var(--white); }
.panel::backdrop { background: rgba(20, 34, 38, .45); }
.panel-inner { padding: 24px 28px 22px; border-top: 6px solid var(--blue); display: grid; gap: 12px; }
.panel h2 { font-size: 1.3rem; outline: none; display: flex; align-items: center; gap: 10px; color: var(--green); }
.panel h2 .ico { width: 24px; height: 24px; stroke-width: 2.2; }
.panel p { line-height: 1.55; }
.feedback.tone-correct .panel-inner { border-top-color: var(--ok); }
.feedback.tone-correct h2 { color: var(--ok); }
.feedback.tone-review .panel-inner { border-top-color: var(--amber); }
.feedback.tone-review h2 { color: var(--amber); }
.keymsg { background: var(--pale-green); border-left: 4px solid var(--green); padding: 12px 16px; border-radius: 0 10px 10px 0; font-weight: 500; }
.panel-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; flex-wrap: wrap; }
#tr-body p + p { margin-top: 10px; }

/* ---------- completion ---------- */
.done { display: flex; gap: 14px; align-items: center; padding: 16px 20px; border-radius: var(--r); background: var(--ok-bg); border: 1px solid #CFE3D8; }
.done .ico { color: var(--ok); width: 30px; height: 30px; stroke-width: 2.2; }
.done b { display: block; color: var(--ok); font-size: 1.1rem; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 12px); opacity: 0; pointer-events: none; background: var(--green); color: #fff; padding: 10px 18px; border-radius: 10px; font-size: .95rem; max-width: calc(100% - 32px); transition: opacity .2s, transform .2s; z-index: 40; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes nudge { 0%, 100% { box-shadow: 0 0 0 0 rgba(47,111,143,.45); } 50% { box-shadow: 0 0 0 8px rgba(47,111,143,0); } }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .dock { grid-template-columns: minmax(0, 1fr) auto; }
  .progress-wrap, .progress { min-width: 0; }
  .narration { grid-column: 1 / -1; grid-row: 1; justify-self: center; border-radius: 14px; }
  .split, .split.rev, .split.s-cast, .split.s-fig { grid-template-columns: 1fr; }
  .s-cast .cast { grid-auto-flow: column; justify-content: center; gap: 32px; }
  .three { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .two, .three, .options.two-col, .tiles { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; }
  .flow-arrow:not(.norot) { transform: rotate(90deg); }
  .crow { grid-template-columns: 1fr; }
  .barrow, .scale { grid-template-columns: 1fr; gap: 6px; }
  .course-title { font-size: .85rem; }
  .logo { width: 104px; }
  .rule { display: none; }
  .narr-time { display: none; }
  .portrait.xl { width: 120px; height: 120px; }
  .fundrow { grid-template-columns: 1fr; }
  .fundrow .cast { justify-items: start; }
  .bar .lost { font-size: .78rem; }
  .bar .lf { display: none; }
  .bar .ls { display: inline; }
  .bar .keep { font-size: .92rem; padding-left: 10px; }
  .dock { gap: 10px; padding: 8px 12px; }
  .progress-wrap { gap: 8px; }
  .track { width: 100%; }
  .nav { gap: 8px; }
  .nav .btn { padding: 8px 14px; }
  .seg label { padding: 7px 10px; }
  .loss-key { display: flex; }
  .hero-bg::after { background: linear-gradient(180deg, rgba(10,18,28,.55) 0%, rgba(10,18,28,.9) 45%, rgba(10,18,28,.96) 100%); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .btn.begin { box-shadow: 0 0 0 4px rgba(255,255,255,.45); }  /* steady highlight instead of motion */
}
