/* ATARN Archive — design system
   Materials of the composite bow: horn, sinew, birch bark, lacquer, cinnabar. */

@import url("fonts/fonts.css");

:root {
  --paper: #f5efe3;
  --paper-2: #efe7d6;
  --surface: #fcf9f1;
  --ink: #221c12;
  --ink-2: #55493a;
  --muted: #83755f;
  --line: #e0d5bd;
  --line-2: #cfc1a2;
  --accent: #a63a1e;         /* cinnabar */
  --accent-ink: #8c2f16;
  --accent-soft: #a63a1e14;
  --gold: #9a7328;
  --shadow: 0 1px 2px rgb(60 45 20 / .06), 0 8px 28px -12px rgb(60 45 20 / .18);
  --shadow-lg: 0 2px 6px rgb(40 28 10 / .08), 0 24px 60px -24px rgb(40 28 10 / .35);
  --r: 5px;
  --r-lg: 8px;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --display: "EB Garamond", Georgia, serif;
  --w: 1120px;
  color-scheme: light;
}
[data-theme="dark"] {
  --paper: #0d0b08;
  --paper-2: #12100c;
  --surface: #171410;
  --ink: #f4eddd;
  --ink-2: #d6c9ae;
  --muted: #ab9d85;
  --line: #292219;
  --line-2: #3d3324;
  --accent: #e2704b;
  --accent-ink: #ef8560;
  --accent-soft: #e2704b1c;
  --gold: #cfa14e;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 8px 28px -12px rgb(0 0 0 / .6);
  --shadow-lg: 0 2px 6px rgb(0 0 0 / .5), 0 24px 60px -24px rgb(0 0 0 / .8);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 85% -100px, var(--accent-soft), transparent 60%),
    var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
::selection { background: var(--accent); color: #fff8ee; }
kbd {
  font: 500 11px/1 var(--sans);
  padding: 3px 5px 4px;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 3px;
  color: var(--muted);
  background: var(--surface);
}

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 200;
  background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 4px;
}
.skip:focus { left: 8px; }

/* ---------- top bar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  border-bottom: 1px solid var(--line);
}
.topbar-in {
  max-width: var(--w); margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 26px; height: 58px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand .mark { color: var(--accent); flex: none; }
.brand-t {
  font: 650 17px/1 var(--display);
  letter-spacing: .04em;
  display: flex; align-items: baseline; gap: 7px;
}
.brand-sub {
  font: 500 10.5px/1 var(--sans);
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold);
}
.topnav { display: flex; align-items: center; gap: 4px; margin-right: auto; }
.topnav > a, .menu > summary {
  font: 500 13.5px/1 var(--sans);
  color: var(--ink-2);
  padding: 8px 11px; border-radius: 4px;
  cursor: pointer; list-style: none;
  display: flex; align-items: center; gap: 6px;
}
.menu > summary::-webkit-details-marker { display: none; }
.topnav > a:hover, .menu > summary:hover { background: var(--accent-soft); color: var(--accent-ink); text-decoration: none; }
.menu { position: relative; }
.menu[open] > summary { background: var(--accent-soft); color: var(--accent-ink); }
.menu-panel {
  position: absolute; top: calc(100% + 10px); left: -10px; z-index: 60;
  display: flex; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: 16px;
  width: min(560px, calc(100vw - 32px));
  animation: pop .16s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.menu-col { flex: 1; min-width: 0; }
.menu-col h4 {
  margin: 2px 8px 8px;
  font: 600 10.5px/1 var(--sans);
  letter-spacing: .18em; text-transform: uppercase; color: var(--muted);
}
.menu-col a {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 8px; border-radius: 4px;
  font: 450 13.5px/1.3 var(--sans); color: var(--ink);
}
.menu-col a:hover { background: var(--accent-soft); text-decoration: none; }
.menu-col a .g {
  flex: none; width: 22px; text-align: center;
  font-size: 12px; color: var(--gold);
  overflow: hidden; white-space: nowrap;
}
.menu-col a em { margin-left: auto; font: 450 11.5px/1 var(--sans); color: var(--muted); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.searchbtn {
  display: flex; align-items: center; gap: 8px;
  font: 450 13px/1 var(--sans); color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px; padding: 8px 10px 8px 12px;
  cursor: pointer; min-width: 150px;
  transition: border-color .15s, color .15s;
}
.searchbtn:hover { border-color: var(--line-2); color: var(--ink-2); }
.searchbtn span { margin-right: auto; }
.themebtn {
  background: none; border: 1px solid transparent; border-radius: 5px;
  color: var(--muted); padding: 8px; cursor: pointer; display: grid; place-items: center;
}
.themebtn:hover { color: var(--ink); background: var(--accent-soft); }
[data-theme="light"] .ic-moon { display: none; }
[data-theme="dark"] .ic-sun { display: none; }

/* ---------- hero ---------- */

