/* FDE Quest — dashboard.css (loads AFTER styles.css; extends v1 tokens only) */

.logo { text-decoration: none; color: var(--ink); }
.btn-logout { padding: 8px 14px; font-size: 13px; }

main { padding-top: 28px; }
.section-h { font-size: 20px; margin: 34px 0 14px; }
.panel-h {
  font-size: 13px; font-family: var(--font-mono); letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px;
}

/* ---------- signature route map ---------- */

.route-panel { padding: 18px 22px 10px; }
.route-scroll { overflow-x: auto; }
.route-svg { width: 100%; min-width: 640px; height: auto; display: block; }

.route-svg .road {
  fill: none; stroke: rgba(158, 178, 208, .28); stroke-width: 2;
  stroke-dasharray: 7 6; stroke-linecap: round;
}
.route-svg .road-done { fill: none; stroke: rgba(63, 164, 112, .55); stroke-width: 2; stroke-dasharray: 7 6; }

.route-svg .depot-c {
  fill: var(--bg); stroke: var(--ink-3); stroke-width: 2;
}
.route-svg .depot.done .depot-c { stroke: var(--green); }
.route-svg .depot.avail .depot-c { stroke: var(--amber); fill: var(--amber); }
.route-svg .depot.locked .depot-c { stroke: var(--ink-3); opacity: .45; }

.route-svg .depot-ord {
  font-family: var(--font-mono); font-size: 11px; fill: var(--ink-2);
  text-anchor: middle; dominant-baseline: central;
}
.route-svg .depot.avail .depot-ord { fill: var(--bg); font-weight: 600; }
.route-svg .depot.done .depot-ord { fill: var(--green); }
.route-svg .depot.locked .depot-ord { opacity: 0; }

.route-svg .depot-lbl {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .08em;
  text-transform: uppercase; fill: var(--ink-3); text-anchor: middle;
}
.route-svg .depot.done .depot-lbl { fill: var(--ink-2); }
.route-svg .depot.avail .depot-lbl { fill: var(--amber); }
.route-svg .depot.locked .depot-lbl { opacity: .5; }

.route-svg .lock-glyph { font-size: 12px; text-anchor: middle; dominant-baseline: central; opacity: .8; }

/* amber pulse ring on the available depot (v1 .stop.now style) */
.route-svg .pulse-ring {
  fill: none; stroke: rgba(245, 177, 76, .4); stroke-width: 1.5;
  transform-box: fill-box; transform-origin: center;
  animation: ping 1.8s ease-out infinite;
}

/* stamps */
.route-svg .stamp {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: .18em;
  text-transform: uppercase; text-anchor: middle; dominant-baseline: central;
}
.route-svg .stamp-box { fill: none; stroke-width: 1.6; rx: 3; }
.route-svg .stamp-g {
  transform-box: fill-box; transform-origin: center;
  animation: stampin .5s cubic-bezier(.2, .8, .2, 1) both;
}
.route-svg .stamp-g.delivered .stamp { fill: var(--green); }
.route-svg .stamp-g.delivered .stamp-box { stroke: var(--green); }
.route-svg .stamp-g.pending .stamp { fill: var(--warn); }
.route-svg .stamp-g.pending .stamp-box { stroke: var(--warn); stroke-dasharray: 5 4; }
@keyframes stampin {
  from { transform: rotate(-4deg) scale(1.9); opacity: 0; }
  to   { transform: rotate(-4deg) scale(1); opacity: .95; }
}

/* delivery truck */
.route-svg .truck-bob { animation: truckbob 2.4s ease-in-out infinite; }
@keyframes truckbob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2.5px); }
}
@media (prefers-reduced-motion: reduce) {
  .route-svg .pulse-ring { animation: none; opacity: .5; }
  .route-svg .truck-bob { animation: none; }
  .route-svg .stamp-g { animation: none; transform: rotate(-4deg); opacity: .95; }
}

/* ---------- mission cards ---------- */

