/* ==========================================================================
   Pages — home, course overview, lesson rail, knowledge map, roadmap map.
   ========================================================================== */

:root {
  /* path cards (home) */
  --path-fund-bg: #245c8c; --path-fund-fg: #f3f8fc; --path-fund-art: #bfe3ff; --path-fund-line: rgba(255,255,255,.22);
  --path-lld-bg: #7fe0a0;  --path-lld-fg: #10331f;  --path-lld-art: #19c49a;  --path-lld-line: rgba(16,51,31,.18);
  --path-hld-bg: #efe6d2;  --path-hld-fg: #3a3122;  --path-hld-art: #f7d9a0;  --path-hld-line: rgba(58,49,34,.16);
  --path-iv-bg: #1f1f20;   --path-iv-fg: #f2f2f2;   --path-iv-art: #444;     --path-iv-line: rgba(255,255,255,.14);
  /* tiles (home) */
  --tile-pink: #f2b5ae; --tile-orange: #e8852f; --tile-paper: var(--surface); --tile-blue: #1d5fd6;
  --tile-green: #5dc792; --tile-lavender: #c3b8ec; --tile-sky: #6cbde2; --tile-yellow: #efcf82;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --path-fund-bg: #1f4d73; --path-fund-art: #7fb7e6;
    --path-lld-bg: #235c3a;  --path-lld-fg: #e2f7ea; --path-lld-art: #2fd3a6; --path-lld-line: rgba(255,255,255,.14);
    --path-hld-bg: #3a3326;  --path-hld-fg: #f2e9d6; --path-hld-art: #d9b87a; --path-hld-line: rgba(255,255,255,.12);
    --path-iv-bg: #232427;   --path-iv-art: #55575c;
  }
}
:root[data-theme="dark"] {
  --path-fund-bg: #1f4d73; --path-fund-art: #7fb7e6;
  --path-lld-bg: #235c3a;  --path-lld-fg: #e2f7ea; --path-lld-art: #2fd3a6; --path-lld-line: rgba(255,255,255,.14);
  --path-hld-bg: #3a3326;  --path-hld-fg: #f2e9d6; --path-hld-art: #d9b87a; --path-hld-line: rgba(255,255,255,.12);
  --path-iv-bg: #232427;   --path-iv-art: #55575c;
}

.px { font-family: var(--display); font-weight: 400; letter-spacing: -0.02em; }
.mono { font-family: var(--mono); }

/* stacked-card illustration (overview hero, path cards) */
.stack-art { position: relative; width: 132px; height: 104px; flex: none; }
.stack-art > span {
  position: absolute; width: 100px; height: 72px; border-radius: 6px;
  border: 1.5px solid var(--ink); background: var(--surface);
}
.stack-art > span:nth-child(1) { right: 0; top: 0; background: var(--line-2); }
.stack-art > span:nth-child(2) { right: 8px; top: 8px; background: var(--line); }
.stack-art > span:nth-child(3) { right: 16px; top: 16px; background: var(--surface-2); }
.stack-art > span:nth-child(4) {
  right: 24px; top: 24px; background: var(--t-reliability);
  display: flex; align-items: flex-end; padding: 6px 8px;
  font-family: var(--display); font-size: 11px; color: #0f2a1b; line-height: 1;
}

/* ================= HOME ================= */
.lp-hero { position: relative; padding: clamp(56px, 10vw, 120px) 16px clamp(40px, 6vw, 72px); overflow: hidden; text-align: center; }
.lp-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 60% 55% at 50% 45%, var(--surface) 0%, transparent 70%);
}
.lp-hero-in { position: relative; z-index: 2; max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.lp-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px;
  border: 1px solid var(--line-2); border-radius: 99px; background: var(--surface);
  font-size: var(--fs-fine); color: var(--ink-2); box-shadow: var(--lift-1);
}
.lp-pill:hover { text-decoration: none; border-color: var(--line-strong); }
.lp-pill-tag { font-family: var(--mono); font-size: 10px; padding: 2px 7px; border-radius: 99px; background: var(--ink); color: var(--ground); }
.lp-hero h1 { margin-top: 26px; font-size: clamp(2.5rem, 7.4vw, 5.1rem); line-height: 1; letter-spacing: -0.045em; font-weight: 500; }
.lp-hero h1 .px { letter-spacing: -0.04em; }
.lp-sub { margin-top: 24px; max-width: 60ch; font-size: clamp(1rem, 1.9vw, 1.15rem); color: var(--ink-2); line-height: 1.55; }
.lp-acts { margin-top: 30px; justify-content: center; }
.lp-code { font-size: .86em; opacity: .7; margin-inline: 2px; }
.lp-fine { margin-top: 18px; display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; font-family: var(--mono); font-size: var(--fs-fine); color: var(--ink-4); }
.lp-fine-k { display: inline-flex; gap: 5px; align-items: center; }

