/* Loopbooks dark theme, PROPOSAL for DS B v1.1 (DS B v1.0 ships light only).
   Built only from DS B values: Ink #0F1A16, Circuit #06372B, Circuit-2 #0A4A39, Bright #3AE29E, Cream #F5F2E9,
   --sidebar-ink #C9DDD3, --sidebar-ink-dim #8FB0A1, plus status colours that already exist (--alert, --info-on-dark, --client-on-dark, --warning).
   Derived containers use color-mix on those values. Load order: tokens.css, components.css, tokens-dark.css, app.css.
   Activated by <html data-theme="dark">. Needs design sign-off before it is merged into the DS (see specs/05). */

[data-theme="dark"]{
  color-scheme:dark;

  --background:#0F1A16;
  --surface:#06372B;
  --surface-muted:#0A4A39;
  --surface-tint:#06372B;
  --decision-surface:#06372B;
  --human-surface:#06372B;
  --on-surface:#F5F2E9;
  --on-surface-variant:#C9DDD3;
  --outline:color-mix(in srgb,#8FB0A1 32%,#06372B);
  --outline-hover:color-mix(in srgb,#8FB0A1 65%,#06372B);
  --hairline-soft:color-mix(in srgb,#8FB0A1 20%,#06372B);
  --hover:#0A4A39;

  --primary:#3AE29E;
  --primary-dark:#3AE29E;
  --focus:#3AE29E;
  --secondary:#0A4A39;
  --secondary-container:#06372B;

  /* GAP-1 in dark: field boundary 3:1 or better against the surface */
  --field-border:#8FB0A1;

  --error-strong:color-mix(in srgb,#FF6A5E 60%,#FFFFFF);
  --error-container:color-mix(in srgb,#FF6A5E 14%,#06372B);
  --error-ink:color-mix(in srgb,#FF6A5E 60%,#FFFFFF);
  --sev-critical:#FF6A5E;
  --warning-container:color-mix(in srgb,#FFAA00 20%,#06372B);
  --warning-ink:#FFAA00;
  --success-container:#0A4A39;
  --success-ink:#3AE29E;
  --info:#4D9BFF;
  --info-container:color-mix(in srgb,#4D9BFF 14%,#06372B);
  --info-ink:color-mix(in srgb,#4D9BFF 60%,#FFFFFF);
  --client-container:color-mix(in srgb,#B58CFF 14%,#06372B);
  --client-ink:color-mix(in srgb,#B58CFF 60%,#FFFFFF);

  --disabled-bg:color-mix(in srgb,#8FB0A1 16%,#06372B);
  --disabled-ink:#8FB0A1;
  --skeleton-hi:color-mix(in srgb,#FFFFFF 12%,#06372B);
  --progress:#3AE29E;

  --scrim:rgba(15,26,22,.72);
  --shadow-overlay:0 8px 24px rgba(0,0,0,.45);
}

/* Component overrides: DS B hard-codes --secondary as heading and secondary-button colour */
[data-theme="dark"] h1,[data-theme="dark"] h2,[data-theme="dark"] h3,[data-theme="dark"] .display{color:var(--on-surface)}
[data-theme="dark"] .kpi .k-num{color:var(--on-surface)}
[data-theme="dark"] .btn-secondary{color:var(--on-surface);border-color:var(--on-surface)}
[data-theme="dark"] .btn-secondary:hover{background:var(--hover)}
[data-theme="dark"] .btn-ghost{color:var(--primary)}
[data-theme="dark"] .eyebrow{color:var(--primary)}
[data-theme="dark"] a:hover{color:var(--cta-hover)}
[data-theme="dark"] .kpi.selectable.active{border-color:var(--primary)}
[data-theme="dark"] .meter>span{background:var(--progress)}
