/* Graphite, the site's palette (next/src/app/globals.css :root/.dark,
   #1126): white or blue-cast graphite ground, cards one step off it, slate
   hairlines, brand blue #0087ba. theme.js sets data-theme before first paint:
   the visitor's choice, else the system theme. */
@font-face {
  font-family: "Inter";
  src: url("/assets/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  color-scheme: light;
  --bg: #ffffff;
  --card: #f6f8fa;
  --line: #e2e7ec;
  --fg: #0f1720;
  --muted: #4a5663;
  --brand: #0087ba;
  --brand-fg: #ffffff;
  --up: #15803d;
  --down: #ef4444;
  --pending: #b45309;
  --maint: #2563eb;
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0f14;
  --card: #11171e;
  --line: #1e2731;
  --fg: #e6ecf2;
  --muted: #9aa7b4;
  --up: #4ade80;
  --pending: #fcd34d;
  --maint: #60a5fa;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }

.top { border-bottom: 1px solid var(--line); position: sticky; top: 0; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(8px); z-index: 1; }
.top-row { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand img { height: 30px; width: auto; }
.brand { display: flex; }
.logo-dark, [data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark { display: block; }
.theme-btn {
  display: grid; place-items: center; width: 32px; height: 32px; padding: 0;
  background: none; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); cursor: pointer;
}
.theme-btn:hover { color: var(--fg); }
.theme-btn svg { width: 16px; height: 16px; }
.icon-sun, [data-theme="dark"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: block; }
nav { display: flex; gap: 16px; align-items: center; font-size: 14px; }
nav a { color: var(--muted); }
nav a:hover { color: var(--fg); text-decoration: none; }
.langs { display: flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; }
.langs button {
  background: none; border: 0; color: var(--muted); font: inherit; font-size: 12px; font-weight: 500;
  padding: 3px 8px; border-radius: 6px; cursor: pointer;
}
.langs button:hover { color: var(--fg); }
.langs button[aria-pressed="true"] { color: var(--fg); background: var(--card); }
.btn { background: var(--brand); padding: 7px 14px; border-radius: 8px; font-weight: 500; }
.btn, .btn:hover { color: var(--brand-fg); }
.btn:hover { text-decoration: none; filter: brightness(1.1); }

.hero { padding: 48px 0 24px; }
h1 { font-size: clamp(26px, 4vw, 34px); line-height: 1.2; margin: 0 0 20px; font-weight: 650; letter-spacing: -0.02em; }
h2 { font-size: 18px; margin: 40px 0 12px; font-weight: 600; letter-spacing: -0.01em; }
.overall {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px; border-radius: 12px; font-size: 16px; font-weight: 600;
  background: var(--card); border: 1px solid var(--line);
}
/* One status class (app.js STATUS) sets --c; the dot, the label and the bars
   all read it. */
.up { --c: var(--up); }
.down { --c: var(--down); }
.pending { --c: var(--pending); }
.maint { --c: var(--maint); }
.overall .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--c, var(--muted)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c, transparent) 20%, transparent); }
.updated { color: var(--muted); font-size: 13px; margin: 10px 0 0; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.banner { margin-top: 12px; border-left: 3px solid var(--pending); }
.banner.danger { border-left-color: var(--down); }
.banner.maint { border-left-color: var(--maint); }
.banner h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.banner p { margin: 0; color: var(--muted); font-size: 14px; white-space: pre-line; }
.banner small { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }

#groups { margin-top: 12px; }
.group { padding: 0; overflow: hidden; }
.group + .group { margin-top: 12px; }
.group-title { padding: 12px 20px; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.monitor { padding: 16px 20px; }
.monitor + .monitor { border-top: 1px solid var(--line); }
.m-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.m-name { font-weight: 500; font-size: 15px; }
.m-state { font-size: 13px; font-weight: 500; color: var(--c, var(--muted)); }
.bars { display: flex; gap: 2px; height: 28px; margin: 10px 0 6px; }
.bar { flex: 1; border-radius: 2px; background: var(--c, var(--line)); min-width: 2px; }
.bar:hover { opacity: 0.7; }
.m-foot { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; gap: 12px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.uptimes span + span { margin-left: 14px; }
.uptimes b { color: var(--fg); font-weight: 600; }

.history .item { padding: 12px 0; border-top: 1px solid var(--line); }
.history .item:first-child { border-top: 0; padding-top: 0; }
.history .item:last-child { padding-bottom: 0; }
.history .item h3 { margin: 0; font-size: 15px; font-weight: 600; }
.history .item p { margin: 4px 0 0; color: var(--muted); font-size: 14px; white-space: pre-line; }
.empty { color: var(--muted); font-size: 14px; }

.foot { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; padding-top: 48px; padding-bottom: 32px; border-top: 1px solid var(--line); margin-top: 48px; }
.foot a { color: var(--muted); }

@media (max-width: 560px) {
  nav a:not(.btn) { display: none; }
  .monitor, .group-title, .card { padding-left: 16px; padding-right: 16px; }
}
