/* COA Planner — shared tokens and base styles. Sizes in rem. Neutral grey ground; colour is kept for status.
   Light first; dark follows the system. The chrome (--rail) is dark in both. */
:root {
  --ground: #eceef1;
  --surface: #ffffff;
  --sunk: #e2e5e9;
  --ink: #14181d;
  --ink-2: #3d4651;
  --ink-3: #5c6672;
  --line: #c9ced5;
  --line-2: #dde1e6;
  --action: #0b6770;
  --action-ink: #ffffff;
  --action-soft: #dceff1;
  --ok: #1a6e3c;
  --ok-soft: #dff1e5;
  --wait: #7a4f00;
  --wait-soft: #fbefd0;
  --wait-mark: #c98a00;
  --bad: #a8241c;
  --bad-soft: #f9e2df;
  --off-soft: #e2e5e9;
  --rail: #1a1f26;
  --rail-2: #252c35;
  --rail-ink: #e6eaef;
  --rail-dim: #9aa5b1;
  --rail-line: #36404b;
  --rail-action: #56c8d2;
  --radius: .25rem;
  --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, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0f1318;
    --surface: #171c23;
    --sunk: #12171d;
    --ink: #e6eaef;
    --ink-2: #b4bdc8;
    --ink-3: #8c97a4;
    --line: #2f3843;
    --line-2: #242c36;
    --action: #56c8d2;
    --action-ink: #06272b;
    --action-soft: #143539;
    --ok: #5fd08a;
    --ok-soft: #14301f;
    --wait: #f2b53a;
    --wait-soft: #382b0c;
    --wait-mark: #f2b53a;
    --bad: #ff8478;
    --bad-soft: #3d1c19;
    --off-soft: #242c36;
    --rail: #0a0d11;
    --rail-2: #171c23;
    --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(--ground); color: var(--ink); font: 1rem/1.5 var(--sans); }
h1, h2, h3 { font-family: var(--sans); font-weight: 750; line-height: 1.12; margin: 0; letter-spacing: -.015em; }
p { margin: 0; }
a { color: var(--action); text-underline-offset: .15em; }
:focus-visible { outline: .19rem solid var(--action); outline-offset: .13rem; }
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }

.label { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.btn { display: inline-flex; align-items: center; gap: .4rem; font: inherit; font-weight: 650; cursor: pointer;
       padding: .6rem 1.05rem; border-radius: var(--radius); border: 1px solid var(--ink-3); background: var(--surface);
       color: var(--ink); text-decoration: none; line-height: 1.2; }
.btn:hover { border-color: var(--ink); }
.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(--bad); border-color: var(--bad); }
.btn[disabled] { opacity: .5; cursor: default; }

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

/* Status: a word, a shape and a colour, never colour alone. */
.chip { display: inline-flex; align-items: center; gap: .3rem; font-size: .74rem; font-weight: 650; line-height: 1;
        padding: .28rem .5rem; border-radius: .2rem; background: var(--off-soft); color: var(--ink-2); white-space: nowrap; }
.chip::before { content: "○"; font-size: .7em; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.ok::before { content: "●"; }
.chip.wait { background: var(--wait-soft); color: var(--wait); }
.chip.wait::before { content: "▲"; }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.bad::before { content: "◆"; }
.chip.go { background: var(--action-soft); color: var(--action); }
.chip.go::before { content: "▶"; }
.chip.ai { background: none; border: 1px dashed var(--ink-3); color: var(--ink-2); padding: .22rem .45rem; }
.chip.ai::before, .chip.plain::before { content: none; }

.demo-bar { background: var(--rail); color: var(--rail-dim); font-size: .8rem; text-align: center; padding: .4rem 1rem;
            border-bottom: 1px solid var(--rail-line); }
.demo-bar b { color: var(--rail-ink); font-weight: 650; }
.demo-bar a { color: var(--rail-action); }
