/* ============================================================
   FINANCIAL FIRE DRILL — Module Design System
   Shared styles for all interactive literacy modules
   Brand: fire-red / gold / charcoal · Oswald + Inter · hazard stripes
   ============================================================ */

:root {
  --fire-red: #C62828;
  --fire-red-light: #E53935;
  --fire-red-dark: #8E0000;
  --fire-red-deep: #7B1818;
  --heading-orange: #E64A19;
  --gold: #C9A84C;
  --gold-light: #D4B95E;
  --charcoal: #2D2D2D;
  --charcoal-light: #3D3D3D;
  --text: #333333;
  --text-muted: #666666;
  --white: #FFFFFF;
  --off-white: #F9F7F4;
  --light-gray: #F0EDED;
  --green: #2E7D32;
  --green-light: #E8F2E8;

  --font-heading: "Oswald", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --shadow-card: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-card-hover: 0 12px 40px rgba(0,0,0,0.12);
  --shadow-red: 0 4px 20px rgba(198,40,40,0.25);
  --shadow-red-strong: 0 8px 30px rgba(198,40,40,0.4);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-body);
  background: var(--off-white);
  color: var(--text);
  line-height: 1.65;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* ── Hazard stripe ── */
.hazard-stripe {
  height: 14px;
  background: repeating-linear-gradient(45deg,
    var(--fire-red) 0, var(--fire-red) 20px,
    var(--white) 20px, var(--white) 40px);
}
.hazard-stripe-thin {
  height: 6px;
  background: repeating-linear-gradient(45deg,
    var(--fire-red) 0, var(--fire-red) 14px,
    var(--white) 14px, var(--white) 28px);
}

/* ── Top progress bar (course-wide) ── */
.course-bar {
  position: sticky; top: 0; z-index: 50;
  background: var(--charcoal);
  color: var(--white);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.6rem 1.25rem;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.8rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
.course-bar a { color: var(--gold-light); text-decoration: none; font-weight: 600; }
.course-bar a:hover { color: var(--white); }
.course-bar .cb-left { display:flex; align-items:center; gap:0.6rem; }
.course-bar .cb-badge { width: 26px; height: 26px; }
.course-progress-track {
  flex: 1; max-width: 320px; height: 8px; margin: 0 1rem;
  background: rgba(255,255,255,0.15); border-radius: 99px; overflow: hidden;
}
.course-progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transition: width 0.6s var(--ease);
}

/* ── Layout ── */
.wrap { max-width: 820px; margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 3rem 0; }
.section + .section { border-top: 1px solid var(--light-gray); }

/* ── Module hero ── */
.hero {
  background: linear-gradient(160deg, var(--fire-red-dark), var(--fire-red) 60%, var(--fire-red-light));
  color: var(--white);
  text-align: center;
  padding: 3rem 1.25rem 3.5rem;
  position: relative;
}
.hero .badge { width: 92px; margin: 0 auto 1.25rem; display:block; filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3)); }
.hero .eyebrow {
  font-family: var(--font-heading); text-transform: uppercase;
  letter-spacing: 0.25em; font-size: 0.8rem; color: var(--gold-light);
  font-weight: 600; margin-bottom: 0.75rem;
}
.hero h1 { font-size: clamp(2rem, 6vw, 3.25rem); color: var(--white); margin-bottom: 1rem; }
.hero .lede { max-width: 560px; margin: 0 auto; color: rgba(255,255,255,0.9); font-size: 1.05rem; font-style: italic; }
.hero .meta {
  display: inline-flex; gap: 1.25rem; margin-top: 1.5rem; flex-wrap: wrap; justify-content: center;
  font-family: var(--font-heading); text-transform: uppercase; letter-spacing: 0.08em;
  font-size: 0.78rem; color: var(--white);
}
.hero .meta span { display: inline-flex; align-items: center; gap: 0.4rem; background: rgba(0,0,0,0.18); padding: 0.4rem 0.9rem; border-radius: 99px; }