.mission-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.mcard {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 10px;
  transition: border-color .2s, transform .15s;
}
.mcard:hover:not(.locked) { border-color: var(--amber); transform: translateY(-2px); }
.mcard.locked { opacity: .55; }
.mcard .m-top { display: flex; align-items: baseline; gap: 10px; }
.mcard .m-ord { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); letter-spacing: .1em; }
.mcard .m-lock { margin-left: auto; font-size: 14px; color: var(--ink-3); }
.mcard .m-title { font-family: var(--font-display); font-weight: 600; font-size: 16px; }
.mcard .m-industry { font-size: 12.5px; color: var(--ink-3); }
.chip {
  display: inline-block; font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase; padding: 3px 8px; border-radius: 3px;
  border: 1px solid var(--line); color: var(--ink-2);
}
.chip.diff { color: var(--cyan); border-color: rgba(47, 157, 180, .4); }
.chip.exam-pass { color: var(--green); border-color: rgba(63, 164, 112, .4); }
.chip.exam-fail { color: var(--warn); border-color: rgba(217, 161, 59, .45); text-decoration: none; }
a.chip.exam-fail:hover { color: var(--amber); border-color: var(--amber); }
.mcard .m-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mcard .m-stats { display: flex; gap: 16px; font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); }
.mcard .m-stats b { color: var(--amber); font-weight: 500; }
.mcard .m-cta { margin-top: auto; }
.mcard .btn { padding: 9px 18px; font-size: 14px; text-decoration: none; }
.mcard.locked .btn { background: transparent; color: var(--warn); border: 1px solid rgba(217, 161, 59, .45); }

/* ---------- mastery + badges ---------- */

.duo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 34px; }
.mastery-row { display: grid; grid-template-columns: 140px 1fr 52px; gap: 10px; align-items: center; margin-bottom: 10px; font-size: 13px; }
.mastery-row .cn { color: var(--ink-2); font-family: var(--font-mono); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mastery-bar { height: 14px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.mastery-bar .fill { height: 100%; border-radius: 4px; background: var(--cyan); width: 0; transition: width .9s cubic-bezier(.2, .8, .2, 1); }
.mastery-bar .fill.low { background: var(--warn); }
.mastery-row .rt { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); text-align: right; }
.empty-note { font-size: 13px; color: var(--ink-3); font-style: italic; }

.badge-group { margin-bottom: 14px; }
.badge-group .bg-h {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px;
}
.badge-group .bg-h b { color: var(--amber); font-weight: 500; }
.badge-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.badge-chip {
  font-family: var(--font-mono); font-size: 11px; padding: 4px 10px; border-radius: 999px;
  border: 1px solid rgba(245, 177, 76, .5); color: var(--amber); background: rgba(245, 177, 76, .06);
  animation: badgein .5s cubic-bezier(.2, .8, .2, 1) both;
}
.badge-chip.ghost { border: 1px dashed var(--line); color: var(--ink-3); background: none; animation: none; }

/* ---------- footer stats strip + plan chip ---------- */

.stats-strip {
  margin-top: 34px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.plan-cta-row { margin-top: 18px; text-align: center; }
.plan-cta {
  display: inline-block; font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--amber); border: 1px solid rgba(245, 177, 76, .45);
  background: rgba(245, 177, 76, .06); border-radius: 999px; padding: 8px 18px; text-decoration: none;
}
.plan-cta:hover { border-color: var(--amber); }

@media (max-width: 860px) {
  .mission-grid { grid-template-columns: 1fr; }
  .duo-grid { grid-template-columns: 1fr; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .mastery-row { grid-template-columns: 110px 1fr 48px; }
}

/* ---------- v2.2: field drills ---------- */

.drill-progress {
  float: right; font-family: var(--font-mono); font-size: 11px;
  letter-spacing: .08em; color: var(--amber); text-transform: none;
}
.drill-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.drill-chip {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  text-align: left; padding: 12px 14px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--line);
  transition: border-color .2s, transform .15s;
}
.drill-chip:hover { border-color: var(--amber); transform: translateY(-1px); }
.drill-chip.solved { border-color: rgba(63, 164, 112, .45); background: rgba(63, 164, 112, .05); }
.drill-chip.solved:hover { border-color: var(--green); }
.drill-chip .dc-title { font-family: var(--font-display); font-weight: 600; font-size: 13.5px; color: var(--ink); }
.drill-chip.solved .dc-title { color: var(--green); }
.drill-chip .dc-concept {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3);
}

