/* site.css — the whole stylesheet. One file, no build step, no external fonts.
   Web fonts would add a render-blocking round trip to every page, and page
   speed is a ranking input for exactly the search traffic this site is for. */

:root {
  --ink:        #0f172a;
  --ink-soft:   #475569;
  --ink-mute:   #64748b;
  --line:       #e2e8f0;
  --line-soft:  #f1f5f9;
  --bg:         #ffffff;
  --bg-soft:    #f8fafc;
  --brand:      #1d4ed8;
  --brand-dark: #1e3a8a;
  --brand-soft: #eff6ff;
  --accent:     #0d9488;
  --warn:       #b45309;
  --warn-soft:  #fffbeb;
  --danger:     #b91c1c;
  --danger-soft:#fef2f2;
  --ok:         #15803d;
  --ok-soft:    #f0fdf4;
  --radius:     10px;
  --shadow:     0 1px 2px rgba(15, 23, 42, .06), 0 4px 12px rgba(15, 23, 42, .04);
  --shadow-lg:  0 4px 24px rgba(15, 23, 42, .10);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.011em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.0625rem; }
p { margin: 0 0 1em; }
img { max-width: 100%; height: auto; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--ink-mute); }
.small { font-size: .875rem; }
.tiny  { font-size: .8125rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

/* --- header --------------------------------------------------------------- */

.site-header, .admin-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 20;
}
.admin-header { background: var(--ink); border-bottom-color: #1e293b; }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 62px;
  flex-wrap: wrap;
}

.brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.02em;
}
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--brand); }
.admin-header .brand { color: #fff; }
.admin-header .brand .tag {
  font-size: .6875rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  background: #334155;
  color: #cbd5e1;
  padding: 2px 7px;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 4px;
}

.site-nav { display: flex; align-items: center; gap: 22px; font-size: .9375rem; font-weight: 500; }
.site-nav a { color: var(--ink-soft); }
.admin-header .site-nav a { color: #cbd5e1; }
.admin-header .site-nav a:hover { color: #fff; }

.inline-form { display: inline; margin: 0; }
.link-button {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; font-weight: 500; color: #cbd5e1; text-decoration: underline;
}
.link-button:hover { color: #fff; }

/* --- hero ----------------------------------------------------------------- */

.hero {
  background: linear-gradient(180deg, var(--brand-soft), var(--bg));
  border-bottom: 1px solid var(--line);
  padding: 56px 0 44px;
}
.hero h1 { font-size: 2.5rem; max-width: 18ch; }
.hero .lede { font-size: 1.125rem; color: var(--ink-soft); max-width: 62ch; margin-bottom: 28px; }

.searchbar { display: flex; gap: 10px; max-width: 620px; flex-wrap: wrap; }
.searchbar input[type=search] { flex: 1 1 280px; }

.hero-stats { display: flex; gap: 32px; margin-top: 30px; flex-wrap: wrap; }
.hero-stat strong { display: block; font-size: 1.5rem; line-height: 1.2; }
.hero-stat span { font-size: .8125rem; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .06em; }

/* --- forms ---------------------------------------------------------------- */

input[type=text], input[type=search], input[type=email], input[type=url],
input[type=tel], input[type=number], input[type=password], select, textarea {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
  border-color: var(--brand);
}
textarea { min-height: 120px; resize: vertical; }
label { display: block; font-weight: 600; font-size: .875rem; margin-bottom: 5px; }
.field { margin-bottom: 16px; }
.field .hint { font-size: .8125rem; color: var(--ink-mute); margin-top: 4px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.btn {
  display: inline-block;
  padding: 10px 18px;
  font: inherit;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  text-align: center;
}
.btn:hover { background: var(--brand-dark); text-decoration: none; }
.btn-ghost { background: var(--bg); color: var(--ink); border-color: #cbd5e1; }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #991b1b; }
.btn-sm { padding: 6px 12px; font-size: .875rem; }
.btn-block { display: block; width: 100%; }

/* --- layout blocks -------------------------------------------------------- */

section { padding: 44px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }

.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.layout-sidebar { display: grid; grid-template-columns: 240px 1fr; gap: 34px; align-items: start; }
.layout-detail  { display: grid; grid-template-columns: 1fr 330px; gap: 38px; align-items: start; }

@media (max-width: 860px) {
  .layout-sidebar, .layout-detail, .field-row { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
  .hero { padding: 40px 0 32px; }
}

/* --- cards ---------------------------------------------------------------- */

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card:hover { box-shadow: var(--shadow-lg); }
.card h3 { margin: 0; font-size: 1.0625rem; }
.card h3 a { color: var(--ink); }
.card .card-top { display: flex; align-items: center; gap: 12px; }
.card .blurb { color: var(--ink-soft); font-size: .9375rem; margin: 0; flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line-soft); padding-top: 10px; margin-top: auto; }

.logo {
  width: 44px; height: 44px; flex: 0 0 44px;
  border-radius: 8px;
  border: 1px solid var(--line);
  object-fit: contain;
  background: #fff;
  padding: 4px;
}
.logo-fallback {
  display: grid; place-items: center;
  font-weight: 700; font-size: 1.0625rem; color: var(--brand);
  background: var(--brand-soft); border-color: var(--brand-soft);
}
.logo-lg { width: 72px; height: 72px; flex-basis: 72px; font-size: 1.75rem; }

/* The monogram sits underneath and the fetched logo covers it. If the logo
   fails to load there is nothing to swap in — the initials are simply already
   there, so a missing icon degrades instead of leaving a broken-image box. */
.logo-stack {
  position: relative;
  display: block;
  width: var(--logo-size, 44px);
  height: var(--logo-size, 44px);
  flex: 0 0 var(--logo-size, 44px);
}
.logo-stack .logo { position: absolute; inset: 0; margin: 0; }
.logo-stack .logo-img { background: #fff; }

.category-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  color: var(--ink);
  background: var(--bg);
}
.category-card:hover { border-color: var(--brand); text-decoration: none; box-shadow: var(--shadow); }
.category-card strong { display: block; margin-bottom: 3px; }

/* --- badges / pills ------------------------------------------------------- */

.pill {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--ink-soft);
  border: 1px solid var(--line);
}
.pill-brand  { background: var(--brand-soft); color: var(--brand-dark); border-color: #dbeafe; }
.pill-ok     { background: var(--ok-soft); color: var(--ok); border-color: #dcfce7; }
.pill-warn   { background: var(--warn-soft); color: var(--warn); border-color: #fef3c7; }
.pill-danger { background: var(--danger-soft); color: var(--danger); border-color: #fee2e2; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }

.stars { display: inline-flex; align-items: baseline; gap: 5px; white-space: nowrap; }
.stars-glyph { color: #f59e0b; letter-spacing: .5px; }
.stars-value { font-weight: 600; font-size: .875rem; }

/* --- filters -------------------------------------------------------------- */

.filters { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--bg-soft); position: sticky; top: 78px; }
.filters h3 { font-size: .8125rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-mute); margin-bottom: 10px; }
.filter-list { list-style: none; margin: 0 0 20px; padding: 0; font-size: .9375rem; }
.filter-list li { margin-bottom: 4px; }
.filter-list a { color: var(--ink-soft); display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; }
.filter-list a.active { color: var(--brand); font-weight: 600; }
.filter-list .count { color: var(--ink-mute); font-size: .8125rem; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.toolbar form { display: flex; gap: 8px; align-items: center; }
.toolbar select { width: auto; }

/* --- detail page ---------------------------------------------------------- */

.breadcrumbs { font-size: .875rem; color: var(--ink-mute); padding: 18px 0 0; }
.breadcrumbs a { color: var(--ink-mute); }
.breadcrumbs span { margin: 0 6px; }

.detail-head { display: flex; gap: 20px; align-items: flex-start; padding: 20px 0 26px; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.detail-head h1 { margin-bottom: 6px; }
.detail-head .tagline { font-size: 1.0625rem; color: var(--ink-soft); margin-bottom: 10px; }
.detail-meta { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; font-size: .875rem; color: var(--ink-mute); }

.spec-table { width: 100%; border-collapse: collapse; font-size: .9375rem; margin-bottom: 28px; }
.spec-table th, .spec-table td { text-align: left; padding: 9px 0; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.spec-table th { width: 190px; color: var(--ink-mute); font-weight: 500; }

.prose { max-width: 68ch; }
.prose h2 { margin-top: 32px; }

.cta-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  background: var(--bg-soft);
  position: sticky;
  top: 78px;
  box-shadow: var(--shadow);
}
.cta-box h2 { font-size: 1.0625rem; margin-bottom: 4px; }
.cta-box .small { margin-bottom: 14px; }

.notice { padding: 12px 14px; border-radius: 8px; margin-bottom: 18px; font-size: .9375rem; border: 1px solid; }
.notice-ok     { background: var(--ok-soft); border-color: #bbf7d0; color: var(--ok); }
.notice-error  { background: var(--danger-soft); border-color: #fecaca; color: var(--danger); }
.notice-info   { background: var(--brand-soft); border-color: #dbeafe; color: var(--brand-dark); }

/* Honeypot: off-screen rather than display:none, which some bots skip. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --- taxonomy ------------------------------------------------------------- */

.tax-type { margin-bottom: 42px; }
.tax-type > h2 { padding-bottom: 8px; border-bottom: 2px solid var(--line); }

.tax-list { list-style: none; margin: 0; padding: 0; font-size: .9375rem; }
.tax-list li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-bottom: 1px solid var(--line-soft); }
.tax-list li:last-child { border-bottom: 0; }
.tax-list .count { color: var(--ink-mute); font-size: .8125rem; }

.child-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 22px; }
.child-chips .pill { font-weight: 500; }

/* The classification path on a listing: chips separated by chevrons. */
.tax-path { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tax-path .sep { color: var(--ink-mute); font-size: .875rem; }

.filters .trail li { font-size: .875rem; }
.filters h3 + .filter-list { margin-bottom: 18px; }

/* --- pager ---------------------------------------------------------------- */

.pager { display: flex; gap: 6px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.pager a, .pager span {
  padding: 7px 13px; border: 1px solid var(--line); border-radius: 8px;
  font-size: .875rem; color: var(--ink-soft); background: var(--bg);
}
.pager .current { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.pager .gap { border: 0; }

.empty { text-align: center; padding: 56px 20px; color: var(--ink-mute); border: 1px dashed var(--line); border-radius: var(--radius); }

/* --- footer --------------------------------------------------------------- */

.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); margin-top: 60px; padding: 40px 0 24px; }
.footer-inner { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer-brand { font-weight: 700; margin-bottom: 2px; }
.footer-nav { display: flex; flex-direction: column; gap: 7px; font-size: .9375rem; }
.footer-legal { border-top: 1px solid var(--line); margin-top: 26px; padding-top: 16px; }
.footer-legal p { margin: 0; font-size: .8125rem; }

/* --- admin ---------------------------------------------------------------- */

body.admin { background: var(--bg-soft); }
body.admin main { padding: 28px 0 60px; }
body.admin main > .wrap > h1 { margin-bottom: 20px; }

.panel { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 22px; box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; }

.table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-mute); background: var(--bg-soft); }
.table tr:last-child td { border-bottom: 0; }
.table .actions { text-align: right; white-space: nowrap; }
.table-scroll { overflow-x: auto; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat strong { display: block; font-size: 1.75rem; line-height: 1.1; }
.stat span { font-size: .8125rem; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .05em; }

.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.checkbox-grid label { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: .9375rem; margin: 0; }
.checkbox-grid input { width: auto; }

.login-shell { max-width: 380px; margin: 70px auto; }
.login-shell .panel { padding: 28px; }

.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.form-actions .spacer { flex: 1; }

@media (prefers-reduced-motion: no-preference) {
  a, .btn, .card { transition: color .12s ease, background-color .12s ease, box-shadow .12s ease, border-color .12s ease; }
}

/* --- leadership ----------------------------------------------------------- */

.people { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 14px;
          grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.person { display: flex; gap: 13px; align-items: flex-start;
          border: 1px solid var(--line); border-radius: var(--radius); padding: 13px; background: var(--bg); }

/* The initials sit underneath the photo. If a scraped headshot 404s or is
   blocked by hotlink protection, the monogram is already there — no onerror
   handler building markup out of a person's name. */
.person-photo { position: relative; width: 56px; height: 56px; flex: 0 0 56px; border-radius: 50%; overflow: hidden; }
.person-initials { position: absolute; inset: 0; display: grid; place-items: center;
                   background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; font-size: .9375rem; }
.person-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #fff; }

.person-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.person-name { font-size: .9375rem; line-height: 1.3; }
.person-title { font-size: .8125rem; color: var(--ink-soft); }
.person-li { font-size: .8125rem; margin-top: 3px; }

/* Google Maps pin beside the headquarters line. */
.map-pin { text-decoration: none; margin-left: 5px; font-size: 1rem; line-height: 1; }
.map-pin:hover { text-decoration: none; opacity: .75; }