/* ── Typography blocks ── */
.kicker {
  font-family: var(--font-heading); text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--fire-red); font-size: 0.8rem; font-weight: 600; margin-bottom: 0.5rem;
}
h2.section-title { font-size: clamp(1.6rem, 4vw, 2.25rem); color: var(--heading-orange); margin-bottom: 0.4rem; }
h2.section-title .red { color: var(--fire-red); }
h3.block-title { font-size: 1.4rem; color: var(--charcoal); margin: 1.5rem 0 0.6rem; }
.section p { margin-bottom: 1rem; font-size: 1.05rem; }
.section p.big { font-size: 1.15rem; }

/* ── Brooks callout ── */
.brooks {
  background: var(--white);
  border-left: 5px solid var(--fire-red);
  border-radius: 0 10px 10px 0;
  padding: 1.4rem 1.6rem;
  margin: 1.75rem 0;
  box-shadow: var(--shadow-card);
}
.brooks .tag {
  font-family: var(--font-heading); text-transform: uppercase; letter-spacing: 0.08em;
  font-size: 0.72rem; color: var(--fire-red); font-weight: 600; margin-bottom: 0.5rem;
  display:flex; align-items:center; gap:0.5rem;
}
.brooks .tag::before { content:"🚒"; font-size: 1rem; }
.brooks p { font-size: 1.05rem; font-style: italic; color: var(--charcoal); margin-bottom: 0.6rem; }
.brooks p:last-child { margin-bottom: 0; }

/* ── Pull quote ── */
.pull {
  border-left: 4px solid var(--gold);
  background: rgba(201,168,76,0.08);
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.4rem; margin: 1.5rem 0;
}
.pull p { font-family: var(--font-heading); font-size: 1.3rem; color: var(--charcoal); text-transform: none; margin: 0; line-height: 1.3; }
.pull .red { color: var(--fire-red); }

/* ── Reveal cards (click to expand) ── */
.reveal-grid { display: grid; gap: 0.9rem; margin: 1.25rem 0; }
.reveal-card {
  background: var(--white); border: 1px solid var(--light-gray); border-radius: 10px;
  box-shadow: var(--shadow-card); overflow: hidden; transition: box-shadow 0.3s var(--ease);
}
.reveal-card:hover { box-shadow: var(--shadow-card-hover); }
.reveal-card > button {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 1.1rem 1.3rem; font-family: var(--font-heading); font-size: 1.1rem;
  color: var(--charcoal); text-transform: uppercase; letter-spacing: 0.02em;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.reveal-card > button .num {
  background: var(--fire-red); color: var(--white); width: 30px; height: 30px;
  border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.95rem; flex-shrink: 0; margin-right: 0.7rem;
}
.reveal-card > button .chev { color: var(--fire-red); transition: transform 0.3s var(--ease); font-size: 1.2rem; }
.reveal-card.open > button .chev { transform: rotate(45deg); }
.reveal-card .body {
  max-height: 0; overflow: hidden; transition: max-height 0.4s var(--ease);
  padding: 0 1.3rem;
}
.reveal-card.open .body { max-height: 600px; padding: 0 1.3rem 1.3rem; }
.reveal-card .body p { font-size: 1rem; margin: 0; }

/* ── Interactive panel (calculators/quizzes) ── */
.panel {
  background: var(--white); border-radius: 14px; box-shadow: var(--shadow-card);
  border-top: 5px solid var(--fire-red); padding: 1.6rem; margin: 1.5rem 0;
}
.panel h3 { font-size: 1.25rem; color: var(--charcoal); margin-bottom: 0.3rem; }
.panel .sub { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1.2rem; }

/* form rows */
.field { margin-bottom: 0.9rem; }
.field label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 0.3rem; color: var(--charcoal); }
.field .hint { font-weight: 400; color: var(--text-muted); font-size: 0.82rem; }
.input-money { position: relative; }
.input-money::before {
  content: "$"; position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-weight: 600;
}
.field input[type="number"], .field input[type="text"], .field select {
  width: 100%; padding: 0.7rem 0.85rem; border: 1.5px solid var(--light-gray);
  border-radius: 8px; font-family: var(--font-body); font-size: 1rem; background: var(--off-white);
  transition: border-color 0.2s;
}
.input-money input { padding-left: 1.7rem !important; }
.field input:focus, .field select:focus { outline: none; border-color: var(--fire-red); background: var(--white); }
.field input[type="range"] { width: 100%; accent-color: var(--fire-red); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 560px){ .grid-2 { grid-template-columns: 1fr; } }

