/* ============================================================================
   curriculum.css — the "map of knowledge" design system for curriculum /
   region-hub pages (2026 redesign). Shared by mock-region-class8-10.html and
   mock-region-class11-12.html; built to be reusable by future region pages.

   Principles: strong hierarchy, visual progress over text metadata, calm
   pastel subject colour (see theme.css .subj-*), restraint over decoration.
   ========================================================================== */

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-body); -webkit-font-smoothing: antialiased;
  transition: background .3s ease, color .3s ease; }

.cur-wrap { max-width: 1080px; margin: 0 auto; padding: 24px 28px 120px; }

/* ---- top bar ------------------------------------------------------------ */
.cur-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 36px; }
.cur-back { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600;
  color: var(--ink-soft); text-decoration: none; border: 1px solid var(--hairline); border-radius: 999px;
  padding: 9px 16px 9px 14px; transition: color .15s ease, border-color .15s ease, background .15s ease; }
.cur-back:hover { color: var(--ink); border-color: var(--ink-soft); background: var(--panel); }
.cur-back:focus-visible { outline: 2px solid var(--acc-tech); outline-offset: 2px; }

/* ---- hero ---------------------------------------------------------------- */
.cur-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.85fr);
  gap: 32px; align-items: center; margin-bottom: 52px; }
/* text colour is a dedicated dark blue, not --acc-tech directly — the pale
   pill background only gives --acc-tech itself ~3.2:1, short of the 4.5:1
   a 13px bold label needs. */
.cur-pill { display: inline-flex; align-items: center; font-family: var(--font-body); font-size: 13px;
  font-weight: 700; letter-spacing: .01em; color: #1e40af; background: color-mix(in srgb, var(--acc-tech) 12%, transparent);
  border-radius: 999px; padding: 7px 15px; margin: 0 0 18px; }
:root[data-theme="dark"] .cur-pill { color: var(--gold); background: color-mix(in srgb, var(--gold) 16%, transparent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cur-pill { color: var(--gold); background: color-mix(in srgb, var(--gold) 16%, transparent); } }
.cur-h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(32px, 4.4vw, 48px);
  letter-spacing: -1.4px; line-height: 1.06; margin: 0 0 16px; text-wrap: balance; }
.cur-lede { font-size: 17px; line-height: 1.5; color: var(--ink-soft); margin: 0 0 22px; max-width: 46ch; }
.cur-stats { display: flex; flex-wrap: wrap; gap: 10px; }
.cur-stat { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700;
  color: var(--ink); background: var(--panel); border: 1px solid var(--hairline); border-radius: 999px;
  padding: 8px 14px; }
.cur-stat .n { color: var(--acc-tech); }
.cur-hero-art { display: flex; justify-content: center; align-items: center; }
.cur-hero-art svg { width: 100%; max-width: 300px; height: auto; }
@media (max-width: 820px) {
  .cur-hero { grid-template-columns: 1fr; gap: 8px; }
  .cur-hero-art { order: -1; max-width: 200px; margin: 0 auto 12px; }
}

/* ---- subject section header ---------------------------------------------- */
.cur-subject-block { margin-bottom: 44px; }
.cur-subject-block + .cur-subject-block { border-top: 1px solid var(--hairline); padding-top: 36px; }
.cur-subject-head { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; }
.cur-subject-head .sic { width: 26px; height: 26px; flex: none; }
.cur-subject-head .sic svg, .cur-card .icon-badge svg { width: 100%; height: 100%; display: block; }
.cur-subject-head h2 { font-family: var(--font-display); font-weight: 700; font-size: 15px;
  letter-spacing: 1.6px; text-transform: uppercase; margin: 0; color: var(--ink); }
.cur-subject-head .rule { flex: 1; height: 1px; background: var(--hairline); }
.cur-subject-head .tag { font-family: var(--font-body); font-size: 11.5px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); white-space: nowrap; }
@media (max-width: 640px) { .cur-subject-head .tag { display: none; } }

