/* Producer skill map: control-room look. Sage for type, selected and "Know it";
   orange only for the primary action, the current position ("Learning") and warnings. */

#p360-skillmap { padding-top: 8px; }
#p360-skillmap h1, #p360-skillmap h2, #p360-skillmap h3, #p360-skillmap h4 { margin: 0; }
#p360-skillmap button { font-family: var(--p-font); color: inherit; }
#p360-skillmap .sm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#p360-skillmap .sm-muted { color: var(--p-muted); }
#p360-skillmap .sm-small { font-size: 13px; margin: 2px 0 10px; }
#p360-skillmap .sm-arrow { flex-shrink: 0; font-size: 18px; color: var(--p-sage); transition: transform .15s; }

/* ---------- hero ---------- */
#p360-skillmap .sm-hero { padding: 48px 0 28px; max-width: 900px; }
#p360-skillmap .sm-kicker { color: var(--p-muted); margin: 0 0 14px; }
#p360-skillmap .sm-hero h1 { font-size: clamp(44px, 8vw, 96px); font-weight: 700; letter-spacing: -0.04em; line-height: 0.95; color: var(--p-head); }
#p360-skillmap .sm-lead { margin: 20px 0 0; font-size: clamp(16px, 1.6vw, 19px); color: var(--p-text); max-width: 720px; text-wrap: pretty; }

/* ---------- dashboard ---------- */
#p360-skillmap #smDashboard { display: grid; gap: 14px; margin-bottom: 48px; }
#p360-skillmap .sm-onboard { position: relative; background: var(--p-panel); border: 1px solid var(--p-line-2); border-left: 3px solid var(--p-sage); border-radius: 8px; padding: 18px 56px 18px 20px; }
#p360-skillmap .sm-onboard-h { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; color: var(--p-head); margin-bottom: 6px; }
#p360-skillmap .sm-onboard p { margin: 0; color: var(--p-text); font-size: 15px; }
#p360-skillmap .sm-onboard b { color: var(--p-sage-hi); }
#p360-skillmap .sm-x { position: absolute; top: 6px; right: 6px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: none; border: 0; border-radius: 4px; color: var(--p-muted); font-size: 26px; line-height: 1; cursor: pointer; }
#p360-skillmap .sm-x:hover { color: var(--p-text); background: var(--p-sage-dim); }

#p360-skillmap .sm-quizbtn { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 64px; text-align: left; background: var(--p-fill); color: var(--p-ink); box-shadow: var(--p-fill-shadow); border: 0; border-radius: 6px; padding: 14px 20px; cursor: pointer; font-size: 15px; line-height: 1.4; }
#p360-skillmap .sm-quizbtn:hover { filter: brightness(1.05); }
#p360-skillmap .sm-quizbtn .sm-quizbtn-mid { flex: 1; color: var(--p-ink); }
#p360-skillmap .sm-quizbtn b { font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 13px; margin-right: 6px; }
#p360-skillmap .sm-quizbtn .sm-arrow { color: var(--p-ink); font-size: 22px; }
#p360-skillmap .sm-quizbtn:hover .sm-arrow { transform: translateX(3px); }

