/* ============================================================
   StoryForge — Shared Design Tokens
   Single source of truth for the palette and fonts.
   Every page imports this before its own CSS file.
   Page-specific tokens (container colours, card colours, etc.)
   live in each page's own stylesheet.
   ============================================================ */

:root {
  /* Background */
  --bg:          #0D0C0A;

  /* Foreground scale — all contrast ratios against --bg */
  --fg:          #E8DFC8;   /* ~14.5:1  body text                              */
  --fg-muted:    #A8967A;   /* ~6.75:1  secondary body text                    */
  --fg-dim:      #9A7E58;   /* ~5.5:1   small labels and dim supporting text   */
  --fg-label:    #A68C65;   /* ~6.4:1   informational metadata (section labels)*/
  --fg-faint:    #5C4A2A;   /* ~2.28:1  DECORATIVE ONLY — ornaments, dividers  */

  /* Accent */
  --gold:        #C9A055;   /* ~7.99:1  primary accent                         */

  /* Container surfaces — shared across all reader-facing pages */
  --gold-muted:              #8A7048;
  --container-bg:            rgba(201, 160, 85, 0.03);
  --container-border:        rgba(201, 160, 85, 0.18);
  --container-bg-active:     rgba(201, 160, 85, 0.06);
  --container-border-active: rgba(201, 160, 85, 0.25);
  --inner-pill-bg:           rgba(201, 160, 85, 0.04);
  --inner-pill-border:       rgba(201, 160, 85, 0.12);
  --hairline:                rgba(201, 160, 85, 0.15);

  /* Typography */
  --font-body:   'Crimson Pro', Georgia, serif;
  --font-ui:     'Inter', system-ui, sans-serif;

  /* ==========================================================
     SF-VISUAL-01: shared visual-elevation kit
     NEW tokens only - the palette above is unchanged. Every value
     is built from the existing gold (201,160,85) over the ink --bg,
     plus a white sheen / black shadow for depth. No new hues.
     Reused by every reader-facing screen (the shared component kit).
     ========================================================== */

  /* Gold-glass surfaces (section cards, panels) - a warm gold lift off the ink ground */
  --glass-bg:            linear-gradient(180deg, rgba(201,160,85,0.075), rgba(201,160,85,0.03));
  --glass-border:        rgba(201,160,85,0.26);
  --glass-catchlight:    inset 0 1px 0 rgba(201,160,85,0.14);
  --glass-shadow:        0 10px 30px rgba(0,0,0,0.42);  /* TUNABLE (a): card depth. Lower blur/alpha (or set to none) to flatten on long lists. */
  --glass-radius:        13px;

  /* Emphasis surface (saga emblem cards) - a touch more presence */
  --glass-bg-strong:     linear-gradient(180deg, rgba(201,160,85,0.11), rgba(201,160,85,0.05));
  --glass-border-strong: rgba(201,160,85,0.30);

  /* Lit-metal affordance (primary buttons). Highlight derived from --gold, not a new colour. */
  --lit-metal:           linear-gradient(180deg, color-mix(in srgb, var(--gold) 80%, #ffffff 20%), var(--gold));
  --lit-metal-sheen:     inset 0 1px 0 rgba(255,255,255,0.28), 0 3px 10px rgba(0,0,0,0.35);
  --btn-radius:          9px;

  /* Choice input well - TUNABLE (b): lower this one alpha to recess the choice panel, raise to warm it. */
  --choice-well-bg:      rgba(201,160,85,0.05);
  --choice-well-inset:   inset 0 1px 0 rgba(201,160,85,0.12), inset 0 2px 10px rgba(0,0,0,0.35);
}

/* --- Accessible utility ----------------------------------- */

/* Used on auth-complete, account, and reader pages. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Birthdate trio component ----------------------------- */

/* Three-select birthdate picker (Month / Day / Year).
   Shared by auth-complete and account pages.
   Relies on --container-bg / --container-border / --container-border-active
   defined in each page's own CSS; --fg and --gold from this file. */

.birthdate-trio {
  display: flex;
  gap: 8px;
}

.birthdate-select {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  box-sizing: border-box;
  background: var(--container-bg);
  border: 0.5px solid var(--container-border);
  border-radius: 2px;
  padding: 10px 8px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.4;
  cursor: pointer;
  color-scheme: dark;
  transition: border-color 0.15s;
}

.birthdate-select:focus {
  border-color: var(--container-border-active);
  outline: none;
}

.birthdate-select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Year field carries 4-digit values — give it slightly more natural weight */
.birthdate-select:last-child {
  flex: 1.2;
}