/* result */
.result {
  margin-top: 1.2rem; padding: 1.2rem 1.3rem; border-radius: 10px;
  background: linear-gradient(135deg, var(--charcoal), var(--charcoal-light)); color: var(--white);
}
.result .label { font-family: var(--font-heading); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; color: var(--gold-light); }
.result .value { font-family: var(--font-heading); font-size: 2.4rem; line-height: 1.1; margin: 0.1rem 0 0.4rem; }
.result .value.pos { color: #8FE388; }
.result .value.neg { color: #FF8A80; }
.result .note { font-size: 0.92rem; color: rgba(255,255,255,0.82); }
.result .note strong { color: var(--gold-light); }

/* ── Checklist / drill ── */
.checklist { list-style: none; margin: 1rem 0; }
.checklist li {
  display: flex; gap: 0.8rem; align-items: flex-start; padding: 0.7rem 0.9rem;
  background: var(--white); border: 1px solid var(--light-gray); border-radius: 8px; margin-bottom: 0.55rem;
  cursor: pointer; transition: all 0.2s; user-select: none;
}
.checklist li:hover { border-color: var(--fire-red); }
.checklist li .box {
  width: 22px; height: 22px; border: 2px solid var(--text-muted); border-radius: 5px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; color: var(--white); font-size: 0.9rem; margin-top: 1px;
  transition: all 0.2s;
}
.checklist li.done .box { background: var(--green); border-color: var(--green); }
.checklist li.done .box::after { content: "✓"; }
.checklist li.done .text { color: var(--text-muted); text-decoration: line-through; }
.checklist li .text { font-size: 0.98rem; }
.checklist li .text strong { display:block; }
.drill-meter { margin-top: 0.8rem; font-family: var(--font-heading); text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.85rem; color: var(--charcoal); }
.meter-track { height: 10px; background: var(--light-gray); border-radius: 99px; overflow: hidden; margin-top: 0.4rem; }
.meter-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--fire-red), var(--gold)); transition: width 0.4s var(--ease); }

/* ── Scenario ── */
.scenario { background: var(--white); border-radius: 14px; box-shadow: var(--shadow-card); overflow: hidden; margin: 1.5rem 0; }
.scenario .head { background: var(--charcoal); color: var(--white); padding: 1rem 1.3rem; font-family: var(--font-heading); text-transform: uppercase; letter-spacing: 0.05em; display:flex; align-items:center; gap:0.6rem; }
.scenario .head::before { content:"🔥"; }
.scenario .body { padding: 1.3rem; }
.scenario .prompt { font-size: 1.05rem; margin-bottom: 1rem; }
.scenario .opts { display: grid; gap: 0.6rem; }
.scenario .opt {
  text-align: left; background: var(--off-white); border: 1.5px solid var(--light-gray); border-radius: 8px;
  padding: 0.85rem 1rem; cursor: pointer; font-family: var(--font-body); font-size: 1rem; transition: all 0.2s;
}
.scenario .opt:hover { border-color: var(--fire-red); }
.scenario .opt.correct { border-color: var(--green); background: var(--green-light); }
.scenario .opt.wrong { border-color: var(--fire-red); background: rgba(198,40,40,0.06); }
.scenario .opt.disabled { cursor: default; opacity: 0.85; }
.scenario .feedback { margin-top: 1rem; padding: 1rem 1.1rem; border-radius: 8px; display: none; font-size: 0.98rem; }
.scenario .feedback.show { display: block; }
.scenario .feedback.good { background: var(--green-light); border-left: 4px solid var(--green); }
.scenario .feedback.bad { background: rgba(198,40,40,0.06); border-left: 4px solid var(--fire-red); }