#p360-skillmap .sm-next { background: var(--p-panel); border: 1px solid var(--p-line); border-radius: 8px; padding: 6px 18px 16px; }
#p360-skillmap .sm-next.collapsed { padding-bottom: 6px; }
#p360-skillmap .sm-next-toggle { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; font-size: 22px; font-weight: 700; letter-spacing: -0.03em; color: var(--p-head); }
#p360-skillmap .sm-next-toggle .sm-chev { margin-left: auto; }
#p360-skillmap .sm-next.collapsed .sm-chev { transform: rotate(-90deg); }
#p360-skillmap .sm-next-sub { margin: 0 0 12px; font-size: 14px; color: var(--p-muted); }
#p360-skillmap .sm-next-list { display: grid; gap: 8px; }
#p360-skillmap .sm-next-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; text-align: left; background: var(--p-deep); border: 1px solid var(--p-line); border-radius: 6px; padding: 10px 14px; cursor: pointer; }
#p360-skillmap .sm-next-row:hover { border-color: var(--p-sage-2); }
#p360-skillmap .sm-next-row:hover .sm-arrow { transform: translateX(3px); }
#p360-skillmap .sm-next-b { flex-shrink: 0; min-width: 96px; text-align: center; font-size: 11px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; padding: 4px 8px; border-radius: 4px; border: 1px solid var(--p-line-2); color: var(--p-muted); }
#p360-skillmap .sm-next-b.learn { color: var(--p-orange); border-color: var(--p-orange); background: var(--p-orange-dim); }
#p360-skillmap .sm-next-main { flex: 1; min-width: 0; }
#p360-skillmap .sm-next-name { display: block; font-size: 15px; font-weight: 700; line-height: 1.25; color: var(--p-text); }
#p360-skillmap .sm-next-area { display: block; font-size: 12px; color: var(--p-faint); margin-top: 2px; }
#p360-skillmap .sm-next-empty { margin: 4px 0 0; padding: 14px; text-align: center; color: var(--p-good); font-weight: 600; }

#p360-skillmap .sm-calmreveal { display: none; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; background: none; border: 1px dashed var(--p-line-2); border-radius: 6px; color: var(--p-muted); font-size: 14px; font-weight: 600; cursor: pointer; }
#p360-skillmap .sm-calmreveal:hover { color: var(--p-sage-hi); border-color: var(--p-sage-2); }
#p360-skillmap.sm-calm .sm-calmreveal { display: flex; }
#p360-skillmap.sm-calm .sm-progress,
#p360-skillmap.sm-calm .sm-matrix { display: none; }

#p360-skillmap .sm-progress { display: flex; align-items: center; gap: 16px 24px; flex-wrap: wrap; background: var(--p-screen); border: 1px solid var(--p-line); border-radius: 8px; padding: 16px 18px; }
#p360-skillmap .sm-progress-mid { flex: 1; min-width: 220px; }
#p360-skillmap .sm-progress-top { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 9px; color: var(--p-sage-hi); }
#p360-skillmap .sm-progress-count { font-family: var(--p-mono); font-size: 13px; color: var(--p-text); }
#p360-skillmap .sm-track { display: flex; height: 10px; border-radius: 2px; background: var(--p-panel-3); overflow: hidden; }
#p360-skillmap .sm-track i { display: block; height: 100%; width: 0; transition: width .35s; }
#p360-skillmap .sm-fill { background: var(--p-sage); }
#p360-skillmap .sm-fill-learn { background: var(--p-orange); }
#p360-skillmap .sm-legend { display: flex; gap: 16px; margin-top: 8px; font-size: 12px; color: var(--p-muted); }
#p360-skillmap .sm-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
#p360-skillmap .sm-legend .k::before { background: var(--p-sage); }
#p360-skillmap .sm-legend .l::before { background: var(--p-orange); }

#p360-skillmap .sm-ghost { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; background: transparent; color: var(--p-sage); box-shadow: inset 0 0 0 1.5px var(--p-sage); border: 0; border-radius: 4px; font: 700 12px var(--p-font); letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; white-space: nowrap; }
#p360-skillmap .sm-ghost:hover { background: var(--p-sage-dim); }

/* ---------- matrix head and controls ---------- */
#p360-skillmap .sm-matrix { scroll-margin-top: 80px; }
#p360-skillmap .sm-matrix-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 24px; padding-top: 20px; border-top: 3px solid var(--p-sage); margin-bottom: 18px; }
#p360-skillmap .sm-matrix-head h2 { font-size: clamp(30px, 4.4vw, 52px); font-weight: 700; letter-spacing: -0.04em; line-height: 1; color: var(--p-head); }
#p360-skillmap .sm-matrix-head p { margin: 8px 0 0; }
#p360-skillmap .sm-matrix-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
#p360-skillmap .sm-viewtoggle { display: inline-flex; background: var(--p-deep); border: 1px solid var(--p-line); border-radius: 4px; padding: 3px; }
#p360-skillmap .sm-vt { min-height: 38px; min-width: 76px; padding: 0 14px; border: 0; border-radius: 3px; background: none; color: var(--p-muted); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; }
#p360-skillmap .sm-vt.on { background: var(--p-sel); color: var(--p-ink); }
#p360-skillmap .sm-vt:not(.on):hover { color: var(--p-text); }