.hero { border-bottom: 1px solid var(--line); overflow: hidden; }
.hero-in {
  max-width: var(--w); margin: 0 auto; padding: 72px 20px 56px;
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: 48px; align-items: center;
}
.hero h1 {
  font: 620 clamp(34px, 4.6vw, 54px)/1.06 var(--display);
  letter-spacing: -.005em;
  margin: 0 0 20px;
}
.hero h1 em { font-style: normal; font-weight: inherit; color: var(--accent-ink); }
.lede {
  font: 400 17px/1.65 var(--serif);
  color: var(--ink-2); margin: 0 0 30px; max-width: 54ch;
}
.lede strong { color: var(--ink); }
.herosearch {
  display: flex; align-items: center; gap: 12px;
  width: min(460px, 100%);
  font: 450 15px/1 var(--sans); color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 6px; padding: 14px 14px 14px 16px;
  cursor: text;
  box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s;
}
.herosearch:hover, .herosearch:focus-visible { border-color: var(--accent); }
.herosearch span { margin-right: auto; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chips button {
  font: 500 12.5px/1 var(--sans); color: var(--ink-2);
  background: none; border: 1px solid var(--line-2);
  border-radius: 5px; padding: 7px 13px; cursor: pointer;
  transition: all .15s;
}
.chips button:hover { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }
.hero-art { display: grid; place-items: center; }
.moongate {
  position: relative;
  width: min(340px, 100%); aspect-ratio: 1;
  border-radius: 50%; overflow: hidden;
  outline: 1px solid var(--line-2);
  outline-offset: 10px;
  box-shadow: var(--shadow-lg), inset 0 0 0 6px var(--paper);
  border: 6px solid var(--surface);
}
.moongate::after {
  content: ""; position: absolute; inset: -16px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  opacity: .5;
  pointer-events: none;
}
.moongate img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- original banner band ---------- */

.banner-band {
  background: #070604;
  border-block: 1px solid var(--line);
  padding: 44px 20px;
}
.banner-band figure { margin: 0; display: grid; gap: 14px; justify-items: center; }
.banner-band img {
  display: block;
  width: min(820px, 100%);
  border-radius: 3px;
  box-shadow: 0 0 0 1px #1e1a12, 0 30px 80px -30px rgb(0 0 0 / .9);
}
.banner-band figcaption {
  font: 400 13px/1.6 var(--serif);
  font-style: italic;
  color: #9b8d74;
  text-align: center;
  max-width: 62ch;
}

/* ---------- bands / section headers ---------- */

.band { max-width: var(--w); margin: 0 auto; padding: 56px 20px 8px; }
.band-alt {
  max-width: none;
  background: var(--paper-2);
  border-block: 1px solid var(--line);
  margin-top: 56px; padding: 56px max(20px, calc((100vw - var(--w)) / 2 + 20px)) 56px;
}
.band-h { margin-bottom: 28px; }
.band-h2 { margin-top: 56px; }
.band-h h2 {
  font: 620 27px/1.15 var(--display);
  margin: 0 0 6px;
  display: flex; align-items: center; gap: 14px;
}
.band-h h2::after {
  content: ""; height: 1px; flex: 1;
  background: linear-gradient(90deg, var(--line-2), transparent);
}
.band-h p { margin: 0; color: var(--muted); font: 400 14.5px/1.5 var(--sans); }

/* ---------- region grid ---------- */

.regions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 18px;
}
.region {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  color: var(--ink);
  transition: transform .18s cubic-bezier(.2,.7,.3,1), box-shadow .18s, border-color .18s;
}
.region:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--line-2); }
.region-img {
  position: relative; aspect-ratio: 16/9;
  background: linear-gradient(140deg, var(--paper-2), var(--line));
  overflow: hidden;
}
.region-img img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.92); transition: transform .35s ease; }
.region:hover .region-img img { transform: scale(1.04); }
.region-glyph {
  position: absolute; right: 10px; bottom: 8px;
  font: 500 15px/1 var(--serif);
  color: #fff8ee;
  background: rgb(20 12 4 / .55);
  backdrop-filter: blur(4px);
  padding: 5px 9px; border-radius: 4px;
  max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.region-b { padding: 14px 16px 16px; display: grid; gap: 6px; }
.region-b h3 { margin: 0; font: 600 17px/1.25 var(--display); }
.region-b p { margin: 0; font: 400 13px/1.5 var(--sans); color: var(--muted); }
.region-n { font: 500 11.5px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--gold); margin-top: 4px; }

