/* Rise2Edu PMP Academy — light theme design system */
:root {
  --bg: #f6f7fb;
  --bg-2: #eef0f7;
  --surface: #ffffff;
  --surface-2: #fafbff;
  --border: #e7e9f2;
  --border-2: #d9dcea;
  --text: #1c2033;
  --text-2: #464c63;
  --muted: #6b7189;
  --faint: #9aa0b6;

  --primary: #4f46e5;
  --primary-2: #6d28d9;
  --primary-soft: #eef0ff;
  --primary-ink: #3730a3;
  --accent: #f59e0b;
  --good: #16a34a;
  --good-soft: #e8f8ee;
  --bad: #dc2626;
  --bad-soft: #fdecec;
  --warn: #d97706;
  --warn-soft: #fff6e5;

  /* Focus areas (the colour code used everywhere) */
  --pre: #e11d48;      --pre-soft: #fff0f3;
  --ini: #7c3aed;      --ini-soft: #f4efff;
  --pln: #2563eb;      --pln-soft: #ecf3ff;
  --exe: #16a34a;      --exe-soft: #e9f9ef;
  --mon: #ea580c;      --mon-soft: #fff1e8;
  --clo: #0d9488;      --clo-soft: #e6f8f6;

  /* ECO domains */
  --people: #db2777;   --people-soft: #fdeef6;
  --process: #2563eb;  --process-soft: #ecf3ff;
  --business: #059669; --business-soft: #e7f8f1;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(20, 24, 50, 0.05);
  --shadow: 0 1px 2px rgba(20, 24, 50, 0.04), 0 6px 20px rgba(20, 24, 50, 0.06);
  --shadow-lg: 0 10px 40px rgba(30, 30, 80, 0.14);

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-head: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --sidebar: 264px;
  --topbar: 64px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.25; color: var(--text); margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 800; }
h2 { font-size: clamp(1.25rem, 2vw, 1.55rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
h4 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 1em; }
mark { background: linear-gradient(transparent 35%, #fde68a 35%, #fde68a 90%, transparent 90%); color: inherit; padding: 0 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: #c7d2fe; }
:focus-visible { outline: 3px solid #a5b4fc; outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--surface); border-right: 1px solid var(--border);
  padding: 18px 14px 24px; display: flex; flex-direction: column; gap: 4px; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-name { font-family: var(--font-head); font-weight: 800; font-size: 1.02rem; line-height: 1.15; }
.brand-name small { display: block; font-weight: 600; font-size: 0.72rem; color: var(--muted); letter-spacing: 0.02em; }
.nav-group { font-size: 0.7rem; font-weight: 700; color: var(--faint); letter-spacing: 0.09em; text-transform: uppercase; padding: 14px 10px 4px; }
.nav-link {
  display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px;
  color: var(--text-2); font-weight: 550; font-size: 0.94rem;
}
.nav-link:hover { background: var(--bg); text-decoration: none; color: var(--text); }
.nav-link.active { background: var(--primary-soft); color: var(--primary-ink); font-weight: 650; }
.nav-link .ni { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; font-size: 15px; background: var(--bg); flex: none; }
.nav-link.active .ni { background: #fff; box-shadow: var(--shadow-sm); }
.nav-link .count { margin-left: auto; font-size: 0.72rem; color: var(--muted); font-weight: 600; }
.sidebar-foot { margin-top: auto; padding: 14px 10px 0; font-size: 0.75rem; color: var(--faint); line-height: 1.5; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--topbar);
  display: flex; align-items: center; gap: 12px; padding: 0 28px;
  background: rgba(246, 247, 251, 0.86); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
}
.topbar.scrolled { border-bottom-color: var(--border); }
.btn.menu-btn { display: none; }
.search { position: relative; flex: 1; max-width: 520px; }
.search input {
  width: 100%; height: 42px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface);
  padding: 0 14px 0 40px; font-size: 0.94rem; box-shadow: var(--shadow-sm);
}
.search input:focus { outline: none; border-color: #a5b4fc; box-shadow: 0 0 0 4px #e0e7ff; }
.search .si { position: absolute; left: 13px; top: 11px; color: var(--faint); }
.search-results {
  position: absolute; top: 48px; left: 0; right: 0; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow-lg); max-height: 70vh; overflow-y: auto; padding: 6px; display: none;
}
.search-results.open { display: block; }
.sr-item { display: flex; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--text); align-items: flex-start; }
.sr-item:hover, .sr-item.sel { background: var(--bg); text-decoration: none; }
.sr-item .k { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.sr-item .t { font-weight: 600; font-size: 0.92rem; }
.sr-item .d { font-size: 0.82rem; color: var(--muted); }
.top-stats { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.chip-stat {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); font-weight: 650; font-size: 0.86rem; color: var(--text-2);
  box-shadow: var(--shadow-sm); white-space: nowrap;
}
.chip-stat:hover { text-decoration: none; border-color: var(--border-2); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 0.9rem;
  color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-2)); flex: none;
}
.content { padding: 8px 28px 64px; width: 100%; max-width: 1240px; margin: 0 auto; }
.content.narrow { max-width: 900px; }
.announce { margin: 12px 28px 0; padding: 10px 16px; border-radius: 12px; background: #fff8e1; border: 1px solid #fde68a; color: #7c5a00; font-size: 0.92rem; }

.bottom-nav { display: none; }
.scrim { display: none; }

@media (max-width: 1020px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 290px; transform: translateX(-100%); transition: transform 0.25s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .scrim.open { display: block; position: fixed; inset: 0; background: rgba(15, 18, 40, 0.35); z-index: 25; }
  .btn.menu-btn { display: inline-flex; }
  .topbar { padding: 0 16px; }
  .content { padding: 8px 16px 96px; }
  .announce { margin: 10px 16px 0; }
  .bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px); border-top: 1px solid var(--border); padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 0.68rem; font-weight: 600; color: var(--muted); padding: 4px 0; border-radius: 10px; }
  .bottom-nav a .bi { font-size: 1.2rem; line-height: 1.2; filter: grayscale(0.6); opacity: 0.8; }
  .bottom-nav a.active { color: var(--primary-ink); }
  .bottom-nav a.active .bi { filter: none; opacity: 1; }
  .bottom-nav a:hover { text-decoration: none; }
}
@media (max-width: 640px) {
  .top-stats .chip-stat.hide-sm { display: none; }
  .search input { font-size: 16px; }
}

