/* ============================================================
   LEARNING PATHS — INTERACTIVE BOX
   (Flowchart View / Subway Map View / Roadmap Tree)
   These classes were used in single.html's HTML+JS but never
   had matching CSS — this is the missing piece.
   Light theme, consistent with the rest of the site (white
   cards, purple/blue/aws accents, Inter font).
   ============================================================ */

.lp-interactive-box{
  background:#fff; border:1px solid #e6e8ee; border-radius:18px;
  padding:24px; margin-top:1.5rem; box-shadow:0 1px 2px rgba(15,23,42,.04);
}

/* ── Box header: icon + path summary ── */
.lp-ibox-header{ display:flex; align-items:center; gap:14px; margin-bottom:18px; }
.lp-ibox-icon{ width:52px; height:52px; border-radius:14px; flex-shrink:0; display:flex; align-items:center; justify-content:center; }
.lp-ibox-meta{ flex:1; min-width:0; }
.lp-ibox-badge{ display:flex; align-items:center; gap:10px; margin-bottom:3px; }
.lp-ibox-title{ font-size:1.05rem; font-weight:800; color:#0f1525; letter-spacing:-.2px; }
.lp-ibox-sub{ font-size:.8rem; color:#646d80; margin-top:2px; }

/* ── Tabs ── */
.lp-tabs{ display:flex; gap:6px; border-bottom:1px solid #e6e8ee; margin-bottom:20px; flex-wrap:wrap; }
.lp-tab{
  background:none; border:none; color:#646d80; font-family:inherit;
  font-size:.85rem; font-weight:600; padding:10px 16px; cursor:pointer;
  border-bottom:2px solid transparent; display:flex; align-items:center; gap:7px;
  transition:.15s; border-radius:0;
}
.lp-tab:hover{ color:#0f1525; }
.lp-tab.active{ color:#2563eb; border-bottom-color:#2563eb; }

/* ── Tab panes: hidden unless .active — this rule alone fixes
     the "all three panes stacked at once" symptom ── */
.lp-tab-pane{ display:none; }
.lp-tab-pane.active{ display:block; }

/* ── Two-column layout: step list (left) + detail panel (right) ── */
.lp-two-col{ display:grid; grid-template-columns:280px 1fr; gap:24px; align-items:start; }
@media (max-width:760px){ .lp-two-col{ grid-template-columns:1fr; } }

/* ── Flowchart column (vertical nodes + connecting arrows) ── */
.lp-flow-col{ display:flex; flex-direction:column; align-items:stretch; }
.lp-flow-node{
  display:flex; align-items:center; gap:12px; padding:12px 14px;
  background:#fff; border:1.5px solid #e6e8ee; border-radius:12px; cursor:pointer;
  transition:transform .15s, box-shadow .15s, border-color .15s;
}
.lp-flow-node:hover{ transform:translateX(2px); box-shadow:0 4px 12px rgba(15,23,42,.06); }
.lp-flow-node-active{
  border-color:var(--lp-nc,#2563eb);
  background:var(--lp-nb,#eaf0fe);
  box-shadow:0 4px 14px rgba(37,99,235,.15);
}
.lp-flow-node-active .lp-fn-name,
.lp-flow-node-active .lp-fn-num{ color:var(--lp-nc,#2563eb); }
.lp-flow-node-visited{ border-color:#c9d3e0; }
.lp-flow-node > div:first-child{
  width:34px; height:34px; border-radius:50%; flex-shrink:0;
  background:var(--lp-nc,#2563eb); display:flex; align-items:center; justify-content:center;
}
.lp-flow-node-active > div:first-child{ background:var(--lp-nc,#2563eb); }
.lp-flow-node:not(.lp-flow-node-active) > div:first-child{ background:#f3f4f7; }
.lp-fn-info{ display:flex; flex-direction:column; gap:1px; min-width:0; }
.lp-fn-num{ font-size:.66rem; font-weight:800; text-transform:uppercase; letter-spacing:.05em; color:#9aa1b1; }
.lp-fn-name{ font-size:.86rem; font-weight:700; color:#0f1525; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.lp-flow-seg{ width:2px; height:18px; margin-left:17px; opacity:.35; }
.lp-flow-arrow{
  width:0; height:0; margin-left:11px;
  border-left:6px solid transparent; border-right:6px solid transparent;
  border-top:7px solid; opacity:.5;
}

/* ── Subway map column ── */
.lp-subway-col{ display:flex; flex-direction:column; align-items:stretch; }
.lp-sw-row{ display:flex; align-items:center; gap:14px; padding:8px 0; cursor:pointer; }
.lp-sw-row:hover .lp-sw-name{ color:#2563eb; }
.lp-sw-dot{
  width:26px; height:26px; border-radius:50%; flex-shrink:0;
  border:3px solid var(--lp-sc,#2563eb); background:#fff;
  display:flex; align-items:center; justify-content:center;
}
.lp-sw-dot-active{ background:var(--lp-sc,#2563eb); }
.lp-sw-label{ display:flex; flex-direction:column; gap:0; }
.lp-sw-num{ font-size:.64rem; font-weight:800; text-transform:uppercase; letter-spacing:.05em; color:#9aa1b1; }
.lp-sw-name{ font-size:.85rem; font-weight:700; color:#0f1525; transition:color .15s; }
.lp-sw-seg{ width:3px; height:16px; margin-left:11.5px; opacity:.3; }

/* ── Right-hand detail panel (shared by Flowchart + Subway) ── */
.lp-step-detail{
  background:#f8f9fb; border:1px solid #e6e8ee; border-radius:14px;
  min-height:260px; display:flex; align-items:center; justify-content:center;
  padding:24px;
}
.lp-step-placeholder{ text-align:center; color:#9aa1b1; }
.lp-step-placeholder i{ font-size:1.8rem; margin-bottom:10px; display:block; opacity:.6; }
.lp-step-placeholder p{ font-size:.85rem; margin:0; }

.lp-step-detail-inner{ width:100%; }
.lp-step-hdr{ display:flex; align-items:center; gap:14px; margin-bottom:14px; }
.lp-step-icon-wrap{ width:48px; height:48px; border-radius:12px; flex-shrink:0; display:flex; align-items:center; justify-content:center; }
.lp-step-num-label{ font-size:.7rem; font-weight:800; text-transform:uppercase; letter-spacing:.05em; }
.lp-step-title{ font-size:1.05rem; font-weight:800; color:#0f1525; margin-top:2px; }
.lp-step-desc{ font-size:.85rem; color:#646d80; line-height:1.65; margin:0 0 16px; }
.lp-step-nav{ display:flex; justify-content:space-between; margin-top:16px; padding-top:14px; border-top:1px solid #e6e8ee; }

/* ── Progress bar ── */
.lp-prog-bar-row{ display:flex; align-items:center; gap:12px; margin-top:18px; }
.lp-prog-track{ flex:1; height:8px; background:#eef0f3; border-radius:999px; overflow:hidden; }
.lp-prog-fill{ height:100%; border-radius:999px; transition:width .3s ease; }
.lp-prog-label{ font-size:.74rem; font-weight:700; color:#646d80; white-space:nowrap; flex-shrink:0; }
/* ============================================================
   ROADMAP TREE — Learning Paths third tab
   Uses your existing --purple/--aws/--blue/--cyan/--green tokens
   with fallback hex values if those vars aren't already declared.
   ============================================================ */
.rm-shell{ background:#fff; border:1px solid #e6e8ee; border-radius:18px; padding:42px 24px 56px; box-shadow:0 1px 2px rgba(15,23,42,.04); }
.rm-shell-top{ text-align:center; margin-bottom:34px; }
.rm-shell-eyebrow{ display:inline-flex; align-items:center; gap:6px; font-size:.7rem; font-weight:700; color:#9aa1b1; text-transform:uppercase; letter-spacing:.08em; margin-bottom:8px; }
.rm-shell-title{ font-size:1.3rem; font-weight:800; letter-spacing:-.2px; }

.rm-tree{ position:relative; max-width:760px; margin:0 auto; }
.rm-row{ position:relative; display:flex; align-items:stretch; }
.rm-main-col{ width:340px; flex-shrink:0; position:relative; z-index:2; }
.rm-gap{ width:90px; flex-shrink:0; }
.rm-topics-col{ flex:1; display:flex; flex-direction:column; gap:14px; justify-content:center; position:relative; z-index:2; padding:6px 0; }
.rm-connector-svg{ position:absolute; top:0; left:0; width:100%; height:100%; overflow:visible; pointer-events:none; z-index:1; }
.rm-spine-wrap{ width:340px; flex-shrink:0; padding-left:22px; height:30px; position:relative; }

.rm-main{
  background:#fff; border:1px solid #e6e8ee; border-left:4px solid var(--purple,#6d28d9);
  border-radius:14px; padding:16px 18px 16px 16px; box-shadow:0 1px 3px rgba(15,23,42,.06);
  cursor:pointer; transition:transform .15s, box-shadow .15s; position:relative; height:100%;
}
.rm-main:hover{ transform:translateY(-2px); box-shadow:0 10px 24px rgba(109,40,217,.12); }
.rm-main-top{ display:flex; align-items:flex-start; gap:11px; }
.rm-main-icon{ width:32px;height:32px;border-radius:8px; background:#f3f4f7; border:1px solid #e6e8ee; color:#646d80; display:flex;align-items:center;justify-content:center; flex-shrink:0; }
.rm-main-eyebrow{ font-size:.64rem; font-weight:800; color:var(--purple,#6d28d9); text-transform:uppercase; letter-spacing:.06em; margin-bottom:2px; }
.rm-main-title{ font-size:.92rem; font-weight:800; display:flex; align-items:center; gap:7px; }
.rm-main-desc{ font-size:.78rem; color:#646d80; line-height:1.55; margin-top:6px; }
.rm-status-dot{ width:6px; height:6px; border-radius:50%; background:#d7dae3; flex-shrink:0; }
.rm-main.is-done .rm-status-dot, .rm-sub.is-done .rm-status-dot{ background:var(--green,#16a34a); }
.rm-main.is-progress .rm-status-dot, .rm-sub.is-progress .rm-status-dot{ background:var(--blue,#2563eb); }

.rm-sub{
  background:#fff; border:1px solid #e6e8ee; border-left:3px solid var(--accent, var(--blue,#2563eb));
  border-radius:10px; padding:9px 13px; display:flex; align-items:center; gap:10px;
  cursor:pointer; box-shadow:0 1px 2px rgba(15,23,42,.04); transition:transform .15s, box-shadow .15s;
  width:fit-content;
}
.rm-sub:hover{ transform:translateY(-2px); box-shadow:0 8px 18px rgba(15,23,42,.08); }
.rm-sub-icon{ width:24px;height:24px;border-radius:7px; background:var(--accent-bg, #eaf0fe); color:var(--accent, var(--blue,#2563eb)); display:flex;align-items:center;justify-content:center; flex-shrink:0; }
.rm-sub-label{ font-size:.82rem; font-weight:700; color:#0f1525; }

@media (max-width:780px){
  .rm-row{ flex-direction:column; gap:18px; }
  .rm-gap, .rm-connector-svg, .rm-spine-wrap{ display:none; }
  .rm-main-col{ width:100%; }
  .rm-topics-col{ flex-direction:row; flex-wrap:wrap; }
}

/* ── Resource detail panel ── */
.rm-overlay{ position:fixed; inset:0; background:rgba(15,23,42,.35); z-index:90; opacity:0; pointer-events:none; transition:opacity .2s; }
.rm-overlay.open{ opacity:1; pointer-events:auto; }
.rm-panel{ position:fixed; top:0; right:0; height:100%; width:420px; max-width:92vw; background:#fff; border-left:1px solid #e6e8ee; z-index:91; transform:translateX(100%); transition:transform .25s ease; display:flex; flex-direction:column; box-shadow:-8px 0 30px rgba(15,23,42,.08); }
.rm-panel.open{ transform:translateX(0); }
.rm-panel-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:14px 16px; border-bottom:1px solid #e6e8ee; flex-wrap:wrap; }
.rm-panel-tabs{ display:flex; gap:6px; }
.rm-ptab{ font-size:.76rem; font-weight:700; padding:7px 13px; border-radius:8px; border:1px solid #d7dae3; background:#f3f4f7; color:#646d80; cursor:pointer; display:flex; align-items:center; gap:6px; }
.rm-ptab.active{ background:#0f1525; color:#fff; border-color:#0f1525; }
.rm-panel-right{ display:flex; align-items:center; gap:8px; }
.rm-status-select{ background:#f3f4f7; color:#646d80; border:1px solid #d7dae3; border-radius:8px; padding:6px 10px; font-size:.76rem; font-weight:600; font-family:inherit; }
.rm-close-btn{ width:30px;height:30px;border-radius:8px;border:1px solid #d7dae3; background:#f3f4f7; color:#646d80; cursor:pointer; }
.rm-close-btn:hover{ color:#0f1525; }
.rm-panel-body{ padding:22px 20px 30px; overflow-y:auto; flex:1; }
.rm-panel-title{ font-size:1.3rem; font-weight:800; margin:0 0 8px; letter-spacing:-.3px; }
.rm-panel-desc{ color:#646d80; font-size:.88rem; line-height:1.65; margin:0 0 22px; }
.rm-res-box{ border:1px solid #e6e8ee; border-radius:12px; padding:14px 16px; margin-bottom:14px; }
.rm-res-box-title{ font-size:.82rem; font-weight:700; display:flex; align-items:center; gap:7px; margin-bottom:11px; }
.rm-res-box-title.free svg{ stroke:var(--red,#dc2626); }
.rm-res-box-title.premium svg{ stroke:var(--purple,#6d28d9); }
.rm-res-row{ display:flex; align-items:center; gap:9px; padding:6px 0; font-size:.83rem; flex-wrap:wrap; }
.rm-res-row a{ color:#0f1525; text-decoration:underline; text-decoration-color:#d7dae3; }
.rm-res-row a:hover{ color:var(--blue,#2563eb); }
.rm-badge{ font-size:.62rem; font-weight:800; padding:3px 8px; border-radius:6px; flex-shrink:0; color:#fff; }
.rm-badge.official{ background:var(--blue,#2563eb); }
.rm-badge.article{ background:var(--purple,#6d28d9); }
.rm-badge.video{ background:#a855f7; }
.rm-badge.feed{ background:#ec4899; }
.rm-badge.course{ background:var(--aws,#d97706); }
.rm-badge.off{ background:var(--green,#16a34a); }
.rm-ai-pane{ font-size:.85rem; color:#646d80; line-height:1.7; }
.rm-ai-pane textarea{ width:100%; min-height:90px; background:#f3f4f7; border:1px solid #d7dae3; border-radius:10px; color:#0f1525; padding:10px; font-family:inherit; font-size:.83rem; resize:vertical; margin-top:14px; }
.rm-ai-pane button{ margin-top:10px; background:var(--purple,#6d28d9); color:#fff; border:none; border-radius:8px; padding:9px 16px; font-weight:700; font-size:.8rem; cursor:pointer; }