:root {
  --ink: #1A2233;
  --brass: #9A6A12;
  --muted: #4B5568;
  --bg-soft: #F2F4F7;
  --bg-softer: #F7F8FA;
  --line: #D9DEE6;
  --line-soft: #E8EBF0;
  --line-strong: #B8C0CC;
  --white: #FFFFFF;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--white); }
.page { background: var(--white); color: var(--ink); font-family: Onest, system-ui, sans-serif; font-variant-numeric: tabular-nums; }
a { color: var(--ink); }
a:hover { color: var(--muted); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.gold { color: var(--brass); }
.gold-bg { background: var(--brass) !important; }
.muted { color: var(--muted); }
.strong { font-weight: 600; }

/* header */
.header-row { min-height: 72px; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; }
.header-row .brand { justify-self: start; }
.header-row .header-end { justify-self: end; }
@media (max-width: 1100px) { .header-row { display: flex; flex-wrap: wrap; justify-content: space-between; } }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-height: 44px; }
.brand-name { font-weight: 700; font-size: 20px; letter-spacing: -0.03em; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 15px; }
.nav a, .login-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--muted); text-decoration: none; }
.login-link { color: var(--ink); font-weight: 500; }
.header-end { display: flex; flex-wrap: nowrap; align-items: center; gap: 12px; min-width: 0; }
.lang { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--bg-soft); margin: 0; }
.lang button { min-height: 44px; min-width: 44px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: 500 14px Onest, sans-serif; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--white); box-shadow: 0 1px 2px rgba(26, 34, 51, 0.1); color: var(--ink); font-weight: 600; }
.user-email { display: inline-block; line-height: 44px; max-width: 180px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 500; color: var(--ink); text-decoration: none; }
.user-email:hover { text-decoration: underline; text-underline-offset: 3px; }
.link-btn { min-height: 44px; padding: 0 8px; border: 0; background: transparent; color: var(--ink); font: 500 15px Onest, sans-serif; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* footer */
footer { border-top: 1px solid var(--line); }
.footer-row { padding-top: 24px; padding-bottom: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--muted); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--muted); display: inline-flex; align-items: center; min-height: 44px; }

/* type */
.h-hero { margin: 0; font-weight: 700; font-size: 76px; line-height: 0.98; letter-spacing: -0.045em; overflow-wrap: anywhere; }
.h-section { margin: 0; max-width: 18em; font-weight: 700; font-size: 40px; line-height: 1.1; letter-spacing: -0.035em; }
.h-faq { flex: 1 1 260px; margin: 0; font-weight: 700; font-size: 32px; letter-spacing: -0.03em; }
.h-card { margin: 0; font-size: 20px; font-weight: 600; }
.lead { margin: 0; max-width: 34em; font-size: 19px; line-height: 1.55; color: var(--muted); }
.note { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }

/* controls */
.btn { min-height: 52px; padding: 0 22px; border: 0; border-radius: 10px; background: var(--ink); color: var(--white); font: 600 16px Onest, sans-serif; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; cursor: pointer; }
.btn:hover { color: var(--white); background: #2B3650; }
.btn-outline { background: var(--white); color: var(--ink); border: 1px solid var(--line-strong); align-self: flex-start; }
.btn-outline:hover { color: var(--ink); background: var(--bg-soft); }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; font-weight: 500; }
.row { display: flex; flex-wrap: wrap; gap: 8px; }
.row input { flex: 1 1 200px; min-width: 0; min-height: 52px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 10px; font: 500 17px Onest, sans-serif; color: var(--ink); }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }

/* layout blocks */
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-xl { padding-top: 80px; padding-bottom: 80px; display: flex; flex-direction: column; gap: 48px; }
.band { background: var(--bg-soft); }
.card { padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
.login { max-width: 460px; display: flex; flex-direction: column; gap: 16px; margin: 0; }
.login .h-card { font-size: 18px; }
/* Both login steps share one skeleton: the field row never changes width or position. */
.login-row { flex-wrap: nowrap; }
.login-btn { flex: 0 0 10.5em; white-space: nowrap; justify-content: center; }
.login-status { min-height: 72px; display: flex; flex-direction: column; gap: 4px; }
.login-sent { display: flex; align-items: center; gap: 8px; min-height: 24px; }
.login-sent-text { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.login-sent .link-btn { min-height: 24px; flex: none; }
.login-err { color: #B3261E; }
.login-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; margin-left: -8px; }
.login-timer { display: inline-flex; align-items: center; min-height: 44px; padding-left: 8px; }
.login-timer .link-btn { padding-left: 0; }
@media (max-width: 420px) { .login-btn { flex-basis: 8.5em; } }
.error-box { padding-top: 96px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }

/* hero */
.hero { padding-top: 64px; padding-bottom: 88px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "copy mail" "login timeline"; column-gap: 64px; row-gap: 32px; align-items: start; }
.hero-copy { grid-area: copy; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.hero-mail { grid-area: mail; min-width: 0; margin: 0; }
.hero-login { grid-area: login; min-width: 0; }
.hero-timeline { grid-area: timeline; min-width: 0; }
@media (max-width: 980px) {
  .hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "login" "mail" "timeline"; row-gap: 28px; }
}
.mail { background: var(--white); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 2px 4px rgba(26, 34, 51, 0.04), 0 24px 48px -20px rgba(26, 34, 51, 0.22); overflow: hidden; }
.mail-head { margin: 0; padding: 18px 22px; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px 12px; font-size: 14px; border-bottom: 1px solid var(--line-soft); }
.mail-head dt { color: var(--muted); }
.mail-head dd { margin: 0; overflow-wrap: anywhere; }
.mail-body { padding: 20px 22px; font-size: 16px; line-height: 1.6; display: flex; flex-direction: column; gap: 12px; }
.mail-body p { margin: 0; }
.mail-attach { padding: 0 22px 20px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 8px; display: flex; flex-direction: column; }
.timeline li { display: flex; flex-wrap: wrap; gap: 4px 16px; padding-bottom: 18px; border-left: 2px solid var(--line); margin-left: 5px; padding-left: 20px; position: relative; font-size: 15px; }
.timeline li.last { padding-bottom: 0; border-left-color: transparent; }
.timeline .dot { position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--white); border: 2px solid var(--ink); }
.timeline .gold-dot { background: var(--brass); border-color: var(--brass); }
.timeline .when { min-width: 128px; color: var(--muted); }

/* how, plans, faq */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 40px; }
.steps li { flex: 1 1 260px; display: flex; flex-direction: column; gap: 12px; }
.steps p { margin: 0; font-size: 16px; line-height: 1.6; }
.step-n { width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--white); display: flex; align-items: center; justify-content: center; font-weight: 600; }
.plans { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 24px; }
.plan { flex: 1 1 260px; max-width: 360px; display: flex; flex-direction: column; gap: 8px; }
.plan p { margin: 0; }
.price { font-size: 36px; font-weight: 700; letter-spacing: -0.03em; }
.price .muted { font-size: 15px; font-weight: 400; letter-spacing: 0; }
.faq { padding-top: 80px; padding-bottom: 80px; display: flex; flex-wrap: wrap; gap: 48px; }
.faq-list { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 8px 0; }
.faq summary { cursor: pointer; font-size: 17px; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.faq details p { margin: 4px 0 12px; max-width: 40em; font-size: 16px; line-height: 1.6; }

@media (max-width: 640px) {
  .h-hero { font-size: 44px; }
  .h-section { font-size: 30px; }
  .hero { padding-top: 32px; padding-bottom: 48px; gap: 40px; }
  .stack-xl, .faq { padding-top: 48px; padding-bottom: 48px; }
  .btn { width: 100%; }
  .btn-outline { align-self: stretch; }
}

[x-cloak] { display: none !important; }

/* onboarding */
.onboarding { max-width: 760px; padding-top: 48px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 32px; }
.steps { display: flex; flex-direction: column; gap: 14px; }
.steps-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; color: var(--muted); }
.progress { height: 6px; border-radius: 3px; background: var(--line-soft); }
.progress-bar { height: 6px; border-radius: 3px; background: var(--ink); }
.upload, .task { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.file-input { max-width: 100%; min-height: 52px; padding: 12px; border: 1px dashed var(--line-strong); border-radius: 10px; background: var(--bg-softer); font: 400 15px Onest, sans-serif; color: var(--ink); }
.error { color: #B3261E; font-weight: 500; }

/* onboarding profile forms */
.sect { display: flex; flex-direction: column; gap: 16px; }
.sect form { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.field input[type=text], .field input[type=email], .field input[type=tel], .field input[type=number], .field select, .field textarea { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 10px; font: 400 16px Onest, sans-serif; color: var(--ink); background: var(--white); }
.field textarea { min-height: 96px; resize: vertical; }
.field [aria-invalid=true] { border-color: #B3261E; }
.sect form > .field, .sect form > fieldset { align-self: stretch; }
fieldset.opts { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
fieldset.opts legend { padding: 0; margin-bottom: 8px; font-size: 14px; font-weight: 500; }
.opt { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-softer); font-size: 16px; }
.opt input { width: 22px; height: 22px; flex: none; accent-color: var(--ink); }
.tag { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 6px; background: var(--bg-soft); color: var(--muted); font-size: 12px; font-weight: 600; }
.tag-req { background: #FBEFD5; color: #6B4A0B; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; align-self: stretch; }
.loc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; align-self: stretch; }
.loc-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-softer); }
.loc-list .loc-name { font-weight: 600; flex: 1 1 auto; }
.loc-add > summary { list-style: none; display: inline-flex; align-items: center; padding-left: 0; }
.loc-add > summary::-webkit-details-marker { display: none; }
.loc-add[open] > summary { margin-bottom: 8px; }
.loc-list .loc-kind { color: var(--muted); font-size: 14px; flex: 1 1 auto; }
.loc-list form { display: inline-flex; flex-direction: row; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.photo { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.photo img { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }

/* free assessment */
.assess { padding-top: 56px; padding-bottom: 80px; display: flex; flex-direction: column; gap: 48px; }
.assess-h { max-width: 22em; font-size: clamp(30px, 5vw, 48px); }
.assess-cols { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.assess-cols > section { flex: 1 1 340px; min-width: 0; }
.issues { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.issues li { display: flex; align-items: flex-start; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.issue-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.badge { flex: none; padding: 3px 10px; border-radius: 6px; font-size: 13px; font-weight: 600; }
.badge-important { background: #FFF4E5; color: #7A4A06; }
.badge-nice { background: var(--bg-soft); color: var(--muted); }
.cta-dark { border-radius: 20px; background: var(--ink); color: var(--white); padding: 40px 24px; display: flex; flex-wrap: wrap; gap: 32px; align-items: center; justify-content: space-between; }
.cta-dark > .stack { flex: 1 1 360px; }
.cta-h { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; }
.cta-text { margin: 0; max-width: 36em; font-size: 16px; line-height: 1.6; color: #C7CEDA; }
.btn-light { background: var(--white); color: var(--ink); padding: 0 28px; }
.btn-light:hover { background: var(--bg-soft); color: var(--ink); }

/* pricing */
.pricing { padding-top: 64px; padding-bottom: 88px; display: flex; flex-direction: column; gap: 64px; }
.pr-hero { position: relative; overflow: hidden; padding: 48px; border-radius: 28px; background: var(--bg-soft); display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.pr-hero-text { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.pr-doors { flex: 0 1 380px; min-width: 0; margin: 0; padding: 24px; border-radius: 20px; background: var(--white); display: flex; flex-direction: column; gap: 18px; }
.pr-doors svg { display: block; width: 100%; height: auto; }
.pr-doors figcaption { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; text-align: center; }
.pr-doors .big { display: block; font-size: 44px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.pr-doors .note { grid-column: 1 / -1; }
.pr-plans { display: flex; flex-wrap: wrap; gap: 20px; align-items: stretch; }
.pr-plan { flex: 1 1 320px; min-width: 0; padding: 36px; border: 1px solid var(--line); border-radius: 20px; display: flex; flex-direction: column; gap: 24px; }
.pr-plan h2 { margin: 0; font-size: 22px; font-weight: 600; }
.pr-plan p { margin: 0; line-height: 1.6; }
.pr-plan .price { font-size: 48px; line-height: 1.1; }
.pr-plan .btn { margin-top: auto; width: 100%; }
.pr-pro { background: var(--ink); color: var(--white); border-color: var(--ink); }
.pr-pro .muted, .pr-pro .price .muted { color: #C7CEDA; }
.pr-pro .btn { background: var(--white); color: var(--ink); }
.pr-pro .btn:hover { background: var(--bg-soft); color: var(--ink); }
.pr-badge { padding: 4px 10px; border-radius: 999px; background: var(--brass); color: var(--white); font-size: 13px; font-weight: 600; }
.pr-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pr-section { display: flex; flex-direction: column; gap: 20px; }
.pr-section h2 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.pr-checks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px 40px; line-height: 1.5; }
.pr-checks li { display: flex; gap: 12px; }
.pr-checks svg { flex: none; margin-top: 1px; }
.pr-after { padding-top: 40px; border-top: 1px solid var(--line); }
.pr-after ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 12px; line-height: 1.55; max-width: 44em; }
@media (max-width: 600px) { .pr-hero { padding: 28px 20px; } .pr-plan { padding: 28px 22px; } }

/* setup */
.setup { padding-top: 48px; padding-bottom: 80px; display: flex; flex-direction: column; gap: 20px; max-width: 1000px; }
.setup-card { display: flex; flex-direction: column; gap: 16px; }
.setup-locked { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px 14px; background: var(--bg-softer); }
.setup-text { flex: 1 1 260px; display: flex; flex-direction: column; gap: 2px; }
.setup-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.setup-end { margin-left: auto; }
.setup-n { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--white); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; }
.setup-n-off { background: transparent; border: 2px solid var(--line-strong); color: var(--muted); }
.setup-n-done { background: #1E6B45; }
.setup-body { display: flex; flex-wrap: wrap; gap: 24px; }
.setup-preview { flex: 1 1 300px; min-width: 0; padding: 20px; background: #EEF0F4; border-radius: 12px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.setup-pdf { width: 100%; max-width: 360px; aspect-ratio: 210 / 297; background: var(--white); border-radius: 4px; box-shadow: 0 1px 3px rgba(26, 34, 51, 0.12); }
.setup-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; }
.setup-actions { flex: 1 1 340px; min-width: 0; justify-content: flex-end; }
.setup-actions .btn { align-self: flex-start; }
@media (max-width: 640px) { .setup { padding-top: 24px; padding-bottom: 48px; } }
.setup-mail-btns { display: flex; flex-wrap: wrap; gap: 12px; }
.setup-mail-btns .btn-outline { align-self: auto; }
@media (max-width: 640px) { .setup-mail-btns > form { flex: 1 1 100%; } }

.letter-preview { flex: 1 1 340px; min-width: 0; padding: 16px 18px; border-radius: 12px; background: var(--bg-softer); display: flex; flex-direction: column; gap: 8px; }
.letter-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.6; }
.empty-state { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }

.dash { padding-top: 32px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 24px; }
.dash-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px; }
.dash-cols { display: flex; flex-wrap: wrap; gap: 24px; }
.dash-cols > .card { flex: 1 1 320px; min-width: 0; }
.counter { display: flex; flex-direction: column; gap: 6px; min-width: 220px; }
.counter-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.banner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 16px 20px; border-radius: 14px; background: #FFF4E5; border: 1px solid #F0D3A6; color: #5C3A05; }
.banner-text { flex: 1 1 320px; display: flex; flex-direction: column; gap: 2px; }
.banner-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.banner .btn { background: #5C3A05; }
.filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter select, .banner-form select { min-height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--white); font: 400 16px Onest, sans-serif; color: var(--ink); }
.table-wrap { overflow-x: auto; }
.co-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.co-table th, .co-table td { padding: 12px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-soft); overflow-wrap: anywhere; }
.co-table thead th { font-size: 13px; color: var(--muted); font-weight: 600; }
.st { display: inline-block; padding: 3px 10px; border-radius: 6px; background: var(--bg-soft); font-size: 13px; font-weight: 600; white-space: nowrap; }
.st-replied { background: #E4F3E8; color: #1D5A32; }
.st-bounced, .st-stopped { background: #FBE9E7; color: #8A2018; }
.news { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.btn-danger { color: #8A2018; border-color: #8A2018; }
.btn-danger-solid { background: #8A2018; }
#stop-dlg { max-width: 480px; border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
#stop-dlg:not(.js) { position: static; display: block; border: 0; padding: 0; max-width: none; }
#stop-dlg:not(.js):not([open]) { display: block; }
#stop-dlg:not(.js) .btn-outline { display: none; }
