:root {
  --bg: #fbf7f2;
  --bg-soft: #f3ece4;
  --card: #ffffff;
  --ink: #1f1a2e;
  --muted: #625b70;
  --line: #e7dfd5;
  --a: #ff6b57;          /* person A */
  --b: #14a89b;          /* person B */
  --accent: #3b2b8f;     /* buttons */
  --accent-ink: #ffffff;
  --accent-soft: #ece8fb;
  --warn: #b4421f;
  --ok: #0f7f74;
  --shadow: 0 1px 2px rgba(31, 26, 46, .06), 0 8px 24px rgba(31, 26, 46, .06);
  --radius: 20px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15121f;
    --bg-soft: #1d1929;
    --card: #221d31;
    --ink: #f3eff9;
    --muted: #b1a9c2;
    --line: #352e48;
    --a: #ff7d6b;
    --b: #2cc4b6;
    --accent: #b9a8ff;
    --accent-ink: #15121f;
    --accent-soft: #2c2547;
    --warn: #ff9a7a;
    --ok: #4fd6c8;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.8rem, 6vw, 2.5rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: 560px; margin: 0 auto; padding: 0 16px; }

.top { padding: 18px 0 6px; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; }
.logo { position: relative; width: 34px; height: 22px; flex: none; }
.logo::before, .logo::after { content: ""; position: absolute; top: 0; width: 22px; height: 22px; border-radius: 50%; opacity: .85; }
.logo::before { left: 0; background: var(--a); }
.logo::after { right: 0; background: var(--b); mix-blend-mode: multiply; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo::after { mix-blend-mode: screen; } }

main { flex: 1; padding: 12px 0 40px; }
footer { padding: 24px 0 32px; color: var(--muted); font-size: .85rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 6px 16px; }
footer a { color: var(--muted); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
  margin: 0 0 16px;
  box-shadow: var(--shadow);
}
.card.soft { background: var(--bg-soft); box-shadow: none; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > .btn { flex: 1 1 160px; }

.hero { padding: 18px 0 8px; }
.hero h1 { margin-bottom: .35em; }
.hero p { color: var(--muted); font-size: 1.05rem; }
.hero-img { display: block; width: 100%; height: auto; border-radius: var(--radius); margin: 8px 0 18px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px 20px;
  border-radius: 14px; border: 0;
  background: var(--accent); color: var(--accent-ink);
  font: inherit; font-weight: 650; text-decoration: none; text-align: center;
  cursor: pointer; width: 100%;
  transition: transform .08s ease, opacity .15s ease;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.secondary { background: var(--accent-soft); color: var(--accent); }
.btn.ghost { background: transparent; color: var(--muted); min-height: 44px; font-weight: 500; }
.btn.danger { background: transparent; color: var(--warn); min-height: 44px; font-weight: 500; }
.btn:focus-visible, .option:focus-visible, .mode:focus-visible, input:focus-visible { outline: 3px solid var(--b); outline-offset: 2px; }

.modes { display: grid; gap: 12px; margin: 8px 0 24px; }
.mode {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; font: inherit; box-shadow: var(--shadow);
}
.mode strong { display: block; font-size: 1.1rem; margin-bottom: 2px; }
.mode span { color: var(--muted); font-size: .95rem; }
.mode:hover { border-color: var(--accent); }

.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 0 0 14px 44px; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: -2px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-size: .9rem;
}

label.field { display: block; font-weight: 600; margin-bottom: 6px; }
input[type="text"] {
  width: 100%; min-height: 52px; padding: 12px 14px;
  border-radius: 14px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); font: inherit;
}
.check { display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--accent); }

.progress { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 6px 0 18px; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--a), var(--b)); transition: width .25s ease; }
.qmeta { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: .88rem; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-size: .8rem; font-weight: 600; }
.qtext { font-size: 1.3rem; font-weight: 650; margin: 10px 0 18px; line-height: 1.35; }
.options { display: grid; gap: 10px; }
.option {
  width: 100%; text-align: left; cursor: pointer;
  min-height: 56px; padding: 14px 16px;
  border-radius: 14px; border: 1.5px solid var(--line);
  background: var(--card); color: var(--ink); font: inherit;
}
.option.picked { border-color: var(--accent); background: var(--accent-soft); }

