:root {
  /* COM Brand & Fixed Learning-Level Palette */
  --brand: #1e3e4e;
  --brand-hover: #16303d;
  --brand-tint: rgba(30, 62, 78, 0.06);
  --brand-border: rgba(30, 62, 78, 0.18);

  /* Fixed Learning-Level & Interaction Accents */
  --level-beginner: #238ec3;
  --level-intermediate: #fcbf16d6;
  --level-intermediate-solid: #fcbf16;
  --level-intermediate-ink: #3d2c00;
  --level-intermediate-tint: rgba(252, 191, 22, 0.14);

  --level-advanced: #e05992;
  --level-advanced-ink: #7a1c45;
  --level-advanced-tint: rgba(224, 89, 146, 0.10);

  /* Neutral Monochromatic Surfaces (Requested Grays) */
  --gray-surface: #ececf07a;
  --gray-subtle: #ececf040;
  --gray-solid: #ececf0;

  /* Editorial Canvas & Typography */
  --bg-page: #fbfbfc;
  --bg-card: #ffffff;
  --ink-primary: #11181c;
  --ink-secondary: #4b5563;
  --ink-muted: #6b7280;
  --hairline: #e5e7eb;
  --hairline-strong: #d1d5db;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --font-sans: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg-page);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* --------------------------------------------------------------------------
 * 1. Minimalist Site Header
 * -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(251, 251, 252, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}

.header-inner {
  max-width: 1380px;
  margin: 0 auto;
  height: 58px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
}

.brand-mark {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  background: var(--brand);
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 12px;
}

.brand-divider {
  color: var(--hairline-strong);
}

.brand-path {
  font-weight: 600;
  color: var(--ink-secondary);
}

.view-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--gray-surface);
  padding: 3px;
  border-radius: var(--radius-md);
}

.view-tab {
  border: 0;
  background: transparent;
  color: var(--ink-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.view-tab:hover {
  color: var(--ink-primary);
}

.view-tab.active {
  background: var(--bg-card);
  color: var(--ink-primary);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(17, 24, 28, 0.06);
}

.btn-text {
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.14s ease, background-color 0.14s ease;
}

.btn-text:hover {
  color: var(--ink-primary);
  background: var(--gray-surface);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-link {
  text-decoration: none;
}

/* --------------------------------------------------------------------------
 * 2. Editorial Page Container & Intro
 * -------------------------------------------------------------------------- */
.page-container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 40px 28px 96px;
}

.editorial-intro {
  max-width: 760px;
  margin-bottom: 32px;
}

.slogan-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
}

.editorial-intro h1 {
  margin: 0 0 12px;
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.18;
  color: var(--ink-primary);
}

.intro-lead {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-secondary);
}

