/* =========================================================================
   TownlineGuide — Trades & Trust design system
   Kraft-paper warm base, charcoal structure, safety-orange accent.
   ========================================================================= */

:root {
  /* Base surfaces */
  --bg: #F1EBDD;
  --bg-alt: #E4DAC4;
  --bg-card: #FFFDF8;
  --bg-cream: #FCFBFA;

  /* Ink / text */
  --ink: #221F1A;
  --text-secondary: #4A4437;
  --text-muted: #6B6247;
  --text-faint: #8A8064;
  --placeholder: #9C9180;

  /* Accent */
  --accent: #C1531F;
  --accent-hover: #9E4116;

  /* Status */
  --status-pass: #3F7A4F;
  --status-warn: #B4791F;
  --status-fail: #A8391F;

  /* Dark panels */
  --panel-dark: #221F1A;
  --panel-dark-text: #E4DAC4;
  --panel-dark-text-muted: #C9BFA6;
  --code-bg: #141210;
  --code-text: #D9A272;

  /* Type */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'DM Mono', 'SFMono-Regular', Menlo, monospace;

  /* Structure */
  --hairline: 1px solid rgba(34,31,26,0.1);
  --rule: 1.5px solid rgba(34,31,26,0.2);
  --border: 2px solid var(--ink);
  --border-thick: 3px solid var(--ink);
  --radius: 2px;
  --radius-md: 3px;

  --gutter: clamp(20px, 5vw, 48px);
}

/* ---------- Reset & base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  line-height: 1.4;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }
::selection { background: var(--accent); color: var(--bg-cream); }
input::placeholder { color: var(--placeholder); }

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  z-index: 999;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
}

/* Hazard stripe strip, reused on hero + agentic hub + permit tags */
.hazard-stripe {
  background: repeating-linear-gradient(-45deg, var(--accent) 0 18px, var(--bg) 18px 36px);
}

/* =========================================================================
   Site Header
   ========================================================================= */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px var(--gutter);
  border-bottom: var(--border-thick);
  background: var(--bg);
  position: relative;
  z-index: 20;
}
.site-header__left {
  display: flex;
  align-items: center;
  gap: clamp(20px, 4vw, 44px);
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
}
.brand__mark { flex: none; width: 36px; height: 36px; }
.brand__name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.site-nav {
  display: flex;
  gap: clamp(14px, 3vw, 28px);
  flex-wrap: wrap;
}
.nav-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color .15s ease;
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--accent); }

.live-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  max-width: 100%;
  overflow: hidden;
}
.live-badge__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--status-pass);
  flex: none;
  display: inline-block;
}
.live-badge__text {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.01em;
  color: var(--bg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-toggle {
  display: none;
  border: 2px solid var(--ink);
  background: transparent;
  border-radius: var(--radius);
  width: 40px;
  height: 36px;
  align-items: center;
  justify-content: center;
  flex: none;
}
.nav-toggle svg { width: 18px; height: 14px; }

/* =========================================================================
   Hero
   ========================================================================= */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 10vw, 96px) var(--gutter) clamp(40px, 8vw, 72px);
  border-bottom: var(--border-thick);
  background: var(--panel-dark);
  color: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero .hazard-stripe {
  position: absolute; top: 0; left: 0; width: 100%; height: 10px;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 18px, var(--bg) 18px 36px);
}
.hero__permit {
  position: absolute;
  top: 40px;
  right: clamp(16px, 6vw, 80px);
  transform: rotate(-6deg);
  border: 2px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  padding: 6px 11px;
  border-radius: var(--radius);
  font-weight: 700;
}
.hero__eyebrow-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 36px 0 22px;
}
.hero__diamond {
  width: 8px; height: 8px;
  background: var(--accent);
  display: inline-block;
  transform: rotate(45deg);
}
.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.hero__title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.1;
  max-width: 900px;
  margin: 0 0 clamp(28px, 5vw, 44px);
  letter-spacing: -0.01em;
  color: var(--bg);
}
.hero__subtitle {
  font-size: 15px;
  color: var(--panel-dark-text-muted);
  max-width: 620px;
  margin: -20px 0 32px;
  line-height: 1.6;
}

