/* Bird Archive — typographic index + filterable grid, after the OMEN archive pattern, in Bird Whisper tokens. */
.arch{padding:48px 5% 100px;color:inherit}
.arch-total{font:400 clamp(88px,16vw,200px)/.82 var(--serif, "Instrument Serif", Georgia, serif);letter-spacing:-.05em;margin:12px 0 8px}
.arch-sub{margin:0 0 36px;font-size:11px;letter-spacing:.22em;text-transform:uppercase;opacity:.8}
.arch-sub .n{font-family:var(--mono, "Cousine", monospace);letter-spacing:0}
.arch-controls{border-top:1px solid currentColor;padding:18px 0 8px;display:grid;gap:16px}
.arch-search{display:flex;flex-direction:column;gap:8px;max-width:420px}
.arch-search label{font-size:10px;letter-spacing:.2em;text-transform:uppercase;opacity:.7}
.arch-search input{background:transparent;border:0;border-bottom:1px solid currentColor;color:inherit;font:13px/1.4 var(--mono, "Cousine", monospace);padding:8px 0;border-radius:0}
.arch-search input:focus{outline:none;border-bottom-width:2px}
.arch-row{display:grid;grid-template-columns:90px 1fr;gap:8px 16px;align-items:start}
.arch-row h2{margin:0;font-size:10px;letter-spacing:.22em;text-transform:uppercase;opacity:.65;padding-top:6px;font-weight:400}
.arch-chips{display:flex;flex-wrap:wrap;gap:2px 14px}
.arch-chips button,.arch-chips a{all:unset;cursor:pointer;font-size:11px;letter-spacing:.12em;text-transform:uppercase;padding:4px 0;opacity:.55;border-bottom:1px solid transparent;color:inherit}
.arch-chips button .n,.arch-chips a .n{font-family:var(--mono, "Cousine", monospace);letter-spacing:0;font-size:10px;margin-left:4px}
.arch-chips button[aria-pressed="true"],.arch-chips a[aria-pressed="true"]{opacity:1;border-bottom-color:currentColor}
.arch-chips button:hover,.arch-chips button:focus-visible,.arch-chips a:hover,.arch-chips a:focus-visible{opacity:1}
.arch-result{margin:10px 0 28px;font-size:11px;letter-spacing:.16em;text-transform:uppercase;opacity:.7}
.arch-result b{font:400 16px var(--mono, "Cousine", monospace);letter-spacing:0;margin-right:8px}
.arch-clear{all:unset;cursor:pointer;border-bottom:1px solid currentColor;margin-left:12px}
.arch-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:22px 16px}
.arch-card{display:block;background:none;border:0;padding:0;color:inherit;text-align:left;cursor:zoom-in;width:100%;font:inherit}
.arch-card .im{background:#123526;overflow:hidden;aspect-ratio:4/5}
.arch-card img{width:100%;height:100%;object-fit:cover;display:block;filter:brightness(.96);transition:filter .3s}
.arch-card:hover img,.arch-card:focus-visible img{filter:brightness(1.06)}
.arch-card figcaption,.arch-cap{display:flex;flex-direction:column;gap:2px;padding:8px 0 0;font-size:11px;line-height:1.4}
.arch-card .sp{font-family:var(--serif, "Instrument Serif", Georgia, serif);font-size:16px;font-style:normal;color:inherit;text-decoration:none;display:block;width:max-content;max-width:100%}
.arch-card a.sp:hover,.arch-card a.sp:focus-visible{border-bottom:1px solid currentColor}
.arch-card .sci-name{display:block;font-size:13px;line-height:1.25;opacity:.85;margin-top:1px}
.arch-card .sci-name em{font-style:italic;font-family:var(--serif, "Instrument Serif", Georgia, serif);font-size:13px}
.arch-card .sp em{font-style:italic;opacity:.75;font-size:12px}
.arch-card .meta{opacity:.7;font-size:10px;letter-spacing:.04em;text-transform:uppercase}
.arch-empty{padding:48px 0;border-top:1px solid currentColor;font:400 clamp(22px,3vw,36px)/1.3 var(--serif, "Instrument Serif", Georgia, serif)}
html[data-mode="day"] body.page-archive-index{background:#E8DFCB;color:#0b281c}
html[data-mode="night"] body.page-archive-index{background:#0b281c;color:#E8DFCB}
html[data-mode="night"] .arch-card .im{background:#04190f}
#arch-lightbox{width:min(1100px,96vw);max-height:96dvh;border:0;padding:0;background:#04190f;color:#E8DFCB}
#arch-lightbox::backdrop{background:#000c}
#arch-lightbox .box{display:grid;grid-template-rows:auto 1fr auto;max-height:96dvh}
#arch-lightbox img{width:100%;height:min(72dvh,900px);object-fit:contain;background:#04190f}
#arch-lightbox .lb-bar{display:flex;justify-content:space-between;gap:16px;padding:12px 16px;font-size:11px;letter-spacing:.08em;text-transform:uppercase}
#arch-lightbox .lb-meta{padding:0 16px 16px;font-size:13px;line-height:1.6}
#arch-lightbox .lb-meta a{border-bottom:1px solid currentColor}
#arch-lightbox button.close{all:unset;cursor:pointer;border:1px solid currentColor;padding:6px 10px}
@media(max-width:700px){
  .arch{padding:28px 6% 80px}
  .arch-row{grid-template-columns:1fr}
  .arch-grid{grid-template-columns:repeat(2,1fr);gap:16px 10px}
}
@media(prefers-reduced-motion:reduce){.arch-card img{transition:none}}

/* Species index */
.arch-intent{max-width:42em;margin:8px 0 28px;font-size:13px;line-height:1.7;opacity:.88}
.arch-card .common-es{display:block;font-size:11px;opacity:.75;letter-spacing:.02em}
.arch-card .biome{display:block;font-size:10px;letter-spacing:.04em;text-transform:uppercase;opacity:.65;margin-top:2px}
.arch-card .biome-es{text-transform:none;letter-spacing:0;opacity:.9}
.arch-card .pending-label{display:block;font-size:10px;letter-spacing:.12em;text-transform:uppercase;opacity:.7;margin:4px 0 2px}
.arch-card--pending{cursor:pointer}
.arch-card--pending .im-pending{display:flex;align-items:flex-end;justify-content:flex-start;padding:18px 16px;background:transparent;border:1px solid currentColor;border-color:color-mix(in srgb, currentColor 22%, transparent);aspect-ratio:4/5}
.arch-card--pending .pending-mark{font:400 22px/1.1 var(--serif, "Instrument Serif", Georgia, serif);letter-spacing:.02em;opacity:.55}
html[data-mode="day"] .arch-card--pending .im-pending{background:#E8DFCB;border-color:#0b281c33;color:#0b281c}
html[data-mode="night"] .arch-card--pending .im-pending{background:#0b281c;border-color:#AFFFB933;color:#E8DFCB}
.arch-card--pending .im-pending{background:#0b281c;color:#E8DFCB}
#arch-sentinel{display:block;width:100%;height:1px;margin:24px 0;border:0;padding:0}
#arch-lightbox .lb-thumbs{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
#arch-lightbox .lb-thumb{padding:0;border:1px solid transparent;background:none;cursor:pointer;width:64px;height:80px;overflow:hidden}
#arch-lightbox .lb-thumb img{width:100%;height:100%;object-fit:cover;display:block}
#arch-lightbox .lb-thumb.is-on{border-color:currentColor}
#arch-lightbox img[hidden]{display:none}

/* Contrast: never use opacity on text. Day washi #E8DFCB and night forest #0b281c
   both need 4.5:1 for small type. */
body.page-archive-index{--arch-muted:#D4C9B0}
html[data-mode="day"] body.page-archive-index{--arch-muted:#3d4f3c}
html[data-mode="night"] body.page-archive-index{--arch-muted:#D4C9B0}
.arch-sub{opacity:1;color:var(--arch-muted)}
.arch-search label{opacity:1;color:var(--arch-muted)}
.arch-row h2{opacity:1;color:var(--arch-muted)}
.arch-chips button,.arch-chips a{opacity:1;color:var(--arch-muted)}
.arch-chips button[aria-pressed="true"],.arch-chips a[aria-pressed="true"],
.arch-chips button:hover,.arch-chips button:focus-visible,
.arch-chips a:hover,.arch-chips a:focus-visible{opacity:1;color:inherit}
.arch-result{opacity:1;color:var(--arch-muted)}
.arch-card .sci-name{opacity:1;color:var(--arch-muted)}
.arch-card .sp em{opacity:1;color:var(--arch-muted)}
.arch-card .meta{opacity:1;color:var(--arch-muted)}
.arch-intent{opacity:1;color:var(--arch-muted)}
.arch-card .common-es{opacity:1;color:var(--arch-muted)}
.arch-card .biome{opacity:1;color:var(--arch-muted)}
.arch-card .pending-label{opacity:1;color:var(--arch-muted)}
.arch-card--pending .pending-mark{opacity:1;color:var(--arch-muted)}

/* Prominent ecosystem filter at the top of the archive */
.arch-ecos{margin:0 0 28px;padding:22px 0 8px;border-top:1px solid currentColor}
.arch-ecos h2{margin:0 0 8px;font:400 clamp(22px,3vw,36px)/1.2 var(--serif, "Instrument Serif", Georgia, serif);letter-spacing:.02em;text-transform:none;opacity:1;color:inherit}
.arch-ecos .arch-ecos-l{font-size:.62em;letter-spacing:.08em;color:var(--arch-muted,#D4C9B0)}
.arch-ecos-note{margin:0 0 16px;max-width:46em;font-size:12px;line-height:1.6;color:var(--arch-muted,#D4C9B0)}
.arch-chips--ecos{gap:10px 10px}
.arch-chips--ecos button{
  all:unset;cursor:pointer;
  font-size:12px;letter-spacing:.04em;text-transform:none;
  padding:8px 12px;border:1px solid color-mix(in srgb, currentColor 35%, transparent);
  color:var(--arch-muted,#D4C9B0);
  line-height:1.3;
}
.arch-chips--ecos button .n{font-family:var(--mono, "Cousine", monospace);letter-spacing:0;font-size:11px;margin-left:6px;color:inherit}
.arch-chips--ecos button[aria-pressed="true"]{
  color:inherit;border-color:currentColor;
  background:color-mix(in srgb, currentColor 8%, transparent);
}
.arch-chips--ecos button:hover,.arch-chips--ecos button:focus-visible{color:inherit;border-color:currentColor}
html[lang="ja"] .arch-ecos h2,html[lang="es"] .arch-ecos h2{letter-spacing:.04em}
html[lang="ja"] .arch-ecos h2{font-family:"Noto Sans JP","Hiragino Sans","Hiragino Kaku Gothic ProN","Noto Sans CJK JP",sans-serif;font-weight:400}
html[data-mode="day"] body.page-archive-index .arch-chips--ecos button{
  border-color:#0b281c55;color:var(--arch-muted,#3d4f3c)
}
html[data-mode="day"] body.page-archive-index .arch-chips--ecos button[aria-pressed="true"],
html[data-mode="day"] body.page-archive-index .arch-chips--ecos button:hover,
html[data-mode="day"] body.page-archive-index .arch-chips--ecos button:focus-visible{
  color:#0b281c;border-color:#0b281c;background:#0b281c12
}
html[data-mode="night"] body.page-archive-index .arch-chips--ecos button{
  border-color:#E8DFCB55;color:var(--arch-muted,#D4C9B0)
}
html[data-mode="night"] body.page-archive-index .arch-chips--ecos button[aria-pressed="true"],
html[data-mode="night"] body.page-archive-index .arch-chips--ecos button:hover,
html[data-mode="night"] body.page-archive-index .arch-chips--ecos button:focus-visible{
  color:#E8DFCB;border-color:#E8DFCB;background:#E8DFCB14
}