.intro-assessment-cta {
  display: inline-flex;
  width: fit-content;
  margin-top: 18px;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
 * 3. My Goal & Solid Progress Bar (Spec §2.2 & §3)
 * -------------------------------------------------------------------------- */
.goal-section {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 20px 0;
  margin-bottom: 20px;
}

.goal-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.section-label {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.progress-inline {
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-secondary);
}

.progress-track {
  width: 160px;
  height: 9px;
  background: var(--gray-surface);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(30, 62, 78, 0.08);
}

.progress-fill {
  height: 100%;
  background: var(--brand);
  border-radius: 999px;
  transition: width 0.22s ease;
}

.goal-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.goal-btn {
  border: 1px solid var(--hairline);
  background: var(--bg-card);
  color: var(--ink-secondary);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.14s ease, background-color 0.14s ease, color 0.14s ease;
}

.goal-btn:hover {
  border-color: var(--hairline-strong);
  color: var(--ink-primary);
  background: var(--gray-subtle);
}

.goal-btn.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
 * 4. Next Best Step Banner (Spec §3 & §5)
 * -------------------------------------------------------------------------- */
.next-step-banner {
  background: var(--bg-card);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.next-step-info {
  flex: 1;
  min-width: 280px;
}

.assessment-summary {
  margin-bottom: 24px;
  padding: 18px 20px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

.assessment-summary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.assessment-summary-kicker {
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.assessment-summary h3 {
  margin: 4px 0 6px;
  font-size: 18px;
}

.assessment-summary p {
  margin: 0;
  color: var(--ink-secondary);
  font-size: 12.5px;
}

.assessment-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.assessment-stat {
  padding: 7px 10px;
  border-radius: 7px;
  background: var(--gray-subtle);
  color: var(--ink-secondary);
  font-size: 11.5px;
}

.assessment-stat strong {
  color: var(--ink-primary);
}

.assessment-gap-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.assessment-gap-course {
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: var(--bg-page);
  padding: 10px 12px;
}

.assessment-gap-course summary {
  cursor: pointer;
  color: var(--ink-primary);
  font-size: 12px;
  font-weight: 600;
}

.assessment-gap-micros {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.assessment-gap-micros span {
  padding: 4px 7px;
  border-radius: 5px;
  background: var(--level-intermediate-tint);
  color: var(--level-intermediate-ink);
  font-size: 10.5px;
}

.flow-node.assessment-gap,
.course-node.assessment-gap {
  border-color: rgba(252, 191, 22, .72);
  background: linear-gradient(135deg, #fff, rgba(252, 191, 22, .09));
  box-shadow: inset 3px 0 0 var(--level-intermediate-solid);
}

.next-step-kicker {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand);
  margin-bottom: 4px;
}

.next-step-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-primary);
  margin: 0 0 4px;
}

.next-step-desc {
  font-size: 13px;
  color: var(--ink-secondary);
  margin: 0;
}

.btn-primary {
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.14s ease;
}

.btn-primary:hover {
  background: var(--brand-hover);
}

/* --------------------------------------------------------------------------
 * 5. Toolbar, Layout Switcher & Clean Filters
 * -------------------------------------------------------------------------- */
.journey-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.search-field {
  position: relative;
  flex: 1;
  min-width: 240px;
  max-width: 400px;
}

.search-svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-muted);
  pointer-events: none;
}

.search-field input {
  width: 100%;
  border: 1px solid var(--hairline);
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 8px 12px 8px 34px;
  font-size: 13px;
  color: var(--ink-primary);
  outline: none;
  transition: border-color 0.14s ease;
}

.search-field input:focus {
  border-color: var(--brand);
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.layout-switcher {
  display: inline-flex;
  background: var(--gray-surface);
  border: 1px solid var(--hairline);
  padding: 2px;
  border-radius: var(--radius-sm);
  gap: 2px;
}

.layout-btn {
  border: 0;
  background: transparent;
  color: var(--ink-secondary);
  padding: 6px 11px;
  border-radius: 4px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.14s ease;
}

.layout-btn:hover {
  color: var(--ink-primary);
}

.layout-btn.active {
  background: var(--brand);
  color: #ffffff;
  font-weight: 600;
}

.clean-select {
  border: 1px solid var(--hairline);
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13px;
  color: var(--ink-secondary);
  outline: none;
  cursor: pointer;
}

.clean-select:focus {
  border-color: var(--brand);
}

.btn-outline {
  border: 1px solid var(--hairline);
  background: var(--bg-card);
  color: var(--ink-secondary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.14s ease;
}

.btn-outline.active {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-tint);
}

/* --------------------------------------------------------------------------
 * 6A. SYNTHESIZED FLOW VIEW (Subway Spine + Guided Stage Timeline + Skill Tree)
 * -------------------------------------------------------------------------- */
.flow-surface {
  border: 1px solid var(--hairline);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.flow-canvas {
  position: relative;
  padding: 36px 28px 44px;
  min-width: 0;
  width: 100%;
}

/* Central Subway Spine Line behind stages */
.flow-canvas::before {
  content: "";
  position: absolute;
  top: 36px;
  bottom: 44px;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: var(--gray-surface);
  z-index: 1;
}

.flow-stage-block {
  position: relative;
  z-index: 3;
  margin-bottom: 36px;
}

.flow-stage-block:last-child {
  margin-bottom: 0;
}

.flow-stage-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.flow-stage-pill {
  background: var(--bg-page);
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  padding: 6px 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 2px 6px rgba(17, 24, 28, 0.03);
}

.flow-stage-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--brand);
  text-transform: uppercase;
}

.flow-stage-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-primary);
  padding-left: 10px;
  border-left: 1px solid var(--hairline);
}

.flow-stage-progress {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  padding-left: 10px;
  border-left: 1px solid var(--hairline);
}

/* Each Level Tier along the Spine */
.flow-level-tier {
  position: relative;
  margin-bottom: 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.flow-level-marker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--hairline);
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-secondary);
  margin-bottom: 14px;
  position: relative;
  z-index: 4;
}

