/* ============================================================
   DFX5 corporate design tokens (from dfx5.com) — see docs/design-system.md
   Neutral near-black/white base · indigo-violet brand accent · 12px radius
============================================================ */
:root {
  /* ---- Light (default — DFX5 brand: white canvas, near-black text, gray-200 hairlines) ---- */
  --bg: #ffffff;            /* white page (real dfx5.com) */
  --bg-page: #f9fafb;       /* gray-50 app canvas (design: sidebar shell sits on gray-50) */
  --bg-card: #ffffff;       /* white card surface */
  --bg-elev: #f3f4f6;       /* gray-100 — inputs, stat boxes, hover */
  --border: #e5e7eb;        /* gray-200 hairline (real) */
  --text: #121212;          /* near-black text (real rgb(18,18,18)) */
  --text-dim: #4b5563;      /* gray-600 body */
  --text-faint: #6b7280;    /* gray-500 muted */
  --accent: #806ee1;        /* DFX5 brand purple (from the logo) */
  --accent-dim: #5e4fb0;    /* readable purple for hover/links on white */
  --accent-soft: #efecfb;   /* purple tint bg */
  --accent-fg: #ffffff;     /* text on purple */
  --accent2: #e07d6e;       /* brand coral (gradient end / secondary) */
  --accent2-dim: #c8604f;
  --primary: #121212;       /* primary buttons are near-black (real shadcn pattern) */
  --primary-fg: #ffffff;
  --good: #16a34a; --good-bg: #ecfdf3;
  --bad: #dc2626;  --bad-bg: #fef2f2;
  --warn: #d97706; --warn-bg: #fffbeb;
  --info: #806ee1;
  --star: #e0a93b;          /* rating gold (distinct from --warn) */
  --scrim: hsl(0 0% 0% / .45); /* modal/overlay backdrop */
  /* Signature DFX5 gradients (purple→coral everyday; full iridescent for decorative) */
  --brand-gradient: linear-gradient(110deg, #806ee1 0%, #e07d6e 100%);
  --brand-gradient-rich: linear-gradient(120deg, #e07d6e 0%, #806ee1 32%, #6ee0ab 68%, #e0d26e 100%);
  --shadow-gradient: 0 8px 40px -8px rgba(224,125,110,.38), 0 4px 16px -4px rgba(128,110,225,.30);
  --header-bg: rgba(255,255,255,.82);
  --radius: 24px;           /* real DFX5 card radius (design: cards/tiles 24px) */
  --radius-md: 12px;        /* icon tiles, inner panels */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 4px 6px -1px rgba(0,0,0,.08), 0 2px 4px -2px rgba(0,0,0,.06);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,.10), 0 8px 10px -6px rgba(0,0,0,.10);
  --font-display: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
  font-size: 16px;
}
html.dark {
  /* ---- Dark (academy-only adaptation; brand is light-first) ---- */
  --bg: #0a0a0a;
  --bg-page: #0a0a0a;
  --bg-card: #121214;
  --bg-elev: #1c1c20;
  --border: #27272a;
  --text: #f4f4f5;
  --text-dim: #a1a1aa;
  --text-faint: #71717a;
  --accent: #9384e8;        /* brand purple #806EE1, lifted for dark surfaces */
  --accent-dim: #7a6be0;
  --accent-soft: #221d3a;
  --accent-fg: #0a0a0a;     /* dark text on bright purple */
  --accent2: #e89a8e;       /* brand coral (lifted) */
  --accent2-dim: #e07d6e;
  --primary: #9384e8;       /* near-black is invisible on dark → primary uses brand purple */
  --primary-fg: #0a0a0a;
  --good: #34d399; --good-bg: #0f2b1f;
  --bad: #f87171;  --bad-bg: #2e1416;
  --warn: #fbbf24; --warn-bg: #2a2412;
  --info: #9384e8;
  --star: #f4b740;          /* rating gold (distinct from --warn) */
  --scrim: hsl(0 0% 0% / .6); /* modal/overlay backdrop */
  --brand-gradient: linear-gradient(110deg, #9384e8 0%, #e89a8e 100%);
  --brand-gradient-rich: linear-gradient(120deg, #e89a8e 0%, #9384e8 32%, #6ee0ab 68%, #e0d26e 100%);
  --shadow-gradient: 0 8px 40px -8px rgba(224,125,110,.30), 0 4px 16px -4px rgba(128,110,225,.34);
  --header-bg: rgba(10,10,10,.82);
  --shadow-sm: 0 1px 2px hsl(0 0% 0% / .4), 0 1px 3px hsl(0 0% 0% / .5);
  --shadow: 0 4px 8px -2px hsl(0 0% 0% / .5), 0 2px 4px -2px hsl(0 0% 0% / .4);
  --shadow-lg: 0 12px 24px -6px hsl(0 0% 0% / .6), 0 4px 8px -4px hsl(0 0% 0% / .45);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .brand b { font-family: var(--font-display); letter-spacing: -.01em; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================
   App shell — left sidebar + topbar (design: sidebar app shell)
============================================================ */
.app { display: flex; min-height: 100vh; }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wrap { max-width: 1240px; width: 100%; margin: 0 auto; padding: 4px 32px 80px; flex: 1; }
@media (max-width: 760px) { .wrap { padding: 4px 18px 64px; } }

/* ---------- left sidebar ---------- */
.sidenav {
  width: 252px; flex: none; background: var(--bg-card); border-right: 1px solid var(--border);
  height: 100vh; position: sticky; top: 0; z-index: 70;
  display: flex; flex-direction: column; padding: 20px 14px 14px;
}
.sidenav:empty { display: none; }
.sn-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; cursor: pointer; text-decoration: none; }
.sn-brand:hover { text-decoration: none; }
.sn-brand img { width: 26px; height: 26px; display: block; }
.sn-brand b { font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: -.02em; color: var(--text); }
.sn-brand b span { font-weight: 500; color: var(--text-faint); }
.sn-nav { display: flex; flex-direction: column; flex: 1; overflow-y: auto; min-height: 0; }
.sn-sec { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--text-faint); padding: 14px 12px 6px; }
.sn-sec:first-child { padding-top: 2px; }
.sn-item {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  padding: 9px 12px; border-radius: 10px; border: none; cursor: pointer; margin-bottom: 3px;
  background: transparent; color: var(--text-dim); font-family: var(--font-body);
  font-size: 14px; font-weight: 500; transition: background 150ms, color 150ms; text-decoration: none;
}
.sn-item:hover { background: var(--bg-elev); color: var(--text); text-decoration: none; }
.sn-item svg { flex: none; color: var(--text-faint); }
.sn-item .sn-l { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sn-item.active { background: var(--primary); color: var(--primary-fg); font-weight: 600; }
.sn-item.active svg { color: var(--primary-fg); }
.sn-item .sn-tag {
  font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-faint); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px;
}
.sn-item.active .sn-tag { color: color-mix(in srgb, var(--primary-fg) 65%, transparent); border-color: color-mix(in srgb, var(--primary-fg) 25%, transparent); }
.sn-item .sn-count {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--bad); color: #fff;
  font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.sn-item.active .sn-count { background: var(--primary-fg); color: var(--primary); }
/* bottom user / level widget */
.sn-user { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 8px; }
.sn-user-row { display: flex; align-items: center; gap: 11px; padding: 2px 6px; }
.sn-user-row .avatar { width: 38px; height: 38px; flex: 0 0 38px; font-size: 14px; }
.sn-user-name { font-weight: 600; font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sn-user-sub { font-size: 11.5px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sn-xp { padding: 9px 6px 2px; }
.sn-xp-row { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--text-faint); margin-bottom: 5px; font-family: var(--font-mono); }
.sn-xp-bar { height: 5px; border-radius: 999px; background: var(--bg-elev); overflow: hidden; }
.sn-xp-bar > i { display: block; height: 100%; border-radius: 999px; background: var(--brand-gradient); }
.nav-scrim { display: none; }

/* ---------- topbar ---------- */
header.top {
  position: sticky; top: 0; z-index: 50; flex: none;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
/* overflow-x:clip (NOT overflow:hidden) contains the row horizontally at narrow widths — see the
   .tb-title note below — WITHOUT clipping the topbar dropdowns. The bell / admin-bell / user menus
   are position:absolute children of this 64px-tall row and open *below* it; plain `overflow:hidden`
   here clipped them to the bar (they'd open but render invisible). overflow-x:clip leaves overflow-y
   visible so the menus escape. (Regression fix: all three topbar menus were dead.) */
.top-inner { padding: 0 28px; height: 64px; display: flex; align-items: center; gap: 12px; overflow-x: clip; overflow-y: visible; }
/* min-width:0 lets the nowrap title actually shrink to its ellipsis instead of forcing the row
   wider than the viewport (the ~71px mobile horizontal overflow at narrow widths). flex:0 1 auto
   keeps the desktop layout unchanged — the title hugs its content; .top-spacer still pushes the
   search/controls right. (#106 fix 15.) */
.tb-title { margin: 0; min-width: 0; flex: 0 1 auto; font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -.02em; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-burger { display: none; }
.tb-streak {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 12px; border-radius: 10px;
  background: color-mix(in srgb, var(--accent2) 10%, transparent); border: 1px solid color-mix(in srgb, var(--accent2) 22%, transparent);
  color: var(--accent2-dim); font-size: 12px; font-weight: 500; white-space: nowrap;
}
.tb-streak b { font-family: var(--font-mono); font-weight: 700; font-size: 14px; }
/* legacy aliases kept for brand block in login/print contexts */
.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.brand .logo { display: flex; align-items: center; }
.brand b { font-size: 15px; letter-spacing: .2px; }
.brand span { color: var(--text-dim); font-size: 12px; display: block; }
.top-spacer { flex: 1; }
.navlink { color: var(--text-dim); font-size: 13.5px; cursor: pointer; padding: 6px 10px; border-radius: 8px; }
.navlink:hover { color: var(--text); background: var(--bg-elev); text-decoration: none; }
.navlink.active { color: var(--text); }

/* mobile: off-canvas sidebar + burger */
@media (max-width: 900px) {
  .sidenav { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-104%); transition: transform .25s cubic-bezier(.4,0,.2,1); box-shadow: none; }
  body.nav-open .sidenav { transform: none; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
  body.nav-open .nav-scrim { display: block; position: fixed; inset: 0; z-index: 65; background: var(--scrim); }
  .tb-burger {
    display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px;
    border: 1px solid var(--border); background: var(--bg-card); color: var(--text-dim); cursor: pointer; font-size: 17px; line-height: 1;
  }
  .top-inner { padding: 0 16px; gap: 9px; }
  .tb-streak { display: none; }
}
.pill {
  font-size: 12px; color: var(--text-dim); border: 1px solid var(--border);
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}
.pill.due { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }

/* user chip (design: bare 38px avatar button in the topbar) */
.user { position: relative; }
.user-btn {
  display: flex; align-items: center; cursor: pointer;
  border: none; background: transparent; color: var(--text); padding: 0; border-radius: 999px;
}
.user-btn:hover .avatar { box-shadow: 0 0 0 2px var(--bg-card), 0 0 0 3.5px var(--accent); }
.user-btn > span { display: none; }
.avatar {
  width: 38px; height: 38px; border-radius: 999px; flex: 0 0 38px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: grid; place-items: center; font-weight: 700; color: #fff; font-size: 13.5px;
  letter-spacing: -.02em; transition: box-shadow .15s;
}
.menu {
  position: absolute; right: 0; top: 48px; min-width: 210px; z-index: 60;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: 8px; display: none;
}
.menu.open { display: block; }
.menu .who { padding: 8px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.menu .who b { font-size: 13.5px; }
.menu .who small { color: var(--text-dim); font-size: 12px; word-break: break-all; }
.menu button { display: block; width: 100%; text-align: left; background: transparent; border: 0; color: var(--text); padding: 8px 10px; border-radius: 7px; cursor: pointer; font-size: 13.5px; }
.menu button:hover { background: var(--bg-elev); }
/* Language + theme menu rows: only surfaced inside the account menu on small screens
   (≤480px), where the standalone topbar toggles are hidden to make the header fit. The
   split layout (label left / value right) is applied alongside display in the ≤480px block
   so it never overrides the desktop `display:none` here. */
.menu button.menu-mobile { display: none; }
.menu button.menu-split { align-items: center; justify-content: space-between; gap: 12px; }
.menu .menu-val { color: var(--text-dim); font-weight: 700; font-size: 13px; letter-spacing: .02em; }

h1 { font-size: 30px; margin: 28px 0 6px; letter-spacing: -.6px; }
h2 { font-size: 27px; margin: 44px 0 16px; letter-spacing: -.7px; }
h3 { font-size: 16px; }
.sub { color: var(--text-dim); margin: 0 0 6px; }
.crumb { color: var(--text-dim); font-size: 13px; font-weight: 500; margin: 18px 0 0; }
.crumb a { color: var(--accent-dim); }
.crumb a:hover { color: var(--accent); }

.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: 1fr 1fr; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow-sm);
}
.card.tap { cursor: pointer; transition: box-shadow .3s var(--ease, cubic-bezier(.4,0,.2,1)), border-color .3s, transform .08s; }
/* signature DFX5 interaction: border fades, gradient-tinted shadow blooms on hover */
.card.tap:hover { border-color: transparent; box-shadow: var(--shadow-gradient); }
.card.tap:active { transform: translateY(1px); }
.card h3 { margin: 0 0 4px; }
.card p.desc { margin: 0; color: var(--text-dim); font-size: 13.5px; }
.card .cta { margin-top: 12px; color: var(--accent); font-size: 13px; font-weight: 600; }
.badge {
  display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 9px;
  border-radius: 999px; background: var(--bg-elev); color: var(--text-dim);
  border: 1px solid var(--border); letter-spacing: .1px;
}
/* subtle tinted pills — colored text on a faint same-hue wash, hairline border. No solid blobs. */
.badge.ok   { background: var(--good-bg); color: var(--good); border-color: color-mix(in srgb, var(--good) 30%, transparent); }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.badge.bad  { background: var(--bad-bg); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.badge.due  { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 32%, transparent); }
.badge.enrolled { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 32%, transparent); }
/* Course-card two-CTA row (More info + state-aware primary) */
.card .card-actions { display: flex; gap: 8px; margin-top: 12px; }
.card .card-actions .btn { flex: 1; justify-content: center; }
/* "Overview" metadata — compact one-band strip of value-over-label cells (design meta-strip) */
.course-meta { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-card); margin: 14px 0; overflow: hidden; }
.cm-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); }
.cmx { padding: 12px 14px 11px; display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center;
  box-shadow: inset -1px 0 0 color-mix(in srgb, var(--border) 55%, transparent), inset 0 -1px 0 color-mix(in srgb, var(--border) 40%, transparent); }
.cmx b { font-family: var(--font-mono); font-weight: 700; font-size: 14.5px; color: var(--text); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cmx b small { font-size: 11px; color: var(--text-faint); font-weight: 500; }
.cmx span { font-size: 9.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cm-foot { border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent); padding: 8px 14px; font-size: 12.5px; color: var(--text-dim); }
.cm-foot strong { color: var(--text); font-weight: 600; }
/* legacy row classes kept for any remaining users */
.cm-row { display: flex; justify-content: space-between; gap: 16px; padding: 7px 14px; border-top: 1px solid var(--border); font-size: 13.5px; }
.cm-k { color: var(--text-dim); } .cm-v { font-weight: 600; text-align: right; }
/* "How to prepare" panel — vendor-external study sources */
.study-sources { margin: 14px 0; }
.study-sources .ss-note { color: var(--text-dim); font-size: 13px; margin: 4px 0 10px; }
.study-sources .ss-list { margin: 0; padding-left: 18px; }
.study-sources .ss-list li { margin: 5px 0; font-size: 14px; }
.study-sources .ss-list a { color: var(--accent); }
/* First-time "welcome / what's inside" overview */
.welcome { max-width: 760px; }
.welcome-eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); font-weight: 800; margin-top: 8px; }
.welcome-title { font-size: 30px; margin: 6px 0 8px; }
.welcome-goal { font-size: 15px; color: var(--text-dim); line-height: 1.55; margin: 0 0 8px; }
.badge.cert { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 28%, transparent); }
.badge.train{ background: color-mix(in srgb, var(--accent2) 12%, var(--bg-card)); color: var(--accent2); border-color: color-mix(in srgb, var(--accent2) 28%, transparent); }
.badge.soon { background: color-mix(in srgb, var(--accent2) 14%, var(--bg-card)); color: var(--accent2); border-color: color-mix(in srgb, var(--accent2) 30%, transparent); }
/* course level: foundational → intermediate → advanced */
.badge.lvl1 { background: color-mix(in srgb, var(--good) 12%, var(--bg-card)); color: var(--good); border-color: color-mix(in srgb, var(--good) 30%, transparent); }
.badge.lvl2 { background: color-mix(in srgb, var(--warn) 12%, var(--bg-card)); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.badge.lvl3 { background: color-mix(in srgb, var(--bad) 12%, var(--bg-card)); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.prereq-list { margin: 10px 0 0; padding-left: 20px; }
.prereq-list li { margin: 4px 0; }
.prereq-list a { font-weight: 600; }

/* course catalog card — design "detailed" variant: cover on top (tags overlaid),
   eyebrow kicker row, title + clamped description, meta line, progress / status foot */
.card.pad0 { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.course { display: flex; flex-direction: column; gap: 0; }
.course-body { padding: 15px 20px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.course-kicker { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.course-kicker .eyebrow { font-size: 10px; color: var(--accent-dim); }
.course-kicker .xp { font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; color: var(--accent-dim); }
.course .head { display: flex; align-items: flex-start; gap: 12px; }
.course .meta-row { display: flex; gap: 6px; flex-wrap: wrap; }
.course h3 { font-size: 16.5px; font-weight: 700; letter-spacing: -.015em; line-height: 1.25; margin: 0; }
.course p.desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.5; font-size: 12.5px; }
.course .meta-line { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--text-faint); margin-top: auto; padding-top: 4px; }
.course .meta-line b { color: var(--text-dim); font-weight: 600; }
.course .foot-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent); padding-top: 12px; }
/* stat row → filled light-gray boxes (kept for module pages) */
.course .stat { display: flex; gap: 10px; margin-top: 6px; }
.course .stat > div { flex: 1; background: var(--bg-elev); border-radius: 10px; padding: 11px 13px; }
.course .stat .n { font-family: var(--font-mono); font-size: 17px; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.course .stat .l { font-size: 10px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .6px; margin-top: 6px; }
.course .progress-mini { height: 6px; background: var(--bg-elev); border-radius: 999px; overflow: hidden; }
.course .progress-mini > i { display: block; height: 100%; border-radius: 999px; background: var(--brand-gradient); }
.course.edf .progress-mini > i { background: linear-gradient(90deg, var(--accent2-dim), var(--accent2)); }
.course .progress-row { display: flex; align-items: center; gap: 10px; }
.course .progress-row .progress-mini { flex: 1; }
.course .progress-row .pr-n { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--text); flex: none; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  border: 1px solid var(--border); background: var(--bg-card); color: var(--text);
  padding: 10px 16px; border-radius: 10px; font-size: 14px; font-weight: 600;
  letter-spacing: -.01em;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { background: var(--bg-elev); text-decoration: none; }
.btn.primary { background: var(--primary); color: var(--primary-fg); border-color: transparent; }
.btn.primary:hover { background: color-mix(in srgb, var(--primary) 92%, #000); box-shadow: var(--shadow); }
.btn.gradient { background: var(--brand-gradient); color: #fff; border-color: transparent; }
.btn.gradient:hover { box-shadow: var(--shadow-gradient); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-dim); }
.btn.ghost:hover { background: var(--bg-elev); color: var(--text); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
/* Gating hint ("Pass the check to complete" / "✓ Completed") — a button-height status chip so
   it balances next to the nav buttons in a footer .btn-row instead of a tiny clashing pill. */
.gate-hint { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--text-dim); background: var(--bg-elev); border: 1px solid var(--border); }
.gate-hint.ok { color: var(--good); background: var(--good-bg); border-color: color-mix(in srgb, var(--good) 32%, transparent); }

/* Readiness gauge */
.readiness { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.gauge { --pct: 0; position: relative; width: 132px; height: 132px; flex: 0 0 auto; }
.gauge svg { transform: rotate(-90deg); }
.gauge .num { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.gauge .num b { font-size: 30px; display: block; line-height: 1; }
.gauge .num small { color: var(--text-dim); font-size: 11px; }
.readiness .meta { flex: 1; min-width: 220px; }
.readiness .label { font-size: 18px; font-weight: 700; margin-bottom: 2px; }
.readiness .label.ready { color: var(--good); }
.readiness .label.close { color: var(--warn); }
.readiness .label.notready { color: var(--bad); }
.readiness .label.start { color: var(--accent); }
.readiness .scaled { color: var(--text-dim); font-size: 13.5px; }

.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; }
.bar-row .name { font-size: 13.5px; }
.bar-row .name small { color: var(--text-faint); }
.bar-row .val { font-size: 12.5px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.track { grid-column: 1 / -1; height: 7px; background: var(--bg-elev); border-radius: 999px; overflow: hidden; }
.track > i { display: block; height: 100%; border-radius: 999px; background: var(--brand-gradient); }
.track > i.lo { background: var(--bad); }
.track > i.mid { background: var(--warn); }
.track > i.hi { background: var(--good); }

/* Question */
.q-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; color: var(--text-dim); font-size: 12px; }
.progressbar { height: 5px; background: var(--bg-elev); border-radius: 999px; overflow: hidden; margin: 4px 0 18px; }
.progressbar > i { display: block; height: 100%; background: var(--brand-gradient); transition: width .25s; }
.situation {
  background: var(--bg-elev); border-left: 3px solid var(--accent); border-radius: 8px;
  padding: 12px 14px; color: var(--text); font-size: 14.5px; margin-bottom: 14px;
}
.situation strong { color: var(--accent); }
.qtext { font-size: 19px; font-weight: 600; letter-spacing: -.02em; line-height: 1.45; margin: 0 0 18px; }
.options { display: grid; gap: 11px; }
.opt {
  display: flex; gap: 14px; align-items: flex-start; text-align: left; width: 100%;
  background: var(--bg-card); border: 1.5px solid var(--border); color: var(--text);
  padding: 15px 17px; border-radius: 14px; cursor: pointer; font-size: 15px; line-height: 1.4;
  transition: border-color .14s, background .14s;
}
.opt:hover:not([disabled]) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 3%, var(--bg-card)); }
.opt .letter {
  flex: 0 0 28px; width: 28px; height: 28px; border-radius: 8px; background: var(--bg-elev);
  border: none; display: grid; place-items: center; font-weight: 700; font-size: 13.5px;
  font-family: var(--font-mono); color: var(--text-faint);
}
.opt.correct { border-color: var(--good); background: var(--good-bg); }
.opt.correct .letter { background: var(--good); color: #fff; }
.opt.wrong { border-color: var(--bad); background: var(--bad-bg); }
.opt.wrong .letter { background: var(--bad); color: #fff; }
.opt.chosen { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 5%, var(--bg-card)); }
.opt.chosen .letter { background: var(--accent); color: #fff; }
.opt[disabled] { cursor: default; }

.explain { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 14px; display: none; }
.explain.show { display: block; }
.verdict { font-weight: 700; margin-bottom: 8px; }
.verdict.ok { color: var(--good); }
.verdict.no { color: var(--bad); }
.explain .why { background: var(--bg-elev); border-radius: 8px; padding: 12px 14px; font-size: 14px; }
.rationales { margin-top: 12px; display: grid; gap: 6px; }
.rationale { font-size: 13px; color: var(--text-dim); display: flex; gap: 8px; }
.rationale b { color: var(--text); flex: 0 0 18px; }
.rationale.is-correct { color: var(--text); }
.rationale.is-correct b { color: var(--good); }

.footer-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; gap: 10px; flex-wrap: wrap; }
.muted { color: var(--text-faint); font-size: 12.5px; }

.empty { text-align: center; color: var(--text-dim); padding: 50px 20px; }
.empty .big { font-size: 40px; margin-bottom: 8px; }

/* Result screen */
.result-head { text-align: center; padding: 10px 0 6px; }
.result-head .score { font-family: var(--font-mono); font-size: 48px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.result-head .score.pass { color: var(--good); }
.result-head .score.fail { color: var(--bad); }
table.breakdown { width: 100%; border-collapse: collapse; font-size: 14px; }
table.breakdown th, table.breakdown td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--border); }
table.breakdown th { color: var(--text-dim); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
table.breakdown td.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Dashboard */
table.dash { width: 100%; border-collapse: collapse; font-size: 14px; }
table.dash th, table.dash td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.dash th { color: var(--text-dim); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; }
table.dash td.num { text-align: right; font-variant-numeric: tabular-nums; }
.status-dot { display: inline-block; width: 9px; height: 9px; border-radius: 999px; margin-right: 7px; vertical-align: middle; }
.status-dot.done { background: var(--good); }
.status-dot.prog { background: var(--warn); }
.status-dot.none { background: var(--text-faint); }
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 760px) { .kpi-row { grid-template-columns: 1fr 1fr; } }
.kpi { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px; box-shadow: var(--shadow-sm); }
.kpi .n { font-family: var(--font-mono); font-size: 30px; font-weight: 700; line-height: 1; letter-spacing: -.03em; }
.kpi .l { color: var(--text-faint); font-size: 11px; font-weight: 600; margin-top: 8px; text-transform: uppercase; letter-spacing: .12em; }
.note {
  background: var(--bg-elev); border: 1px dashed var(--border); border-radius: 10px;
  padding: 12px 14px; color: var(--text-dim); font-size: 13px; margin-top: 16px;
}

.timer { font-variant-numeric: tabular-nums; font-weight: 700; }
.timer.low { color: var(--bad); }
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text);
  padding: 10px 18px; border-radius: 10px; box-shadow: var(--shadow); opacity: 0;
  transition: opacity .2s, transform .2s; pointer-events: none; z-index: 100; font-size: 14px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
/* segmented tabs → design underline tabs (MyLearning pattern) */
.seg { display: flex; gap: 4px; border-bottom: 1px solid var(--border); width: 100%; }
.seg button { background: transparent; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--text-faint); padding: 11px 16px; cursor: pointer; font-size: 14px; font-weight: 600; font-family: var(--font-body); }
.seg button:hover { color: var(--text); }
.seg button.active { color: var(--text); border-bottom-color: var(--text); }
/* Tab bars (e.g. the dashboard's 4-tab course filter) outgrow a phone's width. Let the bar
   scroll horizontally inside its own box instead of pushing the whole page wide; tabs keep
   their natural width and never wrap mid-label. Scoped off `.adm-tabs` — the admin tab bar
   reuses `.seg` but wraps via its own `.admin .adm-tabs` rule and must NOT become a scroll
   container. Desktop (>760px) is untouched. */
@media (max-width: 760px) {
  .seg:not(.adm-tabs) { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .seg:not(.adm-tabs)::-webkit-scrollbar { display: none; }
  .seg:not(.adm-tabs) button { white-space: nowrap; flex: 0 0 auto; }
}
.kbd { font-size: 11px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; color: var(--text-dim); background: var(--bg-elev); }
.mod-options > summary { cursor: pointer; list-style: none; font-size: 12px; width: fit-content; }
.mod-options > summary::-webkit-details-marker { display: none; }
.mod-options > summary::before { content: '⚙ '; }

/* course-completion celebration */
.celebrate-overlay { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 20px; background: var(--scrim); backdrop-filter: blur(3px); animation: cel-fade .25s ease; }
.celebrate-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px); padding: 30px 34px; max-width: 460px; width: 100%; text-align: center; box-shadow: var(--shadow-lg); animation: cel-pop .35s cubic-bezier(.2,.9,.3,1.3); }
.celebrate-card h2 { margin: 6px 0 4px; }
.cel-confetti { font-size: 38px; animation: cel-bounce 1s ease infinite; }
.cel-badge { display: flex; justify-content: center; margin: 4px 0 10px; animation: cel-badge-in .6s ease; }
.cel-stats { display: flex; gap: 28px; justify-content: center; margin-top: 14px; }
.cel-stat .n { font-size: 26px; font-weight: 800; line-height: 1; }
.cel-stat .l { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--text-faint); margin-top: 6px; }
.cel-badges { margin-top: 12px; color: var(--text-dim); font-size: 13px; }
@keyframes cel-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cel-pop { 0% { transform: scale(.85); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes cel-badge-in { 0% { transform: scale(0) rotate(-30deg); opacity: 0; } 70% { transform: scale(1.15) rotate(8deg); } 100% { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes cel-bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.cel-survey { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 14px; text-align: left; }
.cel-survey-h { font-weight: 600; font-size: 13px; margin: 0 0 10px; text-align: center; }
.svq { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 7px 0; }
.svl { font-size: 13px; color: var(--text-dim); min-width: 120px; }
.sv-stars { display: inline-flex; }
.sv-star { background: none; border: 0; cursor: pointer; font-size: 22px; line-height: 1; color: var(--star); padding: 0 1px; }
.sv-pills { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.sv-pill { background: var(--bg); border: 1px solid var(--border); color: var(--text-dim); border-radius: 999px; padding: 4px 12px; font-size: 12px; cursor: pointer; }
.sv-pill.active { background: var(--accent); color: var(--accent-fg); border-color: transparent; font-weight: 700; }
.cel-survey .hide { display: none; }
/* "One more thing" — prominent (hard to miss) but skippable post-completion survey */
.cel-survey-onemore { margin-top: 16px; border-top: 2px solid var(--accent); background: var(--bg-elev); border-radius: 0 0 12px 12px; padding: 14px 14px 12px; }
.cel-survey-onemore .cel-survey-h { font-size: 15px; font-weight: 800; color: var(--text); }
.sv-nag { margin: 8px 0 0; text-align: center; font-size: 12.5px; color: var(--text-dim); font-style: italic; }

/* ── Course shell (returning-learner view + lesson reader): step rail + main pane ── */
.course-shell { display: grid; grid-template-columns: 248px 1fr; gap: 22px; align-items: start; margin-top: 12px; }
.course-shell-rail { position: sticky; top: 78px; }
.course-rail { border: 1px solid var(--border); border-radius: 12px; background: var(--bg-card); padding: 8px; }
.rail-head { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-dim); font-weight: 700; padding: 6px 8px 8px; display: flex; justify-content: space-between; }
.rail-step { display: flex; align-items: center; gap: 9px; padding: 8px 9px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 13.5px; line-height: 1.3; }
.rail-step:hover { background: var(--bg-elev); text-decoration: none; }
.rail-step.cur { background: var(--bg-elev); font-weight: 700; }
.rail-step.done .rail-t { color: var(--text-dim); }
.rail-ic { flex: 0 0 18px; text-align: center; color: var(--text-faint); font-size: 13px; }
.rail-ic.done { color: var(--good, #16a34a); } .rail-ic.cur { color: var(--accent); }
.rail-t { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.rail-next { flex: 0 0 auto; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--accent-fg); background: var(--accent); padding: 1px 6px; border-radius: 999px; }
.rail-tag { flex: 0 0 auto; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-dim); border: 1px solid var(--border); padding: 1px 6px; border-radius: 999px; }
.course-resume { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.course-h { margin-top: 18px; }
.course-about { margin-top: 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-card); }
.course-about > summary { cursor: pointer; padding: 12px 14px; font-weight: 600; font-size: 14px; color: var(--text-dim); }
.course-about > summary:hover { color: var(--text); }
.course-about-body { padding: 0 14px 14px; }
.course-about-body .kit-hero, .course-about-body .crumb { display: none; } /* the toggle is the heading now */
@media (max-width: 760px) {
  .course-shell { grid-template-columns: 1fr; gap: 14px; }
  .course-shell-rail { position: static; }
  .course-rail { display: flex; overflow-x: auto; gap: 4px; }
  .course-rail .rail-head { display: none; }
  .rail-step { flex: 0 0 auto; }
}

/* Unified DFX5 dark sign-in — matches edf.dfx5.com / policies.dfx5.com.
   Scoped under .login-overlay (2-class specificity) so it wins over base .card
   regardless of source order, and only ever affects the sign-in/splash/gate views. */
.login-overlay {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
  background: #0a0a12; overflow: hidden;
}
.login-overlay::before, .login-overlay::after {
  content: ''; position: absolute; width: 24rem; height: 24rem; border-radius: 999px;
  filter: blur(128px); pointer-events: none;
}
.login-overlay::before { left: -8rem; top: -8rem; background: rgba(128, 110, 225, .25); }
.login-overlay::after { right: -8rem; bottom: -8rem; background: rgba(224, 125, 110, .20); }
.login-overlay .login-card {
  position: relative; z-index: 1; width: min(420px, 92vw); padding: 30px 28px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 18px; backdrop-filter: blur(8px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .6); color: #fff;
}
.login-overlay .login-wordmark {
  display: block; height: 40px; width: auto; margin: 0 auto 8px;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .35));
}
.login-overlay .login-eyebrow {
  text-align: center; font-size: 12px; font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase; color: #806EE1; margin: 0 0 14px;
}
.login-overlay h2 { color: #fff; }
.login-overlay .sub { color: rgba(255, 255, 255, .55); }
.login-overlay .muted { color: rgba(255, 255, 255, .42); }
.login-overlay .field {
  background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .14); color: #fff;
}
.login-overlay .field::placeholder { color: rgba(255, 255, 255, .4); }
.login-overlay .field:focus { border-color: #806EE1; }
.login-overlay .btn:not(.primary) {
  background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); color: #fff;
}
.login-overlay .btn:not(.primary):hover { background: rgba(255, 255, 255, .14); }
.field { width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); font-size: 14px; }
.field:focus { outline: none; border-color: var(--accent); }

/* ---------- lessons & attestation ---------- */
.lesson-row { display: flex; align-items: center; gap: 14px; }
.lesson-row h3 { margin: 0 0 2px; }
.lesson-ix {
  flex: 0 0 30px; width: 30px; height: 30px; border-radius: 999px;
  display: grid; place-items: center; font-weight: 800; font-size: 13px;
  background: var(--bg-elev); border: 1px solid var(--border); color: var(--text-dim);
}
.lesson-ix.done { background: var(--good); color: #06200f; border-color: var(--good); }
.lesson-body { line-height: 1.7; }
.lesson-body h4 { font-size: 15px; margin: 20px 0 6px; color: var(--text); }
.lesson-body p { margin: 0 0 12px; color: var(--text); }
.lesson-body ul, .lesson-body ol { margin: 0 0 12px; padding-left: 22px; color: var(--text); }
.lesson-body li { margin: 4px 0; }
.lesson-body code { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; font-size: 13px; }
.lesson-body pre.md-pre { margin: 0 0 14px; padding: 12px 14px; overflow-x: auto; background: var(--bg-code, var(--bg-elev)); border: 1px solid var(--border); border-radius: 8px; }
.lesson-body pre.md-pre code { display: block; background: none; border: 0; padding: 0; font-size: 12.5px; line-height: 1.55; color: var(--text); white-space: pre; }
.lesson-body a { color: var(--accent); }
.md-figure { margin: 16px 0; }
.md-figure img, .md-img { max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-elev); display: block; }
.md-img { display: inline-block; vertical-align: middle; margin: 2px 0; }
.md-figure figcaption { font-size: 12.5px; color: var(--text-dim); margin-top: 6px; text-align: center; }
.chk { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; font-size: 14px; cursor: pointer; }
.chk input { margin-top: 3px; flex: 0 0 auto; width: 16px; height: 16px; accent-color: var(--accent); }
.chk input:disabled { cursor: default; }

/* ============================================================
   Look & feel v2 — branding, hero, polish (overrides above)
============================================================ */
/* Flat gray-50 app canvas — the design's sidebar shell puts white cards on a quiet
   gray-50 page; the gradient lives in components (cards, rings, CTAs), not the canvas. */
body { background: var(--bg-page); }
html.dark body { background: var(--bg-page); }

/* Logo slot holds the iridescent DFX5 mark (natural aspect, height-driven) */
.brand .logo { background: transparent; width: auto; height: 32px; display: flex; align-items: center; }
.brand .logo img, .brand .logo svg { display: block; height: 100%; width: auto; }
.brand b { font-size: 15px; }
.brand span { letter-spacing: .3px; }
.login-card .logo-lg { background: transparent; width: 56px; height: 56px; display: grid; place-items: center; }
.login-card .logo-lg svg { display: block; }

/* nav active underline */
.navlink.active { position: relative; }
.navlink.active::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--accent); border-radius: 2px; }