/* drill modal */
.drill-modal-wrap {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(13, 20, 32, .78); backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 7vh 18px 24px; overflow-y: auto;
  animation: fadein .2s ease both;
}
.drill-modal {
  position: relative; width: 100%; max-width: 680px;
  animation: modalin .3s cubic-bezier(.2, .8, .2, 1) both;
}
.drill-close {
  position: absolute; top: 12px; right: 12px; z-index: 1;
  width: 32px; height: 32px; border-radius: 8px; font-size: 14px;
  color: var(--ink-3); border: 1px solid var(--line); background: var(--surface-2);
}
.drill-close:hover { color: var(--ink); border-color: var(--ink-3); }
.drill-title { font-size: 19px; margin: 2px 0 8px; padding-right: 40px; }
.drill-scenario { font-size: 14px; color: var(--ink-2); margin-bottom: 14px; max-width: 68ch; }
.drill-feedback .btn { margin-top: 14px; padding: 9px 20px; font-size: 14px; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalin { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .drill-modal-wrap, .drill-modal { animation: none; }
}

/* ---------- v2.2: leaderboard + standing ---------- */

.info-btn {
  float: right; width: 20px; height: 20px; border-radius: 50%;
  font-family: var(--font-mono); font-size: 11px; line-height: 1;
  color: var(--ink-3); border: 1px solid var(--line);
}
.info-btn:hover { color: var(--amber); border-color: rgba(245, 177, 76, .5); }

.lb-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.lb-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); }
.lb-table tr:last-child td { border-bottom: none; }
.lb-table tr.you td {
  background: rgba(245, 177, 76, .07);
  border-top: 1px solid rgba(245, 177, 76, .45);
  border-bottom: 1px solid rgba(245, 177, 76, .45);
}
.lb-table tr.you td:first-child { border-left: 1px solid rgba(245, 177, 76, .45); border-radius: 6px 0 0 6px; }
.lb-table tr.you td:last-child { border-right: 1px solid rgba(245, 177, 76, .45); border-radius: 0 6px 6px 0; }
.lb-rank { font-size: 11px; color: var(--ink-3); width: 44px; }
.lb-table tr.you .lb-rank { color: var(--amber); }
.lb-handle { color: var(--ink); }
.lb-handle b { color: var(--amber); font-weight: 500; }
.lb-level { font-size: 12px; color: var(--ink-3); }
.lb-xp { font-size: 12px; color: var(--ink-2); text-align: right; }

