/* ==========================================================================
   Family Law in Ontario — Homepage styles
   Design system: warm off-white background, deep navy/teal primary,
   soft green + muted gold accents. Mobile-first, minimal animation.
   ========================================================================== */

:root {
  /* Colour tokens */
  --color-bg: #faf8f3;
  --color-bg-alt: #f2ede2;
  --color-surface: #ffffff;
  --color-navy: #16323d;
  --color-navy-dark: #0c2027;
  --color-teal: #1f4b52;
  --color-green: #4f7a5a;
  --color-green-light: #e7f0e6;
  --color-gold: #a97c25;
  --color-gold-text: #7d5f1c;
  --color-gold-light: #f6ecd7;
  --color-text: #1e2a2e;
  --color-text-muted: #47585f;
  --color-border: #e1dac8;
  --color-urgent-bg: #fbf0e7;
  --color-urgent-border: #dba876;
  --color-focus: #a97c25;

  /* Type + spacing */
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1200px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(22, 50, 61, 0.08);
  --shadow-md: 0 4px 16px rgba(22, 50, 61, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-teal);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--color-navy);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: 4px;
}

h1, h2, h3, h4 {
  color: var(--color-navy);
  line-height: 1.2;
  font-weight: 700;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 4vw + 1rem, 3rem); }
h2 { font-size: clamp(1.5rem, 2vw + 1rem, 2.1rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: clamp(2.5rem, 5vw, 4.5rem) 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-header {
  max-width: 760px;
  margin: 0 0 2rem;
}

.section-header p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-green);
  margin: 0 0 0.6rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--color-navy);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  z-index: 200;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.8rem 1.4rem;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--color-navy);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-navy-dark);
  color: #fff;
}

.btn-secondary {
  background: #fff;
  color: var(--color-navy);
  border-color: var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-navy);
  color: var(--color-navy);
}

.btn-outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn-block {
  width: 100%;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 1px 3px rgba(12, 32, 39, 0.05);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--color-navy);
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.15s ease;
}

.logo:hover {
  color: var(--color-navy);
  opacity: 0.8;
}

.logo-mark {
  flex-shrink: 0;
}

.logo-text-full { display: inline; }
.logo-text-short { display: none; }

.main-nav {
  display: none;
}

.main-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
}

.main-nav a {
  display: inline-block;
  color: var(--color-text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.5rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--color-navy);
  background: var(--color-bg-alt);
}

.main-nav a[aria-current="page"] {
  color: var(--color-navy);
  background: var(--color-green-light);
  font-weight: 700;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

/* Free-consultation click-to-call button, in the header. */
.btn-call {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--color-navy);
  border: 1.5px solid var(--color-navy);
  border-radius: 999px;
  padding: 0.5rem 0.75rem;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-call:hover {
  background: var(--color-navy-dark);
  border-color: var(--color-navy-dark);
}

.btn-call .btn-label { display: none; }

/* Slim utility bar: About + Free Consultation, above the main header row */
.utility-bar {
  display: none;
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
}

.utility-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}

.utility-bar a {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-decoration: none;
  white-space: nowrap;
}

.utility-bar a:hover {
  color: var(--color-navy);
}

.utility-call {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--color-navy) !important;
  font-weight: 700 !important;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1.5px solid var(--color-border);
  border-radius: 999px;
  padding: 0.5rem;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.menu-toggle:hover {
  border-color: var(--color-navy);
  background: var(--color-bg-alt);
}

/* Mobile nav panel */
.mobile-nav {
  display: none;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0.5rem 1.5rem 1rem;
}

.mobile-nav li + li {
  border-top: 1px solid var(--color-border);
}

.mobile-nav a {
  display: block;
  padding: 0.85rem 0.1rem;
  color: var(--color-text);
  text-decoration: none;
  font-weight: 600;
}