/* ---------- page header (design: eyebrow + tight bold title + body) ---------- */
.eyebrow { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--text-faint); }
.eyebrow.grad { background: var(--brand-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin: 26px 0 8px; }
.page-head h1 { font-size: 32px; font-weight: 700; letter-spacing: -.025em; line-height: 1.1; margin: 8px 0 0; color: var(--text); }
.page-head .ph-sub { color: var(--text-dim); font-size: 15px; line-height: 1.6; margin: 6px 0 0; max-width: 560px; }
.page-head .ph-sub strong { color: var(--text); font-weight: 600; }
/* headline stat strip — white card, mono numbers, hairline dividers */
.head-stats {
  display: flex; gap: 28px; padding: 16px 24px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.head-stats .hs-div { width: 1px; background: var(--border); }
.stat-cell .n { font-family: var(--font-mono); font-weight: 700; font-size: 30px; color: var(--text); letter-spacing: -.03em; line-height: 1; }
.stat-cell .n.purple { color: var(--accent-dim); }
.stat-cell .l { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--text-faint); margin-top: 7px; }
@media (max-width: 760px) { .page-head h1 { font-size: 26px; } .head-stats { gap: 18px; padding: 13px 18px; } .stat-cell .n { font-size: 22px; } }
/* legacy hero kept as a simple alias of the page-head pattern */
.hero { margin: 26px 0 10px; }
.hero .eyebrow { color: var(--text-faint); }
.hero h1 { font-size: 32px; font-weight: 700; letter-spacing: -.025em; line-height: 1.1; margin: 8px 0 0; color: var(--text); }
.hero p { color: var(--text-dim); font-size: 15px; line-height: 1.6; margin: 6px 0 0; max-width: 560px; }
.hero .hero-logo { display: none; }
@media (max-width: 760px) { .hero h1 { font-size: 26px; } }

/* component polish */
h1 { font-weight: 800; }
h2 { font-weight: 800; }
.btn.primary { background: var(--primary); border-color: var(--primary); }
.card.tap { transition: border-color .3s, transform .12s, box-shadow .3s; }
.course, .card.featured { position: relative; transition: transform .14s, box-shadow .18s; }
/* dfx5 highlighted-card treatment: gradient border ring (violet→magenta) + soft glow on hover */
.course::before, .card.featured::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px;
  background: var(--brand-gradient-rich);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .18s; pointer-events: none; z-index: 2;
}
.card.tap.course:hover { transform: translateY(-3px); }
.course:hover { box-shadow: 0 14px 34px -12px color-mix(in srgb, var(--accent) 50%, transparent); }
.course:hover::before, .card.featured::before { opacity: 1; }
.card.featured { box-shadow: 0 14px 34px -14px color-mix(in srgb, var(--accent) 42%, transparent); }
/* (segmented control is now an underline tab bar — see .seg above) */