#p360-skillmap .sm-controls { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 18px; }
#p360-skillmap .sm-search { position: relative; flex: 1 1 260px; min-width: 0; }
#p360-skillmap .sm-search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; fill: none; stroke: var(--p-faint); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
#p360-skillmap .sm-search input { width: 100%; min-height: 46px; background: var(--p-deep); border: 1px solid var(--p-line-2); border-radius: 4px; color: var(--p-text); font: 15px var(--p-font); padding: 0 14px 0 40px; }
#p360-skillmap .sm-search input::placeholder { color: var(--p-faint); }
#p360-skillmap .sm-search input:focus { border-color: var(--p-sage-2); outline: none; }
#p360-skillmap .sm-search input:focus-visible { outline: 2px solid var(--p-sage-hi); outline-offset: 2px; }
#p360-skillmap .sm-chipset { display: flex; flex-wrap: wrap; gap: 6px; }
#p360-skillmap .sm-chip { min-height: 44px; padding: 0 13px; background: var(--p-panel); border: 1px solid var(--p-line-2); border-radius: 4px; color: var(--p-muted); font-size: 11px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; cursor: pointer; }
#p360-skillmap .sm-chip:hover { color: var(--p-text); border-color: var(--p-border); }
#p360-skillmap .sm-chip.on { background: var(--p-sel); color: var(--p-ink); border-color: transparent; }
#p360-skillmap .sm-noresult { text-align: center; color: var(--p-muted); padding: 32px 0; margin: 0; }

/* ---------- modules (accordion) ---------- */
#p360-skillmap .sm-list { display: grid; gap: 10px; }
#p360-skillmap .sm-mod { background: var(--p-panel); border: 1px solid var(--p-line); border-radius: 8px; overflow: hidden; }
#p360-skillmap .sm-mod.open { border-color: var(--p-line-2); }
#p360-skillmap .sm-mod-btn { display: flex; align-items: center; gap: 18px; width: 100%; min-height: 76px; padding: 14px 18px; background: none; border: 0; text-align: left; cursor: pointer; }
#p360-skillmap .sm-mod-btn:hover { background: rgba(244, 243, 236, 0.04); }
#p360-skillmap .sm-mod-num { flex-shrink: 0; width: 52px; font-family: var(--p-mono); font-size: 26px; font-weight: 500; color: var(--p-faint); letter-spacing: -0.02em; }
#p360-skillmap .sm-mod.open .sm-mod-num { color: var(--p-sage); }
#p360-skillmap .sm-mod-tw { flex: 1; min-width: 0; }
#p360-skillmap .sm-mod-label { display: none; }   /* the number beside it already says which module */
#p360-skillmap .sm-mod-title { display: block; font-size: clamp(17px, 2vw, 22px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; color: var(--p-head); }
#p360-skillmap .sm-modcount { display: flex; align-items: center; gap: 10px; flex-shrink: 0; font-family: var(--p-mono); font-size: 13px; color: var(--p-muted); white-space: nowrap; }
#p360-skillmap .sm-modtrack { display: inline-block; width: 64px; height: 6px; border-radius: 2px; background: var(--p-panel-3); overflow: hidden; }
#p360-skillmap .sm-modtrack i { display: block; height: 100%; width: 0; background: var(--p-sage); transition: width .35s; }
#p360-skillmap .sm-chev { flex-shrink: 0; width: 12px; height: 12px; border-right: 2px solid var(--p-muted); border-bottom: 2px solid var(--p-muted); transform: rotate(45deg); margin: -4px 6px 0 4px; transition: transform .2s; }
#p360-skillmap .sm-mod.open .sm-mod-btn .sm-chev { transform: rotate(-135deg); margin-top: 4px; }
#p360-skillmap .sm-mod-body { border-top: 1px solid var(--p-line); background: var(--p-deep); }
#p360-skillmap .sm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; padding: 16px; }

