:root {
  color-scheme: light dark;
  --bg: #0f1419;
  --bg-elevated: #171d25;
  --text: #e8edf2;
  --text-muted: #9aa7b5;
  --accent: #5b8cff;
  --accent-hover: #7aa2ff;
  --border: #2a3441;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  --radius: 16px;
  --font-sans: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  background:
    radial-gradient(circle at top, rgba(91, 140, 255, 0.18), transparent 42%),
    var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a {
  color: inherit;
}

.container {
  width: min(1100px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  padding: 4rem 0 2rem;
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-header h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.1;
}

.site-tagline {
  margin: 1rem 0 0;
  max-width: 48rem;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.site-hero {
  margin: 1.25rem 0 0;
  max-width: 42rem;
  color: var(--text);
  font-size: 1.05rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  padding-bottom: 4rem;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg-elevated) 92%, white 8%);
  box-shadow: var(--shadow);
}

.card-icon {
  font-size: 2.4rem;
  line-height: 1;
}

.card-title {
  margin: 0;
  font-size: 1.5rem;
}

.card-tagline {
  margin: 0;
  color: var(--accent);
  font-weight: 600;
}

.card-description {
  margin: 0;
  color: var(--text-muted);
  flex: 1;
}

.card-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.button {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.65rem 1.1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.button-primary {
  background: var(--accent);
  color: #08111f;
}

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

.button-secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.button-secondary:hover {
  border-color: var(--accent);
}

.site-footer {
  padding: 2rem 0 3rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.site-footer-inner {
  display: grid;
  gap: 0.75rem;
}

.site-footer p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover,
.footer-link-button:hover {
  color: var(--accent);
}

.footer-link-button {
  appearance: none;
  border: 0;
  padding: 0;
  background: none;
  color: var(--text-muted);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.footer-brand {
  font-size: 0.9rem;
}

.site-header-compact {
  padding: 2.5rem 0 1.5rem;
}

.site-header-compact .eyebrow a {
  color: var(--accent);
  text-decoration: none;
}

.site-header-compact .eyebrow a:hover {
  color: var(--accent-hover);
}

.legal-content {
  padding-bottom: 4rem;
  max-width: 42rem;
}

.legal-content section + section {
  margin-top: 2rem;
}

.legal-content h2 {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
}

.legal-content p,
.legal-content ul {
  margin: 0;
  color: var(--text-muted);
}

.legal-content p + p,
.legal-content p + ul,
.legal-content ul + p {
  margin-top: 0.75rem;
}

.legal-content ul {
  padding-left: 1.25rem;
}

.legal-content li + li {
  margin-top: 0.35rem;
}

.legal-content code {
  font-size: 0.95em;
}

.legal-content a {
  color: var(--accent);
}

.cookie-dialog {
  width: min(560px, calc(100% - 2rem));
  max-width: calc(100vw - 2rem);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: var(--shadow);
}

.cookie-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.cookie-dialog-inner {
  margin: 0;
  padding: 1.25rem;
}

.cookie-dialog-inner h2 {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
}

.cookie-dialog-inner p {
  margin: 0;
  color: var(--text-muted);
}

.cookie-dialog-inner p + p {
  margin-top: 0.75rem;
}

.cookie-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.help-dialog {
  width: min(560px, calc(100% - 2rem));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: var(--shadow);
}

.help-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.help-dialog-inner {
  margin: 0;
  padding: 1.25rem;
}

.help-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.help-dialog-header h2,
.help-dialog-body h3 {
  margin: 0;
}

.help-dialog-body {
  color: var(--text-muted);
}

.help-dialog-body ol {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
}

.help-dialog-body li + li {
  margin-top: 0.5rem;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f7fb;
    --bg-elevated: #ffffff;
    --text: #15202b;
    --text-muted: #5b6b7c;
    --border: #d7e0ea;
    --shadow: 0 18px 40px rgba(21, 32, 43, 0.08);
  }

  .button-primary {
    color: #ffffff;
  }
}
