/* Fonts are the logo's own (Space Grotesk, JetBrains Mono; both SIL Open Font License),
   hosted here so the page loads nothing from anyone else. See fonts/README.txt. */
@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/space-grotesk-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* The logo is black and white, so the page is too. The only colour is the status light. */
:root {
  --bg: #0a0a0a;
  --ink: #ffffff;
  --muted: #a3a3a3;
  --line: rgba(255, 255, 255, 0.16);
  --button-hover: #d9d9d9;
  --up: #22c55e;
  --down: #f87171;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --ink: #0a0a0a;
    --muted: #595959;
    --line: rgba(10, 10, 10, 0.16);
    --button-hover: #333333;
    --up: #15803d;
    --down: #b91c1c;
  }
}

* { box-sizing: border-box; }

html { height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---- Front page ---- */

main {
  width: 100%;
  max-width: 22rem;
  margin: auto 0;
  text-align: center;
}

.mark {
  display: block;
  width: 8.5rem;
  height: auto;
  margin: 0 auto 1.5rem;
}

/* Wordmark. The negative right margin cancels the trailing letter-space so it sits centred. */
h1 {
  margin: 0 -0.16em 0 0;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: clamp(2rem, 10vw, 2.75rem);
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
}

.sub {
  margin: 0.7rem -0.54em 0 0;
  font-family: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.54em;
  line-height: 1.4;
  text-transform: uppercase;
}

hr {
  width: 100%;
  height: 1px;
  margin: 2rem 0;
  border: 0;
  background: var(--line);
}

.button {
  display: block;
  padding: 0.95rem 1.25rem;
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: background-color 120ms ease;
}

.button:hover { background: var(--button-hover); }

.button:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
  border-radius: 10px;
}

.hint {
  margin: 0.9rem 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}

/* Status light. The words carry the meaning; the colour only backs them up. */
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1.5rem 0 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

.status[hidden] { display: none; }

.dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--muted);
  flex: none;
}

.status[data-state="up"] .dot { background: var(--up); }
.status[data-state="down"] .dot { background: var(--down); }
.status[data-state="down"] { color: var(--ink); }

footer {
  width: 100%;
  padding-top: 2rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--muted);
}

footer p { margin: 0.2rem 0 0; }

/* ---- Help page ---- */

.doc {
  max-width: 34rem;
  margin: 0;
  padding: 1rem 0 2rem;
  text-align: left;
}

.home {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
}

.mark.small {
  width: 2.5rem;
  margin: 0;
}

.doc h1 {
  margin: 0 0 0.5rem;
  font-size: 2rem;
  letter-spacing: 0.08em;
}

.doc h2 {
  margin: 2.25rem 0 0.5rem;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
}

.doc p,
.doc ol,
.doc ul {
  margin: 0 0 0.75rem;
  color: var(--muted);
}

.doc ol,
.doc ul { padding-left: 1.25rem; }

.doc li { margin-bottom: 0.35rem; }

.doc strong { color: var(--ink); font-weight: 600; }

.doc a { color: var(--ink); }

.doc .back {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
