/* Tier 2 · semantic (theming happens HERE) + Tier 3 · component.
   Light and dark diverge deliberately: node.active is #00786E on light because
   Live Turquoise measures 1.57 against Sea Glass.

   LIGHT SURFACE AUDIT (v1.0.1) — Sea Glass #F0F7F8 as the app canvas sat only 3%
   below white, so cards, tables and dialogs did not separate from the page and the
   whole UI read as washed out. The canvas is now a deeper step of the same sea-glass
   hue and the borders carry real weight against white. Sea Glass itself is unchanged
   as a brand colour (--color-brand-sea-glass) and stays the marketing/keynote surface;
   this is a product-surface adjustment only. Brand-locked, contrast-measured values
   (text.*, action.primary, node.active, state.*) are untouched.

   DARK SURFACE AUDIT (v1.0.2) — the dark theme had never been measured against
   bg.raised, and its primary button went LIGHTER on hover while keeping a white
   label: #0093D6 / #00A8E8 with #FFFFFF measure 3.42 and 2.70. Four defects fixed:
     · text.on-action on dark is now Ocean Ink #05242F and the fills step up the
       Fiber ramp (#0093D6 → #00A8E8 → #4BACEA = 4.73 / 5.97 / 6.45). One label ink
       per theme — the ink never flips mid-interaction. Fiber Blue #0070B8 remains
       the brand-locked action colour on LIGHT surfaces; on dark it is a 2.83 text
       colour and only ever a base fill under a white label, so dark drops it.
     · text.muted #7C9BA4 → #8AA8B0 (was 3.88 on bg.raised, now 4.55).
     · node.idle #7FA3AF → #8FB0BB (4.25 → 4.98 on bg.raised).
     · node.route #149AF0 → #4BACEA (3.79 → 4.60 on bg.raised).
   Two additions: --border-control (#6F8C97 light, #4A93A6 dark) is the only border
   that clears 3:1 as a control boundary — --input-border now points at it, since
   border.default is 1.32 on dark surface and 1.3 on white and is decorative only.
   And --endorsement on dark is white #F0F7F8 (14.9), not Crimson (4.09, fails as
   small text) — permitted by endorsement rule 4, "white on dark". */
:root,[data-theme="light"]{
--bg-canvas:#E2EDF1;--bg-surface:#FFFFFF;--bg-raised:#FFFFFF;--bg-sunken:#D2E1E7;--bg-inverse:#05242F;
--bg-subtle:#F0F7F8;--bg-shell:#D9E6EB;
--border-subtle:#C4D6DC;--border-default:#B8CFD7;--border-strong:#8FA8B1;--border-control:#6F8C97;--border-focus:#0070B8;
--text-primary:#10333F;--text-secondary:#41616D;--text-muted:#42585F;--text-inverse:#F0F7F8;--text-link:#0070B8;--text-on-action:#FFFFFF;
--action-primary:#0070B8;--action-primary-hover:#005A94;--action-primary-active:#004B7D;--action-secondary:#D2E1E7;--action-disabled:#C4D6DC;
--node-active:#00786E;--node-idle:#54717B;--node-route:#4BACEA;
--state-success:#007A52;--state-success-bg:#DDF4ED;--state-warning:#9A5B00;--state-warning-bg:#F6EEE3;--state-risk:#C42D42;--state-risk-bg:#F5E8EA;--state-info:#0070B8;--state-info-bg:#DFECF5;
--endorsement:#FF003B;
}
[data-theme="dark"]{
--bg-canvas:#05242F;--bg-surface:#0A3242;--bg-raised:#0F3E50;--bg-sunken:#031A23;--bg-inverse:#F0F7F8;
--border-subtle:#123C4C;--border-default:#164657;--border-strong:#20606F;--border-control:#4A93A6;--border-focus:#00DCE0;
--text-primary:#F0F7F8;--text-secondary:#A9C6CD;--text-muted:#8AA8B0;--text-inverse:#05242F;--text-link:#4BACEA;--text-on-action:#05242F;
--action-primary:#0093D6;--action-primary-hover:#00A8E8;--action-primary-active:#4BACEA;--action-secondary:#123C4C;--action-disabled:#173B48;
--bg-subtle:#0A3242;--bg-shell:#031A23;
--node-active:#00DCE0;--node-idle:#8FB0BB;--node-route:#4BACEA;
--state-success:#40E8B0;--state-success-bg:#06322A;--state-warning:#ECB762;--state-warning-bg:#33220A;--state-risk:#E7A0A9;--state-risk-bg:#3A1620;--state-info:#4BACEA;--state-info-bg:#08303F;
--endorsement:#F0F7F8;
}
/* Tier 3 · component tokens — bound to a specific component, never used loose. */
:root{
--button-height-sm:32px;--button-height-md:40px;--button-height-lg:48px;--button-padding-x-md:var(--space-4);--button-radius:var(--radius-md);--button-bg-primary:var(--action-primary);--button-bg-primary-hover:var(--action-primary-hover);--button-text-primary:var(--text-on-action);--button-font-size:var(--type-label-size);
--input-height:40px;--input-radius:var(--radius-md);--input-border:var(--border-control);--input-border-focus:var(--border-focus);--input-bg:var(--bg-surface);--input-placeholder:var(--text-muted);
--card-radius:var(--radius-lg);--card-padding:var(--space-6);--card-border:var(--border-default);--card-bg:var(--bg-surface);--card-shadow:var(--shadow-sm);
--table-row-height:48px;--table-header-bg:var(--bg-sunken);--table-border:var(--border-subtle);--table-numeric-font:var(--font-family-mono);
--badge-radius:var(--radius-pill);--badge-padding-x:var(--space-2);--badge-font-size:var(--type-caption-size);
--dialog-radius:var(--radius-xl);--dialog-shadow:var(--shadow-xl);--dialog-max-width:560px;
--toast-radius:var(--radius-lg);--toast-shadow:var(--shadow-lg);
--node-size-sm:6px;--node-size-md:10px;--node-size-lg:16px;--node-glow:var(--shadow-signal);
--focus-ring:var(--shadow-focus);--focus-offset:2px;--touch-min:44px;
}
