/* learn/scenarios/ - "When agents save the business". Loaded after ../personas/personas.css and ../agents/agents.css
   (same tokens, hero, quick guide and console look); only the page-specific pieces live here: the storm board, the
   story filter, the story cards (numbers strip, mind map, prevented banner), the art slot and the four reasons. */
.sc { --hit: var(--pri); --win: var(--good); --ppl: var(--accent); --flt: var(--fleet);
  --survive: #b4233c; --change: #2f6db5; --grow: #2f7d4f; }
@media (prefers-color-scheme: dark) { .sc { --survive: #f58a9c; --change: #8fb8ec; --grow: #8fd3a6; } }

.sc-hero { background:
  radial-gradient(1000px 400px at 85% -10%, color-mix(in srgb, var(--hit) 16%, transparent), transparent 70%),
  radial-gradient(700px 360px at -10% 110%, color-mix(in srgb, var(--fleet) 16%, transparent), transparent 70%); }

/* ---------- the storm board (rows are links to the stories) ---------- */
.sc-board .nm { font-size: 12px; }
.sc-board .st { font-size: 11px; }
.sc-board a { cursor: pointer; }
.sc-board a:hover .nm, .sc-board a:focus .nm { fill: var(--accent); text-decoration: underline; }
.sc-board a:focus { outline: none; }
.sc-board a:focus-visible .trk { stroke: var(--focus); stroke-width: 2; }
.sc-board .bar { fill: var(--hit); }
.sc-board .sc-tot { fill: var(--fleet); }

/* ---------- story filter ---------- */
.sc-note { margin: -.6em 0 1.4em; font-size: .88em; color: var(--muted); border-left: 3px solid var(--line); padding-left: 12px; max-width: 720px; }
.sc-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.sc-filter button { border: 1.5px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 6px 16px;
  font: inherit; font-weight: 700; font-size: .92em; cursor: pointer; min-height: 40px; }
.sc-filter button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- story card ---------- */
.sc-list { display: flex; flex-direction: column; gap: 28px; }
.sc-story { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 26px 28px 20px;
  box-shadow: 0 18px 40px -30px rgba(30, 20, 60, .35); scroll-margin-top: 16px; }
@media (max-width: 560px) { .sc-story { padding: 18px 16px 14px; border-radius: 18px; } }
.sc-story[hidden] { display: none; }
.sc-head { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 14px; margin-bottom: 16px; }
.sc-no { grid-row: span 2; font-size: 2.6em; font-weight: 900; line-height: 1; color: color-mix(in srgb, var(--ink) 22%, var(--card)); font-variant-numeric: tabular-nums; }
.sc-cat { justify-self: start; padding: 2px 12px; border-radius: 999px; font-weight: 800; font-size: .8em; letter-spacing: .02em;
  background: color-mix(in srgb, var(--c) 14%, var(--card)); color: var(--c); }
.sc-cat.survive { --c: var(--survive); } .sc-cat.change { --c: var(--change); } .sc-cat.grow { --c: var(--grow); }
.sc-head h3 { margin: 0; font-size: clamp(1.25em, 2.6vw, 1.6em); letter-spacing: -.01em; }

/* four numbers: at stake, agents cost, result, return */
.sc-stakes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 0 0 18px; }
@media (max-width: 760px) { .sc-stakes { grid-template-columns: 1fr 1fr; } }
.sc-stakes > div { border-radius: 14px; padding: 10px 14px; background: color-mix(in srgb, var(--c) 9%, var(--card)); border: 1px solid color-mix(in srgb, var(--c) 30%, var(--line)); }
.sc-stakes .risk { --c: var(--hit); } .sc-stakes .cost { --c: var(--fleet); } .sc-stakes .won { --c: var(--win); } .sc-stakes .ret { --c: var(--accent); }
.sc-stakes dt { font-size: .74em; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.sc-stakes dd { margin: 2px 0 0; font-size: 1.7em; font-weight: 900; line-height: 1.1; color: var(--c); font-variant-numeric: tabular-nums; }
.sc-stakes small { display: block; font-size: .8em; color: var(--muted); line-height: 1.3; }

.sc-moment { font-size: 1.06em; color: var(--ink); max-width: 820px; }
.sc-found { position: relative; max-width: 820px; padding: 8px 12px 8px 40px; border-radius: 12px; background: var(--warn-soft); color: var(--text); font-size: .96em; }
.sc-found::before { content: "💡"; position: absolute; left: 12px; top: 7px; }
.sc-prevented { margin: 18px 0 0; padding: 10px 14px; border-radius: 12px; border-left: 5px solid var(--win);
  background: var(--good-soft); color: var(--ink); font-size: 1.02em; }
.sc-prevented b { color: var(--win); }

/* ---------- mind map: centre + four branches read clockwise ----------
   Wide: 1 top-left, 2 top-right, 3 bottom-right, 4 bottom-left, connectors drawn by scenarios.js (it reads --mm-links).
   Narrow: centre on top, branches stacked on a spine, no drawn connectors. */
.sc-mm { --mm-links: on; position: relative; display: grid; grid-template-columns: 1fr minmax(130px, 170px) 1fr;
  grid-template-areas: "hit c fleet" "win c people"; gap: 22px 64px; align-items: start; margin: 22px 0 6px;
  padding: 22px; border-radius: 20px; border: 1.5px dashed var(--line);
  background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--fleet) 7%, transparent), transparent 60%), var(--bg); }
