:root {
  --ink: #101820;
  --ink-2: #1c2a35;
  --paper: #fffaf3;
  --white: #ffffff;
  --line: #d8d2c6;
  --muted: #596a74;
  --accent: #c64124;
  --accent-2: #e86f2e;
  --gold: #b58b2a;
  --green: #157347;
  --shadow: 0 20px 55px rgba(16, 24, 32, 0.14);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); line-height: 1.55; }
a { color: inherit; }
img { max-width: 100%; display: block; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--white); padding: 10px 14px; z-index: 50; }
.skip-link:focus { left: 12px; }

.site-header {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 22px;
  padding: 14px clamp(18px, 4vw, 52px);
  background: rgba(16, 24, 32, 0.94); color: var(--white);
  backdrop-filter: blur(14px); border-bottom: 1px solid rgba(255,255,255,.1);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: var(--radius); background: var(--accent); }
.site-nav { display: flex; align-items: center; justify-content: center; gap: 18px; font-size: 14px; }
.site-nav a, .footer-links a { text-decoration: none; color: inherit; opacity: .86; }
.site-nav a:hover, .footer-links a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.header-actions, .hero-actions, .form-actions, .contact-stack { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.nav-toggle { display: none; }

.btn {
  min-height: 42px; display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 16px; border-radius: var(--radius); border: 1px solid transparent;
  text-decoration: none; font-weight: 800; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--white); box-shadow: 0 10px 24px rgba(198,65,36,.24); }
.btn-outline { border-color: rgba(255,255,255,.42); color: var(--white); background: transparent; }
.lead-form .btn-outline, .panel-form .btn-outline { color: var(--ink); border-color: var(--line); }
.btn-ghost { color: var(--white); background: rgba(255,255,255,.09); }
.btn-whatsapp { background: var(--green); color: var(--white); }
.btn-disabled { color: rgba(255,255,255,.64); border-color: rgba(255,255,255,.24); cursor: not-allowed; }

.hero {
  min-height: calc(100vh - 70px);
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(380px, .95fr);
  background: var(--ink); color: var(--white); position: relative; overflow: hidden;
}
.hero-media {
  min-height: 610px;
  background:
    linear-gradient(90deg, rgba(16,24,32,.15), rgba(16,24,32,.95)),
    url("https://images.unsplash.com/photo-1493238792000-8113da705763?auto=format&fit=crop&w=1800&q=80") center/cover;
  animation: slow-pan 18s ease-in-out infinite alternate;
}
.hero-content { display: flex; flex-direction: column; justify-content: center; padding: clamp(30px, 5vw, 70px); max-width: 760px; }
.eyebrow { margin: 0 0 10px; color: var(--accent-2); font-size: 13px; font-weight: 900; letter-spacing: 0; text-transform: uppercase; }
h1, h2, h3 { line-height: 1.08; margin: 0 0 14px; letter-spacing: 0; }
h1 { font-size: clamp(42px, 6vw, 78px); }
h2 { font-size: clamp(28px, 3.8vw, 46px); }
h3 { font-size: 21px; }
.hero p, .page-head p, .subhero p { font-size: 20px; color: rgba(255,255,255,.82); max-width: 690px; }

.trust-band {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border-bottom: 1px solid var(--line);
}
.trust-band div { background: var(--white); padding: 24px clamp(18px, 3vw, 34px); }
.trust-band strong, .trust-band span { display: block; }
.trust-band span { color: var(--muted); font-size: 14px; margin-top: 6px; }

.content-section, .lead-section, .page-head, .article-layout, .subhero {
  padding: clamp(46px, 7vw, 90px) clamp(18px, 5vw, 70px);
}
.content-section { max-width: 1240px; margin: 0 auto; }
.content-section.muted { max-width: none; background: #f0eee8; }
.narrow { max-width: 850px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr); gap: 34px; align-items: start; }

