/* HazenTech self-paced course styles. Shared by every module page.
   Offline-safe: no external fonts or scripts. */
@font-face { font-family: 'Manrope'; font-weight: 800; src: url('fonts/Manrope-ExtraBold.ttf') format('truetype'); }

:root {
  --navy: #05173B; --red: #E50019; --red-700: #b00014; --red-100: #FCE0E3;
  --blue: #00457C; --blue-100: #DCEAF4; --blue-50: #eef5fb;
  --ink: #1f2430; --muted: #4c5870; --line: #dfe5ee; --soft: #f5f7fb; --white: #fff;
  --ok: #0f7a3d; --ok-100: #dff3e6; --bad: #b3261e; --bad-100: #fbe3e1; --warn: #8a5a00; --warn-100: #fff1d0;
  --radius: 12px; --col: 780px;
  --shadow: 0 1px 2px rgba(5,23,59,.06), 0 4px 14px rgba(5,23,59,.06);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; font-family: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  font-size: 17px; line-height: 1.6; color: var(--ink); background: var(--soft); }
h1, h2, h3, .display { font-family: 'Manrope', 'Segoe UI', system-ui, sans-serif; font-weight: 800; color: var(--navy); line-height: 1.2; }
h1 { font-size: 2rem; margin: 0 0 .4rem; letter-spacing: -.01em; }
h2 { font-size: 1.35rem; margin: 0 0 .75rem; }
h3 { font-size: 1.08rem; margin: 1.4rem 0 .4rem; }
p { margin: 0 0 .9rem; }
a { color: var(--blue); }
code, .mono { font-family: ui-monospace, 'Cascadia Mono', Menlo, Consolas, monospace; font-size: .92em; }
.mono { letter-spacing: .02em; }
table { border-collapse: collapse; width: 100%; font-size: .93rem; margin: .4rem 0 1rem; background: #fff; }
th, td { border: 1px solid var(--line); padding: .45rem .6rem; text-align: left; vertical-align: top; }
th { background: var(--blue-50); color: var(--navy); font-weight: 700; }
td.mono { white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tablewrap { overflow-x: auto; }
:focus-visible { outline: 3px solid #ffb703; outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 40; background: var(--navy); color: #fff; }
.topbar .in { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; gap: 14px; padding: 10px 18px; }
.topbar a.home { color: #fff; text-decoration: none; font-family: 'Manrope'; font-weight: 800; font-size: .95rem; white-space: nowrap; }
.topbar .mt { flex: 1; min-width: 0; font-size: .88rem; color: #c8d4e8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .prog { width: 140px; height: 8px; background: #23345a; border-radius: 99px; overflow: hidden; flex: none; }
.topbar .prog i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #4da3ff, var(--red)); transition: width .4s; }
.topbar .pct { font-size: .8rem; color: #c8d4e8; width: 3.2em; text-align: right; flex: none; }
.topbar button { background: #fff; color: var(--navy); border: 0; border-radius: 99px; padding: 6px 14px; font: 700 .85rem/1 inherit; cursor: pointer; flex: none; }

/* ---------- layout ---------- */
main { max-width: var(--col); margin: 0 auto; padding: 28px 18px 80px; }
.mhead { padding: 18px 0 8px; }
.mhead .kicker { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--red); font-weight: 700; }
.mhead .meta { color: var(--muted); font-size: .92rem; }
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 28px; margin: 22px 0; }
.card > :last-child { margin-bottom: 0; }
.step { display: flex; align-items: center; gap: 10px; margin-bottom: .5rem; }
.step .n { font-family: 'Manrope'; font-weight: 800; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); background: var(--blue-50); padding: 3px 10px; border-radius: 99px; }
.lead { font-size: 1.08rem; color: var(--muted); }

/* scenario opener */
.scenario { background: var(--navy); color: #e4ebf6; border-radius: var(--radius); padding: 26px 28px; margin: 18px 0 22px; position: relative; overflow: hidden; }
.scenario::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: linear-gradient(90deg, var(--red) 0 30%, #4da3ff 30%); }
.scenario h2 { color: #fff; }
.scenario .who { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: #ff8a98; font-weight: 700; margin-bottom: .5rem; }
.scenario .msg { background: #0f2550; border-left: 3px solid #4da3ff; border-radius: 0 10px 10px 0; padding: 14px 16px; margin: .8rem 0; font-size: 1rem; }
.scenario .msg b { color: #fff; }
.scenario p:last-child { margin-bottom: 0; }

/* objectives */
.objectives { list-style: none; padding: 0; margin: 0; }
.objectives .bloom { min-width: 104px; text-align: center; }
.objectives li { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); }
.objectives li:first-child { border-top: 0; }
.bloom { flex: none; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; margin-top: 3px; white-space: nowrap; }
.bloom.remember { background: #eef1f6; color: #3d4a63; }
.bloom.understand { background: var(--blue-100); color: var(--blue); }
.bloom.apply { background: #e0f2e8; color: #0d6a35; }
.bloom.analyze { background: #fff0d1; color: #7a4f00; }
.bloom.evaluate { background: var(--red-100); color: var(--red-700); }

/* callouts */
.bridge { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: stretch; margin: 1rem 0; }
.bridge .side { border-radius: 10px; padding: 12px 14px; }
.bridge .legal { background: #f3effa; border: 1px solid #ddd2f0; }
.bridge .cargo { background: var(--blue-50); border: 1px solid var(--blue-100); }
.bridge .lab { font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.bridge .eq { align-self: center; font-family: 'Manrope'; font-size: 1.4rem; color: var(--red); }
.note { border-left: 4px solid var(--blue); background: var(--blue-50); border-radius: 0 10px 10px 0; padding: 12px 16px; margin: 1rem 0; }
.note.warn { border-color: #d99a00; background: var(--warn-100); }
.note.stop { border-color: var(--red); background: #fff6f7; }
.note .t { font-weight: 700; color: var(--navy); display: block; margin-bottom: 2px; }
.note p:last-child { margin: 0; }
.keybox { background: var(--navy); color: #e4ebf6; border-radius: 10px; padding: 14px 18px; margin: 1rem 0; font-size: 1.02rem; }
.keybox b { color: #fff; }
.formula { font-family: ui-monospace, Menlo, Consolas, monospace; background: #0f2550; color: #fff; border-radius: 8px; padding: 10px 14px; display: block; margin: .6rem 0; font-size: .95rem; overflow-x: auto; }

/* click-to-reveal */
details.reveal { border: 1px solid var(--line); border-radius: 10px; margin: .6rem 0; background: #fff; }
details.reveal > summary { cursor: pointer; list-style: none; padding: 12px 16px 12px 44px; font-weight: 600; color: var(--navy); position: relative; }
details.reveal > summary::-webkit-details-marker { display: none; }
details.reveal > summary::before { content: '+'; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; border-radius: 50%; background: var(--blue); color: #fff; font: 700 15px/20px system-ui; text-align: center; }
details.reveal[open] > summary::before { content: '\2212'; background: var(--red); }
details.reveal > .body { padding: 0 16px 14px 44px; }
details.reveal > .body > :last-child { margin-bottom: 0; }

/* flip cards */
.flips { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 12px; margin: 1rem 0; }
.flip { display: block; width: 100%; perspective: 900px; min-height: 150px; border: 0; padding: 0; background: none; cursor: pointer; font: inherit; text-align: left; }
.flip .fi { display: block; position: relative; width: 100%; height: 100%; min-height: 150px; transition: transform .5s; transform-style: preserve-3d; }
.flip.on .fi { transform: rotateY(180deg); }
.flip .ff, .flip .fb { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; justify-content: center; }
.flip .ff { background: #f3effa; border: 1px solid #ddd2f0; }
.flip .fb { background: var(--blue-50); border: 1px solid #9cc4e4; transform: rotateY(180deg); }
.flip small, .flip strong, .flip span.d { display: block; }
.flip small { font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.flip strong { font-family: 'Manrope'; font-size: 1.05rem; color: var(--navy); margin: 4px 0; }
.flip span.d { font-size: .9rem; color: var(--muted); line-height: 1.4; }
.flip .ff::after { content: 'Tap to flip'; position: absolute; right: 12px; bottom: 8px; font-size: .7rem; color: #5e4f7d; }
@media (prefers-reduced-motion: reduce) { .flip .fi { transition: none; } html { scroll-behavior: auto; } }

/* ---------- questions ---------- */
.q { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin: 14px 0; background: #fff; }
.q .qh { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 6px; }
.q .qn { font-size: .75rem; font-weight: 700; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.q .stem { font-weight: 600; color: var(--navy); margin-bottom: .6rem; }
.q .opts { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.q .opt { width: 100%; text-align: left; background: var(--soft); border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 14px 10px 44px; font: inherit; font-size: .97rem; color: var(--ink); cursor: pointer; position: relative; line-height: 1.45; }
.q .opt::before { content: attr(data-l); position: absolute; left: 12px; top: 10px; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 1.5px solid #b9c4d6; font: 700 .75rem/19px system-ui; text-align: center; color: var(--muted); }
.q .opt:hover:not([disabled]) { border-color: var(--blue); background: var(--blue-50); }
.q .opt.right { border-color: var(--ok); background: var(--ok-100); }
.q .opt.right::before { content: '\2713'; background: var(--ok); border-color: var(--ok); color: #fff; }
.q .opt.wrong { border-color: var(--bad); background: var(--bad-100); }
.q .opt.wrong::before { content: '\2715'; background: var(--bad); border-color: var(--bad); color: #fff; }
.q .opt[disabled] { cursor: default; }
.q .opt.dim { opacity: .55; }
.fb-box { margin-top: 10px; border-radius: 10px; padding: 10px 14px; font-size: .95rem; display: none; }
.fb-box.show { display: block; }
.fb-box.ok { background: var(--ok-100); color: #0b4f29; }
.fb-box.no { background: var(--bad-100); color: #7d1a14; }
.fb-box b { display: block; }
.q .retry, .btn { display: inline-flex; align-items: center; gap: 6px; background: var(--navy); color: #fff; border: 0; border-radius: 99px; padding: 9px 18px; font: 700 .9rem/1 inherit; cursor: pointer; margin-top: 10px; }
.btn.ghost, .q .retry { background: #fff; color: var(--navy); border: 1.5px solid var(--navy); }
.btn.red { background: var(--red); }
.btn:hover { filter: brightness(1.12); }
a.btn { text-decoration: none; }

/* quiz group (warm-up and module check) */
.quiz { margin: 0; }
.quiz .score { display: none; margin-top: 14px; border-radius: 12px; padding: 16px 18px; font-weight: 600; }
.quiz .score.show { display: block; }
.quiz .score.pass { background: var(--ok-100); color: #0b4f29; }
.quiz .score.fail { background: var(--warn-100); color: #5e3d00; }
.quiz .score .big { font-family: 'Manrope'; font-size: 1.6rem; display: block; }

/* ---------- drag and sort (ordering) ---------- */
.order { list-style: none; padding: 0; margin: .8rem 0; display: grid; gap: 8px; counter-reset: ord; }
.order li { counter-increment: ord; display: flex; align-items: center; gap: 10px; background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 10px 9px 12px; cursor: grab; user-select: none; }
.order li::before { content: counter(ord); flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: #fff; font: 800 .8rem/26px 'Manrope', system-ui; text-align: center; }
.order li .tx { flex: 1; }
.order li .mv { display: flex; gap: 4px; }
.order li .mv button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--soft); cursor: pointer; font-size: .9rem; color: var(--navy); }
.order li.dragging { opacity: .4; }
.order li.ok { border-color: var(--ok); background: var(--ok-100); }
.order li.no { border-color: var(--bad); background: var(--bad-100); }

/* ---------- buckets (sort into groups / match) ---------- */
.buckets .pool { display: flex; flex-wrap: wrap; gap: 8px; min-height: 52px; padding: 10px; border: 2px dashed #c3cede; border-radius: 12px; background: var(--soft); margin: .6rem 0 12px; }
.buckets .pool:empty::after { content: 'All placed. Press Check.'; color: var(--muted); font-size: .9rem; align-self: center; }
.chip { background: #fff; border: 1.5px solid #b9c4d6; border-radius: 99px; padding: 6px 14px; font: inherit; font-size: .93rem; cursor: grab; color: var(--ink); line-height: 1.35; text-align: left; }
.chip.sel { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-100); }
.chip.ok { border-color: var(--ok); background: var(--ok-100); }
.chip.no { border-color: var(--bad); background: var(--bad-100); }
.bk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.bk { border: 1.5px solid var(--blue-100); border-radius: 12px; background: var(--blue-50); padding: 10px; min-height: 96px; cursor: pointer; }
.bk.over, .bk.target { border-color: var(--red); background: #fff6f7; }
.bk h4 { margin: 0 0 8px; font-family: 'Manrope'; font-size: .92rem; color: var(--navy); }
.bk h4 small { display: block; font-family: system-ui; font-weight: 400; color: var(--muted); font-size: .8rem; }
.bk .slot:empty::after { content: 'Drop here'; display: block; width: 100%; border: 1.5px dashed #9cc4e4; border-radius: 8px; padding: 8px; text-align: center; color: #5b6f8a; font-size: .8rem; }
.bk .slot { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.hint-line { font-size: .85rem; color: var(--muted); }
.act-fb { margin-top: 10px; }

/* ---------- calculator exercises ---------- */
.calc { border: 1.5px solid var(--blue-100); border-radius: 12px; padding: 18px; margin: 14px 0; background: #fff; }
.calc .ch { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.calc .tag { font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 3px 10px; border-radius: 99px; }
.calc .tag.worked { background: var(--ok-100); color: var(--ok); }
.calc .tag.faded { background: var(--warn-100); color: var(--warn); }
.calc .tag.solo { background: var(--red-100); color: var(--red-700); }
.calc .givens { background: var(--soft); border-radius: 10px; padding: 10px 14px; margin: 8px 0 12px; font-size: .95rem; }
.calc .givens table { margin: 4px 0; }
.calc .row { display: grid; grid-template-columns: 1fr 170px 28px; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px dashed var(--line); }
.calc .row label { font-size: .95rem; }
.calc .row label small { display: block; color: var(--muted); font-size: .82rem; }
.calc input, .calc select { width: 100%; font: inherit; font-size: 1rem; padding: 7px 10px; border: 1.5px solid #b9c4d6; border-radius: 8px; text-align: right; font-variant-numeric: tabular-nums; background: #fff; }
.calc select { text-align: left; }
.calc input[readonly] { background: var(--ok-100); border-color: #9fd6b3; color: #0b4f29; }
.calc .mk { font-size: 1.1rem; text-align: center; }
.calc .row.ok input, .calc .row.ok select { border-color: var(--ok); }
.calc .row.no input, .calc .row.no select { border-color: var(--bad); background: var(--bad-100); }
.calc .row .why { grid-column: 1 / -1; font-size: .88rem; color: #7d1a14; background: var(--bad-100); border-radius: 8px; padding: 6px 10px; display: none; }
.calc .row.no .why { display: block; }
.calc .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.calc .done { display: none; margin-top: 10px; background: var(--ok-100); color: #0b4f29; border-radius: 10px; padding: 10px 14px; font-weight: 600; }
.calc.solved .done { display: block; }
.calc .working { margin-top: 10px; }

/* live playground */
.play { background: var(--blue-50); border: 1px solid var(--blue-100); border-radius: 12px; padding: 16px 18px; margin: 1rem 0; }
.play .ins { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.play label { font-size: .82rem; color: var(--muted); font-weight: 600; }
.play input { width: 100%; font: inherit; padding: 6px 8px; border: 1.5px solid #b9c4d6; border-radius: 8px; }
.play .out { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.play .out div { background: #fff; border-radius: 10px; padding: 10px 12px; }
.play .out small { display: block; font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.play .out b { font-family: 'Manrope'; font-size: 1.3rem; color: var(--navy); }
.play .out .win { outline: 3px solid var(--red); }
.play .verdict { margin-top: 10px; font-weight: 600; color: var(--navy); }

/* ---------- document hotspots ---------- */
.doc { background: #fffefa; border: 1.5px solid #c9b98a; border-radius: 6px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #222; overflow: hidden; }
.doc .dt { background: #f1e9cf; padding: 6px 10px; font-weight: 700; letter-spacing: .04em; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.doc .dg { display: grid; grid-template-columns: repeat(6, 1fr); }
.doc .f { border-right: 1px solid #d9cda6; border-bottom: 1px solid #d9cda6; padding: 5px 7px; min-height: 44px; position: relative; }
.doc .f small { display: block; font-size: 9.5px; color: #7a6a3a; text-transform: uppercase; letter-spacing: .03em; }
.doc .f span { display: block; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11.5px; white-space: pre-wrap; }
.doc .f.hs { cursor: pointer; }
.doc .f.hs::after { content: ''; position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: #e08a00; }
.doc .f.hs.found::after { background: var(--ok); }
.doc .f.hs:hover { background: #fff4c7; }
.doc .f.hs.act { background: #ffe58f; box-shadow: inset 0 0 0 2px #d99a00; }
.doc .f.hs.found { background: var(--ok-100); }
.doc .f.hs.miss { background: var(--bad-100); }
.doc .fict { font-size: 10px; color: #a0522d; font-weight: 700; }
.hs-info { margin-top: 10px; background: #fff; border: 1.5px solid #d99a00; border-radius: 10px; padding: 12px 16px; min-height: 64px; }
.hs-info .t { font-weight: 700; color: var(--navy); }
.hs-find { margin-top: 12px; background: var(--navy); color: #fff; border-radius: 10px; padding: 12px 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.hs-find b { color: #ffd166; }
.hs-find .st { margin-left: auto; font-size: .9rem; color: #c8d4e8; }
.hs-find button { background: #fff; color: var(--navy); border: 0; border-radius: 99px; padding: 6px 14px; font-weight: 700; cursor: pointer; }

/* glossary term + drawer */
abbr.g, span.g { text-decoration: underline dotted var(--blue); text-underline-offset: 3px; cursor: help; border: 0; }
.gpop { position: absolute; z-index: 60; max-width: 340px; background: var(--navy); color: #e4ebf6; border-radius: 10px; padding: 12px 14px; font-size: .9rem; line-height: 1.45; box-shadow: 0 8px 30px rgba(0,0,0,.25); }
.gpop b { color: #fff; display: block; margin-bottom: 2px; }
.gpop a { color: #8fc6ff; font-size: .82rem; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 92vw); background: #fff; z-index: 80; box-shadow: -10px 0 40px rgba(5,23,59,.2); transform: translateX(105%); transition: transform .25s; display: flex; flex-direction: column; }
.drawer.open { transform: none; }
.drawer .dh { background: var(--navy); color: #fff; padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; }
.drawer .dh b { font-family: 'Manrope'; }
.drawer .dh button { background: none; border: 0; color: #fff; font-size: 1.6rem; cursor: pointer; line-height: 1; }
.drawer input { margin: 12px 18px; padding: 9px 12px; font: inherit; border: 1.5px solid #b9c4d6; border-radius: 8px; }
.drawer .list { overflow-y: auto; padding: 0 18px 24px; }
.drawer dl { margin: 0; }
.drawer dt { font-weight: 700; color: var(--navy); margin-top: 12px; }
.drawer dd { margin: 2px 0 0; font-size: .92rem; color: var(--muted); }

/* takeaways / transfer */
.takeaways { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.takeaways li { padding: 10px 14px 10px 42px; background: var(--soft); border-radius: 10px; position: relative; }
.takeaways li::before { content: '\2713'; position: absolute; left: 14px; top: 10px; color: var(--ok); font-weight: 800; }
.lablink { display: flex; gap: 16px; align-items: center; border: 2px solid var(--red); background: #fff8f8; border-radius: 12px; padding: 16px 18px; margin-top: 14px; }
.lablink .lt { font-family: 'Manrope'; font-weight: 800; color: var(--red); font-size: 1.5rem; flex: none; text-align: center; line-height: 1; }
.lablink .lt small { display: block; font-size: .65rem; letter-spacing: .12em; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 30px; }
.pager a { flex: 1; text-decoration: none; background: #fff; border-radius: 12px; box-shadow: var(--shadow); padding: 14px 18px; color: var(--navy); font-weight: 700; }
.pager a small { display: block; color: var(--muted); font-weight: 400; font-size: .8rem; }
.pager a.next { text-align: right; }

/* course home */
.hero { background: var(--navy); color: #e4ebf6; padding: 40px 18px 34px; position: relative; }
.hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: linear-gradient(90deg, var(--red) 0 30%, #4da3ff 30%); }
.hero .in { max-width: var(--col); margin: 0 auto; }
.hero h1 { color: #fff; font-size: 2.3rem; }
.hero img { height: 30px; margin-bottom: 22px; filter: brightness(0) invert(1); }
.mods { display: grid; gap: 12px; }
.mod { display: grid; grid-template-columns: 54px 1fr auto; gap: 14px; align-items: center; background: #fff; border-radius: 12px; box-shadow: var(--shadow); padding: 14px 18px; text-decoration: none; color: inherit; border: 1.5px solid transparent; }
a.mod:hover { border-color: var(--blue); }
.mod .num { width: 46px; height: 46px; border-radius: 50%; background: var(--blue-50); color: var(--navy); font: 800 1.15rem/46px 'Manrope', system-ui; text-align: center; }
.mod.passed .num { background: var(--ok); color: #fff; }
.mod.started .num { background: var(--warn-100); color: var(--warn); }
.mod h3 { margin: 0; font-size: 1.02rem; }
.mod p { margin: 2px 0 0; font-size: .9rem; color: var(--muted); }
.mod .st { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); text-align: right; white-space: nowrap; }
.mod.passed .st { color: var(--ok); }
.mod.later { opacity: .55; }
.mod.later .st { color: var(--muted); }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .card { padding: 20px 18px; }
  .bridge { grid-template-columns: 1fr; }
  .bridge .eq { text-align: center; transform: rotate(90deg); }
  .calc .row { grid-template-columns: 1fr 120px 24px; }
  .topbar .prog { display: none; }
  .topbar .in { gap: 10px; padding: 10px 14px; }
  .topbar .mt { display: none; }
  .doc .dg { grid-template-columns: repeat(2, 1fr); }
  .doc .f[style*="span"] { grid-column: span 2 !important; }
  .mod { grid-template-columns: 44px 1fr; }
  .mod .st { grid-column: 2; text-align: left; }
  h1 { font-size: 1.6rem; }
}
@media print {
  .topbar, .pager, .drawer, .btn, .retry { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border: 1px solid var(--line); }
}

/* flow strip: a numbered process at a glance */
.flow { display: grid; grid-template-columns: repeat(var(--n, 6), 1fr); position: relative; margin: 1rem 0 1.2rem; padding: 0; list-style: none; }
.flow::before { content: ''; position: absolute; left: calc(50% / var(--n, 6)); right: calc(50% / var(--n, 6)); top: 20px; height: 3px; background: linear-gradient(90deg, var(--blue), var(--red)); }
.flow li { text-align: center; position: relative; padding: 0 4px; font-size: .82rem; line-height: 1.25; color: var(--navy); font-weight: 600; }
.flow li b { display: block; width: 42px; height: 42px; margin: 0 auto 6px; border-radius: 50%; background: #fff; border: 2.5px solid var(--blue); font: 800 1rem/37px 'Manrope', system-ui; color: var(--navy); }
.flow li.hot b { border-color: var(--red); background: var(--red); color: #fff; }
@media (max-width: 640px) { .flow { grid-template-columns: 1fr 1fr 1fr; row-gap: 12px; } .flow::before { display: none; } }

/* rate tables */
.rt th, .rt td { text-align: right; font-variant-numeric: tabular-nums; } .rt th:first-child, .rt td:first-child { text-align: left; }
.rt tr.hl td { background: #fff4c7; font-weight: 700; }

/* "Leave a note": reviewers and team leads only (added by course.js when signed in with those roles) */
.note-fab { position: fixed; right: 18px; bottom: 18px; z-index: 70; display: inline-flex; align-items: center; gap: 8px; background: var(--red); color: #fff; border: 0; border-radius: 99px; padding: 11px 18px; font: 700 .92rem/1 'Segoe UI', system-ui, sans-serif; cursor: pointer; box-shadow: 0 6px 20px rgba(5,23,59,.28); }
.note-fab:hover { background: var(--red-700); }
.note-fab:focus-visible { outline: 3px solid #ffb703; outline-offset: 2px; }
.note-panel { position: fixed; right: 18px; bottom: 74px; z-index: 75; width: min(400px, calc(100vw - 32px)); max-height: calc(100vh - 100px); overflow-y: auto; background: #fff; border-radius: 14px; box-shadow: 0 16px 50px rgba(5,23,59,.3); padding: 0 16px 14px; font-size: .92rem; line-height: 1.45; }
.note-panel .nh { position: sticky; top: 0; background: #fff; display: flex; justify-content: space-between; align-items: center; padding: 12px 0 8px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.note-panel .nh b { font-family: 'Manrope', system-ui; color: var(--navy); font-size: 1rem; }
.note-panel .x { background: none; border: 0; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--muted); }
.note-panel .nl { display: grid; gap: 4px; margin: 8px 0; font-weight: 600; font-size: .82rem; color: var(--navy); }
.note-panel select, .note-panel textarea { font: inherit; font-weight: 400; font-size: .92rem; padding: 7px 10px; border: 1.5px solid #b9c4d6; border-radius: 8px; width: 100%; background: #fff; color: var(--ink); }
.note-panel textarea { resize: vertical; }
.note-panel select:focus, .note-panel textarea:focus { outline: 3px solid #ffb703; outline-offset: 1px; }
.note-panel .nq { background: var(--blue-50); border-radius: 8px; padding: 8px 10px; margin: 8px 0; }
.note-panel small { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.note-panel q { display: block; font-style: italic; color: #33415c; }
.note-panel .link { background: none; border: 0; padding: 0; color: var(--blue); text-decoration: underline; cursor: pointer; font: inherit; font-size: .8rem; }
.note-panel .hint { color: var(--muted); font-size: .82rem; margin: 6px 0; }
.note-panel .nf { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.note-panel .btn { margin: 0; padding: 8px 14px; }
.note-panel .nmsg { color: var(--muted); font-size: .85rem; }
.note-panel .nback { margin: 10px 0 0; font-size: .85rem; }
.note-panel .note-mine { margin-top: 12px; }
.note-panel .note-mine > b { display: block; font-size: .82rem; color: var(--navy); border-top: 1px solid var(--line); padding-top: 10px; }
.note-panel .nm { border-left: 3px solid var(--red); padding: 4px 0 4px 10px; margin: 8px 0; font-size: .86rem; white-space: pre-wrap; }
.note-panel .nm.resolved { border-left-color: var(--ok); opacity: .75; }
.note-panel .nm q { font-size: .82rem; margin: 2px 0; }
@media print { .note-fab, .note-panel { display: none; } }
