/* Dom Universe: one sky, seen at night (deep space) or by day (azure). Shared by every page. */
:root {
  --font: "Schibsted Grotesk", system-ui, sans-serif;
  --mono: "Martian Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --swap: 0.9s;
  color-scheme: dark;
  /* Night */
  --bg: #050a1c;
  --bg-2: #0b1739;
  --surface: rgba(146, 176, 255, 0.06);
  --ink: #eef3ff;
  --muted: #9eadcf;
  --line: rgba(190, 210, 255, 0.14);
  --line-strong: rgba(190, 210, 255, 0.36);
  --accent: #8cc8ff;
  --accent-ink: #050a1c;
  --live: #5fe0a6;
  --lock: #f2c46d;
  --past: #8e9bbb;
  --nav-bg: rgba(5, 10, 28, 0.72);
}
:root[data-theme="day"] {
  color-scheme: light;
  --bg: #e8f4ff;
  --bg-2: #4aa8ff;
  --surface: rgba(255, 255, 255, 0.55);
  --ink: #04193a;
  --muted: #2c4a73;
  --line: rgba(4, 25, 58, 0.14);
  --line-strong: rgba(4, 25, 58, 0.34);
  --accent: #0b5fd6;
  --accent-ink: #ffffff;
  --live: #0b8a55;
  --lock: #9a5a00;
  --past: #4b6185;
  --nav-bg: rgba(232, 244, 255, 0.72);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); scrollbar-color: var(--line-strong) transparent; transition: background-color var(--swap) var(--ease); }
body {
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  transition: color var(--swap) var(--ease);
}
::selection { background: var(--accent); color: var(--accent-ink); }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.mono { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: min(76rem, 100% - 2.5rem); margin-inline: auto; }

/* ---------- Top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 10;
  background: var(--nav-bg);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
  transition: background-color var(--swap) var(--ease), border-color var(--swap) var(--ease);
}
.bar .wrap { display: flex; align-items: center; gap: 1.5rem; height: 3.5rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 600; letter-spacing: -0.01em; text-decoration: none; margin-right: auto; }
.brand svg { width: 1.35rem; height: 1.35rem; }
.bar nav { display: flex; gap: 1.25rem; font-size: 0.9375rem; }
.bar nav a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
.bar nav a:hover, .bar nav a[aria-current] { color: var(--ink); }

/* Day / night switch: the sky's own two states. */
.sky-switch {
  position: relative; display: inline-grid; grid-template-columns: 1fr 1fr;
  padding: 3px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--surface); cursor: pointer; color: var(--muted);
}
.sky-switch span { position: relative; z-index: 1; display: grid; place-items: center; width: 2rem; height: 1.6rem; transition: color 0.4s var(--ease); }
.sky-switch svg { width: 0.95rem; height: 0.95rem; }
.sky-switch::before {
  content: ""; position: absolute; top: 3px; left: 3px; width: 2rem; height: 1.6rem; border-radius: 999px;
  background: var(--ink); transition: transform 0.5s var(--ease), background-color var(--swap) var(--ease);
}
:root[data-theme="day"] .sky-switch::before { transform: translateX(2rem); }
:root:not([data-theme="day"]) .sky-switch .night, :root[data-theme="day"] .sky-switch .day { color: var(--bg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  height: 2.6rem; padding: 0 1.05rem;
  border: 1px solid var(--line-strong); border-radius: 8px;
  font-size: 0.9375rem; font-weight: 500; text-decoration: none;
  background: var(--surface);
  transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn:hover { border-color: var(--ink); transform: translateY(-1px); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn svg { width: 1rem; height: 1rem; flex: none; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); margin-top: 6rem; }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-block: 1.75rem 2.5rem; color: var(--muted); font-size: 0.9375rem; }
.foot nav { display: flex; gap: 1.25rem; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }

@media (max-width: 40rem) {
  .bar nav { gap: 0.9rem; }
  .bar .wrap { gap: 0.9rem; }
  .brand span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  :root { --swap: 0s; }
  * { transition-duration: 0s !important; }
}
/* A date inside a sentence-like meta line keeps the line's size and face. */
.meta .mono { font-family: inherit; font-size: inherit; font-variant-numeric: normal; }
/* Chrome sets tabular figures on list markers; this face widens its period with them. */
li::marker { font-variant-numeric: normal; }
