/* Redesign theme — the global palette. One file, one declaration per token.

   Values are the redesign's own (Redesign_Full_20260922/design/*.html). The
   mockups declared :root four times and the dark block five times, each pass
   overriding the last; this is the final result of that cascade, written once.

   Scope. The tokens are declared on `.rd` (a migrated block inside the app)
   and on `body.authPage` (the login page, migrated whole). They are NOT on
   :root, because index.html still carries pages on the old theme, and several
   names here (--bg --card --line --text --muted --navy --warn …) are also old
   theme names: declaring them globally would repaint pages not yet migrated.
   When every page has moved, this becomes :root and the old theme is deleted.

   Dark: the app marks it with body[data-theme="dark"], the login page with
   body.theme-dark.

   --em/--sky/--gold/--sand/--coral/--ind are bare "r,g,b" triplets so a page
   can use them at any opacity: rgba(var(--gold),.12). */

.rd,body.authPage{
  --bg:#e5ecf0;--card:#fff;--card2:#f1f5f8;--line:#dde6ec;--text:#0f2233;--muted:#667786;
  --navy:#041a2d;--navy2:#0a2a44;
  --accent:#0b7a60;--accentSoft:#e3f4ee;--onAccent:#fff;--link:#0b7a60;
  --up:#0b7a60;--down:#b03e50;--downSoft:#f8e5e8;
  --warn:#a86a12;--warnSoft:#fbf1dd;--warnLine:rgba(168,106,18,.35);
  --info:#2f78a3;--infoSoft:#e4f0f7;
  --c1:#0b7a60;--c2:#3f8fb8;--c3:#c7a24a;--c4:#8a9bb8;
  --em:11,122,96;--sky:47,120,163;--gold:176,128,24;--sand:196,106,68;--coral:196,72,92;--ind:92,108,196;
  --shadow:0 1px 2px rgba(15,34,51,.04);
  /* price-table rows (.rdZebra): alternate tint, and the row under the finger/pointer/caret */
  --rowAlt:rgba(15,34,51,.055);--rowHover:rgba(11,122,96,.085);
  /* nested "glass" cards (.rdGlass, sample 2026-09-26): a card sitting inside a panel that
     shares its background needs its own faint surface so it reads apart. Light theme has no
     white to add over an already-white panel, so the tint is a hint of ink instead; dark
     theme adds a translucent white wash. Both get a bright 1px top edge (the "glass" catch
     light) and a soft lift shadow. */
  --rd-nested-bg:rgba(15,34,51,.035);--rd-nested-bg-hover:rgba(15,34,51,.06);
  --rd-nested-border:rgba(15,34,51,.12);--rd-nested-hi:rgba(255,255,255,.8);
  --rd-nested-shadow:0 1px 2px rgba(15,34,51,.07);--rd-nested-blur:8px;
  /* fields (.rdField / owner 2026-09-26): every input/select/textarea gets its own recessed
     surface against the card it sits in, not just var(--line) (a ~1.2:1 hairline -- most of a
     field's outline was invisible). Field fill reuses --card2 (already the app's "sunken"
     tone); the border is its own token, tuned so a solid 1px hits >=3:1 against --card (WCAG
     1.4.11) in both themes -- var(--line) alone never reaches that. Placeholder text is its
     own darker tone too: --muted alone was already only ~4.6:1 on plain white and drops under
     4.5 on the new fill, same problem the radar's meta line had. */
  --rd-field-bg:var(--card2);--rd-field-border:rgba(15,34,51,.5);
  --rd-field-border-hover:rgba(15,34,51,.65);--rd-field-focus:rgba(11,122,96,.35);
  --rd-field-placeholder:#5a6b78;
  /* score bands (owner's rule, whole project): <50 low, 50–74 mid, ≥75 high */
  --score-low:var(--down);--score-mid:var(--warn);--score-high:var(--up);
  --font:var(--ui-font,"Vazirmatn",Tahoma,sans-serif);
  --fast:150ms;
}
body.authPage.theme-dark,body.theme-dark .rd,body[data-theme="dark"] .rd{
  --rowAlt:rgba(255,255,255,.05);--rowHover:rgba(60,199,155,.12);
  --bg:#030c14;--card:#0b1b29;--card2:#0f2334;--line:#1b3246;--text:#eef4f8;--muted:#8fa2b3;
  --navy:#020a12;--navy2:#08182a;
  /* owner rule: buttons keep the light theme's green in dark mode, never a bright mint */
  --accent:#0b7a60;--accentSoft:#0f3a30;--onAccent:#fff;--link:#3cc79b;
  --up:#4fdcb0;--down:#ff8a9c;--downSoft:#3a1820;
  --warn:#f0c46b;--warnSoft:#14273a;--warnLine:rgba(240,196,107,.45);
  --info:#7cc3ea;--infoSoft:#0e2a3d;
  --c1:#36d6a6;--c2:#5fb2dc;--c3:#e0bd62;--c4:#8a9bb8;
  --em:54,214,166;--sky:95,178,220;--gold:224,189,98;--sand:226,139,106;--coral:255,138,156;--ind:140,156,240;
  --shadow:none;
  /* nested "glass" cards on dark: a translucent white wash over the panel's navy, a brighter
     top edge, and a soft dark lift shadow (the panel itself casts none, --shadow is none). */
  --rd-nested-bg:rgba(255,255,255,.055);--rd-nested-bg-hover:rgba(255,255,255,.09);
  --rd-nested-border:rgba(255,255,255,.11);--rd-nested-hi:rgba(255,255,255,.16);
  --rd-nested-shadow:0 1px 3px rgba(0,0,0,.3);--rd-nested-blur:10px;
  /* fields on dark: recess to --bg (a level below --card, the same relationship the light
     theme's --card2 has to --card) with a light-on-dark border; --muted already clears
     4.5:1 there with headroom, so the placeholder needs no separate override. */
  --rd-field-bg:var(--bg);--rd-field-border:rgba(255,255,255,.35);
  --rd-field-border-hover:rgba(255,255,255,.5);--rd-field-focus:rgba(79,220,176,.4);
  --rd-field-placeholder:var(--muted);
}