/* desk cards floating around the hero */
.lp-desk { display: none; }
@media (min-width: 1180px) {
  .lp-desk { display: block; position: absolute; inset: 0; z-index: 1; }
  .desk {
    position: absolute; width: 238px; padding: 16px 18px; border-radius: var(--r-lg);
    background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--lift-3);
    display: flex; flex-direction: column; gap: 6px; text-align: left; color: var(--ink);
    transition: transform var(--t-slow) var(--ease-out), box-shadow var(--t-mid) var(--ease);
    animation: deskIn .9s var(--ease-out) both;
  }
  .desk:hover { text-decoration: none; box-shadow: 0 18px 40px rgba(0,0,0,.14); }
  .desk b { font-size: 1.02rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; }
  .desk-k { font-family: var(--mono); font-size: 10px; color: var(--ink-4); }
  .desk-p { font-size: var(--fs-fine); color: var(--ink-3); line-height: 1.45; }
  .desk-q { color: var(--ink-4); }
  .desk-rule { height: 1px; background: var(--line); margin: 4px 0; }
  .desk-a { left: 4%; top: 12%; transform: rotate(-5deg); animation-delay: .05s; }
  .desk-a:hover { transform: rotate(-3deg) translateY(-4px); }
  .desk-b { left: 6%; bottom: 8%; width: 200px; transform: rotate(4deg); opacity: .92; animation-delay: .15s; }
  .desk-b:hover { transform: rotate(2deg) translateY(-4px); opacity: 1; }
  .desk-c { right: 4%; bottom: 10%; transform: rotate(-4deg); opacity: .92; animation-delay: .2s; }
  .desk-c:hover { transform: rotate(-2deg) translateY(-4px); opacity: 1; }
  .desk-pill {
    right: 5%; top: 16%; width: auto; flex-direction: row; align-items: center; gap: 12px;
    padding: 10px 14px; border-radius: 12px; background: var(--ink); color: var(--ground); border-color: transparent;
    transform: rotate(3deg); animation-delay: .1s;
  }
  .desk-pill:hover { transform: rotate(1deg) translateY(-3px); }
  .desk-pill-k { font-size: var(--fs-fine); padding: 3px 8px; border-radius: 6px; background: rgba(127,127,127,.25); }
  .desk-pill-v { font-size: 1.15rem; font-weight: 500; font-variant-numeric: tabular-nums; }
  .desk-blocks { display: inline-flex; gap: 3px; }
  .desk-blocks i { width: 5px; height: 16px; border-radius: 1.5px; background: currentColor; opacity: .25; }
  .desk-blocks i[data-on] { opacity: 1; }
  .lp-hero-in { max-width: 700px; }
}
@keyframes deskIn { from { opacity: 0; translate: 0 14px; } }

