:root {
  /* Edit these colors to theme the directory. */
  --background: #f4faff;
  --surface: #fff;
  --surface-muted: #b3d7d8;
  --surface-hover: #eee7f4;
  --text: #222;
  --text-muted: #444;
  --heading: #333;
  --brand: #008297;
  --accent: #005866;
  --accent-hover: #003e48;
  --on-accent: #fff;
  --focus: #008297;
  --border: #d7e5e8;
  --border-strong: #8aa8af;
  --border-subtle: #e4edf0;
  --success: #005866;
  --success-background: #b3d7d8;
  --error: #934116;
  --error-background: #fff0e3;
  --error-surface: #fff8f1;
  --error-border: #d1a172;

  color-scheme: light;
  font-family: Andika, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--background);
  font-synthesis: none;
  line-height: 1.6;
}

* { box-sizing: border-box; }
body { margin: 0; }
a, .text-button, summary { color: var(--accent); }
a { text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
button, input, select { font: inherit; }
button, select, summary { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
.page-width { max-width: 1240px; margin-inline: auto; padding-inline: 32px; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.header-inner { min-height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { color: var(--accent); font-weight: 700; font-size: 1.2rem; text-decoration: none; }
.brand span { font-size: .85rem; font-weight: 400; border-left: 1px solid var(--border); margin-left: 16px; padding-left: 16px; }
.data-link { font-size: .85rem; }
.intro { padding-block: 56px 40px; max-width: 790px; }
.eyebrow { color: var(--accent); font-size: .75rem; font-weight: 750; letter-spacing: .14em; }
h1, h2 { color: var(--heading); }
h1 { color: var(--brand); font-size: clamp(1.9rem, 4vw, 2.7rem); font-weight: 700; line-height: 1.25; letter-spacing: -.02em; margin: 12px 0 16px; }
h2 { font-size: 1rem; margin: 0; }
h3 { font-size: 1.07rem; line-height: 1.5; margin: 0; }
h3 a { text-decoration: none; }
h3 a:hover { text-decoration: underline; }
.intro .dataset-summary { font-size: .8rem; margin-top: 20px; }
.brand span, .intro > p:not(.eyebrow), .help, .filter-note, .results-heading p,
.resource-meta, .analysis-summary, .evidence-list p, .notice p, footer { color: var(--text-muted); }

.directory { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 36px; align-items: start; }
aside, .result-card, .notice { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; }
aside { padding: 22px; }
.filter-heading, .results-heading, .card-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.text-button { padding: 0; background: none; border: 0; text-decoration: underline; font-size: .8rem; }
label, .classification-filter legend { font-size: .8rem; font-weight: 650; }
label { display: block; margin: 22px 0 7px; }
input, select, .classification-options { border: 1px solid var(--border-strong); border-radius: 5px; }
input, select { width: 100%; min-height: 43px; padding: 9px 10px; background: var(--surface); color: var(--text); font-size: .85rem; }
input::placeholder { color: var(--text-muted); }
select:disabled { background: var(--surface-muted); color: var(--text-muted); cursor: default; }
.classification-filter { border: 0; padding: 0; margin: 22px 0 0; min-width: 0; }
.classification-filter legend { padding: 0; }
.classification-options { max-height: 260px; overflow-y: auto; margin-top: 12px; padding: 4px; }
.classification-option { display: flex; align-items: center; gap: 9px; margin: 0; padding: 6px; font-weight: 400; cursor: pointer; }
.classification-option:hover { background: var(--surface-hover); }
.classification-option input { width: 16px; height: 16px; min-height: 0; margin: 0; padding: 0; flex-shrink: 0; accent-color: var(--accent); }
.help { font-size: .75rem; margin: 8px 0 0; }
.filter-note { margin-top: 26px; border-top: 1px solid var(--border-subtle); padding-top: 18px; font-size: .75rem; }
.filter-note p { margin-bottom: 0; }

.results-heading { margin: 0 0 16px; min-height: 29px; }
.results-heading p { font-size: .8rem; margin: 0; }
.result-card { padding: 24px; margin-bottom: 16px; }
.badge { flex-shrink: 0; font-size: .7rem; font-weight: 650; border-radius: 12px; padding: 4px 10px; white-space: nowrap; }
.score-badge { color: var(--success); background: var(--success-background); }
.error-badge { color: var(--error); background: var(--error-background); }
.resource-meta, .tags { display: flex; flex-wrap: wrap; }
.resource-meta { column-gap: 14px; margin-top: 8px; font-size: .75rem; }
.resource-url, .description, .record-error { overflow-wrap: anywhere; }
.resource-url { min-width: 0; }
.description { font-size: .9rem; margin: 16px 0; }
.tags { gap: 7px; }
.tag { border: 1px solid var(--border); background: var(--surface-muted); color: var(--accent); border-radius: 12px; padding: 2px 8px; font-size: .7rem; }
.analysis-details, .evidence-list li { border-top: 1px solid var(--border-subtle); }
.analysis-details { margin-top: 18px; padding-top: 12px; font-size: .8rem; }
summary { width: fit-content; }
.evidence-list { list-style: none; padding: 0; }
.evidence-list li { padding-block: 12px; }
.evidence-list p, .record-error p { margin: 4px 0 0; }
.record-error { background: var(--error-surface); border-left: 3px solid var(--error-border); padding: 12px 14px; font-size: .8rem; color: var(--error); }
.record-error strong { text-transform: capitalize; }
.error-text { color: var(--error); font-size: .8rem; }
.notice { padding: 30px; }
.notice button { border: 1px solid var(--accent); border-radius: 5px; padding: 8px 16px; background: var(--accent); color: var(--on-accent); }
.error-notice { border-color: var(--error-border); }
footer { font-size: .75rem; padding-block: 40px 24px; }

@media (max-width: 900px) {
  .directory { grid-template-columns: 240px minmax(0, 1fr); gap: 22px; }
  .card-heading { flex-direction: column; gap: 8px; }
}
@media (max-width: 680px) {
  .page-width { padding-inline: 20px; }
  .header-inner { min-height: 72px; }
  .brand span { display: block; border: 0; margin: 0; padding: 0; font-size: .7rem; }
  .intro { padding-block: 28px 20px; }
  .directory { grid-template-columns: 1fr; gap: 24px; }
  aside, .result-card { padding: 20px; }
  h3 { overflow-wrap: anywhere; }
}
