:root {
  color-scheme: light;
  --ink: #102c43;
  --muted: #5d6f78;
  --teal: #2f7776;
  --teal-soft: #e7f0ed;
  --line: #d7dcd7;
  --paper: #faf9f5;
  --white: #fffefa;
  --serif: 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-family: var(--sans);
}

* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); }
body { margin: 0; min-width: 320px; line-height: 1.5; }
body, button, input { font-family: var(--sans); }
a { color: inherit; }
button, input { font-size: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.shell { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }

.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); background: rgba(250, 249, 245, .96); }
.nav-shell { display: flex; align-items: center; justify-content: space-between; min-height: 66px; gap: 32px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font: 600 16px/1 var(--serif); text-decoration: none; letter-spacing: -.02em; white-space: nowrap; }
.wordmark-mark { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--ink); color: var(--paper); background: var(--ink); font: 700 10px/1 var(--sans); letter-spacing: .06em; }
.site-header nav { display: flex; align-items: center; gap: 30px; color: var(--ink); font-size: 12px; }
.site-header nav a { position: relative; text-decoration: none; }
.site-header nav a::after { position: absolute; right: 0; bottom: -8px; left: 0; height: 1px; background: var(--teal); content: ''; opacity: 0; transform: scaleX(.35); transition: opacity .18s ease, transform .18s ease; }
.site-header nav a:hover::after, .site-header nav a.active::after { opacity: 1; transform: scaleX(1); }
.nav-toggle { display: none; border: 1px solid var(--line); padding: 8px 11px; color: var(--ink); background: transparent; font-size: 12px; cursor: pointer; }

h1, h2, h3 { margin: 0; color: var(--ink); font-family: var(--serif); font-weight: 500; letter-spacing: -.055em; line-height: .98; }
h1 { font-size: clamp(52px, 7.2vw, 94px); }
h2 { font-size: clamp(38px, 5vw, 66px); }
h3 { font-size: 23px; }
.eyebrow { margin: 0 0 19px; color: var(--teal); font-size: 10px; font-weight: 750; letter-spacing: .17em; line-height: 1.2; text-transform: uppercase; }
.text-link { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-size: 12px; text-underline-offset: 4px; }
.text-link:hover { color: var(--teal); }

.home-hero { position: relative; min-height: 530px; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--paper); }
.hero-art { position: absolute; inset: 0 0 0 auto; width: min(65%, 930px); aspect-ratio: 3 / 2; pointer-events: none; }
.hero-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: right center; }
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 620px) 1fr; min-height: 530px; padding-top: 78px; }
.hero-copy { align-self: start; max-width: 620px; }
.hero-lede { max-width: 440px; margin: 26px 0 0; color: var(--ink); font: 16px/1.45 var(--serif); }
.hero-caption { align-self: start; justify-self: end; max-width: 108px; margin: 8px 4px 0 0; color: var(--ink); font-size: 10px; font-weight: 650; letter-spacing: .13em; line-height: 1.6; text-transform: uppercase; }
.desktop-only { display: inline; }