.sc-mm > svg.sc-links { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 0; }
.sc-links .hit { --k: var(--hit); } .sc-links .fleet { --k: var(--flt); } .sc-links .people { --k: var(--ppl); } .sc-links .win { --k: var(--win); }
.sc-links path { fill: none; stroke: var(--k); stroke-width: 3; stroke-linecap: round; opacity: .75; }
.sc-links circle { fill: var(--k); stroke: none; }
.sc-mm-c { grid-area: c; align-self: center; position: relative; z-index: 1; margin: 0; padding: 18px 12px; text-align: center;
  border-radius: 50%; aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--ink); color: var(--bg); font-weight: 900; line-height: 1.15; font-size: 1.02em;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--ink) 12%, transparent); }
.sc-mm-c span { font-size: 1.8em; line-height: 1; margin-bottom: 6px; }
.sc-br { position: relative; z-index: 1; border-radius: 16px; padding: 10px 12px 12px; background: var(--card);
  border: 2px solid color-mix(in srgb, var(--c) 55%, var(--line)); }
.sc-br.hit { grid-area: hit; --c: var(--hit); } .sc-br.fleet { grid-area: fleet; --c: var(--flt); }
.sc-br.people { grid-area: people; --c: var(--ppl); } .sc-br.win { grid-area: win; --c: var(--win); }
.sc-br h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: .95em; color: var(--c); text-transform: uppercase; letter-spacing: .06em; }
.sc-br h4 i { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--c); color: var(--card); font-style: normal; font-size: .9em; letter-spacing: 0; }
.sc-br ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
/* leaves as sticky notes: slight tilt for the brainstorm feel */
.sc-br li { padding: 6px 10px; border-radius: 8px; font-size: .9em; line-height: 1.35; color: var(--ink);
  background: color-mix(in srgb, var(--c) 11%, var(--card)); box-shadow: 0 1px 0 color-mix(in srgb, var(--c) 25%, transparent); transform: rotate(-.5deg); }
.sc-br li:nth-child(even) { transform: rotate(.6deg); }
.sc-br li:nth-child(3n) { transform: rotate(-.2deg); }
.sc-br.fleet li { flex: 1 1 100%; }
@media (max-width: 760px) {
  .sc-mm { --mm-links: off; grid-template-columns: 1fr; grid-template-areas: "c" "hit" "fleet" "people" "win"; gap: 14px; padding: 16px 14px 16px 30px; }
  .sc-mm::before { content: ""; position: absolute; left: 15px; top: 60px; bottom: 30px; width: 3px; border-radius: 2px;
    background: linear-gradient(var(--hit), var(--flt), var(--ppl), var(--win)); opacity: .6; }
  .sc-mm-c { justify-self: center; width: 140px; }
  .sc-br li { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { .sc-br li, .sc-br li:nth-child(even), .sc-br li:nth-child(3n) { transform: none; } }

/* ---------- art slot: shown by scenarios.js once data-styles lists drawings ---------- */
.sc-art[hidden], .sc-brief[hidden] { display: none; }
.sc-art { margin: 18px 0 0; }
.sc-art img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 16px; border: 1px solid var(--line); background: var(--bg-2); }
.sc-art-styles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sc-art-styles button { border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 999px; padding: 3px 11px;
  font: inherit; font-size: .82em; cursor: pointer; }
.sc-art-styles button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- four reasons ---------- */
.sc-why { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.sc-why article { border: 1px solid var(--line); border-radius: var(--radius, 16px); padding: 18px; background: var(--card); display: flex; flex-direction: column; }
.sc-why article > span { font-size: 1.8em; line-height: 1; }
.sc-why h3 { margin: 8px 0 4px; font-size: 1.25em; color: var(--fleet); }
.sc-why p { margin: 0; flex: 1; }
.sc-rules-h { margin: 32px 0 0; font-size: 1.15em; }