/* paths */
.paths { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); }
.path {
  --bg: var(--path-fund-bg); --fg: var(--path-fund-fg); --art: var(--path-fund-art); --ln: var(--path-fund-line);
  display: flex; flex-direction: column; gap: 10px; padding: 22px 22px 20px; min-height: 440px;
  border-radius: var(--r-xl); background: var(--bg); color: var(--fg);
  transition: transform var(--t-mid) var(--ease), box-shadow var(--t-mid) var(--ease);
}
.path:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--lift-3); }
.path-lld { --bg: var(--path-lld-bg); --fg: var(--path-lld-fg); --art: var(--path-lld-art); --ln: var(--path-lld-line); }
.path-hld { --bg: var(--path-hld-bg); --fg: var(--path-hld-fg); --art: var(--path-hld-art); --ln: var(--path-hld-line); }
.path-iv  { --bg: var(--path-iv-bg);  --fg: var(--path-iv-fg);  --art: var(--path-iv-art);  --ln: var(--path-iv-line); }
.path-art { position: relative; height: 150px; margin-bottom: 12px; display: flex; align-items: center; justify-content: center; }
.path-lines { position: absolute; inset: 0 0 auto; height: 70px; background: repeating-linear-gradient(to bottom, var(--ln) 0 1px, transparent 1px 7px); }
.path .stack-art > span { border-color: var(--fg); }
.path .stack-art > span:nth-child(1), .path .stack-art > span:nth-child(2), .path .stack-art > span:nth-child(3) { background: var(--bg); }
.path .stack-art > span:nth-child(4) { background: var(--art); color: #111; }
.path-iv .stack-art > span:nth-child(4) { color: var(--fg); }
.path-k { font-family: var(--mono); font-size: 10px; opacity: .78; text-transform: uppercase; letter-spacing: .06em; }
.path h3 { font-size: 1.7rem; line-height: 1.05; }
.path ul { margin: 2px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 5px; font-size: var(--fs-small); }
.path li { display: flex; gap: 8px; opacity: .9; }
.path li::before { content: "+"; font-family: var(--mono); opacity: .7; }
.path-meta { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .07em; opacity: .78; margin-top: 4px; }
.path-prog { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 10px; opacity: .85; }
.path-bar { flex: 1; height: 3px; background: var(--ln); overflow: hidden; }
.path-bar > span { display: block; height: 100%; background: currentColor; }
.path-go { margin-top: auto; padding-top: 16px; display: flex; justify-content: space-between; font-size: var(--fs-small); font-weight: 600; }

/* tiles */
.tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); }
.tile {
  --tbg: var(--tile-pink); --tfg: #1f1b1a;
  position: relative; display: flex; flex-direction: column; min-height: 230px; padding: 18px 20px;
  border-radius: var(--r-xl); background: var(--tbg); color: var(--tfg);
  transition: transform var(--t-mid) var(--ease), box-shadow var(--t-mid) var(--ease);
}
.tile:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--lift-3); }
.tile-orange { --tbg: var(--tile-orange); }
.tile-paper { --tbg: var(--tile-paper); --tfg: var(--ink); border: 1px solid var(--line-2); }
.tile-blue { --tbg: var(--tile-blue); --tfg: #fff; }
.tile-green { --tbg: var(--tile-green); }
.tile-lavender { --tbg: var(--tile-lavender); }
.tile-sky { --tbg: var(--tile-sky); }
.tile-yellow { --tbg: var(--tile-yellow); }
.tile-n { align-self: flex-end; font-size: 2.4rem; font-weight: 500; letter-spacing: -0.04em; line-height: 1; }
.tile-k { align-self: flex-end; font-family: var(--mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: .1em; opacity: .9; margin-top: 4px; }
.tile-t { margin-top: auto; font-size: 1.6rem; font-weight: 500; letter-spacing: -0.03em; line-height: 1.05; }
.tile-s { font-size: var(--fs-fine); opacity: .9; margin-top: 4px; padding-right: 44px; }
.tile-go {
  position: absolute; right: 18px; bottom: 18px; width: 32px; height: 32px; border-radius: 99px;
  display: grid; place-items: center; background: rgba(0,0,0,.1); font-size: 14px;
  transition: transform var(--t-mid) var(--ease);
}
.tile-blue .tile-go { background: rgba(255,255,255,.2); }
.tile:hover .tile-go { transform: translateX(3px); }

/* three keys */
.lp-keys { display: grid; gap: clamp(24px, 4vw, 56px); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 900px) { .lp-keys { grid-template-columns: .9fr 1.3fr; } }
.lp-keys-txt h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); letter-spacing: -0.03em; }
.lp-keys-txt p { margin-top: 12px; color: var(--ink-3); font-size: var(--fs-read); max-width: 44ch; }
.k3s { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); }
.k3 { border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--surface); padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.k3-caps { display: flex; gap: 6px; margin-bottom: 6px; }
.k3-caps kbd {
  min-width: 40px; height: 40px; display: grid; place-items: center; padding: 0 10px;
  font-size: 1rem; color: var(--ink); background: var(--surface-2); border-radius: 8px;
  border: 1px solid var(--line-2); box-shadow: 0 2px 0 var(--line-2);
}
.k3 b { font-weight: 500; font-size: var(--fs-read); }
.k3 p { font-size: var(--fs-small); color: var(--ink-3); }
.k3-eg { margin-top: auto; font-family: var(--mono); font-size: var(--fs-micro); color: var(--ink-4); }

