:root {
  color-scheme: dark;
  --ink: #111117;
  --ink-raised: #19191f;
  --ink-soft: #202026;
  --line: #343239;
  --line-bright: #514c42;
  --paper: #f2eee5;
  --paper-dim: #b8b2a8;
  --quiet: #8e8991;
  --brass: #d7ad69;
  --brass-bright: #edc987;
  --mint: #9fc5ae;
  --display: Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --wrap: 1160px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--ink); }
body {
  margin: 0; min-height: 100vh; color: var(--paper); background:
    radial-gradient(ellipse at 83% 2%, rgb(93 73 57 / 17%), transparent 30rem),
    radial-gradient(ellipse at 4% 48%, rgb(68 70 77 / 11%), transparent 33rem), var(--ink);
  font: 16px/1.65 var(--sans); overflow-wrap: anywhere;
}
body::before { content: ""; position: fixed; z-index: -1; inset: 0; pointer-events: none; opacity: .28; background-image: radial-gradient(rgb(255 255 255 / 8%) .55px, transparent .7px); background-size: 5px 5px; }
a { color: var(--brass-bright); text-underline-offset: .22em; text-decoration-thickness: .07em; }
a:hover { color: #ffe1a8; }
:focus-visible { outline: 2px solid var(--brass-bright); outline-offset: 5px; border-radius: 2px; }
::selection { color: var(--ink); background: var(--brass-bright); }
.skip-link { position: fixed; z-index: 30; left: 1rem; top: -5rem; padding: .75rem 1rem; color: var(--ink); background: var(--paper); }
.skip-link:focus { top: 1rem; }
.wrap { width: min(calc(100% - 64px), var(--wrap)); margin-inline: auto; }
header { padding-top: 1.35rem; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .2rem 0 1.1rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; color: var(--paper); text-decoration: none; font-size: .83rem; font-weight: 750; letter-spacing: .115em; }
.brand-mark { display: grid; width: 2.1rem; height: 2.1rem; place-items: center; border: 1px solid var(--brass); border-radius: 50%; color: var(--brass-bright); font: italic 1.08rem var(--display); letter-spacing: 0; }
.brand-divider { margin-inline: .42rem; color: var(--brass); font-weight: 400; }
.site-note { color: var(--quiet); font: 12px var(--mono); letter-spacing: .04em; }
.site-nav { display: flex; align-items: center; gap: .25rem; padding: .35rem; border-block: 1px solid var(--line); }
.site-nav a { display: inline-flex; min-height: 42px; align-items: center; padding: .35rem .8rem; border-radius: 2px; color: var(--paper-dim); text-decoration: none; font-size: .82rem; transition: color .18s ease, background-color .18s ease; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--paper); background: #ffffff0b; }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -2px var(--brass); }
main { min-width: 0; }
.eyebrow { margin: 0; color: var(--brass); font: 12px/1.5 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.eyebrow-rule { display: inline-block; width: 26px; height: 1px; margin: 0 .6rem .2rem 0; background: currentColor; }
h1, h2, h3, p { margin-top: 0; }
.buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem 1.6rem; }
.link-button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 1.1rem; padding: .7rem 1rem; border: 1px solid var(--brass); color: var(--ink); background: var(--brass-bright); text-decoration: none; font-size: .8rem; font-weight: 700; transition: background-color .18s ease, transform .18s ease; }
.link-button:hover { color: var(--ink); background: #f3d8a2; transform: translateY(-2px); }
.text-link { display: inline-flex; min-height: 44px; align-items: center; color: var(--paper); font-size: .83rem; text-decoration: none; }
.text-link span { margin-left: .35rem; color: var(--brass); }
.content-section { margin-top: 4.8rem; }
.section-heading { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: .25rem 1rem; margin-bottom: 1.4rem; }
.section-heading .eyebrow { grid-column: 1 / -1; }
.section-heading h2 { margin: 0; font: 400 clamp(2rem, 4vw, 3.15rem)/1.1 var(--display); letter-spacing: -.035em; }
.section-heading > a, .heading-note { color: var(--quiet); font: 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; }
.section-heading > a:hover { color: var(--brass-bright); }
.portal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.portal { position: relative; display: flex; min-width: 0; min-height: 180px; flex-direction: column; padding: 1.25rem 1.3rem 1.35rem; border: 1px solid var(--line); color: var(--paper); background: linear-gradient(145deg, #1d1c22, #17171c); text-decoration: none; transition: border-color .2s ease, background-color .2s ease, transform .2s ease; }
.portal:hover { border-color: var(--brass); color: var(--paper); background: #222126; transform: translateY(-3px); }
.portal strong { max-width: 26ch; margin: .35rem 1.5rem .65rem 0; color: var(--paper); font: 400 1.5rem/1.2 var(--display); }
.portal > span:not(.story-type):not(.card-arrow) { max-width: 52ch; color: var(--paper-dim); font-size: .82rem; line-height: 1.65; }
.story-type { color: var(--brass); font: 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.card-arrow { position: absolute; right: 1.2rem; bottom: 1.2rem; color: var(--brass); transition: transform .2s ease; }
.portal:hover .card-arrow { transform: translate(2px, -2px); }
.featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.feature-card { min-height: 220px; padding: 1.6rem; }
.feature-card strong { font-size: 1.85rem; }
.feature-card:only-child { grid-column: 1 / -1; }
.latest-section { margin-top: 5.2rem; padding-top: 2.1rem; border-top: 1px solid var(--line); }
.latest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.story-card { min-height: 165px; }
.empty-state { padding: clamp(1.5rem, 4vw, 3rem); border: 1px solid var(--line); background: #19191e; }
.empty-icon { color: var(--brass); font-size: 2rem; }
.empty-state h3 { margin: .7rem 0; font: 1.7rem var(--display); }
.empty-state p { max-width: 56ch; color: var(--paper-dim); }
.page-content { min-height: 50vh; padding: clamp(2.2rem, 6vw, 5rem) 0; }
.page-content > .small { margin: 0; color: var(--brass); font: 12px var(--mono); letter-spacing: .14em; }
.page-title { margin: .7rem 0 1.15rem; color: var(--paper); font: 400 clamp(2.7rem, 7vw, 5.2rem)/1.05 var(--display); letter-spacing: -.045em; }
.page-excerpt { max-width: 65ch; margin-bottom: 2rem; color: var(--paper-dim); font-size: 1.12rem; line-height: 1.75; }
.prose { max-width: 72ch; color: var(--paper-dim); font-size: 1rem; line-height: 1.85; overflow-wrap: anywhere; }
.prose p { color: inherit; font-size: inherit; }
.prose h2, .prose h3 { margin: 2rem 0 .7rem; color: var(--paper); font: 1.8rem var(--display); }
.prose li { margin: .65rem 0; }
.prose blockquote { margin: 1.5rem 0; padding: .4rem 1.2rem; border-left: 2px solid var(--brass); color: var(--paper); }
.prose img { max-width: 100%; height: auto; }
.page-content .content-section { margin-top: 4rem; padding-top: 2.4rem; border-top: 1px solid var(--line); }

.heading-note { text-align: right; }

.byline { margin: .5rem 0; color: var(--quiet); font-size: .85rem; }
.references { max-width: 72ch; margin-top: 3rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.references .section-title { margin: 0 0 .8rem; color: var(--brass); font: 12px var(--mono); letter-spacing: .13em; text-transform: uppercase; }
.references ul { padding-left: 1.1rem; color: var(--paper-dim); line-height: 1.8; }
.references a { overflow-wrap: anywhere; }
footer { margin-top: 3rem; padding: 1.6rem 0 2.4rem; border-top: 1px solid var(--line); color: var(--quiet); text-align: center; font: 12px/1.8 var(--mono); }
footer p { margin: .3rem 0; color: inherit; font: inherit; }
footer a { color: var(--paper-dim); }
.footer-mark { color: var(--paper-dim); letter-spacing: .14em; }
.footer-mark span { color: var(--brass); }
@media (min-width: 900px) {
  .featured-grid .portal:first-child { grid-row: span 2; min-height: 100%; justify-content: flex-end; }
}
@media (max-width: 760px) {
  .wrap { width: min(calc(100% - 36px), var(--wrap)); }
  .content-section { margin-top: 3.5rem; }
}
@media (max-width: 560px) {
  .wrap { width: min(calc(100% - 28px), var(--wrap)); }
  .topbar { align-items: flex-start; flex-direction: column; gap: .35rem; padding-bottom: .8rem; }
  .site-note { padding-left: 2.8rem; }
  .site-nav { flex-wrap: wrap; gap: 0; overflow: visible; }
  .site-nav a { flex: 0 0 auto; padding-inline: .62rem; font-size: .75rem; }
  .portal-grid, .featured-grid, .latest-grid { grid-template-columns: 1fr; }
  .portal, .feature-card, .story-card { min-height: 150px; }
  .section-heading { grid-template-columns: 1fr; align-items: start; }
  .section-heading > a, .heading-note { text-align: left; }
  .heading-note { margin-top: .35rem; }
  .page-content { padding-top: 2.8rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .link-button:hover, .portal:hover { transform: none; }
}

/* OGIJUN's expedition console: one vivid interface across stories and characters. */
:root {
  color-scheme: dark;
  --ink: #080d19;
  --ink-raised: #10192a;
  --ink-soft: #172338;
  --line: #293a50;
  --line-bright: #3b536d;
  --paper: #f2f6fb;
  --paper-dim: #c1ccda;
  --quiet: #9caec2;
  --brass: #ff6538;
  --brass-bright: #ffc85a;
  --mint: #b8f34a;
  --display: Georgia, "Times New Roman", serif;
  --sans: "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --wrap: 1220px;
}
html { background: var(--ink); }
body {
  color: var(--paper);
  background:
    radial-gradient(ellipse at 79% 9%, rgb(37 118 145 / 19%), transparent 36rem),
    radial-gradient(ellipse at 3% 40%, rgb(107 61 61 / 13%), transparent 35rem),
    linear-gradient(180deg, #0a1120, var(--ink) 42rem);
  font-size: 16px;
}
body::before {
  opacity: .24;
  background-image:
    linear-gradient(rgb(111 168 207 / 11%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(111 168 207 / 11%) 1px, transparent 1px),
    radial-gradient(rgb(255 255 255 / 9%) .5px, transparent .7px);
  background-size: 72px 72px, 72px 72px, 5px 5px;
}
a { color: var(--mint); }
a:hover { color: #efffc5; }
:focus-visible { outline-color: var(--mint); }
.wrap { width: min(calc(100% - 72px), var(--wrap)); }
header { padding-top: 1rem; }
.topbar {
  min-height: 58px;
  padding: .35rem .2rem .85rem;
  border-bottom: 1px solid var(--line);
}
.brand { gap: .85rem; font-size: .82rem; letter-spacing: .13em; }
.brand-mark {
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid var(--mint);
  border-radius: 6px 2px 6px 2px;
  color: var(--ink);
  background: var(--mint);
  box-shadow: 0 0 22px rgb(184 243 74 / 21%);
  font-weight: 700;
}
.brand-divider { color: var(--brass-bright); }
.site-note { color: var(--paper-dim); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.site-nav {
  display: flex;
  gap: .45rem;
  margin-top: .85rem;
  padding: .4rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  background: linear-gradient(90deg, rgb(17 29 47 / 96%), rgb(12 21 36 / 94%));
  scrollbar-color: var(--line-bright) transparent;
  scrollbar-width: thin;
}
.site-nav a {
  position: relative;
  min-height: 43px;
  flex: 0 0 auto;
  gap: .5rem;
  padding-inline: 1rem;
  border: 1px solid transparent;
  color: var(--paper-dim);
  font-size: .78rem;
  font-weight: 650;
  letter-spacing: .025em;
  white-space: nowrap;
}
.site-nav a::before { width: 5px; height: 5px; border: 1px solid currentColor; transform: rotate(45deg); content: ""; }
.site-nav a:hover { border-color: var(--line-bright); color: var(--paper); background: #ffffff08; }
.site-nav a[aria-current="page"] {
  border-color: #b8f34a55;
  color: var(--mint);
  background: linear-gradient(120deg, #b8f34a13, #b8f34a06);
  box-shadow: inset 0 -2px var(--mint), 0 0 20px #b8f34a0d;
}
main { min-width: 0; }
.eyebrow { color: var(--mint); font-size: 12px; letter-spacing: .16em; }
.eyebrow-rule { width: 32px; }
.hearth-halo { transform-origin: 238px 195px; animation: hearth-glow 4.8s ease-in-out infinite alternate; }
.hearth-flame { transform-box: fill-box; transform-origin: 50% 100%; animation: hearth-flicker 3.2s ease-in-out infinite alternate; }
.hearth-flame-side { animation-delay: -1.7s; animation-duration: 2.7s; opacity: .8; }
.hearth-flame-core { animation-delay: -.8s; animation-duration: 2.3s; }
.hearth-wisps { opacity: .38; stroke-width: 1.2; animation: hearth-wisp 6s ease-in-out infinite alternate; }
.hearth-embers circle { animation: ember-rise 5s ease-out infinite; }
.hearth-embers circle:nth-child(2n) { animation-delay: -2.6s; }
.hearth-embers circle:nth-child(3n) { animation-delay: -1.3s; }
@keyframes hearth-flicker { from { transform: scale(.96,.97) skewX(-2deg); } to { transform: scale(1.025,1.04) skewX(2deg); } }
@keyframes hearth-glow { from { opacity: .7; transform: scale(.95); } to { opacity: 1; transform: scale(1.035); } }
@keyframes hearth-wisp { from { opacity: .18; transform: translateY(4px); } to { opacity: .48; transform: translateY(-4px); } }
@keyframes ember-rise { 0%,8% { opacity: 0; transform: translateY(8px); } 25% { opacity: .9; } 80% { opacity: .5; } 100% { opacity: 0; transform: translate(8px,-32px); } }
@media (prefers-reduced-motion: reduce) { .hearth-halo, .hearth-flame, .hearth-wisps, .hearth-embers circle { animation: none; } }
.buttons { gap: 1rem 1.5rem; }
.link-button {
  position: relative;
  min-height: 50px;
  padding-inline: 1.2rem;
  border-color: var(--mint);
  color: #06131c;
  background: var(--mint);
  box-shadow: 0 6px 26px #b8f34a23;
  font-size: .82rem;
}
.link-button:hover { color: #06131c; background: #b2ffef; }
.text-link { color: var(--paper); text-decoration: underline; text-decoration-color: #b8f34a77; text-underline-offset: .25em; }
.content-section { margin-top: clamp(4.5rem, 8vw, 6rem); }
.section-heading { margin-bottom: 1.7rem; }
.section-heading .eyebrow { color: var(--brass-bright); }
.section-heading h2 { font-size: clamp(2.3rem, 4.2vw, 3.6rem); letter-spacing: -.045em; }
.section-heading h2::after { display: block; width: 3.4rem; height: 2px; margin-top: .7rem; background: linear-gradient(90deg, var(--mint), transparent); content: ""; }
.heading-note, .section-heading > a { color: var(--paper-dim); }
.portal-grid { gap: 1rem; }
.portal {
  min-height: 205px;
  padding: 1.5rem 1.55rem 1.6rem;
  border-color: var(--line-bright);
  background:
    linear-gradient(140deg, #142239, #101927 68%),
    var(--ink-raised);
  box-shadow: inset 0 1px #ffffff09, 0 14px 36px #0003;
}
.portal::before { position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: linear-gradient(var(--mint), #b8f34a22 72%, transparent); content: ""; }
.portal:hover { border-color: var(--mint); background: linear-gradient(140deg, #1a3048, #131e2d 68%); box-shadow: 0 18px 42px #0005, inset 0 1px #b8f34a22; }
.portal strong { color: var(--paper); font-size: 1.7rem; }
.portal > span:not(.story-type):not(.card-arrow) { color: #c9d5e1; }
.story-type { color: var(--mint); font-size: 12px; letter-spacing: .12em; }
.card-arrow { right: 1.4rem; bottom: 1.35rem; color: var(--brass-bright); font-size: 1rem; }
.latest-section { margin-top: clamp(4rem, 7vw, 5.7rem); padding-top: 2.3rem; border-top-color: var(--line-bright); }
.empty-state {
  position: relative;
  overflow: hidden;
  border-color: var(--line-bright);
  background:
    radial-gradient(ellipse at 100% 0, #b8f34a0d, transparent 34rem),
    linear-gradient(140deg, #111d30, #0c1422 74%);
  box-shadow: inset 0 1px #ffffff09;
}
.empty-icon { display: grid; width: 3rem; aspect-ratio: 1; place-items: center; border: 1px solid #b8f34a6b; border-radius: 50%; color: var(--mint); background: #b8f34a0b; box-shadow: 0 0 0 8px #b8f34a06; }
.empty-state h3 { color: var(--paper); font-size: 1.9rem; }
.empty-state p { color: var(--paper-dim); }
.page-content:not(.hall-page) { padding-top: clamp(3.5rem, 7vw, 6rem); }
.page-content:not(.hall-page) > .small { display: flex; align-items: center; gap: .7rem; color: var(--mint); font-size: 12px; letter-spacing: .15em; }
.page-content:not(.hall-page) > .small::before { width: 1.8rem; height: 1px; background: var(--brass); content: ""; }
.page-content:not(.hall-page) > .page-title { margin-top: .9rem; font-size: clamp(3.2rem, 7.4vw, 6rem); letter-spacing: -.07em; }
.page-excerpt { max-width: 62ch; color: #d0dbe6; font-size: clamp(1rem, 1.6vw, 1.15rem); }
.text-page .prose { max-width: 74ch; margin-top: 2.3rem; padding: clamp(1.3rem, 3.2vw, 2.1rem); border: 1px solid var(--line); border-left: 3px solid var(--mint); background: linear-gradient(140deg, #111d30, #0c1422 70%); color: var(--paper-dim); }
.prose { color: var(--paper-dim); line-height: 1.9; }
.prose p { color: inherit; }
.prose h2, .prose h3 { color: var(--paper); }
.prose a, .references a { color: var(--mint); text-decoration-color: #b8f34a77; }
.prose a:hover, .references a:hover { color: #efffc5; }
.prose blockquote { border-left-color: var(--brass); background: #ff65380a; }
.article-page { position: relative; padding-top: clamp(3.5rem, 7vw, 6rem); }
.article-page > .small { color: var(--mint); font-size: 12px; letter-spacing: .16em; }
.article-page > .page-title { max-width: 16ch; margin-top: 1rem; font-size: clamp(3rem, 7.5vw, 6rem); }
.article-page > .page-excerpt { max-width: 58ch; font-size: clamp(1.1rem, 2vw, 1.3rem); }
.article-page .byline { display: inline-block; margin: .15rem .4rem .8rem 0; padding: .35rem .65rem; border: 1px solid var(--line-bright); color: var(--paper-dim); background: #101a2a; font-size: .76rem; }
.article-page .prose { max-width: 76ch; margin-top: 1.5rem; padding-top: 1.6rem; border-top: 1px solid var(--line-bright); color: #d3deea; font-size: 1.03rem; }
.article-page .prose h2 { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: 2rem; }
.article-page .references { padding: 1.3rem 1.5rem; border: 1px solid var(--line); background: #101a2a; }
.references .section-title { color: var(--brass-bright); }
.references ul { color: var(--paper-dim); }
.hero.page-content { margin-top: 1.4rem; border-top: 1px solid var(--line-bright); border-bottom: 1px solid var(--line-bright); background: linear-gradient(125deg, #111d30, #0b1422 75%); }

.site-footer {
  position: relative;
  margin-top: clamp(4rem, 8vw, 6.5rem);
  padding: 2rem 1rem 2.6rem;
  border-top: 1px solid var(--line-bright);
  color: #aebdcc;
  background: linear-gradient(180deg, #101a29b8, #080d19 75%);
}
.site-footer::before { position: absolute; top: -1px; left: 50%; width: min(9rem, 32vw); height: 2px; background: linear-gradient(90deg, transparent, var(--mint), transparent); transform: translateX(-50%); content: ""; }
.site-footer .footer-mark { color: var(--paper); font-size: 12px; letter-spacing: .2em; }
.site-footer .footer-mark span { color: var(--brass-bright); }
.site-footer a { color: var(--mint); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: .25em; }
.site-footer p + p { color: #aebdcc; }
.references { border-top-color: var(--line-bright); }
.byline { color: var(--paper-dim); }

@media (max-width: 760px) {
  .wrap { width: min(calc(100% - 36px), var(--wrap)); }
}
@media (max-width: 560px) {
  .wrap { width: min(calc(100% - 28px), var(--wrap)); }
  .topbar { align-items: flex-start; flex-direction: column; gap: .55rem; padding-bottom: .8rem; }
  .site-note { padding-left: 3.2rem; font-size: 12px; letter-spacing: .04em; }
  .site-nav { margin-top: .65rem; gap: .25rem; }
  .site-nav a { min-height: 42px; padding-inline: .7rem; font-size: .75rem; }
  .section-heading { grid-template-columns: 1fr; align-items: start; }
  .section-heading > a, .heading-note { text-align: left; }
  .heading-note { margin-top: .3rem; }
  .portal-grid, .featured-grid, .latest-grid { grid-template-columns: minmax(0, 1fr); }
  .portal, .feature-card, .story-card { min-height: 165px; }
  .page-content:not(.hall-page) { padding-top: 2.8rem; }
  .page-content:not(.hall-page) > .page-title { font-size: clamp(2.9rem, 14vw, 4.4rem); }
  .article-page > .page-title { font-size: clamp(2.8rem, 12vw, 4rem); }
  .text-page .prose { margin-top: 1.6rem; }

  .site-footer { margin-top: 3.5rem; padding-inline: .3rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* The Den (1 October 2026): a lived-in cave den drawn in one inline SVG.
   Object links share the artwork's 1600×1000 coordinate space, so they stay
   on their objects however the scene is cropped (--crop/--span, art units). */
@property --den-reach { syntax: "<percentage>"; inherits: false; initial-value: 120%; }
.den { --crop: 580; --span: 1000; position: relative; display: grid; grid-template-columns: minmax(0, 1fr); margin-top: 1.2rem; }
.den-head, .den-body { position: relative; z-index: 2; }
.den-head { padding: 2.2rem .3rem 1.4rem; }
.den-body { padding: 1.6rem .3rem .4rem; }
.den h1 { margin: 1.1rem 0 1.2rem; font: 400 clamp(3.6rem, 15vw, 6rem)/.84 var(--display); letter-spacing: -.075em; text-shadow: 0 8px 30px #000a; }
.den h1 em { color: var(--mint); }
.hero-intro { max-width: 36rem; margin-bottom: 1.6rem; color: #e4dccf; font-size: clamp(1rem, 1.4vw, 1.1rem); line-height: 1.75; }
.den-stage { position: relative; aspect-ratio: var(--span) / 1000; overflow: hidden; border-radius: 46% 46% 14px 14px / 24% 24% 14px 14px; background: #120e0c; box-shadow: 0 26px 70px #0009; }
.den-stage::after { position: absolute; z-index: 1; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 2px #3d2e23, inset 0 0 36px 10px #0b0f17; content: ""; pointer-events: none; }
.den-world { position: absolute; top: 0; left: calc(-100% * var(--crop) / var(--span)); width: calc(100% * 1600 / var(--span)); height: 100%; }
.den-art { display: block; width: 100%; height: 100%; }
.den-objects { margin: 0; padding: 0; list-style: none; }
.den-object { position: absolute; z-index: 2; left: calc(var(--x) * 100% / 1600); top: calc(var(--y) * 100% / 1000); width: max(44px, calc(var(--w) * 100% / 1600)); height: max(44px, calc(var(--h) * 100% / 1000)); border-radius: 14px; color: #fff4dd; text-decoration: none; transform: translate(-50%, -50%); -webkit-tap-highlight-color: transparent; }
.den-object-monitor { --x: 1370; --y: 584; --w: 214; --h: 176; }
.den-object-portrait { --x: 1030; --y: 314; --w: 156; --h: 206; }
.den-object-letter { --x: 1214; --y: 698; --w: 84; --h: 40; }
.den-object-campfire { --x: 800; --y: 805; --w: 300; --h: 230; }
.den-label { position: absolute; bottom: calc(100% + 8px); left: 50%; display: inline-flex; min-height: 32px; align-items: center; gap: .5rem; padding: .3rem .8rem; border: 1px solid #e0a75b; border-radius: 999px; color: #fff4dd; background: rgb(22 15 11 / 94%); box-shadow: 0 6px 18px #000b; font: 650 .8rem/1.2 var(--sans); letter-spacing: .02em; white-space: nowrap; transform: translateX(-50%); transition: opacity .2s ease, transform .2s ease, border-color .2s ease; }
.den-label::before { width: 6px; height: 6px; background: var(--brass-bright); transform: rotate(45deg); content: ""; }
.den-object-letter .den-label { top: calc(100% + 8px); bottom: auto; left: 0; transform: none; }
.den-object:hover, .den-object:focus-visible { color: #fff; }
.den-object:is(:hover, :focus-visible) .den-label { border-color: var(--mint); background: #21170f; }
.den-object:focus-visible { outline: 3px solid var(--mint); outline-offset: 4px; box-shadow: 0 0 0 10px rgb(8 13 25 / 72%); }
.den-object:is(:hover, :focus-visible) .den-label::before { background: var(--mint); }
.den-glow { opacity: 0; transition: opacity .3s ease; }
.den:has(.den-object-monitor:is(:hover, :focus-visible)) .den-glow-monitor,
.den:has(.den-object-portrait:is(:hover, :focus-visible)) .den-glow-portrait,
.den:has(.den-object-letter:is(:hover, :focus-visible)) .den-glow-letter,
.den:has(.den-object-campfire:is(:hover, :focus-visible)) .den-glow-campfire { opacity: 1; }
.den-eye { transform: scaleY(0); transform-box: fill-box; transform-origin: center; transition: transform .25s ease; }
.den-eye-shut { transition: opacity .15s ease; }
.den:has(.den-object:is(:hover, :focus-visible)) .den-eye { transform: scaleY(1); }
.den:has(.den-object:is(:hover, :focus-visible)) .den-eye-shut { opacity: 0; }
.hero-coordinate { position: absolute; z-index: 2; bottom: 4%; left: 7%; display: none; color: #dccab0; font: 12px var(--mono); letter-spacing: .1em; text-shadow: 0 1px 6px #000; }
.hero-aside { display: grid; grid-template-areas: "crest index" "crest title" "copy copy" "link link"; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .35rem 1rem; margin-top: 1rem; padding: 1.1rem 1.2rem; border: 1px solid #4a3a2c; border-top: 2px solid #a86c3c; background: linear-gradient(180deg, #1e1713, #130f0e); }
.aside-index { grid-area: index; color: #dcc8a6; font: 12px var(--mono); letter-spacing: .1em; }
.aside-index span { color: var(--brass-bright); }
.crest { position: relative; display: grid; grid-area: crest; width: 58px; aspect-ratio: 1; place-items: center; border: 1px solid #b8f34a7a; border-radius: 50%; color: var(--mint); background: radial-gradient(circle, #b8f34a1c, #120e0c 72%); font: 2rem/.8 var(--display); }
.crest span { transform: translateY(-1px); text-shadow: 0 0 18px #b8f34aa3; }
.aside-title { grid-area: title; margin: 0; color: var(--paper); font: 1.35rem/1.15 var(--display); }
.aside-copy { grid-area: copy; margin: .3rem 0 0; color: #d3c9ba; font-size: .84rem; line-height: 1.6; }
.aside-link { display: flex; grid-area: link; min-height: 44px; align-items: center; justify-content: space-between; gap: 1rem; border-top: 1px solid #4a3a2c; color: var(--mint); font-size: .82rem; text-decoration: none; }
.aside-link:hover { text-decoration: underline; text-underline-offset: .25em; }

/* Idle life: firelight, a candle, and a dragon breathing in its sleep. */
.den-flicker { animation: den-flicker 3.8s ease-in-out infinite alternate; }
.den-candle { transform-box: fill-box; transform-origin: 50% 100%; animation: hearth-flicker 2.4s ease-in-out infinite alternate; }
.den-breath { transform-box: fill-box; transform-origin: 50% 100%; animation: den-breathe 4.6s ease-in-out infinite; }
.den-zzz path { opacity: 0; animation: den-doze 6s ease-out infinite; }
.den-zzz path + path { animation-delay: -3s; }
@keyframes den-flicker { from { opacity: .8; } to { opacity: 1; } }
@keyframes den-breathe { 50% { transform: scale(1.01, 1.035); } }
@keyframes den-doze { 0% { opacity: 0; transform: translate(0, 8px); } 30% { opacity: .8; } 100% { opacity: 0; transform: translate(-16px, -28px); } }

/* Lights up: once per session (site.js), firelight spreads from the hearth
   and the dragon peeks with one eye. Never blocks input. */
.den-dusk { --fire-x: calc((800 - var(--crop)) * 100% / var(--span)); position: absolute; z-index: 3; inset: 0; visibility: hidden; background: radial-gradient(circle at var(--fire-x) 84%, transparent var(--den-reach), rgb(5 4 8 / 96%) calc(var(--den-reach) + 26%)); pointer-events: none; }
.den-waking .den-dusk { visibility: visible; animation: den-dawn 1.4s cubic-bezier(.45, 0, .25, 1) both; }
.den-waking .den-eye { animation: den-peek 3s ease-in-out both; }
.den-waking .den-eye-shut { animation: den-peek-lid 3s ease-in-out both; }
@keyframes den-dawn { from { --den-reach: 3%; opacity: 1; } 70% { opacity: 1; } to { --den-reach: 115%; opacity: 0; } }
@keyframes den-peek { 0%, 30% { transform: scaleY(0); } 37%, 76% { transform: scaleY(1); } 86%, 100% { transform: scaleY(0); } }
@keyframes den-peek-lid { 0%, 30% { opacity: 1; } 33%, 82% { opacity: 0; } 87%, 100% { opacity: 1; } }

@media (max-width: 560px) {
  .den-label { padding-inline: .65rem; font-size: .76rem; }
  .den-object-monitor .den-label { right: 0; left: auto; transform: none; }
  .den-object-letter { --x: 1184; }
}
@media (min-width: 561px) {
  .den { --crop: 330; --span: 1270; }
  .den-head { padding: 3rem 1.2rem 1.8rem; }
  .den-body { padding: 2rem 1.2rem .6rem; }
  .hero-coordinate { display: block; left: 9%; }
  .hero-aside { grid-template-areas: "crest index link" "crest title link" "crest copy link"; grid-template-columns: auto minmax(0, 1fr) auto; padding: 1.2rem 1.6rem; }
  .aside-link { border-top: 0; }
}
@media (min-width: 1080px) {
  .den { --crop: 0; --span: 1600; }
  .den { grid-template-rows: auto auto 1fr auto; }
  .den-head, .den-body { grid-column: 1; max-width: 44%; padding: 0 0 0 clamp(5.5rem, 8.5vw, 7.5rem); }
  .den-head { max-width: 60%; }
  .den-head { grid-row: 1; padding-top: clamp(6rem, 11vw, 9rem); }
  .den-body { grid-row: 2; padding-top: .2rem; }
  .den h1 { font-size: clamp(4.4rem, 6.6vw, 6rem); white-space: nowrap; }
  .den-stage { grid-area: 1 / 1 / 4 / 2; border-radius: 0; background: #0b0f17; box-shadow: none; mask-image: linear-gradient(90deg, #0000, #000 3% 97%, #0000), linear-gradient(#0000, #000 5%); mask-composite: intersect; }
  .den-stage::after { display: none; }
  .hero-coordinate { left: 6.5%; }
}
@media (hover: hover) and (pointer: fine) and (min-width: 761px) {
  .den-label { opacity: 0; transform: translate(-50%, 6px); }
  .den-object:is(:hover, :focus-visible) .den-label { opacity: 1; transform: translateX(-50%); }
  .den-object::after { position: absolute; bottom: calc(100% + 16px); left: 50%; width: 9px; height: 9px; border: 1px solid var(--mint); background: #b8f34a55; box-shadow: 0 0 10px #b8f34a88; transform: translateX(-50%) rotate(45deg); transition: opacity .2s ease; content: ""; }
  .den-object-letter .den-label { transform: translateY(6px); }
  .den-object-letter:is(:hover, :focus-visible) .den-label { transform: none; }
  .den-object-letter::after { top: calc(100% + 16px); bottom: auto; }
  .den-object:is(:hover, :focus-visible)::after { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .den-dusk { display: none; }
  .den-flicker, .den-candle, .den-breath, .den-zzz path { animation: none; }
  .den-zzz path { opacity: .7; }
  .den-label, .den-glow, .den-eye, .den-eye-shut { transition: none; }
}

/* Hall of Fame (1 October 2026): a trophy chamber deeper in the den, and one
   codex page per character. Words carry every fact and source state; the art
   and colour only repeat them. All Hall of Fame rules live in this section. */
/* Labels break between words only, never inside one (body text uses overflow-wrap: anywhere). */
:is(.hall-head, .trophy-hall, .codex) :is(dt, thead th, caption, .chapter-label, .eyebrow, .trophy-realm, .codex-realm, .source-state, .trophy-hall-note) { overflow-wrap: normal; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.site-nav a[aria-current="true"] { border-color: #b8f34a55; color: var(--mint); background: linear-gradient(120deg, #b8f34a13, #b8f34a06); box-shadow: inset 0 -2px var(--mint); }
.hall-head > .small { display: flex; align-items: center; gap: .7rem; margin: 0; color: var(--mint); font: 12px var(--mono); letter-spacing: .15em; }
.hall-head > .small::before { width: 1.8rem; height: 1px; background: var(--brass); content: ""; }
.hall-head .page-title { margin: .9rem 0 .8rem; font-size: clamp(3rem, 8vw, 6.2rem); letter-spacing: -.07em; }
.hall-intro { max-width: 56ch; margin-bottom: 0; color: #e4dccf; }
.portrait-art { display: block; width: 100%; height: auto; }

/* The chamber: an arched rock wall lit by two torches. */
.trophy-hall { position: relative; max-width: 1040px; margin: clamp(2.2rem, 5vw, 3.4rem) auto 0; padding: clamp(3.4rem, 8vw, 6rem) clamp(1rem, 4vw, 3rem) clamp(2.2rem, 4vw, 3.2rem); border-radius: 50% 50% 18px 18px / clamp(70px, 13vw, 200px) clamp(70px, 13vw, 200px) 18px 18px; background: radial-gradient(ellipse 55% 40% at 50% 30%, rgb(255 191 102 / 15%), transparent 70%), radial-gradient(ellipse 26% 36% at 7% 28%, rgb(233 138 58 / 20%), transparent 70%), radial-gradient(ellipse 26% 36% at 93% 28%, rgb(233 138 58 / 20%), transparent 70%), linear-gradient(180deg, #33241a, #1d1510 55%, #120e0c); box-shadow: inset 0 0 0 2px #3d2e23, inset 0 0 60px 14px #0b0f17, 0 26px 70px #0009; }
.trophy-hall::before { position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(ellipse 22% 9% at 24% 46%, rgb(0 0 0 / 22%), transparent), radial-gradient(ellipse 18% 7% at 78% 62%, rgb(0 0 0 / 20%), transparent), radial-gradient(ellipse 30% 6% at 60% 22%, rgb(240 168 98 / 7%), transparent), repeating-linear-gradient(176deg, transparent 0 58px, rgb(240 168 98 / 4%) 58px 60px, transparent 60px 92px, rgb(0 0 0 / 12%) 92px 94px); content: ""; pointer-events: none; }
.trophy-hall::after { position: absolute; inset: auto 0 0; height: 6rem; border-radius: 0 0 18px 18px; background: linear-gradient(transparent, #0d0a09d9); content: ""; pointer-events: none; }
.hall-torch { position: absolute; z-index: 1; top: clamp(4.5rem, 11vw, 8.5rem); width: clamp(46px, 5.5vw, 76px); height: auto; }
.hall-torch-left { left: clamp(.8rem, 5vw, 4rem); }
.hall-torch-right { right: clamp(.8rem, 5vw, 4rem); }
.torch-flame { transform-box: fill-box; transform-origin: 50% 100%; animation: hearth-flicker 2.6s ease-in-out infinite alternate; }
.hall-torch-right .torch-flame { animation-delay: -1.3s; animation-duration: 2.2s; }
.torch-glow { animation: den-flicker 3.4s ease-in-out infinite alternate; }
.trophy-hall-heading { position: relative; z-index: 1; display: grid; justify-items: center; gap: .35rem; margin-bottom: clamp(1.6rem, 4vw, 2.6rem); text-align: center; }
.trophy-hall-heading .eyebrow { color: var(--brass-bright); }
.trophy-hall-heading h2 { margin: 0; color: #fff4dd; font: 400 clamp(2rem, 4.4vw, 3.2rem)/1.1 var(--display); letter-spacing: -.04em; text-shadow: 0 4px 24px #000a; }
.trophy-hall-note { margin: 0; color: #dcc8a6; font: 12px var(--mono); letter-spacing: .08em; }

/* Trophies: an alcove portrait over a brass-edged plaque. The name link's
   ::after covers the whole trophy, so the card is one target. */
.trophy-wall { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 340px)); justify-content: center; gap: clamp(1.4rem, 3vw, 2.4rem); margin: 0; padding: 0; list-style: none; }
.trophy { position: relative; display: grid; min-width: 0; }
.trophy-niche { padding: 14px 16px 0; border-radius: 50% 50% 0 0 / 30% 30% 0 0; background: radial-gradient(ellipse at 50% 35%, #2a1d15, #0d0a09 78%); box-shadow: inset 0 12px 30px #000c, 0 0 0 1px #4a3a2c; }
.trophy-niche .portrait-art { filter: drop-shadow(0 10px 18px #000a); transition: filter .3s ease; }
.trophy-plaque { display: grid; gap: .5rem; justify-items: center; padding: 1.2rem 1.2rem 1.1rem; border: 1px solid #6b4a2a; border-top: 3px solid #c99a55; background: radial-gradient(circle at 12px 12px, #e9c27a 2.5px, #6b4319 3.5px, transparent 4px), radial-gradient(circle at calc(100% - 12px) 12px, #e9c27a 2.5px, #6b4319 3.5px, transparent 4px), linear-gradient(180deg, #2a1e16, #19120e); box-shadow: 0 18px 40px #0009, inset 0 1px #ffffff0d; text-align: center; transition: border-color .2s ease; }
.trophy-realm { margin: 0; color: #dcc8a6; font: 12px var(--mono); letter-spacing: .12em; }
.trophy-name { margin: 0; font: 400 clamp(2.1rem, 3.4vw, 2.6rem)/1 var(--display); letter-spacing: -.04em; }
.trophy-link { color: #fff4dd; text-decoration: none; }
.trophy-link::after { position: absolute; z-index: 2; inset: 0; border-radius: 8px; content: ""; }
.trophy-link:focus-visible { outline: none; }
.trophy-link:focus-visible::after { outline: 3px solid var(--mint); outline-offset: 6px; box-shadow: 0 0 0 12px rgb(8 13 25 / 72%); }
.trophy-identity { margin: 0; color: #e4dccf; font-size: .95rem; }
.trophy-score { display: flex; align-items: center; gap: .8rem; margin: .3rem 0 0; padding: .65rem .2rem; border-block: 1px solid #4a3a2c; text-align: left; }
.trophy-score strong { flex: none; color: #ffd28d; white-space: nowrap; font: 400 2.4rem/1 var(--display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; text-shadow: 0 0 22px #ff65382e; }
.trophy-score span { color: #dcc8a6; font-size: .8rem; line-height: 1.45; }
.trophy-score.is-missing span { padding: .2rem .6rem; border: 1px dashed #8f6a3e; font-style: italic; }
.trophy-fresh { display: grid; margin: 0; color: #d3c9ba; font-size: .8rem; }
.trophy-sources { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.trophy-sources li { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .2rem .45rem; padding: .25rem .6rem; border: 1px solid #3d2e23; border-radius: 999px; background: #120e0c; color: #e4dccf; font-size: .75rem; }
.trophy-cta { display: inline-flex; gap: .4rem; margin: .3rem 0 0; color: var(--mint); font-size: .88rem; font-weight: 650; }
.trophy-cta span { transition: transform .2s ease; }
.trophy:is(:hover, :focus-within) .trophy-plaque { border-top-color: var(--mint); }
.trophy:is(:hover, :focus-within) .portrait-art { filter: drop-shadow(0 0 20px rgb(255 191 102 / 38%)); }
.trophy:hover .trophy-cta span { transform: translateX(4px); }
.trophy-empty { position: relative; z-index: 1; display: grid; justify-items: center; gap: 1rem; max-width: 34ch; margin: 0 auto; color: #e4dccf; text-align: center; }
.trophy-empty-niche { width: 170px; aspect-ratio: 4 / 5; border: 2px dashed #8f6a3e; border-radius: 50% 50% 6px 6px / 40% 40% 6px 6px; background: #120e0c; }
.trophy-empty p { margin: 0; }
.hall-attribution { display: flex; gap: .8rem; max-width: 78ch; margin: 2rem auto 0; padding: 1rem 1.2rem; border: 1px solid #3d2e23; border-left: 3px solid #a86c3c; border-radius: 6px; color: #d3c9ba; background: #120e0ccc; font-size: .82rem; line-height: 1.6; }
.hall-attribution-mark { flex: none; width: .55rem; height: .55rem; margin-top: .5rem; border: 1px solid var(--brass-bright); transform: rotate(45deg); }

/* Source states: always a word, with a matching mark. */
.source-state { display: inline-flex; align-items: center; gap: .4rem; font-size: .75rem; font-weight: 650; letter-spacing: .02em; }
.state-mark { flex: none; width: .55rem; height: .55rem; border: 1.5px solid currentColor; transform: rotate(45deg); }
.source-state-available { color: #c8ff6a; }
.source-state-available .state-mark { background: currentColor; }
.source-state-unavailable { color: #ffc85a; }
.source-state-error { color: #ff9a76; }
.source-state-error .state-mark { background: linear-gradient(135deg, transparent 42%, currentColor 42% 58%, transparent 58%); }
.source-state-not-connected, .source-state-unknown { color: #d3c9ba; }
.source-state-not-connected .state-mark, .source-state-unknown .state-mark { border-style: dashed; }
.is-missing { color: #d3c9ba; font-style: italic; }

/* The codex: a bound journal. Cover page (portrait, name, chapters) beside
   the chapter pages on wide screens; one column below 980px. */
.codex { padding-top: clamp(1.6rem, 4vw, 3rem); }
.codex-trail, .codex-index { display: block; padding: 0; border: 0; }
.codex-trail ol { display: flex; flex-wrap: wrap; gap: .3rem .6rem; margin: 0 0 1.4rem; padding: 0; color: #d3c9ba; font: 12px var(--mono); letter-spacing: .08em; list-style: none; }
.codex-trail a { color: var(--mint); text-decoration-color: #b8f34a77; }
.codex-trail li + li::before { margin-right: .6rem; color: var(--brass-bright); content: "›"; }
.codex-book { display: grid; grid-template-columns: minmax(0, 1fr); border: 1px solid #4a3a2c; border-radius: 10px; background: linear-gradient(180deg, #1e1713, #130f0e); box-shadow: 0 30px 80px #000a, inset 0 1px #ffffff0a; }
.codex-cover { padding: clamp(1.4rem, 4vw, 2.4rem); border-radius: 10px 10px 0 0; border-bottom: 1px solid #4a3a2c; background: radial-gradient(ellipse at 50% 18%, rgb(255 191 102 / 13%), transparent 60%), linear-gradient(180deg, #2a1e16, #1a130f); text-align: center; }
.codex-portrait { max-width: 240px; margin: 0 auto 1.2rem; }
.codex-portrait .portrait-art { filter: drop-shadow(0 12px 22px #000b); }
.codex-portrait figcaption { margin-top: .7rem; color: #d3c9ba; font-size: .8rem; line-height: 1.5; }
.codex-realm { margin: 0; color: #dcc8a6; font: 12px var(--mono); letter-spacing: .12em; }
.codex-name { margin: .35rem 0 .4rem; color: #fff4dd; font: 400 clamp(2.9rem, 7vw, 4.4rem)/1 var(--display); letter-spacing: -.055em; text-shadow: 0 6px 28px #000a; }
.codex-identity { margin: 0; color: #e4dccf; font-size: 1.02rem; }
.codex-summary { max-width: 40ch; margin: .9rem auto 0; color: #d3c9ba; font-size: .9rem; line-height: 1.6; }
.codex-index { margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid #4a3a2c; text-align: left; }
.codex-index ol { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 2px .5rem; margin: 0; padding: 0; list-style: none; }
.codex-index a { display: flex; align-items: center; gap: .6rem; min-height: 44px; padding: .35rem .5rem; border-radius: 6px; color: #fff4dd; font-size: .95rem; text-decoration: none; }
.codex-index a:hover { color: var(--mint); background: #ffffff08; }
.codex-index small { margin-left: auto; color: #d3c9ba; font: 12px var(--mono); }
.chapter-numeral { display: inline-grid; flex: none; width: 1.9rem; place-items: center; color: var(--brass-bright); font: 400 .95rem var(--display); }
.codex-pages { min-width: 0; padding: clamp(1.1rem, 4vw, 2.8rem); }
.codex-chapter { padding-block: clamp(1.7rem, 4vw, 2.5rem); border-top: 1px solid #3d2e23; scroll-margin-top: 1rem; }
.codex-chapter:first-child { padding-top: 0; border-top: 0; }
.codex-chapter:last-child { padding-bottom: 0; }
.chapter-label { margin: 0; color: var(--brass-bright); font: 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.codex-chapter h2 { margin: .3rem 0 1.2rem; color: #fff4dd; font: 400 clamp(1.9rem, 3.4vw, 2.6rem)/1.1 var(--display); letter-spacing: -.035em; }
.codex-chapter h3 { margin: 0 0 .6rem; color: #fff4dd; font: 400 1.3rem/1.2 var(--display); }
.codex-chapter h3.chapter-subhead { margin-top: 1.8rem; }
.codex-chapter a { color: var(--mint); text-decoration-color: #b8f34a77; }
.codex-chapter a:hover { color: #efffc5; }
.chapter-note { max-width: 70ch; margin: .8rem 0 0; color: #d3c9ba; font-size: .82rem; }
.chapter-missing { max-width: 70ch; margin: 0 0 1rem; padding: .8rem 1rem; border: 1px dashed #6b5236; border-radius: 6px; color: #e4dccf; background: #120e0c99; font-size: .92rem; }
.chapter-source { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1rem; margin: 1.1rem 0 0; padding-top: .8rem; border-top: 1px solid #3d2e23; color: #d3c9ba; font-size: .8rem; }
/* Retained: facts from an earlier successful check stay, with a dusty mark. */
.chapter-source.is-retained, .source-card.is-retained { background: radial-gradient(circle, #f2e6cf14 1px, transparent 1.6px) 0 0 / 9px 9px, #1b140f; }
.chapter-source.is-retained { padding: .6rem .8rem; border: 1px dashed #8f6a3e; border-radius: 6px; }
.codex-chapter:has(> .chapter-source.is-retained) > :is(.season-score, .runs-table, .raid-list, .gear-level, .gear-list, .achievement-list, .log-list) { opacity: .8; filter: saturate(.65); }

.codex-withheld { display: flex; gap: .8rem; max-width: 70ch; margin: 0 0 1.1rem; padding: .9rem 1rem; border: 1px solid #8f6a3e; border-left: 3px solid #ffc85a; border-radius: 6px; color: #e4dccf; background: radial-gradient(circle, #f2e6cf14 1px, transparent 1.6px) 0 0 / 9px 9px, #1b140f; font-size: .92rem; line-height: 1.6; }
.codex-withheld strong { color: #ffd28d; }
.codex-withheld-mark { flex: none; width: .6rem; height: .6rem; margin-top: .5rem; border: 1.5px dashed #ffc85a; transform: rotate(45deg); }
.trophy-withheld { color: #ffc85a; }
.codex-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr)); gap: .5rem; margin: 0; }
.codex-facts div { padding: .8rem 1rem; border: 1px solid #3d2e23; border-radius: 6px; background: #17110e; }
.codex-facts dt { color: #d3c9ba; font: 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.codex-facts dd { margin: .25rem 0 0; color: #fff4dd; font: 400 1.35rem/1.25 var(--display); overflow-wrap: break-word; }
.codex-facts dd.is-missing { color: #d3c9ba; font: italic .95rem/1.5 var(--sans); }

.season-score { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1rem; margin: 0 0 1.4rem; }
.season-score strong { color: #ffd28d; white-space: nowrap; font: 400 clamp(3.2rem, 7vw, 4.6rem)/1 var(--display); letter-spacing: -.05em; font-variant-numeric: tabular-nums; text-shadow: 0 0 28px #ff65382e; }
.season-score span { color: #e4dccf; }
.runs-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.runs-table caption { margin-bottom: .5rem; color: #d3c9ba; font: 12px var(--mono); letter-spacing: .1em; text-align: left; text-transform: uppercase; }
.runs-table th, .runs-table td { padding: .65rem .5rem; border-top: 1px solid #ffffff14; text-align: left; vertical-align: baseline; }
.runs-table thead th { padding-block: .4rem; border-top: 0; color: #d3c9ba; font: 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; overflow-wrap: normal; }
.runs-table tbody th { color: #fff4dd; font-weight: 600; }
.runs-table tbody th a { color: #fff4dd; }
.runs-table thead th:last-child, .runs-table .run-score { text-align: right; }
.run-key { color: var(--mint); font: 700 .95rem var(--mono); white-space: nowrap; }
.run-score { color: #e4dccf; font-variant-numeric: tabular-nums; white-space: nowrap; }
.run-result > span { white-space: nowrap; }
.run-detail { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .45rem; margin-top: .15rem; color: #d3c9ba; font-size: .8rem; font-variant-numeric: tabular-nums; overflow-wrap: normal; }
.run-detail > span { white-space: nowrap; }
.run-detail > span + span::before { margin-right: .45rem; color: #8f6a3e; content: "·"; }
.run-upgrades { display: inline-block; margin-left: .2rem; padding: 0 .3rem; border: 1px solid #c8ff6a55; border-radius: 4px; color: #c8ff6a; font: 700 .78rem/1.5 var(--mono); }
.run-clock { color: #b9ad9c; }
.run-timed { color: #c8ff6a; }
.run-over { color: #ffc85a; }

.raid-list, .raid-rows, .log-list, .gear-list, .achievement-list, .source-ledger { margin: 0; padding: 0; list-style: none; }
.raid-list { display: grid; gap: .9rem; }
.raid { padding: 1rem 1.1rem; border: 1px solid #3d2e23; border-radius: 8px; background: #17110e; }
.raid-row { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) auto; align-items: center; gap: .3rem .8rem; min-height: 44px; border-top: 1px solid #ffffff10; }
.raid-row:first-child { border-top: 0; }
.raid-difficulty { color: #fff4dd; font-weight: 650; }
.raid-count { color: #e4dccf; font-size: .9rem; font-variant-numeric: tabular-nums; }
.raid-pips { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px; }
.raid-pips span { width: 10px; height: 10px; border: 1.5px solid #8f6a3e; transform: rotate(45deg); }
.raid-pips .is-down { border-color: #ffbf66; background: linear-gradient(135deg, #ffd28d, #ff6538); }
.raid-link { grid-column: 1 / -1; justify-self: start; font-size: .8rem; }
.log-list { display: grid; gap: .5rem; }
.log-list li { display: flex; flex-wrap: wrap; gap: .2rem 1rem; padding: .6rem .8rem; background: #17110e; }
.log-name { color: #fff4dd; font-weight: 600; }
.log-percentile { color: #ffd28d; font-variant-numeric: tabular-nums; }

.gear-level { margin: 0 0 1rem; color: #e4dccf; }
.gear-level strong { margin-left: .4rem; color: #ffd28d; font: 400 2rem/1 var(--display); }
.gear-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: .6rem; }
.gear-list li { display: grid; grid-template-columns: 3rem minmax(0, 1fr); grid-template-rows: auto auto; align-content: center; align-items: center; column-gap: .8rem; padding: .7rem .8rem; border: 1px solid #3d2e23; border-radius: 6px; background: #17110e; }
.gear-ilvl { display: grid; grid-row: 1 / 3; height: 3rem; place-items: center; border: 1px solid #6b4a2a; border-radius: 50%; color: #ffd28d; font: 700 .95rem var(--mono); font-variant-numeric: tabular-nums; }
.gear-name { color: #fff4dd; font-weight: 600; line-height: 1.3; }
.gear-slot { color: #d3c9ba; font-size: .8rem; }
.achievement-list { display: grid; gap: .5rem; }
.achievement-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem 1rem; padding: .6rem .8rem; border-left: 3px solid #4a3a2c; background: #17110e; }
.achievement-list li.is-notable { border-left-color: var(--brass-bright); }
.achievement-title { color: #fff4dd; font-weight: 600; }
.achievement-date { color: #d3c9ba; font-size: .82rem; }

/* History: a dated table until the trend line has enough weeks (direction C). */
.history-scroll { max-width: 34rem; margin-bottom: 1rem; }
.history-table { width: 100%; border-collapse: collapse; font-size: .92rem; font-variant-numeric: tabular-nums; }
.history-table caption { margin-bottom: .5rem; color: #d3c9ba; font: 12px var(--mono); letter-spacing: .1em; text-align: left; text-transform: uppercase; }
.history-table th, .history-table td { padding: .55rem .5rem; border-top: 1px solid #ffffff14; text-align: right; vertical-align: baseline; }
.history-table thead th { padding-block: .4rem; border-top: 0; color: #d3c9ba; font: 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.history-table :is(thead, tbody) th:first-child { padding-left: 0; text-align: left; }
.history-table tbody th { color: #fff4dd; font-weight: 600; white-space: nowrap; }
.history-table tbody th small { margin-left: .25rem; color: #b9ad9c; font-size: .78rem; font-weight: 400; }
.history-table td { color: #ffd28d; }
.history-table td .is-missing { font-size: .85rem; }
/* The trend line's placeholder: eight faint weekly columns. */
.codex-chapter.is-pending h2 { color: #e4dccf; }
.timeline-reserved { position: relative; padding: 1.2rem 1.2rem 2.4rem 3.2rem; border: 1px dashed #6b5236; border-radius: 8px; color: #e4dccf; background: repeating-linear-gradient(90deg, #6b5236 0 1px, transparent 1px 12.5%) 0 calc(100% - .9rem) / 100% .6rem no-repeat, #120e0c; }
.timeline-reserved::before { position: absolute; top: 1.45rem; left: 1.3rem; width: .75rem; height: .75rem; border: 1.5px dashed var(--brass-bright); transform: rotate(45deg); content: ""; }
.timeline-reserved p { max-width: 62ch; margin: 0; }
.timeline-reserved strong { color: #fff4dd; }

.source-ledger { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: .8rem; }
.source-card { display: grid; align-content: start; gap: .5rem; padding: 1rem; border: 1px solid #3d2e23; border-top: 3px solid #4a3a2c; border-radius: 6px; background: #17110e; }
.source-card-available { border-top-color: #b8f34a; }
.source-card-unavailable { border-top-color: #ffc85a; }
.source-card-error { border-top-color: #ff6538; }
.source-card-not-connected { border-style: dashed; }
.codex-chapter .source-card h3 { margin: 0; font-size: 1.3rem; }
.source-card dl { display: grid; gap: .45rem; margin: .2rem 0 0; }
.source-card dt { color: #d3c9ba; font: 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.source-card dd { margin: 0; color: #e4dccf; font-size: .88rem; }
.codex .hall-attribution { margin: 1.4rem 0 0; }

@media (max-width: 700px) {
  .hall-torch { display: none; }
}
@media (max-width: 560px) {
  .hall-page { padding-top: 2.4rem; }
  .trophy-hall { padding-inline: .8rem; }
  .runs-table { font-size: .85rem; }
  .runs-table th, .runs-table td { padding-inline: .25rem; }
  .runs-table thead th { letter-spacing: .02em; }
  .history-table th, .history-table td { padding-inline: .3rem; }
  /* One run detail per line. */
  .run-detail { flex-direction: column; }
  .run-detail > span + span::before { content: none; }
  .history-table tbody th small { display: block; margin-left: 0; }
  .raid-row { grid-template-columns: minmax(0, 1fr) auto; padding-block: .4rem; }
  /* Identity facts as a compact ledger: label left, value right. */
  .codex-facts { gap: 0; border: 1px solid #3d2e23; border-radius: 6px; background: #17110e; }
  .codex-facts div { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .1rem 1rem; padding: .65rem .85rem; border: 0; border-radius: 0; background: none; }
  .codex-facts div + div { border-top: 1px solid #3d2e23; }
  .codex-facts dd { margin: 0 0 0 auto; font-size: 1.15rem; text-align: right; }
  .raid-pips { grid-column: 1 / -1; }
}
@media (max-width: 380px) {
  .codex-pages { padding-inline: .6rem; }
}
@media (max-width: 350px) {
  /* The narrowest phones: run details may break at the spaces the template leaves breakable. */
  .runs-table { font-size: .8rem; }
  .run-result > span, .run-detail > span { white-space: normal; }
}
@media (min-width: 980px) {
  .codex-book { grid-template-columns: minmax(290px, 340px) minmax(0, 1fr); }
  .codex-cover { border-right: 1px solid #4a3a2c; border-bottom: 0; border-radius: 10px 0 0 10px; box-shadow: inset -22px 0 30px -22px #000d; }
  .codex-index { position: sticky; top: 1rem; }
  .codex-index ol { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .torch-flame, .torch-glow { animation: none; }
  .trophy-niche .portrait-art, .trophy-plaque, .trophy-cta span { transition: none; }
  .trophy:hover .trophy-cta span { transform: none; }
}

/* Visitor notes: contact form and private inbox (operator, 1 Oct 2026). */
.note-form { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); display: grid; gap: 16px; max-width: 640px; }
.note-form form { display: grid; gap: 16px; }
.note-field { display: grid; gap: 6px; }
.note-field label { font-weight: 600; color: var(--paper); }
.note-optional { font-weight: 400; color: var(--paper-dim); }
.note-field input, .note-field textarea { width: 100%; box-sizing: border-box; padding: 12px 14px; font: inherit; color: var(--paper);
  background: var(--ink-raised); border: 1px solid var(--line-bright); border-radius: 4px; }
.note-field textarea { resize: vertical; min-height: 9rem; }
.note-field input:focus-visible, .note-field textarea:focus-visible { outline: 2px solid var(--brass-bright); outline-offset: 2px; }
.note-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.note-privacy { color: var(--paper-dim); font-size: 0.875rem; margin: 0; }
.note-status { margin: 0; padding: 12px 14px; border: 1px solid var(--brass); border-radius: 4px; color: var(--paper); background: var(--ink-soft); }
.note-status-ok { border-color: var(--mint); }
.inbox { max-width: 760px; }
.inbox-note { padding: 16px 0; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.inbox-note p { margin: 0; white-space: normal; overflow-wrap: anywhere; }
.inbox-note form { display: flex; gap: 8px; flex-wrap: wrap; }
.inbox-note button { font: inherit; font-size: 0.875rem; padding: 6px 10px; color: var(--paper); background: var(--ink-soft); border: 1px solid var(--line-bright); border-radius: 4px; cursor: pointer; }
.inbox-new header strong::after { content: " · new"; color: var(--brass-bright); font-weight: 400; }
.inbox-archived { opacity: 0.7; }
.note-send { justify-self: start; border: 0; cursor: pointer; font: inherit; }
