:root {
  --paper: #f5f0e4;
  --paper-deep: #e7ddc8;
  --ink: #211d19;
  --muted: #675e53;
  --line: #cfc2aa;
  --red: #a8372d;
  --red-dark: #74251f;
  --gold: #bd8428;
  --blue: #376a78;
  --white: #fffdf8;
  --shadow: 0 14px 38px rgb(49 37 24 / 10%);
  --radius: 14px;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 150px; }
[hidden] { display: none !important; }
.archive-notice { padding: 1rem 1.2rem; margin-bottom: 1.3rem; border-left: 4px solid var(--gold); background: var(--white); border-radius: 8px; color: var(--muted); font-size: .85rem; line-height: 1.5; }
.archive-notice p { margin: .45rem 0; }
.archive-notice small { display: block; margin-top: .4rem; }
.prose del { color: var(--muted); text-decoration-thickness: 2px; background: #efe4d9; }
.missing-proof { color: var(--muted); border-bottom: 1px dashed currentColor; font-size: .85em; }
.answer-link { font-family: system-ui, sans-serif; font-size: .8em; padding: .3rem; }
.feedback { margin: 2rem 0; font-size: .9rem; }
.pagination { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.5rem 0; }
.pagination a { padding: .5rem .8rem; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; }
.pagination [aria-current] { background: var(--red-dark); color: var(--white); }
.search-panel select { padding: .6rem; border: 1px solid var(--line); border-radius: 8px; background: var(--white); max-width: 100%; }
.search-type-label { display: inline-block; margin: 1rem .5rem 1rem 0; }
.checkbox-label { display: flex; align-items: center; gap: .6rem; margin-top: 1rem; }
.search-panel .checkbox-label input { width: 1.2rem; height: 1.2rem; }
.source-health { margin: .5rem 0; font-size: .8rem; color: var(--muted); }
.source-health summary { cursor: pointer; padding: .65rem 0; }
.source-health li { margin-bottom: .5rem; overflow-wrap: anywhere; }
.epic-abilities { margin: 0; }
.epic-abilities > div { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.epic-abilities > div:last-child { border-bottom: 0; }
.epic-abilities dt { font-weight: 750; color: var(--red-dark); }
.epic-abilities dd { margin: .4rem 0 0; line-height: 1.65; }
.ability-source { font-size: .8em; }
.archive-folder.accent-gold .archive-folder-action { color: #775012; }

body {
  min-width: 300px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 4%, rgb(189 132 40 / 12%), transparent 26rem),
    linear-gradient(180deg, #f9f6ed 0, var(--paper) 35rem);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: .28;
  background-image: repeating-linear-gradient(0deg, transparent 0 3px, rgb(67 52 32 / 3%) 4px);
}

a { color: var(--red-dark); text-underline-offset: .17em; }
a:hover { color: var(--red); }
button, input, select { font: inherit; }
kbd { font-size: .75em; }

.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: 20;
  top: .75rem;
  left: .75rem;
  padding: .65rem .9rem;
  color: var(--white);
  background: var(--ink);
  border-radius: 8px;
  transform: translateY(-150%);
}
.skip-link:focus { transform: none; }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
  min-height: 68px;
  padding: .65rem clamp(1rem, 4vw, 4rem);
  background: rgb(249 246 237 / 92%);
  border-bottom: 1px solid rgb(120 96 64 / 22%);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  width: fit-content;
  border-radius: 8px;
}

.brand-wordmark { display: grid; gap: .3rem; }
.brand-name { color: var(--ink); font-size: 1.55rem; line-height: 1; letter-spacing: -.045em; white-space: nowrap; }
.brand-domain { color: var(--red-dark); font-size: .76em; letter-spacing: -.025em; }
.brand-caption { color: var(--muted); font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: .56rem; font-weight: 650; line-height: 1.2; letter-spacing: .17em; text-transform: uppercase; }
.brand:hover .brand-name { color: var(--red-dark); }
.brand:hover .brand-mark { transform: rotate(-5deg); box-shadow: 2px 3px 0 var(--gold), inset 0 0 0 3px var(--red), inset 0 0 0 4px rgb(255 253 248 / 38%); }

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  font-size: 1.45rem;
  place-items: center;
  color: var(--white);
  background: var(--red);
  border: 2px solid var(--ink);
  border-radius: 50% 44% 48% 42%;
  box-shadow: 2px 2px 0 var(--gold), inset 0 0 0 3px var(--red), inset 0 0 0 4px rgb(255 253 248 / 38%);
  transition: transform .18s ease, box-shadow .18s ease;
}