/* ---- card row / carousel --------------------------------------------------- */
.cur-row-wrap { position: relative; }
.cur-row { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x proximity; scroll-behavior: smooth;
  padding-bottom: 6px; scrollbar-width: none; }
.cur-row::-webkit-scrollbar { display: none; }
.cur-row > * { scroll-snap-align: start; flex: 1 1 280px; min-width: 260px; max-width: 360px; }
.cur-nav { position: absolute; top: 50%; right: -14px; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--hairline); background: var(--panel);
  color: var(--ink); display: grid; place-items: center; cursor: pointer; box-shadow: 0 8px 22px -10px rgba(16,24,40,.25);
  transition: transform .15s ease, border-color .15s ease; }
.cur-nav:hover { border-color: var(--ink-soft); transform: translateY(-50%) scale(1.06); }
.cur-nav:focus-visible { outline: 2px solid var(--acc-tech); outline-offset: 2px; }
.cur-nav.prev { left: -14px; right: auto; }
@media (max-width: 900px) { .cur-nav { display: none; } }
@media (max-width: 640px) {
  .cur-row > * { min-width: 78vw; max-width: 84vw; }
}

/* ---- subject card ---------------------------------------------------------- */
.cur-card { position: relative; border-radius: 22px; padding: 22px 22px 20px; display: flex; flex-direction: column;
  gap: 14px; text-decoration: none; color: inherit; background: var(--subj-bg, var(--panel));
  border: 1px solid var(--subj-border, var(--hairline));
  transition: transform .16s ease, box-shadow .16s ease; }
.cur-card.is-live { cursor: pointer; }
.cur-card.is-live:hover { transform: translateY(-3px); box-shadow: 0 24px 48px -28px rgba(16,24,40,.4); }
.cur-card:focus-visible { outline: 2px solid var(--acc-tech); outline-offset: 3px; }
.cur-card .icon-badge { width: 56px; height: 56px; color: var(--subj-ink, var(--ink-soft)); }
.cur-card .cc-label { font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
  color: var(--subj-ink, var(--ink-soft)); margin: 0 0 2px; }
.cur-card .cc-title { font-family: var(--font-display); font-weight: 700; font-size: 21px; letter-spacing: -.3px;
  line-height: 1.2; margin: 0; color: var(--ink); }
.cur-card .cc-blurb { font-size: 13.5px; color: var(--ink-soft); line-height: 1.4; margin: 0; min-height: 1.4em; }

/* coming-soon: still legible, clearly inactive — never faded to near-invisible */
.cur-card.is-soon { opacity: 1; }
.cur-card.is-soon .cc-title { color: var(--ink-soft); }
.cur-card .soon-pill { align-self: flex-start; font-size: 11px; font-weight: 800; letter-spacing: .05em;
  text-transform: uppercase; color: var(--ink-soft); background: var(--panel); border: 1px solid var(--hairline);
  border-radius: 999px; padding: 5px 12px; }
:root[data-theme="dark"] .cur-card.is-soon .soon-pill { background: var(--inset); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cur-card.is-soon .soon-pill { background: var(--inset); } }

/* ---- depth selector (segmented control) ------------------------------------ */
.cc-depth { margin-top: 2px; }
.cc-depth .dl { display: flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700;
  color: var(--ink-soft); margin: 0 0 7px; }
.cc-depth .seg { display: inline-flex; background: rgba(16,24,40,.05); border-radius: 999px; padding: 3px; gap: 2px; }
:root[data-theme="dark"] .cc-depth .seg { background: rgba(0,0,0,.28); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cc-depth .seg { background: rgba(0,0,0,.28); } }
.cc-depth button { font-family: var(--font-body); font-size: 12.5px; font-weight: 700; border: none; background: transparent;
  color: var(--ink-soft); border-radius: 999px; padding: 6px 14px; cursor: pointer; transition: background .15s ease, color .15s ease; }
.cc-depth button.on { background: var(--btn-bg); color: var(--btn-fg); }
.cc-depth button:focus-visible { outline: 2px solid var(--acc-tech); outline-offset: 1px; }

