:root {
  --forest: #2E6B54;
  --forest-dark: #0F2F25;
  --forest-mid: #4A8975;
  --forest-light: #7BB890;
  --forest-bg: #F5F8F6;
  --amber: #C77A15;
  --amber-bg: #FEF3E2;
  --amber-text: #663C08;
  --danger: #B91C1C;
  --danger-bg: #FEF2F2;
  --danger-text: #7C2D12;
  --gray-900: #0F1419;
  --gray-800: #1F2937;
  --gray-700: #374151;
  --gray-600: #4B5563;
  --gray-500: #6B7280;
  --gray-400: #9CA3AF;
  --gray-300: #D1D5DB;
  --gray-200: #E5E7EB;
  --gray-100: #F3F4F6;
  --gray-50: #FAFAFA;
  --page-bg: #F5F7F5;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-heading: Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--gray-800);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 8px;
  background: var(--forest-dark);
  color: white;
  padding: 10px 16px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 200;
  font-weight: 500;
  font-size: 14px;
}
.skip-link:focus { top: 8px; }

.safety-bar {
  background: var(--amber-bg);
  border-bottom: 2px solid var(--amber);
  color: var(--amber-text);
  padding: 10px 20px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header {
  background: var(--forest-dark);
  color: white;
  padding: 18px 28px;
}
.header-inner {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 500;
  color: white;
  text-decoration: none;
  letter-spacing: -0.3px;
}
.logo:hover, .logo:focus {
  color: #F5C96B;
  outline: none;
}
.main-nav {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 14px;
}
.main-nav a {
  color: #E8F0EC;
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.main-nav a:hover, .main-nav a:focus {
  color: #F5C96B;
  border-bottom-color: #F5C96B;
  outline: none;
}

main { max-width: 820px; margin: 0 auto; padding: 28px 20px; }

.breadcrumbs {
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 14px;
}
.breadcrumbs a { color: var(--forest); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs .sep { color: var(--gray-400); margin: 0 6px; }

h1 {
  font-family: var(--font-heading);
  font-size: 36px;
  line-height: 1.15;
  color: var(--forest-dark);
  margin: 0 0 10px;
  font-weight: 500;
  letter-spacing: -0.8px;
}
.subtitle {
  font-size: 17px;
  color: var(--gray-600);
  margin: 0 0 28px;
  line-height: 1.5;
}
h2 {
  font-family: var(--font-heading);
  font-size: 22px;
  line-height: 1.3;
  color: var(--forest-dark);
  margin: 0 0 6px;
  font-weight: 500;
}
h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  color: var(--forest-dark);
  font-weight: 500;
  margin: 0 0 8px;
}
p { margin: 0 0 16px; color: var(--gray-800); }
p:last-child { margin-bottom: 0; }

.prose ul, .prose ol { margin: 0 0 18px; padding-left: 24px; }
.prose li { margin-bottom: 8px; color: var(--gray-800); }
.prose p { line-height: 1.65; }

a { color: var(--forest); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--forest-dark); }
strong { font-weight: 600; color: var(--gray-900); }

sup.citation { color: var(--forest); font-weight: 500; font-size: 11px; padding: 0 1px; }
sup.citation a { text-decoration: none; }
sup.citation a:hover { text-decoration: underline; }

.card {
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: 10px;
  padding: 22px 26px;
  margin-bottom: 20px;
}
.card-header-tight { padding: 18px 26px; border-bottom: 1px solid var(--gray-200); background: var(--forest-bg); }
.card-padded { padding: 18px 26px; }
.card-zero-pad { padding: 0; }
.card h2 { margin-bottom: 6px; }
.card .section-sub { font-size: 14px; color: var(--gray-600); margin: 0 0 20px; }

.eyebrow {
  font-size: 11px;
  font-weight: 500;
  color: var(--gray-500);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.eyebrow-green { color: var(--forest); }

.short-answer {
  font-family: var(--font-heading);
  font-size: 21px;
  line-height: 1.35;
  color: var(--forest-dark);
  font-weight: 500;
}
.short-answer .hl { color: var(--forest); }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.stat {
  background: var(--forest-bg);
  border-radius: 6px;
  padding: 12px 14px;
  min-width: 0;
}
.stat-label {
  font-size: 10.5px;
  color: var(--gray-500);
  font-weight: 500;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat-value {
  font-family: var(--font-heading);
  font-size: 19px;
  color: var(--forest-dark);
  font-weight: 500;
  line-height: 1.2;
  overflow-wrap: break-word;
}
.stat-sub { font-size: 11px; color: var(--gray-500); margin-top: 2px; }

/* HORIZONTAL COMPARISON BARS */
.hcomp-row { margin-bottom: 14px; }
.hcomp-row:last-child { margin-bottom: 6px; }
.hcomp-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 4px;
  gap: 12px;
}
.hcomp-label { color: var(--forest-dark); font-weight: 500; min-width: 0; }
.hcomp-value { color: var(--gray-500); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hcomp-track {
  background: var(--gray-100);
  border-radius: 4px;
  height: 24px;
  position: relative;
  overflow: hidden;
}
.hcomp-fill { position: absolute; height: 100%; }
.hcomp-fill-primary { background: var(--forest); }
.hcomp-fill-neutral { background: var(--gray-400); }
.hcomp-fill-light { background: var(--forest-light); }
.hcomp-axis {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--gray-400);
  margin-top: 8px;
  padding: 0 2px;
}

/* GANTT CHART */
.gantt {
  position: relative;
  background: var(--gray-50);
  border-radius: 6px;
  padding: 14px 12px 10px;
}
.gantt-grid {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 8px 12px;
  align-items: center;
  font-size: 12.5px;
}
.gantt-label {
  color: var(--forest-dark);
  font-weight: 500;
  text-align: right;
  overflow-wrap: break-word;
  min-width: 0;
}
.gantt-track {
  background: white;
  border-radius: 3px;
  height: 22px;
  position: relative;
  border: 1px solid var(--gray-200);
  min-width: 0;
}
.gantt-bar {
  position: absolute;
  height: 100%;
  border-radius: 2px;
  display: flex;
  align-items: center;
  padding-left: 8px;
  font-size: 10px;
  color: white;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
}
.gantt-court { background: var(--forest); }
.gantt-work { background: var(--forest-mid); }
.gantt-wait { background: var(--amber); }
.gantt-axis-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--gray-300);
}
.gantt-axis {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--gray-500);
  font-variant-numeric: tabular-nums;
}
.gantt-legend {
  margin-top: 14px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--gray-600);
}
.swatch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.swatch-box { width: 12px; height: 12px; border-radius: 2px; flex-shrink: 0; }
.sw-forest { background: var(--forest); }
.sw-mid { background: var(--forest-mid); }
.sw-amber { background: var(--amber); }
.sw-light { background: var(--forest-light); }
.sw-neutral { background: var(--gray-400); }