/* Dual search bar */
.search-bar {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  max-width: 780px;
  border: 3px solid var(--bg);
  border-radius: var(--radius);
  background: var(--bg);
  overflow: hidden;
}
.search-bar__input {
  flex: 2 1 220px;
  border: none;
  outline: none;
  padding: 18px 20px;
  font-size: 15px;
  font-family: var(--font-sans);
  color: var(--ink);
  background: transparent;
  min-width: 0;
}
.search-bar__input--location { flex: 1 1 180px; }
.search-bar__divider {
  width: 2px;
  background: rgba(34,31,26,0.13);
}
.search-bar__submit {
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 16px 34px;
  font-family: var(--font-sans);
  text-transform: uppercase;
  flex: 1 1 100%;
  transition: background .15s ease;
}
.search-bar__submit:hover { background: var(--accent-hover); }

.search-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 840px;
  margin-top: 28px;
}
.tag-btn {
  border: 1.5px solid rgba(241,235,221,0.33);
  background: transparent;
  color: #E4DAC4;
  font-size: 12.5px;
  font-family: var(--font-mono);
  padding: 8px 14px;
  border-radius: var(--radius);
  transition: border-color .15s ease, color .15s ease;
}
.tag-btn:hover { border-color: var(--accent); color: #fff; }

/* Compact page header used on subpages */
.page-header {
  position: relative;
  overflow: hidden;
  padding: clamp(40px, 7vw, 64px) var(--gutter) clamp(32px, 6vw, 48px);
  border-bottom: var(--border-thick);
  background: var(--panel-dark);
  color: var(--bg);
}
.page-header .hazard-stripe {
  position: absolute; top: 0; left: 0; width: 100%; height: 8px;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 16px, var(--bg) 16px 32px);
}
.page-header__eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin: 20px 0 14px;
  display: block;
}
.page-header__title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.12;
  margin: 0 0 12px;
  max-width: 760px;
  color: var(--bg);
}
.page-header__desc {
  font-size: 14.5px;
  color: var(--panel-dark-text-muted);
  max-width: 620px;
  line-height: 1.65;
  margin: 0;
}

/* Breadcrumbs */
.breadcrumbs {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--panel-dark-text-muted);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.breadcrumbs a { color: var(--panel-dark-text-muted); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs__sep { opacity: .6; }

/* =========================================================================
   Regional coverage network
   ========================================================================= */
.coverage {
  padding: clamp(40px, 8vw, 56px) var(--gutter);
  border-bottom: var(--border-thick);
  background: var(--bg-alt);
}
.coverage__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
  flex-wrap: wrap;
  gap: 12px;
}
.coverage__title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 24px;
  margin: 0;
}
.coverage__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}
.coverage__desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin: 0 0 28px;
  max-width: 640px;
}
.coverage__svg { width: 100%; height: auto; }

/* =========================================================================
   Performance Ledger table
   ========================================================================= */
.ledger-section {
  padding: clamp(40px, 8vw, 64px) var(--gutter);
  border-bottom: var(--border-thick);
}
.ledger-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}
.ledger-section__title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 28px;
  margin: 0;
}
.ledger-section__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}
.ledger-wrap {
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  overflow-x: auto;
  background: var(--bg-card);
}
.ledger {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}
.ledger thead th {
  text-align: left;
  padding: 16px 22px;
  border-bottom: 3px solid var(--accent);
  background: var(--ink);
  color: var(--bg);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: var(--font-sans);
}
.ledger tbody tr {
  border-bottom: var(--hairline);
  transition: background .12s ease;
}
.ledger tbody tr:last-child { border-bottom: none; }
.ledger tbody tr:hover { background: var(--bg); }
.ledger tbody td {
  padding: 16px 22px;
  vertical-align: middle;
}
.ledger__name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.ledger__name a { color: inherit; }
.ledger__name a:hover { color: var(--accent); }
.ledger__category { font-size: 13px; color: var(--text-secondary); }
.ledger__location {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ledger__muni {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-faint);
}
.verified-badge {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius);
  padding: 2px 5px;
  transform: rotate(-4deg);
  display: inline-block;
  white-space: nowrap;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-family: var(--font-mono);
  font-weight: 600;
  white-space: nowrap;
}
.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex: none;
}
.status--pass { color: var(--status-pass); }
.status--pass .status-dot { background: var(--status-pass); }
.status--warn { color: var(--status-warn); }
.status--warn .status-dot { background: var(--status-warn); }
.status--fail { color: var(--status-fail); }
.status--fail .status-dot { background: var(--status-fail); }

.ledger-section__footnote {
  margin-top: 20px;
  text-align: right;
}
.ledger-section__footnote a {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
}
.ledger-section__footnote a:hover { text-decoration: underline; }

