:root {
  --bg: #f7f9fa;
  --surface: #ffffff;
  --text: #16232b;
  --muted: #53656f;
  --accent: #0b6e8a;
  --accent-soft: #e3f1f5;
  --border: #d9e2e6;
  --notice-bg: #fff7e0;
  --notice-border: #e8c65a;
  --radius: 10px;
  --max: 1040px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f171b;
    --surface: #16222a;
    --text: #e4ecef;
    --muted: #9fb1b9;
    --accent: #5cc2de;
    --accent-soft: #173440;
    --border: #28373f;
    --notice-bg: #2e2812;
    --notice-border: #8a7424;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0f171b;
  --surface: #16222a;
  --text: #e4ecef;
  --muted: #9fb1b9;
  --accent: #5cc2de;
  --accent-soft: #173440;
  --border: #28373f;
  --notice-bg: #2e2812;
  --notice-border: #8a7424;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
  hyphens: auto;
}

a { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  text-decoration: none;
  color: var(--text);
  line-height: 1.25;
}
.brand strong { display: block; font-size: 1.125rem; }
.brand span { color: var(--muted); font-size: 0.875rem; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 0.9375rem; }
.site-nav a { text-decoration: none; color: var(--muted); }
.site-nav a:hover { color: var(--accent); }

/* Hero */
.hero { padding-top: 64px; padding-bottom: 48px; }
.eyebrow {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 4px 10px;
  border-radius: 999px;
  margin: 0 0 16px;
}
h1 {
  font-size: clamp(1.5rem, 4.5vw, 2.75rem);
  line-height: 1.15;
  margin: 0 0 16px;
  max-width: 20ch;
}
.lead { font-size: 1.1875rem; color: var(--muted); max-width: 60ch; margin: 0 0 28px; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: var(--radius);
}
:root[data-theme="dark"] .btn { color: #0f171b; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn { color: #0f171b; }
}
.btn:hover { filter: brightness(1.08); }

/* Sections */
section { padding: 48px 0; border-top: 1px solid var(--border); }
h2 { font-size: 1.5rem; margin: 0 0 20px; }
h3 { font-size: 1.125rem; margin: 0 0 8px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: 16px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.card p { margin: 0; color: var(--muted); }

ol.steps { padding-left: 1.25rem; margin: 0; max-width: 70ch; }
ol.steps li { margin-bottom: 10px; }

.notice {
  background: var(--notice-bg);
  border: 1px solid var(--notice-border);
  border-radius: var(--radius);
  padding: 20px;
  max-width: 75ch;
}
.notice p { margin: 0 0 10px; }
.notice p:last-child { margin-bottom: 0; }

.about { max-width: 70ch; }

.contact-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 560px;
}
.contact-box p { margin: 0 0 12px; }

/* Legal pages */
.legal { padding-top: 40px; padding-bottom: 56px; }
.legal > * { max-width: 75ch; }
.legal h1 { font-size: 2rem; max-width: none; }
.legal h2 { font-size: 1.25rem; margin-top: 32px; }
.placeholder { background: var(--notice-bg); padding: 0 4px; border-radius: 4px; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0 40px;
  color: var(--muted);
  font-size: 0.875rem;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.site-footer a { color: var(--muted); }
