/* Owner, 2026-11-30: always light. Stops browsers that darken pages on their own (AGENTS.md rule 5b). */
:root { color-scheme: only light; }
/* Design tokens for the whole site: colours, type, spacing, radii, shadows.
   The design system: our brand colours on the Design Arsenal layout and type (DM Sans, DM Mono); parts are shown at
   /funnel/styleguide and listed in docs/plans/figma-design-system-audit.md. The rebrand is a change to this one file.

   Always light (owner, 2026-11-29: "none of our app should be dark mode"). The phone's dark setting is ignored: the
   dark values below only apply to a page that sets <html data-theme="dark">, and none does.

   The public pages still use their own variables in assets/style.css and are not restyled by this file.
   The members area and the admin (assets/app/app.css) use only these tokens. */

:root {
  color-scheme: light;

  /* ---- Colour: surfaces and text ------------------------------------- */
  --color-bg: #f1e8d6;            /* page background (style.css --stock) */
  --color-surface: #fbf6ea;       /* cards, panels (--paper) */
  --color-surface-2: #f6efdd;     /* quiet fills, table stripes (--paper-warm) */
  --color-text: #191512;          /* headings, main text (--ink) */
  --color-text-body: #3f382f;     /* long text (--ink-body) */
  --color-text-muted: #5c534a;    /* labels, captions (--ink-dim) */
  --color-border: #dbcdb0;        /* keylines (--keyline) */
  --color-border-soft: #ece2ca;   /* hairlines (--hairline) */
  --color-disabled-bg: #eae0cb;
  --color-disabled-text: #9a9082;

  /* ---- Colour: brand -------------------------------------------------- */
  --color-accent: #a03d16;        /* links, focus, selected: deep orange (owner, 2026-11-27: cream and orange, no green) */
  --color-accent-strong: #7f2f10;
  --color-accent-tint: #f7e3d8;
  --color-on-accent: #fbf6ea;
  --color-cta: #c0491f;           /* the one main action (--burnt) */
  --color-cta-strong: #a03d16;
  --color-cta-tint: #f7e3d8;
  --color-on-cta: #fbf6ea;
  --color-highlight: #f6e38c;     /* marker behind ink text, never for buttons or state */

  /* ---- Colour: state -------------------------------------------------- */
  --color-success: #3f6b1f;       /* done ticks only */
  --color-success-tint: #e6eed9;
  --color-warning: #8a5a00;
  --color-warning-tint: #f6ebc8;
  --color-danger: #8f2418;        /* (--burnt-on-tint) */
  --color-danger-tint: #f7e3d8;
  --color-neutral: #7d7156;       /* queued, waiting (--state-queued) */
  --color-neutral-tint: #ece2ca;
  --color-scrim: rgba(25, 21, 18, 0.45);

  /* ---- Type ----------------------------------------------------------- */
  /* Fallbacks first-class: pages must read well with no web fonts loaded. */
  --font-display: "DM Sans", Helvetica, Arial, sans-serif;
  --font-ui: "DM Sans", Helvetica, Arial, sans-serif;
  --font-mono: "DM Mono", "Courier New", ui-monospace, monospace;

  --text-xs: 0.75rem;     /* 12px */
  --text-sm: 0.875rem;    /* 14px */
  --text-md: 1rem;        /* 16px */
  --text-lg: 1.125rem;    /* 18px */
  --text-xl: 1.375rem;    /* 22px */
  --text-2xl: 1.75rem;    /* 28px */
  --text-3xl: 2.25rem;    /* 36px */
  --leading-tight: 1.2;
  --leading-body: 1.55;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-heavy: 800;
  --tracking-label: 0.18em;

  /* ---- Space ---------------------------------------------------------- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 48px;
  --space-9: 64px;
  --gutter: 16px;          /* side gutter on phones */
  --container: 1180px;
  --container-narrow: 720px;

  /* ---- Radii (style.css --r-*) --------------------------------------- */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  /* ---- Shadows (soft under cards, a solid edge under buttons) ------------------ */
  --shadow-sm: 0 8px 20px -12px rgba(25, 21, 18, 0.18);
  --shadow-md: 0 18px 40px -16px rgba(25, 21, 18, 0.22);
  --shadow-lg: 0 18px 36px rgba(25, 21, 18, 0.24);
  --shadow-press: 0 3px 0 var(--color-text);
  --focus-ring: 0 0 0 3px var(--color-accent-tint), 0 0 0 5px var(--color-accent);

  /* ---- Motion --------------------------------------------------------- */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --duration: 140ms;
}

/* Dark: warm near-black paper, cream ink, brighter orange for contrast. */
@media (prefers-color-scheme: dark) {
  :root[data-theme="dark"] {
    color-scheme: dark;
    --color-bg: #15120f;
    --color-surface: #1f1a16;
    --color-surface-2: #29231d;
    --color-text: #f7efdd;
    --color-text-body: #e3d8c2;
    --color-text-muted: #b6a98d;
    --color-border: #4a4036;
    --color-border-soft: #352d26;
    --color-disabled-bg: #2c261f;
    --color-disabled-text: #7d7262;
    --color-accent: #f08257;
    --color-accent-strong: #f6a07c;
    --color-accent-tint: #3a2117;
    --color-on-accent: #15120f;
    --color-cta: #e2683b;
    --color-cta-strong: #f08257;
    --color-cta-tint: #3a2117;
    --color-on-cta: #15120f;
    --color-highlight: #5c4f12;
    --color-success: #a8c97f;
    --color-success-tint: #253318;
    --color-warning: #e7c062;
    --color-warning-tint: #3a3015;
    --color-danger: #f0937a;
    --color-danger-tint: #3a1d16;
    --color-neutral: #b6a98d;
    --color-neutral-tint: #352d26;
    --color-scrim: rgba(0, 0, 0, 0.6);
    --shadow-sm: 0 1px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 2px 10px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --color-bg: #15120f;
  --color-surface: #1f1a16;
  --color-surface-2: #29231d;
  --color-text: #f7efdd;
  --color-text-body: #e3d8c2;
  --color-text-muted: #b6a98d;
  --color-border: #4a4036;
  --color-border-soft: #352d26;
  --color-disabled-bg: #2c261f;
  --color-disabled-text: #7d7262;
  --color-accent: #f08257;
  --color-accent-strong: #f6a07c;
  --color-accent-tint: #3a2117;
  --color-on-accent: #15120f;
  --color-cta: #e2683b;
  --color-cta-strong: #f08257;
  --color-cta-tint: #3a2117;
  --color-on-cta: #15120f;
  --color-highlight: #5c4f12;
  --color-success: #a8c97f;
  --color-success-tint: #253318;
  --color-warning: #e7c062;
  --color-warning-tint: #3a3015;
  --color-danger: #f0937a;
  --color-danger-tint: #3a1d16;
  --color-neutral: #b6a98d;
  --color-neutral-tint: #352d26;
  --color-scrim: rgba(0, 0, 0, 0.6);
  --shadow-sm: 0 1px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 2px 10px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
}
