:root {
  color-scheme: light dark;
  --page-bg: #f8fafc;
  --page-text: #0f172a;
  --link: #0ea5e9;
  --card-bg: #ffffff;
  --card-border: #d6deea;
  --muted: #64748b;
}

body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--page-bg);
  color: var(--page-text);
}

main {
  max-width: 860px;
  margin: 20px auto 0;
  padding: 24px 16px 48px;
  line-height: 1.6;
  position: relative;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: var(--card-bg);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

h1 {
  margin: 0 0 16px;
  font-size: 28px;
}

h2 {
  margin-top: 24px;
  font-size: 18px;
}

p,
li {
  font-size: 15px;
}

a {
  color: var(--link);
}

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

.close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--page-text);
  background: var(--card-bg);
  font-size: 18px;
  line-height: 1;
}

html[data-theme='dark'] {
  --page-bg: #0b1220;
  --page-text: #e2e8f0;
  --link: #7dd3fc;
  --card-bg: #111827;
  --card-border: #334155;
  --muted: #94a3b8;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme='light']) {
    --page-bg: #0b1220;
    --page-text: #e2e8f0;
    --link: #7dd3fc;
    --card-bg: #111827;
    --card-border: #334155;
    --muted: #94a3b8;
  }
}