.flow-level-marker .station-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
}

.flow-level-marker .mode-hint {
  font-weight: 400;
  color: var(--ink-muted);
}

.flow-nodes-row {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 18px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 1220px;
  position: relative;
  z-index: 4;
}

/* Course Node inside Flow View */
.flow-node {
  position: relative;
  width: 256px;
  min-height: 76px;
  background: var(--bg-card);
  border: 1.5px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 2px 5px rgba(17, 24, 28, 0.02);
}

.flow-node.single-spine-node {
  width: 310px;
  border-color: var(--brand-border);
}

.flow-node:hover {
  border-color: var(--brand);
}

.flow-node.is-completed {
  border-color: var(--brand);
  background: linear-gradient(180deg, rgba(30, 62, 78, 0.05) 0%, #ffffff 100%);
}

.flow-node.is-ready-glow {
  border-color: rgba(30, 62, 78, 0.38);
}

/* Interactive Skill-Tree Highlight States */
.flow-node.is-focused {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand);
  z-index: 6;
}

.flow-node.is-prereq {
  border-color: var(--level-intermediate-solid);
  background: var(--level-intermediate-tint);
  z-index: 5;
}

.flow-node.is-dependent {
  border-color: var(--level-advanced);
  background: var(--level-advanced-tint);
  z-index: 5;
}

.flow-node.is-muted-hover {
  opacity: 0.30;
}

.flow-lane-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--ink-muted);
}

.flow-lane-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
}

.flow-lane-dot.lane-FE { background: #238ec3; }
.flow-lane-dot.lane-BE { background: #1e3e4e; }
.flow-lane-dot.lane-MO { background: #e05992; }
.flow-lane-dot.lane-PS { background: #d99b00; }

.flow-pace-tag {
  font-size: 10px;
  font-weight: 500;
  line-height: 1.38;
  color: var(--ink-muted);
  background: var(--gray-subtle);
  border: 1px solid var(--hairline);
  padding: 3px 7px;
  border-radius: 4px;
  max-width: calc(100% - 26px);
  width: fit-content;
  white-space: normal;
  word-break: break-word;
}

/* Milestone Station Card along the Spine */
.flow-milestone-station {
  max-width: 720px;
  margin: 8px auto 12px;
  background: var(--bg-page);
  border: 1px solid var(--brand-border);
  border-left: 3.5px solid var(--brand);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.flow-milestone-station.achieved {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand);
}

.flow-ms-kicker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand);
  margin-bottom: 2px;
}

.flow-milestone-station.achieved .flow-ms-kicker {
  color: var(--level-intermediate-solid);
}

.flow-ms-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 3px;
}

.flow-ms-evidence {
  font-size: 12px;
  color: var(--ink-secondary);
  margin: 0;
}

.flow-milestone-station.achieved .flow-ms-evidence {
  color: rgba(255, 255, 255, 0.85);
}

.flow-ms-status {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--brand);
  border: 1px solid var(--hairline);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
 * 6B. CLASSIC ROADMAP MATRIX GRID
 * -------------------------------------------------------------------------- */
.roadmap-surface {
  border: 1px solid var(--hairline);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow-x: auto;
}

.roadmap-canvas {
  position: relative;
  min-width: 780px;
}

.roadmap-svg-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.road-header,
.road-level-row {
  display: grid;
}

.road-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--gray-surface);
  border-bottom: 1px solid var(--hairline);
}

