/* Presenter theme: high contrast, large type, readable from the back of a room. */
:root {
  --ink: #14213d;
  --ink-soft: #4a5568;
  --paper: #f7f8fb;
  --card: #ffffff;
  --line: #dfe3ea;
  --brand: #0b5cad;
  --brand-dark: #08427d;
  --accent: #e0a458;           /* soft amber (was a strong orange-red) */
  --ok: #1f8a4c;
  --ok-bg: #e3f6ea;
  --muted-stop: #e9ecf2;
  /* Milder session palette */
  --s1: #3a6ea5; --s2: #2f8a8a; --s3: #4c9a62; --s4: #7a68b5; --s5: #c98b3e; --s6: #b0687d;
  /* Session tab colours */
  --t-ponder: #2f8a8a; --t-why: #3a6ea5; --t-explain: #4c9a62; --t-work: #7a68b5;
  --t-client: #b07a33; --t-quiz: #5868a8;
  --soft-close: #5b6b82;
}

body { background: var(--paper); color: var(--ink); }
.navbar-brand small { font-weight: 400; opacity: .75; }
.app-nav { background: var(--ink); }

/* ---------------------------------------------------------------- Timeline (metro / chevrons) */
.timeline-head h1 { font-weight: 800; font-size: clamp(1.4rem, 2.2vw, 2.4rem); }
.timeline-head .lead { color: var(--ink-soft); }
.metro { display: flex; gap: 4px; align-items: stretch; margin: 1.5rem 0 1rem; }
.stop { position: relative; text-decoration: none; color: #fff; min-width: 0; }
.stop.session {
  flex: 1 1 0;
  padding: 1.1rem clamp(1rem, 1.4vw, 1.6rem) 1.1rem clamp(1.4rem, 1.8vw, 2rem);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 50%, calc(100% - 22px) 100%, 0 100%, 22px 50%);
  min-height: 15rem; display: flex; flex-direction: column; gap: .35rem;
  transition: transform .12s ease, filter .12s ease;
}
.stop.session:first-child { clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 50%, calc(100% - 22px) 100%, 0 100%); padding-left: 1.2rem; }
.stop.session:hover, .stop.session:focus-visible { transform: translateY(-4px); filter: brightness(1.08); color: #fff; outline: none; }
.stop .num { font-size: clamp(1.5rem, 1.9vw, 2.2rem); font-weight: 800; line-height: 1; }
.stop .time { font-size: clamp(.75rem, .85vw, .95rem); font-weight: 600; opacity: .92; white-space: nowrap; }
.stop .title { font-size: clamp(.9rem, 1.05vw, 1.15rem); font-weight: 700; line-height: 1.2; overflow-wrap: break-word; }
.stop .desc { font-size: clamp(.75rem, .8vw, .9rem); opacity: .9; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
.stop.pause {
  flex: 0 0 4.6rem; background: var(--muted-stop); color: var(--ink-soft);
  border-radius: 999px; margin: 2.2rem 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: .6rem .25rem; gap: .3rem;
}
.stop.pause i { font-size: 1.5rem; }
.stop.pause .title { font-size: .8rem; font-weight: 700; }
.stop.pause .time { font-size: .72rem; white-space: normal; }
.stop.c1 { background: var(--s1); } .stop.c2 { background: var(--s2); } .stop.c3 { background: var(--s3); }
.stop.c4 { background: var(--s4); } .stop.c5 { background: var(--s5); } .stop.c0 { background: var(--s6); }

/* Small laptops (incl. 125% Windows scaling): give the session chevrons more room. */
@media (max-width: 1200px) {
  .stop.session { padding: 1rem .9rem 1rem 1.5rem; }
  .stop.session:first-child { padding-left: 1rem; }
  .stop .title { font-size: .85rem; }
  .stop .time { font-size: .72rem; white-space: normal; }
  .stop .time .bi { display: none; }
  .stop.pause { flex-basis: 3.4rem; }
}

@media (max-width: 900px) {
  .metro { flex-direction: column; }
  .stop.session, .stop.session:first-child { clip-path: none; border-radius: .75rem; min-height: 0; padding: 1rem 1.2rem; }
  .stop.pause { flex: 0 0 auto; flex-direction: row; border-radius: .75rem; margin: 0; justify-content: flex-start; padding: .5rem 1rem; }
}

/* ---------------------------------------------------------------- Session page */
.presenter { font-size: 1.3rem; }
.session-head { background: var(--ink); color: #fff; padding: 1rem 0; }
.session-head .badge-num { font-size: 2.6rem; font-weight: 800; line-height: 1; background: var(--accent); color: var(--ink); border-radius: .6rem; padding: .35rem .8rem; }
.session-head h1 { font-weight: 800; font-size: clamp(1.7rem, 2.8vw, 2.7rem); margin: 0; }
.session-head .meta { color: #c8d1e1; font-size: 1.05rem; }
.session-nav .btn { font-size: 1rem; }
.section-title { font-weight: 800; font-size: 1.1rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); margin: 1.6rem 0 .7rem; }

.ponder-card { border: 0; border-left: 8px solid var(--t-ponder); box-shadow: 0 2px 10px rgba(20,33,61,.07); }
.ponder-card .prompt { font-size: 1.6rem; font-weight: 700; line-height: 1.3; }
.state-badge { font-size: .85rem; vertical-align: middle; }

/* Session tabs: one section on screen at a time (no scrolling between sections) */
.session-tabs { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1020; }
.session-tabs .nav-link { --tab: var(--ink-soft); color: var(--ink-soft); font-size: 1.05rem; font-weight: 600;
  border: 0; border-bottom: 4px solid transparent; border-radius: 0; padding: .85rem 1.1rem .7rem; background: none; }
.session-tabs .nav-link:hover { color: var(--tab); background: #f6f7fa; }
.session-tabs .nav-link.active { color: var(--tab); border-bottom-color: var(--tab); background: color-mix(in srgb, var(--tab) 8%, #fff); }
.session-tabs .nav-link kbd { font-size: .7rem; background: #eef0f4; color: var(--ink-soft); padding: .1rem .35rem; }
.session-tabs .nav-link.active kbd { background: var(--tab); color: #fff; }
.tab-ponder  { --tab: var(--t-ponder) !important; }  .tab-why  { --tab: var(--t-why) !important; }
.tab-explain { --tab: var(--t-explain) !important; } .tab-work { --tab: var(--t-work) !important; }
.tab-client  { --tab: var(--t-client) !important; }  .tab-quiz { --tab: var(--t-quiz) !important; }
.ponder-picker .nav-link { font-weight: 600; color: var(--t-ponder); }
.ponder-picker .nav-link.active { background: var(--t-ponder); color: #fff; }
.discuss-box { background: #f3f6fa; border-left: 4px solid var(--t-why); border-radius: .4rem; padding: 1rem 1.2rem; }
.discuss-box h3 { color: var(--t-why); }

/* Milder buttons and badges (replace Bootstrap's strong red/green) */
.btn-close-survey { background: var(--soft-close); border-color: var(--soft-close); color: #fff; }
.btn-close-survey:hover, .btn-close-survey:focus { background: #4a596e; border-color: #4a596e; color: #fff; }
.btn-quiz { background: var(--t-quiz); border-color: var(--t-quiz); color: #fff; }
.btn-quiz:hover, .btn-quiz:focus { background: #46558f; border-color: #46558f; color: #fff; }
.badge-quiz { background: var(--t-quiz); color: #fff; }
.badge-exercise { background: var(--t-work); color: #fff; }
.badge-demo { background: var(--ink-soft); color: #fff; }
.panel-card { border: 0; box-shadow: 0 2px 10px rgba(20,33,61,.07); margin-bottom: 1rem; }
.panel-card > .card-header { background: var(--card); border: 0; font-weight: 800; font-size: 1.35rem; padding: 1rem 1.25rem .25rem; }
.panel-card .card-body { padding: .5rem 1.5rem 1.4rem; }
.panel-why    { border-top: 6px solid var(--t-why); }
.panel-explain{ border-top: 6px solid var(--t-explain); }
.panel-work   { border-top: 6px solid var(--t-work); }
.panel-client { border-top: 6px solid var(--t-client); }
.panel-quiz   { border-top: 6px solid var(--t-quiz); }
.panel-card ul.bullets > li { margin-bottom: .45rem; }
.panel-card ul.bullets ul { margin-top: .3rem; font-size: .92em; color: var(--ink-soft); }
.prompts li { font-style: italic; }
.usecase-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr)); gap: 1rem 1.5rem; }
.usecase-grid h3 { font-size: 1.05rem; font-weight: 800; color: var(--t-client); text-transform: uppercase; letter-spacing: .04em; margin-bottom: .35rem; }
.usecase-grid ul { padding-left: 1.1rem; margin: 0; }
.usecase-grid li { margin-bottom: .25rem; font-size: 1.1rem; }
.file-link { display: inline-flex; align-items: center; gap: .5rem; font-size: 1.1rem; }

/* ---------------------------------------------------------------- QR / live */
.qr-box svg { width: 100%; height: auto; max-width: 520px; display: block; margin: 0 auto; }
.qr-modal .modal-content { background: var(--ink); color: #fff; }
.short-link { font-family: ui-monospace, Consolas, monospace; font-size: clamp(1.3rem, 2.4vw, 2.2rem); font-weight: 700; word-break: break-all; }
.live-count { font-size: 4rem; font-weight: 800; line-height: 1; }

/* ---------------------------------------------------------------- Results */
.result-row { margin-bottom: .7rem; }
.result-row .label { display: flex; justify-content: space-between; gap: 1rem; font-size: 1.15rem; font-weight: 600; }
.result-bar { height: 1.6rem; background: #edf0f5; border-radius: .4rem; overflow: hidden; }
.result-bar > div { height: 100%; background: #8aa0bf; transition: width .4s ease; }
.result-row.correct .label { color: var(--ok); }
.result-row.correct .result-bar > div { background: var(--ok); }
.correct-chip { background: var(--ok-bg); color: var(--ok); border-radius: .4rem; padding: 0 .4rem; font-size: .85em; }
.paragraph-answers { list-style: none; padding: 0; margin: 0; }
.paragraph-answers li { background: #f3f5f9; border-left: 4px solid #8aa0bf; padding: .6rem .9rem; margin-bottom: .5rem; border-radius: .3rem; white-space: pre-wrap; font-size: 1.1rem; }
.explanation { background: #fff8e6; border-left: 4px solid #f59f00; padding: .6rem .9rem; border-radius: .3rem; }

/* ---------------------------------------------------------------- Quiz presenter */
.quiz-question { font-size: 2rem; font-weight: 800; line-height: 1.25; }
.quiz-options li { font-size: 1.4rem; margin-bottom: .4rem; }

/* ---------------------------------------------------------------- Participant (phones) */
.participant { font-size: 1.1rem; background: var(--paper); }
.participant .p-head { background: var(--ink); color: #fff; padding: .8rem 1rem; font-weight: 700; }
.participant .p-prompt { font-size: 1.35rem; font-weight: 700; line-height: 1.3; }
.participant .form-check { padding: .85rem 1rem .85rem 2.6rem; border: 2px solid var(--line); border-radius: .7rem; margin-bottom: .6rem; background: #fff; }
.participant .form-check:has(input:checked) { border-color: var(--brand); background: #eaf2fb; }
.participant .form-check-input { width: 1.4rem; height: 1.4rem; margin-top: .1rem; margin-left: -1.8rem; }
.participant .btn-submit { font-size: 1.2rem; padding: .8rem; }
.participant .msg-icon { font-size: 3.5rem; color: var(--brand); }

@media print { .no-print { display: none !important; } }

/* ---------------------------------------------------------------- illustrations (spec 004) */
.illustrations { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }
.panel-explain + .illustrations { margin-top: 1.25rem; }
.illus-thumb { position: relative; height: 110px; min-width: 110px; max-width: 220px; padding: 0; border: 1px solid #d5dbe3;
  border-radius: .5rem; overflow: hidden; background: #f1f3f6; cursor: zoom-in;
  box-shadow: 0 1px 2px rgba(0,0,0,.06); transition: transform .12s ease, box-shadow .12s ease; }
.illus-thumb img { height: 100%; width: auto; max-width: 220px; object-fit: cover; display: block; }
.illus-thumb > .bi { display: none; }
.illus-thumb:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,.12); }
.illus-thumb:focus-visible { outline: 3px solid var(--t-explain); outline-offset: 2px; }
.illus-thumb.broken { width: 150px; cursor: default; }
.illus-thumb.broken img { display: none; }
.illus-thumb.broken > .bi { display: flex; align-items: center; justify-content: center; height: 100%;
  font-size: 2rem; color: #9aa5b4; }

body.viewer-open { overflow: hidden; }
.viewer { position: fixed; inset: 0; z-index: 2000; background: rgba(14, 20, 31, .96);
  display: flex; flex-direction: column; }
.viewer[hidden] { display: none; }
.viewer-stage { position: relative; flex: 1; overflow: hidden; touch-action: none; user-select: none; cursor: default; }
.viewer-stage img { position: absolute; left: 0; top: 0; transform-origin: 0 0; max-width: none;
  box-shadow: 0 10px 40px rgba(0,0,0,.5); background: #fff; }
.viewer-stage.zoomed img { cursor: grab; }
.viewer-stage.zoomed img:active { cursor: grabbing; }
.viewer-broken { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; color: #c3cbd6; font-size: 1.25rem; gap: .5rem; }
.viewer-broken[hidden] { display: none; }
.viewer-broken .bi { font-size: 4rem; }
.viewer-bar { display: flex; align-items: center; justify-content: center; gap: .5rem; padding: .6rem 1rem;
  background: rgba(0,0,0,.35); color: #e8edf3; flex-wrap: wrap; }
.viewer .vbtn { width: 3rem; height: 3rem; border-radius: 50%; border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08); color: #fff; font-size: 1.35rem; display: inline-flex;
  align-items: center; justify-content: center; }
.viewer .vbtn:hover:not(:disabled) { background: rgba(255,255,255,.2); }
.viewer .vbtn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.viewer .vbtn:disabled { opacity: .3; cursor: default; }
.viewer-count { min-width: 12rem; text-align: center; font-size: 1.1rem; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; max-width: 40vw; }
.viewer-zoom { min-width: 3.5rem; text-align: center; font-variant-numeric: tabular-nums; }
.viewer-sep { width: 1px; height: 2rem; background: rgba(255,255,255,.2); margin: 0 .5rem; }
@media (max-width: 576px) { .viewer-count { min-width: 0; max-width: 100%; order: -1; flex-basis: 100%; } }