/* ---- progress dot path ------------------------------------------------------ */
.dot-path { display: flex; align-items: center; gap: 3px; flex-wrap: nowrap; overflow: hidden; }
.dot-path .d { width: 7px; height: 7px; border-radius: 50%; background: rgba(16,24,40,.14); flex: none; }
:root[data-theme="dark"] .dot-path .d { background: rgba(255,255,255,.16); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dot-path .d { background: rgba(255,255,255,.16); } }
.dot-path .d.done { background: var(--subj-ink, var(--acc-tech)); }
.dot-path .d.now { width: 11px; height: 11px; background: var(--panel); border: 2.2px solid var(--subj-ink, var(--acc-tech)); flex: none; }
.dot-path .line { flex: 1 1 3px; height: 2px; background: rgba(16,24,40,.14); min-width: 3px; max-width: 9px; }
:root[data-theme="dark"] .dot-path .line { background: rgba(255,255,255,.16); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dot-path .line { background: rgba(255,255,255,.16); } }
.dot-path .line.done { background: var(--subj-ink, var(--acc-tech)); }
.dot-meta { display: flex; justify-content: space-between; font-size: 11.5px; font-weight: 700; color: var(--ink-soft); }

/* ---- CTA buttons ------------------------------------------------------------ */
.cc-cta { margin-top: 4px; display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  font-size: 14.5px; font-weight: 700; background: var(--btn-bg); color: var(--btn-fg); border: none;
  border-radius: 999px; padding: 11px 20px; text-decoration: none; transition: transform .15s ease; }
.cc-cta:hover { transform: translateY(-1px); }
.cc-cta .ar { transition: transform .15s ease; }
.cur-card:hover .cc-cta .ar { transform: translateX(3px); }

/* ---- sticky current-journey bar --------------------------------------------- */
.cur-sticky { position: sticky; bottom: 18px; margin-top: 40px; background: var(--panel);
  border: 1px solid var(--hairline); border-radius: 20px; padding: 16px 22px; box-shadow: 0 24px 60px -24px rgba(16,24,40,.35);
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.cur-sticky .who { display: flex; align-items: center; gap: 12px; }
.cur-sticky .who .badge { width: 40px; height: 40px; border-radius: 50%; background: var(--subj-bg, var(--inset));
  color: var(--subj-ink, var(--ink)); display: grid; place-items: center; flex: none; }
.cur-sticky .who .badge svg { width: 24px; height: 24px; }
.cur-sticky .who b { display: block; font-size: 14.5px; font-weight: 700; }
.cur-sticky .who span { font-size: 12px; color: var(--acc-tech); font-weight: 700; }
.cur-sticky .mid { flex: 1 1 200px; display: flex; align-items: center; gap: 12px; }
.cur-sticky .next-label { font-size: 11.5px; font-weight: 700; color: var(--ink-soft); white-space: nowrap; }
.cur-sticky .divider { width: 1px; align-self: stretch; background: var(--hairline); }
.cur-sticky .msg { font-size: 13.5px; line-height: 1.35; }
.cur-sticky .msg b { display: block; }
@media (max-width: 720px) {
  .cur-sticky { position: static; flex-direction: column; align-items: stretch; }
  .cur-sticky .divider { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .cur-card, .cc-cta, .cur-nav, .cc-depth button { transition: none; }
  .cur-row { scroll-behavior: auto; }
}

/* ---- cross-document "zoom into the map" view transition -------------------
   Mirrors course.css's rule. Each live card is given a unique
   view-transition-name (hero-<courseId>) at render time (see the page
   scripts) matching #heroShell's name on the destination page, so clicking
   a card morphs it directly into the course hero instead of a plain
   page swap. Everything else fades/blurs via the shared root animation. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vtOut .22s ease both; }
::view-transition-new(root) { animation: vtIn .32s ease both; }
@keyframes vtOut { to { opacity: 0; filter: blur(6px); } }
@keyframes vtIn { from { opacity: 0; filter: blur(6px); } to { opacity: 1; filter: blur(0); } }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}
