@charset "UTF-8";
/* =========================================================================
   Sonor — Chord Checker V1 (prototip)
   Tokens copied from sonor-site/public_html/assets/css/site.css so the
   prototype already looks like the place it is going to live in.
   ========================================================================= */

:root {
  --brand-blue:   #2b7fff;
  --brand-purple: #7c4dff;
  --brand-orange: #ff6a1a;
  --brand-navy:   #0b1533;
  --brand-gradient: linear-gradient(120deg, var(--brand-blue), var(--brand-purple) 45%, var(--brand-orange));
  --brand-orange-ink: #b8480c;

  --bg:        #ffffff;
  --bg-sunken: #f4f6fb;
  --bg-raised: #ffffff;

  --text:       #16203c;
  --text-muted: #5b678a;

  --line:        #dde3f0;
  --line-strong: #c3cce0;

  --accent:      #1f63d6;
  --accent-soft: #eaf1ff;

  --ok:      #0c7150;
  --ok-soft: #e6f6ef;
  --warn:      #8a5a00;
  --warn-soft: #fdf3e0;
  --bad:      #b3261e;
  --bad-soft: #fdeceb;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgb(11 21 51 / .06), 0 2px 8px rgb(11 21 51 / .05);
  --shadow-md: 0 4px 12px rgb(11 21 51 / .08), 0 12px 32px rgb(11 21 51 / .07);

  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem;
  --s-5: 1.5rem; --s-6: 2rem; --s-7: 3rem;

  --wrap: 1180px;
  --font-sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Cascadia Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  color-scheme: light;
}

/* Dark follows the system unless the visitor picked light, and data-theme wins
   over both — the same rule the site uses, so the block drops straight in. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #0b1533;
    --bg-sunken: #08102a;
    --bg-raised: #121e42;
    --text:       #e9eefc;
    --text-muted: #a3b0d4;
    --line:        #22305c;
    --line-strong: #35477e;
    --accent:      #7fb0ff;
    --accent-soft: #16224a;
    --ok:      #4fd6a1;
    --ok-soft: #0e2d24;
    --warn:      #f0c26b;
    --warn-soft: #2e2413;
    --bad:      #ff8f86;
    --bad-soft: #331614;
    --brand-orange-ink: #ff8b4d;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / .3), 0 2px 8px rgb(0 0 0 / .25);
    --shadow-md: 0 4px 12px rgb(0 0 0 / .35), 0 12px 32px rgb(0 0 0 / .3);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg:        #0b1533;
  --bg-sunken: #08102a;
  --bg-raised: #121e42;
  --text:       #e9eefc;
  --text-muted: #a3b0d4;
  --line:        #22305c;
  --line-strong: #35477e;
  --accent:      #7fb0ff;
  --accent-soft: #16224a;
  --ok:      #4fd6a1;
  --ok-soft: #0e2d24;
  --warn:      #f0c26b;
  --warn-soft: #2e2413;
  --bad:      #ff8f86;
  --bad-soft: #331614;
  --brand-orange-ink: #ff8b4d;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / .3), 0 2px 8px rgb(0 0 0 / .25);
  --shadow-md: 0 4px 12px rgb(0 0 0 / .35), 0 12px 32px rgb(0 0 0 / .3);
  color-scheme: dark;
}

* { box-sizing: border-box; }

/* The browser hides [hidden] with `display: none`, but that comes from the user
   agent sheet and any `display` declared here outranks it — so the result card
   and the buttons that wait for a first reading showed up on load, empty. */
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-sunken);
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 var(--s-3); }
p { margin: 0 0 var(--s-3); }

.cc-wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--s-4); }

/* ----------------------------------------------------------------- banner
   The page is reachable on the live site, so it has to say what it is before
   anything else does. */

.cc-banner {
  margin: 0;
  padding: var(--s-3) var(--s-4);
  background: var(--warn-soft);
  color: var(--warn);
  border-bottom: 2px solid var(--warn);
  font-size: .9rem;
  text-align: center;
}
.cc-banner strong { color: inherit; }
.cc-banner em { font-style: normal; font-weight: 600; }
.cc-banner a { color: inherit; text-decoration: underline; white-space: nowrap; }

/* ------------------------------------------------------------------- head */