.road-header-cell {
  padding: 11px 14px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  border-right: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.road-header-cell:last-child {
  border-right: 0;
}

.road-level-row {
  border-bottom: 1px solid var(--hairline);
  position: relative;
  z-index: 3;
}

.road-level-row:nth-child(even) {
  background: var(--gray-subtle);
}

.road-level-row:last-child {
  border-bottom: 0;
}

.road-level-badge {
  padding: 16px 10px;
  border-right: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 600;
}

.road-cell {
  padding: 12px;
  border-right: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 104px;
}

.road-cell:last-child {
  border-right: 0;
}

.course-node {
  position: relative;
  min-height: 76px;
  background: var(--bg-card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, opacity 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.course-node:hover {
  border-color: var(--brand);
}

.course-node.is-completed {
  border-color: var(--brand);
  background: var(--brand-tint);
}

.course-node.is-focused {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand);
  z-index: 5;
}

.course-node.is-prereq {
  border-color: var(--level-intermediate-solid);
  background: var(--level-intermediate-tint);
  z-index: 4;
}

.course-node.is-dependent {
  border-color: var(--level-advanced);
  background: var(--level-advanced-tint);
  z-index: 4;
}

.course-node.is-muted-hover {
  opacity: 0.35;
}

.course-node-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.course-code {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-muted);
}

.course-node.is-completed .course-code,
.course-node.is-focused .course-code,
.flow-node.is-completed .course-code,
.flow-node.is-focused .course-code {
  color: var(--brand);
}

.course-top-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.unlock-pill {
  font-size: 10px;
  font-weight: 600;
  padding: 1.5px 6px;
  border-radius: 4px;
  background: var(--level-intermediate);
  color: var(--level-intermediate-ink);
  white-space: nowrap;
  flex-shrink: 0;
}

.done-pill {
  font-size: 10px;
  font-weight: 600;
  padding: 1.5px 6px;
  border-radius: 4px;
  background: var(--brand);
  color: #ffffff;
  white-space: nowrap;
  flex-shrink: 0;
}

.check-btn {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 1px solid var(--hairline-strong);
  background: var(--bg-card);
  color: transparent;
  display: grid;
  place-items: center;
  font-size: 11px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: all 0.12s ease;
}

.check-btn:hover {
  border-color: var(--brand);
}

.check-btn.checked {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff;
}

/* Info Trigger Button (?): circular, bottom-right corner, aligned on the exact vertical axis of .check-btn */
.info-btn {
  position: absolute;
  right: 14px;
  bottom: 12px;
  z-index: 6;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--hairline-strong);
  background: var(--bg-page);
  color: var(--ink-secondary);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.14s ease, border-color 0.14s ease, background-color 0.14s ease, color 0.14s ease;
}

.flow-node:hover .info-btn,
.course-node:hover .info-btn,
.info-btn.active {
  opacity: 1;
  pointer-events: auto;
}

.info-btn:hover,
.info-btn.active {
  border-color: var(--brand);
  background: var(--brand);
  color: #ffffff;
}

.course-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-primary);
  line-height: 1.38;
  padding-right: 28px;
  min-height: 24px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.course-meta {
  font-size: 11.5px;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding-right: 26px;
}

.flow-stage-header,
.flow-level-marker,
.flow-milestone-station,
.milestone-row,
.road-level-badge {
  transition: opacity 0.15s ease;
}

.flow-stage-header.is-muted-hover,
.flow-level-marker.is-muted-hover,
.flow-milestone-station.is-muted-hover,
.milestone-row.is-muted-hover,
.road-level-badge.is-muted-hover {
  opacity: 0.28;
}

.milestone-row {
  background: var(--gray-surface);
  border-bottom: 1px solid var(--hairline);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 12.5px;
  position: relative;
  z-index: 3;
}

.milestone-row-title {
  font-weight: 600;
  color: var(--brand);
}

.milestone-row-desc {
  color: var(--ink-secondary);
  margin-left: 8px;
}

.milestone-row-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
 * 7. Contextual Hover Tooltip HUD
 * -------------------------------------------------------------------------- */
.hover-hud {
  position: fixed;
  z-index: 80;
  pointer-events: none;
  width: 310px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-md);
  padding: 11px 13px;
  box-shadow: 0 8px 24px rgba(17, 24, 28, 0.10);
  font-size: 11.5px;
  color: var(--ink-secondary);
  line-height: 1.45;
}

.hud-title {
  font-weight: 600;
  color: var(--ink-primary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hud-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 10px;
  padding: 7px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 6px;
}

.hud-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--ink-primary);
}

.swatch {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  display: inline-block;
  flex-shrink: 0;
}

.swatch.brand { background: var(--brand); }
.swatch.yellow { background: var(--level-intermediate); border: 1px solid #c99600; }
.swatch.red { background: var(--level-advanced); }

.line-key {
  width: 16px;
  height: 0;
  display: inline-block;
  flex-shrink: 0;
}

.line-key.solid { border-top: 2px solid var(--brand); }
.line-key.dashed { border-top: 2px dashed #b58500; }
.line-key.dotted { border-top: 2px dotted var(--level-advanced); }

.hud-hint {
  font-size: 11px;
  color: var(--ink-muted);
}

/* --------------------------------------------------------------------------
 * 8. Milestones Section
 * -------------------------------------------------------------------------- */
.milestones-section {
  margin-top: 40px;
}

.section-head {
  margin-bottom: 16px;
}

.section-head h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink-primary);
}

