/* ---------- Chord Map (CAGED) ---------- */
.cg{background:var(--bg);color:var(--ink);min-height:100vh}
.cg-sec{display:flex;flex-direction:column;gap:14px}
.cg-head{display:flex;flex-direction:column;gap:4px}
.cg-head h2{font-family:var(--f-display);font-stretch:112%;font-weight:800;font-size:24px;margin:0}
.cg-sub{margin:0;color:var(--muted);max-width:72ch;font-size:14.5px}
.cg-legend{display:flex;flex-wrap:wrap;gap:8px 24px;font-size:14px;color:var(--muted)}
.cg-legend span{display:inline-flex;gap:8px;align-items:center}
.cg-legend b{color:var(--ink)}
.cg-dot{width:16px;height:16px;border-radius:50%;display:inline-block;flex:none}
.cg-dot.r{background:var(--accent)} .cg-dot.t{background:var(--mint)} .cg-dot.f{background:var(--steel)}
.cg .lg-controls{background:var(--surface);border-color:var(--line)}
.cg .lg-seg button[aria-pressed="true"]{background:var(--sel-bg);color:var(--sel-fg)}
.cg select{background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:8px}
.cg .btn{background:var(--surface);border-color:var(--line);color:var(--ink)}
.cg .btn:hover{border-color:var(--steel)}
.cg-neck{padding:8px 6px}
.cg-note{margin:0;font-size:14px;color:var(--muted);max-width:80ch}
.cg-shapes{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:10px}
.cg-card{margin:0;background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:10px 10px 6px;display:flex;flex-direction:column;gap:6px;min-width:0}
.cg-card figcaption{display:flex;justify-content:space-between;align-items:baseline;gap:8px;font-size:12.5px;color:var(--muted)}
.cg-card figcaption b{font-family:var(--f-display);font-stretch:112%;font-weight:800;font-size:16px;color:var(--ink)}
.cg-card svg{display:block}
.cg-slide{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.25fr);gap:22px;align-items:center;background:var(--surface);border:1px solid var(--line);border-top:5px solid var(--accent);border-radius:12px;padding:18px 20px}
@media (max-width:720px){.cg-slide{grid-template-columns:1fr}}
.cg-readout{min-width:0;display:flex;flex-direction:column;gap:4px}
.cg-eq{font-size:16px;color:var(--muted);display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.cg-chip{background:var(--sel-bg);color:var(--sel-fg);border-radius:999px;padding:4px 12px;font-weight:700;font-size:15px}
.cg-name{font-family:var(--f-display);font-stretch:118%;font-weight:900;font-size:clamp(32px,5vw,50px);line-height:1.05;color:var(--ink)}
.cg-diagram{min-width:0}
.cg-diagram svg{display:block;max-width:100%}
.cg-fretrow{display:flex;gap:8px;align-items:center}
#cg-fret{width:220px;max-width:50vw;accent-color:var(--accent)}
/* ---------- Shape heatmap ---------- */
.pb-dot.p{background:var(--surface);border:2px solid var(--muted);box-sizing:border-box}
.pb-dot.s{background:transparent;border:3px solid var(--ink);box-sizing:border-box}
.pb-hooks{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:10px}
.pb-hook{text-align:left;background:var(--surface);border:1px solid var(--line);border-top:4px solid var(--zc);border-radius:10px;padding:10px 12px;display:flex;flex-direction:column;gap:4px;cursor:pointer;min-width:0;color:var(--ink)}
.pb-hook:hover{border-color:var(--zc)}
.pb-hook[aria-pressed="true"]{border-color:var(--zc);box-shadow:inset 0 0 0 1px var(--zc)}
.pb-hook b{font-family:var(--f-display);font-stretch:112%;font-weight:800;font-size:16px}
.pb-hook span{font-size:13.5px;color:var(--muted)}
.pb-steps{margin:0;padding-left:1.3em;display:flex;flex-direction:column;gap:6px;font-size:14.5px;max-width:80ch}
.pb-steps b{color:var(--ink)}
.cg-sub.pb-wide{max-width:none}
.pb-h3{margin:4px 0 0;font-size:12px;text-transform:uppercase;letter-spacing:.07em;color:var(--muted);font-weight:600}
/* five-box scale overview */
.sc-wrap{display:flex;flex-direction:column;gap:14px;border-top:1px solid var(--line);padding-top:22px;margin-top:8px}
.sc-wrap h3.sc-title{font-family:var(--f-display);font-stretch:112%;font-weight:800;font-size:24px;margin:0}
.sc-controls{flex-direction:column;align-items:stretch}
.sc-controls .lg-seg{flex-wrap:wrap;border-radius:14px}
.sc-blurb{margin:0;font-size:15px;max-width:none}
.sc-facts{display:flex;flex-wrap:wrap;gap:12px 24px;align-items:center}
.sc-notes{display:flex;flex-wrap:wrap;gap:6px}
.sc-note{display:flex;flex-direction:column;align-items:center;min-width:44px;padding:6px 8px;border-radius:10px;background:var(--surface);border:1px solid var(--line)}
.sc-note strong{font-size:16px;line-height:1.1}
.sc-note span{font-size:11px;color:var(--muted);font-family:var(--f-mono)}
.sc-note.is-root{background:var(--accent);border-color:var(--accent)}
.sc-note.is-root strong,.sc-note.is-root span{color:var(--on-root)}
.sc-note.is-added{border:2px solid var(--accent)}
.sc-note.is-blue{border:2px dashed var(--accent)}
.sc-list{display:flex;flex-wrap:wrap;gap:6px 22px;font-size:14px}
.sc-list .lg-lab{margin-right:6px}
.sc-legend{display:flex;flex-wrap:wrap;gap:8px 20px;font-size:13.5px;color:var(--muted);align-items:center}
.sc-legend span{display:inline-flex;align-items:center;gap:7px}
.sc-legend i{width:14px;height:14px;border-radius:50%;display:inline-block;flex:none}
.sc-legend i.r{background:var(--accent)}.sc-legend i.n{background:var(--steel)}.sc-legend i.a{border:2px solid var(--accent)}.sc-legend i.b{border:2px dashed var(--accent)}
.sc-legend i.z{border-radius:4px;opacity:.55}
.sc-boxes{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px}
.sc-box{margin:0;background:var(--surface);border:1px solid var(--line);border-top:4px solid var(--c);border-radius:10px;padding:10px 12px;display:flex;flex-direction:column;gap:6px;min-width:0}
.sc-box .sc-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.sc-box .num{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;background:var(--c);color:#fff;font-weight:800;font-size:13px}
.sc-box .sc-head b{font-family:var(--f-display);font-size:18px}
.sc-box .sc-head .shp{color:var(--c);font-weight:700;font-size:14px}
.sc-box .sc-fr{font-size:12.5px;color:var(--muted);font-family:var(--f-mono)}
.sc-item{display:flex;flex-direction:column;gap:8px;min-width:0}
.sc-item .sc-box{flex:none}
.sc-nick{margin:0;padding-left:10px;border-left:3px solid var(--c);font-size:14px;font-weight:600;color:var(--ink);line-height:1.3}
.sc-box svg{width:100%;height:auto;display:block}
.sc-foot{margin:0;font-size:13.5px;color:var(--muted);max-width:none}
/* Find the shape: box cards under the neck */
.pb-boxitem{all:unset;box-sizing:border-box;display:flex;flex-direction:column;gap:6px;cursor:pointer;min-width:0;transition:opacity .15s}
.pb-boxitem.is-dim{opacity:.4}
.pb-boxitem:hover{opacity:1}
.pb-boxitem:focus-visible .sc-box{outline:2px solid var(--steel);outline-offset:2px}
.pb-boxes-sub{margin:-4px 0 10px}
/* Connect boxes */
.bc-ribbon{display:flex;align-items:stretch;gap:0;overflow-x:auto;padding:2px 2px 6px}
.bc-box{--c:var(--steel);flex:1 1 0;min-width:96px;display:flex;flex-direction:column;align-items:center;gap:3px;padding:8px 6px;border-radius:12px;border:2px solid var(--line);border-top:5px solid var(--c);background:var(--surface);opacity:.5;text-align:center}
.bc-box.on{opacity:1;border-color:var(--c);background:color-mix(in srgb,var(--c) 10%,var(--surface))}
.bc-box .bc-n{width:30px;height:30px;font-size:16px;background:var(--c)}
.bc-nick{font-weight:800;font-size:13px;line-height:1.2;color:var(--ink)}
.bc-box small{font:600 10.5px/1.2 var(--f-mono);color:var(--muted)}
.bc-link{flex:none;align-self:center;width:38px;height:38px;margin:0 -4px;z-index:1;border-radius:50%;border:2px dashed var(--line);background:var(--bg);color:var(--muted);font-size:18px;font-weight:900;cursor:pointer;display:grid;place-items:center;padding:0}
.bc-link[aria-pressed="true"]{border:2px solid var(--accent);background:var(--accent);color:#fff}
.bc-link:hover{border-color:var(--accent)}
.bc-tools{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:6px}
.bc-tools .btn[aria-pressed="true"]{border-color:var(--ink);background:var(--surface-2)}
.bc-hint{font-size:13px;color:var(--muted)}
.bc-n{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;color:#fff;font-weight:900;font-size:15px}
.bc-map{padding-top:4px;padding-bottom:4px}
.bc-chain+.bc-chain{margin-top:12px}
.sc-legend i.bc-sl{width:26px;height:6px;border-radius:3px;background:var(--accent)}
.bc-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px}
.bc-fact{background:var(--surface);border:1px solid var(--line);border-left:5px solid var(--c);border-radius:12px;padding:12px 16px}
.bc-fact>b{font-family:var(--f-display);font-size:17px;display:block;margin-bottom:6px}
.bc-fact p{margin:0 0 6px;font-size:14px;color:var(--muted);line-height:1.5}
.bc-seq{color:var(--ink)!important;font-size:15px!important;line-height:1.8!important}
.bc-seq b{font-family:var(--f-display);font-size:18px}
.bc-seq span{font-weight:700}
.bc-seq i{font-style:normal;color:var(--accent);font-weight:900;margin:0 2px}
.bc-slides{margin:0;padding-left:18px;font-size:14px;line-height:1.7}
.bc-slides span{color:var(--muted)}
@media (max-width:560px){.bc-box{min-width:84px}.bc-nick{font-size:12px}}

/* Connect boxes: the five boxes as separate cards in C-A-G-E-D order, with space between */
.bc-five{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:18px;margin-top:6px}
.sc-legend i.sm{width:9px;height:9px;background:var(--steel)}
.sc-wwh{max-width:70ch;margin:10px 0 0;font-size:14.5px;line-height:1.55;color:var(--muted)}
.sc-wwh b{color:var(--ink)}

/* CAGED poster (Boxes view, bottom) */
.cp-head{margin-top:34px}
.cp-stack{display:grid;gap:8px;margin:6px 0 12px}
.cp-all{margin-top:6px}
.sc-legend i.cp-sq{width:13px;height:13px;border-radius:3px;background:var(--ink)}
.sc-legend i.cp-dot{border:2px solid var(--ink);background:var(--surface)}
.sc-legend i.cp-ring{border:3px solid var(--steel);background:var(--surface)}
.sc-legend i.cp-dash{border:2px dashed var(--ink);background:var(--surface)}