/* ── Quiz ── */
.quiz .q { margin-bottom: 1.6rem; }
.quiz .q .qtext { font-weight: 600; font-size: 1.05rem; margin-bottom: 0.7rem; display:flex; gap:0.6rem; }
.quiz .q .qtext .qn { color: var(--fire-red); font-family: var(--font-heading); }
.quiz .q .opt {
  display: block; width: 100%; text-align: left; background: var(--off-white);
  border: 1.5px solid var(--light-gray); border-radius: 8px; padding: 0.75rem 1rem;
  margin-bottom: 0.5rem; cursor: pointer; font-family: var(--font-body); font-size: 1rem; transition: all 0.2s;
}
.quiz .q .opt:hover { border-color: var(--fire-red); }
.quiz .q .opt.correct { border-color: var(--green); background: var(--green-light); }
.quiz .q .opt.wrong { border-color: var(--fire-red); background: rgba(198,40,40,0.06); }
.quiz .q .opt.disabled { cursor: default; }
.quiz .explain { font-size: 0.92rem; color: var(--text-muted); margin-top: 0.4rem; padding-left: 0.2rem; display:none; }
.quiz .explain.show { display: block; }
.quiz-score {
  margin-top: 1rem; padding: 1.1rem 1.3rem; border-radius: 10px; background: var(--charcoal); color: var(--white);
  font-family: var(--font-heading); text-transform: uppercase; letter-spacing: 0.04em; display:none; align-items:center; gap:0.8rem;
}
.quiz-score.show { display: flex; }
.quiz-score .sc { font-size: 1.8rem; color: var(--gold-light); }

/* ── Reflection ── */
.reflect { background: var(--white); border: 1px dashed var(--gold); border-radius: 12px; padding: 1.4rem 1.5rem; margin: 1.5rem 0; }
.reflect .tag { font-family: var(--font-heading); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; color: var(--gold); font-weight: 600; margin-bottom: 0.5rem; }
.reflect p { font-size: 1.02rem; margin-bottom: 0.8rem; }
.reflect textarea {
  width: 100%; min-height: 90px; padding: 0.8rem; border: 1.5px solid var(--light-gray); border-radius: 8px;
  font-family: var(--font-body); font-size: 1rem; background: var(--off-white); resize: vertical;
}
.reflect textarea:focus { outline: none; border-color: var(--gold); background: var(--white); }
.reflect .saved-note { font-size: 0.82rem; color: var(--green); margin-top: 0.4rem; height: 1rem; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.8rem; font-family: var(--font-heading); font-size: 1rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; text-decoration: none; border: none;
  border-radius: 10px; cursor: pointer; transition: all 0.3s var(--ease);
}
.btn-fire { background: linear-gradient(135deg, var(--fire-red), var(--fire-red-dark)); color: var(--white); box-shadow: var(--shadow-red); }
.btn-fire:hover { transform: translateY(-2px); box-shadow: var(--shadow-red-strong); }
.btn-ghost { background: transparent; color: var(--fire-red); border: 2px solid var(--fire-red); }
.btn-ghost:hover { background: var(--fire-red); color: var(--white); }
.btn-dark { background: var(--charcoal); color: var(--white); }
.btn-dark:hover { background: var(--charcoal-light); }

/* ── Complete / nav footer ── */
.complete-box {
  background: linear-gradient(135deg, var(--charcoal), var(--fire-red-deep));
  color: var(--white); border-radius: 16px; padding: 2rem 1.6rem; text-align: center; margin: 1.5rem 0;
}
.complete-box .badge-sm { width: 60px; margin: 0 auto 0.8rem; display:block; }
.complete-box h3 { color: var(--white); font-size: 1.6rem; margin-bottom: 0.5rem; }
.complete-box p { color: rgba(255,255,255,0.88); margin-bottom: 1.2rem; }
.complete-box.done-state { box-shadow: 0 0 0 3px var(--gold) inset; }