/* ---------- skill cards ---------- */
#p360-skillmap .sm-card { position: relative; display: flex; flex-direction: column; background: var(--p-panel); border: 1px solid var(--p-line-2); border-radius: 6px; padding: 16px 16px 14px; min-width: 0; overflow-wrap: break-word; transition: border-color .15s; }
#p360-skillmap .sm-card:hover { border-color: var(--p-sage-2); }
#p360-skillmap .sm-card[data-state="know"] { border-color: var(--p-sage); }
#p360-skillmap .sm-card[data-state="learn"] { border-color: var(--p-orange); }
#p360-skillmap .sm-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
#p360-skillmap .sm-lvl, #p360-skillmap .sm-area { font-size: 11px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; line-height: 1.2; padding: 4px 7px; border-radius: 4px; }
#p360-skillmap .sm-lvl { color: var(--p-sage-hi); border: 1px solid var(--p-line-2); }
#p360-skillmap .sm-area { color: var(--p-muted); background: var(--p-panel-3); }
#p360-skillmap .sm-card-name { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 12px; padding-right: 22px; }
#p360-skillmap .sm-open { background: none; border: 0; padding: 0; margin: 0; text-align: left; font: inherit; color: var(--p-text); cursor: pointer; }
#p360-skillmap .sm-open::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: 6px; }
#p360-skillmap .sm-open:focus-visible { outline: none; }
#p360-skillmap .sm-open:focus-visible::after { outline: 2px solid var(--p-sage-hi); outline-offset: 2px; }
#p360-skillmap .sm-card:hover .sm-open { color: var(--p-sage-hi); }
#p360-skillmap .sm-card-name::after { content: "↗"; position: absolute; top: 14px; right: 14px; font-size: 14px; color: var(--p-faint); }
#p360-skillmap .sm-card-meta { margin: auto 0 0; padding-top: 12px; border-top: 1px solid var(--p-line); display: grid; gap: 2px; }
#p360-skillmap .sm-card-meta dt { color: var(--p-faint); }
#p360-skillmap .sm-card-meta dd { margin: 0 0 8px; font-size: 14px; line-height: 1.4; }
#p360-skillmap .sm-card-meta .sm-need { color: var(--p-text); font-weight: 500; }
#p360-skillmap .sm-card-meta .sm-solves { color: var(--p-muted); }
#p360-skillmap .sm-check { position: absolute; top: -9px; left: -9px; width: 22px; height: 22px; border-radius: 50%; background: var(--p-sage); color: var(--p-ink); display: none; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; z-index: 3; }
#p360-skillmap .sm-card[data-state="know"] .sm-check { display: flex; }

#p360-skillmap .sm-rate { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding-top: 12px; border-top: 1px solid var(--p-line); }
#p360-skillmap .sm-rate button { min-height: 44px; padding: 4px 4px; background: var(--p-deep); border: 1px solid var(--p-line-2); border-radius: 4px; color: var(--p-muted); font-size: 12px; font-weight: 700; line-height: 1.15; cursor: pointer; }
#p360-skillmap .sm-rate button:hover { color: var(--p-text); border-color: var(--p-border); }
#p360-skillmap .sm-rate button.on[data-s="no"] { background: var(--p-panel-3); color: var(--p-text); border-color: var(--p-border); }
#p360-skillmap .sm-rate button.on[data-s="learn"] { background: var(--p-fill); color: var(--p-ink); border-color: transparent; box-shadow: var(--p-fill-shadow); }
#p360-skillmap .sm-rate button.on[data-s="know"] { background: var(--p-sel); color: var(--p-ink); border-color: transparent; }

#p360-skillmap .sm-card.sm-reco { box-shadow: 0 0 0 2px var(--p-sage-2); }
#p360-skillmap .sm-reco-tag { position: absolute; top: -10px; right: 12px; z-index: 3; background: var(--p-sel); color: var(--p-ink); font-size: 10px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; padding: 3px 8px; border-radius: 4px; }
@keyframes smFlash { 0%, 100% { box-shadow: 0 0 0 0 rgba(240, 106, 59, 0); } 30% { box-shadow: 0 0 0 3px var(--p-orange); } }
#p360-skillmap .sm-card.sm-flash { animation: smFlash 1.1s ease-out 2; }

