/* /learn/pmp tutorial — public pages. Token-based so it follows the site theme.
   The task page mirrors the in-app "guideline" pattern: a sticky sidebar (here a
   progress tracker) beside the reading column. */

.learn-hero { padding: var(--space-8) 0 var(--space-4); }
.learn-hero .section-eyebrow { margin-bottom: var(--space-2); }
.learn-hero h1 { font-size: clamp(2rem, 4vw, 2.75rem); margin: 0 0 var(--space-3); text-wrap: balance; }
.learn-intro { max-width: 46rem; }

/* Task pages run wider than the default 1120px marketing container so the wide
   screenshots render at a useful size in the reading column. */
.learn-wide { max-width: 1460px; }

/* ── Learning Centre shell: master rail (tracks) + the selected track's area ─────
   Two-tier navigation: a narrow rail of learning tracks on the far left, and the
   selected track's own content/submenu to its right. Scales to Finance/HR/docs. */
.lc-shell {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: var(--space-6);
  align-items: start;
  padding: var(--space-6) 0 var(--space-10);
}
.lc-rail { position: sticky; top: var(--space-6); display: flex; flex-direction: column; gap: 2px; }
.lc-rail-title {
  /* The Learning Centre itself: a heading, not another uppercase section label. */
  display: flex; align-items: center; gap: 8px;
  font-size: 1rem; font-weight: 700; color: var(--color-text-heading); text-decoration: none;
  padding: 0 var(--space-3) var(--space-3); margin-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}
.lc-rail-title:hover { color: var(--color-primary); }
.lc-track {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-2);
  padding: 8px var(--space-3); border-radius: var(--radius-md);
  text-decoration: none; color: var(--color-text-body); font-size: var(--fs-body-sm); font-weight: 500;
}
.lc-track:hover { background: var(--color-surface-raised); color: var(--color-text-heading); text-decoration: none; }
.lc-track.is-current { background: color-mix(in srgb, var(--color-primary) 12%, transparent); color: var(--color-text-heading); font-weight: 600; }
.lc-track.is-soon { color: var(--color-text-muted); opacity: .6; cursor: default; }
.lc-track-label { min-width: 0; }
.lc-soon {
  flex: 0 0 auto; font-size: 10px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--color-text-muted); border: 1px solid var(--color-border);
  border-radius: var(--radius-full); padding: 1px 7px;
}

/* Learn PMP track: submenu + reading column, nested inside the shell's content cell */
.lc-pmp { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: var(--space-8); align-items: start; }
.lc-track-nav {
  position: sticky; top: var(--space-6);
  max-height: calc(100vh - var(--space-8)); overflow-y: auto;
  border: 1px solid var(--color-border); border-radius: var(--radius-xl);
  background: var(--color-surface-card); padding: var(--space-4);
}
.lc-content { min-width: 0; }

/* Hub landing (the /learn/ portal content pane) */
.lc-hub { padding-top: var(--space-2); }
.lc-hub h1 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); margin: var(--space-2) 0 var(--space-3); text-wrap: balance; }
.lc-hub-lead { max-width: 42rem; color: var(--color-text-muted); margin: 0 0 var(--space-6); }
.lc-track-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-4); }
.lc-track-card {
  display: flex; flex-direction: column; gap: var(--space-2);
  border: 1px solid var(--color-border); border-radius: var(--radius-xl);
  background: var(--color-surface-card); padding: var(--space-5);
  text-decoration: none; color: var(--color-text-heading);
  transition: border-color .15s ease, transform .15s ease;
}
.lc-track-card:hover { border-color: var(--color-border-strong); transform: translateY(-2px); text-decoration: none; }
.lc-track-card.is-soon { opacity: .66; }
.lc-track-card-title { font-weight: 700; font-size: 1.1rem; }
.lc-track-card-desc { font-size: var(--fs-body-sm); color: var(--color-text-muted); flex: 1; }
.lc-track-card-cta { font-size: var(--fs-body-sm); font-weight: 600; color: var(--color-primary); }
.lc-soon-badge {
  align-self: flex-start; font-size: 10px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--color-text-muted); border: 1px solid var(--color-border);
  border-radius: var(--radius-full); padding: 2px 8px;
}

/* Responsive: the PMP submenu drops below the reading column, then the whole shell
   collapses to a single column with the rail as a horizontal strip (drill-down feel). */
@media (max-width: 1024px) {
  .lc-pmp { grid-template-columns: 1fr; gap: var(--space-5); }
  .lc-track-nav { position: static; max-height: none; order: 2; }
  .lc-content { order: 1; }
}
@media (max-width: 860px) {
  .lc-shell { grid-template-columns: 1fr; gap: var(--space-4); }
  .lc-rail { position: static; flex-direction: row; flex-wrap: wrap; align-items: center; border-bottom: 1px solid var(--color-border); padding-bottom: var(--space-3); }
  .lc-rail-title { width: 100%; padding: 0 0 var(--space-1); }
}

/* ── Layout: sticky sidebar + reading column ─────────────────────────────────── */
.learn-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: var(--space-8);
  align-items: start;
  padding: var(--space-6) 0 var(--space-10);
}
.learn-sidebar {
  position: sticky; top: var(--space-6);
  max-height: calc(100vh - var(--space-8));
  overflow-y: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface-card);
  padding: var(--space-4);
}
.learn-side-home { display: inline-block; font-size: var(--fs-body-sm); color: var(--color-text-muted); text-decoration: none; margin-bottom: var(--space-3); }
.learn-side-home:hover { color: var(--color-text-heading); }