/* ================= COURSE OVERVIEW ================= */
.ov-hero { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-bottom: 22px; }
.ov-hero h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); letter-spacing: -0.035em; line-height: 1.04; max-width: 20ch; }
.ov-hero h1 .px { display: block; font-size: .8em; margin-top: .1em; white-space: nowrap; }
.ov-hero p { margin-top: 16px; color: var(--ink-3); max-width: 62ch; font-size: var(--fs-body); }
@media (max-width: 720px) { .ov-hero .stack-art { display: none; } }

.ov-track {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 12px 14px 12px 16px; margin-bottom: 18px;
  border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--surface);
}
.ov-track-l { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ov-track-l b { display: block; font-size: var(--fs-small); font-weight: 500; }
.ov-track-l span { font-size: var(--fs-fine); color: var(--ink-4); }
.ov-track .btn { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.ov-track .ring::before { background: conic-gradient(var(--good) calc(var(--p) * 1%), var(--surface-sunk) 0); }

.ov-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 28px; }
.ov-bar .field[type="search"] { max-width: 280px; }
.ov-k { display: block; font-family: var(--mono); font-size: var(--fs-fine); color: var(--ink-4); margin-bottom: 12px; letter-spacing: -0.01em; }

.ov-structure { border: 1px solid var(--line-2); border-radius: var(--r-xl); background: var(--surface); padding: 20px; margin-bottom: 40px; }
.mtiles { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); }
.mtile {
  position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px 14px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); color: var(--ink); overflow: hidden;
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.mtile:hover { text-decoration: none; border-color: var(--line-strong); background: var(--surface); }
.mtile-n { font-family: var(--mono); font-size: var(--fs-fine); color: var(--ink-4); padding-top: 1px; }
.mtile-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mtile-t { font-size: var(--fs-body); font-weight: 500; }
.mtile-m { font-family: var(--mono); font-size: 10px; color: var(--ink-4); text-transform: uppercase; letter-spacing: .06em; }
.mtile-arrow { color: var(--ink-4); transition: transform var(--t-fast) var(--ease); }
.mtile:hover .mtile-arrow { transform: translateX(3px); color: var(--ink); }
.mtile-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: transparent; }
.mtile-bar > span { display: block; height: 100%; background: var(--hue); }

.ov-part { margin: 44px 0 10px; padding-top: 18px; border-top: 1px solid var(--line-2); }
.ov-part:first-of-type { margin-top: 0; }
.ov-part .ov-k { margin-bottom: 4px; color: var(--ink-3); }
.ov-part p { color: var(--ink-4); font-size: var(--fs-small); }

.msec { margin-top: 34px; scroll-margin-top: calc(var(--chrome-h) + 16px); }
.msec-rule { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.msec-dot { width: 6px; height: 6px; background: var(--hue); flex: none; }
.msec-k { font-family: var(--mono); font-size: 10px; color: var(--ink-4); text-transform: uppercase; letter-spacing: .07em; }
.msec-n { font-family: var(--mono); font-size: 10px; padding: 1px 7px; border-radius: 99px; background: var(--hue); background: oklch(from var(--hue) min(l, var(--text-lmax)) c h); color: var(--on-hue); }
.msec-line { flex: 1; height: 1px; background: var(--line-2); }
.msec-head { display: flex; flex-wrap: wrap; gap: 6px 24px; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.msec-head h2 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); }
.msec-head p { color: var(--ink-3); font-size: var(--fs-small); max-width: 62ch; }

.lgrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr)); }
.lcard {
  display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 14px; min-height: 172px;
  border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--surface); color: var(--ink);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-mid) var(--ease), transform var(--t-mid) var(--ease);
}
.lcard:hover { text-decoration: none; border-color: var(--line-strong); box-shadow: var(--lift-2); transform: translateY(-2px); }
.lcard-top { display: flex; align-items: center; gap: 8px; }
.lcard-code { font-family: var(--mono); font-size: var(--fs-fine); color: var(--ink-4); }
.lcard-state { font-family: var(--mono); font-size: 10px; padding: 1px 7px; border-radius: 99px; background: var(--warn-soft); color: var(--warn); }
.lcard-done { background: var(--good-soft); color: var(--good-text); }
.lcard-arrow { margin-left: auto; color: var(--ink-4); transition: transform var(--t-fast) var(--ease); }
.lcard:hover .lcard-arrow { transform: translateX(3px); color: var(--ink); }
.lcard h3 { font-size: 1.08rem; font-weight: 500; letter-spacing: -0.012em; line-height: 1.25; }
.lcard p { font-size: var(--fs-small); color: var(--ink-3); line-height: 1.45; }
.lcard-foot { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); display: flex; gap: 12px; flex-wrap: wrap; font-family: var(--mono); font-size: 10px; color: var(--ink-4); }
.lcard[data-s="done"] { background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(var(--good-soft), var(--good-soft)) border-box; }

/* ================= LESSON ================= */
.topic-code { display: flex; align-items: baseline; gap: 12px; margin: 6px 0 8px; }
.topic-code-n { font-family: var(--mono); font-size: var(--fs-small); padding: 2px 9px; border-radius: var(--r-xs); background: var(--hue); background: oklch(from var(--hue) min(l, var(--text-lmax)) c h); color: var(--on-hue); }
.topic-code-of { font-family: var(--mono); font-size: var(--fs-fine); color: var(--ink-4); }
.pager small { display: inline-flex; gap: 6px; align-items: center; font-family: var(--mono); text-transform: none; letter-spacing: 0; }
.pager small kbd { font-size: 10px; }
.pager-code { font-family: var(--mono); font-size: var(--fs-fine); color: var(--ink-4); font-weight: 400; margin-right: 8px; }

.rel { display: flex; flex-direction: column; gap: 10px; }
.rel-card { border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--surface); padding: 12px 12px 8px; }
.rel-card .rel-h { font-family: var(--mono); font-size: var(--fs-micro); font-weight: 400; color: var(--ink-4); margin: 0 0 6px 2px; text-transform: none; letter-spacing: 0; }
.rel-list { display: flex; flex-direction: column; gap: 1px; }
.rel-item { display: flex; align-items: baseline; gap: 8px; padding: 5px 4px; border-radius: var(--r-xs); font-size: var(--fs-fine); color: var(--ink-2); line-height: 1.35; }
.rel-item:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.rel-code { font-family: var(--mono); font-size: 10px; color: var(--hue); color: oklch(from var(--hue) min(l, var(--text-lmax)) c h); flex: none; }
.rel-t { flex: 1; min-width: 0; }
.rel-ok { color: var(--good-text); font-size: 11px; }
.rel-drill { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: var(--r-md); background: var(--ink); color: var(--ground); }
.rel-drill:hover { text-decoration: none; opacity: .9; }
.rel-drill-k { font-family: var(--mono); font-size: 10px; opacity: .7; }
.rel-drill-t { font-size: var(--fs-small); font-weight: 500; }
.rel-drill-a { font-size: var(--fs-fine); opacity: .75; }
.rel-map { font-family: var(--mono); font-size: var(--fs-micro); color: var(--ink-3); padding: 2px 2px 8px; }
.rel-map:hover { color: var(--ink); }

/* search palette code */
.p-code { font-family: var(--mono); font-size: var(--fs-fine); color: var(--ink-4); flex: none; }

