:root {
  --ink: #14213d;
  --ink-2: #3c4a66;
  --muted: #5f6b82;
  --line: #e3e6ee;
  --bg: #ffffff;
  --bg-alt: #f6f4ef;
  --card: #ffffff;
  --brand: #1f3a8a;
  --brand-2: #2b4fc7;
  --brand-soft: #e8edfb;
  --accent: #e8833a;
  --accent-soft: #fdf0e4;
  --ok: #1f8a5b;
  --ok-soft: #e4f4ec;
  --danger: #b42318;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 33, 61, .06), 0 8px 24px rgba(20, 33, 61, .06);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.6 var(--sans); color: var(--ink); background: var(--bg); }
img, svg { max-width: 100%; }
a { color: var(--brand-2); }
a:hover { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1, h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.lead { font-size: 1.15rem; color: var(--ink-2); }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--accent); margin-bottom: .75em; }
.sr-only, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px 12px; z-index: 100; }
.stack > * + * { margin-top: 20px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 2px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 999px; font: 600 1rem var(--sans);
  text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: background .15s, transform .1s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); color: #fff; }
.btn-ghost { background: #fff; color: var(--brand); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand-2); }
.btn-sm { padding: 8px 16px; font-size: .9rem; }
.btn-lg { padding: 14px 32px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: wait; }
.text-link { font-weight: 600; text-decoration: none; }

/* header */
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 600 1.3rem var(--serif); }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a:not(.btn) { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav a[aria-current="page"], .nav a:not(.btn):hover { color: var(--brand); }
.menu-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; }
@media (max-width: 960px) {
  .menu-toggle { display: block; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 8px 20px 20px; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 14px; }
}

/* hero */
.hero { padding: 64px 0 72px; background: radial-gradient(1200px 400px at 85% -10%, var(--brand-soft), transparent), linear-gradient(var(--bg), var(--bg-alt)); }
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: center; }
.hero h1 { max-width: 15ch; }
.trust-line { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-2); font-size: .95rem; margin-top: 22px; }
.page-hero { padding: 64px 0 40px; background: linear-gradient(var(--bg), var(--bg-alt)); }
.page-hero.compact { padding: 44px 0 24px; }
.page-hero .btn { margin-top: 8px; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero-art { display: none; } .hero { padding: 40px 0 48px; } }

.role-ctas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 28px; }
.role-ctas.center { max-width: 820px; margin-left: auto; margin-right: auto; text-align: left; }
.role-cta { display: flex; align-items: center; gap: 12px; padding: 16px; background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.role-cta:hover { border-color: var(--brand-2); transform: translateY(-2px); color: var(--ink); }
.role-cta strong { display: block; }
.role-cta small { color: var(--muted); }
.role-icon { font-size: 1.6rem; }
@media (max-width: 640px) { .role-ctas { grid-template-columns: 1fr; } }

.check { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--ok-soft); position: relative; margin-top: 2px; }
.check::after { content: ""; position: absolute; left: 7px; top: 4px; width: 6px; height: 11px; border: solid var(--ok); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }

/* hero art */
.card-stack { position: relative; height: 380px; }
.mini-card { position: absolute; background: #fff; border-radius: var(--radius); box-shadow: 0 18px 40px rgba(20, 33, 61, .12); padding: 18px 20px; border: 1px solid var(--line); }
.mini-card ul { list-style: none; padding: 0; margin: 10px 0 0; font-size: .9rem; color: var(--ink-2); }
.mini-card li { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.mini-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.report { top: 0; right: 10px; width: 270px; }
.plan { top: 170px; left: 0; width: 290px; }
.match { bottom: 0; right: 30px; display: flex; align-items: center; gap: 10px; width: 290px; }
.dot { width: 9px; height: 9px; border-radius: 50%; }
.dot.ok { background: var(--ok); } .dot.next { background: var(--brand-2); } .dot.due { background: var(--accent); }
.bar { height: 8px; background: var(--brand-soft); border-radius: 99px; margin: 10px 0 8px; overflow: hidden; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-2), var(--accent)); border-radius: 99px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; flex: none; border: 3px solid #fff; }
.avatar.a1 { background: linear-gradient(135deg, #f6c28b, #e8833a); }
.avatar.a2 { background: linear-gradient(135deg, #8ea8f0, #1f3a8a); margin-left: -18px; }

/* sections */
.section { padding: 72px 0; }
.section.alt { background: var(--bg-alt); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.section-head h2 { margin: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
@media (max-width: 860px) { .grid-3, .grid-2, .two-col { grid-template-columns: 1fr; gap: 24px; } .section { padding: 52px 0; } }
.tile, .card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.problems { margin-top: 28px; }
.problems .tile h3 { color: var(--brand); }
.work-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.work-list li { display: flex; gap: 16px; background: #fff; border-radius: var(--radius); padding: 20px; border: 1px solid var(--line); }
.work-list p, .tile p { margin: 0; color: var(--ink-2); }
.work-n, .step-n { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.tile .work-n { margin-bottom: 12px; }

.steps { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.steps-5 { grid-template-columns: repeat(5, 1fr); }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.step .step-n { margin-bottom: 14px; }
.step p { margin: 0; color: var(--ink-2); }
@media (max-width: 960px) { .steps-5 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .steps, .steps-5 { grid-template-columns: 1fr; } }

.timeline { list-style: none; margin: 0; padding: 0 0 0 22px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 22px 18px; }
.timeline li::before { content: ""; position: absolute; left: -30px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); }
.timeline span { font-size: .8rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.timeline strong { display: block; font-size: 1.05rem; }
.timeline p { margin: 2px 0 0; color: var(--ink-2); }

.safe-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.safe-grid li { display: flex; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.safe-grid p { margin: 4px 0 0; color: var(--ink-2); font-size: .95rem; }
@media (max-width: 860px) { .safe-grid { grid-template-columns: 1fr; } }

.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 28px 0 16px; }
.price-card { position: relative; background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.price-card.featured { border-color: var(--brand-2); }
.price { font: 600 2.4rem var(--serif); color: var(--brand); margin-bottom: 8px; }
.price small { font: 500 .95rem var(--sans); color: var(--muted); }
.price-card p { color: var(--ink-2); margin: 0; }
.badge { position: absolute; top: -12px; right: 20px; background: var(--accent); color: #fff; font-size: .75rem; font-weight: 700; padding: 4px 12px; border-radius: 99px; }
@media (max-width: 860px) { .price-grid { grid-template-columns: 1fr; } }

.point-list { padding-left: 1.2em; }
.point-list li { margin-bottom: 12px; }
.plain { padding-left: 1.2em; }
.plain li { margin-bottom: 8px; }
.report-fields { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.report-fields li { background: #fff; border-radius: var(--radius); padding: 16px 20px; border-left: 4px solid var(--accent); }
.report-fields span { display: block; color: var(--ink-2); font-size: .95rem; }

.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand-2); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 12px 0 0; color: var(--ink-2); }

.band { padding: 72px 0; background: var(--ink); color: #fff; }
.band h2 { color: #fff; }
.band .lead { color: #c9d1e3; }
.prose h2 { font-size: 1.4rem; margin-top: 1.8em; }
.prose li { margin-bottom: 8px; }

/* forms */
.form-section { padding-top: 24px; }
.interest-form .field, .auth-form .field, .profile-form .field { margin-bottom: 24px; }
.field label, .field legend { display: block; font-weight: 600; margin-bottom: 8px; }
fieldset { border: 0; padding: 0; margin: 0; }
.req { color: var(--accent); }
input[type=text], input[type=email], input[type=password], select, textarea {
  width: 100%; font: inherit; color: var(--ink); padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; }
input:focus, select:focus, textarea:focus { border-color: var(--brand-2); outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }
.field label input, .field label select { margin-top: 8px; font-weight: 400; }
.choices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.choices-wide { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) { .choices, .choices-wide { grid-template-columns: 1fr; } }
.choice { display: flex !important; align-items: center; gap: 10px; font-weight: 500 !important; margin: 0 !important; padding: 10px 12px;
  border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; background: #fff; }
.choice:has(input:checked) { border-color: var(--brand-2); background: var(--brand-soft); }
.choice input, .consent input { width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.consent { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 500 !important; }
.consent input { margin-top: 3px; }
.other-wrap { margin-top: 10px; }
.hint { color: var(--muted); font-size: .85rem; margin: 6px 0 0; }
.error, .form-error { color: var(--danger); font-size: .9rem; margin: 6px 0 0; }
.error:empty, .form-error:empty { display: none; }
.field.invalid input, .field.invalid select, .field.invalid textarea, .field.invalid .choice { border-color: var(--danger); }
.form-foot { border-top: 1px solid var(--line); padding-top: 20px; }
.form-foot .btn { margin: 8px 0 12px; }
.thanks { text-align: center; padding: 40px 28px; }
.thanks-icon { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; font-size: 1.6rem; font-weight: 700; }

/* autocomplete */
.ac { position: relative; }
.ac-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); list-style: none; margin: 0; padding: 6px; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); max-height: 280px; overflow: auto; }
.ac-list li { padding: 9px 10px; border-radius: 8px; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; }
.ac-list li[aria-selected=true], .ac-list li:hover { background: var(--brand-soft); }
.ac-list .detail { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.ac-list .free { color: var(--brand-2); }
.chips { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.chips:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--brand-soft); color: var(--brand); padding: 5px 6px 5px 12px; border-radius: 99px; font-size: .9rem; font-weight: 500; }
.chip button { border: 0; background: rgba(31, 58, 138, .12); color: var(--brand); width: 22px; height: 22px; border-radius: 50%; cursor: pointer; line-height: 1; }

/* auth & account */
.auth-section { background: var(--bg-alt); min-height: 70vh; }
.auth-wrap { max-width: 520px; }
.auth-card h1 { font-size: 2rem; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.social .btn + .btn { margin-top: 10px; }
.notice { background: var(--accent-soft); border-radius: var(--radius); padding: 16px 20px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.notice.ok { background: var(--ok-soft); }
.sub-list { list-style: none; padding: 0; margin: 0; }
.sub-list li { border-top: 1px solid var(--line); padding: 14px 0; }

/* admin */
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.kpi span { display: block; font-size: .8rem; color: var(--muted); }
.kpi strong { font: 600 1.8rem var(--serif); }
.kpi small { display: block; color: var(--muted); }
@media (max-width: 860px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.admin .card h2 { font-size: 1.15rem; font-family: var(--sans); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .8rem; }
td:last-child, th:last-child { text-align: right; }

/* footer */
.footer { background: #0f1830; color: #c9d1e3; padding: 56px 0 24px; }
.footer a { color: #e2e7f2; text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer .muted { color: #9aa6c0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-grid > div > a { display: block; padding: 4px 0; font-size: .95rem; }
.brand-footer { color: #fff; margin-bottom: 12px; }
.footer-h { font: 700 .8rem var(--sans); text-transform: uppercase; letter-spacing: .08em; color: #fff; margin-bottom: 10px; }
.footer-base { border-top: 1px solid #23304f; margin-top: 36px; padding-top: 20px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* assistant */
.chat { position: fixed; right: 20px; bottom: 20px; z-index: 50; }
.chat-launch { display: flex; align-items: center; gap: 8px; background: var(--brand); color: #fff; border: 0; border-radius: 999px; padding: 12px 18px;
  font: 600 .95rem var(--sans); cursor: pointer; box-shadow: 0 10px 30px rgba(20, 33, 61, .3); }
.chat[data-open=true] .chat-launch { display: none; }
.chat-panel { width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 100px)); background: #fff; border-radius: 18px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(20, 33, 61, .3); display: flex; flex-direction: column; }
.chat-panel[hidden] { display: none; }
.chat-head { background: var(--brand); color: #fff; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; }
.muted-inverse { color: #c9d4f5; }
.chat-close { background: none; border: 0; color: #fff; font-size: 1.6rem; cursor: pointer; line-height: 1; }
.chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--bg-alt); }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 14px; font-size: .93rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.bot { background: #fff; border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.me { background: var(--brand); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg.typing { color: var(--muted); font-style: italic; }
.chat-suggest { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 12px 0; background: var(--bg-alt); }
.chat-suggest button { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 5px 10px; font: .8rem var(--sans); color: var(--brand); cursor: pointer; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat-form input { padding: 10px 12px; }
.chat-note { margin: 0; padding: 0 12px 10px; color: var(--muted); font-size: .75rem; }
@media (max-width: 640px) { .chat { right: 12px; bottom: 12px; } .chat-launch span { display: none; } }