/* Progress bar + sign-in prompt */
.learn-progress { margin-bottom: var(--space-4); }
.learn-progress-track { height: 8px; border-radius: var(--radius-full); background: var(--color-surface-raised); overflow: hidden; }
.learn-progress-fill { height: 100%; background: var(--color-primary); border-radius: var(--radius-full); transition: width .25s ease; }
.learn-progress-label { font-size: var(--fs-label); color: var(--color-text-muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
.learn-signin { font-size: var(--fs-body-sm); color: var(--color-text-muted); margin: 0 0 var(--space-4); padding: var(--space-2) var(--space-3); background: var(--color-surface-raised); border-radius: var(--radius-md); }
.learn-signin a { color: var(--color-primary); font-weight: 600; }

.learn-side-group { margin-bottom: var(--space-3); }
.learn-side-domain { font-size: var(--fs-label); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--color-text-muted); margin: var(--space-2) 0 var(--space-1); }
.learn-side-task {
  display: flex; align-items: center; gap: var(--space-2);
  padding: 6px var(--space-2); border-radius: var(--radius-md);
  text-decoration: none; color: var(--color-text-body); font-size: var(--fs-body-sm);
}
.learn-side-task:hover, .learn-side-task:focus-visible { background: var(--color-surface-raised); text-decoration: none; }
.learn-side-task.is-current { background: color-mix(in srgb, var(--color-primary) 12%, transparent); color: var(--color-text-heading); font-weight: 600; }
.learn-side-eco { flex: 0 0 auto; font-size: 11px; font-weight: 700; color: var(--color-text-muted); min-width: 26px; }
.learn-side-title { flex: 1; min-width: 0; }

/* Tick button (logged-in only) */
.learn-tick {
  flex: 0 0 auto; width: 18px; height: 18px; border-radius: 5px;
  border: 1.5px solid var(--color-border-strong); background: var(--color-input-bg);
  color: transparent; font-size: 12px; line-height: 1; cursor: pointer; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.learn-tick.is-done { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.learn-tick:focus-visible { outline: none; box-shadow: var(--shadow-focus); }

/* ── Reading column ──────────────────────────────────────────────────────────── */
.learn-main { min-width: 0; }
.learn-task-head { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-2); flex-wrap: wrap; }
.learn-eco-badge { font-weight: 700; font-size: var(--fs-label); color: #fff; background: var(--color-primary); border-radius: var(--radius-full); padding: 2px 10px; }
.learn-weight { font-size: var(--fs-label); color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .04em; }
.learn-main h1 { font-size: clamp(1.6rem, 3vw, 2.25rem); margin: 0 0 var(--space-2); text-wrap: balance; }
.learn-inapp { font-size: var(--fs-body-sm); color: var(--color-text-muted); margin: 0 0 var(--space-4); }
.learn-inapp code { background: var(--color-surface-raised); padding: 2px 8px; border-radius: var(--radius-md); color: var(--color-text-heading); }

.learn-body img { max-width: 100%; height: auto; border: 1px solid var(--color-border); border-radius: var(--radius-lg); margin: var(--space-4) 0; }
.learn-body table { display: block; overflow-x: auto; }

/* Screenshots — a lone block image is wrapped in <figure class="learn-figure"> (see
   content._rewrite), so every shot gets uniform framing + an alt-text caption, on both
   the PMP (.learn-body) and the finance/HR series (.learn-main) pages. */
.learn-figure { margin: var(--space-5) 0; }
.learn-figure img {
  display: block; max-width: 100%; height: auto; margin: 0;
  border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.learn-figure figcaption {
  margin-top: var(--space-2); font-size: var(--fs-body-sm);
  color: var(--color-text-muted); text-align: center; line-height: 1.45;
}

/* Ordinary links stay legible (underlined); tutorial cross-links become a clearly
   clickable "go to lesson" chip so they stand out inside dense table cells. */
.learn-body a:not(.learn-xref) { text-decoration: underline; text-underline-offset: 2px; }
.learn-body a.learn-xref {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 1px 9px; border-radius: var(--radius-full);
  font-size: 0.85em; font-weight: 700; line-height: 1.7; white-space: nowrap;
  text-decoration: none;
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-primary) 32%, transparent);
}
.learn-body a.learn-xref::after { content: "\2192"; font-weight: 700; }   /* → */
.learn-body a.learn-xref:hover {
  text-decoration: none;
  background: color-mix(in srgb, var(--color-primary) 24%, transparent);
  border-color: var(--color-primary);
}

.learn-actions { margin: var(--space-6) 0 var(--space-4); }

.learn-prevnext { display: flex; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; border-top: 1px solid var(--color-border); padding-top: var(--space-4); margin-top: var(--space-6); }
.learn-prevnext a { color: var(--color-primary); text-decoration: none; font-weight: 600; font-size: var(--fs-body-sm); max-width: 48%; }
.learn-prevnext a:hover { text-decoration: underline; }

/* ── Embedded lesson video ───────────────────────────────────────────────────
   Emitted by content._video() from a markdown paragraph holding only a YouTube
   link. Tokens only — a hardcoded #fff or rgba(255..) here would survive the
   dark-mode flip and glow. */
.learn-video { margin: var(--space-5) 0; }
.learn-video iframe {
  display: block; width: 100%; aspect-ratio: 16 / 9; border: 0;
  border-radius: var(--radius-lg); background: var(--color-surface-raised);
}
/* A 9:16 Short at full column width would be taller than the viewport, so cap it
   and centre it. The cap is a width because the aspect ratio derives the height. */
.learn-video--vertical iframe { aspect-ratio: 9 / 16; max-width: 320px; margin-inline: auto; }
.learn-video figcaption {
  margin-top: var(--space-2); font-size: var(--fs-body-sm);
  color: var(--color-text-muted); text-align: center;
}

/* ── Index page task grid ────────────────────────────────────────────────────── */
.learn-index-progress { max-width: 46rem; margin: 0 0 var(--space-6); }
.learn-domain { font-size: 1.1rem; margin: var(--space-6) 0 var(--space-3); padding-bottom: var(--space-2); border-bottom: 1px solid var(--color-border); }
.learn-domain span { color: var(--color-text-muted); font-weight: 400; font-size: var(--fs-body-sm); }
.learn-task-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-3); }
.learn-task-card {
  display: flex; align-items: center; gap: var(--space-3);
  border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  background: var(--color-surface-card); padding: var(--space-3) var(--space-4);
  text-decoration: none; color: var(--color-text-heading); transition: border-color .15s ease, transform .15s ease;
}
.learn-task-card:hover { border-color: var(--color-border-strong); transform: translateY(-1px); }
.learn-card-eco { flex: 0 0 auto; font-weight: 700; font-size: var(--fs-label); color: var(--color-primary); min-width: 34px; }
.learn-card-title { flex: 1; min-width: 0; font-size: var(--fs-body-sm); font-weight: 500; }
.learn-card-check { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%; background: var(--color-surface-raised); color: transparent; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.learn-card-check.is-done { background: var(--color-primary); color: #fff; }

@media (max-width: 860px) {
  .learn-layout { grid-template-columns: 1fr; }
  .learn-sidebar { position: static; max-height: none; order: 2; }
  .learn-main { order: 1; }
}

/* ── ITTO process explorer (itto-explained) ─────────────────────────────────
   All 40 processes in one navigable card: a domain-grouped dropdown, prev/next,
   and #id deep-links from the cheat sheet. Styled with the design-system tokens. */
.itto-explorer { scroll-margin-top: var(--space-6); margin: var(--space-5) 0 var(--space-8); }
.itto-ex-bar {
  display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap;
  margin-bottom: var(--space-3);
}
.itto-ex-bar label {
  font-size: var(--fs-label); font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--color-text-muted);
}
.itto-ex-select {
  flex: 1; min-width: 220px; max-width: 460px;
  padding: 9px var(--space-3); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); background: var(--color-surface-card);
  color: var(--color-text-heading); font-size: var(--fs-body-sm); font-weight: 600;
}
.itto-ex-count { margin-left: auto; font-size: var(--fs-caption); color: var(--color-text-muted); font-variant-numeric: tabular-nums; }

