/* Grace Music shared styles: the Forest tokens every page uses.
   Linked from each page as /grace.css. */

/* BEGIN grace-tokens.css */
/* Grace "Forest" design tokens. Source of truth for Grace Music pages and apps.
   Rules for using them are in STYLE.md, next to this file.

   Font: put this in <head>:
   <link rel="preconnect" href="https://fonts.googleapis.com">
   <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
   <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap" rel="stylesheet">

   Dark mode is "Warm night": warm near-black page and cards, so forest green
   shows only on the header band and accents.

   Copy everything below into a page's <style>. Dark mode follows the device
   setting; <html data-theme="light"> or data-theme="dark" forces one. */

:root {
  /* Brand: the same in both modes */
  --forest: #1F3B2C;        /* primary: header band, selected (light) */
  --forest-deep: #132619;   /* darkest: text on leaf and gold */
  --leaf: #76B04F;          /* accent from the old app; never white text on it */
  --gold: #E2B659;          /* highlight; always forest-deep text on it */
  --live: #E5383B;          /* the Live badge only; white text on it */

  /* Type */
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --text-label: 11px;       /* uppercase section labels, 600, letter-spacing .07em */
  --text-caption: 12px;     /* footers, timestamps */
  --text-small: 13px;       /* roster role names, field labels, row details */
  --text-button: 14px;      /* tabs and buttons, 600 */
  --text-body: 15px;        /* default text; card titles at 600 */
  --text-input: 16px;       /* inputs; never smaller (iOS zooms under 16px) */
  --text-dialog: 17px;      /* dialog titles, 600 */
  --text-date: 20px;        /* day number in a date tile, 600 */

  /* Shape and space */
  --radius-badge: 6px;
  --radius-control: 10px;   /* inputs, buttons, date tiles */
  --radius-track: 12px;     /* the tab track */
  --radius-card: 14px;
  --radius-sheet: 16px;     /* dialogs */
  --radius-pill: 999px;     /* filter chips, Live badge */
  --gutter: 16px;           /* page side margin */
  --inset-card: 14px;       /* padding inside cards and rows */
  --gap-card: 10px;         /* between stacked cards */
  --tap: 44px;              /* minimum button and input height */

  /* Theme: light */
  --page: #F6F4EF;          /* warm cream */
  --card: #FFFFFF;
  --line: #E4E0D6;          /* hairlines */
  --leaf-soft: #E9EDDF;     /* light sage: date tiles, badges, number boxes */
  --leaf-line: #D6E3C7;     /* outlines on leaf-soft areas and chips */
  --ink: #16211A;           /* headings, primary text */
  --body: #3A4540;          /* paragraphs */
  --muted: #7A827D;         /* captions only: 3.6:1 on page, below AA for small text */
  --label: #1F3B2C;         /* uppercase section labels, text links */
  --selected: #1F3B2C;      /* selected tab, active chip, primary button */
  --on-selected: #FFFFFF;
  --on-forest: #FFFFFF;     /* titles on the header band */
  --on-forest-soft: #E6F1DD;/* subtitles on the header band */
  --out-soft: #FBE3E3;      /* cancelled services, "I'll be out" */
  --out-ink: #B42326;
  --note-soft: #E3EEFB;     /* service notes; blue kept from the old site */
  --note-ink: #0C447C;
  --danger: #B42326;
  --focus: #76B04F;
  --scrim: rgba(19, 38, 25, .5);
  --shadow-card: 0 1px 2px rgba(31, 59, 44, .06), 0 2px 8px rgba(31, 59, 44, .06);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #15140F;
    --card: #211F19;
    --line: #35322A;
    --leaf-soft: #2E3521;
    --leaf-line: #364327;
    --ink: #F6F4EF;
    --body: #D8D4CB;
    --muted: #A8A396;
    --label: #8CC466;
    --selected: #76B04F;
    --on-selected: #132619;
    --out-soft: #4A1F22;
    --out-ink: #F7C1C1;
    --note-soft: #13283F;
    --note-ink: #B5D4F4;
    --danger: #F2B8B5;
    --scrim: rgba(0, 0, 0, .6);
    --shadow-card: none;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --page: #15140F;
  --card: #211F19;
  --line: #35322A;
  --leaf-soft: #2E3521;
  --leaf-line: #364327;
  --ink: #F6F4EF;
  --body: #D8D4CB;
  --muted: #A8A396;
  --label: #8CC466;
  --selected: #76B04F;
  --on-selected: #132619;
  --out-soft: #4A1F22;
  --out-ink: #F7C1C1;
  --note-soft: #13283F;
  --note-ink: #B5D4F4;
  --danger: #F2B8B5;
  --scrim: rgba(0, 0, 0, .6);
  --shadow-card: none;
  color-scheme: dark;
}
/* END grace-tokens.css */

/* Extras the music pages need on top of the Forest tokens. Each is mixed
   from a token the way STYLE.md mixes leaf-soft, so nothing looks pasted on. */
:root {
  --field: #FFFFFF;         /* inputs and selects, on a card or on the forest bar */
  --ok: #2E7D32;            /* "Saved" notes */
  --warn-soft: #F1E5CA;     /* heads-up notices: 25% gold into the page */
  --warn-ink: #4A3500;
  --well: #E4E0D6;          /* the gray behind a paper preview or a PDF page */
  --paper: #FFFFFF;         /* paper and PDF pages stay white in both modes */
  --radius-small: 7px;      /* small inputs and icon buttons in the dense desktop editors */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --field: #15140F;
    --ok: #8CC466;
    --warn-soft: #483D26;   /* 20% gold into the card */
    --warn-ink: #FFE7A3;
    --well: #0E0D0A;
  }
}
:root[data-theme="dark"] {
  --field: #15140F;
  --ok: #8CC466;
  --warn-soft: #483D26;
  --warn-ink: #FFE7A3;
  --well: #0E0D0A;
}

/* The same focus ring, section label and button shapes on every page. */
:where(input, select, textarea, button, summary, a):focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
