/* Identity Desk — shared tokens and base styles. Sizes in rem; light first, dark follows the system.
   Palette: calm mineral compliance ledger, deep spruce-teal actions, violet with a dashed outline
   reserved strictly for AI checks and AI risk scores, solid borders for human determinations. */
:root {
  --ground: #f4f6f5;
  --surface: #ffffff;
  --sunk: #e9eeec;
  --ink: #102124;
  --ink-2: #334a4e;
  --ink-3: #4f666a;
  --line: #c6d3d1;
  --line-2: #dde6e4;
  --action: #115059;
  --action-ink: #ffffff;
  --action-soft: #dff0f2;
  --ai: #56389c;
  --ai-soft: #efeafa;
  --wait: #9e6500;
  --wait-soft: #fcefd2;
  --wait-ink: #6b4300;
  --ok: #16653b;
  --ok-soft: #dff2e7;
  --bad: #9e2328;
  --bad-soft: #fce6e6;
  --grey-soft: #e6ecea;
  --deep: #102428;
  --deep-ink: #eaf2f3;
  --deep-dim: #a5bec2;
  --deep-line: #233c41;
  --radius: .375rem;
  --shadow: 0 1px 2px rgba(16, 33, 36, .07), 0 6px 18px rgba(16, 33, 36, .07);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0b1416;
    --surface: #132024;
    --sunk: #0e191c;
    --ink: #e6f0f2;
    --ink-2: #b2c6ca;
    --ink-3: #8aa1a6;
    --line: #26393e;
    --line-2: #1b2b2f;
    --action: #6ecfdb;
    --action-ink: #061d21;
    --action-soft: #143036;
    --ai: #c5b6ff;
    --ai-soft: #251f40;
    --wait: #e3ad3b;
    --wait-soft: #38290d;
    --wait-ink: #f3d184;
    --ok: #6dd59c;
    --ok-soft: #143323;
    --bad: #ff9999;
    --bad-soft: #3d1c1e;
    --grey-soft: #1a2a2e;
    --deep: #081012;
    --deep-ink: #eaf2f3;
    --deep-dim: #9cb6ba;
    --deep-line: #1d2f34;
    --shadow: 0 1px 2px rgba(0, 0, 0, .38), 0 6px 18px rgba(0, 0, 0, .32);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 1rem/1.55 var(--sans); }
h1, h2, h3 { font-weight: 650; line-height: 1.18; margin: 0; letter-spacing: -.015em; }
p { margin: 0; }
a { color: var(--action); text-underline-offset: .15em; }
code, .mono { font-family: var(--mono); font-size: .92em; font-variant-numeric: tabular-nums; }
:focus-visible { outline: .19rem solid var(--action); outline-offset: .15rem; border-radius: .2rem; }
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }

.btn { display: inline-flex; align-items: center; gap: .4rem; font: inherit; font-weight: 600; cursor: pointer;
       padding: .6rem 1.1rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface);
       color: var(--ink); text-decoration: none; line-height: 1.2; }
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--action); border-color: var(--action); color: var(--action-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.small { padding: .35rem .7rem; font-size: .85rem; }
.btn.danger { color: var(--bad); border-color: var(--bad); }
.btn[disabled] { opacity: .5; cursor: default; }

.mark { display: inline-flex; align-items: center; gap: .55rem; font-weight: 700; font-size: 1.1rem;
        letter-spacing: -.01em; color: inherit; text-decoration: none; }
.mark svg { width: 1.65rem; height: 1.65rem; flex: none; }

/* Every chip carries a word; colour and border style reinforce it.
   AI-originated checks and scores use a dashed border; human decisions use a solid one. */
.chip { display: inline-block; font-size: .75rem; font-weight: 600; line-height: 1; padding: .3rem .5rem;
        border-radius: .25rem; background: var(--grey-soft); color: var(--ink-2); white-space: nowrap; border: 1px solid var(--line); }
.chip.wait { background: var(--wait-soft); color: var(--wait-ink); border-color: transparent; }
.chip.go { background: var(--action-soft); color: var(--action); border-color: transparent; }
.chip.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.chip.ai { background: var(--ai-soft); color: var(--ai); border: 1px dashed var(--ai); }

.demo-bar { background: var(--wait-soft); color: var(--wait-ink); font-size: .84rem; text-align: center;
            padding: .45rem 1rem; border-bottom: 1px solid var(--line); }
.demo-bar b { font-weight: 700; }
.demo-bar a { color: inherit; font-weight: 600; }