/* STACKED FEE CHART */
.fee-row {
  display: grid;
  grid-template-columns: 70px 1fr 90px;
  gap: 10px;
  align-items: center;
  font-size: 12.5px;
  margin-bottom: 8px;
}
.fee-estate {
  text-align: right;
  color: var(--forest-dark);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.fee-stack {
  background: var(--gray-100);
  border-radius: 4px;
  height: 32px;
  display: flex;
  overflow: hidden;
  min-width: 0;
}
.fee-seg {
  display: flex;
  align-items: center;
  padding-left: 8px;
  color: white;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
}
.fee-seg-attorney { background: var(--forest); }
.fee-seg-executor { background: var(--forest-mid); }
.fee-total {
  color: var(--forest-dark);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.fee-note {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--amber-bg);
  border-radius: 6px;
  font-size: 13px;
  color: var(--amber-text);
  line-height: 1.5;
}

/* DONUT CHART */
.donut-layout {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}
.donut-svg {
  width: 180px;
  height: 180px;
  flex-shrink: 0;
}
.donut-legend { flex: 1; min-width: 220px; }
.donut-legend-grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 6px 12px;
  font-size: 13px;
  align-items: center;
}
.donut-note {
  border-top: 1px dashed var(--gray-300);
  margin-top: 10px;
  padding-top: 8px;
  font-size: 12.5px;
  color: var(--gray-500);
}

