/* ============================================================
   Article / guide page styles
   Extends styles.css — shared header, footer, cards, buttons,
   tokens and FAQ component are already defined there.
   ============================================================ */

/* ---------------- Breadcrumb ---------------- */
.breadcrumb { padding-block: 1rem 0; }
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.breadcrumb li { display: flex; align-items: center; gap: 0.4rem; }
.breadcrumb li:not(:last-child)::after {
  content: "/";
  color: var(--border);
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--teal-700); text-decoration: underline; }
.breadcrumb li[aria-current="page"] { color: var(--burgundy-900); font-weight: 600; }

/* ---------------- Article header ---------------- */
.article { padding-block: 1.5rem clamp(3rem, 6vw, 5rem); }
.article-header {
  margin: 0;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-block: clamp(1.75rem, 4vw, 2.5rem);
  padding-inline: clamp(1.5rem, 6vw, 4.5rem);
  background: var(--burgundy-900);
  border-radius: 0;
}
.article-header-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  max-width: 1300px;
  margin-inline: auto;
}
@media (min-width: 900px) {
  .article-header-inner { grid-template-columns: 1.7fr 1fr; gap: 3rem; }
}
.article-header-main { max-width: 640px; }
.article-header-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.5rem;
}
.article-header .btn-primary { background: var(--gold-600); color: var(--burgundy-900); }
.article-header .btn-primary:hover { background: #bd8a2c; color: var(--burgundy-900); }
.article-header .btn-outline { border-color: rgba(255, 255, 255, 0.6); color: #fff; }
.article-header .btn-outline:hover { background: #fff; color: var(--burgundy-900); border-color: #fff; }

.stat-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 1.5rem 1.75rem;
}
.stat-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.stat-card li {
  display: flex;
  flex-direction: column;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.stat-card li:last-child { border-bottom: none; padding-bottom: 0; }
.stat-card li strong { font-size: 1.5rem; font-weight: 800; color: var(--gold-600); line-height: 1.1; }
.stat-card li span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
  opacity: 0.85;
  margin-top: 0.2rem;
}
.profile-intro {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin: 0 0 1.5rem;
}
.profile-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gold-600);
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
}
.profile-intro p { margin: 0; flex: 1; min-width: 240px; }
.article-cat {
  color: var(--teal-700);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.6rem;
}
.article-header .article-cat { color: var(--gold-600); }
.article-header h1 {
  color: #fff;
  margin-bottom: 1rem;
  padding-bottom: 0.9rem;
  position: relative;
}
.article-header h1::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 3px;
  border-radius: 2px;
  background: var(--gold-600);
}
.article-dek { font-size: 1.15rem; color: var(--text-muted); margin-bottom: 1rem; }
.article-meta { font-size: 0.85rem; color: var(--text-muted); margin: 0; }
.article-header .article-dek { color: #e8d5d9; }
.article-header .article-meta { color: rgba(255, 255, 255, 0.75); }
.article-hub-tag { font-size: 0.85rem; font-weight: 600; margin: 0 0 0.9rem; }
.article-hub-tag a { color: var(--gold-600); }
.article-header .article-hub-tag { color: rgba(255, 255, 255, 0.85); }

.article-header + .trust-bar {
  border-radius: var(--radius-md);
}

/* ---------------- Two-column layout ---------------- */
.article-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  max-width: 1000px;
  margin: 0 auto;
  align-items: start;
}

.article-toc {
  position: sticky;
  top: calc(1rem + 65px); /* clears the sticky site header */
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.4rem;
}
.article-toc p {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--burgundy-900);
  margin: 0 0 0.75rem;
}
.article-toc ol { counter-reset: toc; display: grid; gap: 0.55rem; }
.article-toc li { counter-increment: toc; }
.article-toc a {
  display: flex;
  gap: 0.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  line-height: 1.35;
}
.article-toc a::before {
  content: counter(toc);
  flex-shrink: 0;
  color: var(--teal-700);
  font-weight: 700;
}
.article-toc a:hover { color: var(--teal-700); }

/* ---------------- Article body typography ---------------- */
.article-content { max-width: 720px; }
.article-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.9rem;
  scroll-margin-top: 90px;
}
.article-content > h2:first-child { margin-top: 0; }
.article-content p { font-size: 1.05rem; }
.article-content .article-list { margin: 0 0 1.25rem; }
.article-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.7rem;
  font-size: 1.05rem;
}
.article-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 8px; height: 8px;
  border-radius: 999px;
  background: var(--teal-600);
}

