:root {
  --orange: #fb651e;
  --orange-dark: #d9500f;
  --cream: #f5f5ee;
  --paper: #fffef9;
  --ink: #16140f;
  --muted: #6b6759;
  --line: #e0dfd2;
  --ok: #1d7a46;
  --warn: #a8321a;
  --font: "Avenir Next", "Segoe UI", system-ui, -apple-system, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 17px/1.55 var(--font); }
a { color: inherit; }
img { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.wrap { max-width: 1120px; margin: 0 auto; padding-inline: 24px; }
.section { padding-block: 64px; }
.section-sub { color: var(--muted); max-width: 46rem; margin-top: 12px; }

.btn { display: inline-block; padding: 12px 22px; border: 1.5px solid var(--ink); border-radius: 6px; text-decoration: none; font-weight: 600; background: transparent; color: var(--ink); cursor: pointer; font: 600 1rem var(--font); }
.btn:hover { background: var(--ink); color: var(--cream); }
.btn-primary { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dark); border-color: var(--orange-dark); color: #fff; }
.btn-small { padding: 6px 14px; font-size: 0.85rem; }

/* header */
.site-header { background: var(--cream); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.header-row { display: flex; align-items: center; gap: 28px; padding-block: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.site-nav { display: flex; gap: 22px; flex-wrap: wrap; margin-left: auto; font-size: 0.95rem; }
.site-nav a { text-decoration: none; color: var(--muted); }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--orange); }
.header-cta { padding: 9px 16px; font-size: 0.9rem; }

/* home */
.hero { padding-block: 96px 72px; }
.hero h1 { max-width: 14ch; font-size: clamp(2.8rem, 7.5vw, 5.6rem); }
.lede { font-size: 1.3rem; max-width: 40rem; margin-top: 24px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 32px; }
.hero-note { color: var(--muted); font-size: 0.9rem; margin-top: 20px; }

.stats { background: var(--ink); color: var(--cream); }
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 24px; padding-block: 40px; }
.stats-row strong { display: block; font-size: 2.4rem; color: var(--orange); line-height: 1.1; }
.stats-row span { font-size: 0.9rem; opacity: 0.8; }

.top-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; margin-block: 32px 24px; }
.top-card { display: flex; gap: 16px; padding: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; text-decoration: none; }
.top-card:hover { border-color: var(--orange); }
.top-card > img { border-radius: 10px; flex: none; width: 56px; height: 56px; }
.top-card h3 { font-size: 1.05rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.top-card p { margin: 6px 0 0; color: var(--muted); font-size: 0.93rem; }
.more { color: var(--orange); font-weight: 600; text-decoration: none; }
.more:hover { text-decoration: underline; }

.deal { background: var(--orange); color: #fff; }
.deal-row { display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center; padding-block: 64px; }
.deal p { max-width: 38rem; font-size: 1.1rem; margin-top: 14px; }
.deal-figure { display: grid; grid-template-columns: auto auto; gap: 4px 14px; align-items: baseline; }
.deal-figure strong { font-size: 3.4rem; line-height: 1; text-align: right; }

.program-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 32px 40px; margin-top: 36px; }
.program-grid h3 { font-size: 1.1rem; margin-bottom: 8px; padding-top: 14px; border-top: 3px solid var(--orange); }
.program-grid p { color: var(--muted); font-size: 0.97rem; margin: 0; }

.quotes { background: var(--paper); border-block: 1px solid var(--line); }
.quote-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 40px; padding-block: 64px; }
.quotes figure { margin: 0; }
.quotes blockquote { margin: 0 0 16px; font-size: 1.08rem; }
.quotes figcaption { font-size: 0.88rem; color: var(--muted); }

.essay-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin-block: 28px 8px; }
.essay-grid a { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 22px; text-decoration: none; display: flex; flex-direction: column; gap: 10px; }
.essay-grid a:hover { border-color: var(--orange); }
.essay-grid h3 { font-size: 1.1rem; }
.essay-grid p { color: var(--muted); font-size: 0.93rem; margin: 0; flex: 1; }
.essay-grid span { font-size: 0.8rem; color: var(--muted); }
.section h2 + .essay-grid { margin-top: 20px; }
.section .essay-grid + h2 { margin-top: 48px; }

.cta { background: var(--ink); color: var(--cream); text-align: center; padding-block: 80px; }
.cta h2 { max-width: 24ch; margin: 0 auto 28px; }