.cc-head {
  background: var(--brand-navy);
  color: #f6f8fd;
  padding: var(--s-6) 0 var(--s-7);
  border-bottom: 4px solid transparent;
  border-image: var(--brand-gradient) 1;
}
.cc-eyebrow {
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .75rem;
  color: #a3b0d4;
  margin-bottom: var(--s-2);
}
.cc-head h1 { font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem); }
.cc-head h1 span {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cc-lead { color: #c9d3ee; max-width: 60ch; margin: 0; }
.cc-lead--phone {
  margin-top: var(--s-3);
  padding-top: var(--s-3);
  border-top: 1px solid rgb(255 255 255 / .15);
  font-size: .88rem;
}
.cc-lead--phone strong { color: #fff; }

/* ------------------------------------------------------------------ grid */

.cc-grid {
  display: grid;
  gap: var(--s-5);
  grid-template-columns: minmax(0, 1fr);
  margin-block: calc(-1 * var(--s-5)) var(--s-6);
}
@media (min-width: 900px) {
  .cc-grid { grid-template-columns: 20rem minmax(0, 1fr); align-items: start; }
}

.cc-panel {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  padding: var(--s-5);
}
.cc-panel h2 { font-size: 1.1rem; display: flex; align-items: center; gap: var(--s-2); }
.cc-panel h3 {
  font-size: .8rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-muted); margin-top: var(--s-5);
}
.cc-step {
  display: grid; place-items: center;
  width: 1.6rem; height: 1.6rem; border-radius: var(--r-pill);
  background: var(--brand-gradient); color: #fff;
  font-size: .85rem; font-weight: 700;
}

/* --------------------------------------------------------------- chords */

.cc-levels { display: grid; gap: var(--s-3); }
.cc-level__title {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-muted); margin: 0 0 var(--s-1);
}
.cc-chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }

.cc-chip {
  font: inherit; font-weight: 600;
  cursor: pointer;
  padding: .3rem .65rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--text);
  transition: border-color .16s ease, background .16s ease, color .16s ease;
}
.cc-chip:hover { border-color: var(--accent); color: var(--accent); }
.cc-chip[aria-pressed="true"] {
  background: var(--brand-gradient);
  border-color: transparent;
  color: #fff;
}
.cc-chip__frets {
  display: block;
  font: .65rem/1.4 var(--font-mono);
  opacity: .75;
  letter-spacing: .08em;
}

.cc-ref { margin-top: var(--s-5); }
.cc-hint { font-size: .8rem; color: var(--text-muted); margin: var(--s-2) 0 0; }

/* --------------------------------------------------------------- target */

.cc-target {
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--s-4);
  margin-bottom: var(--s-4);
}
.cc-target__label {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-muted); margin: 0 0 var(--s-1);
}
.cc-target__name {
  font-size: 1.8rem; font-weight: 700; line-height: 1.1;
  margin: 0 0 var(--s-3);
}
.cc-target__name em {
  font-style: normal; font-size: 1rem; font-weight: 400; color: var(--text-muted);
}
.cc-target__notes {
  font: 700 1.15rem/1.3 var(--font-mono);
  color: var(--brand-orange-ink);
  margin: 0;
}

/* -------------------------------------------------------------- controls */

.cc-controls { display: flex; flex-wrap: wrap; gap: var(--s-3); }

