/* jbhosting.cz - one stylesheet for the page and the 404, no fonts or
   scripts from anywhere (the vhost's CSP allows only files from here) */
:root {
  --bg: #f3f2ee;
  --fg: #1c2225;
  --muted: #5b666b;
  --line: #d8d5cb;
  --accent: #0d6b63;
  --ok: #1f8a4c;
  --warn: #a35f00;
  --rack: #1f272b;
  --rack-edge: #364248;
  --vent: #12181b;
  --led-ok: #3ddc84;
  --led-busy: #f5b03c;
  --led-idle: #3b464c;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101416;
    --fg: #e2e7e5;
    --muted: #94a1a5;
    --line: #283236;
    --accent: #5fd6c8;
    --ok: #5fd68f;
    --warn: #f0b350;
    --rack: #192024;
    --rack-edge: #2d383e;
    --vent: #0a0d0f;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  display: grid;
  place-items: center;
  padding-inline: 20px;
  padding-block: 48px;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

main {
  width: 100%;
  max-width: 34rem;
  display: grid;
  gap: 1.75rem;
}

header { display: grid; gap: 0.35rem; }

h1 {
  margin: 0;
  font-size: clamp(2.3rem, 8vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

p { margin: 0; }

.tagline { font-size: 1.15rem; color: var(--muted); }

.small { font-size: 0.9rem; color: var(--muted); }

code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9em; }

a { color: var(--accent); text-underline-offset: 3px; }

/* A few rack units with blinking LEDs */
.rack {
  width: min(100%, 20rem);
  display: grid;
  gap: 5px;
  padding: 8px;
  background: var(--rack);
  border: 1px solid var(--rack-edge);
  border-radius: 7px;
}

.unit {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 24px;
  padding-inline: 10px;
  border: 1px solid var(--rack-edge);
  border-radius: 3px;
}

.led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--led-ok);
  box-shadow: 0 0 5px var(--led-ok);
}

.led.busy {
  background: var(--led-busy);
  box-shadow: 0 0 5px var(--led-busy);
  animation: blink 0.9s steps(1, end) infinite;
}

.led.late { animation-duration: 1.3s; }
.led.later { animation-duration: 0.6s; }

.led.idle { background: var(--led-idle); box-shadow: none; }

.vent {
  flex: 1;
  height: 6px;
  margin-left: 12px;
  border-radius: 2px;
  background: repeating-linear-gradient(90deg, var(--vent) 0 5px, transparent 5px 9px);
}

@keyframes blink { 50% { opacity: 0.2; } }

@media (prefers-reduced-motion: reduce) {
  .led.busy { animation: none; }
}

/* The status board */
.status {
  margin: 0;
  border-top: 1px solid var(--line);
  font: 0.95rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.status div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.5rem;
  border-bottom: 1px solid var(--line);
}

.status dt { color: var(--muted); }

.status dd { margin: 0; text-align: right; }

.status code { font-size: 1em; }

.status .ok { color: var(--ok); }
.status .ok::before { content: "● "; }

.status .warn { color: var(--warn); }