.score { display: flex; flex-direction: column; align-items: center; padding: 6px 0 2px; }
.ring { width: 190px; height: 190px; }
.ring circle { fill: none; stroke-width: 14; }
.ring .track { stroke: var(--line); }
.ring .val { stroke: url(#grad); stroke-linecap: round; transition: stroke-dashoffset .9s ease; }
.ring text { fill: var(--ink); font-weight: 750; font-size: 42px; }
.pair { font-weight: 650; margin-top: 4px; }
.pair .na { color: var(--a); }
.pair .nb { color: var(--b); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.stats div { background: var(--bg-soft); border-radius: 14px; padding: 12px 4px; }
.stats strong { display: block; font-size: 1.5rem; }
.stats span { font-size: .8rem; color: var(--muted); }

.lock { border: 2px solid var(--accent); }
.price { font-size: 1.6rem; font-weight: 750; }
ul.ticks { padding: 0; margin: 0 0 14px; list-style: none; }
ul.ticks li { padding-left: 26px; position: relative; margin-bottom: 6px; }
ul.ticks li::before { content: "✓"; position: absolute; left: 2px; color: var(--ok); font-weight: 700; }

.dim { margin-bottom: 14px; }
.dim-head { display: flex; justify-content: space-between; font-size: .95rem; font-weight: 600; margin-bottom: 4px; }
.bar { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar > div { height: 100%; background: linear-gradient(90deg, var(--a), var(--b)); }
.scale { position: relative; height: 10px; background: var(--line); border-radius: 99px; margin: 6px 0 2px; }
.scale .dot { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; border: 2px solid var(--card); }
.scale .dot.a { background: var(--a); }
.scale .dot.b { background: var(--b); }
.poles { display: flex; justify-content: space-between; font-size: .75rem; color: var(--muted); }

.item { border-top: 1px solid var(--line); padding: 14px 0; }
.item:first-of-type { border-top: 0; padding-top: 4px; }
.answers { display: grid; gap: 6px; margin: 8px 0; }
.answers div { padding: 8px 12px; border-radius: 12px; font-size: .95rem; }
.answers .ma { background: color-mix(in srgb, var(--a) 14%, transparent); }
.answers .mb { background: color-mix(in srgb, var(--b) 16%, transparent); }
.talk { font-size: .93rem; color: var(--muted); border-left: 3px solid var(--accent); padding-left: 10px; }
.tag { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.tag.opp { color: var(--warn); }
.tag.close { color: var(--accent); }
.tag.same { color: var(--ok); }

.linkbox { display: flex; gap: 8px; }
.linkbox input { flex: 1; min-width: 0; font-size: .85rem; }
.linkbox .btn { width: auto; flex: none; }

.notice { padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); font-size: .93rem; }
.error { color: var(--warn); font-size: .93rem; min-height: 1.2em; margin-top: 8px; }
.pulse { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--b); margin-right: 8px; animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }

.legal { padding-top: 8px; }
.legal h2 { margin-top: 1.4em; }
.legal .draft { background: #fff3c4; color: #5c4700; padding: 10px 12px; border-radius: 10px; font-size: .9rem; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

.hint { margin: 6px 0 0; }
pre.receipt { white-space: pre-wrap; word-break: break-word; font: inherit; font-size: .92rem; margin: 0; }
.legal h3 { font-size: 1rem; margin: 1.2em 0 .4em; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: 6px; }
.per-person { margin: -6px 0 0; font-weight: 650; color: var(--accent, inherit); }

/* Frequently asked questions below the landing view (static HTML, also read by search engines) */
.faq { padding: 4px 0 28px; }
.faq h2 { margin: 0 0 12px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin: 10px 0 0; color: var(--muted); }
.faq[hidden] { display: none; }
.modes-static { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.modes-static li { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; color: var(--muted); }
.modes-static strong { display: block; color: var(--ink); }
