/* TabbyGato design tokens. Nikhil made the five design picks on November 12, 2026; see docs/DESIGN_SYSTEM.md.

   One file for the app and the website. Every name starts with --tg- so the names cannot collide with
   another stylesheet. The values marked "today" were the app's own values before November 12, under new
   names. The values marked "new" reached the app with build 57, which loads its own copy of this file,
   app/src/tokens.css. A test (app/tests/tokens.test.mjs) fails when the two copies differ.

   The light look is the default. Put data-theme="dark" (the app's attribute) or data-look="dark" on any
   element to give that element and everything inside it the dark look. */

:root, [data-look="light"], [data-theme="light"] {
  color-scheme: light;

  /* Surfaces (today). The paper is the brightest surface; the desk is the bars around it. */
  --tg-paper: #fefdfb;        /* app: --bg */
  --tg-desk: #e2e7e2;         /* app: --chrome */
  --tg-card: #fbfbf8;         /* app: --surface. A light face on the desk: section blocks, part lanes, key caps */
  --tg-field: #ffffff;        /* app: --field. The inside of a box you type in */

  /* Words and lines (today) */
  --tg-ink: #202625;          /* app: --ink */
  --tg-ink-soft: #4a564f;     /* app: --muted. Labels and notes; 6.1 to 1 on the desk */
  --tg-line: #cbd3cc;         /* app: --line. Quiet dividers only; never the only edge of a control */
  --tg-edge: #717c75;         /* app: --edge. Underlines, slider tracks, lane edges; 3.5 to 1 on the desk */

  /* Things you can press (today). Green belongs to controls, picks and loops. */
  --tg-accent: #245c53;       /* app: --accent */
  --tg-accent-ink: #fbfbf8;   /* app: --accent-ink. Words on a filled accent button */
  --tg-accent-soft: #b8dccb;  /* app: --accent-soft. The fill of a control that is on */
  --tg-hover: rgba(32, 38, 37, 0.07);    /* app: --hover */
  --tg-off: rgba(32, 38, 37, 0.045);     /* app: --off. The quiet face of a choice that is not picked */
  --tg-selection: rgba(36, 92, 83, 0.14);/* app: --selection. Picked bars and loops */

  /* Where the music is (today). Blue belongs to the playing marks and to nothing you can press. */
  --tg-play: #2f62b8;                      /* app: --play */
  --tg-play-bar: rgba(47, 98, 184, 0.10);  /* app: --cursor-bar */
  --tg-play-shade: rgba(47, 98, 184, 0.14);/* app: --shade-now */
  --tg-play-beat: #6e90d1;                 /* app: --cursor-beat is #7b9bd6 (2.75 to 1). New value: 3.1 to 1 */

  /* Marks in the music (today) */
  --tg-home-note: #a2560a;    /* app: --home-ink */
  --tg-score-ink: #1d1d1f;    /* set in app/src/main.mjs (SCORE_COLORS), not in the stylesheet */
  --tg-score-tab: #1d1d1f;    /* the tab's fret numbers; the same as the ink in the light look */
  --tg-score-soft: #6a6c72;
  --tg-score-staff: #b9b9b6;  /* 1.9 to 1 by Nikhil's choice of quiet staff lines */
  --tg-score-barline: #8e8e8b;
  --tg-score-number: #6a6c67;

  /* The mixing desk (today) */
  --tg-mute: #b3382e;  --tg-mute-soft: #f6dedb;
  --tg-solo: #7a5d00;  --tg-solo-soft: #f3e3a4;

  /* Song sections (today): one soft color for each section name */
  --tg-section-1: #dfe8f7; --tg-section-2: #f6e3d3; --tg-section-3: #dcefe2;
  --tg-section-4: #efdff1; --tg-section-5: #f3eccc; --tg-section-6: #dbeef0;

  /* Signals (Nikhil picked amber and green on November 12). "Problem" is today's amber (app: --warn) on a
     warmer face (the app's --warn-soft is #f3e2cd). "Done" is new: a teal green on a cool face. The two pairs are set apart for red-green color blindness:
     the amber keeps its yellow and the green turns grey-blue. Each message also carries its own icon. */
  --tg-problem: #8a4500;  --tg-problem-soft: #f7e0b0;
  --tg-done: #1f5a5c;     --tg-done-soft: #bfe0e0;

  /* The six strings (new for the light look): one color for each stripe of the cat. Nikhil picked color on
     the stripes with the name in ink. For the logo and the website. Never on a control, never in the music
     and never on small text. Strings 1, 3 and 5 are the three Trails colors Nikhil picked on November 9;
     Claude chose strings 2, 4 and 6. */
  --tg-string-1: #e93d82; --tg-string-2: #f76b15; --tg-string-3: #efb100;
  --tg-string-4: #46a758; --tg-string-5: #05a2c2; --tg-string-6: #8e4ec6;

  /* The recording waveform's three bands (new on November 14, 2026, build 115): Bass is the core of the shape, Mid
     around it, Treble on the outer edge. Each color reaches
     at least 3 to 1 on the waveform's face (--tg-card). None is
     the playing blue or the controls' green. Sets 2 and 3 are for Nikhil to compare (?bands=2 or ?bands=3 in the
     app's address) and are not a choice a student sees. Set 2: deep blue-violet, magenta-pink, amber. Set 3: three
     steps of one violet. */
  /* Set 1 from build 116 (Nikhil asked what is easiest on the eyes over a long practice): the logo's own order,
     toned down. Violet is the low E string's color and pink the high E string's, with orange between. Bass is the
     darkest layer and Treble the lightest, so the three also differ in a black and white view. */
  --tg-band-bass: #5f3597;   --tg-band-mid: #cf6a2c;   --tg-band-treble: #d6628f;
  --tg-band2-bass: #5b3fd1;  --tg-band2-mid: #d6336f;  --tg-band2-treble: #b07000;
  --tg-band3-bass: #4a2a86;  --tg-band3-mid: #7446c4;  --tg-band3-treble: #9f7ad8;

  /* Shadows. Only something that lies over the music gets one. */
  --tg-shadow-tip: 0 2px 10px rgba(0, 0, 0, 0.12);   /* a small note beside what it explains */
  --tg-shadow-lift: 0 10px 24px rgba(0, 0, 0, 0.14); /* a bar that slides back over the music */
  --tg-shadow-lift-up: 0 -10px 24px rgba(0, 0, 0, 0.14); /* the same, for a bar at the bottom edge */

  /* The dimmed screen behind a tour card (new on November 13, with the card): the ink at one third strength.
     The lit control shows through a hole and keeps its full colors. Nothing else may use this color. */
  --tg-dim: rgba(32, 38, 37, 0.33);
}