.mobile-nav .mobile-extra {
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

@media (min-width: 960px) {
  .main-nav { display: block; }
  .utility-bar { display: block; }
  .menu-toggle { display: none; }
  .mobile-nav { display: none !important; }
  .logo-text-full { display: inline; }
  /* The utility bar carries the full labeled call button on desktop, so the
     compact icon-only version in the crowded main header row is redundant
     there (and doesn't fit next to a full nav without overflowing). */
  .header-actions .btn-call { display: none; }
}

@media (max-width: 420px) {
  .logo-text-full { display: none; }
  .logo-text-short { display: inline; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  color: #fff;
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(3.5rem, 7vw, 6rem);
  background-color: var(--color-navy);
  /* JPEG fallback first; browsers that support image-set() use the WebP
     version below instead (roughly half the file size). If a browser
     doesn't understand image-set(), the whole second declaration is
     invalid and dropped, leaving this JPEG declaration in effect. */
  background-image:
    linear-gradient(100deg, rgba(12, 32, 39, 0.93) 0%, rgba(22, 50, 61, 0.88) 45%, rgba(31, 75, 82, 0.62) 100%),
    url("../assets/img/hero-family-law-ontario.jpg");
  background-image:
    linear-gradient(100deg, rgba(12, 32, 39, 0.93) 0%, rgba(22, 50, 61, 0.88) 45%, rgba(31, 75, 82, 0.62) 100%),
    image-set(
      url("../assets/img/hero-family-law-ontario.webp") type("image/webp") 1x,
      url("../assets/img/hero-family-law-ontario.jpg") type("image/jpeg") 1x
    );
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Fallback flat gradient for browsers/print contexts without the photo */
@media (prefers-reduced-transparency: reduce) {
  .hero {
    background-image: linear-gradient(160deg, var(--color-navy) 0%, var(--color-teal) 100%);
  }
}

.hero-inner {
  max-width: 760px;
}

.hero h1 {
  color: #fff;
  margin-bottom: 0.6em;
}

.hero-lede {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 640px;
}

.hero-search {
  margin: 2rem 0 1.75rem;
  max-width: 620px;
}

.hero-search label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #fff;
}

.search-field {
  display: flex;
  background: #fff;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.search-field input[type="search"] {
  flex: 1;
  border: none;
  padding: 0.95rem 1.1rem;
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--color-text);
}

.search-field input[type="search"]:focus {
  outline: 3px solid var(--color-navy);
  outline-offset: -3px;
}

.search-field button {
  border: none;
  background: var(--color-gold);
  color: #10120a;
  font-weight: 700;
  padding: 0 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.search-field button:hover {
  background: #c39238;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* ---------- Trust bar (under the hero) ---------- */

.trust-bar {
  background: var(--color-navy-dark);
}

.trust-bar-inner {
  display: flex;
}

.trust-item {
  flex: 1 1 0;
  text-align: center;
  padding: 1.1rem 0.75rem;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
}

.trust-item:last-child {
  border-right: none;
}

.trust-item-headline {
  display: block;
  font-size: clamp(1.05rem, 2.6vw, 1.35rem);
  font-weight: 800;
  color: var(--color-gold);
  letter-spacing: 0.01em;
}

.trust-item-caption {
  display: block;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  margin-top: 0.25rem;
}

@media (min-width: 640px) {
  .trust-item-caption { font-size: 0.72rem; }
}

/* ---------- Cards: topic grid ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.topic-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--color-text);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.topic-card:hover,
.topic-card:focus-visible {
  box-shadow: var(--shadow-md);
  border-color: var(--color-teal);
  transform: translateY(-2px);
  color: var(--color-text);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--color-green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-green);
  flex-shrink: 0;
}

.topic-card h3 {
  margin-bottom: 0.15rem;
  font-size: 1.1rem;
}

.topic-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin: 0;
}

.card-link-text {
  margin-top: auto;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-teal);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* ---------- Steps pathway ---------- */

.steps-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: 1rem;
}

.step-item {
  counter-increment: step;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  box-shadow: var(--shadow-sm);
}

.step-item::before {
  content: counter(step);
  font-weight: 800;
  color: var(--color-navy);
  background: var(--color-gold-light);
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-item h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}

.step-item a {
  font-weight: 700;
  text-decoration: none;
}

.step-item a:hover {
  text-decoration: underline;
}

.step-note {
  margin-top: 1.75rem;
  background: var(--color-green-light);
  border: 1px solid #cfe0cd;
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  color: var(--color-text);
}

.step-note strong {
  color: var(--color-navy);
}

/* ---------- Court pathway (numbered horizontal-ish) ---------- */

.pathway-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.pathway-step {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  position: relative;
}

.pathway-step .pathway-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--color-teal);
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 0.65rem;
}

.pathway-step h3 {
  font-size: 1rem;
  margin-bottom: 0;
}

.pathway-note {
  margin-top: 1.5rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* ---------- Topic directory ---------- */

.directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.directory-group {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.directory-group h3 {
  font-size: 1.1rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--color-gold-light);
  margin-bottom: 0.9rem;
}

.directory-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.directory-group li {
  position: relative;
  padding-left: 1.15rem;
}

.directory-group li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-gold);
}