.article-steps {
  counter-reset: article-step;
  display: grid;
  gap: 1rem;
  margin: 0 0 1.25rem;
}
.article-steps li {
  counter-increment: article-step;
  position: relative;
  padding-left: 2.4rem;
  font-size: 1.05rem;
}
.article-steps li::before {
  content: counter(article-step);
  position: absolute;
  left: 0; top: 0;
  width: 1.8rem; height: 1.8rem;
  border-radius: 999px;
  background: var(--burgundy-800);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------------- Calculator embed slot ---------------- */
/* Reserved space for an interactive tool to be embedded later.
   Replace the placeholder markup inside .calculator-slot with the
   embed code — the slot's id documents which tool goes where. */
.calculator-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.6rem;
  border: 2px dashed var(--teal-600);
  background: rgba(31, 111, 99, 0.06);
  border-radius: var(--radius-md);
  padding: clamp(1.75rem, 4vw, 2.75rem) 1.5rem;
  margin: 0 0 2.5rem;
}
.calculator-slot-icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal-700);
}
.calculator-slot h2 {
  margin: 0;
  scroll-margin-top: 90px;
}
.calculator-slot p { color: var(--text-muted); max-width: 480px; margin: 0; }
.calculator-slot-badge {
  display: inline-block;
  background: var(--gold-100);
  color: var(--gold-600);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
}

/* ---------------- Calculator embed (live tool) ---------------- */
.calculator-embed {
  margin: 0 0 1.5rem;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.calculator-embed h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  scroll-margin-top: 90px;
}
.calculator-embed iframe {
  display: block;
  width: 100%;
  border: none;
}
.calculator-credit {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---------------- Callout boxes ---------------- */
.callout {
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold-600);
  background: var(--gold-100);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.3rem;
  margin: 1.25rem 0 1.5rem;
}
.callout-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold-600);
  margin-bottom: 0.4rem;
}
.callout p:last-child { margin-bottom: 0; }

.callout--caution {
  border-left-color: var(--burgundy-800);
  background: var(--burgundy-100);
}
.callout--caution .callout-label { color: var(--burgundy-800); }

/* ---------------- Comparison tables ---------------- */
.comparison-table-wrap { overflow-x: auto; margin: 1.25rem 0 1.5rem; }
.comparison-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.comparison-table th,
.comparison-table td {
  border: 1px solid var(--border);
  padding: 0.65rem 0.85rem;
  text-align: left;
  vertical-align: top;
}
.comparison-table th {
  background: var(--burgundy-100);
  color: var(--burgundy-900);
  font-weight: 700;
}

/* ---------------- Related guides ---------------- */
.article-next {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.article-next h2 { margin-top: 0; margin-bottom: 1.25rem; scroll-margin-top: 0; }
.article-next .card-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* ---------------- Courts directory ---------------- */
.courts-region-grid {
  column-count: 1;
  column-gap: 1.25rem;
  margin: 1.5rem 0 2rem;
}
@media (min-width: 640px) { .courts-region-grid { column-count: 2; } }
@media (min-width: 1100px) { .courts-region-grid { column-count: 3; } }
.courts-region-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 1.4rem;
  margin: 0 0 1.25rem;
  break-inside: avoid;
  display: block;
}
.courts-region-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.courts-region-head h3 {
  flex: 1;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--burgundy-900);
  margin: 0;
}
.courts-region-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  background: var(--burgundy-800);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}
.courts-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1.1rem; }
.courts-list li:not(:last-child) { padding-bottom: 1.1rem; border-bottom: 1px dashed var(--border); }
.court-name { font-weight: 700; color: var(--burgundy-900); margin: 0 0 0.25rem; font-size: 0.98rem; }
.court-address { font-style: normal; color: var(--text-muted); font-size: 0.88rem; margin: 0 0 0.3rem; line-height: 1.4; }
.court-phone { font-size: 0.88rem; font-weight: 600; color: var(--teal-700); text-decoration: none; }
.court-phone:hover { text-decoration: underline; }

/* ---------------- Responsive ---------------- */
@media (max-width: 860px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-toc {
    position: static;
    order: -1;
  }
  .article-toc ol { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.5rem 1.5rem; }
}
