/* The Right Law Firm feeder site. Mobile first; no inline styles (CSP). */
:root {
  --ink: #1c2420;
  --ink-soft: #46524b;
  --green: #205e43;
  --green-dark: #163f2e;
  --green-tint: #e9eee6;
  --orange: #b83c00;
  --orange-dark: #8f2f00;
  --paper: #fdfdfa;
  --sand: #f5f6ef;
  --line: #dfe5dd;
  --white: #fff;
  --danger: #a4241a;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(22, 63, 46, .06), 0 8px 24px rgba(22, 63, 46, .08);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--sans); overflow-x: hidden; }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-underline-offset: .18em; }
a:hover { color: var(--green-dark); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; color: var(--green-dark); margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.5rem; margin-top: 1.6em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; margin: 0 0 1em; }
li { margin-bottom: .35em; }
address { font-style: normal; }
.icon { width: 1.15em; height: 1.15em; flex: none; display: inline-block; vertical-align: -.2em; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 18px; }
.narrow { max-width: 760px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 8px; top: -60px; background: var(--white); padding: 10px 14px; border-radius: 8px; z-index: 50; }
.skip-link:focus { top: 8px; }

.review-banner { background: #fff4cc; color: #5b4300; font-size: .88rem; padding: 8px 0; border-bottom: 1px solid #ecd98a; }

/* Header */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 12px; min-height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand-mark { width: 34px; height: 34px; overflow: hidden; flex: none; }
.brand-mark img { width: 34px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.08rem; color: var(--green-dark); }
.brand-place { font-size: .78rem; color: var(--ink-soft); }
.site-nav { display: none; }
.header-call { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border-radius: 999px; background: var(--green); color: var(--white); text-decoration: none; font-weight: 600; }
.header-call:hover { background: var(--green-dark); color: var(--white); }
.header-call-text { display: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 12px 20px; border-radius: 10px; border: 2px solid transparent; font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer; text-align: center; }
.btn-primary { background: var(--orange); color: var(--white); }
.btn-primary:hover { background: var(--orange-dark); color: var(--white); }
.btn-secondary { background: var(--white); color: var(--green-dark); border-color: var(--green); }
.btn-secondary:hover { background: var(--green-tint); color: var(--green-dark); }
.btn-lg { min-height: 56px; font-size: 1.06rem; padding: 14px 24px; }
.btn[disabled] { opacity: .65; cursor: progress; }

/* Hero */
.hero { background: linear-gradient(180deg, var(--sand), var(--paper)); padding: 28px 0 8px; }
.hero-grid { display: grid; gap: 20px; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--orange); margin-bottom: .6em; }
.lead { font-size: 1.12rem; color: var(--ink-soft); }
.hero-actions { display: grid; gap: 10px; margin: 18px 0 10px; }
.hero-fee { font-weight: 600; color: var(--green-dark); }
.hero-points { list-style: none; padding: 0; margin: 0 0 8px; color: var(--ink-soft); font-size: .95rem; }
.hero-points li { padding-left: 26px; position: relative; }
.hero-points li::before { content: ""; position: absolute; left: 4px; top: .45em; width: 12px; height: 7px; border-left: 2.5px solid var(--green); border-bottom: 2.5px solid var(--green); transform: rotate(-45deg); }
.hero-art img { width: 100%; max-width: 520px; margin: 0 auto; }

/* Sections */
.band { background: var(--sand); padding: 36px 0; margin: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title { margin-top: 0; font-size: 1.6rem; }
.section-lead { color: var(--ink-soft); }
.cards { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 14px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin: 0; display: flex; flex-direction: column; }
.card p { color: var(--ink-soft); flex: 1; }
.card-num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--green-tint); color: var(--green-dark); font-weight: 700; margin-bottom: 10px; }
.card-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.how { padding: 8px 18px 0; }
.how-steps { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 14px; counter-reset: step; }
.how-steps li { counter-increment: step; position: relative; padding: 4px 0 4px 54px; margin: 0; }
.how-steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: 50%; background: var(--green); color: var(--white); display: grid; place-items: center; font-weight: 700; }
.how-steps p { color: var(--ink-soft); margin: 0; }
.how-actions { margin-top: 18px; }
.two-col { display: grid; gap: 24px; }
.link-list { list-style: none; padding: 0; }
.link-list li { border-bottom: 1px solid var(--line); margin: 0; }
.link-list a { display: block; padding: 12px 2px; font-weight: 600; text-decoration: none; }
.link-list a:hover { text-decoration: underline; }