.directory-group a {
  display: block;
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--color-text);
}

.directory-group a:hover {
  color: var(--color-teal);
  text-decoration: underline;
}

/* ---------- Tools ---------- */

.tools-section {
  background: var(--color-navy);
  color: #fff;
}

.tools-section .section-header h2 {
  color: #fff;
}

.tools-section .section-header p {
  color: rgba(255, 255, 255, 0.82);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.tool-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.tool-card h3 {
  color: #fff;
  font-size: 1.05rem;
  margin-bottom: 0;
}

.tool-card h3 a {
  color: #fff;
  text-decoration: none;
}

.tool-card h3 a:hover,
.tool-card h3 a:focus-visible {
  color: #fff;
  text-decoration: underline;
}

.tool-card p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
  margin: 0;
}

.tool-badge {
  align-self: flex-start;
  background: var(--color-gold-light);
  color: var(--color-navy-dark);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
}

.tool-card .card-link-text {
  color: var(--color-gold-light);
}

.tools-disclaimer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.95rem;
  max-width: 760px;
}

/* ---------- Intro content ---------- */

.intro-content {
  max-width: 760px;
}

.intro-content p {
  font-size: 1.05rem;
  color: var(--color-text);
}

/* ---------- FAQ ---------- */

.faq-list {
  display: grid;
  gap: 0.85rem;
  max-width: 820px;
}

.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.25rem 1.3rem;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  padding: 1rem 0;
  color: var(--color-navy);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary .chev {
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.faq-item[open] summary .chev {
  transform: rotate(180deg);
}

.faq-item .faq-answer {
  padding: 0 0 1.1rem;
  color: var(--color-text-muted);
}

.faq-answer a {
  font-weight: 700;
}

/* ---------- Urgent help ---------- */

.urgent-section {
  background: var(--color-urgent-bg);
  border-top: 1px solid var(--color-urgent-border);
  border-bottom: 1px solid var(--color-urgent-border);
}

.urgent-inner {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

.urgent-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
  color: var(--color-text);
}

.urgent-list li {
  padding-left: 1.4rem;
  position: relative;
}

.urgent-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-gold);
}

.urgent-resources {
  background: var(--color-surface);
  border: 1px solid var(--color-urgent-border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.urgent-resources h3 {
  font-size: 1.05rem;
}

.urgent-resources ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.urgent-resources li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px dashed var(--color-border);
  font-size: 0.95rem;
}

.urgent-resources li:last-child {
  border-bottom: none;
}

.placeholder-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-gold-text);
  border: 1px solid var(--color-gold);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
}

@media (min-width: 860px) {
  .urgent-inner {
    grid-template-columns: 1.1fr 1fr;
  }
}

/* ---------- Guides ---------- */

.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.guide-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--color-text);
}

.guide-card:hover {
  box-shadow: var(--shadow-md);
  color: var(--color-text);
}

.guide-category {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-green);
}

.guide-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0;
}

.guide-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin: 0;
}

.guide-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  padding-top: 0.6rem;
  border-top: 1px solid var(--color-border);
}

.guide-meta .card-link-text {
  margin-top: 0;
}

/* ---------- Trust section ---------- */

.trust-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

.trust-principles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.trust-principles li {
  padding-left: 1.6rem;
  position: relative;
  color: var(--color-text);
}

.trust-principles li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.4em;
  width: 9px;
  height: 9px;
  background: var(--color-green);
  border-radius: 2px;
}

.policy-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.policy-links a {
  font-weight: 700;
  text-decoration: none;
}

.policy-links a:hover {
  text-decoration: underline;
}

@media (min-width: 860px) {
  .trust-grid {
    grid-template-columns: 1.3fr 1fr;
  }
}

/* ---------- Free consultation form ---------- */

.consult-section {
  background: var(--color-bg-alt);
}

.consult-card {
  max-width: 720px;
  margin: 0 auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.consult-header {
  max-width: none;
  text-align: center;
  margin-bottom: 1.75rem;
}

.consult-header .eyebrow {
  display: block;
}

.consult-form {
  display: grid;
  gap: 1.1rem;
}

.form-row {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: 1fr;
}

.form-field {
  display: grid;
  gap: 0.4rem;
}

.form-field label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-navy);
}

.form-field input,
.form-field select,
.form-field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 3px solid var(--color-focus);
  outline-offset: 1px;
  border-color: var(--color-teal);
}

.form-field textarea {
  resize: vertical;
}

