/* Interactive roadmap v2: phases -> stage cards -> topic chips, sticky mini-map, drawer. */
.rm-hero{display:grid;grid-template-columns:1.6fr 1fr;gap:40px;align-items:end;margin:8px 0 28px}
.rm-hero h1{font-size:clamp(2rem,3.4vw,2.9rem)}
.rm-progress{background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:22px;box-shadow:0 12px 30px rgb(0 40 120 / 8%)}
.rm-progress strong{font-size:2.6rem;line-height:1;background:var(--grad-brand);-webkit-background-clip:text;background-clip:text;color:transparent}
.rm-progress>span{margin-left:8px;color:var(--muted)}
.rm-bar{height:10px;border-radius:10px;background:var(--raised);overflow:hidden;margin:14px 0}
.rm-bar i{display:block;height:100%;width:0;background:var(--grad-brand);transition:width .5s ease}
.rm-legend{display:flex;flex-wrap:wrap;gap:10px 14px;font-size:.75rem;color:var(--muted);margin-bottom:12px}
.lg::before{content:"";display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:6px;vertical-align:-1px;border:1px solid var(--border)}
.lg.done::before{background:#0F7B55;border-color:#0F7B55}.lg.learning::before{background:#E8A33D;border-color:#E8A33D}.lg.skip::before{background:var(--raised)}.lg.opt::before{border-style:dashed}
.rm-tools{display:flex;gap:12px;align-items:center;margin-bottom:32px}
.rm-search{flex:1}.rm-search input{width:100%;border-radius:999px;padding-inline:18px}

.rm-layout{display:grid;grid-template-columns:220px minmax(0,1fr);gap:40px;align-items:start}
.rm-map{position:sticky;top:104px;display:flex;flex-direction:column;gap:4px}
.rm-map a{display:flex;gap:12px;align-items:center;min-height:52px;padding:8px 10px;border-radius:10px;font-weight:600;font-size:.86rem;color:var(--muted);line-height:1.3}
.rm-map a small{display:block;font-size:.7rem;font-weight:600;color:var(--violet)}
.rm-map a:hover,.rm-map a.on{background:var(--raised);color:var(--text)}
.rm-map .dot{--p:0%;width:28px;height:28px;border-radius:50%;flex-shrink:0;background:conic-gradient(var(--primary) var(--p),var(--raised) 0);position:relative}
.rm-map .dot::after{content:"";position:absolute;inset:5px;border-radius:50%;background:var(--surface)}
.rm-map a.on .dot::after{background:var(--primary)}

.rm-spine{list-style:none;padding:0;margin:0}
.rm-phase{margin:0 0 56px}
.rm-phase-head{display:flex;align-items:center;gap:18px;padding:20px 22px;border-radius:18px;color:#E8EEF8;background:radial-gradient(500px 200px at 90% 0%,rgb(47 123 255 / 35%),transparent 60%),linear-gradient(135deg,#071430,#0F2A6B);box-shadow:0 16px 40px rgb(7 20 48 / 22%)}
.rm-phase-icon{width:52px;height:52px;border-radius:14px;display:grid;place-items:center;background:rgb(255 255 255 / 10%);flex-shrink:0}
.rm-phase-icon .icon{width:28px;height:28px;color:#9EC4FF}
.rm-phase-num{font-size:.75rem;font-weight:700;color:#B49CFF}
.rm-phase-head h2{color:#fff;font-size:1.5rem;margin:2px 0}
.rm-phase-head p{margin:0;color:#A9B6CC;font-size:.9rem}
.rm-ring{margin-left:auto;position:relative;width:64px;height:64px;flex-shrink:0}
.rm-ring svg{width:64px;height:64px;transform:rotate(-90deg)}
.rm-ring circle{fill:none;stroke:rgb(255 255 255 / 14%);stroke-width:3.4}
.rm-ring circle.v{stroke:#5FD3A2;stroke-linecap:round;stroke-dasharray:0 100;transition:stroke-dasharray .6s ease}
.rm-ring b{position:absolute;inset:0;display:grid;place-items:center;font-size:.78rem;color:#fff}

.rm-cards{list-style:none;padding:0 0 0 34px;margin:20px 0 0 26px;border-left:3px solid transparent;border-image:linear-gradient(180deg,var(--primary),var(--violet)) 1;display:grid;gap:18px}
.rm-card{position:relative;background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:20px 22px;transition:transform .25s ease,box-shadow .25s ease,border-color .25s ease}
.rm-card::before{content:"";position:absolute;left:-44px;top:28px;width:16px;height:16px;border-radius:50%;background:var(--surface);border:3px solid var(--primary);box-shadow:0 0 0 5px var(--bg)}
.rm-card.complete::before{background:#0F7B55;border-color:#0F7B55}
.rm-card:hover{transform:translateY(-3px);border-color:var(--primary);box-shadow:0 14px 34px rgb(0 40 120 / 12%)}
.rm-card-head{display:flex;align-items:center;gap:14px}
.rm-card-icon{width:46px;height:46px;border-radius:12px;display:grid;place-items:center;background:var(--raised);flex-shrink:0}
.rm-card-icon .icon{width:26px;height:26px;color:var(--primary)}
.rm-card-num{font:600 .72rem 'IBM Plex Mono',monospace;color:var(--violet)}
.rm-card h3{margin:2px 0 0;font-size:1.2rem}
.rm-open{background:none;padding:0;min-height:32px;font:inherit;font-weight:700;color:var(--text);text-align:left}
.rm-open:hover{color:var(--primary)}
.rm-card-count{margin-left:auto;font:600 .78rem 'IBM Plex Mono',monospace;color:var(--muted);background:var(--raised);padding:4px 10px;border-radius:999px}
.rm-card-desc{margin:12px 0 14px;font-size:.92rem;color:var(--muted)}
.rm-chips{display:flex;flex-wrap:wrap;gap:8px}
.rm-chip{display:inline-flex;align-items:center;gap:8px;min-height:38px;padding:7px 14px;border-radius:999px;border:1px solid var(--border);background:var(--bg);color:var(--text);font-size:.84rem;font-weight:600;transition:border-color .2s,background .2s,transform .2s}
.rm-chip i{width:9px;height:9px;border-radius:50%;border:1.5px solid var(--border);flex-shrink:0}
.rm-chip:hover{border-color:var(--primary);transform:translateY(-1px)}
.rm-chip.opt{border-style:dashed}
.rm-chip[data-st=done]{border-color:#0F7B55;background:color-mix(in srgb,#0F7B55 12%,var(--surface))}
.rm-chip[data-st=done] i{background:#0F7B55;border-color:#0F7B55}
.rm-chip[data-st=learning]{border-color:#E8A33D;background:color-mix(in srgb,#E8A33D 14%,var(--surface))}
.rm-chip[data-st=learning] i{background:#E8A33D;border-color:#E8A33D}
.rm-chip[data-st=skip]{opacity:.5;text-decoration:line-through}
.rm-chip.dim,.rm-card.dim{opacity:.22}
.rm-card-foot{display:flex;align-items:center;gap:16px;margin-top:16px;padding-top:14px;border-top:1px solid var(--raised)}
.rm-mini{flex:1;height:6px;border-radius:6px;background:var(--raised);overflow:hidden}
.rm-mini i{display:block;height:100%;width:0;background:var(--grad-brand);transition:width .5s ease}
.rm-learn{display:inline-flex;align-items:center;gap:8px;min-height:40px;font-size:.84rem;font-weight:700;color:var(--primary);white-space:nowrap}
.rm-learn .icon{width:18px;height:18px}
.rm-foot{text-align:center;margin:40px 0}

.rm-drawer{position:fixed;inset:0 0 0 auto;width:min(460px,100%);z-index:60;background:var(--surface);border-left:1px solid var(--border);box-shadow:-20px 0 50px rgb(7 20 48 / 25%);overflow:auto;animation:rmslide .28s ease}
@keyframes rmslide{from{transform:translateX(30px);opacity:0}}
.rm-drawer-inner{padding:28px;position:relative}
.rm-close{position:absolute;right:12px;top:12px;font-size:1.8rem}
.rm-d-stage{font-size:.78rem;font-weight:700;color:var(--violet)}
.rm-drawer h2{margin:8px 0 12px;font-size:1.6rem}
.rm-drawer p{color:var(--text)}
.rm-status{display:flex;flex-wrap:wrap;gap:8px;margin:18px 0}
.rm-status button{min-height:40px;padding:8px 14px;border:1px solid var(--border);background:var(--surface);border-radius:999px;font-weight:600;font-size:.82rem}
.rm-status button.on{background:var(--primary);border-color:var(--primary);color:#fff}
.rm-drawer h3{font-size:1rem;margin:20px 0 8px}
.rm-drawer ul{padding:0;list-style:none}
.rm-drawer li a{display:flex;gap:10px;align-items:center;min-height:44px;padding:8px 0;border-bottom:1px solid var(--border);color:var(--primary);font-weight:600;font-size:.9rem}
.rm-drawer li small{display:inline-block;font-weight:600;font-size:.68rem;color:var(--muted);background:var(--raised);padding:3px 8px;border-radius:999px;margin:0}

@media(max-width:1000px){.rm-layout{grid-template-columns:1fr}.rm-map{position:static;flex-direction:row;overflow-x:auto;gap:8px;padding-bottom:6px}.rm-map a{flex-shrink:0;border:1px solid var(--border)}}
@media(max-width:760px){.rm-hero{grid-template-columns:1fr}.rm-cards{padding-left:22px;margin-left:12px}.rm-card::before{left:-33px}.rm-card-foot{flex-direction:column;align-items:stretch}.rm-ring{width:52px;height:52px}.rm-ring svg{width:52px;height:52px}.rm-phase-head{padding:16px}}
@media(prefers-reduced-motion:reduce){.rm-drawer{animation:none}.rm-card,.rm-chip{transition:none}}

/* ---------- view switcher ---------- */
.rm-views{display:inline-flex;gap:4px;padding:5px;border-radius:999px;background:var(--raised);margin:0 0 24px}
.rm-views button{min-height:40px;padding:8px 18px;border-radius:999px;background:transparent;font-weight:700;font-size:.88rem;color:var(--muted)}
.rm-views button.active{background:var(--surface);color:var(--primary);box-shadow:0 4px 14px rgb(0 40 120 / 12%)}
.rm-alt{margin-bottom:40px}

/* ---------- Map (roadmap.sh style) ---------- */
.mp{position:relative;padding:8px 0 24px}
.mp::before{content:"";position:absolute;left:50%;top:0;bottom:60px;width:4px;margin-left:-2px;border-radius:4px;background:linear-gradient(180deg,#2F7BFF,#7C5CFF,#00A6A6,#E8743B,#0F9D58);opacity:.85}
.mp-lines{position:absolute;inset:0;pointer-events:none;overflow:visible}
.mp-lines path{fill:none;stroke-width:2;stroke-dasharray:5 5;opacity:.7}
.mp-phase{position:relative;margin-bottom:28px}
.mp-ph-badge{position:relative;z-index:1;width:max-content;max-width:90%;margin:0 auto 22px;padding:10px 20px;border-radius:999px;background:var(--c);color:#fff;font-weight:800;font-size:1rem;box-shadow:0 10px 26px color-mix(in srgb,var(--c) 40%,transparent);text-align:center}
.mp-ph-badge span{display:block;font-size:.7rem;font-weight:700;opacity:.85}
.mp-row{position:relative;display:grid;grid-template-columns:1fr 250px 1fr;gap:56px;align-items:center;margin:0 0 26px}
.mp-col{display:flex;flex-direction:column;gap:9px}
.mp-left{align-items:flex-end}.mp-right{align-items:flex-start}
.mp-stage{position:relative;z-index:1;display:flex;align-items:center;gap:10px;justify-content:center;min-height:56px;padding:12px 16px;border-radius:14px;border:3px solid var(--c);background:var(--surface);font-weight:800;font-size:1rem;color:var(--text);box-shadow:0 8px 22px rgb(0 30 90 / 12%);transition:transform .2s}
.mp-stage:hover{transform:scale(1.03)}
.mp-n{font:700 .72rem 'IBM Plex Mono',monospace;color:var(--c)}
.mp-stage em{font-style:normal;font:600 .7rem 'IBM Plex Mono',monospace;color:var(--muted);margin-left:auto}
.mp-topic{position:relative;z-index:1;display:inline-flex;align-items:center;gap:8px;min-height:38px;max-width:100%;padding:7px 14px;border-radius:10px;border:1px solid var(--border);background:var(--surface);font-weight:600;font-size:.84rem;color:var(--text);transition:border-color .2s,transform .2s}
.mp-topic i{width:9px;height:9px;border-radius:50%;border:1.5px solid var(--border);flex-shrink:0}
.mp-topic:hover{border-color:var(--primary);transform:translateY(-1px)}
.mp-topic.opt{border-style:dashed}
.mp-topic[data-st=done]{border-color:#0F7B55;background:color-mix(in srgb,#0F7B55 12%,var(--surface))}.mp-topic[data-st=done] i{background:#0F7B55;border-color:#0F7B55}
.mp-topic[data-st=learning]{border-color:#E8A33D}.mp-topic[data-st=learning] i{background:#E8A33D;border-color:#E8A33D}
.mp-topic[data-st=skip]{opacity:.5;text-decoration:line-through}
.mp-end{position:relative;z-index:1;display:flex;align-items:center;gap:10px;width:max-content;margin:8px auto 0;padding:14px 22px;border-radius:16px;background:var(--grad-brand);color:#fff;font-weight:800}
.mp-end .icon{width:24px;height:24px}

/* ---------- Metro ---------- */
.mt-scroll{overflow-x:auto;padding-bottom:8px}
.mt{position:relative;min-width:900px}
.mt svg{position:absolute;inset:0;width:100%}
.mt-line{font:700 15px 'DM Sans',sans-serif}
.mt-st{cursor:pointer}.mt-st:hover circle:first-child,.mt-st:focus circle:first-child{stroke-width:8}
.mt-st:focus{outline:none}
.mt-label{position:absolute;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;gap:2px;width:150px;padding:4px;background:transparent;text-align:center;line-height:1.25}
.mt-label strong{font-size:.84rem}.mt-label small{font-size:.7rem;color:var(--muted)}
.mt-label:hover strong{color:var(--primary)}
.mt-note{text-align:center}

/* ---------- Skill tree ---------- */
.tr-scroll{overflow-x:auto;padding-bottom:8px}
.tr{display:grid;grid-template-columns:repeat(5,minmax(200px,1fr));gap:20px;min-width:1040px}
.tr-col{display:flex;flex-direction:column;align-items:stretch;padding:14px;border-radius:18px;background:color-mix(in srgb,var(--c) 7%,var(--surface));border:1px solid color-mix(in srgb,var(--c) 30%,var(--border))}
.tr-head{font-weight:800;font-size:.98rem;margin-bottom:14px;line-height:1.3}
.tr-head span{display:block;font-size:.7rem;font-weight:700;color:var(--c)}
.tr-node{display:flex;flex-direction:column;align-items:flex-start;gap:6px;padding:14px;border-radius:14px;border:2px solid var(--c);background:var(--surface);text-align:left;transition:transform .2s,box-shadow .2s}
.tr-node:hover{transform:translateY(-3px);box-shadow:0 12px 28px color-mix(in srgb,var(--c) 30%,transparent)}
.tr-ic{width:38px;height:38px;border-radius:10px;display:grid;place-items:center;background:color-mix(in srgb,var(--c) 15%,var(--surface))}
.tr-ic .icon{width:22px;height:22px;color:var(--c)}
.tr-node strong{font-size:.95rem;line-height:1.3}.tr-node small{font-size:.72rem;color:var(--muted)}
.tr-bar{width:100%;height:6px;border-radius:6px;background:var(--raised);overflow:hidden}.tr-bar i{display:block;height:100%;width:var(--p);background:var(--c)}
.tr-node.locked{border-style:dashed;opacity:.62}
.tr-node.locked .tr-ic{filter:grayscale(1)}
.tr-node.mastered{background:color-mix(in srgb,var(--c) 14%,var(--surface));box-shadow:0 0 0 4px color-mix(in srgb,var(--c) 25%,transparent)}
.tr-link{display:block;width:3px;height:18px;margin:0 auto;background:var(--c);opacity:.6;border-radius:3px}
@media(max-width:900px){.mp::before{left:18px}.mp-row{grid-template-columns:1fr;gap:10px;padding-left:40px}.mp-left,.mp-right{align-items:flex-start}.mp-lines{display:none}.mp-ph-badge{margin-left:40px}.mp-end{margin-left:40px}}
@media(prefers-reduced-motion:reduce){.mp-stage,.mp-topic,.tr-node{transition:none}}
@media(max-width:900px){.mp-stage{order:-1}.mp-row{display:flex;flex-direction:column;align-items:stretch}.mp-col{align-items:flex-start!important}}
.tr-node.locked{opacity:.85;border-color:color-mix(in srgb,var(--c) 45%,var(--border))}

/* roadmap hero: same layout as the other heroes (text + visual) */
.ph-band .rm-hero{grid-template-columns:1.15fr 1fr;gap:48px;align-items:center}
.ph-band .rm-visual{padding:18px 20px;border-radius:18px;background:rgb(255 255 255 / 5%);border:1px solid rgb(125 178 255 / 22%);box-shadow:0 24px 60px rgb(0 0 0 / 35%)}
.rm-hero-path{display:block;width:100%;height:auto;margin-bottom:8px}
.rm-prog-row{display:flex;align-items:center;justify-content:space-between;gap:12px}
.rm-prog-row strong{font-size:2rem;line-height:1}
.rm-prog-row span{margin-left:8px;color:#C7D3E8}
.ph-band .rm-visual .rm-bar{margin:10px 0}
.ph-band .rm-visual .rm-legend{margin-bottom:0}
@media(max-width:900px){.ph-band .rm-hero{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.rm-hero-path animateMotion{display:none}}
