:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --ink: #1c2526;
  --muted: #5b6667;
  --line: #e2e0d8;
  --brand: #0f5257;
  --brand-ink: #e8f4f1;
  --accent: #7fd1b9;
  --chip: #efede6;

  --open: #1f7a4d;       --open-bg: #e3f3ea;
  --registration: #1f5fa8; --registration-bg: #e4eefa;
  --application: #9a5b00;  --application-bg: #fbefd9;
  --credentialed: #6b3fa0; --credentialed-bg: #efe7f8;

  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 30, 30, .05), 0 4px 16px rgba(20, 30, 30, .05);
  --serif: "Source Serif 4", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111617;
    --surface: #182022;
    --ink: #e7ecea;
    --muted: #9aa6a5;
    --line: #2a3537;
    --brand: #0c3f43;
    --chip: #202a2c;
    --open: #7fd6a6;       --open-bg: #183527;
    --registration: #8fbcf2; --registration-bg: #182a40;
    --application: #f0c06e;  --application-bg: #3a2c12;
    --credentialed: #c6a6ef; --credentialed-bg: #2c2140;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-padding-top: 120px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--registration); }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 50; background: var(--surface); padding: 8px 12px; }

/* Hero */
.hero { background: var(--brand); color: var(--brand-ink); padding: 56px 0 48px; }
.eyebrow { margin: 0 0 8px; text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 600; color: var(--accent); }
.hero h1 { font: 700 clamp(34px, 6vw, 56px)/1.05 var(--serif); margin: 0 0 16px; letter-spacing: -.01em; }
.lede { max-width: 720px; font-size: 17px; margin: 0 0 28px; opacity: .92; }
.stats { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 28px; padding: 0; margin: 0; font-size: 14px; }
.stats strong { font: 700 26px/1 var(--serif); margin-right: 6px; color: #fff; }

/* Acknowledgement callout */
.hero-grid { display: grid; gap: 28px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1fr 300px; gap: 48px; } }
.ack { background: rgba(255, 255, 255, .08); border: 1px solid rgba(127, 209, 185, .45); border-top: 4px solid var(--accent); border-radius: 12px; padding: 16px 18px; }
.ack p { margin: 0 0 8px; font-size: 14px; line-height: 1.5; }
.ack-title { font: 700 18px/1.25 var(--serif) !important; color: #fff; }
.ack a { color: var(--accent); }
.ack-cite { font-size: 12px !important; opacity: .8; font-style: italic; margin-bottom: 12px !important; }
.contributors { margin-top: 8px !important; }
.ack-btn { background: var(--accent); color: #0b2e30; }
.ack-btn:hover { filter: brightness(1.08); }

/* Back to top */
.to-top { position: fixed; right: 20px; bottom: 20px; z-index: 30; display: inline-flex; align-items: center; gap: 6px; background: var(--brand); color: #fff; text-decoration: none; font: 600 13px/1 var(--sans); padding: 11px 14px; border-radius: 999px; box-shadow: 0 4px 16px rgba(0, 0, 0, .2); }
.to-top svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.to-top:hover { filter: brightness(1.15); }
@media (max-width: 719px) { .to-top { right: 14px; bottom: 14px; } .to-top span { display: none; } }

/* Toolbar */
.toolbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); padding: 14px 0 6px; }
.search-row { display: flex; gap: 10px; }
.search { flex: 1; display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; box-shadow: var(--shadow); }
.search:focus-within { border-color: var(--brand); outline: 2px solid color-mix(in srgb, var(--accent) 50%, transparent); }
.search svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; flex: none; }
.search input { flex: 1; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 16px; padding: 12px 0; outline: none; min-width: 0; }
.filters { display: grid; gap: 8px; margin-top: 12px; }
.filter-group { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.filter-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); width: 72px; flex: none; }
.chip { font: 500 13px/1 var(--sans); color: var(--ink); background: var(--chip); border: 1px solid transparent; border-radius: 999px; padding: 7px 11px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.chip span { color: var(--muted); font-weight: 400; }
.chip:hover { border-color: var(--line); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.chip[aria-pressed="true"] span { color: inherit; opacity: .7; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-open { background: var(--open); } .dot-registration { background: var(--registration); }
.dot-application { background: var(--application); } .dot-credentialed { background: var(--credentialed); }
.status { margin: 8px 0 0; font-size: 13px; color: var(--muted); min-height: 20px; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--registration); text-decoration: underline; cursor: pointer; margin-left: 8px; }
.filters { display: none; max-height: 55vh; overflow-y: auto; }
.filters.open { display: grid; }
.filters-toggle[aria-expanded="true"] { background: var(--ink); color: var(--bg); }
.filters-toggle .n { font-weight: 400; opacity: .75; }

@media (max-width: 719px) {
  html { scroll-padding-top: 130px; }
  .filter-label { width: 100%; }
}

/* Legend */
.legend { margin: 28px 0 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; }
.legend summary { cursor: pointer; font-weight: 600; }
.legend ul { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.legend li { font-size: 14px; color: var(--muted); display: flex; gap: 10px; align-items: baseline; }
.legend .note { font-size: 13px; color: var(--muted); margin: 12px 0 0; }

/* Categories */
.cat { padding-top: 36px; }
.cat-head h2 { font: 700 26px/1.2 var(--serif); margin: 0 0 4px; }
.cat-count { font: 500 14px var(--sans); color: var(--muted); vertical-align: middle; margin-left: 6px; }
.cat-head p { margin: 0 0 18px; color: var(--muted); max-width: 760px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
@media (max-width: 400px) { .grid { grid-template-columns: 1fr; } }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 16px; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: border-color .15s; }
.card:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.card:target { outline: 2px solid var(--accent); }
.card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.card h3 { font: 600 18px/1.3 var(--serif); margin: 0; }
.anchor { color: inherit; text-decoration: none; }
.anchor:hover { text-decoration: underline; }
.full-name { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.desc { margin: 10px 0 12px; }
.meta { margin: 0 0 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; font-size: 13px; }
.meta .how { grid-column: 1 / -1; }
.meta dt { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; }
.meta dd { margin: 1px 0 0; }
.cite { font-size: 12.5px; color: var(--muted); font-style: italic; margin: 0 0 10px; }
.tags { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 5px; }
.tags li { font-size: 11.5px; background: var(--chip); color: var(--muted); border-radius: 5px; padding: 2px 7px; }
.card-actions { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.badge { flex: none; font: 600 11.5px/1 var(--sans); padding: 5px 9px; border-radius: 999px; white-space: nowrap; }
.badge-open { color: var(--open); background: var(--open-bg); }
.badge-registration { color: var(--registration); background: var(--registration-bg); }
.badge-application { color: var(--application); background: var(--application-bg); }
.badge-credentialed { color: var(--credentialed); background: var(--credentialed-bg); }

.btn { font: 600 13.5px/1 var(--sans); border-radius: 8px; padding: 10px 14px; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; border: 1px solid transparent; cursor: pointer; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { filter: brightness(1.15); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-none { color: var(--muted); font-weight: 400; padding-left: 4px; }

.empty { text-align: center; color: var(--muted); padding: 60px 0; font-size: 16px; }

/* Footer */
.site-foot { margin-top: 64px; border-top: 1px solid var(--line); padding: 36px 0 48px; font-size: 14px; color: var(--muted); }
.foot-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.site-foot h2 { font: 600 15px var(--sans); color: var(--ink); margin: 0 0 6px; }
.site-foot p { margin: 0; }

[hidden] { display: none !important; }