.lead-section {
  display: grid; grid-template-columns: minmax(0, .85fr) minmax(340px, 1.15fr);
  gap: clamp(24px, 4vw, 52px); align-items: start; background: var(--white);
}
.lead-form, .panel-form, .empty-state {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: clamp(20px, 3vw, 34px);
}
.lead-form fieldset { border: 0; margin: 0; padding: 0; }
.lead-form legend { font-size: 24px; font-weight: 900; margin-bottom: 18px; }
.form-progress { display: grid; gap: 8px; margin-bottom: 22px; font-weight: 800; color: var(--muted); }
progress { width: 100%; height: 9px; accent-color: var(--accent); }
.option-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.option-grid.three { grid-template-columns: repeat(3, 1fr); }
.option-grid label span {
  min-height: 58px; display: grid; place-items: center; text-align: center;
  padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); font-weight: 800; background: #fbfaf7;
}
.option-grid input { position: absolute; opacity: 0; }
.option-grid input:checked + span { border-color: var(--accent); background: #fff1ec; box-shadow: inset 0 0 0 2px var(--accent); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label { display: grid; gap: 6px; font-weight: 800; }
input, textarea, select {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 13px; font: inherit; background: var(--white); color: var(--ink);
}
textarea { resize: vertical; }
.span-2 { grid-column: 1 / -1; }
.consent { margin: 16px 0; display: flex; gap: 10px; align-items: start; font-size: 13px; color: var(--muted); font-weight: 600; }
.consent input { width: auto; margin-top: 4px; }
.form-message { margin-bottom: 0; font-weight: 800; color: var(--green); }
.match-result {
  border: 1px solid #c9d9cf; background: #f2fbf5; border-radius: var(--radius);
  padding: 16px; margin: 18px 0;
}
.match-result h3 { margin-bottom: 6px; }
.match-result [data-match-list] { display: grid; gap: 10px; margin-top: 12px; }
.match-result article {
  display: grid; gap: 3px; padding: 12px; border-radius: var(--radius);
  border: 1px solid #d7e6dc; background: var(--white);
}
.match-result span { color: var(--muted); font-size: 13px; font-weight: 800; text-transform: uppercase; }
.match-result a { color: var(--green); font-weight: 900; }

.check-list { padding: 0; list-style: none; display: grid; gap: 10px; }
.check-list li { position: relative; padding-left: 26px; }
.check-list li::before { content: ""; position: absolute; left: 0; top: 9px; width: 10px; height: 10px; border-radius: 2px; background: var(--accent); }
.steps, .article-grid, .area-grid, .link-grid { display: grid; gap: 16px; }
.steps { grid-template-columns: repeat(3, 1fr); }
.steps article, .article-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
}
.steps span { width: 42px; height: 42px; display: grid; place-items: center; background: var(--ink); color: var(--white); border-radius: 50%; font-weight: 900; margin-bottom: 14px; }
.area-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 24px; }
.area-grid span, .category-pills a, .link-grid a {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; text-decoration: none; font-weight: 800;
}
.filters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 22px 0; }
.empty-state { max-width: 760px; }
.article-grid { grid-template-columns: repeat(3, 1fr); margin: 22px 0; }
.article-card p:first-child, .meta { color: var(--muted); font-size: 13px; font-weight: 800; }
.article-card a { text-decoration: none; }
.article-card a:hover, .text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.link-grid { grid-template-columns: repeat(2, 1fr); }
.attorney-marketplace > p { max-width: 860px; color: var(--muted); }
.attorney-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: 0 12px 34px rgba(16,24,32,.08);
}
.placement {
  display: inline-flex; align-items: center; min-height: 28px; padding: 5px 9px;
  border-radius: 999px; background: #fff1ec; color: var(--accent); font-size: 12px; font-weight: 900; text-transform: uppercase;
}
.attorney-card dl { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; margin: 18px 0; }
.attorney-card dt { color: var(--muted); font-weight: 900; }
.attorney-card dd { margin: 0; }
.matching-rules, .context-cta {
  margin-top: 24px; background: #f6f3ec; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
}
.subscription-grid { display: grid; gap: 12px; margin-top: 22px; }
.subscription-grid article {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
}
.subscription-grid ul { padding-left: 20px; }
.fine-print.dark { color: var(--muted); }
.admin-head { background: #151b22; }
.admin-shell { max-width: 1500px; }
.admin-login { max-width: 520px; margin: 0 auto; }
.admin-dashboard { display: grid; gap: 20px; }
.admin-toolbar {
  display: flex; justify-content: space-between; align-items: end; gap: 18px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: 0 12px 34px rgba(16,24,32,.08);
}
.admin-toolbar p { margin: 0; color: var(--muted); }
.table-wrap {
  overflow: auto; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.admin-table {
  width: 100%; min-width: 1180px; border-collapse: collapse; font-size: 14px;
}
.admin-table th, .admin-table td {
  text-align: left; vertical-align: top; padding: 12px; border-bottom: 1px solid var(--line);
}
.admin-table th {
  position: sticky; top: 0; background: #f6f3ec; z-index: 1;
  color: var(--ink); font-size: 12px; text-transform: uppercase;
}
.admin-table td span { color: var(--muted); font-size: 12px; }
.admin-table input, .admin-table textarea, .admin-table select { min-width: 150px; font-size: 13px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.tag-row span {
  border: 1px solid var(--line); background: #f7f3eb; border-radius: 999px;
  padding: 4px 8px; color: var(--muted); font-size: 12px; font-weight: 800;
}

.subhero {
  display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1fr); gap: 38px; align-items: center;
  background: var(--ink); color: var(--white);
}
.subhero img { height: 460px; width: 100%; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.page-head { background: var(--ink); color: var(--white); }
.page-head h1 { max-width: 940px; }
.blog-tools { display: grid; grid-template-columns: minmax(260px, 380px) 1fr; gap: 20px; align-items: end; }
.category-pills { display: flex; gap: 10px; flex-wrap: wrap; }
.article-layout { max-width: 920px; margin: 0 auto; background: var(--white); }
.article-layout header p { color: var(--muted); font-size: 20px; }
.article-layout > p { font-size: 19px; }
.featured-image { width: 100%; max-height: 360px; object-fit: cover; border-radius: var(--radius); margin: 24px 0; }
.breadcrumbs { font-size: 14px; margin-bottom: 24px; color: var(--muted); }
.faq details { border-top: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 900; font-size: 18px; }
.ad-slot {
  border: 1px dashed #b9b1a3; border-radius: var(--radius); min-height: 96px;
  display: grid; place-items: center; color: var(--muted); background: #faf8f1; font-size: 13px; text-align: center; padding: 16px; margin: 16px 0;
}

.site-footer { background: var(--ink); color: var(--white); padding: 42px clamp(18px, 5vw, 70px) 110px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr .9fr 1fr; gap: 28px; }
.footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }
.fine-print { color: rgba(255,255,255,.68); font-size: 13px; max-width: 980px; }
.floating-actions {
  position: fixed; right: 18px; bottom: 18px; z-index: 25; display: grid; gap: 10px;
}
.floating-actions a, .mobile-sticky a {
  text-decoration: none; color: var(--white); border-radius: var(--radius); padding: 13px 15px; font-weight: 900; box-shadow: var(--shadow);
}
.float-whatsapp { background: var(--green); }
.float-eval { background: var(--accent); }
.mobile-sticky { display: none; }

@keyframes slow-pan {
  from { transform: scale(1.02); background-position: 45% center; }
  to { transform: scale(1.06); background-position: 55% center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; scroll-behavior: auto !important; transition-duration: .001ms !important; }
}

@media (max-width: 980px) {
  .site-header { grid-template-columns: 1fr auto; }
  .nav-toggle { display: inline-flex; justify-content: center; padding: 9px 12px; border-radius: var(--radius); border: 1px solid rgba(255,255,255,.3); color: var(--white); background: transparent; }
  .site-nav, .header-actions { display: none; }
  .site-nav.open { display: grid; grid-column: 1 / -1; justify-content: stretch; background: var(--ink-2); padding: 12px; border-radius: var(--radius); }
  .hero, .subhero, .lead-section, .two-col, .blog-tools { grid-template-columns: 1fr; }
  .hero-media { min-height: 330px; order: 2; }
  .trust-band, .steps, .article-grid, .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .area-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 680px) {
  .brand span:last-child { font-size: 14px; white-space: normal; }
  .hero { min-height: auto; }
  .hero-content { padding-bottom: 30px; }
  .hero p, .page-head p, .subhero p { font-size: 17px; }
  .trust-band, .steps, .article-grid, .area-grid, .link-grid, .field-grid, .option-grid, .option-grid.three, .filters, .footer-grid, .footer-links { grid-template-columns: 1fr; }
  .subhero img { height: 280px; }
  .floating-actions { display: none; }
  .mobile-sticky {
    display: grid; grid-template-columns: 1fr 1fr; position: fixed; z-index: 30; left: 0; right: 0; bottom: 0;
    background: var(--ink); padding: 8px; gap: 8px; box-shadow: 0 -10px 30px rgba(16,24,32,.18);
  }
  .mobile-sticky a { text-align: center; padding: 11px 8px; font-size: 13px; background: var(--accent); }
  .mobile-sticky a:first-child { background: var(--green); }
  .admin-toolbar { display: grid; }
  .admin-table { min-width: 980px; }
}