/* =========================================================================
   Evaluation criteria
   ========================================================================= */
.criteria-section {
  padding: clamp(40px, 8vw, 64px) var(--gutter);
  border-bottom: var(--border-thick);
  background: var(--bg-alt);
}
.criteria-section__title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 28px;
  margin: 0 0 10px;
}
.criteria-section__desc {
  font-size: 14.5px;
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.6;
  margin: 0 0 32px;
}
.criteria-list {
  border-top: var(--border-thick);
  list-style: none;
  margin: 0;
  padding: 0;
}
.criteria-row {
  display: grid;
  grid-template-columns: 44px minmax(140px,260px) minmax(200px,1fr);
  gap: clamp(12px, 3vw, 24px);
  padding: 22px 0;
  border-bottom: var(--rule);
  align-items: center;
}
.criteria-icon {
  width: 26px; height: 26px;
  border: 2px solid var(--ink);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.criteria-title { font-size: 16px; font-weight: 700; color: var(--ink); }
.criteria-desc { font-size: 13.5px; color: var(--text-secondary); line-height: 1.6; }

/* =========================================================================
   Agentic / AI hub
   ========================================================================= */
.agentic-section {
  padding: clamp(40px, 8vw, 64px) var(--gutter);
  border-bottom: var(--border-thick);
}
.agentic-hub {
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: clamp(24px, 5vw, 36px) clamp(20px, 5vw, 40px);
  background: var(--panel-dark);
  color: var(--panel-dark-text);
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  overflow: hidden;
}
.agentic-hub__stripe {
  position: absolute; top: 0; right: 0; width: 120px; height: 10px;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 14px, var(--panel-dark) 14px 28px);
}
.agentic-hub__eyebrow-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.agentic-hub__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}
.agentic-hub__eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.agentic-hub__title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 23px;
  margin: 0;
  max-width: 640px;
  color: #fff;
}
.agentic-hub__desc {
  font-size: 14px;
  color: var(--panel-dark-text-muted);
  line-height: 1.65;
  max-width: 640px;
  margin: 0;
}
.code-block {
  background: var(--code-bg);
  border: 1px solid var(--text-secondary);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--code-text);
  line-height: 1.8;
  overflow-x: auto;
}
.code-block a { color: var(--code-text); text-decoration: underline; }

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer {
  padding: clamp(40px, 8vw, 56px) var(--gutter) 32px;
}
.footer-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-top__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}
.footer-top__link {
  font-size: 12.5px;
  color: var(--accent);
  font-weight: 700;
}
.footer-top__link:hover { text-decoration: underline; }

.footer-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 28px 24px;
  margin-bottom: 48px;
}
.footer-group__head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
}
.footer-group__mark {
  width: 8px; height: 8px;
  display: inline-block;
  flex: none;
  transform: rotate(45deg);
}
.footer-group__state { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; color: var(--ink); }
.footer-group__meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-faint);
  margin: -8px 0 14px;
  font-weight: 600;
}
.footer-group__city { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 9px; }
.footer-group__city:hover { color: var(--accent); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: var(--border-thick);
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom__brand {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 16px;
}
.footer-bottom__links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-bottom__links a { font-size: 12.5px; color: var(--text-secondary); }
.footer-bottom__links a:hover { color: var(--accent); }
.footer-bottom__sig { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); }

/* =========================================================================
   Category grid (categories.html)
   ========================================================================= */
.category-section { padding: clamp(40px, 8vw, 64px) var(--gutter); border-bottom: var(--border-thick); }
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2px;
  border: var(--border-thick);
  background: var(--ink);
}
.category-card {
  background: var(--bg-card);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: background .12s ease;
}
.category-card:hover { background: var(--bg); }
.category-card__icon {
  width: 34px; height: 34px;
  border: 2px solid var(--ink);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex: none;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.category-card__name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 18px;
  color: var(--ink);
}
.category-card__desc { font-size: 13px; color: var(--text-secondary); line-height: 1.55; flex: 1; }
.category-card__count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  padding-top: 10px;
  border-top: var(--hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.category-card__count span:last-child { color: var(--accent); }

/* =========================================================================
   Municipalities / state directory
   ========================================================================= */
.state-directory { padding: clamp(40px, 8vw, 64px) var(--gutter); border-bottom: var(--border-thick); }
.state-directory__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2px;
  border: var(--border-thick);
  background: var(--ink);
}
.state-card {
  background: var(--bg-card);
  padding: 24px;
}
.state-card__head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.state-card__mark { width: 9px; height: 9px; flex: none; transform: rotate(45deg); display: inline-block; }
.state-card__name { font-family: var(--font-serif); font-weight: 700; font-size: 17px; }
.state-card__meta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-faint);
  font-weight: 600;
  margin: 0 0 16px;
}
.state-card__cities { display: flex; flex-wrap: wrap; gap: 8px; }
.state-card__city {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  border: 1.5px solid rgba(34,31,26,0.22);
  border-radius: var(--radius);
  padding: 5px 10px;
}
.state-card__city:hover { border-color: var(--accent); color: var(--accent); }