/* ---------- path view ---------- */
#p360-skillmap .sm-path { position: relative; }
#p360-skillmap .sm-maphint { margin: 0 0 18px 60px; font-size: 14px; color: var(--p-muted); }
#p360-skillmap .sm-pathline { position: absolute; left: 25px; top: 60px; bottom: 30px; width: 2px; background: var(--p-line-2); }
#p360-skillmap .sm-pnode { position: relative; display: flex; align-items: center; gap: 14px; margin: 0 0 10px 60px; width: calc(100% - 60px); min-height: 72px; padding: 12px 16px; text-align: left; background: var(--p-panel); border: 1px solid var(--p-line); border-radius: 8px; cursor: pointer; }
#p360-skillmap .sm-pnode:hover, #p360-skillmap .sm-pnode.open { border-color: var(--p-sage-2); }
#p360-skillmap .sm-pdot { position: absolute; left: -54px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; background: var(--p-bg); border: 2px solid var(--p-border); display: flex; align-items: center; justify-content: center; font-family: var(--p-mono); font-size: 13px; color: var(--p-muted); z-index: 1; }
#p360-skillmap .sm-pnode.partial .sm-pdot { border-color: var(--p-orange); color: var(--p-orange); }
#p360-skillmap .sm-pnode.done .sm-pdot { border-color: var(--p-sage); background: var(--p-sage); color: var(--p-ink); }
#p360-skillmap .sm-pmain { flex: 1; min-width: 0; }
#p360-skillmap .sm-ptitle { display: block; font-size: 17px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; color: var(--p-sage-hi); }
#p360-skillmap .sm-pmeta { display: block; font-family: var(--p-mono); font-size: 12px; color: var(--p-muted); margin-top: 4px; }
#p360-skillmap .sm-pbar { display: block; height: 5px; max-width: 280px; margin-top: 8px; border-radius: 2px; background: var(--p-panel-3); overflow: hidden; }
#p360-skillmap .sm-pbar i { display: block; height: 100%; background: var(--p-sage); }
#p360-skillmap .sm-pnode .sm-chev { transform: rotate(-45deg); margin: 0 6px; }
#p360-skillmap .sm-pnode.open .sm-chev { transform: rotate(45deg); margin-top: -6px; }
#p360-skillmap .sm-pgraph { position: relative; z-index: 1; margin: -2px 0 14px 60px; }
#p360-skillmap .sm-graphwrap { overflow-x: auto; background: var(--p-screen); border: 1px solid var(--p-line); border-radius: 6px; padding: 12px; }
#p360-skillmap .sm-graphinner { position: relative; }
#p360-skillmap .sm-graph-svg { position: absolute; top: 0; left: 0; pointer-events: none; overflow: visible; }
#p360-skillmap .sm-graph-svg path { fill: none; stroke: var(--p-sage-2); stroke-opacity: 0.55; stroke-width: 1.6; }
#p360-skillmap .sm-gcol-h { position: absolute; top: 0; color: var(--p-muted); }
#p360-skillmap .sm-gnode { position: absolute; z-index: 2; width: 176px; min-height: 52px; padding: 8px 10px; text-align: left; background: var(--p-panel); border: 1px solid var(--p-line-2); border-radius: 4px; cursor: pointer; }
#p360-skillmap .sm-gnode:hover { border-color: var(--p-sage); }
#p360-skillmap .sm-gnode.s-know { border-color: var(--p-sage); box-shadow: inset 3px 0 0 var(--p-sage); }
#p360-skillmap .sm-gnode.s-learn { border-color: var(--p-orange); box-shadow: inset 3px 0 0 var(--p-orange); }
#p360-skillmap .sm-gname { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; font-weight: 700; line-height: 1.25; color: var(--p-text); }
#p360-skillmap .sm-gxmod { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; margin-top: 4px; font-size: 11px; color: var(--p-faint); }