/* ---------- corporate footer (DFX5 branding, all pages) ---------- */
.site-foot {
  max-width: 1240px; width: 100%; margin: 24px auto 28px; padding: 18px 32px 0;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
  color: var(--text-faint); font-size: 12.5px;
}
@media print { .sidenav, .nav-scrim, .tb-burger { display: none !important; } }
.site-foot img { display: block; border-radius: 6px; opacity: .95; }
.site-foot strong { color: var(--text-dim); font-weight: 700; }
.site-foot .foot-spacer { flex: 1; }
.site-foot a { color: var(--text-faint); }
.site-foot a:hover { color: var(--text-dim); }

/* ---------- admin density + inline editors ---------- */
/* NOTE: color-scheme is driven by the theme (:root=light, html.dark=dark) so the native
   date-picker calendar icon is visible in BOTH modes. (A previous `body{color-scheme:dark}`
   forced dark globally → invisible white icon on light inputs in light mode.) */
.btn.sm { padding: 4px 10px; font-size: 12px; border-radius: 8px; font-weight: 600; gap: 4px; }
.field.sm { padding: 5px 8px; font-size: 12.5px; border-radius: 8px; }
table.dash td .row-actions { display: inline-flex; gap: 6px; align-items: center; }
table.dash td input[type="date"] { width: 140px; }
.due-cell { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* ---------- course cover images (design: cover band on a pad-0 card, tags overlaid) ---------- */
.course-cover {
  height: 128px; margin: 0; border-radius: 0; flex: none;
  background: var(--bg-elev) center / cover no-repeat;
  position: relative; display: flex; align-items: flex-end; overflow: hidden;
}
/* subtle bottom scrim keeps overlaid tags/titles legible over any photo */
.course-cover::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(8,6,20,.42), rgba(8,6,20,.06) 52%, rgba(8,6,20,0) 72%); }
.cover-tags { position: absolute; left: 14px; top: 14px; z-index: 1; display: flex; gap: 7px; }
.cover-tags .badge { background: rgba(255,255,255,.94); color: #121212; border-color: transparent; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.cover-tags .badge.req { background: rgba(18,18,18,.86); color: #fff; }
.cover-title { position: relative; z-index: 1; margin: 0; padding: 12px 16px 13px;
  color: #fff; font-weight: 800; font-size: 19px; line-height: 1.16; letter-spacing: -.3px;
  text-shadow: 0 2px 10px rgba(0,0,0,.75); }
.module-cover {
  height: 150px; border-radius: 16px; margin: 10px 0 6px;
  background: var(--bg-elev) center / cover no-repeat;
  border: 1px solid var(--border);
}

/* ============================================================
   Admin panel — EDF-aligned compact design system (dark theme)
============================================================ */
.admin { font-size: 14px; }
.admin h1 { font-size: 22px; margin: 22px 0 4px; }
.admin > .sub { color: var(--text-dim); margin-bottom: 6px; }

/* segmented tab bar (width:auto undoes the global .seg full-width underline style) */
.admin .adm-tabs { display: inline-flex; width: auto; flex-wrap: wrap; gap: 2px; margin: 16px 0 20px; border: 1px solid var(--border); border-radius: 9px; padding: 3px; background: var(--bg-elev); }
.admin .adm-tabs button { background: transparent; border: 0; margin-bottom: 0; cursor: pointer; padding: 6px 13px; font-size: 12.5px; border-radius: 6px; color: var(--text-dim); }
.admin .adm-tabs button:hover { color: var(--text); }
.admin .adm-tabs button.active { background: var(--accent); color: var(--accent-fg); font-weight: 600; }

/* cards */
.admin .card { padding: 16px; border-radius: 10px; margin-bottom: 12px; }
.admin .card h3 { font-size: 14px; font-weight: 600; margin: 0 0 10px; }
.admin .card .muted, .admin .kv { font-size: 12px; color: var(--text-dim); }
.admin .kv strong { color: var(--text); font-weight: 600; }
.admin .sec-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--text-faint); margin: 0 0 10px; }

/* buttons — EDF small scale */
.admin .btn { padding: 5px 11px; font-size: 12px; font-weight: 600; border-radius: 7px; }
.admin .btn.sm { padding: 3px 9px; font-size: 11.5px; }

/* form controls */
.admin .field, .admin input, .admin select, .admin textarea { padding: 6px 9px; font-size: 12.5px; border-radius: 7px; }
.admin label { font-size: 12.5px; }

/* one-line control strip that wraps gracefully */
.admin .ctl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* subtle pill badges */
.admin .badge { font-size: 10.5px; font-weight: 600; padding: 2px 8px; }
.admin .badge.role { background: rgba(110,168,254,.14); color: var(--accent2); border-color: var(--accent2-dim); }

/* tables — EDF density + hover accent */
.admin table.dash { font-size: 13px; }
/* Hairline headers (design system: uppercase tracked, hairline rows) — no filled grey band. */
.admin table.dash th { background: transparent; padding: 6px 12px 9px; font-size: 10.5px; letter-spacing: .5px; border-bottom: 1px solid var(--border); color: var(--text-faint); }
.admin table.dash td { padding: 9px 12px; }
.admin table.dash tbody tr { transition: background .12s; }
.admin table.dash tbody tr:hover { background: color-mix(in srgb, var(--accent) 6%, transparent); box-shadow: inset 3px 0 0 var(--accent); }

/* chip (group/cohort mappings) */
.admin .chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: var(--bg-elev); border: 1px solid var(--border); color: var(--text-dim); }
.admin .chip a { color: var(--text-faint); }
.admin .chip a:hover { color: var(--bad); text-decoration: none; }