/* ---------- Generic UI ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.card.flat { box-shadow: none; }
.card.pad-lg { padding: 28px; }
.grid { display: grid; gap: 18px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
@media (max-width: 1020px) { .grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; } }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }
.tiny { font-size: 0.76rem; }
.center { text-align: center; }
.mt0 { margin-top: 0; } .mt1 { margin-top: 8px; } .mt2 { margin-top: 16px; } .mt3 { margin-top: 28px; } .mt4 { margin-top: 44px; }
.mb0 { margin-bottom: 0; } .mb1 { margin-bottom: 8px; } .mb2 { margin-bottom: 16px; } .mb3 { margin-bottom: 28px; }
.hr { height: 1px; background: var(--border); margin: 24px 0; border: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 12px;
  border: 1px solid var(--border-2); background: var(--surface); color: var(--text); font-weight: 650; font-size: 0.94rem;
  cursor: pointer; transition: transform 0.06s ease, box-shadow 0.15s, background 0.15s; white-space: nowrap; text-decoration: none;
}
.btn:hover { text-decoration: none; box-shadow: var(--shadow); border-color: #c9cde0; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(135deg, var(--primary), #5b40ee); border-color: transparent; color: #fff; box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3); }
.btn.primary:hover { box-shadow: 0 6px 20px rgba(79, 70, 229, 0.38); }
.btn.good { background: var(--good); color: #fff; border-color: transparent; }
.btn.danger { background: #fff; color: var(--bad); border-color: #f5c2c2; }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--bg-2); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 0.85rem; border-radius: 10px; }
.btn.lg { height: 50px; padding: 0 24px; font-size: 1rem; border-radius: 14px; }
.btn.icon { width: 42px; padding: 0; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }

.pill {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 0.74rem;
  font-weight: 700; background: var(--bg-2); color: var(--text-2); white-space: nowrap; letter-spacing: 0.01em;
}
.pill.predictive { background: #e8f1ff; color: #1d4ed8; }
.pill.agile { background: #e8f8ee; color: #15803d; }
.pill.hybrid { background: #f4efff; color: #6d28d9; }
.pill.people { background: var(--people-soft); color: var(--people); }
.pill.process { background: var(--process-soft); color: var(--process); }
.pill.business { background: var(--business-soft); color: var(--business); }
.pill.done { background: var(--good-soft); color: var(--good); }
.pill.st-red { background: #fdecec; color: #b91c1c; }
.pill.st-amber { background: #fff4dc; color: #b45309; }
.pill.st-green { background: #e5f7ec; color: #15803d; }
.pill.st-blue { background: #e8f1ff; color: #1d4ed8; }
.pill.st-gray { background: #eef0f5; color: #4b5167; }

.tag { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 8px; font-size: 0.76rem; font-weight: 600; background: var(--bg-2); color: var(--text-2); }

.progress { height: 8px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), #8b5cf6); transition: width 0.5s ease; }
.progress.good > span { background: linear-gradient(90deg, #22c55e, #16a34a); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: 0.88rem; color: var(--text-2); }
.input, select.input, textarea.input {
  height: 44px; border-radius: 12px; border: 1px solid var(--border-2); background: #fff; padding: 0 14px; font-size: 0.96rem; width: 100%;
}
textarea.input { height: auto; padding: 10px 14px; min-height: 90px; resize: vertical; }
.input:focus { outline: none; border-color: #a5b4fc; box-shadow: 0 0 0 4px #e0e7ff; }
.form-error { color: var(--bad); font-size: 0.88rem; font-weight: 600; min-height: 1.2em; }

.tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--bg-2); border-radius: 12px; flex-wrap: wrap; }
.tabs button, .tabs a { border: 0; background: transparent; padding: 7px 14px; border-radius: 9px; font-weight: 600; font-size: 0.88rem; color: var(--muted); cursor: pointer; }
.tabs .on { background: #fff; color: var(--text); box-shadow: var(--shadow-sm); }
.tabs a:hover { text-decoration: none; }

.page-head { padding: 22px 0 18px; }
.page-head .eyebrow { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--primary); margin-bottom: 6px; }
.page-head p { color: var(--muted); max-width: 720px; margin: 0; }
.crumbs { font-size: 0.85rem; color: var(--muted); margin: 16px 0 0; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--primary); }

.toast-wrap { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: #1c2033; color: #fff; padding: 11px 18px; border-radius: 12px; font-weight: 600; font-size: 0.92rem; box-shadow: var(--shadow-lg); animation: toast-in 0.25s ease; }
.toast.xp { background: linear-gradient(135deg, #f59e0b, #f97316); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
@media (max-width: 1020px) { .toast-wrap { bottom: 86px; } }

.modal-back { position: fixed; inset: 0; background: rgba(15, 18, 40, 0.45); z-index: 90; display: grid; place-items: center; padding: 16px; animation: fade 0.15s; }
.modal { background: #fff; border-radius: 20px; padding: 26px; width: 100%; max-width: 460px; box-shadow: var(--shadow-lg); max-height: 90vh; overflow: auto; }
@keyframes fade { from { opacity: 0; } }

.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty .big { font-size: 2.6rem; }
.loading { display: grid; place-items: center; padding: 80px 0; color: var(--muted); }
.spinner { width: 34px; height: 34px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Home ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: 24px; padding: 34px; color: #fff;
  background: radial-gradient(1200px 400px at 110% -40%, rgba(236, 72, 153, 0.55), transparent 60%),
              radial-gradient(800px 400px at -10% 120%, rgba(56, 189, 248, 0.45), transparent 60%),
              linear-gradient(135deg, #4338ca 0%, #6d28d9 55%, #7c3aed 100%);
  box-shadow: 0 18px 50px rgba(79, 70, 229, 0.28);
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 26px; align-items: center;
}
.hero h1 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.35rem); margin-bottom: 10px; }
.hero p { color: rgba(255, 255, 255, 0.86); font-size: 1.04rem; max-width: 560px; }
.hero .btn.primary { background: #fff; color: var(--primary-ink); box-shadow: 0 6px 20px rgba(20, 10, 80, 0.25); }
.hero .btn.glass { background: rgba(255, 255, 255, 0.14); color: #fff; border-color: rgba(255, 255, 255, 0.3); }
.hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hero-stat { background: rgba(255, 255, 255, 0.13); border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 16px; padding: 14px 16px; backdrop-filter: blur(6px); }
.hero-stat .v { font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.hero-stat .l { font-size: 0.8rem; opacity: 0.85; font-weight: 600; }
.hero-deco { position: absolute; right: -40px; top: -40px; width: 260px; opacity: 0.12; pointer-events: none; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; padding: 24px; } }

.path { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; position: relative; }
.path-step { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 18px; box-shadow: var(--shadow); color: var(--text); display: flex; flex-direction: column; gap: 8px; }
.path-step:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.path-step { transition: transform 0.15s, box-shadow 0.15s; }
.path-step .num { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; color: #fff; font-family: var(--font-head); }
.path-step h4 { margin: 4px 0 0; }
.path-step .sub { font-size: 0.84rem; color: var(--muted); flex: 1; }
@media (max-width: 1020px) { .path { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .path { grid-template-columns: 1fr; } }

.lifecycle-band { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.lc-step { border-radius: 14px; padding: 14px 12px; color: #fff; position: relative; min-height: 104px; display: flex; flex-direction: column; gap: 4px; }
.lc-step .e { font-size: 1.4rem; }
.lc-step b { font-family: var(--font-head); font-size: 0.95rem; line-height: 1.2; }
.lc-step span { font-size: 0.76rem; opacity: 0.92; line-height: 1.35; }
@media (max-width: 900px) { .lifecycle-band { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 480px) { .lifecycle-band { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 36px 0 14px; flex-wrap: wrap; }
.section-title h2 { margin: 0; }
.section-title a { font-weight: 600; font-size: 0.92rem; }

.quick { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); color: var(--text); }
.quick:hover { text-decoration: none; border-color: var(--border-2); transform: translateY(-1px); }
.quick { transition: transform 0.15s; }
.quick .qi { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.35rem; flex: none; }
.quick b { display: block; font-family: var(--font-head); }
.quick span { font-size: 0.84rem; color: var(--muted); }

.ring { position: relative; display: inline-grid; place-items: center; }
.ring svg { transform: rotate(-90deg); }
.ring .rv { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font-family: var(--font-head); font-weight: 800; line-height: 1.05; }
.ring .rv small { display: block; font-size: 0.62rem; font-weight: 700; opacity: 0.8; letter-spacing: 0.04em; }

/* ---------- Project cards & covers ---------- */
.proj-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); color: var(--text); transition: transform 0.15s, box-shadow 0.15s; }
.proj-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); text-decoration: none; }
.proj-cover { aspect-ratio: 16 / 8.2; position: relative; overflow: hidden; }
.proj-cover svg { width: 100%; height: 100%; display: block; }
.proj-cover .pnum { position: absolute; top: 12px; left: 12px; background: rgba(255, 255, 255, 0.92); border-radius: 10px; padding: 3px 10px; font-weight: 800; font-size: 0.78rem; color: var(--text); font-family: var(--font-head); }
.proj-cover .pdone { position: absolute; top: 12px; right: 12px; }
.proj-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.proj-body h3 { margin: 0; font-size: 1.08rem; }
.proj-body .sub { font-size: 0.88rem; color: var(--muted); }
.proj-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 0.8rem; color: var(--muted); }
.stage-dots { display: flex; gap: 4px; margin-top: auto; padding-top: 6px; }
.stage-dots i { flex: 1; height: 6px; border-radius: 4px; background: var(--bg-2); }