.itto-ex-card {
  border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  background: var(--color-surface-card); padding: var(--space-5);
}
.itto-ex-eyebrow { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-1); }
.itto-ex-domain {
  font-size: var(--fs-caption); font-weight: 700; letter-spacing: .03em;
  color: var(--color-primary); text-transform: uppercase;
}
.itto-ex-group {
  font-size: var(--fs-caption); color: var(--color-text-muted);
  border: 1px solid var(--color-border); border-radius: var(--radius-full); padding: 0 8px;
}
.itto-ex-card h3 { margin: 0 0 var(--space-3); font-size: var(--fs-h3, 1.4rem); }
.itto-ex-line { margin: 0 0 var(--space-2); font-size: var(--fs-body-sm); line-height: 1.55; color: var(--color-text-body); }
.itto-ex-line b { color: var(--color-text-heading); }

/* Inputs → Tools → Outputs, as a flow that shows the chain shape at a glance */
.itto-ex-itto {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--space-2);
  margin: var(--space-4) 0; position: relative;
}
.itto-ex-col {
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  padding: var(--space-3); background: var(--color-surface-raised);
}
.itto-ex-col.is-in  { border-left: 3px solid var(--color-info-text, #2563eb); }
.itto-ex-col.is-tt  { border-left: 3px solid var(--color-text-muted); }
.itto-ex-col.is-out { border-left: 3px solid var(--color-success-text, #16a34a); }
.itto-ex-lbl {
  display: block; font-size: var(--fs-label); font-weight: 700; letter-spacing: .03em;
  text-transform: uppercase; color: var(--color-text-muted); margin-bottom: 4px;
}
.itto-ex-col span:last-child { font-size: var(--fs-body-sm); color: var(--color-text-body); line-height: 1.5; }
@media (max-width: 680px) { .itto-ex-itto { grid-template-columns: 1fr; } }

.itto-ex-hook {
  margin: 0 0 var(--space-3); padding: var(--space-3) var(--space-4);
  border-left: 3px solid var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 8%, transparent);
  border-radius: var(--radius-md); font-size: var(--fs-body-sm); line-height: 1.55;
  color: var(--color-text-body); font-style: italic;
}
.itto-ex-where { margin: 0; font-size: var(--fs-body-sm); color: var(--color-text-body); }
.itto-ex-where a { color: var(--color-primary); font-weight: 600; white-space: nowrap; }

.itto-ex-nav { display: flex; justify-content: space-between; gap: var(--space-2); margin-top: var(--space-3); }
.itto-ex-btn {
  padding: 8px var(--space-4); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); background: var(--color-surface-card);
  color: var(--color-text-heading); font-size: var(--fs-body-sm); font-weight: 600; cursor: pointer;
}
.itto-ex-btn:hover:not(:disabled) { background: var(--color-surface-raised); border-color: var(--color-primary); }
.itto-ex-btn:disabled { opacity: .4; cursor: default; }

/* ── ITTO-explained tabs (The processes · What is ITTO) ─────────────────────── */
.itto-tabs {
  display: flex; gap: var(--space-1); margin: var(--space-4) 0 var(--space-5);
  border-bottom: 1px solid var(--color-border);
}
.itto-tab-btn {
  appearance: none; background: none; border: none; cursor: pointer;
  padding: var(--space-2) var(--space-3); margin-bottom: -1px;
  font-family: inherit; font-size: var(--fs-body); font-weight: 600;
  color: var(--color-text-muted); border-bottom: 2px solid transparent;
}
.itto-tab-btn:hover { color: var(--color-text-heading); }
.itto-tab-btn.is-active { color: var(--color-primary); border-bottom-color: var(--color-primary); }
.itto-tabpanel { animation: itto-fade .18s ease; }
.itto-tabpanel > :first-child { margin-top: 0; }    /* no double gap under the tab bar */
@keyframes itto-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .itto-tabpanel { animation: none; } }

/* ── Tools & techniques explorer (reuses .itto-ex-* card; adds the field layout) ── */
.itto-tt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); margin: var(--space-3) 0; }
@media (max-width: 680px) { .itto-tt-grid { grid-template-columns: 1fr; } }
.itto-tt-field { border-top: 1px solid var(--color-border); padding-top: var(--space-2); }
.itto-tt-field .itto-ex-lbl { margin-bottom: 4px; }
.itto-tt-field span:last-child, .itto-tt-best { font-size: var(--fs-body-sm); color: var(--color-text-body); line-height: 1.55; }
.itto-tt-bestwrap { margin: var(--space-3) 0; }
.itto-tt-best { margin: 0; padding-left: 1.1em; }
.itto-tt-best li { margin-bottom: 3px; }
.itto-tt-overkill { font-style: normal; }
.itto-tt-overkill b { color: var(--color-text-heading); }

/* ── Clickable tool chips in a process card + the tool pop-up ─────────────────── */
[x-cloak] { display: none !important; }
.itto-tt-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.itto-tt-chip {
  appearance: none; cursor: pointer; font: inherit; font-size: var(--fs-body-sm);
  padding: 2px 10px; border-radius: var(--radius-full);
  border: 1px solid color-mix(in srgb, var(--color-primary) 35%, transparent);
  background: color-mix(in srgb, var(--color-primary) 8%, transparent);
  color: var(--color-primary);
}
.itto-tt-chip:hover { background: color-mix(in srgb, var(--color-primary) 16%, transparent); border-color: var(--color-primary); }
.itto-tt-plain { font-size: var(--fs-body-sm); color: var(--color-text-muted); padding: 2px 4px; }

