/* Bankruptcy Help Online: site-wide styles */

:root {
  --ink: #17212e;
  --ink-2: #3c4858;
  --muted: #5d6a7b;
  --line: #e2e7ee;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --navy: #0e2846;
  --navy-2: #163a63;
  --primary: #1b5fd0;
  --primary-dark: #154aa3;
  --primary-soft: #e8f0fd;
  --accent: #f4b63f;
  --ok: #157f3b;
  --ok-soft: #e7f5ec;
  --warn: #9a5b00;
  --warn-soft: #fff4e0;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 32, 56, .06), 0 4px 16px rgba(16, 32, 56, .06);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--primary); text-underline-offset: 2px; }
a:hover { color: var(--primary-dark); }
h1, h2, h3, h4 { line-height: 1.25; color: var(--navy); margin: 0 0 .5em; }
h1, h2 { font-family: var(--font-serif); font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.2vw, 3rem); }
h2 { font-size: clamp(1.55rem, 2.8vw, 2.1rem); }
h3 { font-size: 1.2rem; font-weight: 650; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
li { margin: .3em 0; }
:focus-visible { outline: 3px solid rgba(27, 95, 208, .45); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }
.skip-link { position: absolute; left: -9999px; top: 0; background: #fff; padding: 8px 14px; z-index: 100; }
.skip-link:focus { left: 12px; top: 12px; }
.muted { color: var(--muted); }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); margin-bottom: .6em; }

