/* What Would You Do? (templates/safety). Same cards and colours as the other AJ trainings; works from phone width up.
   Nothing is shown by colour alone: every quality, outcome and status also has an icon and words. */
.sf-page { max-width: 1000px; margin: 0 auto; }
.sf-page h1 { font-size: 1.8rem; margin-bottom: .25rem; }
.sf-sub { color: #5b6470; margin-bottom: 1.25rem; }
.sf-card { background: #fff; border: 1px solid #e3e6ea; border-radius: 12px; padding: 1.1rem 1.2rem; margin-bottom: 1rem; }
.sf-quote { border-left: 4px solid #002855; padding: .2rem 0 .2rem .9rem; color: #2b3440; font-size: 1.05rem; margin: 0 0 1rem; }
.sf-status { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.sf-badge { font-weight: 600; padding: .3rem .7rem; border-radius: 999px; background: #eef2f6; color: #334; }
.sf-badge.is-done { background: #e3f4e8; color: #1e6b34; }
.sf-badge.is-needed { background: #fff3dc; color: #7a4d00; }
.sf-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: #5b6470; margin-bottom: .2rem; }
.sf-boundary { background: #f7f9fb; border: 1px dashed #c6ccd3; border-radius: 10px; padding: .7rem .9rem; font-size: .92rem; color: #3b4450; }
.sf-boundary i { color: #5b6470; }
.sf-school { background: #f2f7fd; border-left: 4px solid #5b8fd1; padding: .7rem .9rem; border-radius: 6px; margin: .8rem 0; white-space: pre-line; }

.sf-lessons { list-style: none; padding: 0; margin: 0; }
.sf-lessons li { display: flex; align-items: center; gap: .9rem; padding: .8rem 0; border-top: 1px solid #eef0f2; flex-wrap: wrap; }
.sf-lessons li:first-child { border-top: 0; }
.sf-num { flex: 0 0 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: #eef2f6; color: #334; }
.sf-lessons li.is-done .sf-num { background: #2ea043; color: #fff; }
.sf-lessons li.is-current .sf-num { background: #002855; color: #fff; }
.sf-lessons li.is-locked { opacity: .6; }
.sf-lesson-text { flex: 1 1 14rem; min-width: 0; }
.sf-lesson-text strong { display: block; }
.sf-lesson-text small { color: #5b6470; }
.sf-state { font-size: .85rem; color: #5b6470; display: block; }

.sf-text p, .sf-text li { line-height: 1.6; }
.sf-steps-list { counter-reset: s; list-style: none; padding: 0; }
.sf-steps-list li { counter-increment: s; padding: .45rem 0 .45rem 2.6rem; position: relative; }
.sf-steps-list li::before { content: counter(s); position: absolute; left: 0; top: .35rem; width: 1.9rem; height: 1.9rem; border-radius: 50%;
  background: #002855; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.sf-help-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.sf-help-table th, .sf-help-table td { padding: .45rem .5rem; border-top: 1px solid #eef0f2; vertical-align: top; text-align: left; }
.sf-lvl { display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 6px; background: #eef2f6; font-weight: 700; }

/* the scenario player */
.sf-player { display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: 1rem; align-items: start; }
@media (max-width: 860px) { .sf-player { grid-template-columns: 1fr; } }
.sf-scene { background: #fff; border: 1px solid #d9dee4; border-radius: 12px; padding: 1.1rem 1.2rem; }
.sf-scene-head { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; color: #5b6470; font-size: .88rem; margin-bottom: .4rem; }
.sf-scene h2 { font-size: 1.25rem; margin: 0 0 .6rem; }
.sf-lead { color: #3b4450; font-style: italic; margin-bottom: .6rem; }
.sf-situation { font-size: 1.08rem; line-height: 1.6; margin-bottom: .9rem; }
.sf-ask { font-weight: 600; margin: .4rem 0 .6rem; }
.sf-hint { background: #fffbea; border-left: 4px solid #d4a300; padding: .5rem .8rem; border-radius: 6px; margin-bottom: .8rem; font-size: .93rem; }
.sf-choices { display: grid; gap: .55rem; }
.sf-choice { text-align: left; width: 100%; min-height: 3.2rem; padding: .75rem 1rem; border: 2px solid #c6ccd3; border-radius: 10px;
  background: #fff; font-size: 1rem; line-height: 1.4; display: flex; gap: .7rem; align-items: center; cursor: pointer; }
.sf-choice:hover, .sf-choice:focus-visible { border-color: #002855; background: #f4f7fb; outline: none; box-shadow: 0 0 0 3px rgba(0,40,85,.18); }
.sf-choice .sf-key { flex: 0 0 1.9rem; height: 1.9rem; border-radius: 6px; background: #eef2f6; display: grid; place-items: center; font-weight: 700; }
.sf-choice[disabled] { opacity: .6; cursor: default; }
.sf-continue { min-height: 3rem; font-size: 1.02rem; }

.sf-panel { background: #f7f9fb; border: 1px solid #e3e6ea; border-radius: 12px; padding: .8rem .9rem; position: sticky; top: .5rem; }
.sf-panel h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: #5b6470; margin: 0 0 .5rem; }
.sf-panel dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .3rem .6rem; font-size: .9rem; }
.sf-panel dt { color: #5b6470; font-weight: 400; display: flex; gap: .35rem; align-items: center; }
.sf-panel dd { margin: 0; font-weight: 600; }
.sf-panel dd.is-warn::before { content: "\26A0\FE0E  "; }
@media (max-width: 860px) { .sf-panel { position: static; } .sf-panel dl { grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); } .sf-panel dt { grid-column: auto; } }

.sf-consequence { border-radius: 10px; padding: .75rem .9rem; margin-bottom: .9rem; border: 1px solid #e3e6ea; background: #fafbfc; }
.sf-consequence .sf-q { font-weight: 700; display: flex; gap: .4rem; align-items: center; }
.sf-q-strong { color: #1e6b34; } .sf-q-acceptable { color: #2b5c8a; } .sf-q-poor { color: #8a5a00; } .sf-q-unsafe { color: #a32020; }
.sf-consequence.is-unsafe { border-color: #e2b4b4; background: #fdf5f5; }
.sf-changes { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .4rem; padding: 0; list-style: none; }
.sf-changes li { font-size: .82rem; background: #eef2f6; border-radius: 999px; padding: .15rem .6rem; }
.sf-end { border-radius: 10px; padding: .8rem 1rem; margin: .4rem 0 .9rem; font-weight: 600; display: flex; gap: .5rem; align-items: center; }
.sf-end.is-resolved, .sf-end.is-escalated { background: #e3f4e8; color: #1e6b34; }
.sf-end.is-worse { background: #fff3dc; color: #7a4d00; }
.sf-end.is-unsafe { background: #fbe6e6; color: #a32020; }

.sf-path { list-style: none; padding: 0; margin: 0; }
.sf-path > li { position: relative; padding: 0 0 1rem 2.4rem; }
.sf-path > li::before { content: ""; position: absolute; left: .9rem; top: 1.9rem; bottom: 0; border-left: 2px solid #d9dee4; }
.sf-path > li:last-child::before { display: none; }
.sf-path .sf-mark { position: absolute; left: 0; top: 0; width: 1.9rem; height: 1.9rem; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: .9rem; }
.sf-mark.q-strong { background: #2ea043; } .sf-mark.q-acceptable { background: #3c78b4; } .sf-mark.q-poor { background: #b7791f; } .sf-mark.q-unsafe { background: #c53030; }
.sf-path .sf-sit { color: #5b6470; font-size: .88rem; }
.sf-path .sf-did { font-weight: 600; }
.sf-path .sf-why { font-size: .92rem; }
.sf-path .sf-seg { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: #5b6470; margin: .3rem 0 .6rem; }

.sf-scores { display: grid; gap: .45rem; }
.sf-score { display: grid; grid-template-columns: 12rem 1fr 3.2rem; gap: .6rem; align-items: center; font-size: .93rem; }
@media (max-width: 600px) { .sf-score { grid-template-columns: 1fr 3rem; } .sf-score .sf-bar { grid-column: 1 / -1; } }
.sf-bar { height: .7rem; background: #eef2f6; border-radius: 999px; overflow: hidden; }
.sf-bar span { display: block; height: 100%; background: #002855; }
.sf-big { font-size: 2.6rem; font-weight: 700; line-height: 1; }

/* lesson activities */
.sf-taps { display: grid; gap: .5rem; }
.sf-tap { text-align: left; min-height: 3rem; border: 2px solid #c6ccd3; border-radius: 10px; background: #fff; padding: .6rem .9rem; display: flex; gap: .6rem; align-items: center; }
.sf-tap.is-picked { border-color: #002855; background: #f4f7fb; }
.sf-tap .sf-order { flex: 0 0 1.9rem; height: 1.9rem; border-radius: 50%; background: #eef2f6; display: grid; place-items: center; font-weight: 700; }
.sf-tap.is-picked .sf-order { background: #002855; color: #fff; }
.sf-sit-row { border-top: 1px solid #eef0f2; padding: .7rem 0; }
.sf-sit-row:first-child { border-top: 0; }
.sf-levels { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .4rem; }
.sf-levels label { border: 2px solid #c6ccd3; border-radius: 8px; padding: .45rem .6rem; min-height: 2.6rem; display: flex; align-items: center; gap: .35rem; cursor: pointer; font-size: .9rem; }
.sf-levels input { width: 1.1rem; height: 1.1rem; }
.sf-levels label:has(input:checked) { border-color: #002855; background: #f4f7fb; }
.sf-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .5rem; }
.sf-cards label { border: 2px solid #c6ccd3; border-radius: 10px; padding: .6rem .7rem; display: flex; gap: .5rem; align-items: flex-start; cursor: pointer; min-height: 3rem; }
.sf-cards label:has(input:checked) { border-color: #002855; background: #f4f7fb; }
.sf-cards input { width: 1.15rem; height: 1.15rem; margin-top: .15rem; }
.sf-message { background: #f7f9fb; border: 1px solid #e3e6ea; border-radius: 10px; padding: .7rem .9rem; font-family: inherit; white-space: pre-line; }
.sf-verdict-right { color: #1e6b34; } .sf-verdict-under, .sf-verdict-missing { color: #a32020; } .sf-verdict-over { color: #8a5a00; }

.sf-cats { display: flex; flex-wrap: wrap; gap: .5rem; }
.sf-cats .btn { min-height: 2.8rem; }
.sf-review h3 { font-size: 1.05rem; margin-top: 1rem; }
.sf-review table { width: 100%; font-size: .88rem; border-collapse: collapse; }
.sf-review td, .sf-review th { border-top: 1px solid #eef0f2; padding: .35rem .4rem; vertical-align: top; }
.sf-node { border: 1px solid #e3e6ea; border-radius: 8px; padding: .5rem .7rem; margin: .5rem 0; }
.sf-node.is-end { background: #f7f9fb; }