.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.form-consent input[type="checkbox"] {
  margin-top: 0.2rem;
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
}

.form-consent a {
  font-weight: 700;
}

.consult-disclaimer {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  text-align: center;
}

@media (min-width: 640px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- Contact page ---------- */

.contact-hero {
  position: relative;
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-teal) 55%, var(--color-navy-dark) 100%);
  color: #fff;
  padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2.75rem, 6vw, 4.5rem);
  overflow: hidden;
}

.contact-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.07) 0, transparent 40%),
    radial-gradient(circle at 88% 82%, rgba(169, 124, 37, 0.18) 0, transparent 45%);
  pointer-events: none;
}

.contact-hero-inner {
  position: relative;
  max-width: 780px;
}

.contact-hero .eyebrow {
  color: var(--color-gold-light);
}

.contact-hero h1 {
  color: #fff;
  font-size: clamp(2.1rem, 4.5vw, 3.1rem);
  margin: 0.6rem 0 1.1rem;
  line-height: 1.15;
}

.contact-hero-dek {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.88);
  max-width: 620px;
  margin: 0 0 2.25rem;
}

.contact-hero-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
}

.contact-hero-quick-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.contact-hero-quick-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--color-gold-light);
  flex-shrink: 0;
}

.contact-hero-quick-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.62);
  margin-bottom: 0.15rem;
}

.contact-hero-quick-item a,
.contact-hero-quick-item span.contact-hero-quick-value {
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
}

.contact-hero-quick-item a:hover {
  text-decoration: underline;
}

/* Two-column layout: info stack + form card */
.contact-layout {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
  padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(3rem, 6vw, 5rem);
}

@media (min-width: 960px) {
  .contact-layout {
    grid-template-columns: 0.85fr 1.15fr;
    align-items: start;
  }
}

.contact-info-stack {
  display: grid;
  gap: 1.5rem;
}

.contact-info-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
}

.contact-info-card-head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}

.contact-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: var(--color-green-light);
  color: var(--color-navy);
  flex-shrink: 0;
}

.contact-info-card h3 {
  font-size: 1.05rem;
  margin: 0;
}

.contact-info-card p,
.contact-info-card address {
  font-style: normal;
  color: var(--color-text-muted);
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.65;
}

.contact-info-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.85rem;
  font-weight: 700;
  color: var(--color-navy);
  text-decoration: none;
}

.contact-info-link:hover {
  text-decoration: underline;
}

.contact-map-frame {
  width: 100%;
  height: 210px;
  border: 0;
  border-radius: var(--radius-sm);
  margin-top: 1.1rem;
  display: block;
}

.contact-steps {
  display: grid;
  gap: 0.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-steps li {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  font-size: 0.93rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.contact-steps-num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--color-navy);
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
}

/* Elevated form card */
.contact-form-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 4vw, 3rem);
  box-shadow: 0 24px 55px -14px rgba(12, 32, 39, 0.25), 0 4px 18px rgba(22, 50, 61, 0.08);
  border-top: 4px solid var(--color-gold);
}

.contact-form-card .consult-header {
  text-align: left;
  max-width: none;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--color-navy-dark);
  color: rgba(255, 255, 255, 0.85);
  padding: 3rem 0 2rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 2rem;
}

.footer-col h3 {
  color: #fff;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.9rem;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-size: 0.92rem;
}

.footer-col a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-col address {
  font-style: normal;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
  line-height: 1.6;
}

.footer-disclaimer {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: 1.5rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
  max-width: 900px;
}

.footer-disclaimer strong {
  color: rgba(255, 255, 255, 0.85);
}

.footer-bottom {
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-credit {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-credit a {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
}

.footer-credit a:hover {
  color: #fff;
}

/* ---------- Misc ---------- */

.badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0;
}

.badge {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-navy);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
}

@media (min-width: 640px) {
  .hero-actions .btn { flex: 0 0 auto; }
}

/* ==========================================================================
   Article / guide pages (e.g. /separation-divorce/divorce/)
   ========================================================================== */

/* ---------- Breadcrumb ---------- */

.breadcrumb-nav {
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
}

.breadcrumb-list {
  list-style: none;
  margin: 0;
  padding: 0.7rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.breadcrumb-list li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.breadcrumb-list li + li::before {
  content: "/";
  color: var(--color-border);
}

.breadcrumb-list a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 600;
}

.breadcrumb-list a:hover {
  color: var(--color-navy);
  text-decoration: underline;
}

