/* Wheelmachine status: one page, the family of wheelmachine.ai. The state is said in words with an icon beside it,
   in the fixed status colours (good, critical) and a grey for what is not known; never by colour alone. */
:root {
  --paper: #fffaf4; --card: #ffffff; --cream: #fff3e6;
  --ink: #1b2140; --ink-2: #3d4566; --muted: #5f6684;
  --line: rgba(27, 33, 64, .12); --line-2: rgba(27, 33, 64, .22);
  --coral: #ff6b45; --coral-soft: #ffe2d6; --sky: #4a90ff;
  --good: #0ca30c; --good-soft: #dcf5dc; --bad: #d03b3b; --bad-soft: #fbe1e1; --unknown: #858ba3; --unknown-soft: #eceef4;
  --none: #ebe6de;
  --display: 'Bricolage Grotesque', 'Geist', ui-sans-serif, system-ui, sans-serif;
  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16.5px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--coral); text-decoration-thickness: 2px; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 8px; }
code { font-family: var(--mono); font-size: .88em; background: var(--card); border: 1px solid var(--line-2); border-radius: 6px; padding: .05em .35em; }
h1, h2 { font-family: var(--display); letter-spacing: -.02em; margin: 0; }
p { margin: 0 0 12px; }

.top { max-width: 860px; margin: 0 auto; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.brand .mark { width: 30px; height: 30px; }
.brand .tag { font-family: var(--sans); font-weight: 600; font-size: 12.5px; padding: 2px 9px; border: 2px solid var(--ink); border-radius: 999px; background: var(--coral-soft); }
.docs { font-weight: 500; text-decoration: none; color: var(--ink-2); }
.docs:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--coral); }
.wrap { max-width: 860px; margin: 0 auto; padding: 4px 20px 56px; }

/* the state, now */
.now { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 26px 26px 24px; background: var(--card);
  border: 2px solid var(--ink); border-radius: 22px; box-shadow: 0 5px 0 var(--ink); }
.kicker { font-weight: 600; font-size: 13.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.now h1 { display: flex; align-items: center; gap: 14px; font-weight: 800; font-size: clamp(36px, 7vw, 58px); line-height: 1.02; margin-bottom: 12px; }
.icon { flex: none; width: .82em; height: .82em; border-radius: 50%; border: 3px solid var(--ink); display: grid; place-items: center; background: var(--unknown-soft); }
.icon::before { content: ""; display: block; width: 46%; height: 46%; border-radius: 50%; background: var(--unknown); }
.is-checking .icon::before { animation: pulse 1.2s ease-in-out infinite; }
.is-good .icon { background: var(--good); }
.is-good .icon::before { width: 46%; height: 24%; border-radius: 0; background: none; border-left: 4px solid #fff; border-bottom: 4px solid #fff; transform: translateY(-15%) rotate(-45deg); }
.is-bad .icon { background: var(--bad); }
.is-bad .icon::before { width: 50%; height: 50%; border-radius: 0; background:
  linear-gradient(45deg, transparent 42%, #fff 42%, #fff 58%, transparent 58%), linear-gradient(-45deg, transparent 42%, #fff 42%, #fff 58%, transparent 58%); }
.is-unknown .icon { background: var(--unknown); }
.is-unknown .icon::before { content: "?"; width: auto; height: auto; border-radius: 0; background: none; color: #fff; font: 800 .56em/1 var(--display); }
@keyframes pulse { 50% { opacity: .3; } }
.said { font-size: 17.5px; color: var(--ink-2); margin: 0; }
.wm-char { width: 150px; height: auto; overflow: visible; }
.wm-led { fill: var(--unknown); }
.is-good .wm-led { fill: #6ff2c4; }
.is-bad .wm-led { fill: var(--bad); }
.eyes-flat, .mouth-flat { display: none; }
.is-bad .eyes-open, .is-bad .mouth-smile { display: none; }
.is-bad .eyes-flat, .is-bad .mouth-flat { display: inline; }
.wm-body { transform-box: fill-box; transform-origin: center; }
.wm-wheel { transform-box: fill-box; transform-origin: center; }
.is-good .wm-body { animation: bob 1.8s ease-in-out infinite; }
.is-good .wm-wheel { animation: roll 3.2s linear infinite; }
@keyframes bob { 50% { transform: translateY(-3px); } }
@keyframes roll { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .wm-body, .wm-wheel, .icon::before { animation: none !important; } }
@media (max-width: 560px) {
  .now { grid-template-columns: minmax(0, 1fr); padding: 20px 18px; }
  .wm-char { order: -1; width: 104px; }
}

/* the history */
.card { margin-top: 22px; padding: 20px 22px 20px; background: var(--card); border: 2px solid var(--ink); border-radius: 20px; box-shadow: 0 4px 0 var(--ink); }
.card h2 { font-size: 21px; font-weight: 700; }
.card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 18px; margin-bottom: 16px; }
.keys { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; font-size: 13.5px; color: var(--ink-2); }
.key { display: inline-flex; align-items: center; gap: 6px; }
.key::before { content: ""; width: 10px; height: 14px; border-radius: 3px 3px 0 0; background: var(--none); }
.k-good::before { background: var(--good); } .k-bad::before { background: var(--bad); } .k-unknown::before { background: var(--unknown); }
.strip { display: flex; align-items: flex-end; gap: 2px; height: 54px; }
.slot { flex: 1 1 0; max-width: 24px; height: 100%; padding: 0; border: 0; border-radius: 4px 4px 0 0; background: var(--none); cursor: default; }
.slot.good { background: var(--good); }
.slot.bad { background: var(--bad); }
.slot.unknown { background: var(--unknown); }
.slot.none { height: 36%; }
.slot:hover, .slot:focus-visible, .slot.on { outline: 2px solid var(--ink); outline-offset: 1px; border-radius: 4px 4px 0 0; }
.axis { display: flex; justify-content: space-between; margin-top: 6px; padding-top: 4px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.readout { margin: 12px 0 0; min-height: 1.6em; font-size: 15px; color: var(--ink-2); }
.readout b { color: var(--ink); font-weight: 600; }

/* the table */
.table-wrap { overflow-x: auto; margin-top: 12px; border: 1.5px solid var(--line-2); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font-size: 13px; font-weight: 600; color: var(--ink-2); background: var(--cream); padding: 9px 14px; border-bottom: 1.5px solid var(--line-2); }
td { padding: 9px 14px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
tr:first-child td { border-top: 0; }
td:first-child, td:last-child, th { white-space: nowrap; }
@media (max-width: 560px) { table { font-size: 14px; } th, td { padding: 8px 10px; } }
td .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; background: var(--unknown); }
td .dot.good { background: var(--good); } td .dot.bad { background: var(--bad); }

/* the words underneath */
.about { margin-top: 26px; font-size: 15px; color: var(--ink-2); }
.link { font: inherit; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-decoration-color: var(--coral); text-decoration-thickness: 2px; text-underline-offset: 3px; }