.search-panel { width: min(100%, 590px); margin-top: 34px; }
.search-form { display: flex; align-items: stretch; gap: 0; border: 1px solid var(--ink); background: var(--white); }
.search-form:focus-within { outline: 3px solid rgba(47, 119, 118, .2); outline-offset: 3px; }
.search-form input { min-width: 0; flex: 1; border: 0; outline: 0; padding: 14px 16px; color: var(--ink); background: transparent; font-size: 12px; }
.search-form input::placeholder { color: #718087; }
.search-form button, .button { display: inline-flex; align-items: center; min-height: 44px; border: 0; padding: 0 20px; color: var(--paper); background: var(--ink); font-weight: 700; font-size: 11px; letter-spacing: .02em; cursor: pointer; text-decoration: none; }
.search-form button { flex: 0 0 auto; white-space: nowrap; }
.search-form button:hover, .search-form button:focus-visible, .button:hover, .button:focus-visible { background: var(--teal); }
.search-form button:disabled { cursor: wait; opacity: .65; }
.role-guide-links { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.role-guide-links a { color: var(--teal); text-underline-offset: 3px; }
.directory-filter { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; }
.directory-filter > .search-query-group { display: flex; min-width: 0; }
.directory-filter > .search-query-group input { min-width: 0; }
.directory-filter > select { min-width: 0; border: 0; border-left: 1px solid var(--line); background: var(--white); padding: 12px 34px 12px 14px; color: var(--ink); font: inherit; }
.button.secondary { border: 1px solid var(--line); color: var(--ink); background: var(--white); }
.button.secondary:hover, .button.secondary:focus-visible { color: var(--paper); background: var(--teal); }
.search-feedback { margin-top: 12px; }
.results { display: grid; gap: 7px; }
.result-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid var(--line); padding: 11px 13px; background: rgba(255, 254, 250, .97); text-decoration: none; }
.result-row:hover { border-color: var(--teal); }
.result-identity { display: inline-flex; align-items: center; min-width: 0; gap: 10px; }
.result-identity > span { min-width: 0; }
.result-row strong { display: block; overflow: hidden; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.result-row small { display: block; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.classification-chip { display: inline-block; flex: none; border: 1px solid #bfd4ce; padding: 4px 7px; color: var(--teal); background: var(--teal-soft); font-size: 10px; font-weight: 750; line-height: 1.1; white-space: nowrap; }
.empty { display: grid; gap: 8px; border: 1px dashed #b7c5c0; padding: 20px; color: var(--muted); background: rgba(255, 254, 250, .72); font-size: 12px; }
.empty strong { color: var(--ink); font-size: 13px; }
.empty .text-link { justify-self: start; margin-top: 4px; }
.search-feedback-error .empty { border-color: #b78e80; }

.snapshot-strip { display: grid; grid-template-columns: repeat(3, 1fr); min-height: 102px; border-bottom: 1px solid var(--line); }
.snapshot-stat { display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--line); padding: 17px 30px 17px 0; }
.snapshot-stat + .snapshot-stat { padding-left: 30px; }
.snapshot-stat:last-child { border-right: 0; }
.snapshot-stat strong { font: 500 30px/1 var(--serif); }
.snapshot-stat span, .snapshot-empty span { margin-top: 6px; color: var(--muted); font-size: 11px; }
.snapshot-empty { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 18px; padding: 22px 0; }
.snapshot-empty strong { font: 500 24px/1 var(--serif); }
.source-status-line { display: flex; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); padding: 12px 0; color: var(--muted); font-size: 10px; }
.source-status-line a { color: var(--ink); text-underline-offset: 3px; }
.source-status-line a:hover { color: var(--teal); }

.home-section { padding-top: 94px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-heading .eyebrow { margin-bottom: 14px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; margin-top: 24px; border: 1px solid var(--line); background: var(--line); }
.stat { display: flex; align-items: baseline; gap: 9px; min-width: 0; padding: 14px 16px; background: var(--white); }
.stat strong { flex: none; font: 500 28px/1 var(--serif); }
.stat span { color: var(--muted); font-size: 12px; }
.pill { display: inline-block; border: 1px solid #bfd4ce; padding: 4px 7px; color: var(--teal); background: var(--teal-soft); font-size: 10px; font-weight: 750; line-height: 1.1; }
.table-wrap { overflow-x: auto; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.directory-table { width: 100%; min-width: 800px; border-collapse: collapse; color: var(--ink); font-size: 11px; }
.directory-table th { padding: 11px 12px; color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .1em; text-align: left; text-transform: uppercase; }
.directory-table td { border-top: 1px solid var(--line); padding: 12px; vertical-align: middle; }
.directory-table tbody tr:hover { background: #f1f4ef; }
.company-link { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 700; text-decoration: none; }
.company-link:hover, .table-id:hover { color: var(--teal); }
.table-id { text-decoration: underline; text-decoration-color: #b9c6c3; text-underline-offset: 3px; }
.table-note { margin: 13px 0 0; color: var(--muted); font-size: 10px; }
.directory-empty { margin: 20px 0; }
.directory-empty .button { justify-self: start; padding: 10px 13px; }

.browse-section { padding-bottom: 94px; }
.browse-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); }
.browse-card { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; min-height: 180px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 22px 22px 18px 0; text-decoration: none; }
.browse-card + .browse-card { padding-left: 22px; }
.browse-card:last-child { border-right: 0; }
.browse-card:hover h3, .browse-card:hover .card-arrow { color: var(--teal); }
.card-index { color: var(--teal); font-size: 10px; font-weight: 750; letter-spacing: .08em; }
.browse-card h3 { font-size: 24px; line-height: 1.05; }
.browse-card p { max-width: 240px; margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.card-arrow { align-self: end; color: var(--ink); font-size: 16px; }
.principle-band { display: grid; grid-template-columns: 1fr 2fr auto; align-items: start; gap: 30px; border-top: 1px solid var(--ink); padding-top: 25px; padding-bottom: 90px; }
.principle-band .eyebrow { margin: 3px 0 0; }
.principle-band p:not(.eyebrow) { max-width: 570px; margin: 0; color: var(--ink); font: 18px/1.35 var(--serif); }
.principle-band .text-link { justify-self: end; margin-top: 4px; }

.site-footer { border-top: 1px solid var(--ink); padding: 50px 0 24px; color: #dce4e1; background: var(--ink); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.4fr; gap: 40px; }
.footer-wordmark { color: var(--paper); }
.footer-grid p { max-width: 270px; margin: 18px 0 0; color: #9eafb0; font-size: 12px; }
.footer-grid strong, .footer-grid a { display: block; margin-bottom: 10px; font-size: 12px; text-decoration: none; }
.footer-grid strong { margin-bottom: 16px; color: #8ec5bd; font-size: 9px; letter-spacing: .16em; text-transform: uppercase; }
.footer-grid a:hover { color: #8ec5bd; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid #2e4759; margin-top: 42px; padding-top: 17px; color: #91a3a5; font-size: 10px; }

/* Shared directory/detail primitives for sibling pages. */
.content { padding: 44px 0 64px; }
.muted { color: var(--muted); }
.directory-intro { margin-top: 24px; }
.directory-intro h1 { max-width: 900px; font-size: clamp(36px, 5.2vw, 62px); line-height: 1; }
.directory-intro .lede { max-width: 680px; margin: 16px 0 0; color: var(--muted); font: 17px/1.4 var(--serif); }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { display: block; border: 1px solid var(--line); padding: 22px; background: var(--white); text-decoration: none; }
.card:hover { border-color: var(--teal); }
.card p { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.tag { display: inline-block; margin-bottom: 15px; padding: 5px 8px; color: var(--teal); background: var(--teal-soft); font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.company-mark { display: inline-grid; place-items: center; flex: none; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; color: var(--teal); background: #eef2ef; font-size: 11px; font-weight: 850; letter-spacing: .04em; line-height: 1; }
.company-mark-small { width: 30px; height: 30px; border-radius: 8px; }
.company-mark-medium { width: 40px; height: 40px; }
.company-mark-large { width: 56px; height: 56px; border-radius: 14px; font-size: 15px; }
.company-mark img { display: block; width: 100%; height: 100%; object-fit: contain; background: white; }
.breadcrumbs { padding-top: 20px; color: var(--muted); font-size: 13px; }
.breadcrumbs a { color: var(--teal); text-decoration: none; }
.detail-header { border-bottom: 1px solid var(--line); padding: 22px 0 18px; }
.detail-header h1 { max-width: 900px; font-size: clamp(28px, 3.6vw, 44px); line-height: 1.02; }
.detail-head-row { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-top: 12px; }
.detail-heading { min-width: 0; }
.detail-heading .eyebrow { margin-bottom: 10px; }
.entity-title { display: flex; align-items: center; gap: 10px; }
.entity-title h1 { min-width: 0; overflow-wrap: anywhere; }
.detail-actions { display: flex; flex: none; gap: 8px; }
.detail-actions .button { min-height: 36px; padding: 0 13px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.detail-meta span { border: 1px solid var(--line); padding: 4px 8px; color: var(--muted); background: var(--white); font-size: 11px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(270px, .65fr); gap: 20px; margin-top: 20px; }
.detail-main, .detail-sidebar { min-width: 0; }
.detail-sidebar { align-self: start; position: sticky; top: 84px; }
.fact-card { border: 1px solid var(--line); background: var(--white); padding: 18px; }
.detail-grid .fact-card h2 { margin-bottom: 14px; font-size: 28px; line-height: 1.05; }
.detail-grid .eyebrow { margin-bottom: 8px; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 28px; }
.detail-grid .facts { gap: 12px 20px; }
.detail-grid .fact dt { margin-bottom: 3px; }
.detail-grid .fact dd { font-size: 13px; line-height: 1.35; }
.fact dt { margin-bottom: 5px; color: var(--muted); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.fact dd { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.notice { margin-top: 20px; border-left: 3px solid var(--teal); padding: 16px 18px; color: #40544b; background: #edf3ed; font-size: 13px; }
.prose { max-width: 760px; }
.prose p, .prose li { color: var(--muted); }
.prose li { margin: 9px 0; }
.status-good { color: #2f7776; font-weight: 750; }

@media (max-width: 800px) {
  .shell { width: min(100% - 36px, 620px); }
  .nav-shell { min-height: 62px; }
  .nav-toggle { display: block; }
  .site-header nav { display: none; position: absolute; top: 62px; right: 18px; left: 18px; gap: 0; border: 1px solid var(--line); padding: 8px 16px; background: var(--paper); box-shadow: 0 12px 24px rgba(16, 44, 67, .08); }
  .site-header nav[data-open] { display: grid; }
  .site-header nav a { padding: 11px 0; border-bottom: 1px solid var(--line); }
  .site-header nav a:last-child { border-bottom: 0; }
  .site-header nav a::after { display: none; }
  .stat-grid { grid-template-columns: 1fr; }
  .home-hero, .hero-inner { min-height: 0; }
  .hero-inner { display: block; padding-top: 54px; padding-bottom: 30px; }
  .hero-art { position: relative; width: calc(100% + 36px); height: auto; margin: 36px -18px -30px; }
  .hero-art img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; object-position: right center; }
  .hero-caption { display: none; }
  .snapshot-strip { grid-template-columns: 1fr; }
  .snapshot-stat, .snapshot-stat + .snapshot-stat { border-right: 0; border-bottom: 1px solid var(--line); padding: 17px 0; }
  .snapshot-stat:last-child { border-bottom: 0; }
  .source-status-line { align-items: flex-start; flex-direction: column; gap: 5px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .browse-grid, .card-grid, .footer-grid, .principle-band { grid-template-columns: 1fr; }
  .browse-card, .browse-card + .browse-card { min-height: 0; border-right: 0; padding: 20px 0; }
  .browse-card:last-child { border-bottom: 0; }
  .principle-band { gap: 16px; padding-bottom: 64px; }
  .principle-band .text-link { justify-self: start; }
  .footer-bottom { flex-direction: column; }
  .directory-filter { grid-template-columns: minmax(0, 1fr); }
  .directory-filter > select { width: 100%; border-top: 1px solid var(--line); border-left: 0; }
  .result-row { align-items: flex-start; flex-wrap: wrap; }
  .result-row .classification-chip { margin-left: auto; }
  .directory-table { min-width: 760px; }
  .detail-grid, .facts { grid-template-columns: 1fr; }
  .detail-head-row { display: block; margin-top: 10px; }
  .detail-header { padding: 18px 0 14px; }
  .detail-header h1 { font-size: 28px; }
  .entity-title { align-items: center; }
  .detail-actions { margin-top: 12px; }
  .detail-actions .button { min-height: 34px; }
  .detail-sidebar { position: static; }
  .detail-grid { gap: 14px; margin-top: 14px; }
  .detail-grid .fact-card { padding: 16px; }
  .detail-main .facts, .detail-sidebar .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .identity-facts .fact:nth-child(6), .identity-facts .fact:nth-child(7) { grid-column: 1 / -1; }
  .desktop-only { display: none; }
}

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