.cc-btn {
  font: inherit; font-weight: 600;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .6rem 1.1rem;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  transition: transform .12s ease, box-shadow .16s ease, background .16s ease;
}
.cc-btn:active { transform: translateY(1px); }
.cc-btn--primary { background: var(--brand-gradient); color: #fff; box-shadow: var(--shadow-sm); }
.cc-btn--primary:hover { box-shadow: var(--shadow-md); }
.cc-btn--ghost { background: var(--bg); color: var(--accent); border-color: var(--line-strong); }
.cc-btn--ghost:hover { border-color: var(--accent); }
.cc-btn[data-on="true"] { background: var(--bad); color: #fff; }
.cc-btn:disabled { opacity: .5; cursor: not-allowed; }

.cc-status {
  margin: var(--s-3) 0 var(--s-2);
  font-weight: 600;
  min-height: 1.6em;
}
.cc-status[data-tone="bad"]  { color: var(--bad); }
.cc-status[data-tone="wait"] { color: var(--text-muted); }

/* ----------------------------------------------------------------- meter */

.cc-meter {
  position: relative;
  height: 12px;
  border-radius: var(--r-pill);
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  overflow: hidden;
  margin-bottom: var(--s-4);
}
.cc-meter__fill {
  display: block; height: 100%; width: 0;
  background: var(--brand-gradient);
  transition: width .06s linear;
}
.cc-meter__gate {
  position: absolute; top: 0; bottom: 0; width: 2px;
  background: var(--text-muted); opacity: .8;
}
.cc-meter__window {
  position: absolute; left: 0; bottom: 0; height: 3px; width: 0;
  background: var(--brand-orange);
}

/* ---------------------------------------------------------------- result */

.cc-result {
  display: flex; align-items: center; gap: var(--s-4);
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--bg-sunken);
  padding: var(--s-4);
  margin-bottom: var(--s-4);
}
.cc-result[data-verdict="correct"] { background: var(--ok-soft);   border-color: var(--ok); }
.cc-result[data-verdict="partial"] { background: var(--warn-soft); border-color: var(--warn); }
.cc-result[data-verdict="wrong"]   { background: var(--bad-soft);  border-color: var(--bad); }

.cc-ring {
  --p: 0;
  flex: none;
  width: 84px; height: 84px; border-radius: 50%;
  display: grid; place-items: center;
  background: conic-gradient(var(--ring, var(--accent)) calc(var(--p) * 1%), var(--line) 0);
}
.cc-ring > span {
  display: grid; place-items: center;
  width: 66px; height: 66px; border-radius: 50%;
  background: var(--bg-raised);
  font-weight: 700; font-size: 1.3rem;
}
.cc-ring i { font-style: normal; font-size: .7rem; color: var(--text-muted); }
.cc-result[data-verdict="correct"] .cc-ring { --ring: var(--ok); }
.cc-result[data-verdict="partial"] .cc-ring { --ring: var(--warn); }
.cc-result[data-verdict="wrong"]   .cc-ring { --ring: var(--bad); }

.cc-result__text { min-width: 0; }
.cc-result__verdict { font-size: 1.1rem; font-weight: 700; margin: 0 0 var(--s-1); }
.cc-result[data-verdict="correct"] .cc-result__verdict { color: var(--ok); }
.cc-result[data-verdict="partial"] .cc-result__verdict { color: var(--warn); }
.cc-result[data-verdict="wrong"]   .cc-result__verdict { color: var(--bad); }
.cc-result__notes { font: 700 1.05rem/1.3 var(--font-mono); margin: 0 0 var(--s-1); }
.cc-result__note { font-size: .88rem; color: var(--text-muted); margin: 0; }

/* ---------------------------------------------------------------- chroma */

.cc-chroma {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: .25rem;
  align-items: end;
  height: 130px;
  padding: var(--s-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-sunken);
}
.cc-pc {
  --v: 0;
  display: grid;
  grid-template-rows: 1fr auto auto;
  align-items: end;
  justify-items: center;
  height: 100%;
  gap: 2px;
  min-width: 0;
}
.cc-pc__bar {
  width: 100%;
  height: calc(var(--v) * 100%);
  min-height: 2px;
  border-radius: 3px 3px 0 0;
  background: var(--line-strong);
  transition: height .08s linear, background .16s ease;
}
.cc-pc[data-in-chord="1"] .cc-pc__bar { background: var(--accent); }
/* a note of the chord, loud enough to count */
.cc-pc[data-in-chord="1"][data-hit="1"] .cc-pc__bar { background: var(--brand-orange); }
/* something that is not in the chord but is being played anyway */
.cc-pc[data-in-chord="0"][data-hit="1"] .cc-pc__bar { background: var(--bad); }
.cc-pc__name { font: 700 .75rem/1 var(--font-mono); }
.cc-pc__solf { font-size: .58rem; color: var(--text-muted); }
.cc-pc[data-in-chord="1"] .cc-pc__name { color: var(--accent); }

.cc-heard {
  font: .95rem/1.5 var(--font-mono);
  color: var(--text-muted);
  margin: var(--s-2) 0 0;
  min-height: 1.5em;
}
.cc-privacy {
  margin: var(--s-4) 0 0;
  font-size: .8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--line);
  padding-top: var(--s-3);
}

/* ---------------------------------------------------------------- tuning */

.cc-tuning {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--s-4);
  margin-bottom: var(--s-5);
}
.cc-tuning > summary { cursor: pointer; font-weight: 600; }
.cc-tuning__grid {
  display: grid; gap: var(--s-4);
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  margin-top: var(--s-4);
}
.cc-tuning label { display: grid; gap: .3rem; font-size: .85rem; color: var(--text-muted); }
.cc-tuning input[type="range"] { width: 100%; accent-color: var(--brand-orange); }
.cc-tuning output { font: 600 .85rem var(--font-mono); color: var(--text); }
.cc-tuning select {
  font: inherit; padding: .35rem .5rem;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--bg); color: var(--text);
}
.cc-diag {
  font: .8rem/1.6 var(--font-mono);
  color: var(--text-muted);
  margin: var(--s-4) 0 0;
}
.cc-foot { font-size: .8rem; color: var(--text-muted); padding-bottom: var(--s-6); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