/* ================= KNOWLEDGE MAP ================= */
.gm { display: flex; flex-direction: column; height: calc(100vh - var(--chrome-h)); height: calc(100dvh - var(--chrome-h)); min-height: 560px; }
.gm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px clamp(16px, 3vw, 28px) 12px; border-bottom: 1px solid var(--line); }
.gm-head h1 { font-size: 1.45rem; }
.gm-head p { margin-top: 4px; font-size: var(--fs-small); color: var(--ink-3); max-width: 70ch; }
.gm-count { font-family: var(--mono); font-size: var(--fs-fine); color: var(--ink-4); text-transform: uppercase; letter-spacing: .06em; }
.gm-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px clamp(16px, 3vw, 28px) 8px; }
.gm-search { flex: 1 1 260px; max-width: 460px; }
.gm-select { width: auto; padding-right: 26px; }
.gm-legend { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 clamp(16px, 3vw, 28px) 12px; }
.gm-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: var(--r-xs);
  border: 1px solid var(--line-2); background: var(--surface); font-size: var(--fs-fine); color: var(--ink-2);
}
.gm-chip i { width: 8px; height: 8px; border-radius: 99px; background: var(--hue); }
.gm-chip .mono { font-size: 10px; color: var(--ink-4); }
.gm-chip[aria-pressed="false"] { opacity: .45; }
.gm-chip[aria-pressed="false"] i { background: transparent; border: 1px solid var(--hue); }
.gm-stage {
  position: relative; flex: 1; min-height: 380px; overflow: hidden; border-top: 1px solid var(--line);
  background-color: var(--ground);
  background-image: radial-gradient(var(--line-2) 1px, transparent 1px);
  background-size: 22px 22px;
}
.gm-canvas { position: absolute; inset: 0; touch-action: none; cursor: grab; }
.gm-canvas:active { cursor: grabbing; }
.gm-zoom { position: absolute; left: 14px; bottom: 14px; display: flex; gap: 0; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm); overflow: hidden; }
.gm-zoom .tool { border: 0; border-radius: 0; width: 34px; height: 32px; font-size: 16px; }
.gm-zoom .tool + .tool { border-left: 1px solid var(--line); }
.gm-key { position: absolute; left: 136px; bottom: 14px; display: flex; gap: 12px; flex-wrap: wrap; padding: 7px 11px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); font-family: var(--mono); font-size: 10px; color: var(--ink-3); }
.gm-key span { display: inline-flex; align-items: center; gap: 6px; }
.gm-key i { display: inline-block; }
.gm-k-circle { width: 9px; height: 9px; border-radius: 99px; border: 1.5px solid var(--ink-3); }
.gm-k-square { width: 9px; height: 9px; border-radius: 2px; border: 1.5px solid var(--ink-3); }
.gm-k-solid { width: 16px; height: 0; border-top: 1px solid var(--ink-3); }
.gm-k-dash { width: 16px; height: 0; border-top: 1px dashed var(--ink-3); }
.gm-k-done { width: 9px; height: 9px; border-radius: 99px; background: var(--ink-3); }
.gm-hint { position: absolute; left: 14px; top: 12px; font-family: var(--mono); font-size: 10px; color: var(--ink-4); padding: 4px 8px; border: 1px solid var(--line); border-radius: var(--r-xs); background: var(--surface); }
@media (max-width: 760px) { .gm-key { display: none; } }
.gm-tip { position: absolute; pointer-events: none; z-index: 3; padding: 5px 9px; border-radius: var(--r-sm); background: var(--ink); color: var(--ground); font-size: var(--fs-fine); white-space: nowrap; box-shadow: var(--lift-2); }
.gm-tip .mono { opacity: .65; font-size: 10px; }
.gm-panel {
  position: absolute; z-index: 4; right: 14px; top: 14px; bottom: 14px; width: min(320px, calc(100% - 28px));
  overflow-y: auto; padding: 16px 16px 18px; border: 1px solid var(--line-2); border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--lift-3); display: flex; flex-direction: column; gap: 10px;
  animation: paletteIn var(--t-mid) var(--ease-out) both;
}
@media (max-width: 640px) { .gm-panel { top: auto; max-height: 62%; } }
.gm-p-head { display: flex; align-items: center; justify-content: space-between; }
.gm-p-k { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: var(--fs-micro); color: var(--ink-3); }
.gm-p-k i { width: 8px; height: 8px; border-radius: 99px; background: var(--hue); }
.gm-p-x { width: 26px; height: 26px; border-radius: var(--r-sm); font-size: 18px; color: var(--ink-3); }
.gm-p-x:hover { background: var(--surface-2); color: var(--ink); }
.gm-panel h2 { font-size: 1.15rem; line-height: 1.2; letter-spacing: -0.01em; }
.gm-p-tag { font-size: var(--fs-small); color: var(--ink-3); }
.gm-p-meta { display: flex; gap: 10px; font-family: var(--mono); font-size: 10px; color: var(--ink-4); }
.gm-panel .btn { align-self: flex-start; }
.gm-p-sec h3 { line-height: 1.5; letter-spacing: normal; text-wrap: wrap; margin: 8px 0 4px; font-family: var(--mono); font-weight: 400; font-size: var(--fs-micro); color: var(--ink-4); }
.gm-p-link { display: flex; gap: 8px; width: 100%; text-align: left; padding: 5px 6px; border-radius: var(--r-xs); font-size: var(--fs-fine); color: var(--ink-2); }
.gm-p-link:hover { background: var(--surface-2); color: var(--ink); }
.gm-p-link .mono { color: var(--hue); font-size: 10px; flex: none; padding-top: 1px; }