[data-look="dark"], [data-theme="dark"] {
  color-scheme: dark;
  --tg-paper: #16171a;
  --tg-desk: #2a3230;
  --tg-card: #343d3a;
  --tg-field: #343d3a;
  --tg-ink: #e8ede6;
  --tg-ink-soft: #abb7af;
  --tg-line: #44514b;
  --tg-edge: #84938b;
  --tg-accent: #a4d4be;
  --tg-accent-ink: #13201b;
  --tg-accent-soft: #33503f;
  --tg-hover: rgba(255, 255, 255, 0.08);
  --tg-off: rgba(255, 255, 255, 0.05);
  --tg-selection: rgba(164, 212, 190, 0.16);
  --tg-play: #7aa7f0;
  --tg-play-bar: rgba(122, 167, 240, 0.12);
  --tg-play-shade: rgba(122, 167, 240, 0.16);
  --tg-play-beat: #5f82bd;
  --tg-home-note: #f0a85a;
  --tg-score-ink: #cfcdc8;    /* build 205: softer than #e9e8e5, which glowed and ran together (Nikhil, November 18) */
  --tg-score-tab: #e9e8e5;    /* the tab's fret numbers keep the earlier brightness (Nikhil, November 18) */
  --tg-score-soft: #a3a5ab;
  --tg-score-staff: #3d4148;  /* build 205: 1.75 to 1, about as quiet as the light look's lines */
  --tg-score-barline: #686c74;
  --tg-score-number: #8f939b;
  --tg-mute: #ff9d92;  --tg-mute-soft: #4a2622;
  --tg-solo: #f0d77a;  --tg-solo-soft: #473d16;
  --tg-section-1: #26344d; --tg-section-2: #45332a; --tg-section-3: #263f30;
  --tg-section-4: #3c2b41; --tg-section-5: #403a22; --tg-section-6: #22393d;
  --tg-problem: #f2b866;  --tg-problem-soft: #4f3c1e;   /* the app's --warn and --warn-soft are #f0b070 and #4a3a27 */
  --tg-done: #a3d6d0;     --tg-done-soft: #2c4f52;
  /* The six strings in the dark look (today, from app/src/logo-fx.css): the neon set Nikhil picked. */
  --tg-string-1: #ff4ecd; --tg-string-2: #ff7a1a; --tg-string-3: #ffe600;
  --tg-string-4: #b6ff3b; --tg-string-5: #00e5ff; --tg-string-6: #a974ff;
  /* The waveform's bands in the dark look: set 1 is the same three hues, muted, with Bass the brightest (5.0, 4.2 and 3.1 to 1 on the card). The neon colors stay with the logo. */
  --tg-band-bass: #b9a0f2;   --tg-band-mid: #dd8a55;   --tg-band-treble: #c46a92;
  --tg-band2-bass: #8b7bff;  --tg-band2-mid: #ff5fb0;  --tg-band2-treble: #ffb02e;
  --tg-band3-bass: #9670e8;  --tg-band3-mid: #b49cff;  --tg-band3-treble: #dccfff;
  --tg-shadow-tip: 0 2px 10px rgba(0, 0, 0, 0.4);
  --tg-shadow-lift: 0 10px 24px rgba(0, 0, 0, 0.45);
  --tg-shadow-lift-up: 0 -10px 24px rgba(0, 0, 0, 0.45);
  --tg-dim: rgba(0, 0, 0, 0.45);  /* black, because the dark look's ink is light and a light veil would wash the screen out */
}