/* ---------- collection rows ---------- */

.colls {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 12px;
  padding-bottom: 48px;
}
.coll {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 13px 16px;
  color: var(--ink);
  transition: border-color .15s, background .15s;
}
.coll:hover { text-decoration: none; border-color: var(--accent); background: var(--accent-soft); }
.coll-g { flex: none; width: 30px; text-align: center; font-size: 16px; color: var(--gold); }
.coll-t { display: grid; gap: 1px; min-width: 0; }
.coll-t strong { font: 600 14.5px/1.3 var(--sans); }
.coll-t em { font: 400 12.5px/1.4 var(--sans); font-style: normal; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.coll-n { margin-left: auto; font: 620 15px/1 var(--display); color: var(--muted); }

/* ---------- article cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
  padding-bottom: 48px;
}
.card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden; color: var(--ink);
  transition: transform .18s cubic-bezier(.2,.7,.3,1), box-shadow .18s;
}
.card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card-img { aspect-ratio: 16/9; overflow: hidden; background: var(--paper-2); }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-b { padding: 16px 18px 15px; display: grid; gap: 8px; align-content: start; }
.card-b h3 { margin: 0; font: 600 16.5px/1.3 var(--display); }
.card-b p { margin: 0; font: 400 13px/1.55 var(--sans); color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-m { display: flex; gap: 12px; font: 500 11.5px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--gold); margin-top: 2px; }

/* ---------- page head / crumbs ---------- */

.pagehead { max-width: var(--w); margin: 0 auto; padding: 40px 20px 8px; }
.crumbs { display: flex; align-items: center; gap: 8px; font: 450 12.5px/1 var(--sans); color: var(--muted); margin-bottom: 22px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent-ink); }
.crumbs span[aria-current] { color: var(--ink-2); }
.pagehead-row { display: flex; gap: 18px; align-items: flex-start; }
.pagehead-glyph {
  flex: none; width: 58px; height: 58px;
  display: grid; place-items: center;
  font: 500 22px/1 var(--serif);
  color: var(--accent-ink);
  background: var(--accent-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.pagehead h1 { font: 620 clamp(26px, 3.5vw, 38px)/1.1 var(--display); margin: 0 0 8px; letter-spacing: -.01em; }
.pagehead-desc { margin: 0; color: var(--muted); font: 400 15px/1.55 var(--serif); max-width: 72ch; }
.orig-intro { margin: 26px 0 4px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.orig-intro summary {
  cursor: pointer; padding: 11px 16px;
  font: 500 13px/1 var(--sans); color: var(--ink-2);
  list-style: none; display: flex; align-items: center; gap: 8px;
}
.orig-intro summary::-webkit-details-marker { display: none; }
.orig-intro summary::before { content: "❧"; color: var(--gold); }
.orig-intro[open] summary { border-bottom: 1px solid var(--line); }
.orig-intro .prose { padding: 6px 22px 14px; }
.cards-wide { max-width: var(--w); margin: 26px auto 0; padding: 0 20px 56px; }

/* ---------- article ---------- */

.progress { position: fixed; top: 0; left: 0; right: 0; height: 2.5px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .1s linear; }
.art { max-width: 760px; margin: 0 auto; padding: 40px 20px 72px; }
.art-h h1 { font: 620 clamp(27px, 4vw, 40px)/1.12 var(--display); letter-spacing: -.012em; margin: 0 0 14px; }
.art-m {
  display: flex; flex-wrap: wrap; gap: 7px 18px; align-items: center;
  font: 500 12px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 22px; margin-bottom: 30px;
  border-bottom: 1px solid var(--line);
}
.art-m a { color: var(--gold); }
.toc {
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface);
  padding: 16px 20px; margin: 0 0 30px;
  font-size: 13.5px;
}
.toc h2 { font: 600 11px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.toc a { color: var(--ink-2); }
.toc a:hover { color: var(--accent-ink); }
.toc-h3 { padding-left: 16px; }

.prose {
  font: 400 17px/1.75 var(--serif);
  color: var(--ink);
}
.prose > p:first-of-type { font-size: 18px; }
.prose p { margin: 0 0 1.1em; }
.prose h1, .prose h2, .prose h3, .prose h4 {
  font-family: var(--display); line-height: 1.25; letter-spacing: -.008em;
  margin: 1.7em 0 .6em; font-weight: 600;
}
.prose h1 { font-size: 24px; } .prose h2 { font-size: 21px; } .prose h3 { font-size: 18px; } .prose h4 { font-size: 16.5px; }
.prose img {
  display: block;
  margin: 28px auto;
  border-radius: 4px;
  box-shadow: var(--shadow);
  cursor: zoom-in;
  background: var(--surface);
}
.prose hr {
  border: none; height: 1px; margin: 34px auto;
  background: var(--line-2);
  width: 120px;
}
.prose blockquote {
  margin: 1.4em 0; padding: 2px 0 2px 20px;
  border-left: 2px solid var(--accent);
  color: var(--ink-2); font-style: italic;
}
.prose table {
  border-collapse: collapse; margin: 1.6em 0;
  font: 400 14px/1.55 var(--sans);
  width: 100%;
  display: block; overflow-x: auto;
}
.prose td, .prose th {
  border: 1px solid var(--line);
  padding: 8px 12px;
  vertical-align: top;
  text-align: left;
}
.prose th { background: var(--paper-2); font-weight: 600; }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 26px; }
.prose li { margin-bottom: .35em; }
.prose a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--accent); }
.prose pre { overflow-x: auto; background: var(--paper-2); padding: 14px 16px; border-radius: 4px; font-size: 13px; }
.img-lost {
  display: inline-block;
  font: 450 12px/1.4 var(--sans); color: var(--muted);
  border: 1px dashed var(--line-2); border-radius: 4px;
  padding: 14px 20px; margin: 8px 0;
}
.img-lost::before { content: "◌ "; color: var(--gold); }
a.ext::after, a.wayback::after {
  content: "↗";
  font-size: .78em;
  margin-left: 3px;
  color: var(--muted);
  display: inline-block;
}
a.wayback { text-decoration-style: dashed; }