/* FAQ */
.faq { margin: 28px 0; }
.faq details { border: 1px solid var(--line); border-radius: 10px; background: var(--white); margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 14px 44px 14px 16px; font-weight: 600; list-style: none; position: relative; min-height: 48px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 16px; top: 10px; font-size: 1.4rem; color: var(--green); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 16px 14px; margin: 0; color: var(--ink-soft); }

/* Callout */
.callout { background: var(--green-dark); color: var(--white); border-radius: 16px; padding: 24px 20px; margin: 32px 0; }
.callout h2 { color: var(--white); margin-top: 0; }
.callout p { color: #dce8e0; }
.callout .callout-fee { color: var(--white); font-weight: 600; }
.callout-actions { display: grid; gap: 10px; margin-top: 14px; }
.callout .btn-secondary { background: transparent; color: var(--white); border-color: #9cc2ad; }
.callout .btn-secondary:hover { background: rgba(255, 255, 255, .08); color: var(--white); }

/* Articles */
.crumbs { padding-top: 14px; font-size: .88rem; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px; color: var(--ink-soft); }
.crumbs li { margin: 0; }
.crumbs li:not(:last-child)::after { content: "›"; margin-left: 6px; color: #8a978f; }
.prose-wrap { padding-top: 14px; padding-bottom: 8px; }
.article-head { max-width: 760px; }
.updated { color: var(--ink-soft); font-size: .88rem; }
.prose { max-width: 760px; }
.prose h2 { font-size: 1.35rem; }
.note { background: var(--green-tint); border-left: 4px solid var(--green); padding: 14px 16px; border-radius: 0 10px 10px 0; margin: 0 0 1em; }
.note p { margin: 0; }
.related { max-width: 760px; margin: 8px 0 32px; }
.related ul { list-style: none; padding: 0; display: grid; gap: 8px; }
.related a { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); text-decoration: none; font-weight: 600; }
.page-body { padding-top: 22px; padding-bottom: 16px; }
.people { list-style: none; padding: 0; }
.draft-note { background: #fff4cc; border: 1px solid #ecd98a; padding: 8px 12px; border-radius: 8px; font-size: .9rem; }

/* Form */
.form-page { padding-top: 22px; padding-bottom: 24px; max-width: 760px; }
.form-intro .lead { margin-bottom: .5em; }
.form-alt { color: var(--ink-soft); }
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 18px 16px 20px; margin-top: 8px; }
.progress { height: 8px; border-radius: 99px; background: var(--green-tint); overflow: hidden; }
.progress-bar { display: block; height: 100%; width: 25%; background: var(--green); border-radius: 99px; transition: width .25s ease; }
.progress[data-at="2"] .progress-bar { width: 50%; }
.progress[data-at="3"] .progress-bar { width: 75%; }
.progress[data-at="4"] .progress-bar { width: 100%; }
.progress-label { font-size: .88rem; color: var(--ink-soft); margin: 8px 0 4px; }
.step h2 { margin-top: .4em; font-size: 1.4rem; }
.step h2:focus { outline: none; }
.q { border: 0; padding: 0; margin: 0 0 22px; min-width: 0; }
.q > label, .q legend { display: block; font-weight: 650; margin-bottom: 8px; padding: 0; }
.req { font-weight: 500; font-size: .8rem; color: var(--orange); margin-left: 4px; }
.hint { color: var(--ink-soft); font-size: .93rem; margin-top: -2px; }
input[type="text"], input[type="tel"], input[type="email"], input[type="date"], textarea {
  width: 100%; font: 400 1.05rem/1.4 var(--sans); color: var(--ink); background: var(--white);
  border: 1.5px solid #b8c4bc; border-radius: 10px; padding: 12px 14px; min-height: 50px; appearance: none;
}
textarea { min-height: 130px; resize: vertical; }
input:focus, textarea:focus { border-color: var(--green); outline: 3px solid rgba(32, 94, 67, .25); outline-offset: 0; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }
input[disabled] { background: var(--sand); color: #8a978f; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; margin-top: 10px; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--green); }
.check-lg { font-weight: 500; line-height: 1.45; }
.field-error { color: var(--danger); font-size: .92rem; font-weight: 600; margin: 6px 0 0; }
.form-error { background: #fbeae8; color: var(--danger); border-radius: 10px; padding: 12px 14px; font-weight: 600; }
.form-note { font-size: 1rem; color: var(--ink); margin-bottom: .6em; }

.choice { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label, .seg label {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 16px;
  border: 1.5px solid #b8c4bc; border-radius: 999px; background: var(--white); cursor: pointer; font-weight: 600; color: var(--ink);
  user-select: none; -webkit-tap-highlight-color: transparent;
}
.chips label:hover, .seg label:hover { border-color: var(--green); }
.choice:checked + label { background: var(--green); border-color: var(--green); color: var(--white); }
.choice:focus-visible + label { outline: 3px solid var(--orange); outline-offset: 2px; }
.q-yn { margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.q-yn legend { font-weight: 600; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seg label { border-radius: 10px; padding: 10px 8px; }
.step-nav { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 8px; }
.step-nav .btn-secondary { order: 2; }
.summary { margin: 0 0 12px; border: 1px solid var(--line); border-radius: 10px; padding: 4px 14px; }
.summary div { display: grid; grid-template-columns: 1fr; padding: 10px 0; border-bottom: 1px solid var(--line); }
.summary div:last-child { border-bottom: 0; }
.summary dt { font-size: .85rem; color: var(--ink-soft); }
.summary dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.privacy-note { color: var(--ink-soft); font-size: .92rem; margin-top: 14px; }

/* Thank-you */
.thanks { padding-top: 32px; padding-bottom: 24px; }
.thanks-mark { width: 56px; height: 56px; border-radius: 50%; background: var(--green); color: var(--white); display: grid; place-items: center; margin-bottom: 14px; }
.thanks-mark svg { width: 32px; height: 32px; }
.synthetic-note { background: #fff4cc; border: 1px solid #ecd98a; border-radius: 10px; padding: 10px 14px; }
.reference strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; }
.checklist li { margin-bottom: .7em; }

/* Footer */
.site-footer { background: var(--green-dark); color: #dce8e0; margin-top: 40px; padding: 32px 0 calc(96px + env(safe-area-inset-bottom)); font-size: .95rem; }
.site-footer a { color: var(--white); }
.footer-grid { display: grid; gap: 24px; }
.footer-name { color: var(--white); font-weight: 700; font-size: 1.02rem; margin-bottom: .3em; }
.footer-referral { color: var(--white); }
.footer-heading { color: var(--white); font-weight: 700; margin: 0 0 .4em; }
.footer-nav ul { list-style: none; padding: 0; margin: 0 0 1em; }
.footer-nav a { display: inline-block; padding: 6px 0; text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }
.footer-legal { border-top: 1px solid rgba(255, 255, 255, .18); margin-top: 18px; padding-top: 18px; font-size: .9rem; }


/* Mobile action bar */
.cta-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: auto 1fr; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line); box-shadow: 0 -6px 18px rgba(22, 63, 46, .1); }
.cta-bar .btn { min-height: 48px; padding: 10px 16px; }
.cta-bar-single { grid-template-columns: 1fr; }

@media (min-width: 560px) {
  .hero-actions, .callout-actions { grid-template-columns: auto auto; justify-content: start; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .step-nav { grid-template-columns: auto auto; justify-content: space-between; }
  .step-nav .btn-secondary { order: 0; }
  .step-nav .btn:only-child { grid-column: 2; }
  .summary div { grid-template-columns: 9em 1fr; gap: 12px; }
  .form-card { padding: 24px 28px 28px; }
}

@media (min-width: 900px) {
  body { font-size: 18px; }
  h1 { font-size: 2.9rem; }
  .header-inner { min-height: 76px; gap: 28px; }
  .brand-mark { width: 40px; height: 40px; }
  .brand-mark img { width: 40px; }
  .brand-name { font-size: 1.2rem; }
  .site-nav { display: flex; gap: 22px; }
  .site-nav a { text-decoration: none; font-weight: 600; color: var(--ink); padding: 8px 0; border-bottom: 2px solid transparent; }
  .site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--green-dark); border-bottom-color: var(--orange); }
  .header-call { padding: 0 18px; }
  .header-call-text { display: inline; }
  .hero { padding: 56px 0 28px; }
  .hero-grid { grid-template-columns: 1.1fr .9fr; align-items: center; gap: 40px; }
  .cards { grid-template-columns: repeat(4, 1fr); }
  .how-steps { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .two-col { grid-template-columns: 1fr 1fr; gap: 48px; }
  .callout { padding: 36px 40px; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .site-footer { padding-bottom: 32px; }
  .cta-bar { display: none; }
}

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

@media print {
  .cta-bar, .site-nav, .review-banner, .header-call { display: none !important; }
}

.operator-line { font-size: .95rem; color: var(--ink-soft); border-left: 3px solid var(--line); padding-left: 10px; }

/* Results (shown only when cleared; see web-src/results.mjs) */
.results { margin: 28px auto; }
.result-cards { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 14px; }
.result-card { background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--orange); border-radius: var(--radius); padding: 20px; margin: 0; box-shadow: var(--shadow); }
.result-type { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--ink-soft); margin-bottom: .4em; }
.result-amount { font-family: var(--serif); font-weight: 700; font-size: clamp(1.6rem, 9vw, 2.3rem); line-height: 1.05; color: var(--green-dark); margin: 0; white-space: nowrap; }
.result-label { font-weight: 800; letter-spacing: .06em; font-size: .95rem; color: var(--orange); margin: 6px 0 0; }
.result-stage { color: var(--ink-soft); margin: 8px 0 0; font-size: .95rem; }
.results-foot { margin-top: 14px; font-size: 1rem; color: var(--ink); }
@media (min-width: 560px) { .result-cards { grid-template-columns: repeat(2, 1fr); } .result-amount { font-size: clamp(1.45rem, 4vw, 2.1rem); } }
@media (min-width: 1100px) { .result-cards { grid-template-columns: repeat(4, 1fr); } .result-amount { font-size: 1.6rem; } }

/* Tables, select and footer lines */
.table-wrap { overflow-x: auto; margin: 0 0 1.2em; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
table { border-collapse: collapse; width: 100%; font-size: .97rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--green-tint); color: var(--green-dark); font-weight: 700; }
tbody tr:last-child td { border-bottom: 0; }
select { width: 100%; font: 400 1.05rem/1.4 var(--sans); color: var(--ink); background: var(--white); border: 1.5px solid #b8c4bc; border-radius: 10px; padding: 12px 14px; min-height: 50px; }
select:focus { border-color: var(--green); outline: 3px solid rgba(32, 94, 67, .25); outline-offset: 0; }
.opt { font-weight: 500; font-size: .8rem; color: var(--ink-soft); margin-left: 4px; }
.footer-strong { color: var(--white); font-weight: 600; }

@media (max-width: 359px) {
  .chips { gap: 6px; }
  .chips label { padding: 9px 11px; font-size: .94rem; min-height: 44px; }
  .seg label { font-size: .92rem; padding: 10px 4px; }
}

.btn-skip { width: 100%; margin: 0 0 18px; }
@media (min-width: 560px) { .btn-skip { width: auto; } }

/* Fee line and action under the H1 on ad landing pages */
.cta-strip { display: grid; gap: 10px; align-items: center; margin: 10px 0 4px; padding: 12px 14px; background: var(--green-tint); border-radius: 12px; }
.cta-strip-fee { margin: 0; font-weight: 700; color: var(--green-dark); }
@media (min-width: 560px) { .cta-strip { grid-template-columns: 1fr auto; } }
.form-office { color: var(--green-dark); font-weight: 600; margin-bottom: .4em; }
.hint-tip { font-style: italic; }