/* Everything below is the same in both looks. */
:root {
  /* Fonts. Nikhil picked Geist for words and numbers on November 12, with each computer's own font as the
     fallback: the computer's font shows until Geist loads, and stays if Geist cannot load.
     The Tabbygato font is for very selective use only (Nikhil, November 12): a few one-off headlines, and
     never a control, a number, a message, a section headline or the music. */
  --tg-font-text: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --tg-font-display: "Tabbygato Display", var(--tg-font-text);
  --tg-font-score-words: Georgia, serif;   /* alphaTab's own choice for words in the music (today) */
  --tg-font-score-numbers: Arial, sans-serif; /* fret numbers and bar numbers (today); the grid's math depends on its digit width */

  /* Text sizes. The app uses the first five. The website adds the three display sizes. */
  --tg-text-micro: 11px;     /* numbers inside the song map and on a badge; nothing a student must read at a distance */
  --tg-text-label: 12px;     /* the word under an icon, a field's name, a note */
  --tg-text-value: 15px;     /* a number you set, a name, a sentence in a panel, an error */
  --tg-text-title: 18px;     /* the song's name; body text on the website */
  --tg-text-headline: 24px;  /* the start screen's headline */
  --tg-text-display-s: 32px;
  --tg-text-display-m: 44px;
  --tg-text-display-l: 60px;

  /* The practice screens' type ladder (idea 12, build 206, Nikhil's yes on November 18, 2026): one size for each
     kind of text on a tab, an audio file and a video. A style on those screens names its kind, never a bare size.
     Each kind keeps one weight too, written beside it. The music's own fonts (Arial fret numbers, Bravura, Georgia)
     belong to the Reading area and stay off this ladder. */
  --tg-type-song: var(--tg-text-title);       /* 700: the song's name in the top bar (15 under 901 wide, below) */
  --tg-type-heading: var(--tg-text-title);    /* 700: a panel's heading, such as Saved Sections */
  --tg-type-passage: var(--tg-text-value);    /* 700: a passage's name: a loop, a range, a section, its name box */
  --tg-type-group: var(--tg-text-value);      /* 700 (600 for a part): a group's name inside a panel, a part's name */
  --tg-type-value: var(--tg-text-value);      /* 700: a speed, a time, a bar number, the position, a number box */
  --tg-type-beside: var(--tg-text-value);     /* 400: the words beside the song's name: tempo, key, length (12 under 901) */
  --tg-type-sentence: var(--tg-text-value);   /* 400: a sentence in a panel, a typed comment, a problem in the status line */
  --tg-type-action: var(--tg-text-value);     /* 600: the word on a main button, such as Save practice loop */
  --tg-type-tab: var(--tg-text-value);        /* 600, 700 when picked: a tab of the Options shelf */
  --tg-type-label: var(--tg-text-label);      /* 600: the word under an icon, the word on a small button */
  --tg-type-caption: var(--tg-text-label);    /* 500: the small word under a value: Speed, Volume, Start */
  --tg-type-message: var(--tg-text-label);    /* 600: the status line's message */
  --tg-type-chip: var(--tg-text-label);       /* 500, 700 when picked: a chip, a menu's choice */
  --tg-type-note: var(--tg-text-label);       /* 400: a note, a count, a field's name, a time under the waveform */
  --tg-type-map: var(--tg-text-label);        /* 700: a section's name in the song map (11 under 901 wide) */
  --tg-type-song-narrow: var(--tg-text-value);   /* the song's name under 901 wide and on a phone */
  --tg-type-beside-narrow: var(--tg-text-label); /* the words beside it under 901 wide */
  --tg-type-map-narrow: var(--tg-text-micro);    /* a section's name in the song map under 901 wide */
  --tg-type-tight: var(--tg-text-micro);     /* the label and caption in a phone's bottom bar, so the bar fits 375 pixels */
  --tg-type-badge: var(--tg-text-micro);      /* 700: a number in the song map, a count badge, a mark's tag */
  --tg-type-count: 26px;                      /* 700: the count-in number on Play, sized to the button, not to text */
  --tg-type-value-touch: 16px;                /* 700: a number box in a phone's bottom bar; Safari zooms into words under 16 (build 217) */

  /* Text weights: four, each with one job. */
  --tg-weight-text: 400;     /* sentences */
  --tg-weight-quiet: 500;    /* a label under a value, a choice that is not picked */
  --tg-weight-label: 600;    /* the word on a control, a part's name */
  --tg-weight-strong: 700;   /* a value, a title, a picked choice */

  /* Space: one scale, named by its size in pixels. */
  --tg-space-2: 2px;  --tg-space-4: 4px;   --tg-space-6: 6px;   --tg-space-8: 8px;
  --tg-space-12: 12px; --tg-space-16: 16px; --tg-space-24: 24px; --tg-space-32: 32px;
  --tg-space-48: 48px; --tg-space-64: 64px; --tg-space-96: 96px;

  /* Corners: each size has one job. */
  --tg-corner-mark: 4px;     /* a tag, a bar number's hover box, a tiny badge inside the music or the map */
  --tg-corner-small: 6px;    /* lanes, key caps, menus, section blocks */
  --tg-corner-choice: 8px;   /* choices, rows, messages */
  --tg-corner-control: 10px; /* buttons */
  --tg-corner-card: 14px;    /* big surfaces: the drop target, a card on the website */
  --tg-corner-round: 999px;  /* dots, count badges, the cat's stripes */

  /* Motion. Controls answer at once; only the cat performs. Each kind of motion has one time (idea 13, build 206).
     The playing line takes its time from each beat, and the cat's runs keep their own times in logo-fx.css. */
  --tg-time-quick: 120ms;    /* a color or a fade answering a press */
  --tg-time-move: 160ms;     /* a bar sliding in or out */
  --tg-time-pop: 180ms;      /* something landing in place: the count-in number, the loop's buttons, a card */
  --tg-time-find: 900ms;     /* an outline that helps the eye find a new saved row, then fades */
  --tg-ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Sizes */
  --tg-size-target: 44px;    /* the least height of anything a student presses while holding a guitar */
  --tg-size-choice: 32px;    /* a choice inside a panel */
  --tg-size-icon: 20px;      /* 16px inside a row, 26px on Play */
  --tg-size-topbar: 56px;
  --tg-size-controls: 76px;
  --tg-size-status: 48px;
  --tg-page-max: 1600px;     /* the app stops growing here */
  --tg-measure: 68ch;        /* the longest line of reading text */

  /* The focus ring: one ring everywhere. */
  --tg-focus-width: 2px;
  --tg-focus-gap: 2px;
}