.module-nav { display: flex; justify-content: space-between; gap: 1rem; margin: 2rem 0 3rem; flex-wrap: wrap; }
.module-nav a { flex: 1; min-width: 180px; }

.signoff { font-family: var(--font-heading); text-transform: uppercase; letter-spacing: 0.05em; color: var(--fire-red); font-size: 1.15rem; text-align: center; margin: 1.5rem 0; }

/* ── Footer ── */
.site-footer { background: var(--charcoal); color: rgba(255,255,255,0.7); text-align: center; padding: 2rem 1.25rem; font-size: 0.85rem; }
.site-footer .disc { max-width: 640px; margin: 0.8rem auto 0; font-size: 0.75rem; color: rgba(255,255,255,0.45); line-height: 1.5; }

/* ── Hub specific ── */
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 1.1rem; margin: 1.5rem 0; }
.hub-card {
  background: var(--white); border-radius: 14px; box-shadow: var(--shadow-card); overflow: hidden;
  text-decoration: none; color: var(--text); display: flex; flex-direction: column; transition: all 0.3s var(--ease);
  border: 1px solid var(--light-gray);
}
.hub-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); border-color: var(--fire-red); }
.hub-card .top { background: linear-gradient(135deg, var(--fire-red), var(--fire-red-dark)); color: var(--white); padding: 1.1rem 1.2rem; position: relative; }
.hub-card .top .mnum { font-family: var(--font-heading); font-size: 2.4rem; opacity: 0.35; position: absolute; right: 1rem; top: 0.5rem; }
.hub-card .top .ey { font-family: var(--font-heading); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.72rem; color: var(--gold-light); }
.hub-card .top h3 { color: var(--white); font-size: 1.25rem; margin-top: 0.2rem; }
.hub-card .bot { padding: 1rem 1.2rem; flex: 1; display: flex; flex-direction: column; }
.hub-card .bot p { font-size: 0.92rem; color: var(--text-muted); margin-bottom: 0.8rem; flex: 1; }
.hub-card .status { font-family: var(--font-heading); text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.75rem; display:flex; align-items:center; gap:0.4rem; }
.hub-card .status.todo { color: var(--text-muted); }
.hub-card .status.done { color: var(--green); }
.hub-card .status .dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }

.reset-link { background:none; border:none; color: var(--text-muted); text-decoration: underline; cursor: pointer; font-size: 0.8rem; font-family: var(--font-body); }

/* ── Workbook / inventory entries ── */
.entry { border: 1px solid var(--light-gray); border-radius: 10px; padding: 1rem 1.1rem 0.4rem; margin-bottom: 1rem; background: var(--off-white); }
.entry > .entry-title { font-family: var(--font-heading); text-transform: uppercase; letter-spacing: 0.03em; font-size: 0.95rem; color: var(--fire-red); margin-bottom: 0.7rem; display:flex; align-items:center; gap:0.5rem; }
.entry > .entry-title .en { background: var(--fire-red); color: var(--white); width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items:center; justify-content:center; font-size: 0.8rem; }
textarea.wb { width: 100%; min-height: 64px; padding: 0.7rem 0.85rem; border: 1.5px solid var(--light-gray); border-radius: 8px; font-family: var(--font-body); font-size: 1rem; background: var(--white); resize: vertical; }
textarea.wb:focus, .panel input:focus { outline: none; border-color: var(--fire-red); }
.privacy { display: flex; gap: 0.6rem; align-items: flex-start; background: rgba(201,168,76,0.10); border: 1px solid var(--gold); border-radius: 10px; padding: 0.9rem 1.1rem; margin: 1.1rem 0; font-size: 0.9rem; color: var(--charcoal); }
.privacy::before { content: "🔒"; font-size: 1.1rem; }
.fill-meter { margin-top: 0.4rem; font-family: var(--font-heading); text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.82rem; color: var(--charcoal); }
