:root {
  color-scheme: light;
  --ink: #1c1917;
  --muted: #57534e;
  --line: #e4ddd4;
  --paper: #f6f1e8;
  --card: #fffdf9;
  --accent: #1e3a5f;
  --accent-ink: #f7f3ec;
  --soft: #e7eef6;
}

* { box-sizing: border-box; }

html { overflow-x: clip; }

body {
  margin: 0;
  background:
    radial-gradient(ellipse 90% 42% at 50% -8%, #d9e4f2, transparent 58%),
    var(--paper);
  color: var(--ink);
  font: 1.05rem/1.55 Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
}

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

.wrap {
  width: min(42rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.1rem 0 4rem;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  text-decoration: none;
  font-family: system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 650;
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.pages {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1.5rem;
  font-family: system-ui, sans-serif;
  font-size: 0.92rem;
}

.pages a {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 44px;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  text-decoration: none;
  line-height: 1.3;
  white-space: normal;
}

.pages a[aria-current="page"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

h1 {
  margin: 0 0 0.7rem;
  font-size: 2.15rem;
  line-height: 1.12;
  font-weight: 650;
  letter-spacing: -0.02em;
}

h2 {
  margin: 2.3rem 0 0.7rem;
  font-size: 1.28rem;
  line-height: 1.25;
}

.lead {
  margin: 0 0 0.8rem;
  font-size: 1.18rem;
}

.hint { margin: 0 0 1.3rem; }

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.05rem 1.05rem 1rem;
  box-shadow: 0 10px 30px rgba(30, 58, 95, 0.06);
}

.panel > h2 { margin-top: 0; }

fieldset {
  border: 0;
  margin: 0 0 0.85rem;
  padding: 0;
}

legend {
  font-family: system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

.choices { display: grid; gap: 0.4rem; }

label.choice {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  cursor: pointer;
  font-family: system-ui, sans-serif;
  font-size: 0.98rem;
  line-height: 1.35;
  background: #fff;
}

label.choice input {
  margin: 0.2rem 0 0;
  accent-color: var(--accent);
}

label.choice:has(input:checked) {
  border-color: var(--accent);
  background: var(--soft);
}

.result {
  margin-top: 0.35rem;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 14px;
  padding: 1.05rem 1.1rem 1.15rem;
}

.result-kicker {
  margin: 0;
  font-family: system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c5d4e8;
}

.result strong {
  display: block;
  margin: 0.2rem 0 0.15rem;
  font-size: 2.15rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #fff;
}

.result .method {
  margin: 0 0 0.7rem;
  font-family: system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #d5e3f4;
}

.result p:not(.result-kicker):not(.method) {
  margin: 0.45rem 0 0;
  color: #f3efe8;
}

ol.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}

ol.steps li {
  position: relative;
  margin: 0 0 0.85rem;
  padding: 0.15rem 0 0.15rem 2.7rem;
  counter-increment: step;
}

ol.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

ol.steps li strong { font-family: system-ui, sans-serif; }

.note, footer {
  font-family: system-ui, sans-serif;
  font-size: 0.92rem;
  color: var(--muted);
}

.note { margin-top: 1rem; }

.offer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  margin-top: 1rem;
  padding: 0.85rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.offer .brand-mark {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 16px;
}

a.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-family: system-ui, sans-serif;
  font-weight: 700;
  padding: 0.75rem 1rem;
  border-radius: 10px;
}

a.button:hover { background: #16304f; }

ul.plain { padding-left: 1.15rem; }

ul.plain li { margin: 0.45rem 0; }

footer {
  margin-top: 2.6rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

footer nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; }

@media (max-width: 640px) {
  h1 { font-size: 1.7rem; }
  .result strong { font-size: 1.75rem; }
  .wrap { width: min(42rem, calc(100% - 1.4rem)); }
  .pages { flex-direction: column; align-items: stretch; }
  .pages a { justify-content: center; border-radius: 12px; }
}