.itto-modal {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  padding: var(--space-4); background: color-mix(in srgb, #000 55%, transparent);
}
.itto-modal-card {
  position: relative; max-width: 620px; width: 100%; max-height: 85vh; overflow: auto;
  box-shadow: 0 24px 60px rgba(0,0,0,.4);
}
.itto-modal-close {
  position: absolute; top: var(--space-3); right: var(--space-3); appearance: none; cursor: pointer;
  width: 30px; height: 30px; line-height: 1; border-radius: var(--radius-md);
  border: 1px solid var(--color-border); background: var(--color-surface-raised);
  color: var(--color-text-muted); font-size: 20px;
}
.itto-modal-close:hover { color: var(--color-text-heading); border-color: var(--color-primary); }

/* ============================================================
   PMP hub tiles (/learn/pmp/) — a tile dashboard: four ITTO
   foundation tiles (2×2) beside two tall game posters (Reps ·
   Exam Simulator). The hub drops the task submenu, so the tiles
   get full width. Self-contained; tokens drive light/dark; the
   Reps/Exam posters commit to a dark poster look in both themes.
   ============================================================ */
.lc-hub-main { min-width: 0; }
.pmp-hub-hero { padding-bottom: var(--space-3); }
.pmp-hub-lead { max-width: 46rem; color: var(--color-text-muted); margin: var(--space-1) 0 0; }

.pmp-hub {
  display: grid; grid-template-columns: 2fr 1.05fr 1.05fr; gap: var(--space-5);
  align-items: stretch; margin-top: var(--space-6); max-width: 1180px;
}
.pmp-hub-small { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); }

/* ── small ITTO tiles ─────────────────────────────────────── */
.pmp-tile {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 7px;
  min-height: 152px; border: 1px solid var(--color-border); border-radius: var(--radius-xl);
  background: var(--color-surface-card); padding: var(--space-5);
  text-decoration: none; color: var(--color-text-heading);
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.pmp-tile::after {              /* faint indigo corner wash, revealed on hover */
  content: ""; position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 100% 0%, var(--color-primary-subtle) 0%, transparent 58%);
  transition: opacity .18s ease;
}
.pmp-tile:hover { border-color: var(--color-primary); transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(79,70,229,.16); text-decoration: none; }
.pmp-tile:hover::after { opacity: 1; }
.pmp-tile > * { position: relative; z-index: 1; }
.pmp-tile-icon { display: inline-flex; width: 42px; height: 42px; border-radius: var(--radius-lg, 12px);
  align-items: center; justify-content: center;
  background: var(--color-primary-subtle); color: var(--color-primary);
  transition: transform .18s ease; }
.pmp-tile:hover .pmp-tile-icon { transform: scale(1.06); }
.pmp-tile-icon .icon, .pmp-tile-chain { width: 21px; height: 21px; }
.pmp-tile-title { font-weight: 700; font-size: 1.08rem; line-height: 1.25; }
.pmp-tile-desc { font-size: var(--fs-body-sm); color: var(--color-text-muted); flex: 1; }
.pmp-tile-cta { font-size: var(--fs-body-sm); font-weight: 600; color: var(--color-primary); }
.pmp-tile-cta span { display: inline-block; transition: transform .18s ease; }
.pmp-tile:hover .pmp-tile-cta span { transform: translateX(3px); }

/* ── big game posters (shared chrome) ─────────────────────── */
.pmp-tile-lg {
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  min-height: 344px; padding: var(--space-5); border-radius: var(--radius-xl);
  text-decoration: none; color: #fff; isolation: isolate;
  transition: transform .18s ease, box-shadow .18s ease;
}
.pmp-lg-top { position: relative; z-index: 3; }
.pmp-lg-tag { font-family: var(--font-mono, monospace); font-size: 10.5px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.82); }
.pmp-lg-art { position: relative; z-index: 1; flex: 1; display: flex; align-items: center; justify-content: center; }
.pmp-lg-body { position: relative; z-index: 2; }
.pmp-lg-title { font-size: 1.4rem; margin: 0; color: #fff; text-wrap: balance; }
.pmp-lg-sub { font-size: var(--fs-body-sm); color: rgba(255,255,255,.82); margin: 5px 0 0; }
.pmp-lg-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: var(--space-3); }
.pmp-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600;
  padding: 4px 10px; border-radius: var(--radius-full); background: rgba(255,255,255,.15); color: #fff; }