.breadcrumb-list li[aria-current="page"] {
  color: var(--color-navy);
  font-weight: 700;
}

/* ---------- Page hero (article header band, no photo) ---------- */

.page-hero {
  background: linear-gradient(160deg, var(--color-navy) 0%, var(--color-teal) 100%);
  color: #fff;
  padding: clamp(2.25rem, 5vw, 3.5rem) 0;
}

.page-hero .eyebrow {
  color: var(--color-gold-light);
}

.page-hero h1 {
  color: #fff;
  max-width: 820px;
}

.page-hero-dek {
  max-width: 720px;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 1.25rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.85rem;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.75);
}

.article-meta .meta-sep {
  opacity: 0.6;
}

/* ---------- Article layout ---------- */

.article-body {
  max-width: 800px;
  margin: 0 auto;
}

.article-body h2 {
  scroll-margin-top: 5.5rem;
  margin-top: 2.75rem;
  padding-top: 0.25rem;
}

.article-body > h2:first-child {
  margin-top: 0;
}

.article-body h3 {
  scroll-margin-top: 5.5rem;
  margin-top: 1.5rem;
  color: var(--color-teal);
}

.article-body p,
.article-body li {
  font-size: 1.03rem;
  color: var(--color-text);
}

.article-body ul:not([class]),
.article-body ol:not([class]) {
  padding-left: 1.3rem;
  display: grid;
  gap: 0.5rem;
}

/* ---------- Table of contents ---------- */

.toc-card {
  max-width: 800px;
  margin: 2rem auto 3rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 1.5rem 1.75rem;
  position: relative;
  z-index: 1;
}

.toc-card h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: toc;
  display: grid;
  gap: 0.55rem;
}

.toc-list li {
  counter-increment: toc;
}

.toc-list a {
  display: flex;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.95rem;
}

.toc-list a::before {
  content: counter(toc) ".";
  color: var(--color-gold-text);
  font-weight: 700;
  flex-shrink: 0;
}

.toc-list a:hover {
  color: var(--color-teal);
  text-decoration: underline;
}

@media (min-width: 700px) {
  .toc-list {
    grid-template-columns: 1fr 1fr;
    column-gap: 1.5rem;
  }
}

/* ---------- Notice / callout box ---------- */