/* ---------- dialogs ---------- */
body.sm-noscroll { overflow: hidden; }
#p360-skillmap .sm-overlay { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(20, 21, 20, 0.82); }
#p360-skillmap .sm-overlay[hidden] { display: none; }
#p360-skillmap .sm-dialog { position: relative; width: 100%; max-width: 760px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; background: var(--p-bg); border: 1px solid var(--p-line-2); border-top: 3px solid var(--p-sage); border-radius: 8px; padding: 26px 28px 28px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8); }
#p360-skillmap .sm-dialog:focus { outline: none; }
#p360-skillmap .sm-dialog-sm { max-width: 560px; }
#p360-skillmap .sm-dialog-x { top: 10px; right: 10px; }
#p360-skillmap .sm-mhead { padding-right: 44px; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--p-line); }
#p360-skillmap .sm-mhead h2 { font-size: clamp(26px, 4vw, 38px); font-weight: 700; letter-spacing: -0.04em; line-height: 1.05; color: var(--p-head); margin-bottom: 16px; }
#p360-skillmap .sm-mrate { max-width: 420px; padding-top: 0; border-top: 0; }
#p360-skillmap .sm-mbody { display: grid; gap: 14px; }
#p360-skillmap .sm-block { background: var(--p-panel); border: 1px solid var(--p-line); border-radius: 6px; padding: 16px 18px; }
#p360-skillmap .sm-block > h3, #p360-skillmap .sm-block h3.p-label { color: var(--p-sage); margin-bottom: 10px; }
#p360-skillmap .sm-screen { background: var(--p-deep); border-color: var(--p-line-2); }
#p360-skillmap .sm-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
#p360-skillmap .sm-bad { border-left: 3px solid var(--p-bad); }
#p360-skillmap .sm-bad h3 { color: var(--p-bad) !important; }
#p360-skillmap .sm-good { border-left: 3px solid var(--p-good); }
#p360-skillmap .sm-good h3 { color: var(--p-good) !important; }
#p360-skillmap .sm-do { border-left: 3px solid var(--p-sage); }
#p360-skillmap .sm-warn { border-left: 3px solid var(--p-warn); }
#p360-skillmap .sm-warn h3 { color: var(--p-warn) !important; }
#p360-skillmap .sm-rich { font-size: 15px; line-height: 1.6; color: var(--p-text); }
#p360-skillmap .sm-rich p { margin: 0 0 8px; }
#p360-skillmap .sm-rich p:last-child { margin-bottom: 0; }
#p360-skillmap .sm-rich ul, #p360-skillmap .sm-rich ol { margin: 0 0 8px; padding-left: 20px; display: grid; gap: 5px; }
#p360-skillmap .sm-rich ul:last-child, #p360-skillmap .sm-rich ol:last-child { margin-bottom: 0; }
#p360-skillmap .sm-rich li::marker { color: var(--p-sage-2); }
#p360-skillmap .sm-rich strong { color: var(--p-sage-hi); font-weight: 700; }
#p360-skillmap .sm-rich em { color: var(--p-text); }
#p360-skillmap .sm-toolcard { display: flex; align-items: center; gap: 16px; justify-content: space-between; text-decoration: none; background: var(--p-panel-2); border: 1px solid var(--p-sage-2); border-radius: 6px; padding: 16px 18px; }
#p360-skillmap .sm-toolcard > span:first-child { display: grid; gap: 4px; }
#p360-skillmap .sm-toolcard .p-label { color: var(--p-sage); }
#p360-skillmap .sm-toolcard b { font-size: 17px; letter-spacing: -0.02em; color: var(--p-text); }
#p360-skillmap .sm-toolcard .sm-muted { font-size: 14px; }
#p360-skillmap .sm-toolcard:hover { background: var(--p-panel-3); }
#p360-skillmap .sm-toolcard:hover .sm-arrow { transform: translateX(3px); }
#p360-skillmap .sm-toolcard[hidden] { display: none; }
#p360-skillmap #smMRelatedWrap { margin-top: 14px; }
#p360-skillmap #smMPrereqWrap[hidden] + #smMRelatedWrap { margin-top: 0; }
#p360-skillmap .sm-links { display: flex; flex-wrap: wrap; gap: 8px; }
#p360-skillmap .sm-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 12px; text-align: left; background: var(--p-deep); border: 1px solid var(--p-line-2); border-radius: 4px; font-size: 14px; line-height: 1.2; color: var(--p-text); cursor: pointer; }
#p360-skillmap .sm-link::before { content: "↳"; color: var(--p-sage-2); font-weight: 700; }
#p360-skillmap .sm-links-rel .sm-link::before { content: "→"; }
#p360-skillmap .sm-link:hover { border-color: var(--p-sage); color: var(--p-sage-hi); }

