:root {
  color-scheme: light;
  --ink: #272526;
  --muted: #686265;
  --paper: #fffdfb;
  --soft: #fff2ef;
  --soft-pink: #ffe6ee;
  --red: #ff2d1a;
  --pink: #fc2c62;
  --line: #e8dfdc;
  --green: #19735d;
  --shadow: 0 24px 70px rgba(91, 42, 35, .12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; overflow-x: hidden; background: var(--paper); }
button, input, textarea { font: inherit; }
a { color: inherit; }
.skip-link { position: fixed; z-index: 100; top: .5rem; left: .5rem; padding: .75rem 1rem; color: white; background: var(--ink); transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.shell { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }

.site-header { width: min(1240px, calc(100% - 40px)); min-height: 92px; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; }
.brand img { width: 178px; height: 50px; object-fit: contain; }
.brand span { padding-left: .8rem; border-left: 1px solid var(--line); font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.back-to-site, .text-link { color: var(--muted); font-size: .9rem; font-weight: 700; text-decoration: none; }
.back-to-site:hover, .text-link:hover { color: var(--pink); }

.hero { min-height: 620px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr); align-items: center; gap: 2.5rem; padding-block: 70px 110px; }
.hero-copy { min-width: 0; }
.kicker, .section-label, .mini-label { color: var(--pink); font-size: .78rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.kicker span { margin-right: .4rem; color: var(--red); }
h1, h2, p { margin-top: 0; }
.hero h1 { max-width: 750px; margin-bottom: 1.8rem; font-size: clamp(3.3rem, 5.8vw, 5.8rem); line-height: .91; letter-spacing: -.065em; }
.hero h1 em { color: var(--red); font-style: normal; }
.hero-lead { max-width: 620px; color: var(--muted); font-size: clamp(1.12rem, 2vw, 1.38rem); line-height: 1.55; }

.button { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: .6rem; border: 2px solid transparent; border-radius: 999px; padding: .75rem 1.4rem; font-weight: 850; text-decoration: none; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.button:hover { transform: translateY(-2px); }
.button:focus-visible, input:focus-visible, .party-card:has(input:focus-visible) { outline: 3px solid rgba(252, 44, 98, .28); outline-offset: 3px; }
.button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.button-primary { color: white; background: linear-gradient(135deg, var(--red), var(--pink)); box-shadow: 0 10px 28px rgba(252, 44, 98, .25); }
.button-secondary { color: var(--pink); border-color: var(--pink); background: white; }
.button-large { min-height: 62px; padding-inline: 2rem; }

.hero-art { position: relative; min-height: 390px; border-radius: 48% 52% 44% 56% / 58% 38% 62% 42%; background: linear-gradient(145deg, #ff4a35, #ff1e4d); box-shadow: var(--shadow); transform: rotate(3deg); }
.hero-art::before, .hero-art::after { content: ""; position: absolute; border: 3px solid rgba(255,255,255,.65); border-radius: 50%; }
.hero-art::before { width: 70px; height: 70px; top: 34px; right: 42px; }
.hero-art::after { width: 20px; height: 20px; left: 38px; bottom: 52px; }
.hero-heart { position: absolute; inset: 0; display: grid; place-items: center; color: white; font-size: 10rem; text-shadow: 0 8px 0 rgba(135,0,24,.08); transform: rotate(-3deg); }
.speech-bubble { position: absolute; z-index: 2; padding: 1rem 1.25rem; border-radius: 20px; font-weight: 900; line-height: 1.15; background: white; box-shadow: 0 16px 40px rgba(70, 17, 30, .18); transform: rotate(-3deg); }
.speech-bubble::after { content: ""; position: absolute; bottom: -11px; width: 20px; height: 20px; background: inherit; transform: rotate(45deg); }
.bubble-one { top: 18px; left: -38px; }
.bubble-one::after { left: 28px; }
.bubble-two { right: -26px; bottom: 28px; color: white; background: var(--ink); transform: rotate(4deg); }
.bubble-two::after { right: 30px; }

.how-it-works { display: grid; grid-template-columns: .8fr 1.2fr; gap: 5rem; padding-block: 90px; border-top: 1px solid var(--line); }
.how-it-works h2, .search-intro h2, .wizard > h1 { font-size: clamp(2.25rem, 4vw, 4.3rem); line-height: 1; letter-spacing: -.045em; }
.step-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.step-list li { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 1rem; padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.step-list li > span { color: var(--pink); font-size: .8rem; font-weight: 900; }
.step-list strong { font-size: 1.12rem; }
.step-list small { color: var(--muted); }

.search-section { padding-block: 100px 120px; background: var(--soft); }
.search-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 5rem; align-items: start; }
.search-intro { position: sticky; top: 2rem; }
.search-intro p:last-child, .wizard-lead { color: var(--muted); font-size: 1.12rem; line-height: 1.6; }
.search-card, .mail-card, .recipient-card, .application-card { border: 1px solid rgba(255,45,26,.08); border-radius: 24px; background: white; box-shadow: var(--shadow); }
.search-card { padding: clamp(1.25rem, 4vw, 2.4rem); }
.search-card label { display: block; margin-bottom: .65rem; font-size: .86rem; font-weight: 800; }
.search-field { position: relative; display: flex; gap: .6rem; }
.search-field svg { position: absolute; top: 18px; left: 16px; width: 21px; fill: none; stroke: var(--muted); stroke-linecap: round; stroke-width: 2; }
.search-field input { width: 100%; min-width: 0; height: 56px; padding: 0 1rem 0 3rem; border: 1px solid #d8cfcc; border-radius: 14px; background: #fffdfc; }
.search-field input:focus { border-color: var(--pink); }
.field-hint { margin: .55rem 0 0; color: var(--muted); font-size: .78rem; }
.search-results { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.results-heading { display: flex; align-items: center; justify-content: space-between; }
.results-heading h3 { margin: 0; font-size: 1rem; }
.results-heading span { color: var(--muted); font-size: .78rem; }
.search-results ul { margin: 1rem 0 0; padding: 0; list-style: none; }
.search-results li + li { border-top: 1px solid var(--line); }
.search-results li a { display: grid; grid-template-columns: 38px 1fr 30px; align-items: center; gap: .7rem; padding: 1rem .4rem; text-decoration: none; }
.search-results li a:hover strong, .search-results li a:hover .result-arrow { color: var(--pink); }
.search-results small { display: block; margin-top: .2rem; color: var(--muted); }
.location-pin { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--pink); background: var(--soft-pink); }
.result-arrow { justify-self: end; font-size: 1.25rem; }
.empty-state { margin-top: 1rem; padding: 1.2rem; border-radius: 14px; background: var(--soft); }
.empty-state p { margin: .35rem 0 0; color: var(--muted); }

.wizard { max-width: 1050px; padding-block: 55px 110px; }
.progress { display: grid; grid-template-columns: auto minmax(30px, 1fr) auto minmax(30px, 1fr) auto; align-items: center; gap: .7rem; margin-bottom: 80px; color: #9c9497; font-size: .78rem; font-weight: 800; }
.progress > a, .progress > span:not(.progress-line) { display: flex; align-items: center; gap: .45rem; text-decoration: none; }
.progress b, .progress .done span { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid #cfc5c8; border-radius: 50%; }
.progress .done { color: var(--green); }
.progress .done span { color: white; border-color: var(--green); background: var(--green); }
.progress .current { color: var(--ink); }
.progress .current b { color: white; border-color: var(--pink); background: var(--pink); }
.progress-line { height: 2px; background: var(--line); }
.progress-line.active { background: var(--green); }
.wizard > .section-label { margin-top: 3rem; }
.wizard > h1 { max-width: 850px; margin-bottom: 1.3rem; }
.wizard-lead { max-width: 750px; margin-bottom: 3rem; }
.selection-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.selection-toolbar > span { color: var(--muted); font-size: .88rem; }
.link-button, .copy-button, .preview-close { border: 0; color: var(--pink); background: transparent; font-weight: 800; cursor: pointer; }
.party-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .9rem; }
.party-card { position: relative; min-height: 112px; display: grid; grid-template-columns: 28px 54px 1fr; align-items: center; gap: .85rem; padding: 1rem; border: 2px solid var(--line); border-radius: 18px; background: white; cursor: pointer; transition: border .18s ease, transform .18s ease, box-shadow .18s ease; }
.party-card:hover { border-color: #f5a4bb; transform: translateY(-2px); }
.party-card:has(input:checked) { border-color: var(--pink); box-shadow: 0 10px 30px rgba(252,44,98,.11); }
.party-card input { position: absolute; opacity: 0; pointer-events: none; }
.custom-checkbox { width: 24px; height: 24px; display: grid; place-items: center; border: 2px solid #cfc5c8; border-radius: 7px; color: transparent; }
.party-card input:checked + .custom-checkbox { color: white; border-color: var(--pink); background: var(--pink); }
.party-initials { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; color: var(--pink); background: var(--soft-pink); font-size: .8rem; font-weight: 900; text-transform: uppercase; }
.party-copy strong, .party-copy small { display: block; }
.party-copy small { margin-top: .3rem; color: var(--muted); }
.stance { grid-column: 3; width: fit-content; padding: .3rem .55rem; border-radius: 999px; font-size: .68rem; font-weight: 800; }
.stance-open { color: #695e62; background: #f4efed; }
.wizard-actions { display: flex; justify-content: space-between; align-items: center; gap: 2rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.wizard-actions p { max-width: 460px; margin: 0; color: var(--muted); font-size: .9rem; }
.form-error, .contact-warning { padding: .8rem 1rem; border-radius: 10px; color: #7d1e37; background: var(--soft-pink); }
.data-gap { display: flex; gap: 1.25rem; padding: 2rem; border-radius: 22px; background: var(--soft); }
.data-gap > span { flex: 0 0 auto; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--pink); font-weight: 900; }
.data-gap h2 { margin-bottom: .6rem; }
.data-gap p { color: var(--muted); }

.final-layout { display: grid; grid-template-columns: 1.35fr .65fr; gap: 1rem; align-items: start; }
.mail-card, .recipient-card { padding: clamp(1.2rem, 3vw, 2rem); }
.card-heading { display: flex; justify-content: space-between; align-items: start; gap: 1rem; }
.card-heading h2, .recipient-card h2, .application-card h2, .send-panel h2 { margin: .35rem 0 0; font-size: 1.35rem; }
.copy-button { padding: .5rem; white-space: nowrap; }
.mail-meta { margin: 1.5rem 0; border-block: 1px solid var(--line); }
.mail-meta > div { display: grid; grid-template-columns: 75px 1fr; gap: .75rem; padding: .75rem 0; }
.mail-meta > div + div { border-top: 1px solid var(--line); }
.mail-meta dt { color: var(--muted); font-size: .76rem; font-weight: 800; text-transform: uppercase; }
.mail-meta dd { margin: 0; }
.mail-meta dd span { display: inline-block; margin: -.2rem .2rem -.2rem 0; padding: .2rem .5rem; border-radius: 999px; background: var(--soft-pink); font-size: .8rem; font-weight: 750; }
.mail-body { width: 100%; min-height: 390px; resize: vertical; padding: 0; border: 0; color: var(--ink); background: white; line-height: 1.6; }
.mail-body:focus { outline: 0; }
.contact-warning { margin: 1rem 0 0; font-size: .82rem; line-height: 1.45; }
.recipient-card { background: var(--ink); color: white; }
.recipient-card .mini-label { color: #ff8aa8; }
.recipient-group { margin-top: 1.4rem; padding-top: 1.1rem; border-top: 1px solid rgba(255,255,255,.16); }
.recipient-group > strong, .recipient-group > span { display: block; }
.recipient-group > span { margin-top: .75rem; color: #dfd9dc; font-size: .88rem; }
.recipient-group small { display: block; margin-top: .2rem; color: #aaa1a5; }
.application-card { position: relative; display: grid; grid-template-columns: 62px 1fr auto; gap: 1rem; align-items: center; margin-top: 1rem; padding: 1.4rem 1.7rem; }
.application-card p { margin: .35rem 0 0; color: var(--muted); }
.application-icon { width: 56px; height: 66px; display: grid; place-items: center; border: 2px solid var(--red); border-radius: 8px; color: var(--red); font-size: .75rem; font-weight: 900; }
.application-preview { grid-column: 1 / -1; position: relative; margin-top: 1rem; padding: 1.5rem; border-radius: 14px; background: #f8f4f2; }
.application-preview pre { white-space: pre-wrap; font: inherit; line-height: 1.6; }
.preview-close { position: absolute; top: .5rem; right: .5rem; font-size: 1.5rem; }
.send-panel { display: flex; align-items: center; justify-content: space-between; gap: 2rem; margin-top: 2rem; padding: 2.2rem; border-radius: 24px; color: white; background: linear-gradient(135deg, #ff2d1a, #eb174f); }
.send-panel .mini-label { color: white; opacity: .78; }
.send-panel h2 { font-size: 1.8rem; }
.send-panel p { max-width: 620px; margin: .6rem 0 0; color: rgba(255,255,255,.83); }
.send-panel .button { color: var(--red); background: white; box-shadow: 0 12px 30px rgba(80,0,20,.2); white-space: nowrap; }
.privacy-note { margin-top: 1rem; color: var(--muted); font-size: .8rem; text-align: center; }

.site-footer { width: min(1240px, calc(100% - 40px)); margin-inline: auto; display: flex; justify-content: space-between; gap: 2rem; padding-block: 35px; border-top: 1px solid var(--line); color: var(--muted); font-size: .76rem; }
.site-footer p { margin: 0; }
.site-footer a:hover { color: var(--pink); }

@media (max-width: 850px) {
  .hero, .how-it-works, .search-layout, .final-layout { grid-template-columns: 1fr; }
  .hero { padding-top: 45px; gap: 2rem; }
  .hero-art { width: min(440px, 88%); min-height: 330px; margin-inline: auto; }
  .how-it-works, .search-layout { gap: 2rem; }
  .search-intro { position: static; }
  .party-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .shell, .site-header, .site-footer { width: min(100% - 28px, 1160px); }
  .site-header { min-height: 74px; }
  .brand img { width: 130px; height: 38px; }
  .brand span { display: none; }
  .back-to-site { font-size: .76rem; }
  .hero { min-height: auto; padding-block: 40px 80px; }
  .hero h1 { font-size: clamp(2.7rem, 13.5vw, 3.6rem); }
  .hero-art { min-height: 270px; }
  .hero-heart { font-size: 7rem; }
  .speech-bubble { font-size: .8rem; }
  .bubble-one { left: -8px; }
  .bubble-two { right: 8px; }
  .how-it-works, .search-section { padding-block: 70px; }
  .step-list li { grid-template-columns: 40px 1fr; }
  .step-list small { grid-column: 2; }
  .search-field { flex-direction: column; }
  .search-field .button { width: 100%; }
  .progress { margin-bottom: 55px; gap: .3rem; }
  .progress > a, .progress > span:not(.progress-line) { flex-direction: column; gap: .25rem; }
  .party-card { grid-template-columns: 28px 46px 1fr; }
  .party-initials { width: 44px; height: 44px; }
  .wizard-actions, .send-panel, .site-footer { align-items: stretch; flex-direction: column; }
  .wizard-actions .button, .send-panel .button { width: 100%; }
  .application-card { grid-template-columns: 55px 1fr; }
  .application-card > .button { grid-column: 1 / -1; }
}

@media print {
  body * { visibility: hidden; }
  .application-preview, .application-preview * { visibility: visible; }
  .application-preview { position: absolute; inset: 0; margin: 0; background: white; }
  .application-preview button { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