/* ---------- drill-down: clickable cells, inline expand rows, bulk bar ---------- */
.admin .tap-cell { cursor: pointer; }
.admin td.tap-cell { color: var(--accent); }
.admin tr.tap-cell:hover td, .admin td.tap-cell:hover { text-decoration: none; }
.admin .kpi.tap-cell { transition: border-color .12s, transform .08s; }
.admin .kpi.tap-cell:hover { border-color: var(--accent); transform: translateY(-1px); }
.admin tr.expanded > td { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.admin tr.exp-row > td { padding: 0; background: var(--bg-elev); box-shadow: inset 3px 0 0 var(--accent); }
.admin tr.exp-row:hover > td { background: var(--bg-elev); box-shadow: inset 3px 0 0 var(--accent); }
.admin .exp-inner { padding: 14px 16px; }
.admin .exp-inner table.dash { background: var(--bg-card); }
.admin td.selcell, .admin th.selcell { width: 30px; text-align: center; padding-right: 0; }
.admin .selcell input { cursor: pointer; }
.admin .bulk-bar { position: sticky; top: 8px; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; padding: 9px 12px; border-radius: 9px; background: var(--accent); color: var(--accent-fg); box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 30%, transparent); }
.admin .bulk-bar .kv { color: var(--accent-fg); opacity: .85; font-size: 12px; }
.admin .bulk-bar select.field, .admin .bulk-bar .btn { margin: 0; }
.admin .btn.ghost { background: transparent; border: 1px solid currentColor; color: inherit; }
.admin .field.sm, .admin select.field.sm { padding: 4px 7px; font-size: 12px; }
.admin .seg-mini-row { display: inline-flex; gap: 2px; border: 1px solid var(--border); border-radius: 7px; padding: 2px; }
.admin .seg-mini { background: transparent; border: 0; cursor: pointer; padding: 4px 10px; font-size: 12px; border-radius: 5px; color: var(--text-dim); }
.admin .seg-mini.active { background: var(--accent); color: var(--accent-fg); font-weight: 600; }

/* ---------- Due & recert (B4): sortable headers + group subheader rows ---------- */
.admin table.dash th.sortable { padding: 0; }
.admin .th-sort { background: transparent; border: 0; cursor: pointer; width: 100%; text-align: inherit; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; padding: 6px 12px 9px; border-radius: 5px; }
.admin .th-sort:hover, .admin table.dash th.sortable[aria-sort="ascending"] .th-sort, .admin table.dash th.sortable[aria-sort="descending"] .th-sort { color: var(--accent); }
.admin .th-sort:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.admin table.dash tbody tr.grp-row > td { background: var(--bg-elev); font-size: 12px; padding: 7px 12px; }
.admin table.dash tbody tr.grp-row:hover { background: var(--bg-elev); box-shadow: none; }

/* ---------- trends: sparklines + metric cards ---------- */
.admin .spark { display: inline-flex; align-items: flex-end; gap: 2px; vertical-align: bottom; }
.admin .spark-bar { width: 7px; min-height: 2px; border-radius: 2px 2px 0 0; display: inline-block; }
.admin .trend-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 860px) { .admin .trend-strip { grid-template-columns: 1fr 1fr; } }
.admin .trend-metric { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.admin .trend-metric .tm-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.admin .trend-metric .tm-n { font-size: 26px; font-weight: 800; line-height: 1; letter-spacing: -.5px; }
.admin .trend-metric .tm-l { color: var(--text-faint); font-size: 11px; margin: 6px 0 8px; text-transform: uppercase; letter-spacing: .5px; }

/* ---------- home: personal snapshot + search/filter toolbar ---------- */
.snapshot { display: grid; grid-template-columns: 1.3fr 1fr 1.3fr; gap: 14px; margin-top: 18px; }
@media (max-width: 820px) { .snapshot { grid-template-columns: 1fr; } }
.snap-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.snap-card.snap-continue { cursor: pointer; transition: border-color .14s, box-shadow .25s, transform .08s; }
.snap-card.snap-continue:hover { border-color: transparent; box-shadow: var(--shadow-gradient); transform: translateY(-1px); }
.snap-k { color: var(--text-faint); font-size: 11px; text-transform: uppercase; letter-spacing: .6px; font-weight: 700; margin-bottom: 10px; }
.snap-n { font-size: 34px; font-weight: 800; line-height: 1; letter-spacing: -1px; }
.snap-title { font-size: 16px; font-weight: 700; letter-spacing: -.2px; }
.snap-sub { color: var(--text-dim); font-size: 13px; margin-top: 4px; }
.snap-course { display: flex; gap: 12px; align-items: center; }
.snap-cta { margin-top: auto; padding-top: 12px; color: var(--accent-dim); font-weight: 700; font-size: 13.5px; }
.snap-link { display: inline-block; margin-top: auto; padding-top: 10px; font-size: 13px; }
.snap-recent { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 6px 0; font-size: 13.5px; border-bottom: 1px solid var(--border); }
.snap-recent:last-child { border-bottom: 0; }
.snap-recent .ok { color: var(--good); font-weight: 700; }
.snap-date { color: var(--text-faint); font-size: 12px; white-space: nowrap; }

/* compliance / overdue banner (design: tinted full-width band with icon tile + CTA) */
.overdue-banner {
  display: flex; align-items: center; gap: 16px; padding: 18px 22px; margin-top: 18px;
  border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--bad) 25%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--bad) 4%, transparent), color-mix(in srgb, var(--bad) 1.5%, transparent));
}
.overdue-banner .ob-ic {
  width: 44px; height: 44px; border-radius: 12px; flex: none; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--bad) 10%, transparent); color: var(--bad);
}
.overdue-banner .ob-main { flex: 1; min-width: 0; }
.overdue-banner .ob-title { font-weight: 700; font-size: 15.5px; color: color-mix(in srgb, var(--bad) 80%, var(--text)); }
.overdue-banner .ob-sub { font-size: 13.5px; color: var(--text-dim); margin-top: 3px; }
.overdue-banner .btn { flex: none; }

/* U7 — thin "resume where you left off" banner (top of Home). Accent-toned by default; warns
   when the most-actionable step is overdue. Dismissable per session. */
.resume-banner {
  display: flex; align-items: center; gap: 14px; padding: 11px 16px; margin-bottom: 16px;
  border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 7%, transparent), color-mix(in srgb, var(--accent) 3%, transparent));
}
.resume-banner.overdue {
  border-color: color-mix(in srgb, var(--bad) 30%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--bad) 7%, transparent), color-mix(in srgb, var(--bad) 2.5%, transparent));
}
.resume-banner .rb-ic {
  width: 34px; height: 34px; border-radius: 9px; flex: none; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent);
}
.resume-banner.overdue .rb-ic { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); }
.resume-banner .rb-main { flex: 1; min-width: 0; }
.resume-banner .rb-eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; font-weight: 800; color: var(--accent); }
.resume-banner.overdue .rb-eyebrow { color: var(--bad); }
.resume-banner .rb-reason { font-weight: 700; }
.resume-banner .rb-sub { font-size: 13.5px; font-weight: 600; color: var(--text); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resume-banner .btn { flex: none; }
.resume-banner .rb-x {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 999px; border: 1px solid var(--border);
  background: transparent; color: var(--text-dim); cursor: pointer; font-size: 12px; line-height: 1; display: grid; place-items: center;
}
.resume-banner .rb-x:hover { color: var(--text); border-color: var(--accent-dim); background: var(--bg); }
@media (max-width: 640px) {
  .resume-banner { flex-wrap: wrap; }
  .resume-banner .rb-main { flex: 1 1 60%; }
  .resume-banner .btn { order: 3; flex: 1 1 100%; justify-content: center; }
}

/* ---------- topbar search (design: ⌘K pill) ---------- */
.tb-search {
  display: flex; align-items: center; gap: 9px; height: 38px; padding: 0 12px; border-radius: 10px;
  background: var(--bg-elev); border: 1px solid var(--border); width: 280px; color: var(--text-faint);
}
.tb-search input { flex: 1; min-width: 0; border: none; background: transparent; color: var(--text); font-size: 13.5px; font-family: var(--font-body); outline: none; }
.tb-search input::placeholder { color: var(--text-faint); }
.tb-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.tb-kbd { font-size: 10.5px; font-family: var(--font-mono); color: var(--text-faint); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; background: var(--bg-card); white-space: nowrap; }
@media (max-width: 1100px) { .tb-search { width: 180px; } .tb-kbd { display: none; } }
@media (max-width: 760px) { .tb-search { display: none; } }

/* ---------- gradient category cover (design CoverArt) ---------- */
.cat-cover { background: none; }
.cat-cover::after { background: none; }
.cat-cover .cat-cover-bg { position: absolute; inset: 0; }
.cat-cover .cat-cover-bg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 100% at 85% 0%, rgba(255,255,255,.30), transparent 55%); }
/* right:0 (was -16px) keeps the decorative watermark's box inside the cover so it never
   measures past the viewport edge; the cover's overflow:hidden still trims the bottom bleed. */
.cat-cover .cat-watermark { position: absolute; right: 0; bottom: -18px; color: #fff; opacity: .25; pointer-events: none; }
.cat-cover .cat-watermark svg { display: block; }

/* ---------- catalog: category pills row ---------- */
.cat-pills { display: flex; gap: 8px; flex-wrap: wrap; border-bottom: 1px solid var(--border); padding: 4px 0 18px; margin-bottom: 22px; }
.cat-pill {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; cursor: pointer;
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-card);
  color: var(--text-dim); transition: background .14s, color .14s; font-family: var(--font-body); white-space: nowrap;
}
.cat-pill:hover { background: var(--bg-elev); color: var(--text); }
.cat-pill.active { background: var(--primary); border-color: transparent; color: var(--primary-fg); }
.cat-pill.active span, .cat-pill.active svg { color: var(--primary-fg) !important; }
.catalog-grid { grid-template-columns: repeat(auto-fill, minmax(288px, 1fr)); }

