/* Case Intel — shared tokens and base styles. Sizes in rem. Light and dark both drawn; the system picks. */
:root {
  --bg: #f3f4f1;
  --surface: #ffffff;
  --sunk: #e9ebe7;
  --ink: #14181d;
  --ink-2: #3d4651;
  --ink-3: #5a6470;
  --line: #cdd2cd;
  --line-2: #e1e4e0;
  --action: #0b6a6a;
  --action-ink: #ffffff;
  --action-soft: #dcefed;
  --amber: #8a5a00;
  --amber-soft: #fbefd6;
  --green: #1b6e45;
  --green-soft: #dff1e6;
  --red: #b02a20;
  --red-soft: #fae4e1;
  --grey-soft: #e6e8e4;
  --slab: #12161b;
  --slab-2: #1a2027;
  --slab-ink: #e6e9ec;
  --slab-dim: #9aa5b1;
  --slab-line: #2c353f;
  --teal-on-slab: #58c7bd;
  --radius: .375rem;
  --shadow: 0 1px 2px rgba(20, 24, 29, .08), 0 6px 18px rgba(20, 24, 29, .07);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1114;
    --surface: #161b21;
    --sunk: #11151a;
    --ink: #e6e9ec;
    --ink-2: #b6bfc9;
    --ink-3: #8e99a6;
    --line: #2d3640;
    --line-2: #222a32;
    --action: #58c7bd;
    --action-ink: #06201e;
    --action-soft: #143532;
    --amber: #f2d08f;
    --amber-soft: #3a2c10;
    --green: #62d29b;
    --green-soft: #153526;
    --red: #ff9087;
    --red-soft: #41201d;
    --grey-soft: #242c35;
    --slab: #0a0d10;
    --slab-2: #12161b;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 18px rgba(0, 0, 0, .3);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1rem/1.55 var(--sans); }
h1, h2, h3 { font-weight: 700; line-height: 1.15; 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; }
:focus-visible { outline: .18rem solid var(--action); outline-offset: .15rem; border-radius: .2rem; }
.slab :focus-visible { outline-color: var(--teal-on-slab); }
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }

.label { font-family: var(--mono); font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }

.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.1); }
.btn.small { padding: .32rem .65rem; font-size: .82rem; }
.btn.danger { color: var(--red); }
.btn[disabled] { opacity: .5; cursor: default; }

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

/* a state is always a word; the colour only repeats it */
.chip { display: inline-block; font-family: var(--mono); font-size: .7rem; font-weight: 600; line-height: 1; letter-spacing: .03em;
        text-transform: uppercase; padding: .28rem .45rem; border-radius: .25rem; background: var(--grey-soft); color: var(--ink-2);
        white-space: nowrap; }
.chip.wait { background: var(--amber-soft); color: var(--amber); }
.chip.go { background: var(--action-soft); color: var(--action); }
.chip.ok { background: var(--green-soft); color: var(--green); }
.chip.bad { background: var(--red-soft); color: var(--red); }

/* confidence: three bars and the word */
.conf { display: inline-flex; align-items: center; gap: .4rem; font-size: .85em; white-space: nowrap; }
.conf span { display: inline-flex; gap: .12rem; align-items: flex-end; }
.conf i { width: .28rem; background: var(--line); border-radius: 1px; }
.conf i:nth-child(1) { height: .45rem; } .conf i:nth-child(2) { height: .7rem; } .conf i:nth-child(3) { height: .95rem; }
.conf i.on { background: currentColor; }

.demo-bar { background: var(--amber-soft); color: var(--amber); font-size: .82rem; text-align: center; padding: .4rem 1rem; }
.demo-bar a { color: inherit; }