.pn {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  margin-top: 48px; padding-top: 26px;
  border-top: 1px solid var(--line);
}
.pn a {
  display: grid; gap: 5px;
  padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface);
  color: var(--ink);
  transition: border-color .15s;
}
.pn a:hover { text-decoration: none; border-color: var(--accent); }
.pn em { font: 500 11px/1 var(--sans); font-style: normal; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pn strong { font: 620 14.5px/1.35 var(--display); }
.pn-next { text-align: right; }

/* ---------- letters ---------- */

.yearnav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.yearnav a {
  font: 620 13.5px/1 var(--display);
  border: 1px solid var(--line-2); border-radius: 5px;
  padding: 8px 15px; color: var(--ink-2);
}
.yearnav a:hover { border-color: var(--accent); color: var(--accent-ink); text-decoration: none; background: var(--accent-soft); }
.yeargroup { max-width: var(--w); margin: 0 auto; padding: 34px 20px 6px; }
.yeargroup h2 {
  font: 620 22px/1 var(--display); margin: 0 0 16px;
  display: flex; align-items: center; gap: 14px; color: var(--ink-2);
}
.yeargroup h2::after { content: ""; height: 1px; flex: 1; background: linear-gradient(90deg, var(--line-2), transparent); }
.letters { display: grid; gap: 10px; }
.letter {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 13px 18px 13px 14px;
  color: var(--ink);
  transition: border-color .15s, transform .15s;
}
.letter:hover { text-decoration: none; border-color: var(--accent); transform: translateX(3px); }
.letter-mo {
  flex: none; width: 44px; height: 44px;
  display: grid; place-items: center;
  font: 620 13px/1 var(--display);
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-radius: 5px;
}
.letter-b { display: grid; gap: 2px; min-width: 0; }
.letter-b strong { font: 600 15px/1.3 var(--display); }
.letter-b em { font: 400 12.5px/1.5 var(--sans); font-style: normal; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.letter-rt { margin-left: auto; flex: none; font: 500 11.5px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* ---------- gallery ---------- */

.gfilters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.gfilters button {
  font: 500 12.5px/1 var(--sans); color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 5px; padding: 8px 14px; cursor: pointer;
  transition: all .15s;
}
.gfilters button:hover { border-color: var(--accent); color: var(--accent-ink); }
.gfilters button.on { background: var(--accent); border-color: var(--accent); color: #fff8ee; }
.wall {
  max-width: var(--w); margin: 26px auto 0; padding: 0 20px 72px;
  columns: 4 240px; column-gap: 14px;
}
.tile {
  break-inside: avoid; margin: 0 0 14px;
  border-radius: var(--r); overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  position: relative;
  display: block;
}
.tile img { display: block; width: 100%; cursor: zoom-in; }
.tile figcaption {
  padding: 8px 12px 9px;
  font: 450 11.5px/1.4 var(--sans); color: var(--muted);
}
.tile figcaption a { color: var(--ink-2); }
.tile figcaption a:hover { color: var(--accent-ink); }

/* ---------- search palette ---------- */

.palette { position: fixed; inset: 0; z-index: 100; }
.palette[hidden] { display: none; }
.palette-backdrop { position: absolute; inset: 0; background: rgb(15 10 4 / .45); backdrop-filter: blur(3px); }
.palette-panel {
  position: relative;
  max-width: 660px; margin: 9vh auto 0;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: pal .18s cubic-bezier(.2,.9,.3,1.15);
  display: flex; flex-direction: column;
  max-height: 74vh;
  width: calc(100vw - 28px);
}
@keyframes pal { from { opacity: 0; transform: translateY(10px) scale(.985); } }
.palette-head {
  display: flex; align-items: center; gap: 12px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.palette-head input {
  flex: 1; border: none; outline: none; background: none;
  font: 450 16.5px/1.3 var(--sans);
  color: var(--ink);
}
.palette-head input::placeholder { color: var(--muted); opacity: .75; }
.palette-head input::-webkit-search-cancel-button { display: none; }
.palette-esc { background: none; border: none; cursor: pointer; padding: 0; }
.palette-filters {
  display: flex; gap: 6px; padding: 10px 14px 4px;
  overflow-x: auto; scrollbar-width: none; flex: none;
}
.palette-filters::-webkit-scrollbar { display: none; }
.palette-filters button {
  flex: none;
  font: 500 11.5px/1 var(--sans); color: var(--ink-2);
  background: none; border: 1px solid var(--line);
  border-radius: 5px; padding: 6px 11px; cursor: pointer;
}
.palette-filters button.on { background: var(--accent); border-color: var(--accent); color: #fff8ee; }
.palette-status { padding: 8px 18px 2px; font: 450 11.5px/1 var(--sans); color: var(--muted); flex: none; min-height: 22px; }
.palette-results { list-style: none; margin: 4px 0 0; padding: 0 8px 10px; overflow-y: auto; }
.palette-results li[role="option"] {
  padding: 11px 12px; border-radius: 5px; cursor: pointer;
  display: grid; gap: 3px;
}
.palette-results li[aria-selected="true"] { background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); }
.pr-t { font: 600 14.5px/1.3 var(--display); color: var(--ink); display: flex; gap: 10px; align-items: baseline; }
.pr-t .pr-sec { font: 500 10.5px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--gold); flex: none; }
.pr-t .pr-d { font: 450 11px/1 var(--sans); color: var(--muted); margin-left: auto; flex: none; }
.pr-x { font: 400 12.5px/1.5 var(--sans); color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.palette mark, .pr-x mark {
  background: none; color: var(--accent-ink);
  font-weight: 600;
  border-bottom: 2px solid color-mix(in srgb, var(--accent) 45%, transparent);
}
.pr-t mark { background: none; color: var(--accent-ink); border: none; }
.palette-empty { padding: 34px 20px 40px; text-align: center; color: var(--muted); font: 400 14px/1.6 var(--sans); }
.palette-empty strong { color: var(--ink-2); font-family: var(--display); font-size: 16px; }
.pr-h { font: 600 10.5px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding: 14px 12px 6px; }

/* ---------- lightbox ---------- */

.lightbox { position: fixed; inset: 0; z-index: 120; background: rgb(12 8 3 / .93); display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 94vw; max-height: 92vh; display: grid; gap: 10px; justify-items: center; }
.lightbox img { max-width: 94vw; max-height: 84vh; width: auto; height: auto; border-radius: 3px; box-shadow: 0 20px 80px rgb(0 0 0 / .6); }
.lightbox figcaption { color: #cbbfa8; font: 450 13px/1.4 var(--sans); text-align: center; padding: 0 20px; }
.lightbox figcaption a { color: #f0e6d2; text-decoration: underline; }
.lb-close, .lb-prev, .lb-next {
  position: absolute; z-index: 2;
  background: rgb(255 248 238 / .08);
  border: 1px solid rgb(255 248 238 / .2);
  color: #f0e6d2;
  width: 44px; height: 44px; border-radius: 5px;
  font-size: 19px; cursor: pointer;
  display: grid; place-items: center;
  transition: background .15s;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgb(255 248 238 / .2); }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }

/* ---------- home years / footer ---------- */

.years { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-bottom: 64px; }
.years a {
  font: 620 15px/1 var(--display);
  border: 1px solid var(--line-2); border-radius: 5px;
  padding: 10px 18px; color: var(--ink-2);
  transition: all .15s;
}
.years a:hover { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); text-decoration: none; }
.years-all { border-style: dashed !important; color: var(--gold) !important; }

.foot { border-top: 1px solid var(--line); background: var(--paper-2); margin-top: 24px; }
.foot-in { max-width: var(--w); margin: 0 auto; padding: 36px 20px 44px; }
.foot-brand { display: flex; align-items: center; gap: 10px; font: 450 14px/1 var(--sans); color: var(--ink-2); margin-bottom: 14px; }
.foot-brand .mark { color: var(--accent); }
.foot p { max-width: 68ch; font: 400 13px/1.7 var(--sans); color: var(--muted); margin: 0 0 16px; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 18px; font: 500 13px/1 var(--sans); }
.foot-nav a { color: var(--ink-2); }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero-in { grid-template-columns: 1fr; gap: 36px; padding-top: 48px; }
  .hero-art { order: -1; }
  .moongate { width: min(240px, 60vw); }
  .topnav > a { display: none; }
  .searchbtn { min-width: 0; }
  .searchbtn kbd, .searchbtn span { display: none; }
  .searchbtn { padding: 9px; }
  .pn { grid-template-columns: 1fr; }
  .pn-next { text-align: left; }
  .pagehead-glyph { display: none; }
}

@media print {
  .topbar, .foot, .pn, .progress, .palette, .lightbox, .toc { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .art { max-width: none; padding: 0; }
  a.ext::after, a.wayback::after { content: " (" attr(href) ")"; font-size: 9pt; }
}