/* ---------- home spotlight grid ---------- */
.spot-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 24px; align-items: start; margin-top: 22px; }
.spot-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.spot-rail { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.spot-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.spot-row > .card { margin: 0; }
.sec-label { display: flex; align-items: center; justify-content: space-between; margin: 2px 2px 0; }
.sec-label h3 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.sec-label a { font-size: 13.5px; font-weight: 600; color: var(--accent-dim); }
@media (max-width: 1080px) { .spot-grid { grid-template-columns: 1fr; } .spot-row { grid-template-columns: 1fr; } }

/* "Your courses" — compact, scannable list of every active course the learner has access to */
.yc-section { margin-top: 30px; }
.yc-sub-lead { margin: 4px 2px 0; font-size: 13.5px; color: var(--text-faint); }
.yc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px; margin-top: 14px; }
.yc-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-card); text-decoration: none; color: inherit; transition: border-color .15s ease, transform .15s cubic-bezier(.22,1,.36,1), box-shadow .15s ease; }
.yc-row:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(18,18,18,.06); }
.yc-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.yc-body { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 1px; }
.yc-title { font-weight: 650; font-size: 14px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yc-sub { font-size: 12px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yc-pct { font-weight: 700; font-size: 13px; color: var(--accent-dim); flex: none; }
@media (prefers-reduced-motion: reduce) { .yc-row { transition: border-color .15s ease; } .yc-row:hover { transform: none; box-shadow: none; } }

/* large continue card (design ContinueCardLarge) */
.card.pad0.cont-card { flex-direction: row; min-height: 158px; }
.cc-art { width: 186px; flex: none; position: relative; display: flex; align-items: center; justify-content: center; color: #fff; }
.cc-art::after { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 90% at 80% 10%, rgba(255,255,255,.28), transparent 60%); }
.cc-art svg { position: relative; z-index: 1; opacity: .95; }
.cc-lvl { position: absolute; left: 13px; bottom: 12px; z-index: 1; }
.cc-lvl .badge { background: rgba(255,255,255,.93); color: #121212; border-color: transparent; }
.cc-body { flex: 1; min-width: 0; padding: 19px 22px; display: flex; flex-direction: column; }
.cc-body h3 { margin: 8px 0 0; font-size: 19px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.cc-next { font-size: 13px; color: var(--text-faint); margin-top: 6px; }
.cc-foot { display: flex; align-items: flex-end; gap: 16px; margin-top: auto; padding-top: 14px; }
.cc-prog { flex: 1; min-width: 0; }
.cc-prog-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-faint); margin-bottom: 6px; }
.cc-prog-row b { color: var(--text); font-weight: 600; }
@media (max-width: 640px) { .cont-card { flex-direction: column; } .cc-art { width: 100%; height: 110px; } }

/* right-rail cards */
.rail-card { padding: 18px 20px; }
.rail-head-row { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.rail-head-row h3 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.dl-item { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-radius: 10px; cursor: pointer; color: var(--text-faint); }
.dl-item:hover { background: var(--bg-elev); }
.dl-bar { width: 5px; height: 36px; border-radius: 3px; flex: none; }
.dl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dl-t { font-size: 13.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dl-when { font-size: 12px; font-weight: 600; }
.lbm-row { display: flex; align-items: center; gap: 10px; padding: 7px 6px; border-radius: 9px; }
.lbm-row.you { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.lbm-rank { width: 18px; text-align: center; font-family: var(--font-mono); font-weight: 700; font-size: 13px; color: var(--text-faint); flex: none; }
.lbm-name { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lbm-name em, .lb-pod-name em { font-style: normal; color: var(--accent-dim); font-weight: 600; }
.lbm-name small { display: block; font-size: 11.5px; color: var(--text-faint); font-weight: 400; }
.lbm-xp { font-family: var(--font-mono); font-weight: 600; font-size: 13px; color: var(--text); flex: none; }
.cb-row { display: flex; align-items: flex-start; gap: 14px; margin-top: 12px; }
.cb-name { font-weight: 700; font-size: 15px; }
.cb-desc { font-size: 12.5px; color: var(--text-dim); margin-top: 3px; line-height: 1.45; }

/* ---------- certifications page ---------- */
.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 20px; }
@media (max-width: 560px) { .cert-grid { grid-template-columns: 1fr; } }
.cert-card { display: flex; flex-direction: column; gap: 14px; }
.cert-card.locked { opacity: .72; }
.cert-top { display: flex; align-items: flex-start; gap: 13px; }
.cert-top h3 { margin: 4px 0 0; font-size: 17px; font-weight: 700; letter-spacing: -.015em; line-height: 1.22; }
.cert-top .badge { flex: none; margin-top: 2px; }
.cert-card p.desc { margin: 0; color: var(--text-dim); font-size: 13.5px; line-height: 1.55; }
.cert-meta { display: flex; border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent); padding: 12px 0; }
.cm-cell { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; border-right: 1px solid color-mix(in srgb, var(--border) 60%, transparent); color: var(--text-faint); }
.cm-cell:last-child { border-right: none; }
.cm-cell b { font-family: var(--font-mono); font-weight: 700; font-size: 16px; color: var(--text); }
.cm-cell span { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.cert-actions { display: flex; align-items: center; gap: 12px; }

/* ---------- badges page ---------- */
.badge-hero { overflow: hidden; }
.bh-inner { display: flex; align-items: center; gap: 30px; padding: 28px 32px; position: relative;
  background: linear-gradient(120deg, var(--bg-card), color-mix(in srgb, var(--accent) 5%, var(--bg-card))); flex-wrap: wrap; }
.bh-inner::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: radial-gradient(60% 120% at 90% 10%, color-mix(in srgb, #6EE0AB 10%, transparent), transparent 60%); }
.bh-inner h1 { margin: 8px 0 0; font-size: 30px; font-weight: 700; letter-spacing: -.03em; }
.bh-marks { display: flex; }
.bh-mark { display: inline-block; }
.bh-mark + .bh-mark { margin-left: -20px; }
.bh-count { text-align: center; position: relative; }
.bh-count .n { font-family: var(--font-mono); font-weight: 700; font-size: 38px; letter-spacing: -.03em; }
.bh-count .of { color: var(--text-faint); font-family: var(--font-mono); font-size: 16px; margin-left: 4px; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(122px, 1fr)); gap: 26px; justify-items: center; }
.badge-tile { display: flex; flex-direction: column; align-items: center; gap: 9px; text-align: center; cursor: pointer; transition: transform .2s var(--ease, ease); max-width: 140px; }
.badge-tile:hover { transform: translateY(-4px); }
.badge-tile.locked { opacity: .55; }
.bt-name { font-size: 12.5px; font-weight: 600; line-height: 1.25; color: var(--text); }
.badge-tile.locked .bt-name { color: var(--text-faint); }
.bt-sub { font-size: 10.5px; color: var(--text-faint); font-family: var(--font-mono); }
.badge-hex { width: 84px; height: 84px; display: grid; place-items: center; font-size: 34px; flex: none;
  clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
  background: linear-gradient(140deg, var(--accent), var(--accent2)); position: relative; }
.badge-hex > span { width: calc(100% - 7px); height: calc(100% - 7px); display: grid; place-items: center;
  clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%); background: var(--bg-card); }
.badge-hex.off { background: var(--border); }
.badge-hex.sm { width: 62px; height: 62px; font-size: 24px; }

/* ---------- leaderboard page ---------- */
.lb-podium { display: grid; gap: 16px; align-items: end; margin-bottom: 20px; }
.lb-pod { overflow: hidden; text-align: center; }
.lb-pod.you { border: 1.5px solid var(--accent); }
.lb-medal { height: 6px; }
.lb-pod.first .lb-medal { height: 8px; }
.lb-pod-body { padding: 22px 18px; }
.lb-pod.first .lb-pod-body { padding: 28px 18px 24px; }
.lb-ava { position: relative; display: inline-block; }
/* Rank digit sits on the light gold/silver/bronze medal fills — a dark digit reads in both
   themes (white was low-contrast on silver #C4CBD6 especially). (#106 dark-contrast fix 8.) */
.lb-rank-bubble { position: absolute; bottom: -4px; right: -4px; width: 25px; height: 25px; border-radius: 50%; border: 2.5px solid var(--bg-card);
  display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-weight: 700; font-size: 12.5px; color: #121212; }
.lb-pod-name { font-weight: 700; font-size: 15.5px; margin-top: 12px; letter-spacing: -.01em; }
.lb-pod.first .lb-pod-name { font-size: 17px; }
.lb-pod-pill { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 6px 13px; border-radius: 999px;
  background: var(--bg-elev); border: 1px solid var(--border); font-size: 12px; color: var(--text-dim); }
.lb-pod-pill b { font-family: var(--font-mono); font-weight: 700; font-size: 15px; color: var(--text); }
.lb-pod-pill i { width: 1px; height: 12px; background: var(--border); }
/* Leaderboard podium: the 3-up grid (set inline as 1fr 1.15fr 1fr) squeezes each column to
   ~110px on a phone, clipping the XP/level/streak pill (which needs ~145px) against .lb-pod's
   overflow:hidden. Stack the podium into one column on phones so each card is full-width and
   the pill fits; the !important overrides the inline grid-template-columns only here. */
@media (max-width: 560px) {
  .lb-podium { grid-template-columns: 1fr !important; gap: 12px; }
  .lb-pod-pill { flex-wrap: wrap; justify-content: center; }
}
.lb-list { padding: 8px; }
.lb-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; }
.lb-row.you { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.lb-row .lbm-rank { width: 26px; font-size: 15px; }
.lb-row .lbm-name { font-size: 14px; }
.lb-row .lbm-xp { font-size: 15px; width: 80px; text-align: right; }

/* ---------- my learning: kpi ring + transcript rows ---------- */
.kpi-ring { display: flex; align-items: center; gap: 16px; }
.kpi-sub { font-size: 12.5px; color: var(--text-dim); margin-top: 5px; }
.ring { position: relative; display: inline-grid; place-items: center; flex: none; }
.ring svg { grid-area: 1 / 1; }
.ring-inner { grid-area: 1 / 1; display: grid; place-items: center; font-family: var(--font-mono); font-weight: 700; font-size: 13px; }
.sn-lvl-n { font-size: 15px; }
.ts-list { overflow: hidden; }
.ts-row { display: flex; align-items: center; gap: 15px; padding: 15px 20px; cursor: pointer; border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent); color: var(--text-faint); }
.ts-row:last-child { border-bottom: none; }
.ts-row:hover { background: var(--bg-elev); }
.ts-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ts-title { font-size: 14.5px; font-weight: 600; color: var(--text); }
.ts-meta { font-size: 12.5px; color: var(--text-faint); }
.badge.req-mini { background: var(--primary); color: var(--primary-fg); border-color: transparent; font-size: 9px; padding: 1px 6px; vertical-align: 2px; }
.ts-prog { width: 132px; flex: none; display: flex; flex-direction: column; gap: 5px; }
.ts-pct { font-size: 11.5px; font-family: var(--font-mono); color: var(--text-dim); }
.ts-list .muted { display: block; padding: 26px 20px; }
@media (max-width: 760px) { .ts-prog { display: none; } }

.course-toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 26px 0 16px; }
.course-search { flex: 1; min-width: 220px; }
.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-btn { background: var(--bg-card); border: 1px solid var(--border); color: var(--text-dim); border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer; transition: color .14s, background .14s, border-color .14s; white-space: nowrap; }
.chip-btn:hover { color: var(--text); background: var(--bg-elev); }
.chip-btn.active { background: var(--primary); border-color: transparent; color: var(--primary-fg); }

/* ---------- catalog: U3 search + facet toolbar ---------- */
.catalog-toolbar { display: flex; flex-direction: column; gap: 14px; margin: 0 0 22px; }
.cat-search { position: relative; width: 100%; max-width: 520px; }
.cat-search-ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-faint); display: inline-flex; pointer-events: none; }
.cat-search-input {
  width: 100%; box-sizing: border-box; padding: 10px 14px 10px 38px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); font-size: 14px; font-family: var(--font-body); transition: border-color .14s, box-shadow .14s;
}
.cat-search-input::placeholder { color: var(--text-faint); }
.cat-search-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.cat-search-input::-webkit-search-cancel-button { cursor: pointer; }
.facet-bar { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.facet-group { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.facet-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-faint); margin-right: 2px; }
.facet-chip {
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text-dim);
  border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: color .14s, background .14s, border-color .14s; white-space: nowrap; font-family: var(--font-body);
}
.facet-chip:hover { color: var(--text); background: var(--bg-elev); }
.facet-chip.active { background: var(--accent); border-color: transparent; color: #fff; }
.catalog-toolbar-end { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cat-count { font-size: 13px; font-weight: 600; color: var(--text-faint); }
.cat-clear {
  display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 1px solid var(--border);
  color: var(--text-dim); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 600;
  cursor: pointer; font-family: var(--font-body); transition: color .14s, background .14s, border-color .14s;
}
.cat-clear:hover { color: var(--text); background: var(--bg-elev); border-color: var(--text-faint); }
@media (max-width: 480px) {
  .cat-search { max-width: none; }
  .facet-bar { gap: 8px 12px; }
  .catalog-toolbar-end { width: 100%; }
}

/* ---------- loading indicator (accessible; reduced-motion aware) ---------- */
.spinner { display: inline-block; width: 13px; height: 13px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: dfx-spin .7s linear infinite; vertical-align: -2px; margin-right: 7px; }
@keyframes dfx-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

/* ---------- "What's new" re-engagement modal (learner) ---------- */
.news-sec { margin-bottom: 14px; }
.news-sec:last-of-type { margin-bottom: 0; }
.news-h { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-faint); margin-bottom: 6px; }
.news-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--text); background: var(--bg-elev); }
.news-row:hover { border-color: var(--accent-dim); text-decoration: none; }
.news-row .news-x { font-size: 12px; font-weight: 500; color: var(--text-dim); white-space: nowrap; }

/* ---------- group-search autocomplete (Roles / Access) ---------- */
.ac-wrap { position: relative; display: inline-block; }
.ac-anchor { position: absolute; left: 0; top: 100%; z-index: 40; width: 320px; max-width: 80vw; }
.ac-menu { margin-top: 4px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); overflow: hidden; max-height: 320px; overflow-y: auto; }
.ac-hint { padding: 9px 12px; color: var(--text-dim); font-size: 12.5px; }
.ac-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--border); padding: 9px 12px; cursor: pointer; font-size: 13.5px; color: var(--text); }
.ac-item:last-child { border-bottom: 0; }
.ac-item:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.ac-item .ac-name { font-weight: 600; }
.ac-item .ac-id { color: var(--text-faint); font-size: 11px; font-variant-numeric: tabular-nums; }
.ac-item-row { cursor: default; }
.ac-item-row:hover { background: transparent; }
.ac-actions { display: inline-flex; gap: 6px; flex: 0 0 auto; }

/* ---------- course badges (typed base + centered pin) ---------- */
.badge-emblem { position: relative; display: inline-grid; place-items: center; vertical-align: middle; line-height: 0; }
.badge-emblem svg { display: block; filter: drop-shadow(0 3px 7px color-mix(in srgb, var(--accent) 32%, transparent)); }
.badge-emblem.img { display: inline-block; line-height: 0; }
.badge-emblem.img img { display: block; width: 100%; height: auto; filter: drop-shadow(0 3px 7px rgba(0,0,0,.40)); }
.badge-emblem .badge-pin { position: absolute; inset: 0; display: grid; place-items: center; line-height: 1; transform: translateY(-9%); }
.badge-emblem.locked { filter: grayscale(.9) opacity(.45); }
/* badge sits to the RIGHT of the course title, vertically centered to the text */
.course-cover { position: relative; }
.course .head .badge-emblem { flex: 0 0 auto; align-self: center; order: 2; }

/* locked / not-yet-available courses — separate section, no Start CTA */
.locked-section { margin-top: 26px; }
.lock-sub { font-weight: 600; font-size: 14px; color: var(--text-dim); }
.card.course.locked .course-cover { filter: saturate(.5) brightness(.66); }
.card.course.locked .cta { color: var(--text-dim); }
.unlock-note { margin-top: 10px; padding: 9px 12px; border-radius: 9px; font-size: 13px;
  background: color-mix(in srgb, var(--warn, #c98a00) 14%, transparent); color: var(--text); }
.unlock-note strong { color: var(--accent); font-weight: 700; }

/* ---------- admin grids: table-first tabs with expandable rows + popovers ---------- */
.admin-grid { width: 100%; }
.admin-grid td.num, .admin-grid th.num { text-align: right; }
.admin-grid .tap-cell { cursor: pointer; }
.admin-grid .tap-cell:hover { color: var(--accent); }
.admin-grid td.num.tap-cell:hover { text-decoration: underline; }
.sub-block { margin: 6px 0 14px; }
.sub-head { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; }
.sub-head strong { font-size: 13px; }
.sub-head .btn { margin-left: auto; }
.chk-inline { display: inline-flex; gap: 5px; align-items: center; font-size: 13px; white-space: nowrap; }
.modal-ov { position: fixed; inset: 0; background: rgba(8,6,20,.55); backdrop-filter: blur(2px); display: grid; place-items: center; z-index: 1000; padding: 20px; }
.modal-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; width: 100%; max-width: 460px; box-shadow: 0 24px 60px rgba(0,0,0,.4); max-height: 90vh; overflow: auto; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-body { padding: 16px; }
.modal-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--text-dim); margin-bottom: 10px; }
.modal-field .field { width: 100%; min-width: 0; font-weight: 400; box-sizing: border-box; }
.modal-row { display: flex; gap: 10px; flex-wrap: wrap; }
/* min-width:0 lets wide datetime-local inputs shrink inside the flex row instead of
   overflowing the modal (was causing a horizontal scrollbar); flex-basis keeps them paired
   when there's room and wraps them when there isn't. */
.modal-row .modal-field { flex: 1 1 200px; min-width: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.modal-list { max-height: 320px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
.modal-list-row { display: flex; align-items: center; gap: 8px; padding: 7px 10px; font-size: 13px; border-bottom: 1px solid var(--border); cursor: pointer; }
.modal-list-row:last-child { border-bottom: 0; }
.modal-list-row:hover { background: var(--bg-elev); }
.icon-btn { background: none; border: 0; cursor: pointer; font-size: 16px; color: var(--text-dim); line-height: 1; padding: 4px; }
.icon-btn:hover { color: var(--text); }
/* make the native date/time picker indicator visible + clickable (was washed out) */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator { opacity: .65; cursor: pointer; }
input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover { opacity: 1; }
.module-cover { position: relative; }
.module-cover .badge-emblem { position: absolute; right: 20px; bottom: -22px; }

/* ============================================================
   SELF-ASSESSED SKILLS (Phase 1) — panel on "My progress" + manage drawer.
   Level pill ramp (1→5) climbs the DFX5 palette as a progression cue:
   1 neutral slate · 2 blue (info) · 3 mint (brand) · 4 purple (brand) · 5 gold (mastery).
   Tints are color-mixed against --bg-card so they read in both light + dark themes.
============================================================ */
.skills-panel { margin-top: 22px; }
.skills-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.skills-count { margin: 10px 0 4px; font-weight: 600; }
.skills-group { margin-top: 14px; }
.skills-group-h { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 6px; }
.skills-group-dot { width: 8px; height: 8px; border-radius: 999px; flex: none; }
.skill-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); }
.skill-row:first-of-type { border-top: 0; }
.skill-name { font-weight: 600; font-size: 14px; color: var(--text); }
.skill-row .skill-name { flex: 1; min-width: 0; }
.skill-chips { display: inline-flex; gap: 6px; flex-wrap: wrap; }

/* Level pill — number + label, ramped color */
.skill-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 3px 9px 3px 7px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap; }
.skill-pill b { font-weight: 800; font-size: 11px; min-width: 13px; height: 13px; line-height: 13px; text-align: center; border-radius: 999px; background: rgba(0,0,0,.12); }
html.dark .skill-pill b { background: rgba(255,255,255,.16); }
.skill-pill.lvl-1 { background: color-mix(in srgb, var(--text-faint) 14%, var(--bg-card)); color: var(--text-dim); border-color: color-mix(in srgb, var(--text-faint) 30%, transparent); }
.skill-pill.lvl-2 { background: color-mix(in srgb, #3b82f6 14%, var(--bg-card)); color: color-mix(in srgb, #3b82f6 78%, var(--text)); border-color: color-mix(in srgb, #3b82f6 32%, transparent); }
.skill-pill.lvl-3 { background: color-mix(in srgb, var(--accent2) 0%, color-mix(in srgb, #3FBF87 16%, var(--bg-card))); color: color-mix(in srgb, #3FBF87 80%, var(--text)); border-color: color-mix(in srgb, #3FBF87 34%, transparent); }
.skill-pill.lvl-4 { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 34%, transparent); }
.skill-pill.lvl-5 { background: color-mix(in srgb, var(--star) 18%, var(--bg-card)); color: color-mix(in srgb, var(--star) 82%, var(--text)); border-color: color-mix(in srgb, var(--star) 40%, transparent); }

/* Evidence chips (Phase 1 = trained only; project/vouched future-ready) */
.skill-chip { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; letter-spacing: .02em; border: 1px solid transparent; }
.skill-chip.trained { background: var(--good-bg); color: var(--good); border-color: color-mix(in srgb, var(--good) 30%, transparent); }
.skill-chip.project { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.skill-chip.vouched { background: color-mix(in srgb, var(--star) 16%, var(--bg-card)); color: color-mix(in srgb, var(--star) 82%, var(--text)); border-color: color-mix(in srgb, var(--star) 36%, transparent); }

/* Empty state */
.skills-empty { text-align: center; padding: 26px 12px 18px; }
.skills-empty-title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.skills-empty .btn { margin-top: 12px; }

/* Manage-skills drawer — reuses .modal-ov; slides in from the right as a tall sheet */
.skills-drawer-ov { place-items: stretch; justify-content: flex-end; padding: 0; }
.skills-drawer { max-width: 520px; width: 100%; height: 100%; max-height: 100vh; border-radius: 0; border-right: 0; border-top: 0; border-bottom: 0; display: flex; flex-direction: column; }
.skills-drawer .modal-body { overflow: auto; flex: 1; }
.skills-drawer #skillsSearch { margin-bottom: 10px; }
.skill-cat-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.skill-cat-chip { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-dim); cursor: pointer; }
.skill-cat-chip:hover { color: var(--text); background: var(--bg-elev); }
.skill-cat-chip.active { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 34%, transparent); }
.skills-drawer-body { display: flex; flex-direction: column; }

.skill-edit-row { padding: 10px 0; border-top: 1px solid var(--border); }
.skill-edit-row:first-child { border-top: 0; }
.skill-edit-main { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.skill-edit-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.skill-edit-meta { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-faint); }
.skill-edit-cur { font-size: 12px; font-weight: 700; color: var(--text-dim); white-space: nowrap; }
.skill-edit-cur.none { color: var(--text-faint); font-weight: 600; }

/* Segmented level control: 1·2·3·4·5 + Clear */
.skill-seg { display: flex; gap: 5px; margin-top: 8px; flex-wrap: wrap; }
.skill-seg-btn { width: 34px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text-dim); font-weight: 700; font-size: 13px; cursor: pointer; font-family: var(--font-body); }
.skill-seg-btn:hover { color: var(--text); border-color: var(--accent); }
.skill-seg-btn.active { background: var(--accent); color: var(--accent-fg); border-color: transparent; }
.skill-seg-clear { height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border); background: transparent; color: var(--text-faint); font-weight: 600; font-size: 12.5px; cursor: pointer; font-family: var(--font-body); margin-left: auto; }
.skill-seg-clear:hover:not(:disabled) { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.skill-seg-clear:disabled { opacity: .4; cursor: default; }

/* Rubric helper block (revealed when a row is focused/expanded) */
.skill-rubric { margin-top: 10px; padding: 12px 14px; border-radius: var(--radius-md); background: var(--bg-elev); border: 1px solid var(--border); }
.skill-rubric-lvl { margin-bottom: 8px; }
.skill-rubric dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; }
.skill-rubric dt { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--text-faint); white-space: nowrap; }
.skill-rubric dd { margin: 0; font-size: 13px; color: var(--text-dim); line-height: 1.45; }