.proj-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; border-radius: 24px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.proj-hero .proj-cover { aspect-ratio: auto; min-height: 280px; }
.proj-hero .ph-body { padding: 28px; display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 900px) { .proj-hero { grid-template-columns: 1fr; } .proj-hero .proj-cover { min-height: 200px; aspect-ratio: 16/8; } .proj-hero .ph-body { padding: 20px; } }

.stage-road { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; counter-reset: st; }
.stage-tile { position: relative; border-radius: 16px; padding: 16px 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); color: var(--text); display: flex; flex-direction: column; gap: 6px; transition: transform 0.15s; border-top: 5px solid var(--c); }
.stage-tile:hover { transform: translateY(-2px); text-decoration: none; }
.stage-tile .sn { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; color: var(--c); text-transform: uppercase; }
.stage-tile b { font-family: var(--font-head); font-size: 0.98rem; line-height: 1.25; }
.stage-tile .sm { font-size: 0.8rem; color: var(--muted); flex: 1; }
.stage-tile .check { position: absolute; top: 10px; right: 10px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--good); color: #fff; font-size: 0.8rem; }
@media (max-width: 1100px) { .stage-road { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .stage-road { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.cast { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.cast-item { display: flex; gap: 12px; padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.cast-item .ce { width: 44px; height: 44px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 1.4rem; box-shadow: var(--shadow-sm); flex: none; }
.cast-item b { display: block; font-size: 0.92rem; line-height: 1.3; }
.cast-item .r { font-size: 0.78rem; font-weight: 700; color: var(--primary); }
.cast-item .n { font-size: 0.8rem; color: var(--muted); line-height: 1.4; }

/* ---------- Reader (lessons & stages) ---------- */
.reader { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 36px; align-items: start; }
.reader-main { min-width: 0; }
.toc { position: sticky; top: calc(var(--topbar) + 16px); font-size: 0.86rem; max-height: calc(100vh - 100px); overflow: auto; }
.toc h4 { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); margin-bottom: 8px; }
.toc a { display: block; padding: 6px 10px; border-left: 2px solid var(--border); color: var(--muted); line-height: 1.35; }
.toc a:hover { color: var(--text); text-decoration: none; border-left-color: var(--border-2); }
.toc a.on { color: var(--primary-ink); border-left-color: var(--primary); font-weight: 600; background: var(--primary-soft); border-radius: 0 8px 8px 0; }
@media (max-width: 1100px) { .reader { grid-template-columns: 1fr; } .toc { display: none; } }

.stage-head { border-radius: 22px; padding: 26px 28px; color: #fff; position: relative; overflow: hidden; margin-top: 14px; }
.stage-head::after { content: ''; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%; background: rgba(255, 255, 255, 0.12); }
.stage-head .sh-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 0.8rem; font-weight: 700; opacity: 0.95; }
.stage-head .sh-top .pill { background: rgba(255, 255, 255, 0.2); color: #fff; }
.stage-head h1 { color: #fff; margin: 10px 0 6px; }
.stage-head p { opacity: 0.92; margin: 0; max-width: 720px; }
.stage-steps { display: flex; gap: 6px; margin-top: 18px; position: relative; z-index: 1; flex-wrap: wrap; }
.stage-steps a { flex: 1; min-width: 44px; padding: 6px 8px; border-radius: 10px; background: rgba(255, 255, 255, 0.16); color: #fff; font-size: 0.74rem; font-weight: 700; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage-steps a.on { background: #fff; color: var(--text); }
.stage-steps a.done::before { content: '✓ '; }
.stage-steps a:hover { text-decoration: none; background: rgba(255, 255, 255, 0.3); }
.stage-steps a.on:hover { background: #fff; }

.lesson-head { display: flex; gap: 18px; align-items: center; padding: 22px 0 8px; }
.lesson-icon { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; font-size: 2rem; background: linear-gradient(135deg, #eef0ff, #f5edff); border: 1px solid #e3e1ff; flex: none; }

.prose { font-size: 1.02rem; color: var(--text); }
.prose > * { margin-bottom: 18px; }
.prose h3.bh { font-size: 1.32rem; margin: 40px 0 14px; padding-top: 6px; scroll-margin-top: 90px; display: flex; align-items: center; gap: 10px; }
.prose h3.bh::before { content: ''; width: 6px; height: 26px; border-radius: 3px; background: var(--hc, var(--primary)); flex: none; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--hc, var(--primary)); }
.block-title { font-family: var(--font-head); font-weight: 700; font-size: 1rem; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.artifact-tag { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 2px 8px; border-radius: 6px; background: #fff7e6; color: #b45309; border: 1px solid #fde4b0; }

.callout { border-radius: 16px; padding: 16px 18px 16px 18px; border: 1px solid; display: flex; gap: 14px; }
.callout .ci { font-size: 1.35rem; line-height: 1.2; flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: #fff; box-shadow: var(--shadow-sm); }
.callout .cb { min-width: 0; flex: 1; }
.callout .ct { font-weight: 800; font-family: var(--font-head); font-size: 0.82rem; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 4px; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout ul { margin: 4px 0 0; padding-left: 1.2em; }
.callout.simple { background: #eff6ff; border-color: #cfe1ff; } .callout.simple .ct { color: #1d4ed8; }
.callout.example, .callout.story { background: #fffaeb; border-color: #fbe3a6; } .callout.example .ct, .callout.story .ct { color: #b45309; }
.callout.memory { background: #f6f0ff; border: 2px dashed #c9b3ff; } .callout.memory .ct { color: #6d28d9; }
.callout.exam { background: #fff1f3; border-color: #fecdd6; } .callout.exam .ct { color: #be123c; }
.callout.pmi { background: #eef0ff; border-color: #d4d8ff; } .callout.pmi .ct { color: #4338ca; }
.callout.warning { background: #fef2f2; border-color: #fbcaca; } .callout.warning .ct { color: #b91c1c; }
.callout.tip { background: #ecfdf3; border-color: #bbf0d0; } .callout.tip .ct { color: #15803d; }
.callout.interview { background: #ecfeff; border-color: #b5ecf3; } .callout.interview .ct { color: #0e7490; }

.tbl-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--border); background: #fff; box-shadow: var(--shadow-sm); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.tbl th { background: var(--surface-2); text-align: left; font-weight: 700; color: var(--text-2); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; padding: 11px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: top; line-height: 1.5; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:nth-child(even) td { background: #fcfcff; }
.tbl td:first-child { font-weight: 600; }
.tbl-note { font-size: 0.84rem; color: var(--muted); padding: 10px 14px; border-top: 1px solid var(--border); background: var(--surface-2); }

.kv { border-radius: 16px; border: 1px solid var(--border); overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); }
.kv-title { padding: 14px 18px; background: linear-gradient(90deg, var(--hc-soft, var(--primary-soft)), #fff); font-family: var(--font-head); font-weight: 800; border-bottom: 1px solid var(--border); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.kv-row { display: grid; grid-template-columns: 210px 1fr; border-bottom: 1px solid var(--border); }
.kv-row:last-child { border-bottom: 0; }
.kv-row > div { padding: 11px 18px; font-size: 0.94rem; }
.kv-row > div:first-child { background: var(--surface-2); font-weight: 700; color: var(--text-2); font-size: 0.86rem; }
.kv-row ul { margin: 0; padding-left: 1.1em; }
@media (max-width: 640px) { .kv-row { grid-template-columns: 1fr; } .kv-row > div:first-child { padding-bottom: 4px; } }

.dialogue { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 18px; background: linear-gradient(180deg, #f7f8ff, #fbfbff); border: 1px solid var(--border); }
.bubble { display: flex; gap: 10px; max-width: 88%; }
.bubble.right { align-self: flex-end; flex-direction: row-reverse; }
.bubble .who-av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 1.15rem; background: #fff; box-shadow: var(--shadow-sm); flex: none; }
.bubble .bt { background: #fff; border: 1px solid var(--border); border-radius: 4px 16px 16px 16px; padding: 9px 14px; font-size: 0.95rem; box-shadow: var(--shadow-sm); }
.bubble.right .bt { background: #eef0ff; border-color: #dcdfff; border-radius: 16px 4px 16px 16px; }
.bubble .bw { font-size: 0.74rem; font-weight: 800; color: var(--primary); display: block; margin-bottom: 2px; }

.steps { counter-reset: s; display: flex; flex-direction: column; gap: 10px; }
.step { display: flex; gap: 14px; padding: 14px 16px; border-radius: 14px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.step::before { counter-increment: s; content: counter(s); width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--hc, var(--primary)); flex: none; font-family: var(--font-head); font-size: 0.9rem; }
.step b { display: block; margin-bottom: 2px; }
.step p { margin: 0; color: var(--text-2); font-size: 0.94rem; }
.step .tag { margin-top: 6px; background: var(--hc-soft, var(--primary-soft)); color: var(--hc, var(--primary)); }

.cards { display: grid; gap: 12px; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); }
.ccard { padding: 16px; border-radius: 16px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.ccard .cic { font-size: 1.6rem; margin-bottom: 6px; }
.ccard b { display: block; font-family: var(--font-head); margin-bottom: 4px; }
.ccard p { margin: 0; font-size: 0.9rem; color: var(--text-2); line-height: 1.55; }
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .cards { grid-template-columns: 1fr; } }

.compare { display: grid; gap: 12px; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); }
.cmp { border-radius: 16px; border: 1px solid var(--border); background: #fff; overflow: hidden; box-shadow: var(--shadow-sm); }
.cmp-h { padding: 12px 16px; font-family: var(--font-head); font-weight: 800; color: #fff; display: flex; gap: 8px; align-items: center; }
.cmp ul { margin: 0; padding: 12px 16px 14px 32px; font-size: 0.93rem; }
.cmp li { margin-bottom: 6px; }
@media (max-width: 640px) { .compare { grid-template-columns: 1fr; } }

.flow { display: flex; align-items: stretch; gap: 0; flex-wrap: wrap; row-gap: 12px; }
.flow-step { display: flex; align-items: center; }
.flow-box { padding: 12px 14px; border-radius: 14px; background: #fff; border: 2px solid var(--fc, var(--primary)); min-width: 110px; max-width: 200px; font-size: 0.88rem; font-weight: 650; line-height: 1.35; text-align: center; box-shadow: var(--shadow-sm); }
.flow-box small { display: block; font-weight: 500; color: var(--muted); font-size: 0.78rem; margin-top: 3px; }
.flow-arrow { width: 34px; display: grid; place-items: center; color: var(--faint); font-size: 1.2rem; font-weight: 700; }
@media (max-width: 640px) { .flow { flex-direction: column; } .flow-step { flex-direction: column; } .flow-box { max-width: none; width: 100%; } .flow-arrow { transform: rotate(90deg); height: 26px; } }

.formulas { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.fcard { border-radius: 16px; padding: 14px 16px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.fcard .fn { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.fcard .ff { font-family: 'SFMono-Regular', ui-monospace, Menlo, Consolas, monospace; font-weight: 700; font-size: 1.02rem; color: var(--primary-ink); background: var(--primary-soft); border-radius: 10px; padding: 8px 10px; margin: 6px 0; }
.fcard .fm { font-size: 0.88rem; color: var(--text-2); }
.fcard .fx { font-size: 0.82rem; color: var(--muted); margin-top: 6px; border-top: 1px dashed var(--border); padding-top: 6px; }

.star { border-radius: 18px; border: 1px solid #b5ecf3; background: linear-gradient(180deg, #f0fdff, #fff); overflow: hidden; box-shadow: var(--shadow-sm); }
.star-q { padding: 14px 18px; background: #0e7490; color: #fff; font-weight: 700; display: flex; gap: 10px; align-items: flex-start; }
.star-q small { display: block; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.8; }
.star-row { display: grid; grid-template-columns: 44px 1fr; gap: 12px; padding: 12px 18px; border-bottom: 1px dashed #cdeff4; align-items: start; }
.star-row:last-child { border-bottom: 0; }
.star-row .sl { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; color: #fff; font-family: var(--font-head); }
.star-row .sx b { display: block; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.star-row p, .star-row ul { margin: 0; font-size: 0.95rem; }

.raci td.rc { text-align: center; font-weight: 800; width: 1%; white-space: nowrap; }
.rc span { display: inline-grid; place-items: center; min-width: 32px; height: 28px; padding: 0 6px; border-radius: 8px; font-size: 0.82rem; }
.rc-R { background: #dbeafe; color: #1d4ed8; } .rc-A { background: #fee2e2; color: #b91c1c; } .rc-C { background: #fef3c7; color: #b45309; } .rc-I { background: #e5e7eb; color: #4b5563; } .rc-AR { background: linear-gradient(135deg, #fee2e2 50%, #dbeafe 50%); color: #7f1d1d; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.8rem; color: var(--muted); padding: 10px 14px; border-top: 1px solid var(--border); background: var(--surface-2); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

.eng td.lv { text-align: center; width: 13%; }
.eng .mk { display: inline-grid; place-items: center; min-width: 30px; height: 28px; border-radius: 8px; font-weight: 800; font-size: 0.8rem; }
.eng .mk.c { background: #fee2e2; color: #b91c1c; }
.eng .mk.d { background: #dcfce7; color: #15803d; }
.eng .mk.cd { background: linear-gradient(135deg, #fee2e2 50%, #dcfce7 50%); color: #14532d; }

.checklist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.checklist label { display: flex; gap: 12px; align-items: flex-start; padding: 11px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--border); cursor: pointer; font-size: 0.95rem; }
.checklist input { width: 20px; height: 20px; accent-color: var(--good); margin-top: 2px; flex: none; }
.checklist input:checked + span { color: var(--muted); text-decoration: line-through; }

.terms { display: flex; gap: 8px; flex-wrap: wrap; }
.terms a { padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--border); font-size: 0.85rem; font-weight: 600; color: var(--text-2); }
.terms a:hover { border-color: #a5b4fc; color: var(--primary-ink); text-decoration: none; }

.remember { border-radius: 20px; padding: 22px; background: linear-gradient(135deg, #1e1b4b, #312e81); color: #fff; margin-top: 40px; }
.remember h3 { color: #fff; display: flex; gap: 10px; align-items: center; }
.remember ol { margin: 0; padding-left: 1.3em; }
.remember li { margin-bottom: 8px; color: #e0e7ff; }
.remember li::marker { color: #fbbf24; font-weight: 800; }

.complete-bar { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 18px; border-radius: 18px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow); }

/* ---------- Diagrams ---------- */
.fig { margin: 0; border-radius: 18px; border: 1px solid var(--border); background: #fff; box-shadow: var(--shadow-sm); overflow: hidden; }
.fig-head { padding: 12px 16px; border-bottom: 1px solid var(--border); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-family: var(--font-head); font-weight: 700; font-size: 0.96rem; }
.fig-head .fk { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); background: var(--bg-2); padding: 2px 8px; border-radius: 6px; }
.fig-body { padding: 16px; overflow-x: auto; }
.fig-body svg { display: block; margin: 0 auto; height: auto; }
.fig-body svg text { font-family: var(--font); }
.fig-cap { padding: 10px 16px; border-top: 1px solid var(--border); background: var(--surface-2); font-size: 0.86rem; color: var(--text-2); }
.fig-note { font-size: 0.86rem; color: var(--text-2); padding: 10px 16px; border-top: 1px solid var(--border); }
.fig-note b { color: var(--text); }
.scroll-hint { display: none; font-size: 0.74rem; color: var(--faint); text-align: right; padding: 0 16px 8px; }
@media (max-width: 760px) { .scroll-hint { display: block; } }

.wbs { min-width: max-content; padding: 4px; }
.wbs-root { margin: 0 auto 26px; width: max-content; max-width: 320px; padding: 12px 22px; border-radius: 14px; background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; font-weight: 800; font-family: var(--font-head); text-align: center; position: relative; }
.wbs-root::after { content: ''; position: absolute; left: 50%; bottom: -14px; width: 2px; height: 14px; background: var(--border-2); }
.wbs-row { display: flex; gap: 14px; position: relative; padding-top: 14px; justify-content: center; }
.wbs-col { position: relative; width: 168px; flex: none; }
.wbs-col::before { content: ''; position: absolute; top: -14px; left: 50%; width: 2px; height: 14px; background: var(--border-2); }
.wbs-col::after { content: ''; position: absolute; top: -14px; left: -8px; right: -8px; height: 2px; background: var(--border-2); }
.wbs-col:first-child::after { left: 50%; }
.wbs-col:last-child::after { right: 50%; }
.wbs-col:only-child::after { display: none; }
.wbs-l1 { padding: 10px 12px; border-radius: 12px; background: var(--wc-soft); border: 2px solid var(--wc); font-weight: 700; font-size: 0.88rem; line-height: 1.3; text-align: center; min-height: 56px; display: grid; place-items: center; }
.wbs-l2 { list-style: none; margin: 10px 0 0 12px; padding: 0 0 0 12px; border-left: 2px solid var(--border-2); }
.wbs-l2 li { position: relative; margin: 0 0 8px; padding: 7px 10px; border-radius: 10px; background: #fff; border: 1px solid var(--border); font-size: 0.8rem; line-height: 1.35; box-shadow: var(--shadow-sm); }
.wbs-l2 li::before { content: ''; position: absolute; left: -13px; top: 50%; width: 12px; height: 2px; background: var(--border-2); }
.wbs b.n { color: var(--wc); font-weight: 800; margin-right: 4px; }
.wbs-l1 b.n { color: inherit; opacity: 0.7; }
@media (max-width: 760px) {
  .wbs { min-width: 0; }
  .wbs-root { margin: 0 0 14px; max-width: none; width: 100%; }
  .wbs-root::after { display: none; }
  .wbs-row { flex-direction: column; padding: 0 0 0 14px; border-left: 2px solid var(--border-2); gap: 12px; margin-left: 12px; }
  .wbs-col { width: auto; }
  .wbs-col::before { top: 28px; left: -14px; width: 14px; height: 2px; }
  .wbs-col::after { display: none; }
  .wbs-l1 { min-height: 0; text-align: left; place-items: start; }
}

.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 1fr); gap: 12px; min-width: max-content; }
.kcol { background: var(--bg); border-radius: 14px; padding: 10px; min-width: 170px; }
.kcol-h { display: flex; justify-content: space-between; align-items: center; font-weight: 800; font-size: 0.82rem; margin-bottom: 8px; padding: 2px 4px; }
.kcol-h .wip { font-size: 0.7rem; padding: 2px 7px; border-radius: 6px; background: #fff; color: var(--muted); font-weight: 700; }
.kcol-h .wip.over { background: #fee2e2; color: #b91c1c; }
.kcard { background: #fff; border-radius: 10px; padding: 8px 10px; font-size: 0.8rem; margin-bottom: 7px; border-left: 4px solid var(--kc, var(--primary)); box-shadow: var(--shadow-sm); line-height: 1.35; }

.timeline { display: grid; grid-template-columns: repeat(var(--n), minmax(110px, 1fr)); gap: 0; min-width: max-content; position: relative; padding-top: 6px; }
.tl-item { position: relative; padding: 30px 8px 0; text-align: center; }
.tl-item::before { content: ''; position: absolute; top: 11px; left: 0; right: 0; height: 3px; background: var(--border-2); }
.tl-item:first-child::before { left: 50%; }
.tl-item:last-child::before { right: 50%; }
.tl-dot { position: absolute; top: 2px; left: 50%; transform: translateX(-50%); width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 4px solid var(--tc, var(--primary)); z-index: 1; }
.tl-item.done .tl-dot { background: var(--tc, var(--primary)); }
.tl-when { font-size: 0.72rem; font-weight: 800; color: var(--tc, var(--primary)); text-transform: uppercase; letter-spacing: 0.05em; }
.tl-label { font-weight: 700; font-size: 0.86rem; line-height: 1.3; margin-top: 2px; }
.tl-note { font-size: 0.76rem; color: var(--muted); line-height: 1.35; margin-top: 2px; }
@media (max-width: 760px) {
  .timeline { grid-template-columns: 1fr; min-width: 0; padding: 0 0 0 8px; }
  .tl-item { text-align: left; padding: 0 0 16px 34px; }
  .tl-item::before { top: 0; bottom: 0; left: 9px; right: auto; width: 3px; height: auto; }
  .tl-item:first-child::before { left: 9px; top: 12px; }
  .tl-item:last-child::before { right: auto; bottom: calc(100% - 12px); }
  .tl-dot { left: 10px; top: 0; }
}

.ladder { display: flex; align-items: flex-end; gap: 8px; min-width: max-content; }
.lad { width: 150px; border-radius: 14px 14px 6px 6px; padding: 12px; color: #fff; display: flex; flex-direction: column; justify-content: flex-start; gap: 4px; box-sizing: border-box; }
.lad b { font-family: var(--font-head); font-size: 0.95rem; }
.lad span { font-size: 0.78rem; opacity: 0.92; line-height: 1.35; }
.lad.cur { outline: 4px solid #fbbf24; outline-offset: 2px; }
.lad .you { align-self: flex-start; background: #fbbf24; color: #3b2600; font-size: 0.66rem; font-weight: 800; padding: 1px 6px; border-radius: 5px; }
@media (max-width: 760px) { .ladder { flex-direction: column; align-items: stretch; min-width: 0; } .lad { width: auto !important; min-height: 0 !important; margin-left: calc(var(--i) * 14px); } }

.lifecycle { display: flex; align-items: center; gap: 0; min-width: max-content; }
.lc-phase { padding: 14px 16px; border-radius: 14px; color: #fff; min-width: 130px; max-width: 190px; }
.lc-phase b { display: block; font-family: var(--font-head); font-size: 0.92rem; }
.lc-phase span { font-size: 0.76rem; opacity: 0.9; line-height: 1.35; display: block; margin-top: 2px; }
.lc-gate { width: 54px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 0.62rem; font-weight: 800; color: var(--muted); text-transform: uppercase; }
.lc-gate i { width: 18px; height: 18px; transform: rotate(45deg); background: #fbbf24; border: 2px solid #b45309; border-radius: 3px; display: block; }
.lc-arrow { width: 24px; text-align: center; color: var(--faint); font-weight: 800; }
@media (max-width: 760px) { .lifecycle { flex-direction: column; align-items: stretch; min-width: 0; } .lc-phase { max-width: none; } .lc-gate { width: auto; flex-direction: row; justify-content: center; padding: 4px 0; } .lc-arrow { transform: rotate(90deg); } }

.budget { padding: 4px 0; }
.budget-bar { display: flex; height: 46px; border-radius: 12px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04); }
.budget-bar > div { display: grid; place-items: center; color: #fff; font-size: 0.72rem; font-weight: 700; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 0 4px; border-right: 2px solid #fff; }
.budget-bar > div:last-child { border-right: 0; }
.budget-br { position: relative; height: 40px; margin-top: 6px; }
.budget-br > div { position: absolute; top: 0; height: 12px; border: 2px solid; border-top: 0; border-radius: 0 0 8px 8px; }
.budget-br > div span { position: absolute; top: 14px; left: 0; right: 0; text-align: center; font-size: 0.78rem; font-weight: 800; white-space: nowrap; }
.budget-legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 16px; margin-top: 18px; font-size: 0.85rem; }
.budget-legend div { display: flex; gap: 8px; align-items: center; }
.budget-legend i { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.budget-legend b { margin-left: auto; font-variant-numeric: tabular-nums; }
.budget-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-top: 14px; }
.budget-sum div { border-radius: 12px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border); font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.budget-sum b { display: block; font-size: 1.1rem; color: var(--text); font-family: var(--font-head); }

/* ---------- Questions ---------- */
.qbox { border-radius: 20px; border: 1px solid var(--border); background: #fff; box-shadow: var(--shadow); overflow: hidden; }
.qbox .qh { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 14px 18px 0; }
.qbox .qh .qlabel { font-family: var(--font-head); font-weight: 800; font-size: 0.82rem; color: var(--primary); text-transform: uppercase; letter-spacing: 0.06em; margin-right: 4px; }
.qbox .qt { padding: 10px 18px 6px; font-size: 1.02rem; font-weight: 550; line-height: 1.6; }
.qbox .qmulti { padding: 0 18px; font-size: 0.82rem; color: var(--warn); font-weight: 700; }
.opts { display: flex; flex-direction: column; gap: 9px; padding: 12px 18px 6px; }
.opt { display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--border); background: #fff; cursor: pointer; font-size: 0.96rem; line-height: 1.5; transition: border-color 0.12s, background 0.12s; }
.opt:hover { border-color: #c7cdf5; background: #fafaff; }
.opt .ol { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 0.85rem; background: var(--bg-2); color: var(--text-2); flex: none; font-family: var(--font-head); }
.opt.sel { border-color: var(--primary); background: var(--primary-soft); }
.opt.sel .ol { background: var(--primary); color: #fff; }
.opt.right { border-color: #22c55e; background: #f0fdf4; }
.opt.right .ol { background: #16a34a; color: #fff; }
.opt.wrong { border-color: #f87171; background: #fef2f2; }
.opt.wrong .ol { background: #dc2626; color: #fff; }
.opt.locked { cursor: default; }
.opt .ow { display: block; font-size: 0.85rem; color: var(--text-2); margin-top: 6px; font-weight: 450; }
.opt .otext { flex: 1; min-width: 0; }
.qfoot { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 18px 18px; }
.qexplain { margin: 6px 18px 0; padding: 14px 16px; border-radius: 14px; font-size: 0.95rem; }
.qexplain.ok { background: #f0fdf4; border: 1px solid #bbf7d0; }
.qexplain.no { background: #fff7ed; border: 1px solid #fed7aa; }
.qexplain .qr { font-family: var(--font-head); font-weight: 800; margin-bottom: 4px; }
.qexplain p:last-child { margin: 0; }
.decide-wrap .qbox { border: 2px solid #c7d2fe; }
.decide-wrap .qbox .qh .qlabel::before { content: '🤔 '; }

/* Quiz runner */
.quiz-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: space-between; margin: 16px 0; }
.timer { font-family: var(--font-head); font-weight: 800; font-size: 1.1rem; padding: 6px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.timer.low { color: var(--bad); border-color: #fecaca; }
.qnav { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 6px; }
.qnav button { height: 36px; border-radius: 9px; border: 1px solid var(--border); background: #fff; font-weight: 700; font-size: 0.82rem; cursor: pointer; position: relative; }
.qnav button.ans { background: var(--primary-soft); border-color: #c7d2fe; color: var(--primary-ink); }
.qnav button.cur { outline: 3px solid var(--primary); }
.qnav button.flag::after { content: ''; position: absolute; top: 3px; right: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.qnav button.ok { background: #dcfce7; border-color: #86efac; color: #15803d; }
.qnav button.bad { background: #fee2e2; border-color: #fca5a5; color: #b91c1c; }
.score-big { font-family: var(--font-head); font-size: 3.4rem; font-weight: 800; line-height: 1; }
.rating { display: inline-flex; padding: 6px 14px; border-radius: 999px; font-weight: 800; font-size: 0.9rem; }
.domain-bars { display: flex; flex-direction: column; gap: 12px; }
.dbar .dl { display: flex; justify-content: space-between; font-size: 0.88rem; font-weight: 650; margin-bottom: 5px; }
.dbar .progress { height: 10px; }

.option-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.opt-tile { padding: 12px; border-radius: 14px; border: 2px solid var(--border); background: #fff; cursor: pointer; text-align: left; font-weight: 650; font-size: 0.9rem; }
.opt-tile small { display: block; font-weight: 500; color: var(--muted); font-size: 0.78rem; }
.opt-tile.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-ink); }

/* Flashcards */
.deck { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 18px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow); color: var(--text); }
.deck:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.deck { transition: transform 0.15s, box-shadow 0.15s; }
.deck .di { font-size: 2rem; }
.deck .dn { display: flex; gap: 8px; flex-wrap: wrap; font-size: 0.78rem; }
.flip-wrap { perspective: 1400px; max-width: 640px; margin: 0 auto; }
.flip { position: relative; height: 340px; transform-style: preserve-3d; transition: transform 0.5s cubic-bezier(0.3, 0.7, 0.3, 1); cursor: pointer; }
.flip.on { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 24px; padding: 30px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; box-shadow: var(--shadow-lg); overflow: auto; }
.face.front { background: linear-gradient(135deg, #ffffff, #f5f3ff); border: 1px solid #e4e0ff; }
.face.back { background: linear-gradient(135deg, #312e81, #4c1d95); color: #fff; transform: rotateY(180deg); }
.face.back mark { background: linear-gradient(transparent 35%, rgba(251, 191, 36, 0.55) 35%, rgba(251, 191, 36, 0.55) 90%, transparent 90%); color: #fff; }
.face .fq { font-family: var(--font-head); font-size: clamp(1.15rem, 2.4vw, 1.5rem); font-weight: 700; line-height: 1.4; }
.face .fa { font-size: 1.06rem; line-height: 1.6; white-space: pre-line; }
.face .fhint { position: absolute; bottom: 14px; font-size: 0.76rem; color: var(--faint); font-weight: 600; }
.face.back .fhint { color: rgba(255, 255, 255, 0.6); }
.srs-btns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 640px; margin: 18px auto 0; }
.srs-btns .btn { flex-direction: column; height: 58px; gap: 0; font-size: 0.9rem; }
.srs-btns .btn small { font-weight: 500; font-size: 0.7rem; color: var(--muted); }
.box-bar { display: flex; gap: 4px; }
.box-bar span { flex: 1; text-align: center; font-size: 0.7rem; font-weight: 700; padding: 6px 0; border-radius: 8px; background: var(--bg-2); color: var(--muted); }

/* Glossary */
.az { display: flex; flex-wrap: wrap; gap: 4px; }
.az button { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border); background: #fff; font-weight: 700; cursor: pointer; font-size: 0.85rem; }
.az button.on { background: var(--primary); color: #fff; border-color: var(--primary); }
.az button:disabled { opacity: 0.35; cursor: default; }
.gterm { padding: 16px 18px; border-radius: 16px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.gterm b { font-family: var(--font-head); font-size: 1.02rem; }
.gterm p { margin: 4px 0 0; font-size: 0.94rem; color: var(--text-2); }
.gterm .gx { font-size: 0.86rem; color: var(--muted); margin-top: 6px; padding-left: 10px; border-left: 3px solid #fde68a; }

/* Interview */
.iv { border-radius: 18px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-sm); overflow: hidden; }
.iv-q { padding: 16px 18px; display: flex; gap: 12px; align-items: flex-start; cursor: pointer; width: 100%; background: none; border: 0; text-align: left; }
.iv-q .qn { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: #ecfeff; color: #0e7490; font-weight: 800; flex: none; font-size: 0.85rem; }
.iv-q b { font-size: 1rem; line-height: 1.45; flex: 1; }
.iv-q .chev { transition: transform 0.2s; color: var(--faint); }
.iv.open .iv-q .chev { transform: rotate(180deg); }
.iv-a { display: none; padding: 0 18px 18px 62px; }
.iv.open .iv-a { display: block; }
.iv-why { font-size: 0.88rem; color: var(--muted); background: var(--surface-2); padding: 10px 12px; border-radius: 12px; margin-bottom: 12px; }
@media (max-width: 640px) { .iv-a { padding: 0 16px 16px; } }

/* Profile */
.heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 13px); gap: 3px; overflow-x: auto; padding-bottom: 4px; }
.heat i { width: 13px; height: 13px; border-radius: 3px; background: #eceef5; }
.heat i.l1 { background: #c7d2fe; } .heat i.l2 { background: #818cf8; } .heat i.l3 { background: #4f46e5; } .heat i.l4 { background: #312e81; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.badge { text-align: center; padding: 16px 10px; border-radius: 16px; background: #fff; border: 1px solid var(--border); }
.badge .be { font-size: 2rem; filter: grayscale(1); opacity: 0.35; }
.badge.got .be { filter: none; opacity: 1; }
.badge b { display: block; font-size: 0.86rem; margin-top: 4px; }
.badge span { font-size: 0.74rem; color: var(--muted); line-height: 1.35; display: block; }
.badge.got { border-color: #fde68a; background: linear-gradient(180deg, #fffbeb, #fff); }
.stat-tile { padding: 18px; border-radius: 18px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow); }
.stat-tile .sv { font-family: var(--font-head); font-size: 1.8rem; font-weight: 800; line-height: 1.1; }
.stat-tile .sl { font-size: 0.82rem; color: var(--muted); font-weight: 600; }
.stat-tile .se { font-size: 1.3rem; float: right; }

/* Admin */
.admin-table td, .admin-table th { white-space: nowrap; }
.admin-shell { max-width: 1200px; }

/* Tools */
.calc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.res { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.res .rn { font-size: 0.72rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.res .rv2 { font-family: var(--font-head); font-size: 1.25rem; font-weight: 800; }
.res .rm { font-size: 0.78rem; color: var(--muted); line-height: 1.35; }
.res.good { background: #f0fdf4; border-color: #bbf7d0; } .res.good .rv2 { color: #15803d; }
.res.bad { background: #fef2f2; border-color: #fecaca; } .res.bad .rv2 { color: #b91c1c; }
.act-table input { height: 36px; border-radius: 8px; border: 1px solid var(--border-2); padding: 0 8px; width: 100%; min-width: 60px; }

/* Print (cheat sheets) */
@media print {
  .sidebar, .topbar, .bottom-nav, .no-print, .announce, .toast-wrap { display: none !important; }
  .layout { display: block; }
  .content { padding: 0; max-width: none; }
  body { background: #fff; font-size: 12px; }
  .card, .fig, .tbl-wrap, .fcard, .ccard, .cmp, .kv { box-shadow: none !important; break-inside: avoid; }
}

@media (max-width: 520px) {
  .srs-btns { grid-template-columns: repeat(2, 1fr); }
  .flip { height: 300px; }
  .face { padding: 22px; }
}
@media (max-width: 640px) {
  .stage-steps a { flex: 1 1 30%; }
  .stage-head { padding: 22px 18px; }
  .proj-hero .ph-body .btn.primary { margin-left: 0 !important; }
}
@media (max-width: 640px) {
  .btn:not(.icon) { white-space: normal; height: auto; min-height: 42px; padding-top: 8px; padding-bottom: 8px; text-align: center; line-height: 1.3; }
  .btn.sm:not(.icon) { min-height: 34px; padding-top: 6px; padding-bottom: 6px; }
  .complete-bar .row, .complete-bar .row .btn { width: 100%; }
}