/* ================= ROADMAP MAP ================= */
.rmap { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); margin: 10px 0 40px; }
@media (min-width: 1180px) { .rmap { grid-template-columns: minmax(0, 1fr) 300px; } }
.rmap-canvas { border: 1px solid var(--line-2); border-radius: var(--r-xl); background-color: var(--surface); padding: 8px; overflow: hidden;
  background-image: radial-gradient(var(--line) 1px, transparent 1px); background-size: 20px 20px; }
.rmap-svg { width: 100%; height: auto; display: block; }
.rmap-node { cursor: pointer; }
.rmap-node circle { transition: stroke-width var(--t-fast) var(--ease); }
.rmap-node:hover circle:first-child { stroke-width: 3; }
.rmap-now circle:first-child { stroke-width: 3; }
.rmap-n { font-family: var(--mono); font-size: 12px; font-weight: 500; }
.rmap-t { font-family: var(--sans); font-size: 13px; font-weight: 500; fill: var(--ink); }
.rmap-m { font-family: var(--mono); font-size: 10px; fill: var(--ink-4); }
.rmap-hub { font-family: var(--display); font-size: 12px; fill: var(--ground); }
.rmap-index { border: 1px solid var(--line-2); border-radius: var(--r-xl); background: var(--surface); padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; align-self: start; }
.rmap-index h2 { line-height: 1.5; letter-spacing: normal; text-wrap: wrap; margin: 0 8px 8px; font-family: var(--mono); font-weight: 400; font-size: var(--fs-fine); color: var(--ink-4); }
.rmap-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 7px 8px; border-radius: var(--r-sm); }
.rmap-row:hover, .rmap-row[data-now="1"] { background: var(--surface-2); }
.rmap-row-n { font-family: var(--mono); font-size: 10px; width: 24px; height: 24px; border-radius: 99px; flex: none; display: grid; place-items: center; border: 1.5px solid var(--hue); color: var(--ink); }
.rmap-row-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rmap-row-t b { font-size: var(--fs-fine); font-weight: 500; line-height: 1.3; }
.rmap-row-t span { font-family: var(--mono); font-size: 10px; color: var(--ink-4); }
.rmap-row-p { width: 34px; height: 3px; background: var(--line); flex: none; }
.rmap-row-p > span { display: block; height: 100%; background: var(--hue); }
.rm-sub { font-size: 1.3rem; margin-bottom: 14px; }
.stage-row { scroll-margin-top: calc(var(--chrome-h) + 16px); }
