/* mnemodo light — paper and graphite, and the default for anyone whose OS says
   light. Values are byte-for-byte the ones that shipped.

   THE LAW: LIGHT IMPRESSES. Gold turns to ink, hairlines go graphite, panels
   RECESS into the page and --lamp is `none`. See themes/README.md. */
:root[data-theme="light"]{
  color-scheme:light;

  --bg:#fbf9f4;              /* paper — warm, but the brand's own cream, not grey */
  --surface:#f7f3ea;
  --panel:#f3eee4;           /* a faint recess; the hairline does the real work */
  --panel-2:#eae4d6;
  /* Inputs are RECESSED here too, not white.
     This block used to read `#ffffff` — "white paper, held by a firm hairline" —
     on the theory that a field should RISE on paper while it sinks in the dark.
     In practice a wall of pure white boxes on a warm cream page is glare, and it
     was the first thing reported about the light theme twice over.
     The look being asked for is the Memories ledger's own search box, which sits
     one step DOWN from the page it rests on. So light mode now agrees with dark
     mode about direction — a field is always a well — and only the depth differs.
     Chosen to stay a visible step below --panel (#f3eee4), the deepest surface a
     field normally sits on, so a field reads as a field on the page, on a panel,
     and inside a dialog (which is --surface). */
  --field:#efe9dd;
  --rail:#f0ebe0;            /* very slightly deeper than the page: a bound spine */

  --ink:#1b1f27;             /* 15.7:1 on paper */
  --ink-dim:#4d5563;         /* 7.1:1 */
  --ink-dimmer:#6b7382;      /* 4.5:1 on paper, 4.1 on a panel — labels only */

  --accent:#846829;          /* gold has to darken to pass on paper: 4.6:1 */
  --accent-hi:#5d4318;       /* hover moves toward CONTRAST here, not brightness */
  --accent-lo:#b39555;       /* decorative rules and gradient ends only */
  --on-accent:#fdfcf9;       /* on a dark gold fill the label is paper, not ink */

  --red:#a8402c;
  --red-ink:#8f3423;
  --green:#3d7350;
  --green-ink:#2f5c3f;

  /* The type encoding, as 7px dots and 2px stripes on paper. Derived, not guessed:
     for each dark colour, keep the HUE (it IS the encoding), lift saturation ~18%
     because paper washes chroma out, and darken ONLY as far as a 3.2:1 contrast
     floor against --panel demands. The first cut of this file darkened by feel and
     landed at 4.6–6.7:1 — every dot read as near-black and the six were no longer
     tellable apart. These sit at ~3.5:1 and are measurably MORE distinct than the
     dark set they came from (closest pair 63 apart in RGB, vs 41 in dark). */
  --t-source:#97825e; --t-atomic:#5e83d3; --t-qa:#4e9182;
  --t-claim:#cf673e;  --t-summary:#aa7d10; --t-pattern:#9f70cd;
  /* same derivation as the six: hue held, saturation lifted, darkened only to the
     contrast floor (3.9:1 here). Deliberately blued off claim's hue — at paper
     saturation a straight rose sat 62 apart from --t-claim, under the 63 that makes
     the set readable; this sits 78 from claim and 85 from pattern. */
  --t-finding:#bf4d86;
  --atomic-ink:#3c5aa8;
  --pattern-ink:#6b45a5;

  --accent-rgb:132,104,41;

  /* The three navy families are used at .35–.92 alpha as recessed / raised BEDS.
     They cannot become ink here: the alphas live in the component rules, so
     rgba(ink,.55) would paint a dark smear where dark mode wanted a subtle
     surface. So they become LIGHT triples chosen to composite over paper into a
     faint warm bed at the alphas actually in use — which keeps the ordering the
     dark theme intends (higher alpha = deeper bed) without touching 40 rules. */
  --deep-rgb:224,215,198;    /* .55 over paper → ~#ece6db */
  --panel-rgb:232,224,208;
  --panel2-rgb:238,231,217;

  --red-rgb:168,64,44;
  --green-rgb:61,115,80;
  --claim-rgb:157,78,40;
  --atomic-rgb:66,88,155;
  --pattern-rgb:102,72,156;
  --ink-dimmer-rgb:107,115,130;
  /* Same reasoning for shadows, which run .35–.95: near-black at those alphas is
     a bruise on paper. A warm mid-grey keeps them soft at every alpha in use. */
  --shadow-rgb:156,146,128;
  /* white-on-navy sheens become ink-on-paper, or they simply vanish */
  --sheen-rgb:27,31,39;

  --line:rgba(27,31,39,.13);
  --line-soft:rgba(27,31,39,.075);
  --rust:#a2542c;
  /* reversed: on paper MORE means DARKER. A dim-to-bright gold ramp inverts the
     reading, because a pale cell is the quiet one here, not the busy one. */
  --hm1:#ede2c8; --hm2:#d6b876; --hm3:#ab8938; --hm4:#77601f;
  --s-ignored:#5c6675;
  --lamp:none;                        /* no lamp in daylight */
  --lift:0 1px 2px rgba(27,31,39,.05),0 6px 18px -12px rgba(27,31,39,.20);
  --veil:rgba(251,249,244,.72);
  --dial-on:rgba(132,104,41,.10);
  --graph-bg:#fdfcf9;
  --graph-veil:rgba(255,255,255,.78);

  /* see mnemodo-dark.css — the accent hue, unchanged */
  --attn-ink:#5d4318; --attn-rgb:132,104,41; --attn-bed:.10; --attn-bd:.35;
}

/* Hairlines: gold at .18 alpha does not exist on paper, so the whole family
   draws them in graphite. */
:root[data-theme="light"]{
  --bd:1px solid rgba(27,31,39,.13);
  --bd-soft:1px solid rgba(27,31,39,.075);
  --bd-firm:1px solid rgba(27,31,39,.26);
  --wash:rgba(var(--accent-rgb),.07);
}
