/* Copyright (c) 2026 Brian Willard */
:root {
  --ground:#F5F4F1; --surface:#FFF; --ink:#14181F; --ink-soft:#48505C; --muted:#8A877F;
  --line:#E2E0D9; --line-firm:#C9C6BC; --accent:#1F3A5F; --accent-ink:#FFF;
  --state:#8A877F; --state-wash:#EDEBE5; --bad:#8C2F2F; --bad-wash:#F7E9E9;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground:#101317; --surface:#171B21; --ink:#ECEEF1; --ink-soft:#AEB6C0; --muted:#82878F;
    --line:#242931; --line-firm:#363C46; --accent:#8FB3E0; --accent-ink:#11161D;
    --state:#82878F; --state-wash:#1B1F25; --bad:#E08585; --bad-wash:#2B1717;
  }
}
:root[data-theme="dark"] {
  --ground:#101317; --surface:#171B21; --ink:#ECEEF1; --ink-soft:#AEB6C0; --muted:#82878F;
  --line:#242931; --line-firm:#363C46; --accent:#8FB3E0; --accent-ink:#11161D;
  --state:#82878F; --state-wash:#1B1F25; --bad:#E08585; --bad-wash:#2B1717;
}
body[data-state="stopped"]  { --state:#8A877F; --state-wash:#EDEBE5; }
body[data-state="starting"], body[data-state="stopping"] { --state:#9A6A16; --state-wash:#F7EFDC; }
body[data-state="ready"]    { --state:#2C7A52; --state-wash:#E7F2EB; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body[data-state="stopped"]  { --state:#82878F; --state-wash:#1B1F25; }
  :root:not([data-theme="light"]) body[data-state="starting"],
  :root:not([data-theme="light"]) body[data-state="stopping"] { --state:#DCAE5A; --state-wash:#2A2113; }
  :root:not([data-theme="light"]) body[data-state="ready"]    { --state:#6FC89A; --state-wash:#142A1D; }
}
:root[data-theme="dark"] body[data-state="stopped"]  { --state:#82878F; --state-wash:#1B1F25; }
:root[data-theme="dark"] body[data-state="starting"],
:root[data-theme="dark"] body[data-state="stopping"] { --state:#DCAE5A; --state-wash:#2A2113; }
:root[data-theme="dark"] body[data-state="ready"]    { --state:#6FC89A; --state-wash:#142A1D; }

* { box-sizing:border-box; }
body {
  margin:0; min-height:100vh; background:var(--ground); color:var(--ink);
  font-family:Figtree,ui-sans-serif,system-ui,-apple-system,sans-serif; line-height:1.5;
  -webkit-font-smoothing:antialiased; display:flex; flex-direction:column;
  transition:background .5s ease;
}
.bar {
  display:flex; align-items:center; justify-content:space-between; gap:1rem;
  padding:1.5rem clamp(1.5rem,5vw,4rem); border-bottom:1px solid var(--line);
}
.brand { display:flex; align-items:center; gap:.6rem; font-weight:500; font-size:.9rem; color:var(--ink-soft); }
.brand .mark {
  width:1.5rem; height:1.5rem; border-radius:5px; background:var(--accent); color:var(--accent-ink);
  display:grid; place-items:center; font-size:.62rem; font-weight:600;
}
.who { font-size:.85rem; color:var(--muted); display:flex; align-items:center; gap:.9rem; }
.who button { background:none; border:0; color:var(--muted); font:inherit; font-size:.85rem; cursor:pointer; padding:0; }
.who button:hover { color:var(--ink); text-decoration:underline; }

main {
  flex:1; display:grid; align-content:center; gap:clamp(2rem,5vw,3.5rem);
  padding:clamp(2.5rem,7vw,5.5rem) clamp(1.5rem,5vw,4rem);
  max-width:78rem; width:100%; margin:0 auto;
}
.eyebrow {
  font-family:"IBM Plex Mono",ui-monospace,monospace; font-size:.74rem;
  letter-spacing:.16em; text-transform:uppercase; color:var(--muted);
}
h1 {
  font-family:"Instrument Serif",ui-serif,Georgia,serif; font-weight:400;
  font-size:clamp(2.5rem,8vw,5rem); line-height:1; letter-spacing:-.02em; margin:0;
  text-wrap:balance;
}
.headline { display:flex; flex-direction:column; gap:.6rem; }
.status { display:flex; align-items:baseline; flex-wrap:wrap; gap:.55rem 1.1rem; }
.status .word {
  font-size:clamp(1.4rem,4vw,2.4rem); font-weight:500; letter-spacing:-.02em; color:var(--state);
  display:inline-flex; align-items:center; gap:.7rem; transition:color .4s ease;
}
.status .dot { width:.6em; height:.6em; border-radius:50%; background:currentColor; flex:none; }
body[data-state="starting"] .dot, body[data-state="stopping"] .dot { animation:pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.2} }
@media (prefers-reduced-motion:reduce) { .dot { animation:none !important } }
.status .note { color:var(--ink-soft); font-size:clamp(.95rem,1.6vw,1.05rem); }

.actions { display:flex; flex-wrap:wrap; gap:.85rem; align-items:center; }
button, .btn {
  font-family:inherit; cursor:pointer; border-radius:10px; border:1px solid transparent;
  transition:background .15s,border-color .15s,color .15s,opacity .15s;
}
button:focus-visible, input:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.primary { background:var(--accent); color:var(--accent-ink); font-size:1.05rem; font-weight:600; padding:1rem 2rem; }
.primary:hover:not(:disabled) { filter:brightness(1.14); }
.primary:disabled { opacity:.45; cursor:default; }
.ghost {
  background:transparent; color:var(--ink-soft); border-color:var(--line-firm);
  font-size:.95rem; font-weight:500; padding:.8rem 1.4rem;
}
.ghost:hover:not(:disabled) { border-color:var(--ink-soft); color:var(--ink); }
.ghost:disabled { opacity:.35; cursor:default; }

.figures {
  display:grid; grid-template-columns:repeat(auto-fit,minmax(11rem,1fr)); gap:1px;
  background:var(--line); border:1px solid var(--line); border-radius:12px;
  overflow:hidden; max-width:52rem;
}
.figure { background:var(--ground); padding:1.1rem 1.25rem; display:flex; flex-direction:column; gap:.3rem; }
.figure dt {
  font-family:"IBM Plex Mono",monospace; font-size:.68rem; letter-spacing:.12em;
  text-transform:uppercase; color:var(--muted);
}
.figure dd { margin:0; font-size:1.25rem; font-weight:500; font-variant-numeric:tabular-nums; }

.machines { display:flex; flex-direction:column; gap:1rem; max-width:52rem; }
.machine {
  background:var(--surface); border:1px solid var(--line); border-radius:12px;
  padding:1.25rem 1.4rem; display:flex; flex-wrap:wrap; align-items:center;
  justify-content:space-between; gap:1rem;
}
.machine h2 { margin:0; font-size:1.15rem; font-weight:600; }
.machine .meta { display:flex; flex-direction:column; gap:.25rem; }
.machine .sub { font-size:.85rem; color:var(--muted); font-variant-numeric:tabular-nums; }
.machine .acts { display:flex; gap:.6rem; flex-wrap:wrap; }
.machine .acts button { font-size:.9rem; padding:.6rem 1.1rem; }

form.signin { display:flex; flex-direction:column; gap:1rem; max-width:24rem; }
input[type=email] {
  font:inherit; padding:.9rem 1rem; border-radius:10px; border:1px solid var(--line-firm);
  background:var(--surface); color:var(--ink); width:100%;
}
.msg { border-radius:10px; padding:.85rem 1.1rem; font-size:.95rem; max-width:40rem; }
.msg.ok  { background:var(--state-wash); color:var(--state); }
.msg.bad { background:var(--bad-wash); color:var(--bad); }
.hide { display:none !important; }

footer {
  border-top:1px solid var(--line); padding:1.5rem clamp(1.5rem,5vw,4rem);
  display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:1rem;
  font-size:.88rem; color:var(--ink-soft);
}
footer a { color:var(--accent); font-weight:600; text-decoration:none; }
footer a:hover { text-decoration:underline; }
footer .fine { color:var(--muted); font-size:.8rem; }