/* pills */
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; padding: 3px 9px; border-radius: 4px; background: #e6e4d6; color: #4a4739; white-space: nowrap; }
.pill-batch img { width: 12px; height: 12px; }
.pill-status[data-tone="ok"] { background: #dcefe2; color: var(--ok); }
.pill-status[data-tone="warn"] { background: #f7ddd5; color: var(--warn); }

/* directory */
.directory { display: grid; grid-template-columns: 240px 1fr; gap: 40px; margin-top: 36px; align-items: start; }
.filters { position: sticky; top: 84px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 18px; font-size: 0.9rem; }
.filters input[type="search"] { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px; font: inherit; background: #fff; }
.filter { border: 0; padding: 0; margin: 18px 0 0; }
.filter legend { font-weight: 700; font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); padding: 0; margin-bottom: 6px; }
.filter label { display: block; padding: 2px 0; cursor: pointer; }
.dir-count { color: var(--muted); font-size: 0.9rem; margin-bottom: 10px; }
.dir-row { display: flex; gap: 18px; padding: 20px; background: var(--paper); border: 1px solid var(--line); border-bottom-width: 0; text-decoration: none; }
.dir-row:first-child { border-radius: 10px 10px 0 0; }
.dir-row:last-child { border-bottom-width: 1px; border-radius: 0 0 10px 10px; }
.dir-row:hover { background: #fff; }
.dir-row > img { width: 64px; height: 64px; border-radius: 12px; flex: none; }
.dir-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.dir-name { font-weight: 700; font-size: 1.08rem; }
.dir-loc { color: var(--muted); font-size: 0.82rem; }
.dir-row p { margin: 4px 0 0; font-size: 0.96rem; }

/* company */
.crumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 28px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--orange); }
.company-head { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.company-head > img { border-radius: 18px; width: 96px; height: 96px; }
.company-head h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.company-liner { font-size: 1.2rem; margin: 8px 0 0; max-width: 40rem; }
.company-body { display: grid; grid-template-columns: 1fr 320px; gap: 56px; margin-top: 40px; align-items: start; }
.company-body h2 { font-size: 1.4rem; margin: 44px 0 18px; }
.company-card { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 22px; position: sticky; top: 84px; }
.company-card dl { margin: 0; }
.company-card dt { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); margin-top: 14px; }
.company-card dt:first-child { margin-top: 0; }
.company-card dd { margin: 2px 0 0; font-size: 0.97rem; }
.founder { display: flex; gap: 18px; margin-bottom: 24px; }
.avatar { flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--ink); color: var(--cream); display: grid; place-items: center; font-weight: 700; }
.founder h3 { font-size: 1.05rem; }
.founder-title { color: var(--muted); font-size: 0.88rem; margin: 2px 0 6px; }
.founder p:last-child { margin: 0; font-size: 0.97rem; }
.job { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); font-size: 0.95rem; }
.job div span { display: block; color: var(--muted); font-size: 0.85rem; }
.job-comp { color: var(--muted); font-size: 0.85rem; text-align: right; max-width: 22ch; }
.mentions { padding-left: 1.1em; }
.mentions a { color: var(--orange-dark); }

/* requests for hazards */
.rfh article { display: grid; grid-template-columns: 64px 1fr; gap: 16px; padding-block: 32px; border-top: 1px solid var(--line); max-width: 52rem; }
.rfh article:first-of-type { margin-top: 40px; }
.rfh-num { font-size: 1.6rem; font-weight: 700; color: var(--orange); }
.rfh h2 { font-size: 1.4rem; }
.rfh-by { color: var(--muted); font-size: 0.88rem; margin: 6px 0 12px; }
.rfh-end { margin-top: 24px; color: var(--muted); max-width: 46rem; }
.section-sub a, .rfh a { color: var(--orange-dark); }

/* apply */
.apply form { max-width: 44rem; margin-top: 40px; }
.field { margin-bottom: 28px; }
.field label { font-weight: 700; display: block; }
.hint { color: var(--muted); font-size: 0.88rem; margin: 4px 0 8px; font-weight: 400; }
.field input, .field textarea { width: 100%; padding: 11px 12px; border: 1px solid #c9c7b6; border-radius: 6px; font: inherit; background: #fff; margin-top: 6px; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--orange); border-color: transparent; }
.check { display: block; margin-bottom: 24px; }
.apply-result { max-width: 44rem; margin-top: 32px; padding: 24px; border-radius: 10px; border: 2px solid var(--ink); background: var(--paper); }
.apply-result[data-verdict="accepted"] { border-color: var(--ok); }
.apply-result[data-verdict="rejected"], .apply-result[data-verdict="incomplete"] { border-color: var(--warn); }
.apply-result h3 { margin-bottom: 8px; }
.apply-result p { margin: 0; }
.apply h2 { margin-top: 72px; }
.faq { max-width: 46rem; margin-top: 20px; }
.faq details { border-top: 1px solid var(--line); padding: 16px 0; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { margin: 12px 0 0; color: #3d3a2f; }

.notfound { text-align: center; padding-block: 120px; }
.notfound h1 { color: var(--orange); margin-bottom: 16px; }

/* footer */
.site-footer { background: var(--paper); border-top: 1px solid var(--line); padding-block: 56px 40px; font-size: 0.9rem; }
.footer-top { display: flex; gap: 56px; flex-wrap: wrap; justify-content: space-between; }
.footer-brand p { margin-top: 12px; font-weight: 700; max-width: 16ch; }
.footer-columns { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-columns h4 { font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.footer-columns a { display: block; text-decoration: none; padding: 3px 0; }
.footer-columns a:hover { color: var(--orange); }
.disclaimer { margin-top: 44px; padding: 16px 18px; border: 1px dashed #b9b6a3; border-radius: 8px; max-width: 52rem; }
.copyright { color: var(--muted); margin: 18px 0 0; }

@media (max-width: 860px) {
  .directory, .company-body, .deal-row { grid-template-columns: 1fr; }
  .filters, .company-card { position: static; }
  .site-header { position: static; }
  .header-row { gap: 10px 12px; padding-block: 12px; }
  .brand { white-space: nowrap; }
  .header-cta { margin-left: auto; }
  .site-nav { order: 3; width: 100%; margin-left: 0; gap: 18px; flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; scrollbar-width: none; padding-bottom: 2px; }
  .site-nav::-webkit-scrollbar { display: none; }
  .job { grid-template-columns: 1fr auto; }
  .job-comp { grid-column: 1; grid-row: 2; text-align: left; max-width: none; }
  .hero { padding-block: 64px 48px; }
}

@media (max-width: 520px) {
  .cta-batch { display: none; }
  .brand { font-size: 1rem; gap: 8px; }
  .brand img { width: 32px; height: 32px; }
}

/* grid children may shrink below their content's min-content width */
.company-body > *, .directory > *, .deal-row > * { min-width: 0; }