.notice-box {
  max-width: 800px;
  margin: 0 auto 2.5rem;
  background: var(--color-bg-alt);
  border-left: 4px solid var(--color-teal);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.4rem;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.notice-box strong {
  color: var(--color-navy);
}

/* Caution variant: for genuine "pay attention" moments (deadlines vary,
   safety, high-stakes documents) — distinct from the neutral notice-box. */
.caution-box {
  max-width: 800px;
  margin: 0 auto 2.5rem;
  background: var(--color-urgent-bg);
  border-left: 4px solid var(--color-urgent-border);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.4rem;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.caution-box strong {
  color: var(--color-navy);
}

/* ---------- Comparison / decision tables inside articles ---------- */

.article-body .table-wrap {
  max-width: 800px;
  margin: 0 auto 1.75rem;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.article-body table caption {
  text-align: left;
  font-weight: 700;
  color: var(--color-navy);
  padding: 0.85rem 1rem 0;
}

.article-body th,
.article-body td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}

.article-body thead th {
  background: var(--color-bg-alt);
  color: var(--color-navy);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.article-body tbody tr:last-child th,
.article-body tbody tr:last-child td {
  border-bottom: none;
}

/* ---------- Process steps (numbered) reused inside articles ---------- */

.article-body .steps-list {
  margin: 1rem 0;
}

/* ---------- Sources list ---------- */

.sources-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}

.sources-list li {
  padding-bottom: 0.9rem;
  border-bottom: 1px dashed var(--color-border);
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.sources-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sources-list a {
  font-weight: 700;
  display: block;
  margin-bottom: 0.15rem;
}

.sources-note {
  max-width: 800px;
  margin: 1.25rem auto 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* ==========================================================================
   Interactive tool pages (e.g. /tools/child-support-calculator/)
   ========================================================================== */

.tool-embed-card {
  max-width: 800px;
  margin: 0 auto 2.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
}

.tool-embed-card iframe {
  display: block;
  width: 100%;
  max-width: 100%;
}

.tool-embed-credit {
  margin: 1rem 0 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-align: center;
}

.tool-embed-credit a {
  font-weight: 700;
}

.tool-page-content {
  max-width: 800px;
  margin: 0 auto;
}

.tool-page-content h2 {
  margin-top: 2rem;
}

.tool-page-content h2:first-child {
  margin-top: 0;
}

/* ---------- Main-nav Tools dropdown ---------- */

.nav-dropdown {
  position: relative;
}

.nav-dropdown > a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.nav-dropdown .nav-caret {
  transition: transform 0.15s ease;
}

.nav-dropdown:hover .nav-caret,
.nav-dropdown:focus-within .nav-caret {
  transform: rotate(180deg);
}

.nav-dropdown-panel {
  position: absolute;
  top: 100%;
  right: 0;
  /* No margin-top: a gap here would be a dead zone where the pointer
     leaves the hoverable area while moving from the trigger link down
     into the panel, closing the menu before it can be reached. */
  margin-top: 0;
  transform: translateY(-6px);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 1.25rem 1.5rem;
  display: flex;
  gap: 2.5rem;
  width: max-content;
  max-width: min(500px, calc(100vw - 2rem));
  opacity: 0;
  pointer-events: none;
  /* Opening is instant (see the :hover/:focus-within rule below); closing
     waits briefly so a slightly imprecise or diagonal mouse path from the
     trigger to the panel still has time to land before it disappears. */
  transition: opacity 0.15s ease 0.2s, transform 0.15s ease 0.2s;
  z-index: 60;
}

.nav-dropdown:hover .nav-dropdown-panel,
.nav-dropdown:focus-within .nav-dropdown-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.nav-dropdown-col h3 {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-green);
  margin-bottom: 0.7rem;
}

.nav-dropdown-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.nav-dropdown-col {
  width: 190px;
}

.nav-dropdown-col a {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  line-height: 1.3;
}

.nav-dropdown-col a:hover {
  color: var(--color-teal);
  text-decoration: underline;
}

.nav-dropdown-viewall {
  display: block;
  margin-top: 0.9rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  color: var(--color-teal) !important;
}

/* Mobile Tools submenu (native <details>) */

.mobile-nav-dropdown summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0.1rem;
  color: var(--color-text);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.mobile-nav-dropdown summary::-webkit-details-marker {
  display: none;
}

.mobile-nav-dropdown summary .chev {
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.mobile-nav-dropdown[open] summary .chev {
  transform: rotate(180deg);
}

.mobile-nav-dropdown-panel {
  padding: 0 0 0.9rem 0.75rem;
  display: grid;
  gap: 1rem;
}

.mobile-nav-dropdown-panel h3 {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-green);
  margin-bottom: 0.5rem;
}

.mobile-nav-dropdown-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.mobile-nav-dropdown-panel a {
  font-size: 0.9rem;
  color: var(--color-text);
  text-decoration: none;
  display: block;
  padding: 0.15rem 0;
}

.mobile-nav-dropdown-panel .mobile-nav-dropdown-viewall {
  font-weight: 700;
  color: var(--color-teal);
}

@media (max-width: 1180px) {
  .nav-dropdown-panel {
    min-width: 400px;
    gap: 1.5rem;
  }
}

/* Simplified Tools dropdown: two links to the Calculators and Wizards hubs */

.nav-dropdown-panel-simple {
  flex-direction: column;
  gap: 0.35rem;
  width: 300px;
  max-width: min(320px, calc(100vw - 2rem));
}

.nav-dropdown-maincard {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.75rem;
  border-radius: calc(var(--radius) - 4px);
  text-decoration: none;
  color: inherit;
  white-space: normal;
}

.nav-dropdown-maincard:hover,
.nav-dropdown-maincard:focus-visible {
  background: var(--color-bg);
}

.nav-dropdown-maincard .card-icon {
  width: 38px;
  height: 38px;
}

.nav-dropdown-maincard > span:not(.card-icon) {
  flex: 1;
  min-width: 0;
}

.nav-dropdown-maincard strong {
  display: block;
  font-size: 0.95rem;
  color: var(--color-navy);
  margin-bottom: 0.2rem;
}

.nav-dropdown-maincard-dek {
  display: block;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.35;
  white-space: normal;
}

.mobile-nav-dropdown-panel-simple {
  gap: 0.25rem;
}

.mobile-nav-dropdown-maincard {
  display: block;
  padding: 0.6rem 0;
  text-decoration: none;
}

.mobile-nav-dropdown-maincard strong {
  display: block;
  color: var(--color-navy);
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

.mobile-nav-dropdown-maincard span {
  display: block;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.35;
}

/* Insights mega-menu: wider dropdown grouping every topic hub */

.nav-dropdown-mega .nav-dropdown-panel-mega {
  left: 0;
  right: auto;
}

.nav-dropdown-panel-mega {
  flex-direction: column;
  gap: 0;
  width: 640px;
  max-width: min(640px, calc(100vw - 2rem));
}

.nav-mega-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.15rem 1rem;
}

@media (max-width: 1180px) {
  .nav-dropdown-panel-mega {
    width: 480px;
    max-width: min(480px, calc(100vw - 2rem));
  }
  .nav-mega-grid {
    grid-template-columns: 1fr;
  }
}

/* Tool cards on the Calculators / Wizards hub pages */

.tool-hub-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tool-hub-card.is-live {
  text-decoration: none;
  color: var(--color-text);
  transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.tool-hub-card.is-live:hover,
.tool-hub-card.is-live:focus-visible {
  box-shadow: var(--shadow-md);
  border-color: var(--color-teal);
  transform: translateY(-2px);
  color: var(--color-text);
}

.tool-hub-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.tool-hub-card h3 {
  margin-bottom: 0.15rem;
  font-size: 1.1rem;
}

.tool-hub-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin: 0;
}

/* "See all X insights" link under a Featured Insight guides-grid */

.section-viewall {
  margin-top: 1.25rem;
  text-align: center;
}

.section-viewall a {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-teal);
  text-decoration: none;
}

.section-viewall a:hover {
  text-decoration: underline;
}

/* Site search results page */

.search-results-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.search-result {
  display: block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  color: var(--color-text);
  transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.search-result:hover,
.search-result:focus-visible {
  box-shadow: var(--shadow-md);
  border-color: var(--color-teal);
  transform: translateY(-2px);
  color: var(--color-text);
}

.search-result-category {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-green);
  margin-bottom: 0.4rem;
}

.search-result h3 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  color: var(--color-navy);
}

.search-result p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.search-status {
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
}

.search-empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.search-empty-state h2 {
  margin-bottom: 0.5rem;
}

.search-empty-state p {
  color: var(--color-text-muted);
  margin-bottom: 1.25rem;
}

.search-quicklinks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.search-quicklinks a {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1.5px solid var(--color-border);
  color: var(--color-navy);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
}

.search-quicklinks a:hover {
  border-color: var(--color-teal);
  background: var(--color-bg-alt);
}

/* ---------- Featured guide card (Insights landing page) ---------- */

.guide-card-featured {
  grid-column: 1 / -1;
  display: grid;
  gap: 1.5rem;
  padding: 2rem;
  background: var(--color-bg-alt);
  border-color: var(--color-gold);
}

@media (min-width: 760px) {
  .guide-card-featured {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

.guide-card-featured-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-gold-text);
  background: var(--color-gold-light);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  margin-bottom: 0.4rem;
}

.guide-card-featured h3 {
  font-size: 1.5rem;
  margin: 0.2rem 0 0.5rem;
}

.guide-card-featured p {
  font-size: 1rem;
  max-width: 620px;
}

/* ---------- Filter / search bar (Insights landing page) ---------- */

.insights-filter {
  margin-bottom: 2rem;
}

.insights-filter-search {
  margin-bottom: 1rem;
}

.insights-filter-search input {
  width: 100%;
  max-width: 420px;
  padding: 0.7rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--color-surface);
  color: var(--color-text);
}

