/* SUITE-136 - role tokens shared by the SiteMind and Arch3D workspace prototypes.
   This file is IDENTICAL in sitemind/proto/ and arch3d/proto/ (a test asserts it). Every colour in a prototype
   comes from here; no hex colour lives anywhere else. Dark is the default; light follows data-theme="light" on
   <html>, or the system setting under data-theme="auto". Contrast: text 4.5:1 or better on every surface it is
   used on (checked by _dev/suite-proto-contrast.mjs). */

:root {
  /* sizes and rhythm */
  --nd-bar-h: 44px;          /* app bar */
  --nd-ctx-h: 36px;          /* contextual options bar (0 when empty) */
  --nd-status-h: 28px;       /* status line */
  --nd-browser-w: 240px;     /* left browser */
  --nd-browser-rail-w: 40px; /* collapsed browser */
  --nd-props-w: 320px;       /* right properties */
  --nd-target: 44px;         /* smallest touch target */
  --nd-phone-slot-w: 56px;   /* phone toolbar slot */
  --nd-phone-slot-h: 48px;
  --nd-gap: 8px;
  --nd-radius: 8px;
  --nd-radius-sm: 4px;
  --nd-font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --nd-mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --nd-fs: 14px;
  --nd-fs-sm: 12px;
  --nd-fs-lg: 16px;
  --nd-dur: 160ms;
  --nd-ease: cubic-bezier(0.05, 0.7, 0.1, 1);

  /* DARK - Midnight Slate (Arch3D) with SiteMind's navy; the default */
  color-scheme: dark;
  --nd-bg: #0c0f17;
  --nd-surface: #141923;
  --nd-surface-raised: #1c2331;
  --nd-surface-sunken: #090b12;
  --nd-text: #f1f5f9;
  --nd-text-muted: #a3aebf;
  --nd-border: rgba(241, 245, 249, 0.10);
  --nd-border-strong: rgba(241, 245, 249, 0.24);
  --nd-accent: #ff7a33;
  --nd-on-accent: #1c1917;
  --nd-gold: #c5a059;
  --nd-ok: #34d399;
  --nd-warn: #fbbf24;
  --nd-danger: #f87171;
  --nd-info: #7ab8ff;
  --nd-canvas: #0b1220;
  --nd-grid: rgba(255, 255, 255, 0.08);
  --nd-selection: #ff7a33;
  --nd-focus: #7ab8ff;
  --nd-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  --nd-scrim: rgba(0, 0, 0, 0.55);

  /* the four honesty labels - they must LOOK different, not only read different */
  --nd-honesty-conceptual: #7dd3fc;   /* dashed border, muted blue */
  --nd-honesty-preliminary: #fbbf24;  /* dotted border, amber */
  --nd-honesty-reviewed: #34d399;     /* solid border, green */
  --nd-honesty-issued: #f1f5f9;       /* solid filled, text colour */
}

/* LIGHT - Architectural Paper White (Arch3D) */
:root[data-theme="light"] {
  color-scheme: light;
  --nd-bg: #fcfbf9;
  --nd-surface: #f5f3ef;
  --nd-surface-raised: #ffffff;
  --nd-surface-sunken: #ebe7e0;
  --nd-text: #1c1917;
  --nd-text-muted: #57534e;
  --nd-border: rgba(28, 25, 23, 0.12);
  --nd-border-strong: rgba(28, 25, 23, 0.28);
  --nd-accent: #c2410c;
  --nd-on-accent: #ffffff;
  --nd-gold: #9a4a08;
  --nd-ok: #166534;
  --nd-warn: #92400e;
  --nd-danger: #b91c1c;
  --nd-info: #1d4ed8;
  --nd-canvas: #e9eee6;
  --nd-grid: rgba(0, 0, 0, 0.10);
  --nd-selection: #c2410c;
  --nd-focus: #1d4ed8;
  --nd-shadow: 0 12px 40px rgba(28, 25, 23, 0.18);
  --nd-scrim: rgba(28, 25, 23, 0.35);
  --nd-honesty-conceptual: #0369a1;
  --nd-honesty-preliminary: #92400e;
  --nd-honesty-reviewed: #166534;
  --nd-honesty-issued: #1c1917;
}

/* auto = follow the system */
@media (prefers-color-scheme: light) {
  :root[data-theme="auto"] {
    color-scheme: light;
    --nd-bg: #fcfbf9;
    --nd-surface: #f5f3ef;
    --nd-surface-raised: #ffffff;
    --nd-surface-sunken: #ebe7e0;
    --nd-text: #1c1917;
    --nd-text-muted: #57534e;
    --nd-border: rgba(28, 25, 23, 0.12);
    --nd-border-strong: rgba(28, 25, 23, 0.28);
    --nd-accent: #c2410c;
    --nd-on-accent: #ffffff;
    --nd-gold: #9a4a08;
    --nd-ok: #166534;
    --nd-warn: #92400e;
    --nd-danger: #b91c1c;
    --nd-info: #1d4ed8;
    --nd-canvas: #e9eee6;
    --nd-grid: rgba(0, 0, 0, 0.10);
    --nd-selection: #c2410c;
    --nd-focus: #1d4ed8;
    --nd-shadow: 0 12px 40px rgba(28, 25, 23, 0.18);
    --nd-scrim: rgba(28, 25, 23, 0.35);
    --nd-honesty-conceptual: #0369a1;
    --nd-honesty-preliminary: #92400e;
    --nd-honesty-reviewed: #166534;
    --nd-honesty-issued: #1c1917;
  }
}

/* the honesty label itself - one class, four states, four looks */
.nd-honesty { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: var(--nd-radius-sm); font-size: var(--nd-fs-sm); font-weight: 600; letter-spacing: 0.02em; line-height: 18px; border: 1px solid transparent; }
.nd-honesty[data-level="conceptual"] { color: var(--nd-honesty-conceptual); border-style: dashed; border-color: var(--nd-honesty-conceptual); }
.nd-honesty[data-level="preliminary"] { color: var(--nd-honesty-preliminary); border-style: dotted; border-color: var(--nd-honesty-preliminary); }
.nd-honesty[data-level="reviewed"] { color: var(--nd-honesty-reviewed); border-style: solid; border-color: var(--nd-honesty-reviewed); }
.nd-honesty[data-level="issued"] { color: var(--nd-bg); background: var(--nd-honesty-issued); border-color: var(--nd-honesty-issued); }
