/* ============================================================
   Theory for Guitarists — page-specific styles.
   Loaded AFTER css/shared.css; only rules unique to this page.
   ============================================================ */

/* ---------------- widget shells ---------------- */
.widget{
  background:var(--panel); border:1px solid var(--line); border-radius:12px;
  padding:18px 16px 14px; margin:22px 0;
}
.w-title{
  font-family:'IBM Plex Mono',monospace; font-size:12px; letter-spacing:.14em;
  text-transform:uppercase; color:var(--brass); margin-bottom:12px;
}
.w-scroll{overflow-x:auto;}
.w-scroll svg{min-width:640px; display:block;}
.w-legend{
  display:flex; gap:18px; flex-wrap:wrap; margin-top:8px;
  font-family:'IBM Plex Mono',monospace; font-size:11.5px; color:var(--muted);
}
.w-legend span{display:flex; align-items:center; gap:6px;}
.dot-demo{width:12px; height:12px; border-radius:50%; display:inline-block;}

/* ---------------- root / key picker buttons ---------------- */
.pick-btns{display:flex; gap:6px; flex-wrap:wrap; margin-bottom:14px;}
.pick-btns button{
  background:none; border:1px solid var(--line); color:var(--muted);
  font-family:'IBM Plex Mono',monospace; font-size:12.5px; font-weight:600;
  padding:6px 11px; border-radius:6px; cursor:pointer; position:relative;
}
.pick-btns button:hover{border-color:var(--brass-dim); color:var(--ink);}
.pick-btns button.on{background:var(--brass); border-color:var(--brass); color:var(--bg);}
.pick-btns button:focus-visible{outline:2px solid var(--pearl); outline-offset:2px;}
.pick-btns button.friendly::after{
  content:''; position:absolute; top:-3px; right:-3px;
  width:7px; height:7px; border-radius:50%; background:var(--sage);
}

/* ---------------- chromatic ring ---------------- */
.ring-flex{display:flex; gap:20px; flex-wrap:wrap; align-items:center;}
.ring-svg{flex:0 1 300px; min-width:240px; margin:0 auto;}
.ring-info{flex:1 1 240px; min-width:220px;}
.ring-info .ri-note{
  font-family:'Fraunces',serif; font-size:34px; font-weight:700; color:var(--brass);
}
.ring-info .ri-meta{
  font-family:'IBM Plex Mono',monospace; font-size:13px; color:var(--muted);
  margin-top:6px; line-height:1.8;
}
.ring-note{cursor:pointer;}
.ring-note circle{fill:var(--panel2); stroke:var(--line); stroke-width:1.5; transition:fill .15s;}
.ring-note.acc circle{fill:var(--wood);}
.ring-note text{
  fill:var(--ink); font-family:'IBM Plex Mono',monospace; font-size:13px;
  font-weight:600; text-anchor:middle;
}
.ring-note.acc text{fill:var(--muted); font-size:10.5px;}
.ring-note.sel circle{fill:var(--brass); stroke:var(--brass);}
.ring-note.sel text{fill:#1B140E;}
.ring-note:hover circle{stroke:var(--brass-dim);}
.ring-note:focus{outline:none;}
.ring-note:focus-visible circle{stroke:var(--pearl); stroke-width:3;}

/* ---------------- note / degree chips ---------------- */
.chip-row{display:flex; gap:8px; flex-wrap:wrap; margin:10px 0; align-items:center;}
.chip-row .cr-label{
  font-family:'IBM Plex Mono',monospace; font-size:11px; letter-spacing:.12em;
  text-transform:uppercase; color:var(--muted); min-width:74px;
}
.chip{
  font-family:'IBM Plex Mono',monospace; font-size:14px; font-weight:600;
  background:var(--panel2); border:1px solid var(--line); border-radius:6px;
  padding:4px 10px; color:var(--ink); min-width:40px; text-align:center;
}
.chip.root{background:var(--brass); border-color:var(--brass); color:var(--bg);}
.chip.ghost{background:none; border-style:dashed; color:var(--muted);}

/* ---------------- key-family table extras ---------------- */
td .tag{
  display:inline-block; font-family:'IBM Plex Mono',monospace; font-size:10.5px;
  letter-spacing:.08em; text-transform:uppercase; color:var(--sage);
  border:1px solid rgba(157,180,140,.4); border-radius:5px; padding:1px 7px; margin-left:8px;
}
td.mono{font-family:'IBM Plex Mono',monospace; font-size:13.5px;}

/* ---------------- self-quiz (tap-to-reveal) ---------------- */
.quizset{counter-reset:quiz;}
details.quiz{
  background:var(--panel); border:1px solid var(--line); border-radius:10px;
  margin:10px 0; overflow:hidden;
}
details.quiz summary{
  cursor:pointer; padding:13px 16px; font-weight:600; font-size:15px;
  list-style:none; display:flex; gap:12px; align-items:baseline;
}
details.quiz summary::-webkit-details-marker{display:none;}
details.quiz summary::before{
  content:'Q' counter(quiz); counter-increment:quiz;
  font-family:'IBM Plex Mono',monospace; font-size:11.5px; color:var(--brass);
  letter-spacing:.08em; flex:0 0 auto;
}
details.quiz summary:hover{color:var(--brass);}
details.quiz summary:focus-visible{outline:2px solid var(--pearl); outline-offset:-2px;}
details.quiz[open] summary{border-bottom:1px solid var(--line); color:var(--brass);}
details.quiz .a{
  padding:12px 16px; color:var(--muted); font-size:14.5px; background:var(--panel2);
}
details.quiz .a strong{color:var(--sage);}
