/* MyMovingRadar design tokens: palette C (V3), founder-approved 2026-11-21.

   The only file that defines a colour. global.css imports it first, and its legacy --mmr-* names are
   aliases onto the roles below, so the homepage, guides, builder, about, privacy and terms change together.

   Colour roles: design/concepts/system/palettes.json, palette "c", copied unchanged. Each line carries the
   provenance tag from that file: GIVEN (stated in design/concepts/v3/BRAND.md), SOURCE (read from
   design/concepts/v3/styles.css) or DERIVED (worked out in the palette run). PROVISIONAL marks a derived
   value still awaiting a founder decision.
   Non-colour values: v3/BRAND.md, adopted only where they improve on what shipped. */

:root {
  color-scheme: light;

  /* Surfaces */
  --ground: #faf4e9;            /* GIVEN --cream. The page. */
  --surface: #fffdf9;           /* GIVEN --paper. Panels, cards, fields. Never pure white. */
  --surface-muted: #f3e9da;     /* GIVEN --tint. Not-moving rows, muted chips, hover fill. */
  --surface-sunk: #fdf9f1;      /* DERIVED. Halfway between ground and surface. */

  /* Text */
  --text: #13263f;              /* GIVEN --ink. Body text. */
  --text-secondary: #4d5b70;    /* GIVEN --ink-2. Sources, dates, labels. */
  --ink: #13263f;               /* GIVEN --ink. Headings, counts, the footer ground. */
  --ink-deep: #0c1a2e;          /* SOURCE. The dialog scrim. */
  --ink-raise: #1a355d;         /* DERIVED. Second stop of an ink fill. */
  --on-ink: #faf4e9;            /* GIVEN. Text on ink and on status fills. */
  --on-ink-2: #b9c4d1;          /* GIVEN. Secondary text on ink. */

  /* Action: one orange fill, always under a navy label inside a navy edge. Never text. */
  --action: #f5881f;            /* GIVEN. Fill of the one primary action. 2.28:1 on the page: fill only. */
  --action-hover: #e97a0e;      /* GIVEN. Hovered, and held on press (see .button--primary:active). */
  --action-press: #de7208;      /* GIVEN. Kept for reference; not used, its label falls to 4.73:1. */
  --on-action: #13263f;         /* GIVEN. The navy label. */
  --action-edge: #13263f;       /* GIVEN. The navy boundary. */
  --action-edge-hover: #13263f; /* GIVEN. Unchanged on hover. */
  --action-edge-press: #13263f; /* GIVEN. Unchanged on press; the press cue is its width. */
  --action-soft: #fde3c3;       /* GIVEN --lit. On your list, selected, and the box chip. */
  --action-line: #f6c98f;       /* DERIVED --lit-2 as the edge of a lit area. */
  --action-wash: #f3e9da;       /* GIVEN --tint. Hover wash. */
  --action-text: var(--ink);    /* NEW (correction 4.2). Text-only actions: navy, always underlined. */
  --disabled: #ece5d8;          /* GIVEN (BRAND.md; unused in palettes.json). Disabled primary ground. */
  --link: #13263f;              /* GIVEN. Links: navy and underlined. */

  /* Accent: the second hue is the action orange, as a fill only. Box areas take no colour of their own. */
  --accent: #f5881f;            /* GIVEN. The box-count bar and small decorative fills. */
  --accent-soft: #fffdf9;       /* DERIVED. Resolves to the surface. */
  --accent-ink: #13263f;        /* DERIVED. Resolves to ink. */
  --accent-line: #e6dccd;       /* DERIVED. Resolves to the hairline. */
  --accent-wash: #fffdf9;       /* DERIVED. Resolves to the surface. */

  /* The record */
  --evidence-neutral: #eef2f6;  /* GIVEN --slate-wash. */
  --evidence-line: #c6d0db;     /* GIVEN --slate-line. */

  /* Lines */
  --border: #d7cdbe;            /* DERIVED. Panel and tile edges. */
  --line: #e6dccd;              /* GIVEN. Hairlines between rows. */
  --border-strong: #ada38f;     /* DERIVED. Dashed not-moving edges, disabled glyphs. */
  --control-border: #13263f;    /* GIVEN --ink. Every control that is not the primary action. */

  /* Status */
  --success: #1a7046;           /* DERIVED, PROVISIONAL. The live green, reused. */
  --success-soft: #e8efe7;      /* DERIVED, PROVISIONAL. */
  --warning: #6f5a00;           /* DERIVED, PROVISIONAL. 6.11:1 on ground, 6.59:1 on surface. */
  --warning-soft: #f1ede0;      /* DERIVED, PROVISIONAL. */
  --error: #bd2f22;             /* GIVEN. Unchanged from the live site. */
  --error-soft: #fbe9e7;        /* GIVEN. */

  /* Focus: a navy ring, 3px (BRAND.md; the live ring was 2px). Cream inside navy areas. */
  --focus: #13263f;             /* GIVEN. */
  --focus-on-ink: var(--on-ink);
  --focus-width: 3px;

  /* Type: the smallest text on screen. The printed document keeps its own scale. */
  --fs-min: 13px;

  /* The room illustration on the homepage. BRAND.md values that palettes.json palette "c" lists as unused,
     added with founder approval 2026-11-21 (docs/DESIGN-STATE.md §2, §5.2). Drawn, never pressable. */
  --lit-2: #f6c98f;             /* GIVEN (BRAND.md). The deeper fill inside a drawing: wood, kraft, a cushion.
                                   Same value as --action-line, a different job: that role is an edge. */
  --floor: #f7eddc;             /* GIVEN (BRAND.md). The room's floor. Navy lines on it 13.15:1. */
  --arch: #cdbda4;              /* GIVEN (BRAND.md). The room's walls and window. Decorative: 1.81:1 on surface. */
  --unlisted: #7c8794;          /* GIVEN (BRAND.md). A drawn object not on the list yet. 3.59:1 on surface, 3.15:1 on floor. */

  /* Type, space, radius and motion for the homepage's V3 sections: v3/styles.css :root, values unchanged,
     added with the same approval (§5.3). */
  --font-ui: "Figtree", "Figtree Fallback", system-ui, -apple-system, "Segoe UI", sans-serif; /* V3's --text, renamed: --text here is a colour. */
  --fs-h2: clamp(1.5rem, 1.314rem + 0.762vw, 2rem);             /* 24 → 32 */
  --fs-h3: clamp(1.125rem, 1.0786rem + 0.19vw, 1.25rem);        /* 18 → 20 */
  --fs-lead: clamp(1.125rem, 1.0786rem + 0.19vw, 1.25rem);      /* 18 → 20 */
  --fs-body: clamp(1.0625rem, 1.0393rem + 0.095vw, 1.125rem);   /* 17 → 18 */
  --fs-small: 1rem;                                              /* 16: the floor for sentences */
  --fs-label: 0.875rem;                                          /* 14: uppercase labels only */
  --gutter: clamp(16px, -0.343px + 4.19vw, 60px);               /* 16 → 60 */
  --section: clamp(2.5rem, 1.99rem + 2.095vw, 3.875rem);        /* 40 → 62 */
  --r-panel: 12px;
  --r-control: 10px;
  --t-fast: 140ms;
  --t-base: 180ms;
  --t-slow: 200ms;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);                    /* body.ed-page keeps its own (editorial.css) */
  --ease-std: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark theme: colour roles DEFINED, NOT SHIPPED. Nothing sets data-theme, so no page renders these.
   Sourced from BRAND.md's text-on-navy set where one exists; every other value is invented in this run
   and unreviewed (see MIGRATION-SPEC.md, "Values invented"). */
:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #0c1a2e;            /* = --ink-deep */
  --surface: #13263f;           /* = --ink */
  --surface-muted: #1a355d;     /* = --ink-raise */
  --surface-sunk: #102036;      /* INVENTED. Halfway between ground and surface. */
  --text: #faf4e9;              /* = --on-ink */
  --text-secondary: #b9c4d1;    /* = --on-ink-2 */
  --ink: #faf4e9;
  --action-soft: #453c38;       /* INVENTED. 22% action over surface. */
  --action-line: #f6c98f;
  --action-wash: #25364d;       /* INVENTED. 8% on-ink over surface. */
  --link: #faf4e9;
  --accent-soft: #13263f;
  --accent-ink: #faf4e9;
  --accent-line: #33455c;
  --accent-wash: #13263f;
  --evidence-neutral: #1a355d;
  --border: #33455c;            /* BRAND.md --ink-line */
  --line: #33455c;              /* BRAND.md --ink-line */
  --border-strong: #7c8794;     /* BRAND.md --unlisted */
  --control-border: #b9c4d1;    /* = --on-ink-2 */
  --success: #6ba081;           /* INVENTED. 5.06:1 on surface. */
  --warning: #a49559;           /* INVENTED. 5.10:1 on surface. */
  --error: #d57c70;             /* INVENTED. 5.05:1 on surface. */
  --focus: #faf4e9;             /* BRAND.md: "On navy, the ring is cream." */
}