#rank-hero { text-align: center; padding: 12px 6px 4px; }
.rank-big { font-size: 44px; font-weight: 500; color: var(--amber); line-height: 1; }
.rank-sub { font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.rank-pct { font-size: 13px; color: var(--ink-2); margin-top: 10px; }
.rank-pct b { color: var(--green); }
.rank-note {
  font-size: 12px; color: var(--ink-3); margin-top: 14px; text-align: left;
  border-top: 1px dashed var(--line); padding-top: 12px;
}

@media (max-width: 860px) {
  .drill-grid { grid-template-columns: 1fr; }
}

/* ---------- v3: entrance motion ---------- */

.mission-grid .mcard, .drill-grid .drill-chip {
  animation: cardin .5s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes cardin { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.mission-grid .mcard:nth-child(1) { animation-delay: 0ms; }
.mission-grid .mcard:nth-child(2) { animation-delay: 40ms; }
.mission-grid .mcard:nth-child(3) { animation-delay: 80ms; }
.mission-grid .mcard:nth-child(4) { animation-delay: 120ms; }
.mission-grid .mcard:nth-child(5) { animation-delay: 160ms; }
.mission-grid .mcard:nth-child(6) { animation-delay: 200ms; }
.mission-grid .mcard:nth-child(7) { animation-delay: 240ms; }
.mission-grid .mcard:nth-child(8) { animation-delay: 280ms; }
.mission-grid .mcard:nth-child(9) { animation-delay: 320ms; }
.mission-grid .mcard:nth-child(10) { animation-delay: 360ms; }
.mission-grid .mcard:nth-child(11) { animation-delay: 400ms; }
.mission-grid .mcard:nth-child(12) { animation-delay: 440ms; }
.mission-grid .mcard:nth-child(13) { animation-delay: 480ms; }
.mission-grid .mcard:nth-child(14) { animation-delay: 520ms; }
.mission-grid .mcard:nth-child(15) { animation-delay: 560ms; }
.mission-grid .mcard:nth-child(16) { animation-delay: 600ms; }
.mission-grid .mcard:nth-child(17) { animation-delay: 640ms; }
.mission-grid .mcard:nth-child(18) { animation-delay: 680ms; }
.mission-grid .mcard:nth-child(19) { animation-delay: 720ms; }
.mission-grid .mcard:nth-child(20) { animation-delay: 760ms; }
.drill-grid .drill-chip:nth-child(1) { animation-delay: 0ms; }
.drill-grid .drill-chip:nth-child(2) { animation-delay: 30ms; }
.drill-grid .drill-chip:nth-child(3) { animation-delay: 60ms; }
.drill-grid .drill-chip:nth-child(4) { animation-delay: 90ms; }
.drill-grid .drill-chip:nth-child(5) { animation-delay: 120ms; }
.drill-grid .drill-chip:nth-child(6) { animation-delay: 150ms; }
.drill-grid .drill-chip:nth-child(7) { animation-delay: 180ms; }
.drill-grid .drill-chip:nth-child(8) { animation-delay: 210ms; }
.drill-grid .drill-chip:nth-child(9) { animation-delay: 240ms; }
.drill-grid .drill-chip:nth-child(10) { animation-delay: 270ms; }
.drill-grid .drill-chip:nth-child(11) { animation-delay: 300ms; }
.drill-grid .drill-chip:nth-child(12) { animation-delay: 330ms; }
.drill-grid .drill-chip:nth-child(13) { animation-delay: 360ms; }
.drill-grid .drill-chip:nth-child(14) { animation-delay: 390ms; }
.drill-grid .drill-chip:nth-child(15) { animation-delay: 420ms; }
.drill-grid .drill-chip:nth-child(16) { animation-delay: 450ms; }
.drill-grid .drill-chip:nth-child(17) { animation-delay: 480ms; }
.drill-grid .drill-chip:nth-child(18) { animation-delay: 510ms; }
@media (prefers-reduced-motion: reduce) { .mission-grid .mcard, .drill-grid .drill-chip { animation: none; } }

/* ============================================================= */
/* v4 — courses, glyphs, clusters, chase list, focus mode        */
/* ============================================================= */

/* mission cards carry their course accent */
.mission-grid .mcard { border-top: 2px solid var(--ch, var(--line)); }
.mission-grid .mcard .m-top { display: flex; align-items: center; gap: 8px; }
.mission-grid .mcard .m-glyph { margin-left: auto; }
.mission-grid .mcard .m-glyph + .m-lock { margin-left: 0; }
.mission-grid .mcard.locked .ind-glyph { opacity: .45; }

/* capability clusters */
.mastery-row.untested { opacity: .45; }
.mastery-note { font-size: 12.5px; color: var(--ink-3); margin-top: 12px; }
.mastery-note b { color: var(--ink-2); }

/* leaderboard chase list */
.chase-list { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 12px; }
.chase-h { font-size: 9.5px; letter-spacing: .18em; color: var(--ink-3); margin-bottom: 8px; }
.chase-row { display: flex; align-items: baseline; gap: 10px; padding: 4px 0; font-size: 13px; }
.chase-row .ch-handle { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chase-row .ch-gap { margin-left: auto; color: var(--amber); font-size: 11.5px; }

/* mobile focus mode: collapsible secondary panels */
.panel.collapsible > .panel-h { cursor: pointer; user-select: none; position: relative; padding-right: 26px; margin-bottom: 0; }
.panel.collapsible > .panel-h::after {
  content: "▾"; position: absolute; right: 2px; top: 50%; transform: translateY(-50%) rotate(180deg);
  color: var(--ink-3); font-size: 12px; transition: transform .25s;
}
.panel.collapsible.collapsed > .panel-h::after { transform: translateY(-50%) rotate(0deg); }
.panel.collapsible.collapsed > :not(.panel-h) { display: none; }
.panel.collapsible:not(.collapsed) > .panel-h { margin-bottom: 12px; }

/* dashboard mobile pass */
@media (max-width: 720px) {
  .route-panel { padding: 14px 10px; }
  .route-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .route-svg { min-width: 760px; }              /* pan the map, don't squish it */
  .mission-grid { gap: 12px; }
  .duo-grid { gap: 12px; margin-top: 20px; }
  .stats-strip { gap: 10px; }
  .drill-grid { grid-template-columns: 1fr; }
  .lb-table { font-size: 12.5px; }
  .lb-table .lb-level { display: none; }        /* focus: rank, handle, XP */
  .drill-modal { width: min(94vw, 560px); max-height: 86vh; overflow-y: auto; }
}

/* ============================================================= */
/* v5 — career path hero                                         */
/* ============================================================= */

#path-hero { margin-bottom: 34px; }
.path-head h1 { font-size: clamp(26px, 4.5vw, 36px); margin-bottom: 6px; }
.path-head p { color: var(--ink-2); margin-bottom: 22px; max-width: 56ch; }
.path-grid { display: grid; grid-template-columns: 320px 1fr; gap: 18px; align-items: start; }

.rank-ladder { display: flex; flex-direction: column; gap: 4px; position: relative; }
.rank-ladder::before { content: ""; position: absolute; left: 37px; top: 30px; bottom: 30px;
  border-left: 2px dashed rgba(47,157,180,.35); }
.rung { display: flex; align-items: center; gap: 14px; padding: 8px 6px; border-radius: 10px; position: relative; }
.rung-img { position: relative; width: 52px; height: 52px; flex-shrink: 0; }
.rung-img img { width: 100%; height: 100%; object-fit: contain; }
.rung.locked .rung-img img { filter: grayscale(1) brightness(.55); }
.rung-lock { position: absolute; right: -4px; bottom: -2px; font-size: 12px; }
.rung-meta { display: flex; flex-direction: column; min-width: 0; }
.rung-no { font-size: 10px; color: var(--ink-3); }
.rung-nm { font-family: var(--font-display); font-weight: 600; font-size: 14.5px; color: var(--ink-2); }
.rung-xp { font-size: 10.5px; color: var(--ink-3); }
.rung.now { background: linear-gradient(90deg, rgba(245,177,76,.1), transparent);
  border: 1px solid rgba(245,177,76,.4); }
.rung.now .rung-nm { color: var(--amber); }
.rung.now .rung-img::after { content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 1px solid rgba(245,177,76,.5); animation: ping 2s ease-out infinite; }
.rung.done .rung-nm { color: var(--ink); }

.path-side { display: flex; flex-direction: column; gap: 14px; }
.path-card { padding: 18px; }
.pc-eyebrow { display: block; font-size: 10px; letter-spacing: .2em; color: var(--cyan); margin-bottom: 10px; }
.pc-title { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.pc-sub { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.pc-prog { margin-top: 12px; }
.pc-prog .mono { font-size: 10.5px; color: var(--ink-3); }
.pc-bar { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; margin-top: 6px; }
.pc-bar i { display: block; height: 100%; border-radius: 3px; background: var(--cyan);
  transition: width .8s cubic-bezier(.22,1,.36,1); }
.pc-mission { display: flex; gap: 14px; align-items: center; margin: 6px 0 14px; }
.pc-mission .ind-glyph { width: 40px; height: 40px; color: var(--amber); flex-shrink: 0; }
.pc-mission .unlock-ic { font-size: 26px; }
.path-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ph-rank { font-size: 34px; font-weight: 600; color: var(--amber); line-height: 1.1; }
.ph-skill { display: grid; grid-template-columns: 1fr 74px 26px; gap: 8px; align-items: center;
  font-size: 12px; color: var(--ink-2); margin-top: 8px; }
.ph-skill b { color: var(--ink-2); font-size: 11px; text-align: right; }
.pc-link { display: inline-block; margin-top: 12px; font-size: 12.5px; color: var(--cyan); text-decoration: none; }
.pc-link:hover { text-decoration: underline; }
.next-unlock { border-color: rgba(143,111,224,.4); }
.next-unlock .pc-eyebrow { color: var(--violet); }

@media (max-width: 860px) {
  .path-grid { grid-template-columns: 1fr; }
  .rank-ladder { flex-direction: row; overflow-x: auto; gap: 10px; padding: 14px 10px; }
  .rank-ladder::before { display: none; }
  .rung { flex-direction: column; text-align: center; min-width: 96px; gap: 8px; }
  .rung-meta { align-items: center; }
  .path-duo { grid-template-columns: 1fr; }
}

/* ============================================================= */
/* v6 — career progression map                                   */
/* ============================================================= */

.career-grid { display: grid; grid-template-columns: 230px 1fr 240px; gap: 18px; align-items: start; }
.route-mobile { display: none; }

/* chapter rail */
.course-rail { display: flex; flex-direction: column; gap: 10px; }
.co-card {
  display: flex; align-items: center; gap: 12px; text-align: left; padding: 10px 12px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer; transition: border-color .2s, transform .15s;
}
.co-card:hover { transform: translateX(2px); border-color: rgba(255,255,255,.2); }
.co-card img { width: 42px; height: 42px; object-fit: contain; flex-shrink: 0; }
.co-card.locked img { filter: grayscale(1) brightness(.55); }
.co-card .cc-meta { display: flex; flex-direction: column; min-width: 0; }
.co-card .cc-no { font-size: 9px; letter-spacing: .18em; color: var(--ch, var(--ink-3)); }
.co-card .cc-nm { font-family: var(--font-display); font-weight: 600; font-size: 13.5px; color: var(--ink-2); }
.co-card .cc-prog { font-size: 9.5px; color: var(--ink-3); }
.co-card.cur { border-color: var(--ch, var(--amber));
  background: linear-gradient(90deg, color-mix(in srgb, var(--ch, #F5B14C) 10%, transparent), var(--surface-2)); }
.co-card.cur .cc-nm { color: var(--ink); }
.co-card.locked { opacity: .6; }

/* active mission card */
.active-card .ac-inner {
  background: var(--surface-2); border: 1px solid var(--ch, var(--amber)); border-radius: 12px;
  padding: 16px; display: flex; flex-direction: column; gap: 8px;
  box-shadow: 0 10px 34px rgba(0,0,0,.35);
}
.ac-eyebrow { font-size: 9.5px; letter-spacing: .2em; color: var(--amber); }
.ac-head { display: flex; align-items: center; justify-content: space-between; }
.ac-head .ind-glyph { width: 34px; height: 34px; color: var(--ch, var(--amber)); }
.ac-no { font-size: 20px; color: var(--ink-3); }
.ac-title { font-family: var(--font-display); font-weight: 700; font-size: 17px; line-height: 1.25; }
.ac-sub { font-size: 12px; color: var(--ink-3); }
.ac-row { display: flex; align-items: center; justify-content: space-between; font-size: 10px;
  color: var(--ink-3); letter-spacing: .12em; padding-top: 6px; border-top: 1px dashed var(--line); }
.ac-row b { color: var(--amber); font-size: 14px; }
.active-card .btn { margin-top: 8px; }

/* difficulty dots */
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--surface-3); }
.dots i.on { background: var(--amber); }

/* svg node states */
.route-svg .depot-check { fill: var(--green); font-size: 13px; font-weight: 700;
  text-anchor: middle; dominant-baseline: middle; }
.route-svg .depot.done .depot-c { stroke: var(--green); }
.route-svg .depot.flash .depot-c { animation: depotflash 1.5s ease; }
@keyframes depotflash { 0%, 100% { stroke-width: 2; } 30% { stroke-width: 6; } }

/* mobile: vertical chapter timeline replaces the svg map */
@media (max-width: 720px) {
  .career-grid { display: none; }
  .route-mobile { display: block; }
  .rm-ch { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; overflow: hidden;
    background: var(--surface-2); }
  .rm-ch-h { display: flex; align-items: center; gap: 10px; width: 100%; padding: 13px 14px; text-align: left; }
  .rm-ch-no { font-size: 9.5px; letter-spacing: .16em; color: var(--ch, var(--amber)); }
  .rm-ch-nm { font-family: var(--font-display); font-weight: 600; font-size: 14.5px; flex: 1; min-width: 0; }
  .rm-ch-prog { font-size: 10px; color: var(--ink-3); }
  .rm-chev { color: var(--ink-3); transition: transform .25s; }
  .rm-ch.open .rm-chev { transform: rotate(180deg); }
  .rm-list { display: none; padding: 4px 14px 14px; position: relative; }
  .rm-ch.open .rm-list { display: block; }
  .rm-list::before { content: ""; position: absolute; left: 27px; top: 8px; bottom: 12px;
    border-left: 2px dashed rgba(158,178,208,.25); }
  .rm-row { display: flex; align-items: center; gap: 12px; padding: 7px 0; position: relative;
    text-decoration: none; color: inherit; }
  .rm-node { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; display: grid;
    place-items: center; font-family: var(--font-mono); font-size: 10.5px; background: var(--bg);
    border: 2px solid var(--ink-3); color: var(--ink-3); z-index: 1; }
  .rm-node.done { border-color: var(--green); color: var(--green); }
  .rm-node.now { border-color: var(--amber); background: var(--amber); color: var(--bg);
    box-shadow: 0 0 0 4px rgba(245,177,76,.18); }
  .rm-node.locked { font-size: 12px; }
  .rm-title { font-size: 13.5px; color: var(--ink-2); }
  .rm-row.locked .rm-title { color: var(--ink-3); opacity: .7; }
  .rm-row.done .rm-title { color: var(--ink); }
  .rm-active { flex: 1; border: 1px solid rgba(245,177,76,.5); border-radius: 10px; padding: 12px;
    background: linear-gradient(100deg, rgba(245,177,76,.08), var(--surface-2)); }
  .rm-a-title { font-family: var(--font-display); font-weight: 700; font-size: 15px; }
  .rm-truck { font-size: 14px; }
  .rm-a-sub { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-3); margin: 4px 0 10px; }
  .rm-a-btn { width: 100%; justify-content: center; padding: 10px; font-size: 14px; }
}
/* tablet: stack rail above map, card below */
@media (min-width: 721px) and (max-width: 1000px) {
  .career-grid { grid-template-columns: 1fr; }
  .course-rail { flex-direction: row; overflow-x: auto; padding-bottom: 6px; }
  .co-card { min-width: 190px; }
}

/* mobile header: row 1 = logo + logout, row 2 = rank + full-width XP bar */
@media (max-width: 720px) {
  .waybill-no { display: none; }
  .header-top { row-gap: 8px; }
  .header-top .hud { display: contents; }   /* promote children into the header flex */
  .header-top .btn-logout { order: 1; margin-left: auto; }
  .header-top .gamify-hud { order: 2; width: 100%; }
  .gamify-hud .g-bar { flex: 1; width: auto; }
  .gamify-hud .g-plan { display: none; }    /* plan is visible on the path hero + upgrade page */
}

/* ============================================================= */
/* v15 — circuit route map                                       */
/* ============================================================= */
.cr-path { fill: none; stroke: rgba(47, 157, 180, .75); stroke-width: 2.5; stroke-linecap: round;
  filter: drop-shadow(0 0 5px rgba(47, 157, 180, .55)); }
.cr-chip rect { fill: rgba(19, 28, 43, .9); stroke: rgba(47, 157, 180, .45); }
.cr-chip text { fill: var(--cyan); font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .18em; }
.cr-gate polygon { fill: rgba(19, 28, 43, .95); stroke: rgba(158, 178, 208, .5); stroke-width: 1.2; }

.cr-node { cursor: pointer; }
.cr-node.locked { cursor: default; }
.cr-c { fill: #0D1420; stroke: var(--cyan); stroke-width: 2; transition: stroke .2s; }
.cr-num { fill: var(--ink-2); font-family: var(--font-mono); font-size: 10.5px;
  text-anchor: middle; dominant-baseline: middle; }
.cr-lbl { fill: var(--ink-3); font-family: var(--font-mono); font-size: 8px; letter-spacing: .1em;
  text-anchor: middle; }
.cr-lock { font-size: 9px; }
.cr-node.done .cr-c { fill: rgba(47, 157, 180, .9); stroke: var(--cyan); }
.cr-node.done .cr-num { fill: #0D1420; font-weight: 700; }
.cr-node.locked .cr-c { stroke: rgba(102, 120, 143, .55); }
.cr-node.locked .cr-num, .cr-node.locked .cr-lbl { fill: rgba(102, 120, 143, .7); }
.cr-node.now .cr-c { stroke: var(--amber); stroke-width: 2.5; fill: #17110a; }
.cr-node.now .cr-num { fill: var(--amber); font-weight: 700; }
.cr-node.now .cr-lbl { fill: var(--amber); }
.cr-ring2 { fill: none; stroke: rgba(245, 177, 76, .55); stroke-width: 1.5; }
.cr-halo { fill: none; stroke: rgba(245, 177, 76, .35); stroke-width: 2;
  filter: drop-shadow(0 0 8px rgba(245, 177, 76, .7)); animation: ping 2.2s ease-out infinite; }
.cr-node:not(.locked):hover .cr-c { stroke: var(--amber); }
.cr-node.flash .cr-c { animation: depotflash 1.5s ease; }

.cr-legend { display: flex; gap: 26px; justify-content: center; margin-top: 10px;
  font-size: 9px; letter-spacing: .16em; color: var(--ink-3); }
.cr-legend span { display: flex; align-items: center; gap: 8px; }
.cr-legend i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.cr-legend .lg-now { background: var(--amber); box-shadow: 0 0 8px rgba(245,177,76,.7); }
.cr-legend .lg-open { border: 2px solid var(--cyan); }
.cr-legend .lg-gate { border: 1.5px solid rgba(158,178,208,.6); border-radius: 3px;
  transform: rotate(45deg); width: 10px; height: 10px; }
@media (prefers-reduced-motion: reduce) { .cr-halo { animation: none; } }

/* circuit map readability: bigger canvas on wide screens, clearer states */
.cr-num { font-size: 11.5px; }
.cr-lbl { font-size: 9px; }
.cr-node.locked .cr-c { stroke: rgba(122, 140, 165, .8); }
.cr-node.locked .cr-num { fill: rgba(140, 156, 178, .9); }
@media (min-width: 1240px) {
  main:has(#dash) { max-width: 1240px; }
  .career-grid { grid-template-columns: 214px 1fr 236px; }
}
/* circuit map must fit its column — legacy min-width pushed nodes behind overflow */
@media (min-width: 721px) { .route-svg { min-width: 0; } }

/* chapter-select highlight on the classic route map */
.route-svg .depot.hl .depot-c { stroke: var(--violet); stroke-width: 3;
  filter: drop-shadow(0 0 6px rgba(143, 111, 224, .8)); }
.route-svg .depot.hl .depot-ord, .route-svg .depot.hl .lock-glyph { fill: var(--violet); opacity: 1; }
.route-svg .depot.hl .depot-lbl { fill: var(--violet); opacity: 1; }
.co-card.sel { border-color: var(--violet);
  box-shadow: 0 0 0 1px var(--violet), 0 6px 20px rgba(143, 111, 224, .18); }
.cr-legend .lg-done { border: 2px solid var(--green); }
.cr-legend .lg-hl { border: 2px solid var(--violet); box-shadow: 0 0 6px rgba(143, 111, 224, .7); }

/* route map zoom: bigger type to match the tighter coordinate space */
.route-svg .depot-ord { font-size: 12px; }
.route-svg .depot-lbl { font-size: 10.5px; }
.route-svg .lock-glyph { font-size: 14px; }
.route-svg .depot-check { font-size: 15px; }

/* photo depots */
.route-svg .depot-c { fill: none; stroke-width: 2.5; }
.route-svg .depot-img { opacity: .95; }
.route-svg .depot.locked .depot-img { filter: grayscale(1) brightness(.45); }
.route-svg .depot.open .depot-img { filter: saturate(.8) brightness(.85); }
.route-svg .depot-badge { fill: #0D1420; stroke: var(--line); stroke-width: 1; }
.route-svg .depot.avail .depot-badge { stroke: var(--amber); }
.route-svg .depot.done .depot-badge { stroke: var(--green); }
.route-svg .depot-ord { font-size: 9px; }
.route-svg .depot-check { font-size: 11px; }
.route-svg .lock-glyph { font-size: 9px; }
.route-svg .depot.hl .depot-img { filter: none; }

/* course headers on the mission board */
.course-h { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  margin: 34px 0 0; padding: 14px 16px; border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--cc, #F5B14C) 35%, transparent);
  background: linear-gradient(90deg, color-mix(in srgb, var(--cc, #F5B14C) 9%, transparent), var(--surface) 70%); }
.course-h:first-child { margin-top: 0; }
.co-no { font-size: 10px; letter-spacing: .22em; color: var(--cc, var(--amber)); }
.co-nm { font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.co-tag { font-size: 12.5px; color: var(--ink-3); }
.co-prog { margin-left: auto; font-size: 10px; color: var(--ink-3); letter-spacing: .1em; }
@media (max-width: 720px) { .co-tag { flex-basis: 100%; } .co-prog { margin-left: 0; } }

/* field-manual library: grouped, basics first */
.concept-cloud-dash { display: block; }
.ck-group { margin-bottom: 20px; }
.ck-group:last-child { margin-bottom: 0; }
.ck-gh { display: block; font-size: 9.5px; letter-spacing: .2em; color: var(--cyan); margin-bottom: 9px; }
.ck-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.ck-chip b { font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
@media (max-width: 720px) { .ck-grid { grid-template-columns: 1fr; } }

/* ---- unfinished engagement ---- */
/* Top of the map view, above the career hero: a returning learner is far more
   likely to want the mission they abandoned than a summary of their rank. */
.resume-panel {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 18px 20px; margin-bottom: 18px;
  border-left: 3px solid var(--amber);
}
.rz-body { flex: 1 1 240px; min-width: 0; }
.rz-eyebrow { display: block; font-size: 9.5px; letter-spacing: .18em; color: var(--amber); }
.rz-title { font-size: 19px; margin: 6px 0 4px; }
.rz-where { font-size: 13.5px; color: var(--ink-2); }
.rz-where b { color: var(--ink); }
.rz-go { flex-shrink: 0; }
@media (max-width: 720px) {
  .resume-panel { padding: 15px 16px; gap: 12px; }
  .rz-title { font-size: 17px; }
  .rz-go { width: 100%; justify-content: center; min-height: 46px; }
}

/* ---- today's drill ---- */
.daily-panel {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap; padding: 18px 20px; margin-bottom: 18px;
  border-left: 3px solid var(--cyan);
}
.dl-left { flex: 1 1 260px; min-width: 0; }
.dl-eyebrow { display: block; font-size: 9.5px; letter-spacing: .18em; color: var(--cyan); }
.dl-title { font-size: 18px; margin: 6px 0 4px; }
.dl-sub { font-size: 13px; color: var(--ink-2); }
.dl-sub b { color: var(--ink); }
.dl-right { display: flex; flex-direction: column; align-items: flex-end; gap: 9px; flex-shrink: 0; }
.dl-streak { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.dl-streak b { color: var(--amber); font-size: 17px; }
@media (max-width: 720px) {
  .daily-panel { padding: 15px 16px; gap: 12px; }
  .dl-title { font-size: 16px; }
  .dl-right { width: 100%; align-items: stretch; }
  .dl-streak { text-align: left; }
  .dl-go { width: 100%; justify-content: center; min-height: 46px; }
}
