/* Device Fleet Manager — shared tokens and base styles. Sizes in rem; follows the system light/dark setting.
   Rule of the palette: healthy is grey. Colour marks only what needs someone. */
:root {
  --bg: #eef0f2;
  --surface: #ffffff;
  --sunk: #e4e7ea;
  --ink: #14181d;
  --ink-2: #414b57;
  --ink-3: #5c6773;
  --line: #cfd4da;
  --line-2: #dfe3e7;
  --action: #0b6477;
  --action-ink: #ffffff;
  --action-soft: #dcecef;
  --warn: #8a5300;
  --warn-soft: #fbecd0;
  --bad: #b3261e;
  --bad-soft: #fbe3e0;
  --slab: #14181d;
  --slab-2: #1d232a;
  --slab-ink: #e6eaee;
  --slab-dim: #9aa5b1;
  --slab-line: #2f3842;
  --signal: #5cc8d7;
  --radius: .375rem;
  --shadow: 0 1px 2px rgba(20, 24, 29, .07), 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 {
    --bg: #0f1317;
    --surface: #171c22;
    --sunk: #12161b;
    --ink: #e6eaee;
    --ink-2: #b3bcc6;
    --ink-3: #8893a0;
    --line: #2a323b;
    --line-2: #212830;
    --action: #5cc8d7;
    --action-ink: #06222a;
    --action-soft: #143740;
    --warn: #f2b25c;
    --warn-soft: #3a2a10;
    --bad: #ff8f85;
    --bad-soft: #40201d;
    --slab: #0a0d10;
    --slab-2: #12161b;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 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-family: var(--sans); font-weight: 700; line-height: 1.15; margin: 0; letter-spacing: -.02em; }
p { margin: 0; }
a { color: var(--action); text-underline-offset: .15em; }
:focus-visible { outline: .2rem solid var(--action); outline-offset: .15rem; border-radius: .2rem; }
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }
.mono, code { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.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(--bad); }
.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.6rem; height: 1.6rem; flex: none; }

/* State chips. The glyph and the word carry the state; colour only repeats it. */
.chip { display: inline-flex; align-items: center; gap: .3rem; font-size: .75rem; font-weight: 600; line-height: 1;
        padding: .28rem .5rem; border-radius: .25rem; background: var(--sunk); color: var(--ink-2); white-space: nowrap;
        border: 1px solid var(--line-2); }
.chip::before { font-family: var(--mono); font-weight: 700; }
.chip.ok::before { content: "\2713"; }
.chip.run::before { content: "\25B6"; font-size: .6rem; }
.chip.idle::before { content: "\25CB"; }
.chip.end::before { content: "\2013"; }
.chip.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip.warn::before { content: "!"; }
.chip.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.chip.bad::before { content: "\2715"; }
.chip.run { background: var(--action-soft); color: var(--action); border-color: transparent; }

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

/* A rollout stage bar: succeeded is solid, failed is hatched, the rest is empty track. */
.bar { display: flex; height: .55rem; border-radius: .15rem; background: var(--line-2); overflow: hidden; min-width: 6rem; }
.bar i { display: block; height: 100%; background: var(--ink-3); }
.bar i.f { background: repeating-linear-gradient(135deg, var(--bad) 0 .2rem, transparent .2rem .35rem) var(--bad-soft); }