/* SMALL-ESTATE BAR CHART */
.sebar-row {
  display: grid;
  grid-template-columns: 100px 1fr 90px;
  gap: 6px 12px;
  align-items: center;
  font-size: 12.5px;
  margin-bottom: 6px;
}
.sebar-label {
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sebar-label.active { color: var(--forest-dark); font-weight: 500; }
.sebar-label.muted { color: var(--gray-600); }
.sebar-track { background: var(--gray-100); border-radius: 3px; height: 20px; position: relative; min-width: 0; }
.sebar-fill { height: 100%; border-radius: 3px; }
.sebar-fill.primary { background: var(--forest); }
.sebar-fill.neutral { background: var(--gray-400); }
.sebar-value { font-variant-numeric: tabular-nums; }
.sebar-value.active { color: var(--forest-dark); font-weight: 500; }
.sebar-value.muted { color: var(--gray-600); }

/* ACTION TOOLBAR */
.action-toolbar {
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 28px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.btn {
  background: white;
  border: 1px solid var(--gray-300);
  color: var(--gray-800);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover { background: var(--gray-50); border-color: var(--gray-400); }
.btn:focus { outline: 2px solid var(--forest); outline-offset: 2px; }
.btn-primary { background: var(--forest-dark); border-color: var(--forest-dark); color: white; }
.btn-primary:hover { background: var(--forest); border-color: var(--forest); }
.btn svg { flex-shrink: 0; }
.copy-confirm {
  font-size: 13px;
  color: var(--forest);
  font-weight: 500;
  margin-left: auto;
  opacity: 0;
  transition: opacity 0.3s;
}
.copy-confirm.visible { opacity: 1; }

/* SITUATION SELECTOR */
.situation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}
.situation-card {
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--gray-800);
  text-decoration: none;
  display: block;
  transition: border-color 0.15s, background 0.15s;
}
.situation-card:hover, .situation-card:focus {
  border-color: var(--forest);
  background: var(--forest-bg);
  outline: none;
}
.situation-card.active {
  background: var(--forest-bg);
  border-color: var(--forest);
  color: var(--forest-dark);
}
.situation-title { font-weight: 500; display: block; }
.situation-desc { color: var(--gray-500); font-size: 12px; display: block; margin-top: 2px; }

/* CALLOUT BOXES */
.callout {
  border-radius: 8px;
  padding: 16px 20px;
  margin: 24px 0;
  border: 1px solid;
  border-left-width: 4px;
}
.callout-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.callout-body { font-size: 15px; line-height: 1.55; }
.callout-body:last-child { margin-bottom: 0; }
.callout-link { font-size: 14px; margin-top: 8px; }

.callout-forest {
  background: white;
  border-color: var(--forest);
}
.callout-forest .callout-eyebrow { color: var(--forest); }
.callout-forest .callout-body { color: var(--gray-800); }

.callout-amber {
  background: var(--amber-bg);
  border-color: var(--amber);
}
.callout-amber .callout-eyebrow { color: var(--amber); }
.callout-amber .callout-body { color: var(--amber-text); }

.callout-danger {
  background: var(--danger-bg);
  border-color: var(--danger);
}
.callout-danger .callout-eyebrow { color: var(--danger); }
.callout-danger .callout-body { color: var(--danger-text); }

/* DATA TABLE */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: white;
}
.data-table th {
  background: var(--forest-bg);
  border-bottom: 1px solid var(--gray-300);
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  color: var(--gray-500);
  font-weight: 500;
  letter-spacing: 0.5px;
}
.data-table th.right { text-align: right; }
.data-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--gray-100);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table td.right { text-align: right; font-variant-numeric: tabular-nums; }
.data-table td.total { color: var(--forest-dark); font-weight: 500; }

/* CITATIONS */
.citations {
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: 10px;
  padding: 22px 26px;
  margin-top: 32px;
}
.citations h2 { font-size: 18px; margin-bottom: 14px; }
.citations ol { padding-left: 22px; font-size: 14px; line-height: 1.55; }
.citations li { margin-bottom: 10px; color: var(--gray-700); }
.citations a { word-break: break-word; }

/* FOOTER */
footer {
  background: var(--forest-dark);
  color: #C5D4CC;
  padding: 28px 24px;
  font-size: 13px;
  line-height: 1.5;
  margin-top: 40px;
}
.footer-inner { max-width: 820px; margin: 0 auto; }
footer .brand { color: white; font-weight: 500; margin-bottom: 6px; }
footer a { color: #A7D4BE; }
footer .disclaimer-small { font-size: 12px; opacity: 0.9; margin-top: 10px; }

/* HOMEPAGE SPECIFIC */
.path-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.path-card {
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: 10px;
  padding: 22px 24px;
  text-decoration: none;
  color: var(--gray-800);
  transition: border-color 0.15s, transform 0.15s;
}
.path-card:hover, .path-card:focus {
  border-color: var(--forest);
  transform: translateY(-2px);
  outline: none;
}
.path-card h3 {
  color: var(--forest-dark);
  margin-bottom: 6px;
  font-size: 20px;
}
.path-card p { color: var(--gray-600); font-size: 15px; margin-bottom: 0; line-height: 1.5; }

.state-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
  margin: 20px 0;
}
.state-grid a {
  display: block;
  padding: 12px 14px;
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  text-decoration: none;
  color: var(--forest);
  font-weight: 500;
  font-size: 15px;
  transition: border-color 0.15s, background 0.15s;
}
.state-grid a:hover, .state-grid a:focus {
  border-color: var(--forest);
  background: var(--forest-bg);
  outline: none;
}

