/* ============================================================================
   19K-RGP design tokens — "Paddy to Grain"
   Single source of truth for colour, type, spacing, radius, shadow.
   Light + dark via [data-theme]. WCAG-AA contrast intended.
   ============================================================================ */
@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap");

:root {
  /* ---- brand & accents ---- */
  --paddy:        #2F6E4E;   /* brand / structure (rice paddy green) */
  --paddy-hover:  #245A3F;
  --paddy-deep:   #1B4630;   /* deepest green — gradient ends */
  --grain:        #C9A227;   /* data emphasis (ripe grain gold) — large text / non-text only */
  --grain-soft:   #E7D9A8;   /* husk — chips, callout backgrounds */
  --grain-deep:   #A8841C;
  --terrace:      #3B7EA1;   /* secondary (muted teal-blue) */

  /* ---- ink & surfaces (light) ---- */
  --ink:          #1C1F1A;   /* headings (soil) */
  --body:         #2B2F29;   /* body text */
  --muted:        #5C6358;   /* secondary text */
  --paper:        #FAFAF7;   /* page surface (warm off-white) */
  --paper-2:      #F2F3ED;   /* alternating section tint (warm) */
  --surface:      #FFFFFF;   /* raised surface (cards) */
  --surface-2:    #FCFCFA;   /* subtle inner surface */
  --border:       #E3E5DE;   /* rules / borders */
  --border-soft:  #ECEDE6;
  --code-bg:      #F5F6F1;

  /* ---- gradients ---- */
  --grad-brand:   linear-gradient(135deg, var(--paddy) 0%, var(--paddy-deep) 100%);
  --grad-accent:  linear-gradient(135deg, var(--grain) 0%, var(--grain-deep) 100%);
  --grad-line:    linear-gradient(90deg, var(--paddy), var(--terrace), var(--grain));

  /* ---- semantic / badges ---- */
  --ok-fg:    #2F8F5B;  --ok-bg:    #E7F4EC;   /* Public */
  --warn-fg:  #B5852A;  --warn-bg:  #FBF1D8;   /* Review-only */
  --info-fg:  #3B7EA1;  --info-bg:  #E4EEF4;   /* Coming at publication */
  --danger:   #B23A3A;

  /* ---- typography ---- */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, "SF Mono", monospace;

  --fs-1000: 3.75rem;
  --fs-900: 3rem;     --fs-800: 2.25rem;  --fs-700: 1.75rem;  --fs-600: 1.375rem;
  --fs-500: 1.125rem; --fs-400: 1rem;     --fs-300: 0.875rem; --fs-200: 0.8125rem;
  --lh-tight: 1.14;   --lh-body: 1.62;    --measure: 68ch;

  /* ---- spacing / radius / shadow / motion ---- */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px; --sp-5: 24px;
  --sp-6: 32px; --sp-7: 48px; --sp-8: 64px; --sp-9: 96px;
  --radius: 12px; --radius-sm: 8px; --radius-lg: 18px; --radius-xl: 24px;
  --shadow-1: 0 1px 2px rgba(28,31,26,.06), 0 2px 6px rgba(28,31,26,.05);
  --shadow-2: 0 6px 16px rgba(28,31,26,.08), 0 2px 6px rgba(28,31,26,.05);
  --shadow-3: 0 18px 40px -12px rgba(28,31,26,.20), 0 8px 16px -8px rgba(28,31,26,.12);
  --ring: 0 0 0 4px color-mix(in srgb, var(--paddy) 14%, transparent);
  --ease: cubic-bezier(.2,.6,.2,1);
  --ease-out: cubic-bezier(.16,.84,.34,1);
  --header-h: 64px;
  --content-max: 1240px;
}

:root[data-theme="dark"] {
  --paddy:        #6FB58E;
  --paddy-hover:  #84C7A1;
  --paddy-deep:   #143626;
  --grain:        #E3C25A;
  --grain-soft:   #2C2A1C;
  --grain-deep:   #C7A53F;
  --terrace:      #6FAFC9;
  --ink:          #ECEFE9;
  --body:         #D7DBD2;
  --muted:        #9BA298;
  --paper:        #14171A;
  --paper-2:      #181B1E;
  --surface:      #1B1F22;
  --surface-2:    #20252A;
  --border:       #2A2F30;
  --border-soft:  #23282A;
  --code-bg:      #1F2427;
  --grad-brand:   linear-gradient(135deg, #2F6E4E 0%, #143626 100%);
  --grad-accent:  linear-gradient(135deg, var(--grain) 0%, var(--grain-deep) 100%);
  --grad-line:    linear-gradient(90deg, var(--paddy), var(--terrace), var(--grain));
  --ok-fg:   #7FD3A3;  --ok-bg:   #19311f;
  --warn-fg: #E3C25A;  --warn-bg: #322a12;
  --info-fg: #8FC4DC;  --info-bg: #152a33;
  --danger:  #E08585;
  --shadow-1: 0 1px 2px rgba(0,0,0,.4);
  --shadow-2: 0 6px 18px rgba(0,0,0,.5);
  --shadow-3: 0 20px 44px -12px rgba(0,0,0,.7), 0 8px 18px -8px rgba(0,0,0,.5);
  --ring: 0 0 0 4px color-mix(in srgb, var(--paddy) 22%, transparent);
}
