/* DOOOQS design tokens — the owner's approved palette (CF123/C168), one source for every screen.
   Ink text on porcelain. Sand is an accent only: it carries the connector and its square nodes, and it
   is never used for small body text or for white-on-sand action text. The Q tail takes the colour of
   its own ring, which is the variant the owner asked to see. Semantic status colours are separate
   from the brand and stay as they are. */
:root {
  --brand-ink: #102A35;
  --brand-porcelain: #F5F2EA;
  --brand-sand: #B69B72;

  /* Ink at reduced weight for rules, muted lines and disabled text — still ink, never sand. */
  --brand-ink-80: #3a4f58;
  --brand-ink-60: #5a6d75;   /* measured 4.84:1 on porcelain — #64757c was 4.29 and failed AA */
  --brand-ink-12: rgba(16, 42, 53, 0.12);
  --brand-sand-16: rgba(182, 155, 114, 0.16);

  /* Surfaces */
  --surface: var(--brand-porcelain);
  --surface-raised: #FBFAF6;
  --surface-inverse: var(--brand-ink);
  --ink: var(--brand-ink);
  --ink-muted: var(--brand-ink-60);
  --line: var(--brand-ink-12);
  --accent: var(--brand-sand);
  --accent-wash: var(--brand-sand-16);

  /* The Q tail stays a single token, and a single editable vector part, so a later change of mind
     is one value rather than a redraw. Today it is the ring's own ink. */
  --brand-q-tail: var(--brand-ink);

  /* Focus is ink on porcelain and porcelain on ink — never sand, which would fail on both. */
  --focus-ring: var(--brand-ink);
  --focus-ring-inverse: var(--brand-porcelain);

  /* Status stays semantic and outside the brand palette. */
  --state-ok: #1f6f4a;
  --state-warn: #8a5a00;
  --state-error: #a32319;
}

/* Reversed surfaces: porcelain text on ink, the accent unchanged. */
.on-ink {
  background: var(--brand-ink);
  color: var(--brand-porcelain);
  --ink: var(--brand-porcelain);
  --ink-muted: rgba(245, 242, 234, 0.72);
  --line: rgba(245, 242, 234, 0.18);
  --brand-q-tail: var(--brand-porcelain);
  --focus-ring: var(--focus-ring-inverse);
}

/* Contrast, measured with the WCAG 2.1 formula rather than estimated:
     ink #102A35 on porcelain #F5F2EA ............ 13.36:1  (AAA)
     porcelain on ink ............................ 13.36:1  (AAA)
     ink-80 #3a4f58 on porcelain .................  7.70:1  (AAA body)
     ink-60 #5a6d75 on porcelain .................  4.84:1  (AA body)
     ink on sand #B69B72 .........................  5.64:1  (AA body, not AAA)
     porcelain on sand ...........................  2.37:1  (fails — never used)
     sand on porcelain ...........................  2.37:1  (fails — never used for text)
   The last two lines are why sand carries shape and never text; the Q tail reads at the ink figure,
   13.36:1, on either surface. */