.section-head p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-secondary);
}

.milestones-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.milestone-card {
  background: var(--bg-card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.milestone-step {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--brand);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ms-step-range {
  padding-left: 8px;
  border-left: 1px solid var(--hairline);
  color: var(--ink-muted);
  font-weight: 500;
}

.milestone-card h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  min-height: 41px;
  color: var(--ink-primary);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.milestone-card p {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-secondary);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.milestone-evidence {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--hairline);
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-secondary);
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* --------------------------------------------------------------------------
 * 9. View 2: Prerequisite Graph (DAG)
 * -------------------------------------------------------------------------- */
.dag-surface {
  background: var(--bg-card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.dag-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.dag-header h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 600;
}

.dag-header p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-secondary);
}

.segmented-control {
  display: flex;
  background: var(--gray-surface);
  padding: 3px;
  border-radius: var(--radius-md);
  gap: 2px;
}

.seg-btn {
  border: 0;
  background: transparent;
  color: var(--ink-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
}

.seg-btn.active {
  background: var(--bg-card);
  color: var(--ink-primary);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(17, 24, 28, 0.06);
}

.dag-stage {
  border: 1px solid var(--hairline);
  background: var(--gray-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  overflow: auto;
}

.micro-dag-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 18px;
}

.micro-dag-list {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--gray-subtle);
  padding: 10px;
  max-height: 600px;
  overflow-y: auto;
}

.micro-dag-detail {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  padding: 20px;
}

.chain-columns {
  display: grid;
  grid-template-columns: 1fr 1.1fr 1fr;
  gap: 14px;
  align-items: start;
}

.chain-col {
  background: var(--gray-subtle);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 14px;
}

.chain-col h4 {
  margin: 0 0 10px;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-secondary);
}

.edge-item {
  background: var(--bg-card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.14s ease;
}

.edge-item:hover {
  border-color: var(--brand);
}

.edge-item.active {
  border-color: var(--brand);
  background: var(--brand);
  color: #ffffff;
}

.table-container {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  overflow: auto;
}

.clean-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.clean-table th {
  background: var(--gray-surface);
  color: var(--ink-secondary);
  font-weight: 600;
  text-align: left;
  padding: 10px 14px;
  font-size: 11.5px;
  border-bottom: 1px solid var(--hairline);
}

.clean-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}

.clean-table tr:last-child td {
  border-bottom: 0;
}

/* --------------------------------------------------------------------------
 * 10. View 3: Micro Course Library
 * -------------------------------------------------------------------------- */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.catalog-card {
  background: var(--bg-card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.14s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.catalog-card:hover {
  border-color: var(--brand);
}

.neutral-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  background: var(--gray-surface);
  color: var(--ink-secondary);
}

/* --------------------------------------------------------------------------
 * 11. Slide-Over Drawer
 * -------------------------------------------------------------------------- */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 28, 0.40);
  z-index: 100;
  display: none;
}

.drawer-backdrop.open {
  display: block;
}

.drawer {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(820px, 100vw);
  background: var(--bg-card);
  border-left: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: -12px 0 36px rgba(17, 24, 28, 0.08);
}

.drawer-header {
  height: 56px;
  padding: 0 24px;
  border-bottom: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-page);
}

.drawer-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-muted);
}