/* ---------- buttons */
.btn, .btn-secondary, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px; font: inherit; font-weight: 600; font-size: 1rem;
  text-decoration: none; cursor: pointer; border: 1.5px solid transparent; line-height: 1.3;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn { background: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.btn:hover { background: var(--primary-dark); color: #fff; }
.btn-secondary { background: #fff; color: var(--navy); border-color: #c9d2de; }
.btn-secondary:hover { border-color: var(--navy); color: var(--navy); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; border-color: #fff; }
.btn-lg { padding: 15px 28px; font-size: 1.05rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- header */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header .container { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); font-weight: 700; font-size: 1.08rem; letter-spacing: -.01em; white-space: nowrap; }
.brand:hover { color: var(--navy); }
.brand svg { width: 32px; height: 32px; flex: none; }
.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.main-nav li { margin: 0; }
.main-nav a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: .96rem; }
.main-nav a:hover { color: var(--navy); background: var(--bg); }
.main-nav a[aria-current="page"] { color: var(--primary); font-weight: 600; }
.main-nav .nav-cta a { background: var(--primary); color: #fff; margin-left: 8px; padding: 9px 16px; font-weight: 600; }
.main-nav .nav-cta a:hover { background: var(--primary-dark); color: #fff; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; padding: 10px; cursor: pointer; border-radius: 8px; }
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after {
  display: block; width: 22px; height: 2px; background: var(--navy); border-radius: 2px; position: relative; transition: transform .2s, background .2s;
}
.nav-toggle .bars::before, .nav-toggle .bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle .bars::before { top: -7px; }
.nav-toggle .bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .main-nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(16,32,56,.08); }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; padding: 8px 20px 16px; gap: 0; }
  .main-nav a { padding: 12px 8px; font-size: 1.02rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .main-nav .nav-cta a { margin: 12px 0 0; text-align: center; border-radius: 10px; border: 0; }
}

/* ---------- hero */
.hero {
  background: radial-gradient(1200px 500px at 85% -10%, #24508a 0%, transparent 60%), linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #dbe5f3; padding: 72px 0 80px;
}
.hero h1 { color: #fff; max-width: 820px; }
.hero .lead { font-size: 1.2rem; max-width: 680px; color: #d3deee; margin-bottom: 1.6em; }
.hero .eyebrow { color: var(--accent); }
.hero-points { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: .95rem; color: #c6d4e8; }
.hero-points li { margin: 0; display: flex; align-items: center; gap: 8px; }
.hero-points li::before { content: ""; width: 18px; height: 18px; flex: none; border-radius: 50%; background: rgba(244,182,63,.18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23f4b63f'%3E%3Cpath d='M8.1 13.4 4.7 10l-1.2 1.2 4.6 4.6 9-9-1.2-1.2z'/%3E%3C/svg%3E") center/12px no-repeat; }
.page-hero { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%); color: #d3deee; padding: 52px 0 56px; }
.page-hero h1 { color: #fff; font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
.page-hero p { max-width: 720px; font-size: 1.1rem; margin: 0; }
.breadcrumbs { font-size: .88rem; margin-bottom: 14px; color: #a9bbd4; }
.breadcrumbs a { color: #d3deee; text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; color: #fff; }

/* ---------- sections */
.section { padding: 72px 0; }
.section-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 36px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.card-feature { display: flex; flex-direction: column; }
.card-feature .btn, .card-feature .btn-secondary { align-self: flex-start; margin-top: auto; }
.card-feature ul { margin: 0 0 1.4em; }
.tag { display: inline-block; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); margin-bottom: 12px; }
.tag-ok { background: var(--ok-soft); color: var(--ok); }
.icon { width: 44px; height: 44px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; margin-bottom: 16px; }
.icon svg { width: 24px; height: 24px; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 24px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.steps li { counter-increment: step; margin: 0; position: relative; padding-top: 52px; }
.steps li::before { content: counter(step); position: absolute; top: 0; left: 0; width: 38px; height: 38px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; display: grid; place-items: center; }
.steps h3 { margin-bottom: .3em; }
.steps p { color: var(--ink-2); margin: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: minmax(0, 1fr); } }

.compare { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); font-size: .98rem; }
.compare th, .compare td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { background: var(--navy); color: #fff; font-weight: 600; }
.compare tbody th { font-weight: 600; color: var(--navy); width: 26%; }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }

.callout { border-radius: var(--radius); padding: 22px 26px; background: var(--primary-soft); border: 1px solid #cfdcf6; }
.callout-warn { background: var(--warn-soft); border-color: #f0d9ae; }
.callout h3 { margin-bottom: .3em; }
.callout p:last-child { margin-bottom: 0; }

.band { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%); color: #d3deee; border-radius: 16px; padding: 44px; display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.band h2 { color: #fff; margin-bottom: .3em; }
.band p { margin: 0; max-width: 620px; }

.prose { max-width: 780px; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose > :first-child { margin-top: 0; }

.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); margin: 10px 0; }
.faq summary { cursor: pointer; font-weight: 600; padding: 16px 20px; list-style: none; display: flex; justify-content: space-between; gap: 16px; color: var(--navy); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--primary); }
.faq details[open] summary::after { content: "–"; }
.faq details > *:not(summary) { padding: 0 20px; }
.faq details > p:last-child { padding-bottom: 6px; }

/* ---------- lawyer finder */
.search-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); padding: 24px; margin-top: -40px; position: relative; }
.search-card form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.search-card label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--navy); }
.search-card select, .form-control {
  width: 100%; padding: 12px 14px; font: inherit; font-size: 1rem; border: 1px solid #c4cdd9; border-radius: 10px; background: #fff; color: var(--ink);
}
.search-card select:disabled { background: var(--bg); color: var(--muted); }
@media (max-width: 640px) { .search-card form { grid-template-columns: 1fr; } }
.error-message { margin-top: 16px; padding: 14px 18px; border-radius: var(--radius-sm); background: var(--warn-soft); color: #6b4300; }
.results-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: 40px 0 16px; }
#lawyerResults { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 760px) { #lawyerResults { grid-template-columns: minmax(0, 1fr); } }
#lawyerResults:empty { display: none; }
.firm-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.firm-card h3 { font-size: 1.08rem; margin-bottom: .5em; }
.firm-card p { margin: 0 0 .35em; font-size: .95rem; color: var(--ink-2); overflow-wrap: anywhere; }
.firm-card strong { color: var(--muted); font-weight: 500; }
.empty-state { text-align: center; color: var(--muted); padding: 32px 16px; border: 1.5px dashed #cdd5e0; border-radius: var(--radius); margin-top: 40px; }

/* ---------- glossary */
.az { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 32px; position: sticky; top: 68px; background: var(--bg); padding: 12px 0; z-index: 5; border-bottom: 1px solid var(--line); }
.az a { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; background: #fff; border: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: .9rem; color: var(--navy); }
.az a:hover { border-color: var(--primary); color: var(--primary); }
.term-letter { font-family: var(--font); font-size: 1.6rem; color: var(--primary); border-bottom: 2px solid var(--line); padding-bottom: 6px; margin: 40px 0 12px; scroll-margin-top: 140px; }
.term-items dl { margin: 0; }
.term-items dt { font-weight: 650; color: var(--navy); margin-top: 18px; font-size: 1.05rem; }
.term-items dd { margin: 4px 0 0; color: var(--ink-2); }

/* ---------- forms (embedded) */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); }
.contact-side .card + .card { margin-top: 20px; }

/* ---------- footer */
.site-footer { background: #0b1f38; color: #a9b8cc; padding: 56px 0 28px; margin-top: 0; font-size: .94rem; }
.site-footer a { color: #d6e0ee; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h2 { font-family: var(--font); font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: #fff; margin-bottom: 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin: 8px 0; }
.footer-brand .brand { color: #fff; margin-bottom: 12px; }
.footer-brand p { max-width: 340px; }
.footer-legal { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-top: 22px; font-size: .85rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.footer-legal p { margin: 0; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .section { padding: 52px 0; }
  .hero { padding: 52px 0 60px; }
  .card { padding: 22px; }
  .band { padding: 30px 24px; }
}

@media print {
  .site-header, .site-footer, .skip-link { display: none !important; }
  body { background: #fff; }
}

.grid-contact { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 860px) { .grid-contact { grid-template-columns: minmax(0, 1fr); } }

.card-feature .tag { align-self: flex-start; }
@media (max-width: 640px) {
  .hero .btn-row > a, .band .btn-row > a, .band > .btn { width: 100%; }
  .az { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -20px; margin-right: -20px; padding-left: 20px; padding-right: 20px; }
  .az::-webkit-scrollbar { display: none; }
  .az a { flex: none; }
}

/* ---------- state guides and calculators */
.small { font-size: .9rem; }
.h3 { font-family: var(--font); font-size: 1.15rem; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.fact { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.fact span { display: block; font-size: .82rem; color: var(--muted); }
.fact strong { font-size: 1.35rem; color: var(--navy); font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.data-table { margin: 12px 0 6px; }
.data-table caption { text-align: left; font-weight: 600; color: var(--navy); padding: 0 0 8px; }
.data-table td { font-variant-numeric: tabular-nums; }
.court-list li { margin: 6px 0; }
.data-table td:nth-child(2):not(:last-child) { white-space: nowrap; }
.city-links, .state-grid { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 16px; }
.city-links li, .state-grid li { margin: 0; }
.state-cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.state-cards li { margin: 0; }
.state-cards a { display: block; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; text-decoration: none; color: var(--navy); height: 100%; }
.state-cards a:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.state-cards span { display: block; font-size: .85rem; color: var(--muted); margin-top: 2px; }

.calc-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 860px) { .calc-layout { grid-template-columns: minmax(0, 1fr); } }
.calc-row { margin-bottom: 16px; }
.calc-row label { display: block; font-weight: 600; color: var(--navy); margin-bottom: 6px; font-size: .95rem; }
.calc-row select, .money-input input { width: 100%; padding: 11px 13px; font: inherit; font-size: 1rem; border: 1px solid #c4cdd9; border-radius: 10px; background: #fff; color: var(--ink); }
.money-input { position: relative; display: block; }
.money-input span { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.money-input input { padding-left: 28px; }
.calc-row .help { margin: 6px 0 0; font-size: .85rem; color: var(--muted); }
.calc-result { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 8px; }
.calc-figures { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; margin: 0 0 14px; }
.calc-figures dt { color: var(--muted); }
.calc-figures dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.calc-verdict { border-radius: 10px; padding: 14px 16px; margin-bottom: 14px; border-left: 4px solid; }
.calc-verdict.ok { background: var(--ok-soft); border-color: var(--ok); }
.calc-verdict.warn { background: var(--warn-soft); border-color: var(--warn); }
.calc-verdict p { margin: 4px 0 0; }