/* =========================================================================
   Filter bar (performance-registry.html)
   ========================================================================= */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: var(--rule);
}
.filter-bar__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-right: 4px;
}
.filter-chip {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
}
.filter-chip[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
}
.filter-chip:hover:not([aria-pressed="true"]) { border-color: var(--accent); color: var(--accent); }
.filter-search {
  margin-left: auto;
  display: flex;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}
.filter-search input {
  border: none;
  outline: none;
  padding: 9px 14px;
  font-size: 13px;
  background: transparent;
  color: var(--ink);
  width: 220px;
  max-width: 44vw;
}
.filter-search button {
  border: none;
  background: var(--ink);
  color: var(--bg);
  padding: 9px 16px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
}
.filter-search button:hover { background: var(--accent); }
.ledger-empty {
  padding: 40px 22px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  display: none;
}

/* =========================================================================
   Provider detail page
   ========================================================================= */
.provider-hero {
  padding: clamp(40px, 7vw, 56px) var(--gutter);
  border-bottom: var(--border-thick);
  background: var(--panel-dark);
  color: var(--bg);
  position: relative;
  overflow: hidden;
}
.provider-hero .hazard-stripe {
  position: absolute; top: 0; left: 0; width: 100%; height: 8px;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 16px, var(--bg) 16px 32px);
}
.provider-hero__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.provider-hero__id {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--panel-dark-text-muted);
  letter-spacing: 0.04em;
}
.provider-hero__name {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(28px, 4.5vw, 42px);
  color: #fff;
  margin: 10px 0 14px;
}
.provider-hero__meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--panel-dark-text-muted);
}
.provider-hero__meta strong { color: var(--bg); font-weight: 600; }
.provider-hero__stamp {
  border: 2px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  padding: 8px 14px;
  border-radius: var(--radius);
  font-weight: 700;
  transform: rotate(-4deg);
  flex: none;
}

.detail-section { padding: clamp(36px, 7vw, 56px) var(--gutter); border-bottom: var(--border-thick); }
.detail-section--alt { background: var(--bg-alt); }
.detail-section__title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 24px;
  margin: 0 0 24px;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2px;
  border: var(--border-thick);
  background: var(--ink);
}
.stat-card {
  background: var(--bg-card);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stat-card__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}
.stat-card__value {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 30px;
  color: var(--ink);
}
.stat-card__sub { font-size: 12px; color: var(--text-faint); }

.standing-list { border-top: var(--border-thick); list-style: none; margin: 0; padding: 0; }
.standing-row {
  display: grid;
  grid-template-columns: minmax(160px,240px) 1fr;
  gap: clamp(12px,3vw,24px);
  padding: 16px 0;
  border-bottom: var(--rule);
  font-size: 13.5px;
}
.standing-row dt { font-weight: 700; color: var(--ink); }
.standing-row dd { margin: 0; color: var(--text-secondary); }

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.related-card {
  border: var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.related-card:hover { border-color: var(--accent); }
.related-card__name { font-weight: 700; font-size: 14px; }
.related-card__meta { font-size: 12px; color: var(--text-muted); }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 760px) {
  .site-nav { display: none; }
  .nav-toggle { display: flex; }
  .site-header.is-open .site-nav {
    display: flex;
    flex-direction: column;
    width: 100%;
    order: 3;
    gap: 4px;
    padding-top: 12px;
    border-top: var(--hairline);
    margin-top: 8px;
  }
  .criteria-row { grid-template-columns: 40px 1fr; }
  .criteria-row > .criteria-title { grid-column: 2; }
  .criteria-row > .criteria-desc { grid-column: 1 / -1; padding-left: 0; }
  .ledger__location { min-width: 110px; }
  .filter-search { margin-left: 0; width: 100%; }
  .filter-search input { width: 100%; max-width: none; flex: 1; }
}
