:root {
  --ink: #0e1f18;
  --ink-2: #33443b;
  --muted: #5b6a62;
  --paper: #faf8f3;
  --card: #ffffff;
  --line: #e4e0d6;
  --green: #157a4a;
  --green-dark: #0d5a35;
  --green-tint: #e4f2e9;
  --amber: #8f5b08;
  --amber-tint: #fcf0dc;
  --red: #b4412f;
  --red-tint: #f8e4df;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(14, 31, 24, 0.06), 0 8px 24px rgba(14, 31, 24, 0.06);
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}
img, svg { display: block; max-width: 100%; }
a { color: var(--green-dark); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; text-wrap: pretty; }
/* Body copy is justified; hyphens keep narrow phone columns from opening gaps. */
.lede, .card p, .section-head p, .faq details > div, .legal p, .legal li, .cta-band p, .success p { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font: 600 1rem/1 var(--font); text-decoration: none; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-2); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 0.9rem; }
.btn[disabled] { opacity: 0.55; cursor: progress; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(250, 248, 243, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; font-size: 1.05rem; }
.brand-mark { width: 30px; height: 30px; }
.brand em { font-style: normal; color: var(--green); }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a:not(.btn) { color: var(--ink-2); text-decoration: none; font-size: 0.95rem; }
.nav a:not(.btn):hover { color: var(--ink); }
@media (max-width: 760px) { .nav a:not(.btn) { display: none; } }
@media (max-width: 560px) { section { padding: 48px 0; } .hero { padding: 32px 0 40px; } .cta-band { padding: 32px 22px; } .compare { padding: 16px; } }

.nav-phone { font-weight: 650; color: var(--ink) !important; white-space: nowrap; }
.call-line { margin: 18px 0 0; color: var(--ink-2); }
.call-line a { font-weight: 700; color: var(--green-dark); }
.mobile-cta { display: none; }
@media (max-width: 760px) {
  .mobile-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(250, 248, 243, 0.96); border-top: 1px solid var(--line); backdrop-filter: blur(8px); }
  body:has(.mobile-cta) { padding-bottom: 76px; }
}

/* Hero */
.hero { padding: 64px 0 56px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-block; font-size: 0.85rem; font-weight: 650; color: var(--green-dark); background: var(--green-tint); padding: 6px 12px; border-radius: 10px; margin-bottom: 18px; }
.hero h1 .hl { color: var(--green); }
.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 36em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 22px; }
.cta-row.center { justify-content: center; margin: 32px 0 0; }
@media (max-width: 560px) { .cta-row .btn { flex: 1 1 100%; } }
.ticks { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 0; margin: 0; list-style: none; font-size: 0.95rem; color: var(--ink-2); }
.ticks li::before { content: "✓"; color: var(--green); font-weight: 800; margin-right: 6px; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } .hero { padding-top: 40px; } }