.btn-back {
  border: 1px solid var(--hairline);
  background: var(--bg-card);
  color: var(--ink-primary);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.drawer-close {
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  font-size: 20px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.drawer-close:hover {
  background: var(--gray-surface);
  color: var(--ink-primary);
}

.drawer-body {
  padding: 28px 28px 45vh;
  overflow-y: auto;
  flex: 1;
  scroll-behavior: smooth;
}

.drawer-title {
  margin: 8px 0 10px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink-primary);
}

.drawer-lead {
  margin: 0 0 20px;
  font-size: 14.5px;
  color: var(--ink-secondary);
  line-height: 1.6;
}

.drawer-section {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
}

.drawer-section h4 {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.drawer-review-percent {
  padding: 6px 9px;
  border-radius: 7px;
  background: var(--brand-tint);
  color: var(--brand);
  font-size: 11.5px;
  font-weight: 700;
}

.drawer-review-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.drawer-review-heading h4 { margin-bottom: 4px; }
.drawer-review-heading p { margin: 0; color: var(--ink-muted); font-size: 11.5px; line-height: 1.5; }
.drawer-review-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.drawer-review-actions .btn-outline { padding: 6px 9px; font-size: 11px; }
.drawer-review-list { display: grid; gap: 8px; }
.drawer-review-micro { overflow: hidden; border: 1px solid var(--hairline); border-radius: var(--radius-md); background: var(--bg-card); }
.drawer-review-micro > summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 12px 14px; list-style: none; cursor: pointer; }
.drawer-review-micro > summary::-webkit-details-marker { display: none; }
.drawer-review-micro input { width: 17px; height: 17px; margin: 0; accent-color: var(--brand); cursor: pointer; }
.drawer-review-micro summary span, .drawer-review-checkrow span { display: grid; gap: 2px; }
.drawer-review-micro summary strong { font-size: 13px; }
.drawer-review-micro summary small, .drawer-review-checkrow small { color: var(--ink-muted); font-size: 10.5px; line-height: 1.45; }
.drawer-review-micro summary b { color: var(--ink-muted); font-size: 10.5px; font-weight: 600; }
.drawer-review-micro-body { padding: 4px 14px 13px 40px; border-top: 1px solid var(--hairline); background: var(--gray-subtle); }
.drawer-review-chapter { padding: 10px 0; border-top: 1px solid var(--hairline); }
.drawer-review-chapter:first-child { border-top: 0; }
.drawer-review-checkrow { display: flex; align-items: flex-start; gap: 9px; }
.drawer-review-checkrow strong { font-size: 12px; line-height: 1.45; }
.drawer-review-lessons { display: grid; gap: 7px; margin: 9px 0 0 26px; }
.drawer-review-lesson { padding: 5px 7px; border-radius: 6px; background: #fff; }

.surface-box {
  background: var(--gray-subtle);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 13px;
  color: var(--ink-secondary);
}

.chapter-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chapter-acc {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  overflow: hidden;
}

.chapter-acc summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 14px;
  background: var(--gray-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 600;
  font-size: 13px;
  color: var(--ink-primary);
}

.chapter-acc summary::-webkit-details-marker {
  display: none;
}

.lesson-item {
  padding: 10px 14px;
  border-top: 1px solid var(--hairline);
}

.lesson-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.lesson-head h5 {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-primary);
}

.kw-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.kw-btn {
  border: 1px solid var(--hairline);
  background: var(--gray-surface);
  color: var(--ink-secondary);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.kw-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* Inline Collapsible Micro-Course Accordion Cards inside Academy Course Drawer */
.mc-card-acc {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  overflow: hidden;
  transition: border-color 0.14s ease;
}

.mc-card-acc:hover,
.mc-card-acc.open {
  border-color: var(--brand);
}

.mc-card-trigger {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mc-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.mc-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-primary);
}

.mc-card-chevron {
  font-size: 12px;
  color: var(--ink-muted);
  transition: transform 0.16s ease;
  flex-shrink: 0;
}

.mc-card-acc.open .mc-card-chevron {
  transform: rotate(180deg);
  color: var(--brand);
}

.mc-outcomes-list {
  margin: 4px 0 0;
  padding-left: 18px;
  font-size: 12.5px;
  color: var(--ink-secondary);
  line-height: 1.5;
}

.mc-outcomes-list li {
  margin: 3px 0;
}

.mc-card-body {
  display: none;
  padding: 14px 16px 16px;
  border-top: 1px solid var(--hairline);
  background: var(--bg-page);
}

.mc-card-acc.open .mc-card-body {
  display: block;
}

.hidden {
  display: none !important;
}

.next-step-title,
.next-step-desc,
.surface-box,
.mc-card-title,
.mc-outcomes-list,
.lesson-item,
.hud-title,
.hud-hint {
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 1080px) {
  .milestones-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .flow-canvas {
    padding: 28px 20px 36px;
  }
  .flow-nodes-row {
    gap: 14px;
  }
  .flow-node {
    flex: 1 1 250px;
    max-width: 320px;
    width: auto;
  }
  .flow-node.single-spine-node {
    width: 100%;
    max-width: 340px;
  }
}

@media (max-width: 860px) {
  .page-container {
    padding: 28px 18px 72px;
  }
  .journey-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .search-field {
    max-width: 100%;
    width: 100%;
  }
  .toolbar-right {
    width: 100%;
    justify-content: space-between;
  }
  .flow-stage-pill {
    max-width: 100%;
    border-radius: var(--radius-md);
    padding: 8px 14px;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    gap: 6px 10px;
  }
  /* Matrix View responsive transformation into stacked Level cards */
  .roadmap-surface {
    overflow-x: visible;
  }
  .roadmap-canvas {
    min-width: 0;
    width: 100%;
  }
  .road-header {
    display: none;
  }
  .road-level-row {
    display: flex !important;
    flex-direction: column;
    border-bottom: 1px solid var(--hairline);
  }
  .road-level-badge {
    border-right: 0;
    border-bottom: 1px solid var(--hairline);
    background: var(--gray-surface);
    padding: 9px 14px;
    flex-direction: row;
    justify-content: flex-start;
    color: var(--brand);
    font-weight: 600;
  }
  .road-cell {
    border-right: 0;
    border-bottom: 1px solid var(--hairline);
    min-height: 0;
    padding: 12px 14px;
  }
  .road-cell:last-child {
    border-bottom: 0;
  }
  .road-cell:empty {
    display: none;
  }
  .road-cell::before {
    content: attr(data-lane-name);
    font-size: 11px;
    font-weight: 600;
    color: var(--ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
  }
  /* Always show ? info trigger on touch / tablet screens */
  .info-btn {
    opacity: 0.9;
    pointer-events: auto;
  }
  .hover-hud {
    width: min(320px, calc(100vw - 24px));
    z-index: 95;
  }
}

@media (max-width: 768px) {
  .header-inner {
    height: 52px;
    padding: 0 16px;
  }
  .page-container {
    padding: 20px 14px 64px;
  }
  .editorial-intro {
    margin-bottom: 22px;
  }
  .editorial-intro h1 {
    font-size: 23px;
  }
  .intro-lead {
    font-size: 14px;
  }
  .goal-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .progress-inline {
    width: 100%;
    justify-content: space-between;
  }
  .progress-track {
    flex: 1;
    max-width: 150px;
  }
  .goal-switcher {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    margin: 0 -2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .goal-switcher::-webkit-scrollbar {
    display: none;
  }
  .goal-btn {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 6px 12px;
    font-size: 12.5px;
  }
  .next-step-banner {
    padding: 14px 16px;
    gap: 12px;
  }
  .next-step-info {
    min-width: 0;
    width: 100%;
  }
  .next-step-banner .btn-primary {
    width: 100%;
    text-align: center;
  }
  .assessment-summary-head {
    flex-direction: column;
  }
  .assessment-summary-head .btn-primary,
  .assessment-summary-head .btn-outline {
    width: 100%;
    text-align: center;
  }
  .assessment-gap-list {
    grid-template-columns: 1fr;
  }
  .toolbar-right {
    flex-direction: column;
    align-items: stretch;
  }
  .layout-switcher {
    width: 100%;
  }
  .layout-btn {
    flex: 1;
    justify-content: center;
  }
  .clean-select {
    width: 100%;
  }
  .flow-canvas {
    padding: 20px 12px 28px;
  }
  .flow-stage-header {
    margin-bottom: 16px;
  }
  .flow-stage-pill {
    width: 100%;
    flex-direction: column;
    gap: 3px;
    padding: 10px 12px;
  }
  .flow-stage-name,
  .flow-stage-progress {
    padding-left: 0;
    border-left: 0;
  }
  .flow-level-tier {
    margin-bottom: 24px;
  }
  .flow-nodes-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .flow-node,
  .flow-node.single-spine-node {
    width: 100%;
    max-width: 100%;
    flex: none;
  }
  .milestones-grid {
    grid-template-columns: 1fr;
  }
  .milestone-card {
    padding: 16px;
  }
  .milestone-card h3 {
    min-height: 0;
  }
  .drawer-header {
    padding: 0 16px;
  }
  .drawer-body {
    padding: 20px 16px 45vh;
  }
  .drawer-title {
    font-size: 20px;
  }
  .drawer-review-heading {
    flex-direction: column;
  }
  .drawer-review-actions {
    width: 100%;
  }
  .drawer-review-actions .btn-outline {
    flex: 1;
  }
  .drawer-review-micro-body {
    padding-left: 12px;
  }
  .drawer-review-lessons {
    margin-left: 8px;
  }
}