/* the check */
#p360-skillmap .sm-quiz-kicker { color: var(--p-muted); margin: 4px 0 14px; }
#p360-skillmap .sm-qprogress { font-family: var(--p-mono); font-size: 12px; color: var(--p-muted); margin: 0 0 6px; }
#p360-skillmap .sm-qstep-h { font-size: 24px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; color: var(--p-head); margin: 0 0 16px; padding-right: 30px; }
#p360-skillmap .sm-qopt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; margin-bottom: 8px; padding: 10px 14px; text-align: left; background: var(--p-panel); border: 1px solid var(--p-line-2); border-radius: 6px; font-size: 15px; line-height: 1.35; color: var(--p-text); cursor: pointer; }
#p360-skillmap .sm-qopt:hover { border-color: var(--p-sage); background: var(--p-panel-2); }
#p360-skillmap .sm-qopt-n { flex-shrink: 0; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 4px; background: var(--p-sel); color: var(--p-ink); font-family: var(--p-mono); font-size: 13px; font-weight: 700; }
#p360-skillmap .sm-qresult { margin: 0 0 16px; color: var(--p-muted); font-size: 15px; }
#p360-skillmap .sm-qresult b { color: var(--p-text); }
#p360-skillmap .sm-qgo { width: 100%; margin: 8px 0 8px; }
#p360-skillmap .sm-qagain { width: 100%; }

/* ---------- small screens ---------- */
@media (max-width: 700px) {
  #p360-skillmap .sm-hero { padding: 32px 0 22px; }
  #p360-skillmap .sm-pair { grid-template-columns: 1fr; }
  #p360-skillmap .sm-grid { grid-template-columns: 1fr; padding: 12px; }
  #p360-skillmap .sm-mod-btn { gap: 12px; padding: 12px 14px; }
  #p360-skillmap .sm-mod-num { width: auto; font-size: 20px; }
  #p360-skillmap .sm-modtrack { display: none; }
  #p360-skillmap .sm-modcount { font-size: 12px; }
  #p360-skillmap .sm-next { padding: 6px 14px 14px; }
  #p360-skillmap .sm-next-toggle { font-size: 20px; }
  #p360-skillmap .sm-next-b { min-width: 0; }
  #p360-skillmap .sm-dialog { padding: 20px 16px 20px; }
  #p360-skillmap .sm-block { padding: 14px; }
  #p360-skillmap .sm-overlay { padding: 8px; }
  #p360-skillmap .sm-dialog { max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); }
  #p360-skillmap .sm-maphint { margin-left: 50px; }
  #p360-skillmap .sm-pathline { left: 19px; }
  #p360-skillmap .sm-pnode { margin-left: 50px; width: calc(100% - 50px); gap: 10px; padding: 10px 12px; }
  #p360-skillmap .sm-pdot { left: -48px; width: 36px; height: 36px; font-size: 12px; }
  #p360-skillmap .sm-pgraph { margin-left: 0; }
  #p360-skillmap .sm-ptitle { font-size: 15px; }
  #p360-skillmap .sm-matrix-tools { width: 100%; }
  #p360-skillmap .sm-matrix-tools .sm-ghost { flex: 1; }
}
@media (max-width: 420px) {
  #p360-skillmap .sm-chip { padding: 0 10px; }
  #p360-skillmap .sm-quizbtn { padding: 14px 16px; }
}
#p360-skillmap .sm-area { color: #BFC2BC; }   /* 4.5:1 on the raised chip (2026-11-11) */