/* Compare card */
.compare { background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 22px; display: grid; gap: 14px; }
.compare-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 700; }
.panel { border-radius: var(--radius); padding: 16px 18px; border: 1px solid var(--line); }
.panel-bank { background: #f6f5f1; }
.panel-us { background: var(--green-tint); border-color: #cfe6d8; }
.panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; margin-bottom: 6px; }
.panel-title { font-weight: 700; font-size: 0.95rem; white-space: nowrap; }
.score { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.03em; color: var(--muted); }
.stamp { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 10px; border-radius: 6px; }
.stamp-no { color: var(--red); background: var(--red-tint); }
.stamp-yes { color: var(--green-dark); background: #fff; }
.bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; align-items: end; height: 96px; margin: 10px 0 6px; }
.bar { background: var(--green); border-radius: 6px 6px 2px 2px; position: relative; }
.bar span { position: absolute; bottom: -22px; left: 0; right: 0; text-align: center; font-size: 0.75rem; color: var(--ink-2); }
.bar-1 { height: 96%; } .bar-2 { height: 74%; } .bar-3 { height: 82%; } .bar-4 { height: 62%; }
.avg { margin-top: 28px; font-weight: 700; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.avg b { font-size: 1.4rem; letter-spacing: -0.02em; }
.example-note { font-size: 0.75rem; color: var(--muted); margin: 0; }

/* Sections */
section { padding: 64px 0; scroll-margin-top: 72px; }
.section-alt { background: #f2efe7; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 32px; }
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .grid-4, .grid-2 { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card p:last-child { margin-bottom: 0; }
.stat { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; color: var(--green-dark); margin-bottom: 4px; }
.step-num { width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; list-style: none; }
.chips li { background: var(--card); border: 1px solid var(--line); padding: 8px 14px; border-radius: 999px; font-size: 0.95rem; }

/* Track record */
.track-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--green-tint); color: var(--green-dark); display: grid; place-items: center; font-weight: 800; font-size: 1.15rem; margin-bottom: 14px; }

/* FAQ */
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 20px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 650; padding: 18px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding-bottom: 18px; color: var(--ink-2); }

.cta-band { background: var(--ink); color: #fff; border-radius: 24px; padding: 40px 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.cta-band h2 { margin: 0; }
.cta-band p { margin: 6px 0 0; color: #c9d4ce; }

/* Footer */
.site-footer { padding: 40px 0 56px; border-top: 1px solid var(--line); font-size: 0.9rem; color: var(--ink-2); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; }
.disclaimer { font-size: 0.8rem; color: var(--muted); margin-top: 24px; }

/* Chat */
dialog.chat { width: min(440px, calc(100vw - 24px)); height: min(640px, calc(100dvh - 24px)); padding: 0; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 24px 64px rgba(14, 31, 24, 0.25); background: var(--card); color: var(--ink); }
dialog.chat[open] { display: flex; flex-direction: column; }
dialog.chat::backdrop { background: rgba(14, 31, 24, 0.45); }
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.chat-head strong { display: block; }
.chat-head .small { color: var(--muted); }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 1.1rem; color: var(--ink-2); }
.chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 16px; font-size: 0.97rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-bot { background: #f1efe9; border-bottom-left-radius: 4px; align-self: flex-start; }
.msg-user { background: var(--green); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.msg-typing { display: inline-flex; gap: 4px; align-items: center; padding: 14px 16px; }
.msg-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: typing 1.2s infinite ease-in-out; }
.msg-typing span:nth-child(2) { animation-delay: 0.15s; }
.msg-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing { 0%, 60%, 100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .msg-typing span { animation: none; } }
.chat-starters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn { border: 1px solid #cfe6d8; background: var(--green-tint); color: var(--green-dark); border-radius: 999px; padding: 8px 14px; font: 600 0.88rem var(--font); cursor: pointer; }
.chip-btn:hover { background: #d3eadc; }
.msg-action { align-self: flex-start; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; min-width: 0; }
.chat-foot { padding: 0 16px 12px; font-size: 0.75rem; color: var(--muted); }

/* Forms */
label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 6px; }
.hint { display: block; font-weight: 400; color: var(--muted); font-size: 0.85rem; margin-top: 2px; }
input, select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: #fff;
  border: 1px solid #cfcabd; border-radius: 10px; padding: 11px 12px; min-height: 46px;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(21, 122, 74, 0.25); border-color: var(--green); }
input[type="checkbox"] { width: 20px; height: 20px; min-height: 0; margin: 2px 0 0; flex: none; accent-color: var(--green); }
fieldset { border: 1px solid var(--line); background: var(--card); border-radius: var(--radius); padding: 22px; margin: 0 0 18px; }
legend { font-weight: 750; font-size: 1.1rem; padding: 0 6px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fields .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .fields { grid-template-columns: 1fr; } }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; font-size: 0.92rem; color: var(--ink-2); margin-bottom: 14px; }
.notice { border-radius: var(--radius); padding: 14px 16px; margin-bottom: 18px; font-size: 0.95rem; }
.notice-info { background: var(--green-tint); border: 1px solid #cfe6d8; }
.notice-warn { background: var(--amber-tint); border: 1px solid #f1d6a8; }
.notice-error { background: var(--red-tint); border: 1px solid #efc3b9; color: #6d2418; }
.file-list { list-style: none; padding: 0; margin: 10px 0 0; font-size: 0.9rem; color: var(--ink-2); }
.file-list li::before { content: "📄 "; }
.page-head { padding: 48px 0 16px; }
.success { text-align: center; padding: 48px 22px; }
.success .big-check { width: 64px; height: 64px; border-radius: 50%; background: var(--green-tint); color: var(--green); display: grid; place-items: center; font-size: 2rem; margin: 0 auto 16px; }

/* Legal pages */
.legal h2 { font-size: 1.3rem; margin-top: 1.6em; }
.legal li { margin-bottom: 0.4em; }

/* Admin sign-in (served before the admin stylesheet is reachable) */
.login-title { font-size: 1.4rem; }
.login-btn { margin-top: 16px; }
.login-field { margin-top: 14px; }
.login-error { margin: 12px 0 0; }

/* E-signature */
@font-face { font-family: "Dancing Script"; src: url("/fonts/dancing-script-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
.secure-badge { font-size: 0.85rem; color: var(--green-dark); font-weight: 650; white-space: nowrap; }
.sign-main { padding-bottom: 40px; }
.sign-step { margin-bottom: 18px; }
.sign-step h2 { font-size: 1.35rem; }
.step-label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--green); margin-bottom: 6px; }
.ersd { border: 1px solid var(--line); border-radius: 10px; padding: 0 16px; margin: 14px 0 18px; max-height: 340px; overflow: auto; background: #fbfaf7; }
.ersd summary { cursor: pointer; font-weight: 650; padding: 12px 0; }
.ersd h3 { font-size: 0.95rem; margin: 12px 0 4px; }
.ersd p { font-size: 0.9rem; color: var(--ink-2); text-align: justify; hyphens: auto; }
.doc-frame { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #e9e6df; margin: 6px 0 8px; }
.doc-frame iframe { width: 100%; height: min(70vh, 660px); border: 0; display: block; }
.adopt-title { margin-top: 28px; }
.tabs { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; margin-bottom: 12px; background: #fff; }
.tab { border: 0; background: transparent; padding: 8px 20px; border-radius: 999px; font: 600 0.95rem var(--font); cursor: pointer; color: var(--ink-2); }
.tab.on { background: var(--ink); color: #fff; }
.sig-pad-wrap, .sig-preview-wrap { position: relative; border: 1.5px dashed #b9b3a4; border-radius: 12px; background: #fff; margin: 0 0 10px; }
.sig-pad { width: 100%; height: 170px; display: block; touch-action: none; cursor: crosshair; }
.sig-hint { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); pointer-events: none; font-size: 0.95rem; }
.sig-preview { width: 100%; height: auto; aspect-ratio: 5 / 1; display: block; }
#pane-type input { margin-bottom: 10px; }
.legal-line { margin-top: 18px; }
.btn-wide { width: 100%; }
.decline { margin-top: 18px; }
.decline summary { cursor: pointer; color: var(--muted); font-size: 0.9rem; }
.decline textarea { margin: 8px 0; }
.sign-cta { margin-top: 18px; }

/* Generated SEO pages */
.page-hero { padding: 40px 0 48px; }
.page-hero h1 { font-size: clamp(1.9rem, 4.4vw, 2.9rem); }
.crumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.prose h2 { font-size: 1.4rem; margin-top: 1.6em; }
.prose p, .prose li { color: var(--ink-2); }
.ticks-list { list-style: none; padding: 0; margin: 0 0 1em; }
.ticks-list li { padding: 4px 0 4px 26px; position: relative; }
.ticks-list li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }
.card-link { display: block; text-decoration: none; color: inherit; transition: border-color 0.15s, transform 0.15s; }
.card-link:hover { border-color: var(--green); transform: translateY(-2px); }
.card-more { color: var(--green-dark); font-weight: 650; font-size: 0.92rem; }
.guide-card { margin-bottom: 12px; }
.center-note { text-align: center; margin-top: 24px; }
.guide-note { margin-top: 28px; }
.cta-phone { color: #fff; font-weight: 700; }
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 24px; align-items: start; }
@media (max-width: 760px) { .calc { grid-template-columns: 1fr; } }
.calc-inputs label { margin-top: 12px; }
.calc-inputs label:first-child { margin-top: 0; }
.calc-results { background: var(--ink); color: #fff; border-color: var(--ink); }
.calc-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.calc-row strong { font-size: 1.15rem; }
.calc-results .muted { color: #c9d4ce; }
.calc-results .btn { margin-top: 14px; }
.chips a { color: inherit; text-decoration: none; }
.chips li:has(a):hover { border-color: var(--green); }

/* Tap targets: at least 24px (WCAG 2.2) */
.footer-links a, .crumbs a { display: inline-block; padding: 4px 0; min-height: 24px; }
input[type="checkbox"] { width: 22px; height: 22px; }
