/* The Circle of Fifths' look, its one copy, linked after /site.css by /circle-of-fifths/; circle.js draws into it.
   The wheel on the left, in the turning ring, and the key picked on it at its side (under it on a phone); the words
   on reading it below both. A key is drawn in its tonic's colours from the key map, which circle.js sets on each
   wedge and chord: --k its colour on a chart, --ink a label's on it, --b its colour on air. Unlit, a wedge is the
   night's fill with its name in --b; lit, the six chords of the key shown fill with --k, a black-key tonic rimmed
   in --b as a played black key is, and the key itself stands a little out of the wheel, outlined in white. */
.cof { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 36px clamp(28px, 4vw, 56px); align-items: start; }
@media (max-width: 900px) { .cof { grid-template-columns: minmax(0, 1fr); } }
/* Wide, the wheel stays in sight while the key beside it scrolls. */
@media (min-width: 901px) and (min-height: 700px) { .wheel { position: sticky; top: 24px; } }

/* The wheel, round, in the site's turning ring. */
.wheel { width: min(100%, 620px); aspect-ratio: 1; margin: 0 auto; border-radius: 50%; isolation: isolate;
  --glow: 7%; --glow-blur: 44px; --glow-o: .26; --ring-turn: 24s; }
.wheel svg { display: block; width: 100%; height: 100%; overflow: visible; font-family: var(--sans); }
.w { cursor: pointer; outline: none; }
.w .face { fill: var(--fill); stroke: var(--ground); stroke-width: 3; transition: fill .35s, stroke .35s; }
.w .rim { fill: none; stroke: var(--b); stroke-width: 3; opacity: 0; transition: opacity .35s; }
.w text { text-anchor: middle; dominant-baseline: central; pointer-events: none; transition: fill .35s, opacity .35s; }
.w .name { fill: var(--b); font-weight: 700; letter-spacing: .01em; }
.w.major .name { font-family: var(--display); font-weight: 800; }
.w .alt { fill: var(--b); font-weight: 500; opacity: .72; }
.w .num { fill: var(--ink); font-weight: 700; letter-spacing: .04em; opacity: 0; }
.w.lit .face { fill: var(--k); }
.w.lit text { fill: var(--ink); }
.w.lit .num { opacity: .78; }
.w.lit.black .rim { opacity: 1; }
.w.tonic { transform: var(--out); }
.halo { fill: none; stroke: var(--white); stroke-width: 3.5; stroke-linejoin: round; pointer-events: none; }
@media (hover: hover) {
  .w:not(.lit):hover .face { fill: var(--fill-2); }
  .w.lit:hover .face { stroke: var(--white); }
}
.w:focus-visible .face { stroke: var(--sky); stroke-width: 4; }
.sig-ring { fill: none; stroke: var(--panel); }
.sig { fill: var(--muted); font-weight: 600; text-anchor: middle; dominant-baseline: central; letter-spacing: .02em;
  transition: fill .35s; }
.sig.on { fill: var(--white); }
.hub { fill: var(--ground); stroke: var(--hairline); stroke-width: 1; }
.crane { mix-blend-mode: screen; }
@media (prefers-reduced-motion: reduce) {
  .w .face, .w .rim, .w text, .sig { transition: none; }
}

/* The key picked, beside it. */
.key { display: grid; gap: 26px; align-content: start; }
.key section { display: grid; gap: 12px; }
.key .eyebrow { margin: 0; }
.key-head { display: grid; gap: 12px; }
.key-head h2 { margin: 0; font: 900 clamp(32px, 4.4vw, 48px)/1.04 var(--display); letter-spacing: .02em; text-transform: uppercase;
  color: var(--b, var(--white)); transition: color .35s; }
/* Cinzel has no sharp or flat: Poppins' own, smaller and raised, as written over a chord. */
.key-head h2 .acc { font-family: var(--sans); font-weight: 700; font-size: .6em; vertical-align: .5em; margin-left: .04em; }
.key p { margin: 0; font-size: 16px; line-height: 1.65; color: var(--soft); }
.key .jump { font: inherit; padding: 0; border: 0; background: none; cursor: pointer; color: var(--b, var(--white));
  font-weight: 600; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
  text-underline-offset: 3px; transition: text-decoration-color .2s; }