.site-header nav {
  display: flex;
  justify-content: center;
  gap: clamp(.6rem, 2.4vw, 2rem);
}

.site-header nav a,
.search-link {
  padding: .45rem .15rem;
  color: var(--muted);
  font-size: .92rem;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.site-header nav a:hover,
.site-header nav a[aria-current="page"],
.search-link:hover { color: var(--red-dark); border-bottom-color: currentColor; }

.search-link kbd {
  display: inline-block;
  min-width: 1.55rem;
  padding: .13rem .35rem;
  color: var(--muted);
  text-align: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 5px;
  box-shadow: 0 2px 0 var(--line);
}

main {
  width: min(1160px, calc(100% - 2rem));
  min-height: calc(100vh - 240px);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 5.5rem) 0;
}

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; line-height: 1.08; }
h1 { max-width: 20ch; margin-bottom: 1rem; font-size: clamp(2.35rem, 7vw, 5.7rem); letter-spacing: -.045em; }
h2 { font-size: clamp(1.35rem, 3vw, 2rem); }
p { line-height: 1.68; }

.eyebrow {
  margin-bottom: .9rem;
  color: var(--red);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.hero { max-width: 900px; padding: clamp(1rem, 4vw, 3rem) 0 2rem; }
.hero h1 { text-wrap: balance; }
.lead { max-width: 700px; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.32rem); }

.hero-search {
  display: flex;
  max-width: 760px;
  margin-top: 2rem;
  padding: .45rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.hero-search input,
.list-tools input,
.search-panel input {
  min-width: 0;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.hero-search input { flex: 1; padding: .85rem 1rem; border: 0; }
.hero-search button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .75rem 1.2rem;
  color: var(--white);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  background: var(--red);
  border: 1px solid var(--red-dark);
  border-radius: 8px;
}
.hero-search button:hover, .button:hover { color: var(--white); background: var(--red-dark); }

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 2.5rem 0 4rem;
  border-block: 1px solid var(--line);
}
.metrics div { padding: 1.25rem clamp(.5rem, 2vw, 1.5rem); border-right: 1px solid var(--line); }
.metrics div:last-child { border-right: 0; }
.metrics strong { display: block; font-family: Georgia, serif; font-size: clamp(1.7rem, 4vw, 2.7rem); }
.metrics span { color: var(--muted); font-size: .85rem; }