.insights-filter-search input:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 1px;
}

.insights-filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.filter-btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-navy);
  font-weight: 600;
  font-size: 0.88rem;
  font-family: inherit;
  cursor: pointer;
}

.filter-btn:hover {
  border-color: var(--color-teal);
  background: var(--color-bg-alt);
}

.filter-btn.is-active {
  background: var(--color-navy);
  border-color: var(--color-navy);
  color: #fff;
}

.filter-empty-state {
  display: none;
  padding: 2rem 1rem;
  text-align: center;
  color: var(--color-text-muted);
}

.filter-empty-state.is-visible {
  display: block;
}

.guide-card[hidden] {
  display: none;
}

/* ---------- Tool page FAQ (enhanced, higher-visibility variant) ---------- */

.tool-faq-section {
  background: linear-gradient(180deg, var(--color-bg-alt) 0%, var(--color-bg) 100%);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.tool-faq-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-gold-text);
  background: var(--color-gold-light);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  margin-bottom: 0.9rem;
}

.tool-faq-grid {
  display: grid;
  gap: 1rem;
  max-width: 880px;
  margin: 0 auto;
}

.tool-faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 5px solid var(--color-gold);
  border-radius: var(--radius);
  padding: 0.2rem 1.4rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.tool-faq-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.tool-faq-item[open] {
  border-left-color: var(--color-teal);
}

