/* glow-tokens.css - the Glow Clinic palette, for the admin.
 *
 * COPIED VERBATIM FROM THE APP (glow-site) at the sha t20check.sh pins (APP_SHA,
 * T137: site a2a336a) and never edited here:
 *   :root { ... } + the two @media :root lines after it = assets/glow-theme.css
 *   :root[data-theme=dark] { ... }                       = assets/glow-dark.css (its :root block)
 * A brand change is one edit in the app, a new APP_SHA in t20check.sh, and one paste
 * here; t20check [3] diffs the blocks against `git show <APP_SHA>:...`, so an edit
 * that drifts from the app's file is red. The dark block's selector differs
 * (the app loads a second stylesheet; the admin flips one attribute so the
 * theme can change without a reload) - the body is the same bytes.
 * Admin-only tokens (--nav-h, --wordmark, color-scheme) live in admin.css. */

:root {
  /* ---- core, verbatim from the guideline ---- */
  --glow-yellow:      #fceea8;
  --glow-orange:      #e47b54;
  --glow-coral:       #e56a54;
  --glow-rose:        #dc847e;
  --glow-olive:       #887c1b;
  --glow-bluegrey:    #a4bcc2;
  --glow-taupe:       #cfbea8;

  /* ---- tints, verbatim: backgrounds, taps, bars ---- */
  --glow-tint-cream:  #fff8e9;
  --glow-tint-peach:  #f7b984;
  --glow-tint-blush:  #f4b9a9;
  --glow-tint-pink:   #ffd8d1;
  --glow-tint-sage:   #dce2c9;
  --glow-tint-sky:    #c7d9dd;
  --glow-tint-stone:  #d6d2c4;

  /* ---- derived working shades ------------------------------------------
   * Four, and no more. Each is a straight darkening of a palette colour to
   * the point where it reaches AA on white, for the states the palette does
   * not supply: a pressed control, and the three status colours that have to
   * be readable at 12px. None of them ever touches the logo.
   * ---------------------------------------------------------------------*/
  --glow-orange-deep: #cf6741;   /* pressed / hover on a filled orange control */
  --glow-coral-deep:  #b3452f;   /* destructive:  from coral  #e56a54  5.5:1 on white */
  --glow-olive-deep:  #5f5713;   /* active:       from olive  #887c1b  7.3:1 on white */
  --glow-yellow-deep: #8a6a12;   /* locked out:   from yellow #fceea8  5.1:1 on white */

  /* ---- semantic surfaces ---- */
  --glow-bg:          var(--glow-tint-cream);
  --glow-surface:     #ffffff;
  --glow-surface-2:   #fdf5e2;   /* hover / striped rows */
  --glow-surface-3:   #f8edd4;   /* pressed, inset fields */
  --glow-line:        #ece0c4;
  --glow-line-strong: #dfd0ac;

  /* ---- ink ---- */
  /* All three clear AA on both --glow-surface and --glow-bg: 14.6:1, 7.5:1
     and 4.9:1. The muted tone is deliberately darker than it looks like it
     needs to be, because it lands on cream rather than on white. */
  --glow-ink:         #241f1a;
  --glow-ink-soft:    #5d5348;
  --glow-ink-mute:    #7a6f61;

  /* Type sitting ON the brand orange. NOT the same thing as --glow-ink, and
     glow-dark.css deliberately does not override it: the fill is #e47b54 in
     both themes, so its label has to stay near-black in both. Flipping this
     with the rest of the ink put white on orange at 2.9:1. */
  --glow-on-accent:   #241f1a;

  /* ---- the navigation bar ----
   * The marketing header since 2026-09-30: the page's own cream (and grain),
   * one hairline under it, the orange lockup. It was a solid core-yellow band
   * - the single loudest "this is a different product" signal between the
   * app and the apex. Tokens, because glow-dark.css and .glow-studio swap them. */
  --glow-nav-bg:      var(--glow-tint-cream);
  --glow-nav-line:    #e5d6b4;
  --glow-nav-ink:     var(--glow-ink);
  --glow-nav-hover:   rgba(36, 31, 26, .06);
  --glow-hairline:    rgba(146, 108, 60, .28);

  /* ---- status chips ---- */
  --glow-chip-ok-bg:    var(--glow-tint-sage);
  --glow-chip-ok-ink:   var(--glow-olive-deep);
  --glow-chip-no-bg:    var(--glow-tint-pink);
  --glow-chip-no-ink:   var(--glow-coral-deep);
  --glow-chip-warn-bg:  var(--glow-yellow);
  --glow-chip-warn-ink: var(--glow-ink);

  --glow-radius:      10px;
  --glow-radius-sm:   8px;
  --glow-shadow:      0 1px 2px rgba(120, 84, 56, .06), 0 8px 24px -12px rgba(120, 84, 56, .22);
  --glow-ring:        0 0 0 3px rgba(228, 123, 84, .38);

  --glow-sans: 'Inter', 'Anuphan', ui-sans-serif, system-ui, -apple-system,
               'Helvetica Neue', Arial, sans-serif;

  /* ================================================================
   * THE SHARED KIT (app redesign 2026-09-30). Everything from here to the
   * end of this block is consumed by every page through the .glow-* classes
   * at the foot of this file. Values are the marketing site's
   * (site/src/styles/global.css) and the compare page's. The names are the
   * ones the three redesign mockups were drawn with
   * (glow-preview.l54.dev/_shell-mockup/tokens.css): keep them in step.
   * ================================================================ */
  --glow-paper:        #f5efdf;   /* marketing's quiet panel ground */
  --glow-selected-bg:  #241f1a;   /* a selected chip / segment is filled ink... */
  --glow-selected-ink: #fff8e9;   /* ...with cream text (flips in dark) */

  /* Headings and buttons name Anuphan FIRST, as the apex does: Thai (and the
     spaces) draw in Anuphan, while Latin, digits and dashes fall through to
     Inter because the Anuphan file has no glyphs for them (fonts.css). Body
     UI stays Inter-first. */
  --glow-font-head: 'Anuphan', 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --glow-font-ui:   var(--glow-sans);

  --glow-r-btn:   10px;    /* buttons are never pills */
  --glow-r-field: 10px;
  --glow-r-card:  24px;
  --glow-r-hero:  28px;    /* the one big surface on a page */
  --glow-r-menu:  16px;
  --glow-r-item:  10px;    /* a row inside a menu */
  --glow-r-pill:  999px;   /* chips and segmented controls ONLY */

  --glow-h-control:    44px;   /* the touch minimum */
  --glow-h-control-sm: 36px;   /* dense table rows only */
  --glow-h-chip:       36px;
  /* ⚠️ Descriptive, not a lever: nine other files hardcode the bar's 64 px
     (see the note above <nav> in navbar.php). Changing this alone moves
     nothing but the kit's own .glow-page offset. */
  --glow-navh:         64px;
  --glow-maxw:       1200px;
  --glow-gutter:       16px;   /* 16 phone, 24 from 640, 32 from 1024 */
  --glow-card-pad:     20px;   /* 20 phone, 24 from 640 */

  /* Depth is a hairline, not a shadow. The pop shadow is for menus only. */
  --glow-shadow-card: 0 1px 0 rgba(36, 31, 26, .04);
  --glow-shadow-pop:  0 1px 2px rgba(36, 31, 26, .06), 0 14px 32px -12px rgba(36, 31, 26, .22);

  --glow-ease: cubic-bezier(.22, .68, .22, 1);
  --glow-fast: .16s;

  /* The marketing site's paper grain: an SVG noise tile at 9 % ink. On the
     page GROUND only (body), so every card, table and photo sits on a flat
     surface above it. One background image on one element: it costs
     listing.php nothing per row. glow-dark.css and .glow-studio switch it off. */
  --glow-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .14 0 0 0 0 .12 0 0 0 0 .1 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (min-width: 640px)  { :root { --glow-gutter: 24px; --glow-card-pad: 24px; } }
@media (min-width: 1024px) { :root { --glow-gutter: 32px; } }

:root[data-theme=dark] {
  /* ---- grounds ---- */
  --glow-bg:          #171614;
  --glow-surface:     #211f1c;
  --glow-surface-2:   #2a2724;   /* hover / striped rows */
  --glow-surface-3:   #332f2a;   /* pressed, inset fields */
  --glow-line:        rgba(252, 238, 168, .12);
  --glow-line-strong: rgba(252, 238, 168, .22);

  /* ---- ink. On #171614 these measure 15.1:1, 9.0:1 and 5.2:1. ---- */
  --glow-ink:         #f7f2e6;
  --glow-ink-soft:    #cdc5b6;
  --glow-ink-mute:    #9c9384;

  /* ---- the navigation bar ----
   * The bar is the page's own ground in both themes (the marketing header):
   * cream in light, this near-black here, with one hairline under it. The
   * brand arrives through the white lockup and the orange underline on the
   * current page - the guideline's white-on-black lockup. */
  --glow-nav-bg:      #171614;
  --glow-nav-line:    rgba(252, 238, 168, .14);
  --glow-nav-ink:     #f7f2e6;
  --glow-nav-hover:   rgba(252, 238, 168, .10);
  --glow-hairline:    rgba(252, 238, 168, .22);

  /* ---- the four derived shades, re-derived for a dark ground -------------
   * In light these are darkenings that reach AA on white. Here the ground is
   * dark, so the same roles need LIGHTENINGS of the same palette colours. The
   * hue is the brand's; only the lightness moves. ---------------------------*/
  --glow-orange-deep: #f09a76;   /* pressed orange - brighter, not darker */
  --glow-coral-deep:  #f0a08c;   /* destructive text          7.9:1 */
  --glow-olive-deep:  #cbd3a8;   /* "active" text            11.4:1 */
  --glow-yellow-deep: #f2dc9a;   /* "locked out" text        13.0:1 */

  /* ---- status chips: a tint of the ground, with core-derived type ---- */
  --glow-chip-ok-bg:    #333a2a;
  --glow-chip-ok-ink:   #cbd3a8;
  --glow-chip-no-bg:    #43302c;
  --glow-chip-no-ink:   #f0b0a0;
  --glow-chip-warn-bg:  #3a3324;
  --glow-chip-warn-ink: #f2dc9a;

  /* Warm shadows are invisible on a dark ground; depth comes from the line. */
  --glow-shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 10px 28px -14px rgba(0, 0, 0, .75);

  --glow-taupe: rgba(252, 238, 168, .28);   /* scrollbar thumb */

  /* ---- the shared kit (glow-theme.css, 2026-09-30) ---- */
  --glow-paper:        #24221f;
  --glow-selected-bg:  #fff8e9;   /* a selected chip is cream-on-ink here, */
  --glow-selected-ink: #241f1a;   /* the compare page's own pairing */
  --glow-shadow-card:  none;
  --glow-shadow-pop:   0 1px 2px rgba(0, 0, 0, .45), 0 14px 32px -12px rgba(0, 0, 0, .75);
  --glow-grain:        none;      /* noise on a dark ground reads as dirt */
}