.start-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.archive-hero { padding-top: 0; padding-bottom: 0; }
.archive-hero h1 { font-size: clamp(2.6rem, 6vw, 4.8rem); }
.archive-folders { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; padding-top: .8rem; }
.archive-folder {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 255px;
  padding: 1.5rem;
  color: var(--ink);
  text-decoration: none;
  background: linear-gradient(145deg, var(--white), var(--paper));
  border: 1px solid var(--line);
  border-top: 5px solid var(--accent);
  border-radius: 0 14px 14px 14px;
  box-shadow: 0 5px 0 rgb(79 54 32 / 7%), 0 12px 28px rgb(49 37 24 / 6%);
  transition: transform .18s ease, box-shadow .18s ease;
}
.archive-folder-tab {
  position: absolute;
  bottom: calc(100% + 4px);
  left: -1px;
  min-width: 45%;
  padding: .5rem 1rem .35rem;
  color: var(--white);
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .12em;
  background: var(--accent);
  border-radius: 10px 18px 0 0;
}
.archive-folder-count { margin-bottom: 1.6rem; color: var(--muted); font-size: .8rem; }
.archive-folder strong { margin-bottom: .55rem; font-family: Georgia, serif; font-size: 2rem; }
.archive-folder-description { color: var(--muted); font-size: .92rem; line-height: 1.6; }
.archive-folder-action { display: flex; justify-content: space-between; gap: 1rem; margin-top: auto; padding-top: 1.4rem; color: var(--accent); font-weight: 750; font-size: .85rem; }
.archive-folder:hover, .archive-folder:focus-visible { color: var(--ink); transform: translateY(-5px); box-shadow: 0 8px 0 rgb(79 54 32 / 7%), 0 18px 32px rgb(49 37 24 / 10%); }
.feature-card {
  position: relative;
  display: flex;
  min-height: 225px;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  overflow: hidden;
  color: var(--ink);
  text-decoration: none;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 4px 0 rgb(79 54 32 / 7%);
  transition: transform .18s ease, box-shadow .18s ease;
}
.feature-card::before { position: absolute; top: 0; left: 0; width: 100%; height: 8px; content: ""; background: var(--accent); }
.feature-card:hover { color: var(--ink); transform: translateY(-4px); box-shadow: var(--shadow); }
.feature-card > span { margin-bottom: auto; color: var(--accent); font-size: .75rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.feature-card strong { margin-bottom: .4rem; font-family: Georgia, serif; font-size: 1.45rem; line-height: 1.15; }
.feature-card small { color: var(--muted); }
.accent-red { --accent: var(--red); }
.accent-gold { --accent: var(--gold); }
.accent-blue { --accent: var(--blue); }

.notice {
  max-width: 860px;
  margin: 4rem 0 0;
  padding: 1.5rem 1.7rem;
  background: rgb(255 253 248 / 68%);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}
.notice h2 { margin-bottom: .4rem; font-size: 1.2rem; }
.notice p { margin-bottom: 0; color: var(--muted); }

.breadcrumbs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; color: var(--muted); font-size: .84rem; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs span:last-child { max-width: 50ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.page-heading { max-width: 780px; margin-bottom: 2.5rem; }
.page-heading h1, .detail-heading h1 { font-size: clamp(2.25rem, 6vw, 4.7rem); }
.page-heading > p:last-child, .detail-heading .subtitle { color: var(--muted); font-size: 1.1rem; }

.list-tools {
  display: grid;
  grid-template-columns: auto minmax(180px, 440px) 1fr;
  align-items: center;
  gap: .8rem;
  margin-bottom: 1rem;
}
.list-tools label { font-size: .84rem; font-weight: 750; }
.list-tools input { padding: .7rem .85rem; }
.list-tools span { justify-self: end; color: var(--muted); font-variant-numeric: tabular-nums; }

.entity-list { background: rgb(255 253 248 / 62%); border: 1px solid var(--line); border-radius: var(--radius); }
.entity-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(200px, 1.4fr) auto;
  gap: 1rem;
  align-items: center;
  min-height: 64px;
  padding: .75rem 1rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.entity-row:last-child { border-bottom: 0; }
.entity-row:hover { color: var(--ink); background: var(--white); }
.entity-row span { overflow: hidden; color: var(--muted); font-size: .88rem; text-overflow: ellipsis; white-space: nowrap; }
.entity-row small { color: var(--muted); text-align: right; }
[hidden] { display: none !important; }

.detail-heading { max-width: 930px; margin-bottom: 2.5rem; }
.detail-heading h1 { margin: .65rem 0 .6rem; text-wrap: balance; }
.status-badge {
  display: inline-block;
  padding: .35rem .65rem;
  color: var(--red-dark);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: #f0dfc7;
  border-radius: 999px;
}

.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(245px, 320px); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.narrow-content { max-width: 820px; }
.detail-section, .empty-state { margin-bottom: 1rem; padding: clamp(1.25rem, 3vw, 2rem); background: rgb(255 253 248 / 74%); border: 1px solid var(--line); border-radius: var(--radius); }
.detail-section h2, .empty-state h2 { margin-bottom: 1rem; }
.detail-section h2 small { color: var(--muted); font-family: inherit; font-size: .65em; font-weight: 500; }
.prose p:last-child, .empty-state p:last-child { margin-bottom: 0; }
.prose { overflow-wrap: anywhere; }
.qa-list { display: grid; gap: .9rem; }
.qa-intro { padding: 0 .15rem; color: var(--muted); }
.qa-intro p:last-child { margin-bottom: 0; }
.qa-item { overflow: hidden; background: var(--white); border: 1px solid var(--line); border-radius: 11px; }
.qa-question,
.qa-answer {
  display: grid;
  grid-template-columns: 1.8rem minmax(0, 1fr);
  gap: .8rem;
  align-items: start;
  padding: 1rem 1.1rem;
}
.qa-question { margin: 0; font-family: inherit; font-size: 1.02rem; line-height: 1.5; background: rgb(240 223 199 / 58%); }
.qa-answer { line-height: 1.68; border-top: 1px solid rgb(207 194 170 / 65%); }
.qa-answer p { margin-bottom: .7rem; }
.qa-answer p:last-child { margin-bottom: 0; }
.qa-marker {
  display: grid;
  width: 1.8rem;
  height: 1.8rem;
  place-items: center;
  color: var(--white);
  font-size: .75rem;
  font-weight: 850;
  line-height: 1;
  background: var(--red);
  border-radius: 50%;
}
.qa-answer .qa-marker { color: var(--ink); background: var(--gold); }
.inline-proof {
  display: inline-block;
  padding: 0 .12em;
  color: var(--red-dark);
  font-size: .88em;
  font-weight: 750;
  text-decoration-thickness: .08em;
}
.inline-proof::after { content: " ↗"; font-size: .75em; text-decoration: none; }

.metadata-card { position: sticky; top: 88px; overflow: hidden; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.metadata-card > div { padding: 1rem 1.1rem; border-bottom: 1px solid var(--line); }
.metadata-card > div:last-child { border-bottom: 0; }
.metadata-card > div > span { display: block; margin-bottom: .4rem; color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.metadata-card p, .metadata-card em { margin: 0; font-size: .9rem; }

.chips { display: flex; flex-wrap: wrap; gap: .38rem; }
.chip { display: inline-block; padding: .24rem .55rem; color: var(--ink); font-size: .76rem; text-decoration: none; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; }
a.chip:hover { color: var(--white); background: var(--red); border-color: var(--red); }

.article-toc { scroll-margin-top: 150px; }
.article-toc-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1rem; margin-bottom: 1.5rem; }
.article-toc-heading h2 { margin: 0; font-size: 1.7rem; }
.article-toc-heading > span { color: var(--muted); font-size: .78rem; }
.article-toc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.article-toc-group { min-width: 0; }
.article-toc-group h3 { display: flex; align-items: center; gap: .6rem; margin: 0 0 .7rem; font-family: inherit; font-size: .88rem; }
.article-toc-group h3 > span { color: var(--gold); font-size: .72rem; letter-spacing: .06em; }
.article-toc-group ul { display: grid; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.article-toc-group a { display: flex; align-items: center; justify-content: space-between; gap: .65rem; min-height: 46px; padding: .65rem .8rem; color: var(--ink); font-size: .88rem; line-height: 1.4; text-decoration: none; background: var(--paper); border: 1px solid transparent; border-radius: 8px; transition: background .15s, border-color .15s, color .15s; }
.article-toc-group a > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.article-toc-group a:hover, .article-toc-group a:focus-visible { color: var(--red-dark); background: var(--white); border-color: var(--line); }
.toc-arrow { flex: none; color: var(--red-dark); }
.article-toc-group:last-child { grid-column: 1 / -1; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.article-toc-group:last-child ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.article-toc-group:last-child li, .article-toc-group:last-child a { height: 100%; }

.link-list, .source-list { padding-left: 1.2rem; }
.link-list li, .source-list li { margin: .55rem 0; line-height: 1.5; }
.comment-card { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.comment-card h3 { margin-bottom: .2rem; font-size: 1.08rem; }
.comment-card .meta { margin-bottom: .5rem; color: var(--muted); font-size: .78rem; }

.set-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.set-card { display: flex; min-height: 74px; flex-direction: column; justify-content: center; padding: .75rem .85rem; color: var(--ink); text-decoration: none; background: var(--paper); border: 1px solid transparent; border-radius: 8px; }
.set-card:hover { color: var(--ink); background: var(--white); border-color: var(--line); }
.set-card span { margin-top: .2rem; color: var(--muted); font-size: .78rem; }
.set-card-unlinked { border-color: rgb(119 101 78 / 18%); }
.set-card-unlinked:hover { background: var(--paper); border-color: rgb(119 101 78 / 18%); }
.catalog-note { margin-bottom: 1rem; padding: 1rem 1.2rem; line-height: 1.55; background: #f0dfc7; border-left: 4px solid var(--gold); border-radius: 8px; }

.set-families { display: grid; gap: .8rem; }
.set-family {
  overflow: hidden;
  background: rgb(255 253 248 / 72%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.set-family[open] { background: rgb(255 253 248 / 90%); box-shadow: 0 8px 24px rgb(49 37 24 / 7%); }
.set-family > summary {
  display: grid;
  grid-template-columns: 1.5rem 1fr auto auto;
  gap: .8rem;
  align-items: center;
  min-height: 70px;
  padding: 1rem 1.2rem;
  cursor: pointer;
  list-style: none;
}
.set-family > summary::-webkit-details-marker { display: none; }
.set-family > summary:hover { background: var(--white); }
.set-family > summary strong { font-family: Georgia, serif; font-size: 1.25rem; }
.set-family > summary small { color: var(--muted); }
.folder-mark {
  position: relative;
  display: inline-block;
  width: 1.25rem;
  height: .9rem;
  background: var(--gold);
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgb(83 56 20 / 25%);
}
.folder-mark::before {
  position: absolute;
  top: -.28rem;
  left: .08rem;
  width: .55rem;
  height: .32rem;
  content: "";
  background: var(--gold);
  border-radius: 2px 2px 0 0;
}
.set-family > summary::after { margin-left: .2rem; color: var(--muted); content: "+"; font-size: 1.25rem; }
.set-family[open] > summary::after { content: "−"; }
.set-family-content { padding: 0 1.2rem 1.2rem; border-top: 1px solid var(--line); }
.faq-group-description { margin: 0; padding: 1rem 0; color: var(--muted); }
.faq-entity-list { overflow: hidden; background: var(--paper); }
.faq-entity-list .entity-row { grid-template-columns: minmax(210px, 1fr) minmax(240px, 1.5fr) auto; }
.set-catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; padding-top: 1rem; }
.set-tile {
  display: flex;
  min-height: 78px;
  flex-direction: column;
  justify-content: center;
  padding: .85rem 1rem;
  color: var(--ink);
  text-decoration: none;
  background: var(--paper);
  border: 1px solid transparent;
  border-radius: 9px;
}
.set-tile:hover { color: var(--ink); background: var(--white); border-color: var(--line); }
.set-tile span { margin-top: .25rem; color: var(--muted); font-size: .78rem; }
.set-number { align-self: flex-start; margin-bottom: .38rem; padding: .14rem .42rem; color: var(--red-dark); font-size: .68rem; letter-spacing: .05em; text-transform: uppercase; background: #f0dfc7; border-radius: 999px; }
.set-subfolder { margin-top: 1.2rem; padding: 1rem; background: rgb(231 221 200 / 42%); border-radius: 10px; }
.set-subfolder h3 { display: flex; align-items: center; gap: .65rem; margin: 0; font-size: 1.05rem; }
.set-subfolder .set-catalog-grid { padding-top: .8rem; }

.search-panel { width: 100%; min-width: 0; max-width: 900px; padding: clamp(1rem, 3vw, 2rem); overflow: hidden; background: rgb(255 253 248 / 75%); border: 1px solid var(--line); border-radius: var(--radius); }
.search-panel > label { display: block; margin-bottom: .4rem; font-weight: 750; }
.search-panel > input { width: 100%; padding: .9rem 1rem; font-size: 1.05rem; }
.search-panel > p { margin: .7rem 0 1.3rem; color: var(--muted); font-size: .88rem; }
.search-results { display: grid; min-width: 0; gap: .65rem; }
.search-result { display: grid; min-width: 0; max-width: 100%; grid-template-columns: 8rem minmax(0, 1fr); gap: 1rem; padding: 1rem; overflow: hidden; color: var(--ink); text-decoration: none; background: var(--paper); border: 1px solid transparent; border-radius: 9px; }
.search-result:hover { color: var(--ink); background: var(--white); border-color: var(--line); }
.search-result > span { color: var(--red-dark); font-size: .73rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.search-result > div { min-width: 0; overflow: hidden; }
.search-result strong { display: block; margin-bottom: .25rem; overflow-wrap: anywhere; font-family: Georgia, serif; font-size: 1.12rem; }
.search-result small { display: block; overflow: hidden; color: var(--muted); line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }

.not-found { max-width: 650px; padding: 4rem 0; }
.not-found p { color: var(--muted); }

.site-footer { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; padding: 2.2rem clamp(1rem, 4vw, 4rem); color: #d9ceba; background: var(--ink); }
.site-footer p { max-width: 650px; margin: 0; font-size: .78rem; line-height: 1.5; }

@media (max-width: 800px) {
  .archive-folders { grid-template-columns: 1fr; gap: 3rem; }
  .archive-folder { min-height: 225px; }
  .site-header { grid-template-columns: 1fr auto; gap: .5rem; }
  .site-header nav { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; flex-wrap: wrap; }
  .search-link { grid-column: 2; grid-row: 1; }
  main { padding-top: 2rem; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metrics div:nth-child(2) { border-right: 0; }
  .metrics div:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .start-grid { grid-template-columns: 1fr; }
  .feature-card { min-height: 170px; }
  .detail-layout { grid-template-columns: 1fr; }
  .metadata-card { position: static; grid-row: auto; }
  .set-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .set-catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .article-toc-grid, .article-toc-group:last-child ul { grid-template-columns: 1fr; }
  .site-header { padding-inline: .8rem; }
  .brand { gap: .6rem; }
  .brand-mark { width: 34px; height: 34px; font-size: 1.2rem; }
  .brand-name { font-size: 1.2rem; }
  .brand-caption { font-size: .46rem; letter-spacing: .12em; }
  .site-header nav { gap: .2rem .85rem; }
  .site-header nav a { white-space: nowrap; }
  main { width: min(100% - 1.25rem, 1160px); }
  .hero-search { display: grid; }
  .hero-search button { min-height: 46px; }
  .list-tools { grid-template-columns: 1fr auto; }
  .list-tools label { grid-column: 1 / -1; }
  .entity-row { grid-template-columns: 1fr auto; gap: .35rem .7rem; }
  .faq-entity-list .entity-row { grid-template-columns: 1fr auto; }
  .entity-row span { grid-column: 1 / -1; grid-row: 2; }
  .set-card-grid { grid-template-columns: 1fr; }
  .set-catalog-grid { grid-template-columns: 1fr; }
  .set-family > summary { grid-template-columns: 1.5rem 1fr auto; }
  .set-family > summary small { display: none; }
  .qa-question, .qa-answer { grid-template-columns: 1.55rem minmax(0, 1fr); gap: .65rem; padding: .85rem; }
  .qa-marker { width: 1.55rem; height: 1.55rem; }
  .search-result { grid-template-columns: 1fr; gap: .3rem; }
  .site-footer { grid-template-columns: 1fr; gap: .8rem; }
}

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