.key .jump:focus-visible { text-decoration-color: currentColor; outline: none; }
@media (hover: hover) { .key .jump:hover { text-decoration-color: currentColor; } }

/* Both spellings, at the bottom of the wheel: one pill, as the site's switches are. */
.spell { display: inline-flex; justify-self: start; gap: 2px; padding: 2px; border: 1px solid var(--hairline); border-radius: 999px; }
.spell[hidden] { display: none; }
.spell button { font: 600 13px/1 var(--sans); padding: 8px 13px; border: 0; border-radius: 999px; background: none;
  color: var(--soft); cursor: pointer; white-space: nowrap; }
.spell button[aria-pressed="true"] { background: var(--text); color: var(--ground); }
@media (hover: hover) { .spell button:not([aria-pressed="true"]):hover { color: var(--white); } }
.spell button:focus-visible { outline: var(--focus); outline-offset: -2px; }

.staff-box { width: min(100%, 440px); padding: 14px 18px; border-radius: 12px; background: var(--panel);
  box-shadow: 0 0 0 1px rgba(255,255,255,.08); }
#k-sig { display: block; width: 100%; height: auto; }
#k-sig .staff { stroke: #8fa0c8; stroke-width: .1; stroke-linecap: round; }
#k-sig .clef { fill: var(--soft); }

#k-scale { display: block; width: 100%; height: auto; }
#k-scale .wk { stroke: rgba(0,0,0,.32); stroke-width: 1; }
#k-scale .bk-rim { fill: none; }
#k-scale .lip { fill: #3a4160; }
#k-scale .lbl { font-family: var(--sans); font-weight: 700; text-anchor: middle; }
.notes { font-weight: 600; letter-spacing: .08em; white-space: pre-wrap; color: var(--text); }
.hear { justify-self: start; }

/* Its seven chords, each in its root's colour; a tap plays it. */
.chords { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.chords button { width: 100%; display: grid; justify-items: center; gap: 3px; padding: 9px 2px 10px; border: 0; border-radius: 10px;
  background: var(--k); color: var(--ink); cursor: pointer; font-family: var(--sans);
  transition: transform .2s cubic-bezier(.2, .8, .2, 1), box-shadow .2s; }
.chords .black button { box-shadow: inset 0 0 0 2.5px var(--b); }
.chords small { font-size: 12px; font-weight: 700; letter-spacing: .04em; opacity: .78; }
.chords b { font-size: clamp(13px, 1.5vw, 16px); font-weight: 800; color: inherit; white-space: nowrap; }
.chords button:focus-visible { outline: var(--focus); outline-offset: -2px; }
@media (hover: hover) { .chords button:hover { transform: translateY(-2px); } }
.chords button:active { transform: translateY(1px); }
@media (prefers-reduced-motion: reduce) { .chords button { transition: none; } .chords button:active { transform: none; } }
@media (prefers-reduced-motion: reduce) and (hover: hover) { .chords button:hover { transform: none; } }
@media (max-width: 420px) {
  .chords { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.key .aside { font-size: 14.5px; color: var(--muted); }
.key .aside[hidden] { display: none; }

/* Reading it, below. */
.read { max-width: 760px; margin-top: 64px; }
.read section { margin: 0 0 34px; }
.read h2 { position: relative; margin: 0 0 14px; padding-top: 14px; font: 800 clamp(19px, 2.4vw, 23px)/1.3 var(--display);
  letter-spacing: .03em; color: var(--white); }
.read h2::before { content: ""; position: absolute; inset: 0 0 auto; height: 1px; background: var(--crane); }
.read p { margin: 0 0 12px; font-size: 16.5px; line-height: 1.75; color: var(--soft); }
.read b { color: var(--gold); font-weight: 600; }
.read a { color: var(--white); text-decoration: underline; text-decoration-color: rgba(255,255,255,.35); text-underline-offset: 3px;
  transition: text-decoration-color .2s; }
.read a:focus-visible { text-decoration-color: var(--white); outline: none; }
@media (hover: hover) { .read a:hover { text-decoration-color: var(--white); } }
@media (prefers-reduced-motion: reduce) { .read a { transition: none; } }
