/* Shedding Sessions — the sibling register of the Cadenza system.
   Load AFTER the Cadenza styles.css; this file only overrides tokens.
     <link rel="stylesheet" href="../styles.css">
     <link rel="stylesheet" href="tokens/shedding.css">

   Four changes, nothing else:
   1. The lead accent moves from poppy to petrol. Shedding has no red at all — its tone rules
      forbid failure imagery — so the poppy ramp is re-inked rather than left lying around.
      Every component that reads --poppy-* or --accent picks up petrol with no code change.
   2. A section palette, colour-blind-safe, derived from the same inks (below).
   3. Practice-feedback tokens for the tempo ladder and the Timing Coach: warm, never red.
   4. Contrast (#47): a few Cadenza inks shift a step so every drawn pair meets WCAG 2.x —
      4.5:1 for text, 3:1 for graphics and controls — and an Increase Contrast set at the end
      of the file (prefers-contrast: more) aims for 7:1 text and 4.5:1 graphics. */

:root {
  /* 1 — accent: petrol */
  --poppy-600: #155E6B;
  --poppy-500: #157486;   /* a step darker than #1F7A8C: petrol text reaches 4.5:1 on sunken */
  --poppy-300: #8DBAC4;
  --poppy-100: #DFEDF0;

  --accent: var(--poppy-500);
  --accent-press: var(--poppy-600);
  --text-link: var(--poppy-600);
  --text-link-hover: var(--poppy-500);
  --selected-text: var(--poppy-600);
  --state-danger: var(--marigold-600);   /* problems are warm, never red */
  --shadow-print-color: 0 2px 4px rgba(36, 33, 28, 0.07), 0 6px 18px rgba(21, 116, 134, 0.28);

  /* 2 — sections. Okabe–Ito ordering mapped onto the system's inks, so adjacent sections
     stay distinguishable under protanopia, deuteranopia and tritanopia. Colour is never the
     only cue: every block also carries its repetition letter (A, B, C…). */
  --section-intro:   #7FA9C9;   /* sky */
  --section-verse:   #3E6EA8;   /* blue */
  --section-pre:     #C9A23A;   /* ochre */
  --section-chorus:  #D07A3A;   /* orange — warm, deliberately not red */
  --section-bridge:  #8666AA;   /* violet — a touch deeper so its light label reads at 4.5:1 */
  --section-solo:    #348165;   /* bluish green — likewise */
  --section-outro:   #A39C8E;   /* stone */
  --section-custom:  #C77E9B;   /* reddish purple, for user-made sections */

  /* Text on a selected block: dark or light ink, whichever reads at 4.5:1 (#47). */
  --section-intro-on:  var(--ink-900);
  --section-verse-on:  var(--paper-100);
  --section-pre-on:    var(--ink-900);
  --section-chorus-on: var(--ink-900);
  --section-bridge-on: var(--paper-100);
  --section-solo-on:   var(--paper-100);
  --section-outro-on:  var(--ink-900);
  --section-custom-on: var(--ink-900);

  /* Tints for the canvas: the section block behind the waveform, never behind text. */
  --section-tint: 18%;

  /* 3 — practice feedback */
  --coach-with:   var(--poppy-500);   /* on the beat: the accent */
  --coach-near:   #D9B98A;            /* a touch early / late: warm sand */
  --coach-near-edge: var(--marigold-600);   /* 1px keyline on sand bars: the fill alone is under 3:1 */
  --ladder-done:  var(--poppy-500);
  --ladder-next:  var(--poppy-100);
  --worth-checking: #AD7E2F;   /* its own value, darker than marigold-500: the pill dot reaches 3:1 */

  /* 4 — contrast (#47) */
  --ink-500: #6F695F;        /* muted text: 4.5:1 on sunken (Cadenza's #7D776D was 3.7) */
  --marigold-600: #8C631E;   /* pill text and invalid-field text: 4.5:1 */
  --mark-quiet: #847F75;     /* quiet graphics — unplayed waveform, inactive beat dots, empty
                                trial segments, tuner ticks: 3:1 on cards and section tints */
}

[data-theme="night"] {
  --poppy-100: #1D3A40;
  --state-danger: #D9A548;   /* problems on night cards: 5.4:1 */
  --ladder-next: #1D3A40;
}

/* Increase Contrast (#47): what changes when the system's Increase Contrast setting is on.
   Text aims for 7:1, graphics for 4.5:1; the aliases (--accent, --coach-with, --ladder-done,
   --text-link, --selected-text, --text-muted, --state-danger, --coach-near-edge) follow their
   ramps. Section blocks shift so their labels reach 7:1; tints get quieter. */
@media (prefers-contrast: more) {
  :root {
    --poppy-600: #004C58;      /* links, selected text, pressed accent: 8:1 */
    --poppy-500: #005564;      /* accent text and fills: 7:1; light labels on it stay above 4.5 */
    --ink-700: #4F4A43;        /* darker ink marks (calibration downbeats) */
    --ink-500: #524C43;        /* muted text: 7:1 */
    --ink-300: #B2ACA2;        /* inverse-panel paragraph: 7:1 */
    --marigold-600: #6B4700;   /* pill text, invalid-field text, sand keyline: 7:1 */
    --teal-700: #2A534E;       /* positive notice and tag text: 7:1 */
    --worth-checking: #8F6201; /* pill dot: 4.5:1 */
    --mark-quiet: #6C675E;     /* quiet graphics: 4.5:1 */
    --line-soft: #8A857B;      /* separators become real 3:1 keylines */
    --state-focus: #54466E;    /* focus ring: 7:1 */

    --section-intro:  #87B1D1;
    --section-verse:  #295891;
    --section-pre:    #CFA841;
    --section-chorus: #EF9758;
    --section-bridge: #684889;
    --section-solo:   #0B6349;
    --section-outro:  #B3AC9E;
    --section-custom: #E296B4;
    --section-tint: 12%;
  }
}