.tool-faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.05rem 0;
}

.tool-faq-item summary::-webkit-details-marker {
  display: none;
}

.tool-faq-number {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-gold-light);
  color: var(--color-gold-text);
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.tool-faq-item[open] .tool-faq-number {
  background: var(--color-teal);
  color: #fff;
}

.tool-faq-q {
  flex: 1;
  font-weight: 700;
  color: var(--color-navy);
  font-size: 1.03rem;
  line-height: 1.4;
  padding-top: 0.3rem;
}

.tool-faq-item summary .chev {
  flex-shrink: 0;
  margin-top: 0.55rem;
  color: var(--color-text-muted);
  transition: transform 0.15s ease;
}

.tool-faq-item[open] summary .chev {
  transform: rotate(180deg);
}

.tool-faq-answer {
  padding: 0 0 1.25rem 3.1rem;
  color: var(--color-text-muted);
  line-height: 1.62;
}

.tool-faq-answer a {
  font-weight: 700;
}

@media (max-width: 620px) {
  .tool-faq-answer {
    padding-left: 0;
    margin-top: 0.4rem;
  }
}

/* ---------- Coloured icon badges (Explore a Specific Topic) ---------- */

.card-icon-navy {
  background: var(--color-navy);
  color: #fff;
}

.card-icon-teal {
  background: var(--color-teal);
  color: #fff;
}

.card-icon-green {
  background: var(--color-green);
  color: #fff;
}

.card-icon-gold {
  background: var(--color-gold);
  color: #fff;
}

/* ---------- Courts directory ---------- */

.courts-region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.courts-region-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.courts-region-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.courts-region-head .card-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.courts-region-name {
  flex: 1;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-navy);
}

.courts-region-count {
  flex-shrink: 0;
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
}

.courts-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.1rem;
}

.courts-list li {
  padding-bottom: 1.1rem;
  border-bottom: 1px dashed var(--color-border);
}

.courts-list li:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.courts-list .court-name {
  display: block;
  font-weight: 700;
  color: var(--color-navy);
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.courts-list address {
  font-style: normal;
  color: var(--color-text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.courts-list .court-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.4rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-teal);
  text-decoration: none;
}

.courts-list .court-phone:hover {
  text-decoration: underline;
}

/* ---------- Bio hero (About Ryan Manilla) ---------- */

.bio-hero-inner {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
  align-items: center;
}

@media (min-width: 860px) {
  .bio-hero-inner {
    grid-template-columns: 1.3fr 1fr;
  }
}

.bio-hero-text .eyebrow {
  color: var(--color-gold-light);
}

.bio-hero-text p {
  max-width: 620px;
}

.bio-hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.profile-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 1.75rem 1.5rem;
  text-align: center;
  max-width: 320px;
  margin: 0 auto;
}

.profile-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 1rem;
  border: 3px solid var(--color-gold-light);
}

.profile-card-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-navy);
  margin: 0;
}

.profile-card-title {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-gold-text);
  margin: 0.2rem 0 1.1rem;
}

.profile-card-facts {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: left;
  display: grid;
  gap: 0.6rem;
}

.profile-card-facts li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.profile-card-facts svg {
  flex-shrink: 0;
  margin-top: 0.15rem;
  color: var(--color-teal);
}

/* ---------- Feature row (icon + stat, light background) ---------- */

.feature-grid {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: repeat(2, 1fr);
  text-align: center;
}

@media (min-width: 700px) {
  .feature-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.feature-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-gold-light);
  color: var(--color-gold-text);
  margin-bottom: 0.65rem;
}

.feature-item-headline {
  display: block;
  font-weight: 800;
  color: var(--color-navy);
  font-size: 1rem;
}

.feature-item-caption {
  display: block;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 0.2rem;
}

/* ---------- Bio + credentials two-column section ---------- */

.bio-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 860px) {
  .bio-grid {
    grid-template-columns: 1.6fr 1fr;
    align-items: start;
  }
}

.credentials-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.1rem;
}

.credentials-list li {
  padding-left: 1rem;
  border-left: 3px solid var(--color-gold);
}

.credentials-list .credential-title {
  display: block;
  font-weight: 700;
  color: var(--color-navy);
  font-size: 0.95rem;
}

.credentials-list .credential-caption {
  display: block;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 0.15rem;
}
