@font-face {
  font-family: "Funnel Display";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("assets/fonts/funnel-display.woff2") format("woff2");
}

@font-face {
  font-family: "Funnel Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/funnel-sans.woff2") format("woff2");
}

:root {
  --indigo: #080f5f;
  --signal: #080f5f;
  --assay: #16b3c0;
  --vital: #16b3c0;
  --paper: #f3f8f8;
  --slate: #54686b;
  --hairline: #d6e2e3;
  --surface: #ffffff;
  --surface-soft: #f7fafa;
  --shadow: 0 6px 24px rgba(8, 15, 95, 0.11);
  --shell: min(1140px, calc(100% - 40px));
  --heading: "Funnel Display", sans-serif;
  --body: "Funnel Sans", sans-serif;
  --mono: "Funnel Sans", sans-serif;
}

html[data-theme="dark"] {
  --signal: #55d3dc;
  --paper: #050a3c;
  --indigo: #f3f4ff;
  --slate: #bbc2dc;
  --hairline: #29337d;
  --surface: #080f5f;
  --surface-soft: #0b145a;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; color: var(--indigo); background: var(--surface); font-family: var(--body); font-size: 17px; line-height: 1.58; }
a { color: inherit; overflow-wrap: anywhere; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
svg { display: block; }
:focus-visible { outline: 3px solid var(--vital); outline-offset: 3px; }
.shell { width: var(--shell); margin-inline: auto; }
.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; }
.skip-link { position: fixed; z-index: 100; top: 10px; left: 12px; padding: 8px 13px; color: #fff; background: #080f5f; transform: translateY(-150%); }
.skip-link:focus { transform: none; }

.announcement { position: relative; min-height: 38px; display: flex; align-items: center; justify-content: center; padding: 7px 48px 7px 18px; color: #fff; background: #080f5f; font: 600 13px/1.45 var(--mono); text-align: center; }
.announcement a { color: #fff; text-decoration-thickness: 2px; text-underline-offset: 2px; }
.announcement button { position: absolute; top: 50%; right: 12px; width: 32px; height: 32px; border: 0; color: #fff; background: transparent; font-size: 25px; font-weight: 300; line-height: 1; transform: translateY(-50%); cursor: pointer; opacity: .88; }
.announcement button:hover { opacity: 1; }
.announcement[hidden] { display: none; }

.site-header { color: var(--indigo); background: var(--surface); border-bottom: 1px solid color-mix(in srgb, var(--hairline) 50%, transparent); }
.header-inner { min-height: 82px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 30px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font: 700 23px/1 var(--heading); letter-spacing: -.02em; text-decoration: none; }
.brand-mark { width: auto; height: 31px; padding: 2px 3px; background: #fff; border-radius: 3px; object-fit: contain; }
.site-nav { display: flex; align-items: center; gap: 30px; }
.site-nav a { font-size: 16px; font-weight: 500; text-decoration: none; }
.site-nav a:hover { color: var(--signal); }
.header-tools { display: flex; align-items: center; gap: 12px; }
.icon-button { width: 28px; height: 28px; display: grid; place-items: center; padding: 3px; border: 0; color: var(--indigo); background: transparent; }
button.icon-button { cursor: pointer; }
.icon-button svg { width: 22px; height: 22px; }
.resource-icon { color: var(--slate); font: 600 10px/1 var(--mono); cursor: help; }
.theme-icon--dark { display: none; }
html[data-theme="dark"] .theme-icon--light { display: none; }
html[data-theme="dark"] .theme-icon--dark { display: block; }
.nav-toggle { display: none; }

.homepage { padding: clamp(20px, 2.4vw, 34px) 0 26px; color: var(--indigo); background: var(--surface); }
.homepage-grid { display: grid; gap: 14px; }
.panel { background: var(--surface); border: 1px solid var(--hairline); border-radius: 16px; box-shadow: var(--shadow); }
.hero { padding: clamp(22px, 2.6vw, 34px); background: linear-gradient(150deg, var(--surface) 0%, var(--paper) 72%, color-mix(in srgb, var(--assay) 7%, var(--surface)) 100%); }
.hero-content { max-width: 76ch; }
h1, h2, h3 { font-family: var(--heading); color: var(--indigo); }
.hero h1 { margin: 0; font-size: clamp(38px, 4.6vw, 55px); line-height: 1.05; letter-spacing: -.03em; }
.hero-lead { max-width: 66ch; margin: 11px 0 16px; color: var(--slate); font-size: clamp(17px, 1.5vw, 21px); line-height: 1.58; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { min-height: 48px; display: inline-flex; align-items: center; gap: 8px; padding: 9px 17px; border: 1px solid var(--signal); border-radius: 999px; font-weight: 600; line-height: 1; text-decoration: none; }
.pill svg { width: 18px; height: 18px; }
.pill small { margin-left: 2px; font: 600 9px/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; }
.pill--primary { color: #fff; background: var(--signal); }
.pill--primary:visited { color: #fff; }
.pill--primary:hover { background: #065f66; border-color: #065f66; }
.pill--outline { color: var(--signal); background: transparent; }
.pill--outline:hover { color: #fff; background: var(--signal); }
.pill--muted { color: var(--slate); background: color-mix(in srgb, var(--surface) 85%, var(--hairline)); border-color: var(--hairline); cursor: not-allowed; }
.pill--assay { color: var(--indigo); border-color: color-mix(in srgb, var(--assay) 65%, var(--hairline)); background: color-mix(in srgb, var(--assay) 10%, var(--surface)); }
.pill--assay b { color: var(--assay); }
.pill--vital { color: #092f33; background: var(--vital); border-color: var(--vital); }
.pill--vital:visited { color: #092f33; }
.pill--vital:hover { color: #fff; background: #087b84; border-color: #087b84; }
.hero-support { margin: 15px 0 0; color: var(--slate); font-size: 15px; }

.section-panel { padding: clamp(18px, 2.2vw, 25px); }
.section-heading { margin-bottom: 15px; }
.section-heading--compact { margin-bottom: 13px; }
.kicker { margin: 0; color: var(--signal); font: 600 12px/1 var(--mono); letter-spacing: .09em; text-transform: uppercase; }
.kicker--vital { display: inline-flex; align-items: center; gap: 7px; color: var(--signal); }
.kicker--vital::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--vital); }
.section-heading h2 { margin: 7px 0 7px; font-size: clamp(24px, 2.3vw, 32px); line-height: 1.15; letter-spacing: -.025em; }
.section-heading > p:not(.kicker) { max-width: 92ch; margin: 0; color: var(--slate); }

.updates-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.update-card { position: relative; grid-column: span 3; min-height: 268px; display: flex; flex-direction: column; overflow: hidden; padding: 20px 17px 17px; border: 1px solid var(--hairline); border-radius: 12px; background: linear-gradient(140deg, var(--surface), var(--surface-soft)); }
.update-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; }
.update-card--signal::before { background: var(--signal); }
.update-card--assay::before { background: var(--assay); }
.update-card--indigo::before { background: var(--assay); }
.update-card--featured { grid-column: span 6; }
.card-meta { min-height: 21px; display: flex; align-items: center; margin-bottom: 8px; color: var(--slate); font: 600 12px/1.3 var(--mono); letter-spacing: .03em; }
.update-card h3 { margin: 0 0 8px; font-size: 18px; line-height: 1.35; letter-spacing: -.01em; }
.update-card--featured h3 { font-size: 21px; }
.update-card p { margin: 0 0 13px; color: var(--slate); line-height: 1.55; }
.update-card a, .card-status { margin-top: auto; color: var(--signal); font-weight: 700; text-decoration: none; }
.update-card a:hover { text-decoration: underline; }
.card-status { color: var(--slate); }

.affiliations-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.affiliations-grid li { min-width: 0; }
.affiliation { min-height: 76px; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px 12px; border: 1px solid var(--hairline); border-radius: 10px; color: var(--indigo); background: var(--surface-soft); text-align: center; text-decoration: none; }
.affiliation img { width: auto; max-width: 147px; height: auto; max-height: 28px; object-fit: contain; }
html[data-theme="dark"] .affiliation img { filter: invert(1); }
.affiliation--open { color: var(--signal); border-style: dashed; }
.affiliation--open span { font: 600 13px/1.3 var(--mono); letter-spacing: .04em; }
.affiliation--open small { margin-top: 4px; color: var(--slate); font-size: 12px; }
.affiliation--open:hover { border-color: var(--signal); }
.panel--assay { border-top: 3px solid var(--assay); }
.panel--assay .affiliation--open { border-color: color-mix(in srgb, var(--assay) 70%, var(--hairline)); }

.contribute-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.contribute-card { min-height: 190px; display: flex; flex-direction: column; padding: 16px; border: 1px solid var(--hairline); border-radius: 12px; background: linear-gradient(135deg, var(--surface), var(--surface-soft)); }
.contribute-card h3 { margin: 0 0 8px; font-size: 18px; line-height: 1.35; }
.contribute-card p { margin: 0 0 15px; color: var(--slate); line-height: 1.55; }
.contribute-card a { margin-top: auto; color: var(--signal); font-weight: 700; text-decoration: none; }
.contribute-card a:hover { text-decoration: underline; }

.site-footer { border-top: 1px solid var(--hairline); color: var(--slate); background: var(--surface); }
.footer-inner { min-height: 74px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; }
.footer-inner a { color: var(--signal); text-decoration: none; }
.footer-inner a:hover { text-decoration: underline; }

@media (max-width: 900px) {
  :root { --shell: min(720px, calc(100% - 30px)); }
  .header-inner { grid-template-columns: auto 1fr auto; min-height: 72px; gap: 12px; }
  .nav-toggle { justify-self: end; width: 44px; height: 44px; display: grid; place-content: center; gap: 6px; border: 0; color: var(--indigo); background: transparent; }
  .nav-toggle i { width: 23px; height: 2px; display: block; background: currentColor; transition: transform .2s ease; }
  .nav-toggle[aria-expanded="true"] i:first-of-type { transform: translateY(4px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] i:last-of-type { transform: translateY(-4px) rotate(-45deg); }
  .site-nav { position: absolute; z-index: 10; inset: auto 0 auto; top: 110px; display: none; padding: 10px 15px 16px; background: var(--surface); border-bottom: 1px solid var(--hairline); }
  body.announcement-closed .site-nav { top: 72px; }
  .site-nav.is-open { display: grid; }
  .site-nav a { min-height: 44px; display: flex; align-items: center; border-bottom: 1px solid var(--hairline); }
  .header-tools { gap: 5px; }
  .updates-grid { grid-template-columns: 1fr 1fr; }
  .update-card, .update-card--featured { grid-column: auto; min-height: 230px; }
  .update-card--featured { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  :root { --shell: calc(100% - 24px); }
  body { font-size: 16px; }
  .announcement { min-height: 46px; justify-content: flex-start; text-align: left; font-size: 11px; }
  .brand { font-size: 21px; }
  .brand-mark { width: 20px; height: 20px; }
  .resource-icon { display: none; }
  .homepage { padding-top: 15px; }
  .hero, .section-panel { padding: 18px; }
  .hero h1 { font-size: 39px; }
  .hero-actions { gap: 8px; }
  .pill { min-height: 44px; padding: 8px 14px; font-size: 14px; }
  .updates-grid, .contribute-grid { grid-template-columns: 1fr; }
  .update-card, .update-card--featured { grid-column: auto; min-height: 0; }
  .contribute-card { min-height: 170px; }
  .affiliations-grid { grid-template-columns: 1fr 1fr; }
}

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