/* Level legend — always-visible 1..5 pill strip + expandable full rubric.
   Lives below the drawer subtitle (full, with toggle) and in the read-panel header (compact). */
.skill-legend { box-sizing: border-box; max-width: 100%; margin: 0 0 12px; padding: 10px 12px; border-radius: var(--radius-md); background: var(--bg-elev); border: 1px solid var(--border); }
.skill-legend-compact { margin: 10px 0 0; padding: 8px 10px; background: transparent; }
.skill-legend-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.skill-legend-h { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--text-faint); }
.skill-legend-pills { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.skill-legend-toggle { margin-top: 8px; padding: 0; border: 0; background: transparent; color: var(--accent); font-weight: 700; font-size: 12.5px; cursor: pointer; font-family: var(--font-body); }
.skill-legend-toggle:hover { text-decoration: underline; }
.skill-legend-detail { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.skill-legend-detail .skill-rubric { margin-top: 0; }

@media (max-width: 560px) {
  .skills-drawer { max-width: 100%; }
  .skill-rubric dl { grid-template-columns: 1fr; gap: 1px; }
  .skill-rubric dd { margin-bottom: 6px; }
}

/* Mobile (≤480px): keep the drawer body free of horizontal overflow at ~360px.
   Category-filter chips wrap cleanly; the 1..5 + Clear segment fits the row (Clear wraps
   to its own line instead of being pushed off-screen by margin-left:auto); long skill names
   wrap rather than forcing the row past 100%. */
@media (max-width: 480px) {
  .skills-drawer .modal-body { overflow-x: hidden; }
  .skill-cat-chips { gap: 5px; }
  .skill-cat-chip { padding: 4px 9px; font-size: 11.5px; max-width: 100%; }
  .skill-edit-row { min-width: 0; }
  .skill-edit-main { gap: 8px; }
  .skill-edit-info { min-width: 0; flex: 1 1 auto; }
  .skill-edit-info .skill-name { white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
  .skill-edit-cur { flex: 0 0 auto; }
  /* Let Clear sit inline and wrap with the number buttons rather than being shoved to the
     far right (where it clipped to "Cl" at 360px). */
  .skill-seg { gap: 6px; }
  .skill-seg-clear { margin-left: 0; }
  .skill-seg-btn { width: 32px; height: 30px; font-size: 12.5px; }
  .skill-seg-clear { height: 30px; padding: 0 10px; }
  .skill-legend { padding: 9px 10px; }
  .skill-legend-pills { gap: 5px; }
}

/* theme toggle (design: 38px square icon buttons, 10px radius) */
.theme-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-dim); cursor: pointer; font-size: 16px; line-height: 1; flex: 0 0 38px; }
.theme-btn:hover { color: var(--text); background: var(--bg-elev); }
.lang-btn { display: grid; place-items: center; height: 38px; min-width: 42px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-dim); cursor: pointer; font-size: 12px; font-weight: 700; letter-spacing: .04em; line-height: 1; }
/* E2 — notification bell */
.bell { position: relative; }
.bell-btn { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-dim); cursor: pointer; font-size: 16px; line-height: 1; flex: 0 0 38px; }
.bell-btn:hover { color: var(--text); background: var(--bg-elev); }
.bell-badge { position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--danger, #dc2626); color: #fff; font-size: 10px; font-weight: 800; line-height: 16px; text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.admin-bell .bell-btn { color: var(--accent, #806ee1); }
.admin-bell .bell-badge { background: var(--warn, #d97706); }
.bell-menu { min-width: 280px; max-width: 320px; max-height: 70vh; overflow-y: auto; padding: 6px; }
.bell-menu .notif-top { padding: 6px 10px 8px; font-weight: 700; font-size: 13.5px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
/* E4 — Question of the day (dashboard) */
.qotd { border-left: 3px solid var(--accent); }
.qotd-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.qotd-dismiss { margin-left: 4px; flex: 0 0 auto; width: 26px; height: 26px; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--text-dim); cursor: pointer; font-size: 13px; line-height: 1; display: grid; place-items: center; }
.qotd-dismiss:hover { color: var(--text); border-color: var(--accent-dim); background: var(--bg); }
.qotd-eyebrow { font-weight: 800; color: var(--accent); letter-spacing: .01em; }
.qotd-sub { margin: 4px 0 14px; font-size: 13px; }
.qotd-q { font-weight: 600; font-size: 16px; margin-bottom: 12px; }
.qotd-opts { display: grid; gap: 8px; }
.qotd-opt { display: flex; gap: 10px; align-items: flex-start; text-align: left; width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-card); color: var(--text); cursor: pointer; font: inherit; transition: border-color .12s, background .12s; }
.qotd-opt:hover:not(:disabled) { border-color: var(--accent-dim); }
.qotd-opt:disabled { cursor: default; }
.qotd-opt.correct { border-color: var(--good); background: var(--good-bg); color: var(--good); }
.qotd-opt.wrong { border-color: var(--bad); background: var(--bad-bg); color: var(--bad); }
.qotd-letter { font-weight: 800; flex: 0 0 auto; min-width: 1.1em; }
.qotd-explain { margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--border); }
.qotd-verdict { font-weight: 800; margin-bottom: 6px; }
.qotd-verdict.ok { color: var(--good); }
.qotd-verdict.no { color: var(--bad); }
.qotd-why { font-size: 14px; line-height: 1.5; }
.qotd-more { display: inline-block; margin-top: 10px; color: var(--accent); font-weight: 600; }
/* U1 — practice streak chip (warm/gold tone, theme-safe) + open-day nudge */
.qotd-streak {
  display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto;
  padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; line-height: 1.4;
  color: color-mix(in srgb, var(--star) 78%, var(--text));
  background: color-mix(in srgb, var(--star) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--star) 32%, transparent);
}
.qotd-nudge { margin: -8px 0 12px; font-size: 12.5px; font-weight: 600; color: var(--warn); }
.notif-sec { margin-top: 4px; }
.notif-h { padding: 6px 10px 2px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-dim); }
.notif-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 7px; color: var(--text); text-decoration: none; font-size: 13.5px; }
.notif-row:hover { background: var(--bg-elev); text-decoration: none; }
.notif-c { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-x { flex: 0 0 auto; font-size: 11.5px; color: var(--text-dim); font-weight: 600; }
.notif-x.urgent { color: var(--danger, #dc2626); }
.notif-empty { padding: 14px 10px; text-align: center; color: var(--text-dim); font-size: 13px; }
.lang-btn:hover { color: var(--text); border-color: var(--accent-dim); }
.dev-switch { height: 32px; border-radius: 999px; border: 1px dashed var(--accent-dim); background: var(--bg-card); color: var(--text-dim); font-size: 12px; padding: 0 8px; cursor: pointer; max-width: 180px; }
/* A11y: visible keyboard focus everywhere (cards, nav, fields, buttons) + anchor nav. */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
a.navlink { text-decoration: none; }
.field:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ============================================================
   Course Kit — reusable course landing + presentation components
   (ported from the DFX5 marketing / console / slide UI kits)
============================================================ */
.kit-hero { position: relative; overflow: hidden; border-radius: var(--radius); margin: 10px 0 6px; padding: 34px 32px; }
/* Full-bleed base wash so the whole banner (incl. corners) is painted; the blurred
   blobs add organic richness on top. Deck slides sit on a card → wash blends to --bg-card. */
.kit-mesh { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: inherit;
  background:
    radial-gradient(95% 130% at 10% -15%, color-mix(in srgb, #806ee1 22%, transparent), transparent 58%),
    radial-gradient(95% 130% at 90% -15%, color-mix(in srgb, #e0d26e 20%, transparent), transparent 58%),
    radial-gradient(120% 130% at 50% -25%, color-mix(in srgb, #6ee0ab 12%, transparent), transparent 62%),
    var(--bg-card); }
/* Hero is a contained banner: radials anchored at the corners + a light base so the
   wash reaches every edge & corner (no pale top/sides). */
.kit-hero .kit-mesh { background:
    radial-gradient(120% 150% at 0% 0%, color-mix(in srgb, #806ee1 26%, transparent), transparent 60%),
    radial-gradient(120% 150% at 100% 0%, color-mix(in srgb, #e0d26e 22%, transparent), transparent 60%),
    radial-gradient(140% 150% at 100% 100%, color-mix(in srgb, #e07d6e 16%, transparent), transparent 60%),
    radial-gradient(140% 150% at 0% 100%, color-mix(in srgb, #6ee0ab 16%, transparent), transparent 60%),
    var(--bg-elev); }
.kit-mesh i { position: absolute; width: 320px; height: 320px; border-radius: 50%; filter: blur(120px); opacity: .18; }
html.dark .kit-mesh i { opacity: .24; }
.kit-hero-inner { position: relative; display: flex; gap: 28px; align-items: center; }
.kit-hero-text { flex: 1; min-width: 0; }
.kit-hero-title { font-size: 44px; line-height: 1.04; letter-spacing: -1.4px; font-weight: 800; margin: 12px 0 14px; }
.kit-hero-tagline { color: var(--text-dim); font-size: 17px; line-height: 1.55; margin: 0 0 18px; max-width: 580px; }
.kit-hero-art { flex: 0 0 280px; height: 168px; border-radius: 20px; border: 1px solid var(--border); background: var(--bg-elev) center / cover no-repeat; display: flex; align-items: flex-start; justify-content: flex-end; padding: 12px; box-shadow: var(--shadow); }
@media (max-width: 760px) { .kit-hero-inner { flex-direction: column; align-items: stretch; } .kit-hero-art { flex: none; width: 100%; } .kit-hero-title { font-size: 32px; } }

.kit-eyebrow { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--text-faint); }
.kit-grad { background: var(--brand-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

.kit-section { margin: 26px 0 4px; }
.kit-section-tight { margin: 14px 0; }
.kit-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 760px) { .kit-grid-3 { grid-template-columns: 1fr; } }

.kit-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); transition: box-shadow .3s var(--ease, cubic-bezier(.4,0,.2,1)), border-color .3s; }
.kit-card:hover { border-color: transparent; box-shadow: var(--shadow-gradient); }
.kit-card.tap { cursor: pointer; }
.kit-card-pad { padding: 22px; }
.kit-card-h { font-size: 18px; font-weight: 600; letter-spacing: -.01em; margin: 14px 0 6px; }
.kit-card-b { color: var(--text-dim); font-size: 14px; line-height: 1.55; margin: 0; }
.kit-icontile { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--bg-elev); color: var(--text-dim); }
.kit-icontile.grad { background: var(--brand-gradient); color: #fff; }

.kit-stats { display: flex; gap: 44px; flex-wrap: wrap; padding: 6px 2px; }
.kit-stat-n { font-size: 42px; font-weight: 800; letter-spacing: -.03em; line-height: 1; background: var(--brand-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kit-stat-l { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); margin-top: 8px; }

.kit-step { padding-top: 18px; border-top: 2px solid var(--text); }
.kit-step-n { font-family: var(--font-mono, monospace); font-size: 14px; font-weight: 500; margin-bottom: 10px; background: var(--brand-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---- Slide-deck lesson (Course Kit) ---- */
.kit-deck { position: relative; width: 100%; aspect-ratio: 16 / 9; margin: 14px 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--bg-card); box-shadow: var(--shadow); }
.kit-slide { position: absolute; inset: 0; display: none; flex-direction: column; justify-content: center; padding: clamp(24px, 5vw, 64px); overflow-y: auto; }
.kit-slide.active { display: flex; animation: kit-slide-in .28s var(--ease, ease); }
@keyframes kit-slide-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.kit-slide-c { position: relative; max-width: 900px; }
.kit-slide-c.center { text-align: center; margin: 0 auto; }
.kit-slide-h1 { font-size: clamp(30px, 5.2vw, 60px); font-weight: 800; letter-spacing: -.03em; line-height: 1.04; margin: 10px 0 16px; }
.kit-slide-title { font-size: clamp(24px, 3.6vw, 42px); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin: 10px 0 6px; }
.kit-slide-bignum { font-size: clamp(56px, 11vw, 132px); font-weight: 800; letter-spacing: -.04em; line-height: .9; }
.kit-slide-body { font-size: clamp(15px, 1.7vw, 19px); color: var(--text-dim); line-height: 1.6; max-width: 640px; margin: 6px 0 0; }
.kit-slide-rich { max-width: 800px; }
.kit-slide-rich p { margin: 0 0 10px; }
.kit-slide-rich ul, .kit-slide-rich ol { margin: 0 0 10px; padding-left: 22px; }
.kit-slide-rich li { margin: 2px 0; }
.kit-slide-rich h4 { font-size: 1.04em; font-weight: 700; color: var(--text); margin: 14px 0 6px; }
.kit-slide-rich strong { color: var(--text); }
.kit-slide-rich a { color: var(--accent-dim); }
.kit-slide-c.center .kit-slide-body { margin-left: auto; margin-right: auto; }
.kit-bullets { margin: 18px 0 0; padding-left: 22px; }
.kit-bullets li { font-size: clamp(15px, 1.8vw, 19px); line-height: 1.7; color: var(--text); }
.kit-quote { font-size: clamp(24px, 3.4vw, 40px); font-weight: 700; letter-spacing: -.02em; line-height: 1.25; max-width: 880px; }
.kit-quote-by { margin-top: 22px; color: var(--text-dim); font-size: 15px; font-weight: 600; }
.kit-agenda { list-style: none; margin: 22px 0 0; padding: 0; }
.kit-agenda li { display: flex; align-items: baseline; gap: 16px; font-size: clamp(16px, 2vw, 22px); font-weight: 600; padding: 10px 0; border-bottom: 1px solid var(--border); }
.kit-agenda-n { font-family: var(--font-mono, monospace); font-size: .8em; font-weight: 700; }
.kit-deck-nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kit-dots { display: inline-flex; gap: 6px; }
.kit-dots span { width: 8px; height: 8px; border-radius: 999px; background: var(--border); cursor: pointer; transition: background .2s, transform .2s; }
.kit-dots span.on { background: var(--accent); transform: scale(1.25); }

/* ---- Chat / console lesson (Course Kit) ---- */
.kit-chat { margin: 14px 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); overflow: hidden; box-shadow: var(--shadow-sm); }
.kit-chat-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 600; background: var(--bg-elev); }
.kit-livedot { width: 8px; height: 8px; border-radius: 999px; background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 25%, transparent); }
.kit-chat-thread { padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; max-height: 460px; overflow-y: auto; }
.kit-msg { display: flex; gap: 10px; align-items: flex-end; max-width: 78%; }
.kit-msg.right { margin-left: auto; flex-direction: row-reverse; }
.kit-msg-sys { align-self: center; text-align: center; max-width: 90%; font-size: 12.5px; color: var(--text-faint); background: var(--bg-elev); border: 1px solid var(--border); border-radius: 999px; padding: 4px 14px; }
.kit-avatar { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--bg-elev); color: var(--text-dim); border: 1px solid var(--border); }
.kit-avatar.grad { background: var(--brand-gradient); color: #fff; border: none; }
.kit-bubble { padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.5; }
.kit-bubble .kit-msg-name { font-size: 11px; font-weight: 700; opacity: .7; margin-bottom: 2px; }
.kit-bubble.customer { background: var(--bg-elev); color: var(--text); border-bottom-left-radius: 5px; }
.kit-bubble.ai { background: var(--brand-gradient); color: #fff; border-bottom-left-radius: 5px; }
.kit-bubble.human { background: var(--primary); color: var(--primary-fg); border-bottom-right-radius: 5px; }
.kit-chat-foot { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); background: var(--bg-elev); flex-wrap: wrap; }
.kit-choices { display: flex; gap: 8px; flex-wrap: wrap; width: 100%; }
.kit-choices .btn { flex: 1; min-width: 180px; }

/* ---- Branded export deck (Course Kit) ---- */
.deck-toolbar { display: flex; align-items: center; gap: 10px; margin: 18px 0 14px; }
.deck-export { display: flex; flex-direction: column; gap: 18px; }
.deck-page .kit-deck { margin: 0; }
/* Export pages must NEVER clip — 16/9 becomes a *minimum* height, not a cage. The
   slide flows in normal layout so the page grows to fit (e.g. stacked cards on narrow
   screens) instead of cutting content off top & bottom. */
/* The slide must FILL the deck (flex:1) so the gradient mesh reaches every edge — no
   gap at the top/corners — while the deck still grows to fit tall content.
   overflow:hidden keeps the mesh clipped to the rounded corners. */
.deck-export .kit-deck { aspect-ratio: auto; min-height: clamp(360px, 52vw, 560px); overflow: hidden; display: flex; flex-direction: column; }
.deck-export .kit-slide { position: relative; inset: auto; overflow: visible; flex: 1 1 auto; min-height: 0; }
@media print {
  /* keep brand gradients/backgrounds in the printed PDF (default drops them) */
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  header.top, .site-foot, .toast, .deck-toolbar { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .deck-export { gap: 0; }
  .deck-page { break-after: page; page-break-after: always; }
  .deck-page:last-child { break-after: auto; page-break-after: auto; }
  /* overflow:visible + top-align so tall slides (e.g. the contents list) print every
     line instead of being centre-clipped top & bottom inside a 100vh page. */
  .deck-export .kit-deck { border: none; border-radius: 0; box-shadow: none; min-height: 100vh; overflow: visible; }
  .deck-export .kit-slide { overflow: visible; justify-content: flex-start; padding-top: clamp(40px, 8vh, 96px); }
  /* gradient-clipped text prints invisible (transparent fill) — force a solid accent */
  .deck-export .kit-grad,
  .deck-export .kit-stat-n,
  .deck-export .kit-agenda-n,
  .deck-export .kit-slide-bignum { -webkit-text-fill-color: var(--accent) !important; color: var(--accent) !important; background: none !important; }
  @page { size: landscape; margin: 0; }
}

/* ---- Lesson knowledge-check quiz (Course Kit) ---- */
.lesson-quiz .lq-q { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.lesson-quiz .lq-q:first-of-type { border-top: 0; padding-top: 0; }
.lesson-quiz .qtext { font-weight: 600; }
.lesson-quiz .options { gap: 8px; }

/* ---- Certificate ---- */
.cert-sheet { display: flex; justify-content: center; }
.cert-frame { width: 100%; max-width: 820px; aspect-ratio: 1.414 / 1; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; padding: clamp(28px, 5vw, 56px); position: relative; overflow: hidden;
  box-shadow: 0 20px 60px color-mix(in srgb, var(--accent) 14%, transparent); }
.cert-frame::before { content: ''; position: absolute; inset: 14px; border: 2px solid color-mix(in srgb, var(--accent) 30%, transparent); border-radius: 8px; pointer-events: none; }
.cert-head { display: flex; justify-content: space-between; align-items: flex-start; }
.cert-mark { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .2px; }
.cert-eyebrow { margin-top: clamp(14px, 3vh, 34px); text-transform: uppercase; letter-spacing: 3px; font-size: 13px; color: var(--accent); font-weight: 700; }
.cert-awarded { color: var(--text-dim); margin-top: 14px; }
.cert-name { font-size: clamp(30px, 5vw, 46px); margin: 6px 0; line-height: 1.05; }
.cert-course { font-size: clamp(18px, 2.6vw, 26px); margin: 6px 0; color: var(--text); }
.cert-meta { color: var(--text-dim); margin: 6px 0 0; }
.cert-foot { display: flex; gap: clamp(20px, 5vw, 60px); margin-top: clamp(20px, 5vh, 48px); flex-wrap: wrap; }
.cert-foot-l { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-faint); }
.cert-foot-v { font-weight: 700; margin-top: 2px; }
.cert-foot-v.mono { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .5px; }
.cert-verify { position: absolute; bottom: clamp(20px, 4vh, 34px); left: 0; right: 0; text-align: center; font-size: 11px; color: var(--text-faint); }
.only-print { display: none; }
@media print {
  header.top, .no-print { display: none !important; }
  .only-print { display: block !important; }
  .cert-frame { box-shadow: none; border: none; aspect-ratio: auto; min-height: 92vh; }
}

/* ---- Rich content lesson types (video / audio / interactive) ---- */
.video-card, .audio-card { padding: 14px; }
.video-wrap { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 10px; overflow: hidden; }
.video-wrap iframe, .video-wrap video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.transcript { margin-top: 12px; max-height: 320px; overflow-y: auto; padding: 4px 6px; border-top: 1px solid var(--border); }
.transcript .tr-p { margin: 6px 0; color: var(--text-dim); transition: color .15s, background .15s; padding: 4px 8px; border-radius: 6px; }
.transcript .tr-p.on { color: var(--text); background: var(--accent-soft); font-weight: 500; }
.interactive-card { padding: 18px; }
.match-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.match-col { display: flex; flex-direction: column; gap: 8px; }
.match-item { text-align: left; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-card); color: var(--text); cursor: pointer; font-size: 14px; }
.match-item:hover:not(:disabled) { border-color: var(--accent-dim); }
.match-item.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.match-item.ok { border-color: var(--good); background: var(--good-bg); color: var(--good); cursor: default; }
.match-item.bad { border-color: var(--bad); background: var(--bad-bg); }

/* Lab / workshop lesson (type === 'lab') */
.lesson-tag { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; vertical-align: middle; margin-left: 6px; }
.lesson-tag.lab { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-dim); }
.lab-goal { font-size: 15px; color: var(--text); margin: 2px 0 14px; }
.lab-prereqs { margin-top: 14px; }
.lab-prereqs ul { margin: 0; padding-left: 20px; }
.lab-steps { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.lab-step { display: flex; gap: 14px; align-items: flex-start; }
.lab-step-ix { flex: 0 0 30px; height: 30px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.lab-step-main { flex: 1; min-width: 0; }
.lab-io { margin: 12px 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.lab-io-label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 5px 12px; color: var(--text-dim); background: var(--bg-elev); border-bottom: 1px solid var(--border); }
.lab-io pre { margin: 0; padding: 12px; overflow-x: auto; background: var(--bg-code, var(--bg-elev)); }
.lab-io pre code { font-size: 13px; line-height: 1.55; background: none; border: none; padding: 0; color: var(--text); white-space: pre; }
.lab-io.cmd .lab-io-label { color: var(--accent); }
.lab-io.expect .lab-io-label { color: var(--good); }
.lab-shot { margin: 12px 0; }
.lab-shot img { max-width: 100%; border: 1px solid var(--border); border-radius: 8px; display: block; }
.lab-shot figcaption { font-size: 12px; color: var(--text-dim); margin-top: 6px; }
.lab-cp { margin-top: 10px; font-weight: 600; }
.lab-challenge { margin-top: 14px; border-left: 3px solid var(--accent); }
.lab-hint { margin-top: 8px; }
.lab-hint summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.lab-teardown { margin-top: 14px; border-left: 3px solid var(--bad); }
.lab-status { margin-top: 14px; }

/* Exam layout (design): white question card + sticky right-rail navigator */
.exam-grid { display: grid; grid-template-columns: 1fr 264px; gap: 24px; align-items: start; margin-top: 18px; }
.exam-card { padding: 26px 30px; margin-top: 18px; }
.exam-grid .exam-card { margin-top: 0; }
.exam-rail { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 14px; }
.exam-rail .q-nav { margin: 0; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); box-shadow: var(--shadow-sm); }
.q-eyebrow { font-size: 11.5px; font-weight: 700; color: var(--accent-dim); text-transform: uppercase; letter-spacing: .07em; }
@media (max-width: 980px) { .exam-grid { grid-template-columns: 1fr; } .exam-rail { position: static; } }

/* Exam: flag-for-review, report-a-problem, question navigator */
.q-flag, .q-report { font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-dim); cursor: pointer; }
.q-flag:hover, .q-report:hover { border-color: var(--accent-dim); color: var(--text); }
.q-flag.on { background: var(--warn-bg); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.q-report:hover { border-color: var(--bad); color: var(--bad); }
.q-report-quote { margin: 0 0 12px; padding: 10px 12px; border-left: 3px solid var(--accent); background: var(--bg-elev); border-radius: 0 8px 8px 0; font-size: 13.5px; color: var(--text); }
.q-nav { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.q-nav-legend { font-size: 13px; color: var(--text-dim); margin-bottom: 10px; }
.q-nav-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 8px; }
.q-cell { position: relative; aspect-ratio: 1; min-height: 40px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg-card); color: var(--text-faint); font-weight: 700; font-size: 14px; font-family: var(--font-mono); cursor: pointer; }
.q-cell:hover { border-color: var(--accent-dim); color: var(--text); }
.q-cell.answered { background: var(--primary); color: var(--primary-fg); border-color: transparent; }
.q-cell.current { border: 2px solid var(--accent); }
.q-cell.answered.current { outline: 2px solid var(--accent); outline-offset: 1px; border: none; }
.q-cell.flagged::after { content: ''; position: absolute; top: 4px; right: 4px; width: 7px; height: 7px; border-radius: 999px; background: var(--warn); }
code.qid { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; font-size: 12px; }

/* Learning paths band (home) */
.learning-paths { margin-top: 26px; }
.lp-path { border: 1px solid var(--border); border-radius: 12px; background: var(--bg-card); padding: 14px 16px; margin-bottom: 12px; }
.lp-title { font-weight: 700; font-size: 14px; margin-bottom: 10px; color: var(--text); }
.lp-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lp-col { display: flex; flex-direction: column; gap: 6px; }  /* >1 node = a parallel fan-out stage */
.lp-step { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-elev); font-size: 13px; font-weight: 600; color: var(--text); max-width: 280px; }
.lp-step[role="link"] { cursor: pointer; }
.lp-step[role="link"]:hover { border-color: var(--accent-dim); }
.lp-step .lp-ic { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--bg-card); border: 1px solid var(--border); flex: 0 0 20px; }
.lp-step .lp-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-step.done { border-color: color-mix(in srgb, var(--good) 40%, transparent); background: var(--good-bg); color: var(--good); }
.lp-step.done .lp-ic { background: var(--good); color: #fff; border-color: var(--good); }
.lp-step.current { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.lp-step.current .lp-ic { background: var(--accent); color: #fff; border-color: var(--accent); }
.lp-step.locked { color: var(--text-dim); opacity: .8; }
.lp-arrow { color: var(--text-dim); font-weight: 700; }

/* ============================================================
   CP1 — Career paths: home band + path-detail page (Skill-Builder-style)
============================================================ */
.cp-band { margin: 26px 0; }
.cp-band-sub { margin: -4px 0 12px; font-size: 13px; }
.cp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.cp-card { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 12px; background: var(--bg-card); color: var(--text); text-decoration: none; transition: border-color .12s, transform .08s, box-shadow .12s; }
.cp-card:hover { border-color: var(--accent-dim); transform: translateY(-2px); box-shadow: 0 6px 22px rgba(0,0,0,.10); }
.cp-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cp-eyebrow { font-weight: 800; color: var(--accent); font-size: 12px; letter-spacing: .02em; }
.cp-title { margin: 0; font-size: 17px; }
.cp-desc { margin: 0; color: var(--text-dim); font-size: 13.5px; line-height: 1.45; }
.cp-bar { height: 6px; border-radius: 999px; background: var(--track, rgba(128,110,225,.16)); overflow: hidden; }
.cp-bar > i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.cp-cta { color: var(--accent); font-weight: 700; font-size: 13px; }

.path-hero { padding: 22px 24px; border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 14px; background: var(--bg-card); }
.path-hero h1 { margin: 6px 0 6px; }
.path-eyebrow { font-weight: 800; color: var(--accent); letter-spacing: .02em; }
.path-progress { display: flex; align-items: center; gap: 12px; margin-top: 14px; max-width: 520px; }
.pp-bar { flex: 1; height: 9px; border-radius: 999px; background: var(--track, rgba(128,110,225,.16)); overflow: hidden; }
.pp-bar > i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.pp-label { font-size: 13px; font-weight: 600; color: var(--text-dim); white-space: nowrap; }

.path-list { display: grid; gap: 10px; }
.path-tile { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-card); color: var(--text); text-decoration: none; transition: border-color .12s, transform .08s; }
.path-tile:hover { border-color: var(--accent-dim); transform: translateX(2px); }
.path-tile.capstone { border-style: dashed; border-color: var(--accent-dim); background: var(--accent-soft); }
.path-tile.done .pt-num { background: var(--good); color: #fff; border-color: var(--good); }
.pt-num { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center; font-weight: 800; border: 1px solid var(--border); color: var(--text-dim); background: var(--bg); }
.path-tile.capstone .pt-num { background: var(--accent); color: #fff; border-color: var(--accent); }
.pt-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pt-title { font-weight: 600; }
.pt-meta { font-size: 12px; color: var(--text-dim); }
.pt-bar { height: 5px; border-radius: 999px; background: var(--track, rgba(128,110,225,.16)); overflow: hidden; margin-top: 2px; max-width: 360px; }
.pt-bar > i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.pt-state { flex: 0 0 auto; font-size: 12.5px; font-weight: 600; color: var(--text-dim); white-space: nowrap; }

/* Ramp-up guide — external-resource tiles. A <div> (not a link): it holds an Open↗ link, a
   self-attest Mark-complete toggle, and an optional proof input, so it doesn't translate on hover. */
.path-tile.resource { cursor: default; align-items: flex-start; }
.path-tile.resource:hover { transform: none; border-color: var(--border); }
.path-tile.resource.done { border-color: color-mix(in srgb, var(--good) 35%, var(--border)); }
.path-tile.resource .pt-num { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-dim); }
.path-tile.resource.done .pt-num { background: var(--good); color: #fff; border-color: var(--good); }
.pt-actions { flex: 0 0 auto; display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.pt-actions .btn { white-space: nowrap; justify-content: center; }
.res-proof { margin-top: 6px; width: 100%; max-width: 420px; padding: 6px 9px; font: inherit; font-size: 12px; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; }
.res-proof:focus { outline: none; border-color: var(--accent-dim); }
.btn.xs { padding: 3px 9px; font-size: 11.5px; border-radius: 7px; font-weight: 600; gap: 4px; }
.btn.xs.ok { background: var(--good-bg); color: var(--good); border-color: color-mix(in srgb, var(--good) 30%, transparent); }
.badge.subtle { background: var(--bg-elev); color: var(--text-dim); border-color: var(--border); font-weight: 600; }
@media (max-width: 560px) { .path-tile.resource { flex-wrap: wrap; } .pt-actions { flex-direction: row; width: 100%; } }
/* "Download guide (PDF)" → browser print: drop ramp-up-only interactive chrome (the per-resource
   action buttons + the PDF button) so the printed roadmap is clean. Scoped to ramp-up selectors so
   classic career-path printouts are unchanged. */
@media print {
  .pt-actions, #pathPdfBtn { display: none !important; }
  .path-tile { break-inside: avoid; }
  .path-tile:hover { transform: none !important; }
}

/* (B) admin course-preview banner */
.preview-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 9999; background: var(--accent); color: #fff; display: flex; gap: 14px; align-items: center; justify-content: center; padding: 7px 14px; font-size: 13px; box-shadow: 0 2px 10px rgba(0,0,0,.18); }
.preview-bar .btn { background: rgba(255,255,255,.18); color: #fff; border-color: rgba(255,255,255,.45); }
.preview-bar .btn:hover { background: rgba(255,255,255,.3); }
body.previewing { padding-top: 40px; }

/* CP1 — earned path badge (shown on the detail page once the path completes). */
.path-badge { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px; border: 1px solid var(--accent-dim); border-radius: 12px; background: var(--accent-soft); max-width: 520px; }
.path-badge-em { font-size: 28px; line-height: 1; flex: 0 0 auto; }
.path-badge-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.path-badge-name { font-weight: 800; color: var(--text); }
.path-badge-desc { font-size: 12.5px; color: var(--text-dim); }

/* Certification prep — credential focus in the path hero (the exam badge is the headline). */
.path-cap-focus { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px; border: 1px dashed var(--accent-dim); border-radius: 12px; background: var(--accent-soft); max-width: 520px; }
.path-cap-focus .pcf-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.path-cap-focus .pcf-k { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--accent); }
.path-cap-focus .pcf-name { font-weight: 800; color: var(--text); }

/* 4-step prep stepper (Get to know -> Build -> Practice -> Assess) — AWS-style numbered arc. */
.path-steps { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 4px; }
.path-step { flex: 1 1 168px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-card); cursor: pointer; text-align: left; font: inherit; color: var(--text); transition: border-color .12s, transform .08s; }
.path-step:hover { border-color: var(--accent-dim); transform: translateY(-1px); }
.path-step .ps-n { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 999px; display: grid; place-items: center; font-weight: 800; font-size: 13px; border: 1px solid var(--border); color: var(--text-dim); background: var(--bg-elev); }
.path-step .ps-l { font-size: 13px; font-weight: 600; line-height: 1.2; }
.path-step.done .ps-n { background: var(--good); color: #fff; border-color: var(--good); }
.path-step.current { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.path-step.current .ps-n { background: var(--accent); color: #fff; border-color: var(--accent); }
.path-sec-h { margin-top: 26px; }
.path-step-eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--accent); margin-right: 9px; }

/* Exam guide panel — the published exam spec (AWS "Review the exam guide" analogue). */
.exam-guide .eg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; margin: 4px 0 16px; }
.exam-guide .eg-stat { border: 1px solid var(--border); border-radius: 10px; background: var(--bg-elev); padding: 10px 12px; text-align: center; }
.exam-guide .eg-stat b { display: block; font-family: var(--font-mono); font-size: 18px; font-weight: 700; color: var(--text); line-height: 1.1; }
.exam-guide .eg-stat b small { font-size: 11px; color: var(--text-dim); }
.exam-guide .eg-stat span { display: block; margin-top: 4px; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; color: var(--text-faint); }
.exam-guide .eg-domains-h { font-weight: 700; font-size: 13px; margin-bottom: 8px; }
.exam-guide .eg-domains .val { font-weight: 600; color: var(--text-dim); }
.path-readiness { margin: 6px 0 12px; }

/* ============================================================
   U6 — responsive / mobile pass (360–414px). Builds on #106/#107 (sidebar drawer,
   topbar overflow). Goal: no NEW horizontal page overflow on any learner/admin surface
   at narrow widths; tables scroll instead of blowing out the viewport; bands reflow to
   one column; touch targets stay ≥ ~40px. CSS-only; desktop (>900px) is untouched.
============================================================ */

/* --- Wide data tables: scroll horizontally instead of forcing the page wider. The table
   element itself becomes the scroll container at narrow widths (no markup change needed, so
   this also covers admin.js / course-kit.js tables). width:max-content keeps columns at
   their natural width; the parent clips so only the table scrolls, not the page. The sticky
   "is scrollable" affordance is the native scrollbar. */
@media (max-width: 760px) {
  table.dash, table.breakdown {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  table.dash thead, table.breakdown thead,
  table.dash tbody, table.breakdown tbody,
  table.dash tr, table.breakdown tr { width: max-content; min-width: 100%; }
  /* keep numeric/short cells from wrapping mid-scroll (they read better on one line) */
  table.dash th, table.dash td,
  table.breakdown th, table.breakdown td { white-space: nowrap; }
  /* (the My-progress course-filter `.seg` scroll-in-box is handled by the global
     `.seg:not(.adm-tabs)` rule under @media (max-width: 760px); no separate rule needed.) */
}

/* --- Narrow phones (≤480px): tighten the surfaces #107 didn't reach. --- */
@media (max-width: 480px) {
  .wrap { padding: 4px 12px 56px; }

  /* Header right-cluster fit: the topbar's language + theme toggles hung off the right
     edge (clipped by .top-inner's overflow:hidden) on phones. Drop them from the bar and
     surface them inside the account menu instead; keep the burger, title, bells and avatar
     — the primary tappable controls — visible and within the viewport. Tighten gaps so the
     three icon buttons + avatar clear 360px with room for the title's ellipsis. */
  .top-inner { gap: 6px; padding: 0 12px; }
  .top-inner .lang-btn, .top-inner .theme-btn { display: none; }
  /* The DEV persona switch (180px, dev builds only — never shipped to prod) was the single
     biggest header offender on phones; hide it here so the bar fits. Switch personas at a
     wider width when needed. */
  .top-inner .dev-switch { display: none; }
  .menu button.menu-mobile { display: flex; }

  /* KPI / headline stat strip → wrap rather than overflow; hide the vertical dividers. */
  .head-stats { flex-wrap: wrap; gap: 14px 22px; }
  .head-stats .hs-div { display: none; }
  /* KPI grid: plain `1fr` is `minmax(auto,1fr)`, so the compliance-ring KPI's min-content
     (62px ring + label) kept its column from shrinking and the pair overran the viewport.
     `minmax(0,1fr)` lets both columns shrink evenly; the ring KPI wraps (ring above text) and
     its children may collapse to 0 min-width so nothing forces the page wider. */
  .kpi-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .kpi { min-width: 0; }
  .kpi-ring { flex-wrap: wrap; min-width: 0; }
  .kpi-ring > * { min-width: 0; }

  /* Compliance / overdue banner: icon + text on top, full-width CTA below. */
  .overdue-banner { flex-wrap: wrap; }
  .overdue-banner .btn { width: 100%; justify-content: center; }

  /* Course-card two-CTA row stacks so neither button is clipped. */
  .card .card-actions { flex-direction: column; }

  /* Dropdown menus: never wider than the viewport; comfortable touch rows. */
  .menu { min-width: 0; width: min(280px, calc(100vw - 24px)); }
  .menu button { padding: 11px 12px; }
  .bell-menu { max-width: min(320px, calc(100vw - 24px)); }

  /* Career-paths / cert grids that ask for 280px min would force a scroll under ~310px. */
  .cp-grid { grid-template-columns: 1fr; }

  /* Big display numbers shouldn't dominate the narrow column. */
  .snap-n { font-size: 28px; }

  /* Section heading rhythm tightens up so content starts higher. */
  h2 { font-size: 23px; margin: 32px 0 12px; }
}

/* --- Touch targets: ensure the primary nav / chrome controls clear ~40px on coarse
   pointers without changing the desktop look. --- */
@media (pointer: coarse) {
  .sn-item { padding-top: 11px; padding-bottom: 11px; }
  .menu button { min-height: 40px; }
  .q-cell { min-height: 44px; }
}

/* ============================================================
   U5 — accessibility: respect prefers-reduced-motion. Non-essential transitions /
   transforms / animations are gated OFF when the user asks for reduced motion; we keep
   the change of state (hover colors, open/close) but drop the movement. Opacity-only
   transitions (e.g. the card gradient ring) are harmless and left alone.
============================================================ */
@media (prefers-reduced-motion: reduce) {
  * , *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  /* drop the lift/slide micro-interactions outright (state still changes, just no travel) */
  .card.tap:active,
  .card.tap.course:hover,
  .snap-card.snap-continue:hover,
  .cp-card:hover,
  .path-tile:hover { transform: none !important; }
  /* the mobile drawer should snap rather than slide */
  .sidenav { transition: none !important; }
}

/* ============================================================
   Instructor-led (facilitated cohort) — agenda/summary for learners, trainer panel for trainers.
============================================================ */
.il-hero { padding: 8px 0 4px; }
.il-hero h1 { margin: 4px 0 6px; }
.il-eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 700; color: var(--accent-dim); }
.il-tag { color: var(--text-dim); font-size: 16px; max-width: 70ch; }
.il-status { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px 16px; margin: 14px 0 6px; background: var(--bg-card); }
.il-status.ok { border-color: var(--good); background: var(--good-bg); }
.il-status-h { font-weight: 700; margin-bottom: 2px; }
.il-status p { margin: 0; color: var(--text-dim); }
.il-summary { padding: 18px 20px; }
.il-agenda { display: flex; flex-direction: column; gap: 10px; }
.il-ag { display: flex; gap: 14px; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px 16px; background: var(--bg-card); }
.il-ag-n { flex: 0 0 auto; align-self: flex-start; font-size: 12px; font-weight: 700; color: var(--accent-fg); background: var(--accent); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.il-ag-main { flex: 1; }
.il-ag-main h3 { margin: 0 0 4px; }
.il-ag-focus { font-weight: 400; color: var(--text-faint); font-size: .9em; }
.il-ag-main p { margin: 0 0 6px; color: var(--text-dim); }
.il-ag-bit { font-size: 13px; color: var(--text-dim); margin-top: 2px; }
.il-ag-k { font-weight: 700; color: var(--text); }
/* Trainer panel — clearly fenced off as the trainer-only surface. */
.il-trainer { margin-top: 22px; border: 1px solid var(--accent); border-radius: var(--radius); padding: 18px 20px; background: var(--accent-soft); }
.il-trainer-h { font-size: 18px; font-weight: 800; color: var(--accent-dim); }
.il-trainer > p.muted { margin: 2px 0 12px; }
.il-mats { display: flex; flex-direction: column; gap: 12px; }
.il-mat-grp-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); margin: 6px 0 4px; }
.il-mat { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 10px 12px; background: var(--bg-card); cursor: pointer; margin-bottom: 6px; }
.il-mat:hover { border-color: var(--accent); }
.il-mat-type { flex: 0 0 auto; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 3px 8px; border-radius: 6px; background: var(--bg-elev); color: var(--text-dim); }
.il-mat-deck { background: var(--accent); color: var(--accent-fg); }
.il-mat-title { flex: 1; font-weight: 600; display: flex; flex-direction: column; }
.il-mat-sum { font-weight: 400; font-size: 12px; color: var(--text-faint); }
.il-mat-go { flex: 0 0 auto; color: var(--accent-dim); font-weight: 600; font-size: 13px; }
.il-sub { margin-top: 16px; }
.il-sub h3 { font-size: 14px; margin: 0 0 8px; }
.il-req { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-card); margin-bottom: 6px; }
.il-roster { display: flex; flex-direction: column; gap: 4px; }
.il-roster-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 10px; border-bottom: 1px solid var(--border); font-size: 14px; }
.il-deck { width: 100%; height: 78vh; border: 1px solid var(--border); border-radius: var(--radius-md); background: #fff; }
.il-matbody { padding: 20px 24px; }
/* Markdown tables (trainer reference docs — run sheets, answer keys, RACI). */
.md-table-wrap { overflow-x: auto; margin: 12px 0; }
.md-table { border-collapse: collapse; width: 100%; font-size: 14px; }
.md-table th, .md-table td { border: 1px solid var(--border); padding: 7px 10px; text-align: left; vertical-align: top; }
.md-table th { background: var(--bg-elev); font-weight: 700; }
.md-table tbody tr:nth-child(even) { background: var(--bg-elev); }