.pmp-chip i { width: 6px; height: 6px; border-radius: 50%; background: #fff; opacity: .85; }
.pmp-chip-streak i { background: #FBBF24; opacity: 1; animation: pmpFlame 1.8s ease-in-out infinite; }
.pmp-lg-cta { position: relative; z-index: 3; margin-top: var(--space-4); display: inline-flex; align-items: center; gap: 9px;
  font-weight: 700; font-size: var(--fs-body-sm); color: #fff; }
.pmp-lg-cta-sub { font-weight: 500; color: rgba(255,255,255,.7); }
.pmp-play { position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%; background: #fff; color: var(--color-primary-active, #4338CA);
  font-size: 12px; padding-left: 2px; }
.pmp-play::before { content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.6); animation: pmpPulse 2.4s ease-out infinite; }

/* Reps poster — indigo→violet brand gradient + glow */
.pmp-tile-reps {
  background:
    radial-gradient(130% 95% at 84% -14%, rgba(255,255,255,.2), transparent 56%),
    linear-gradient(155deg, #4F46E5 0%, #6D28D9 100%);
  box-shadow: 0 12px 30px rgba(79,70,229,.3);
}
.pmp-tile-reps:hover { transform: translateY(-4px); box-shadow: 0 20px 44px rgba(79,70,229,.45); text-decoration: none; }

/* animated stacked-flashcard motif (echoes the real game card) */
.pmp-fc { position: absolute; width: 176px; height: 124px; border-radius: 13px;
  background: #fff; box-shadow: 0 10px 26px rgba(17,12,46,.34); will-change: transform; }
.pmp-fc-3 { background: rgba(255,255,255,.45); animation: pmpFloat 6s ease-in-out infinite; }
.pmp-fc-2 { background: rgba(255,255,255,.72); animation: pmpFloat 6s ease-in-out infinite .4s; }
.pmp-fc-1 { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 5px;
  padding: 13px 15px; color: #1e1b4b; animation: pmpFloat 6s ease-in-out infinite .8s; }
.pmp-fc-3 { transform: rotate(-9deg) translateY(10px); }
.pmp-fc-2 { transform: rotate(5deg) translateY(4px); }
.pmp-fc-1 { transform: rotate(-2deg); }
.pmp-fc-h { font-weight: 800; font-size: 13.5px; color: #312e81; }
.pmp-fc-row { font-size: 10px; color: #4b5563; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pmp-fc-row b { display: inline-flex; width: 14px; height: 14px; border-radius: 4px; margin-right: 6px;
  align-items: center; justify-content: center; font-size: 8.5px; color: #fff; background: #6366f1; }
.pmp-fc-bars { display: flex; gap: 3px; margin-top: 4px; }
.pmp-fc-bars i { flex: 1; height: 4px; border-radius: 2px; background: #6366f1; opacity: .3;
  animation: pmpBar 2.6s ease-in-out infinite; animation-delay: var(--d); }
.pmp-fc-shine { position: absolute; top: 0; left: -60%; width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-18deg); animation: pmpShine 5s ease-in-out infinite; }
.pmp-xp { position: absolute; right: 16px; bottom: 6px; font-weight: 800; font-size: 15px;
  color: #fff; text-shadow: 0 2px 10px rgba(79,70,229,.6); opacity: 0; animation: pmpXp 5s ease-out infinite; }

/* Exam Simulator poster — live: a vibrant sky→deep-blue gradient (distinct from the
   purple Reps tile), with the animated clock. */
.pmp-tile-exam {
  background:
    radial-gradient(130% 95% at 84% -14%, rgba(255,255,255,.2), transparent 56%),
    linear-gradient(155deg, #0EA5E9 0%, #0369A1 100%);
  box-shadow: 0 12px 30px rgba(3,105,161,.3);
}
.pmp-tile-exam:hover { transform: translateY(-4px); box-shadow: 0 20px 44px rgba(3,105,161,.45); text-decoration: none; }
.pmp-ring { width: 128px; height: 128px; }
.pmp-ring-track { fill: none; stroke: rgba(255,255,255,.14); stroke-width: 7; }
.pmp-ring-prog { fill: none; stroke: rgba(255,255,255,.5); stroke-width: 7; stroke-linecap: round;
  stroke-dasharray: 314; stroke-dashoffset: 228; transform: rotate(-90deg); transform-origin: center; }
.pmp-ring-hand { stroke: #fff; stroke-linecap: round; transform-origin: 60px 60px; }
.pmp-ring-min { stroke-width: 3.5; opacity: .92; animation: pmpSpin 12s linear infinite; }
.pmp-ring-hour { stroke-width: 3; opacity: .65; animation: pmpSpin 144s linear infinite; }
.pmp-ring-hub { fill: #fff; }
.pmp-soon-badge { font-size: 10px; text-transform: uppercase; letter-spacing: .07em; font-weight: 700;
  color: rgba(255,255,255,.92); border: 1px solid rgba(255,255,255,.32); border-radius: var(--radius-full); padding: 3px 11px; }

@keyframes pmpFloat { 0%,100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@keyframes pmpShine { 0%,62% { left: -60%; } 86%,100% { left: 130%; } }
@keyframes pmpBar { 0%,100% { opacity: .3; } 50% { opacity: 1; } }
@keyframes pmpXp { 0%,70% { opacity: 0; transform: translateY(6px); } 80% { opacity: 1; transform: translateY(-4px); } 100% { opacity: 0; transform: translateY(-16px); } }
@keyframes pmpPulse { 0% { transform: scale(1); opacity: .7; } 70%,100% { transform: scale(1.5); opacity: 0; } }
@keyframes pmpFlame { 0%,100% { transform: scale(1); } 50% { transform: scale(1.3); } }
@keyframes pmpSpin { to { transform: rotate(360deg); } }

@media (max-width: 960px) {
  .pmp-hub { grid-template-columns: 1fr 1fr; }
  .pmp-hub-small { grid-column: 1 / -1; }
  .pmp-tile-lg { min-height: 280px; }
}
@media (max-width: 560px) {
  .pmp-hub { grid-template-columns: 1fr; }
  .pmp-tile-lg { min-height: 248px; }
}
@media (prefers-reduced-motion: reduce) {
  .pmp-tile, .pmp-tile-lg, .pmp-tile-icon, .pmp-tile-cta span,
  .pmp-fc, .pmp-fc-3, .pmp-fc-2, .pmp-fc-1, .pmp-fc-bars i, .pmp-fc-shine,
  .pmp-xp, .pmp-play::before, .pmp-chip-streak i, .pmp-ring-min, .pmp-ring-hour { animation: none; transition: none; }
}

/* ============================================================
   Finance hub (/learn/finance/) — two track posters, one per
   part. Each names the track, who it's for, and links to the
   first lesson. Distinct accent per track; white text on both.
   ============================================================ */
.fin-hub {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5);
  margin-top: var(--space-6); max-width: 1120px; align-items: stretch;
}
.fin-track {
  --trk-c1: #4F46E5; --trk-c2: #6D28D9;        /* accent set inline per track (_track_hub) */
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  min-height: 364px; padding: var(--space-6); border-radius: var(--radius-xl);
  text-decoration: none; color: #fff; isolation: isolate;
  background: radial-gradient(130% 95% at 86% -14%, rgba(255,255,255,.18), transparent 56%),
    linear-gradient(155deg, var(--trk-c1) 0%, var(--trk-c2) 100%);
  box-shadow: 0 12px 30px rgba(17,12,46,.3);
  transition: transform .18s ease, box-shadow .18s ease;
}
.fin-track:hover { transform: translateY(-4px); box-shadow: 0 20px 44px rgba(17,12,46,.42); }
.fin-track:hover, .fin-track:focus-visible { text-decoration: none; }
.fin-track > * { position: relative; z-index: 2; }
.fin-track-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.fin-track-eyebrow { font-family: var(--font-mono, monospace); font-size: 11px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.82); }
.fin-track-motif { width: 92px; height: 62px; flex: none; color: rgba(255,255,255,.9);
  margin-top: -4px; filter: drop-shadow(0 4px 12px rgba(0,0,0,.25)); }
.fin-track-title { font-size: 1.7rem; line-height: 1.12; margin: var(--space-4) 0 0; color: #fff; text-wrap: balance; }
.fin-track-who { font-size: var(--fs-body); margin: var(--space-3) 0 0; color: #fff; }
.fin-for { display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  padding: 2px 8px; border-radius: var(--radius-full); background: rgba(255,255,255,.2); margin-right: 6px; vertical-align: middle; }
.fin-track-desc { font-size: var(--fs-body-sm); line-height: 1.55; color: rgba(255,255,255,.84); margin: var(--space-3) 0 0; }
.fin-track-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: var(--space-4); }
.fin-track-chips span { font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: var(--radius-full);
  background: rgba(255,255,255,.15); color: #fff; }
.fin-track-cta { margin-top: auto; padding-top: var(--space-5); display: inline-flex; align-items: center; gap: 7px;
  font-weight: 700; font-size: var(--fs-body); color: #fff; }
.fin-track-cta span { display: inline-block; transition: transform .18s ease; }
.fin-track:hover .fin-track-cta span { transform: translateX(4px); }

/* a large faded motif echo bleeding off the top-right corner for depth */
.fin-track::after {
  content: ""; position: absolute; top: -40px; right: -40px; width: 260px; height: 260px; z-index: 1;
  border-radius: 50%; background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.14), transparent 62%);
}
.fin-mo-line { stroke-dasharray: 220; stroke-dashoffset: 0; animation: finDraw 2.4s ease-out both; }

@keyframes finDraw { from { stroke-dashoffset: 220; } to { stroke-dashoffset: 0; } }

@media (max-width: 760px) {
  .fin-hub { grid-template-columns: 1fr; }
  .fin-track { min-height: 320px; }
}
@media (prefers-reduced-motion: reduce) {
  .fin-track, .fin-track-cta span, .fin-mo-line { animation: none; transition: none; }
}

/* ============================================================
   Finance progress + track completion (CR-103 §8). Tracking is
   logged-in only (server-backed); anonymous readers see a sign-in
   prompt. The certificate is an intentionally light "paper" card
   in both themes so it prints clean.
   ============================================================ */
/* — rail: progress bar, per-lesson ticks, completion CTA — */
.fin-rail-progress { display: flex; align-items: center; gap: 8px; margin: var(--space-3) 0 var(--space-2); font-size: 12px; color: var(--color-text-muted); }
.fin-rail-bar { flex: 1; height: 6px; border-radius: 999px; background: var(--color-surface-raised); overflow: hidden; }
.fin-rail-bar i { display: block; height: 100%; border-radius: 999px; background: var(--color-primary); transition: width .25s ease; }
.fin-rail-count b { color: var(--color-text-heading); }
.fin-rail-cert { display: inline-block; margin: 0 0 var(--space-3); font-size: 12.5px; font-weight: 700; color: var(--color-primary); }
.learn-side-tick { flex: 0 0 auto; width: 15px; height: 15px; margin-right: 2px; border-radius: 50%;
  border: 1.5px solid var(--color-border-strong); background: transparent; position: relative; }
.learn-side-tick.is-done { background: var(--color-primary); border-color: var(--color-primary); }
.learn-side-tick.is-done::after { content: "✓"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 9px; color: #fff; }

/* — lesson footer: mark-complete, count, CTA, sign-in prompt — */
.fin-lesson-foot { margin-top: var(--space-8); padding-top: var(--space-5); border-top: 1px solid var(--color-border);
  display: flex; flex-direction: column; gap: var(--space-3); }
.fin-foot-main { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-4); }
.fin-done-btn { display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 9px 16px; border-radius: var(--radius-md); font-weight: 600; font-size: var(--fs-body-sm);
  border: 1px solid var(--color-primary); background: transparent; color: var(--color-primary);
  transition: background .15s ease, color .15s ease; }
.fin-done-btn:hover { background: var(--color-primary-subtle); }
.fin-done-btn .fin-done-tick { display: inline-flex; width: 18px; height: 18px; border-radius: 50%; align-items: center; justify-content: center;
  font-size: 10px; border: 1.5px solid currentColor; }
.fin-done-btn.is-done { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.fin-done-btn.is-done .fin-done-tick { background: #fff; color: var(--color-primary); border-color: #fff; }
.fin-foot-count { font-size: var(--fs-body-sm); color: var(--color-text-muted); }
.fin-foot-count b { color: var(--color-text-heading); }
.fin-foot-signin { font-size: var(--fs-body-sm); color: var(--color-text-muted); }
.fin-foot-signin a { font-weight: 600; }
.fin-foot-cert { align-self: flex-start; font-weight: 700; color: var(--color-primary); font-size: var(--fs-body); }

/* CR-104 assignments — per-lesson knowledge-check CTA (in the lesson footer) */
.fin-check-btn { display: flex; flex-direction: column; gap: 2px; align-self: flex-start;
  padding: 11px 18px; border-radius: var(--radius-md); font-weight: 700; font-size: var(--fs-body-sm);
  text-decoration: none; color: #fff; background: linear-gradient(135deg, #0EA5E9, #0369A1);
  box-shadow: 0 2px 8px rgba(3, 105, 161, .25); transition: transform .15s ease, box-shadow .15s ease; }
.fin-check-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(3, 105, 161, .32); text-decoration: none; }
.fin-check-btn .fin-check-sub { font-weight: 500; font-size: var(--fs-caption); opacity: .9; }

/* CR-104 assignments — the "do it in the app" checklist (lesson-assignment.js) */
h2.lesson-assignment { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--space-3); }
.assign-count { font-size: var(--fs-body-sm); font-weight: 600; color: var(--color-text-muted);
  padding: 2px 10px; border-radius: 999px; border: 1px solid var(--color-border); }
.assign-count.is-all { color: #fff; background: var(--color-primary); border-color: var(--color-primary); }
ul.assign-list { list-style: none; padding-left: 0; display: flex; flex-direction: column; gap: 10px; }
.assign-item { display: flex; align-items: flex-start; gap: 10px; }
.assign-item.is-done { color: var(--color-text-muted); text-decoration: line-through; text-decoration-color: var(--color-border-strong); }
.assign-box { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 3px; cursor: pointer; accent-color: var(--color-primary); }

/* — certificate page — */
.fin-cert-page { padding: var(--space-8) 0 var(--space-10); }
.fin-cert-loading { display: flex; justify-content: center; padding: var(--space-10); }
.fin-cert-loading .spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--color-border);
  border-top-color: var(--color-primary); animation: finSpin .8s linear infinite; }
@keyframes finSpin { to { transform: rotate(360deg); } }

.fin-cert-gate { max-width: 34rem; margin: var(--space-8) auto; text-align: center; }
.fin-cert-gate-icon { font-size: 40px; margin-bottom: var(--space-3); }
.fin-cert-gate h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0 0 var(--space-3); text-wrap: balance; }
.fin-cert-gate p { color: var(--color-text-muted); margin: 0 auto var(--space-5); max-width: 30rem; }
.fin-cert-gate-actions { display: flex; gap: var(--space-3); justify-content: center; flex-wrap: wrap; }
.fin-cert-bar { height: 8px; border-radius: 999px; background: var(--color-surface-raised); overflow: hidden; max-width: 22rem; margin: 0 auto var(--space-5); }
.fin-cert-bar i { display: block; height: 100%; border-radius: 999px; background: var(--color-primary); transition: width .3s ease; }

.fin-cert-wrap { display: flex; flex-direction: column; align-items: center; gap: var(--space-5); }
.fin-cert {                          /* intentionally a light "paper" card in both themes */
  --cert-accent: #4F46E5; --cert-accent-2: #6D28D9;
  position: relative; width: 100%; max-width: 640px; margin: 0 auto; overflow: hidden;
  background: #ffffff; color: #1f2937; text-align: center;
  border: 1px solid #e5e7eb; border-radius: var(--radius-xl);
  padding: clamp(2rem, 5vw, 3.4rem) clamp(1.5rem, 5vw, 3rem);
  box-shadow: 0 24px 60px rgba(17, 12, 46, .35);
}
.fin-cert::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 9px;
  background: linear-gradient(90deg, var(--cert-accent), var(--cert-accent-2)); }
.fin-cert::after { content: ""; position: absolute; right: -70px; bottom: -70px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, var(--cert-accent), transparent 62%); opacity: .08; }
.fin-cert-seal { width: 66px; height: 66px; margin: var(--space-2) auto var(--space-4); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 30px;
  background: linear-gradient(145deg, var(--cert-accent), var(--cert-accent-2)); box-shadow: 0 10px 22px rgba(79, 70, 229, .3); }
.fin-cert-brand { font-family: var(--font-mono, monospace); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #6b7280; }
.fin-cert-kicker { margin-top: var(--space-4); font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--cert-accent); }
.fin-cert-track { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: var(--space-2) 0 0; color: #111827; text-wrap: balance; line-height: 1.12; }
.fin-cert-rule { width: 54px; height: 3px; border-radius: 3px; margin: var(--space-4) auto; background: var(--cert-accent); opacity: .5; }
.fin-cert-awarded { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #6b7280; margin: 0; }
.fin-cert-name { font-size: clamp(1.5rem, 3.5vw, 2rem); font-weight: 700; color: #1f2937; margin: 6px 0 var(--space-4); }
.fin-cert-meta { font-size: var(--fs-body-sm); color: #6b7280; margin: 0; font-variant-numeric: tabular-nums; }
.fin-cert-fine { font-size: 11.5px; line-height: 1.5; color: #9ca3af; margin: var(--space-5) auto 0; max-width: 26rem; }
.fin-cert-actions { display: flex; gap: var(--space-3); justify-content: center; flex-wrap: wrap; }

@media print {
  body { background: #fff !important; }
  body * { visibility: hidden !important; }
  .fin-cert, .fin-cert * { visibility: visible !important; }
  .fin-cert { position: absolute; top: 0; left: 0; right: 0; margin: 10mm auto; box-shadow: none; border-color: #d1d5db; }
  .no-print { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .fin-rail-bar i, .fin-cert-bar i, .fin-done-btn, .fin-cert-loading .spinner { transition: none; animation: none; }
}

/* — shareable link (owner page) + public-viewer CTA (CR-103 §8) — */
.fin-cert-share { width: 100%; max-width: 640px; margin: 0 auto; }
.fin-cert-share-label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--color-text-muted); margin-bottom: 6px; }
.fin-cert-share-row { display: flex; gap: var(--space-2); }
.fin-cert-share-input { flex: 1; min-width: 0; padding: 8px 12px; font-size: var(--fs-body-sm);
  border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-raised);
  color: var(--color-text-body); font-family: var(--font-mono, monospace); }
.fin-cert-viewer { text-align: center; }
.fin-cert-viewer-cta { color: var(--color-text-muted); margin: 0 0 var(--space-3); }

/* ── CR-117 — templates & calculators (/learn/templates, /learn/calculators) ── */
.tk-main h2 { margin-top: var(--space-6); }
.tk-lead { font-size: var(--fs-body-lg, 1.1rem); color: var(--color-text-muted); max-width: 46rem; margin: 0 0 var(--space-5); }
.tk-downloads { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; margin: 0 0 var(--space-6); }
.tk-note { font-size: var(--fs-body-sm); color: var(--color-text-muted); }
.tk-downloads .tk-note { flex-basis: 100%; }
.tk-inside { border: 1px solid var(--color-border); border-radius: var(--radius-xl); background: var(--color-surface-card); padding: var(--space-5); margin-bottom: var(--space-6); }
.tk-inside h2 { margin: 0 0 var(--space-3); font-size: 1.15rem; }
.tk-sections { margin: 0; padding-left: 1.4rem; display: grid; gap: var(--space-2); }
.tk-sections li b { display: block; }
.tk-sections li span { color: var(--color-text-muted); font-size: var(--fs-body-sm); }
.tk-cols-wrap, .tk-table-wrap { overflow-x: auto; }
.tk-cols, .tk-table { width: 100%; border-collapse: collapse; font-size: var(--fs-body-sm); }
.tk-cols th, .tk-cols td, .tk-table th, .tk-table td { text-align: left; padding: 6px 10px; border-top: 1px solid var(--color-border); vertical-align: top; }
.tk-cols th, .tk-table th { color: var(--color-text-muted); font-weight: 600; border-top: 0; }
.tk-table td { font-variant-numeric: tabular-nums; }
.tk-tag { display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 999px; border: 1px solid var(--color-border); color: var(--color-text-muted); }
.tk-tag-f { border-color: var(--color-primary); color: var(--color-primary); }
.tk-body { margin-top: var(--space-4); }
.tk-lesson { margin: var(--space-6) 0 0; font-size: var(--fs-body-sm); }
.tk-cta { display: flex; gap: var(--space-4); align-items: center; justify-content: space-between; flex-wrap: wrap;
  margin-top: var(--space-6); padding: var(--space-5); border-radius: var(--radius-xl);
  border: 1px solid var(--color-primary); background: var(--color-primary-subtle, var(--color-surface-card)); }
.tk-cta div { display: flex; flex-direction: column; gap: 4px; max-width: 40rem; }
.tk-cta span { color: var(--color-text-muted); font-size: var(--fs-body-sm); }
/* calculators */
.tk-calc { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: var(--space-5);
  border: 1px solid var(--color-border); border-radius: var(--radius-xl); background: var(--color-surface-card);
  padding: var(--space-5); margin-bottom: var(--space-4); }
.tk-calc-wide { grid-template-columns: 1fr; }
.tk-calc-wide .tk-calc-in { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); align-items: start; }
.tk-calc-wide .tk-periods { grid-column: 1 / -1; max-width: 560px; }
.tk-calc-in { display: flex; flex-direction: column; gap: var(--space-3); }
.tk-calc-in label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: var(--fs-body-sm); }
.tk-calc-in label small { font-weight: 400; color: var(--color-text-muted); }
.tk-calc-in input { font-variant-numeric: tabular-nums; }
.tk-warn { color: var(--color-warning-text); font-size: var(--fs-body-sm); margin: 0; }
.tk-periods { display: grid; gap: 6px; }
.tk-periods-h, .tk-periods-r { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr) minmax(0, 1fr) 1.8rem; gap: 6px; align-items: center; font-size: var(--fs-body-sm); }
.tk-periods-h { color: var(--color-text-muted); font-weight: 600; }
.tk-calc-out { min-width: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.tk-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: var(--space-3); }
.tk-kpis > div { border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-3); display: flex; flex-direction: column; gap: 2px; }
.tk-kpis span { font-size: var(--fs-body-sm); color: var(--color-text-muted); }
.tk-kpis b { font-size: 1.35rem; font-variant-numeric: tabular-nums; color: var(--color-text-heading); }
.tk-kpis small { font-size: 12px; color: var(--color-text-muted); }
.tk-kpis b.good, .tk-table td.good { color: var(--color-success-text); }
.tk-kpis b.bad { color: var(--color-error-text); }
.tk-work { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 6px var(--space-4); margin: 0; font-size: var(--fs-body-sm); }
.tk-work dt { color: var(--color-text-muted); font-family: var(--font-mono); font-size: 12.5px; }
.tk-work dd { margin: 0; font-variant-numeric: tabular-nums; }
.tk-kpis b.warn { color: var(--color-warning-text); }
.tk-kpis b.tk-path { font-size: 1.05rem; }
.tk-note { font-size: var(--fs-body-sm); color: var(--color-text-muted); margin: 0; }
.tk-num { font-variant-numeric: tabular-nums; font-size: var(--fs-body-sm); text-align: right; }
.tk-work-pair { display: contents; }
/* editable row grids (decision options, risk list, activities): columns set per use via --cols */
.tk-grid { display: grid; gap: 6px; min-width: 0; }
.tk-calc-wide .tk-grid-full { grid-column: 1 / -1; overflow-x: auto; }
.tk-grid-full .tk-grid-h, .tk-grid-full .tk-grid-r { min-width: 540px; }
.tk-grid-h, .tk-grid-r { display: grid; grid-template-columns: var(--cols); gap: 6px; align-items: center; font-size: var(--fs-body-sm); }
.tk-grid-h { color: var(--color-text-muted); font-weight: 600; }
.tk-grid > .btn { justify-self: start; }
.tk-options { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: var(--space-4); align-items: start; }
.tk-options > .btn { justify-self: start; }
.tk-option { border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-3); margin: 0; display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.tk-option.is-best { border-color: var(--color-success-text); }
.tk-option-h { display: grid; grid-template-columns: minmax(0, 1fr) 1.8rem; gap: 6px; font-weight: 600; }
.tk-calc-in label.tk-inline { flex-direction: row; align-items: center; justify-content: space-between; }
.tk-inline input { max-width: 10rem; }
.tk-table tr.is-critical td { font-weight: 600; }
.tk-table td.bad { color: var(--color-error-text); }
/* cost-of-quality split bar */
.tk-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--color-border); }
.tk-bar span { display: block; height: 100%; }
.tk-bar-p { background: #10b981; } .tk-bar-a { background: #6366f1; } .tk-bar-i { background: #f59e0b; } .tk-bar-e { background: #ef4444; }
.tk-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px var(--space-4); font-size: var(--fs-body-sm); color: var(--color-text-muted); }
.tk-legend li { display: flex; align-items: center; gap: 6px; }
.tk-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.tk-legend b { color: var(--color-text-heading); font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .tk-calc, .tk-calc-wide { grid-template-columns: 1fr; }
  .tk-options { grid-template-columns: 1fr; }
  .tk-work { grid-template-columns: 1fr; }
  .tk-work dd { margin-bottom: 6px; }
}

/* Learning Centre sections (rail + hub), by discipline */
.lc-rail-section { display: flex; flex-direction: column; gap: 2px; }
.lc-rail-section + .lc-rail-section { margin-top: var(--space-4); }
.lc-rail-section-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  color: var(--color-text-muted); padding: 0 var(--space-3) var(--space-1); }
.lc-hub-section + .lc-hub-section { margin-top: var(--space-8); }
.lc-hub-section-title { font-size: 1.1rem; margin: 0 0 var(--space-3); color: var(--color-text-heading); }
@media (max-width: 860px) {
  .lc-rail-section { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px; }
  .lc-rail-section-label { width: 100%; padding: 0; }
  .lc-rail-section + .lc-rail-section { margin-top: var(--space-2); }
}

.lc-rail-title .lc-ico { width: 20px; height: 20px; color: var(--color-primary); flex: none; }
.lc-ico { width: 18px; height: 18px; flex: none; }
/* track rows: icon + label (the base .lc-track already flexes) */
.lc-track > .lc-ico + .lc-track-label { margin-right: auto; }
.lc-track .lc-ico { width: 16px; height: 16px; color: var(--lc-accent, var(--color-text-muted)); }

/* Section accents: indigo · emerald · amber. Text uses a darker/lighter mix for contrast. */
.lc-sec-pm      { --lc-accent: #6366f1; }
.lc-sec-finance { --lc-accent: #10b981; }
.lc-sec-hr      { --lc-accent: #f59e0b; }
.lc-hub-section-title { display: flex; align-items: center; gap: 10px; }
.lc-hub-section-title::before { content: ""; width: 4px; height: 1.1em; border-radius: 2px; background: var(--lc-accent); }
.lc-card-color { position: relative; overflow: hidden;
  background: linear-gradient(160deg, color-mix(in srgb, var(--lc-accent) 14%, var(--color-surface-card)) 0%, var(--color-surface-card) 70%);
  border-color: color-mix(in srgb, var(--lc-accent) 35%, var(--color-border)); }
.lc-card-color::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--lc-accent); }
.lc-card-color:hover { border-color: var(--lc-accent); }
.lc-card-chip { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--lc-accent) 18%, transparent); color: var(--lc-accent); }
.lc-card-chip .lc-ico { width: 22px; height: 22px; }
.lc-card-color .lc-track-card-cta { color: color-mix(in srgb, var(--lc-accent) 80%, var(--color-text-heading)); }
