:root {
  --bg: #f4f4f5;
  --fg: #18181b;
  --muted: #71717a;
}

:root[data-theme='dark'] {
  --bg: #18181b;
  --fg: #fafafa;
  --muted: #a1a1aa;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #18181b;
    --fg: #fafafa;
    --muted: #a1a1aa;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  transition:
    background 0.2s,
    color 0.2s;
}

main {
  padding: 1rem;
  text-align: center;
}

#headline {
  margin: 0;
  font-size: clamp(5rem, 25vw, 12rem);
  font-weight: 800;
  line-height: 1;
}

#detail {
  margin: 1rem 0 0;
  font-size: clamp(1rem, 4vw, 1.5rem);
  color: var(--muted);
}

.tz {
  position: relative;
  text-decoration: underline dotted;
  text-underline-offset: 0.2em;
  cursor: help;
}

.tz::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translate(-50%, -0.4rem);
  padding: 0.35rem 0.6rem;
  border-radius: 0.4rem;
  background: var(--fg);
  color: var(--bg);
  font-size: 0.85rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}

.tz:hover::after,
.tz:focus-visible::after {
  opacity: 1;
}

#theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  padding: 0;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
