
:root {
  --mist: #edf0f3;
  --paper: #ffffff;
  --ink: #0f1b2d;
  --slate: #51607a;
  --line: #cbd3de;
  --harbor: #1f4fd8;
  --harbor-dark: #173fae;
  --running: #0e7c4a;
  --warn: #b45309;
  --hot: #b42318;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
  --sans: "Segoe UI Variable Text", "Segoe UI", -apple-system, "Helvetica Neue", Roboto, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--mist); color: var(--ink);
  font-family: var(--sans); font-size: 1.0625rem; line-height: 1.55;
}
.bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: .9rem max(1.25rem, calc((100vw - 720px) / 2));
  border-bottom: 1px solid var(--line); background: var(--paper);
}
.brand { color: var(--ink); font-weight: 650; text-decoration: none; letter-spacing: -.01em; }
.bar nav { display: flex; gap: 1.25rem; align-items: center; }
.bar nav a, .link { color: var(--slate); background: none; border: 0; padding: .5rem 0; font: inherit; cursor: pointer; text-decoration: none; }
.bar nav a:hover, .link:hover { color: var(--ink); text-decoration: underline; }
main { max-width: 720px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
section { padding: 2rem 0; border-top: 1px solid var(--line); }
section.hero, section.narrow { border-top: 0; padding-top: 1rem; }
section.narrow { max-width: 28rem; }
h1 { font-size: clamp(2.4rem, 8vw, 3.6rem); line-height: 1.05; margin: 0 0 .5rem; font-weight: 700; letter-spacing: -.03em; }
section.narrow h1 { font-size: 2rem; letter-spacing: -.02em; }
h2 { font-size: 1.25rem; margin: 0 0 .75rem; font-weight: 650; letter-spacing: -.01em; }
.lead { color: var(--slate); max-width: 60ch; margin: 0 0 1.25rem; }
.muted { color: var(--slate); font-size: .95rem; }
code { font-family: var(--mono); font-size: .92em; background: #dfe5ec; padding: .1em .35em; border-radius: 4px; }

.status { display: flex; align-items: center; gap: .6rem; font-size: 1.25rem; font-weight: 600; margin: 0 0 1.5rem; }
.dot { width: .85rem; height: .85rem; border-radius: 50%; background: var(--slate); flex: none; }
.status.on { color: var(--running); }
.status.on .dot { background: var(--running); box-shadow: 0 0 0 4px rgba(14, 124, 74, .18); }
.status.off { color: var(--slate); }

.row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.row form { margin: 0; }
button, .button, input, textarea { font: inherit; }
button, .button {
  min-height: 2.75rem; padding: .55rem 1.1rem; border-radius: 8px; border: 1px solid var(--line);
  background: var(--paper); color: var(--ink); cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 600;
}
button:hover, .button:hover { border-color: var(--slate); }
button.primary { background: var(--harbor); border-color: var(--harbor); color: #fff; }
button.primary:hover { background: var(--harbor-dark); border-color: var(--harbor-dark); }
button.danger { color: var(--hot); }
button.link { min-height: 0; border: 0; background: none; font-weight: 400; padding: .5rem 0; }
:focus-visible { outline: 3px solid var(--harbor); outline-offset: 2px; }

.stack { display: grid; gap: 1.1rem; }
label { display: grid; gap: .35rem; font-weight: 600; }
input, textarea {
  width: 100%; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 8px;
  background: var(--paper); color: var(--ink); font-weight: 400;
}
textarea { font-family: var(--mono); font-size: .9rem; resize: vertical; }

.note { margin: 0 0 1.25rem; padding: .8rem 1rem; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); }
.note.ok { border-color: #8fd0b0; background: #e8f6ee; }
.note.error { border-color: #e5a29b; background: #fdecea; }

.meter { margin-bottom: 1.25rem; }
.meter-head { display: flex; justify-content: space-between; gap: 1rem; font-weight: 600; margin-bottom: .35rem; }
.meter-head span:last-child { font-weight: 400; color: var(--slate); }
.track {
  position: relative; height: 1.1rem; border-radius: 6px; overflow: hidden; background: #dbe2ea;
}
.track::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to right, transparent calc(25% - 1px), rgba(15,27,45,.22) calc(25% - 1px) 25%, transparent 25%,
    transparent calc(50% - 1px), rgba(15,27,45,.22) calc(50% - 1px) 50%, transparent 50%,
    transparent calc(75% - 1px), rgba(15,27,45,.22) calc(75% - 1px) 75%, transparent 75%);
}
.fill { height: 100%; border-radius: 6px 0 0 6px; }
.fill.ok { background: var(--harbor); }
.fill.warn { background: var(--warn); }
.fill.hot { background: var(--hot); }

.command {
  display: flex; gap: .75rem; align-items: center; justify-content: space-between;
  background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: .6rem .6rem .6rem 1rem;
}
.command code { background: none; padding: 0; overflow-x: auto; white-space: nowrap; font-size: .95rem; }

.list { list-style: none; margin: 1.5rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; align-items: center; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.list li strong { display: block; }

@media (max-width: 520px) {
  .command { flex-direction: column; align-items: stretch; }
  .row > * { flex: 1 1 auto; }
  .row form, .row form button, .row .button { width: 100%; }
}
.p0 { width: 0%; }
.p1 { width: 1%; }
.p2 { width: 2%; }
.p3 { width: 3%; }
.p4 { width: 4%; }
.p5 { width: 5%; }
.p6 { width: 6%; }
.p7 { width: 7%; }
.p8 { width: 8%; }
.p9 { width: 9%; }
.p10 { width: 10%; }
.p11 { width: 11%; }
.p12 { width: 12%; }
.p13 { width: 13%; }
.p14 { width: 14%; }
.p15 { width: 15%; }
.p16 { width: 16%; }
.p17 { width: 17%; }
.p18 { width: 18%; }
.p19 { width: 19%; }
.p20 { width: 20%; }
.p21 { width: 21%; }
.p22 { width: 22%; }
.p23 { width: 23%; }
.p24 { width: 24%; }
.p25 { width: 25%; }
.p26 { width: 26%; }
.p27 { width: 27%; }
.p28 { width: 28%; }
.p29 { width: 29%; }
.p30 { width: 30%; }
.p31 { width: 31%; }
.p32 { width: 32%; }
.p33 { width: 33%; }
.p34 { width: 34%; }
.p35 { width: 35%; }
.p36 { width: 36%; }
.p37 { width: 37%; }
.p38 { width: 38%; }
.p39 { width: 39%; }
.p40 { width: 40%; }
.p41 { width: 41%; }
.p42 { width: 42%; }
.p43 { width: 43%; }
.p44 { width: 44%; }
.p45 { width: 45%; }
.p46 { width: 46%; }
.p47 { width: 47%; }
.p48 { width: 48%; }
.p49 { width: 49%; }
.p50 { width: 50%; }
.p51 { width: 51%; }
.p52 { width: 52%; }
.p53 { width: 53%; }
.p54 { width: 54%; }
.p55 { width: 55%; }
.p56 { width: 56%; }
.p57 { width: 57%; }
.p58 { width: 58%; }
.p59 { width: 59%; }
.p60 { width: 60%; }
.p61 { width: 61%; }
.p62 { width: 62%; }
.p63 { width: 63%; }
.p64 { width: 64%; }
.p65 { width: 65%; }
.p66 { width: 66%; }
.p67 { width: 67%; }
.p68 { width: 68%; }
.p69 { width: 69%; }
.p70 { width: 70%; }
.p71 { width: 71%; }
.p72 { width: 72%; }
.p73 { width: 73%; }
.p74 { width: 74%; }
.p75 { width: 75%; }
.p76 { width: 76%; }
.p77 { width: 77%; }
.p78 { width: 78%; }
.p79 { width: 79%; }
.p80 { width: 80%; }
.p81 { width: 81%; }
.p82 { width: 82%; }
.p83 { width: 83%; }
.p84 { width: 84%; }
.p85 { width: 85%; }
.p86 { width: 86%; }
.p87 { width: 87%; }
.p88 { width: 88%; }
.p89 { width: 89%; }
.p90 { width: 90%; }
.p91 { width: 91%; }
.p92 { width: 92%; }
.p93 { width: 93%; }
.p94 { width: 94%; }
.p95 { width: 95%; }
.p96 { width: 96%; }
.p97 { width: 97%; }
.p98 { width: 98%; }
.p99 { width: 99%; }
.p100 { width: 100%; }
