:root {
  --bg: #f4f5f7; --card: #ffffff; --text: #16181d; --muted: #5d6573; --line: #dfe3ea;
  --accent: #e5a00d; --accent-text: #1b1400;
  --ok: #1f9d55; --warn: #d98a00; --off: #8b93a1; --bad: #d64545;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101216; --card: #181b21; --text: #eceef2; --muted: #9aa3b2; --line: #2a2f38;
    --ok: #3ecf7a; --warn: #f0a928; --off: #6b7482; --bad: #ef6b6b;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh; display: grid; place-items: center; padding: 16px;
  background: var(--bg); color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.card {
  width: 100%; max-width: 440px; background: var(--card);
  border: 1px solid var(--line); border-radius: 16px; padding: 28px 24px;
}
h1 { margin: 0 0 6px; font-size: 1.4rem; letter-spacing: -.01em; }
.sub, .fine, .detail, .note, .who { color: var(--muted); }
.sub { margin: 0 0 22px; }
.fine { font-size: .85rem; margin: 16px 0 0; }
.top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 22px; }
.top h1 { margin: 0; }
.signout { display: flex; gap: 10px; align-items: baseline; margin: 0; font-size: .85rem; }
.link { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; }
.status { display: flex; gap: 14px; align-items: center; padding: 14px 0 18px; }
.orb { flex: none; width: 16px; height: 16px; border-radius: 50%; background: var(--off); }
.orb.ready { background: var(--ok); box-shadow: 0 0 0 5px color-mix(in srgb, var(--ok) 22%, transparent); }
.orb.asleep { background: var(--off); }
.orb.booting, .orb.shutting_down { background: var(--warn); animation: pulse 1.4s ease-in-out infinite; }
.orb.unknown { background: var(--bad); }
.orb.checking { background: var(--off); opacity: .5; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--warn) 25%, transparent); } }
@media (prefers-reduced-motion: reduce) { .orb { animation: none !important; } }
.headline { font-size: 1.1rem; font-weight: 600; }
.detail { font-size: .92rem; }
.bar { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 0 0 18px; }
.bar span { display: block; height: 100%; width: 0; background: var(--warn); transition: width .8s linear; }
.btn {
  display: block; width: 100%; text-align: center; text-decoration: none; cursor: pointer;
  padding: 13px 16px; border-radius: 10px; border: 1px solid var(--line);
  background: transparent; color: var(--text); font: inherit; font-weight: 600;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.primary:hover { filter: brightness(1.06); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn:focus-visible, .link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.links { display: grid; gap: 10px; margin-top: 4px; }
.shutwrap { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.btn.quiet { color: var(--muted); font-weight: 500; }
.btn.confirm { border-color: var(--bad); color: var(--bad); font-weight: 600; }
.note { min-height: 1.4em; font-size: .9rem; margin: 10px 0 0; }
.back { font-size: .85rem; }
.events { list-style: none; margin: 0; padding: 0; }
.event { padding: 12px 0; border-top: 1px solid var(--line); }
.event:first-child { border-top: 0; padding-top: 0; }
.event-label { font-weight: 600; }
.event-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; font-size: .85rem; color: var(--muted); overflow-wrap: anywhere; }
.event-detail { font-size: .85rem; color: var(--muted); }
[hidden] { display: none !important; }