/* RESPONSIVE */
@media (max-width: 640px) {
  body { font-size: 16px; }
  h1 { font-size: 28px; }
  h2 { font-size: 20px; }
  .header-inner { flex-direction: column; align-items: flex-start; }
  .main-nav { gap: 4px; font-size: 15px; width: 100%; }
  .main-nav a { padding: 12px 4px; min-height: 44px; display: flex; align-items: center; }
  .breadcrumbs a { padding: 6px 2px; display: inline-block; }
  main { padding: 20px 16px; }
  .card { padding: 18px 18px; }
  .gantt-grid { grid-template-columns: 100px 1fr; font-size: 11px; }
  .gantt-axis-row { grid-template-columns: 100px 1fr; }
  .gantt-label { font-size: 11.5px; }
  .fee-row { grid-template-columns: 60px 1fr 80px; font-size: 11.5px; }
  /* Fee bar text: hide labels on mobile since bars are too narrow for text.
     The $ amount in the right column shows the full value. */
  .fee-seg { font-size: 0; padding-left: 0; }
  .sebar-row { grid-template-columns: 80px 1fr 80px; font-size: 11.5px; }
  .stat-value { font-size: 17px; }
  .action-toolbar { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; min-height: 44px; }
  .state-grid a { padding: 14px 14px; min-height: 44px; display: flex; align-items: center; }
  /* Regional links list — full-row tap targets */
  .prose ul li a {
    display: inline-block;
    padding: 12px 0;
    min-height: 44px;
    line-height: 1.4;
  }
  /* Footer nav links — bigger tap targets on mobile */
  footer a {
    display: inline-block;
    padding: 8px 4px;
    min-height: 44px;
    line-height: 28px;
  }
}

/* ACCESSIBILITY */
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* PRINT */
.print-header { display: none; }

@media print {
  * { background: white !important; color: black !important; box-shadow: none !important; }
  body { font-size: 11pt; line-height: 1.45; background: white; }
  .safety-bar, .site-header, .main-nav, .action-toolbar,
  .breadcrumbs, .no-print, .situation-grid { display: none !important; }
  main { max-width: 100%; margin: 0; padding: 0; }
  .card { border: 1px solid #000 !important; page-break-inside: avoid; margin-bottom: 14px; padding: 12px 16px; }
  h1 { font-size: 20pt; page-break-after: avoid; }
  h2 { font-size: 14pt; page-break-after: avoid; }
  h3 { font-size: 11pt; }
  .callout { border: 2px solid #000 !important; page-break-inside: avoid; padding: 10px 14px; margin: 14px 0; }
  a { color: black !important; text-decoration: none; }
  article a[href^="http"]:after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #555 !important;
    word-break: break-all;
  }
  .citations a:after { content: ""; }
  .hcomp-track, .gantt-track, .fee-stack, .sebar-track { border: 1px solid #999 !important; }
  .hcomp-fill-primary, .gantt-court, .fee-seg-attorney, .sebar-fill.primary { background: #333 !important; }
  .hcomp-fill-neutral, .gantt-work, .fee-seg-executor { background: #888 !important; }
  .gantt-wait { background: #666 !important; }
  .sebar-fill.neutral { background: #999 !important; }
  .hcomp-fill-light { background: #AAA !important; }
  .fee-seg, .gantt-bar { color: white !important; }
  .print-header {
    display: block !important;
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
    margin-bottom: 16px;
    font-size: 10pt;
  }
  footer { background: white; color: black; padding: 16px 0 0; margin-top: 24px; border-top: 1px solid #000; }
  footer .brand { color: black; }
}

/* Byline / editorial attribution */
.byline {
  font-size: 13px;
  color: var(--gray-600);
  margin: 0 0 24px;
  padding: 10px 14px;
  background: var(--forest-bg);
  border-left: 3px solid var(--forest);
  border-radius: 4px;
}
.byline-text strong { color: var(--forest-dark); font-weight: 600; }
.byline a { color: var(--forest); }

/* FAQ section */
.faq-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-200);
}
.faq-item:first-of-type { padding-top: 8px; }
.faq-item:last-of-type { border-bottom: none; padding-bottom: 0; }
.faq-q {
  font-family: var(--font-heading);
  font-size: 17px;
  color: var(--forest-dark);
  margin: 0 0 8px;
  font-weight: 500;
}
.faq-item p { margin: 0; color: var(--gray-700); font-size: 15.5px; line-height: 1.6; }
