/* Babel — visual system */

:root {
  --bg: #0a0b08;
  --bg-soft: #0d0f0b;
  --panel: #12140e;
  --panel-2: #171a12;
  --panel-3: #1c2016;
  --ink: #e9e1d1;
  --ink-bright: #f6efe2;
  --muted: #a49b89;
  --faint: #756f61;
  --gold: #c9a86a;
  --gold-bright: #e7ce9a;
  --gold-deep: #8d6d3c;
  --line: rgba(201, 168, 106, .16);
  --line-strong: rgba(201, 168, 106, .34);
  --paper: #efe4cd;
  --paper-2: #e6d9bf;
  --paper-ink: #2b271e;
  --paper-faint: #7e7158;
  --danger: #df9079;
  --success: #a4c292;
  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --radius: 9px;
  --shadow-soft: 0 24px 70px -30px rgba(0, 0, 0, .9);
  --shadow-page: 0 40px 100px -35px rgba(0, 0, 0, .95), 0 2px 0 rgba(255, 255, 255, .08) inset;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: rgba(201, 168, 106, .3) var(--bg);
  scrollbar-width: thin;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(1000px 700px at 72% -8%, rgba(201, 168, 106, .09), transparent 62%),
    radial-gradient(900px 900px at -15% 32%, rgba(48, 82, 60, .09), transparent 62%),
    var(--bg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("hex-grid.svg");
  background-size: 69.282px 120px;
  opacity: .24;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .9), rgba(0, 0, 0, .25) 55%, transparent 95%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .9), rgba(0, 0, 0, .25) 55%, transparent 95%);
}

main,
.site-header,
.site-footer {
  position: relative;
  z-index: 1;
}

main {
  min-height: 62vh;
  outline: none;
}

body.modal-open {
  overflow: hidden;
}

::selection {
  color: #1c170d;
  background: var(--gold);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #0b0c09;
}

::-webkit-scrollbar-thumb {
  background: #2c2b21;
  border-radius: 10px;
  border: 2px solid #0b0c09;
}

::-webkit-scrollbar-thumb:hover {
  background: #4a4432;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink-bright);
  line-height: 1.04;
  letter-spacing: -.01em;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
}

img, svg {
  display: block;
}

code {
  font-family: var(--mono);
  font-size: .88em;
}

em {
  font-style: italic;
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border: 1px solid var(--line-strong);
  border-bottom-color: rgba(201, 168, 106, .45);
  border-radius: 4px;
  background: rgba(255, 255, 255, .035);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 2px 0 rgba(0, 0, 0, .3);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1;
  white-space: nowrap;
}

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

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.mono {
  font-family: var(--mono);
}

.muted {
  color: var(--muted);
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 9px 14px;
  border: 1px solid var(--gold);
  border-radius: 4px;
  background: var(--bg);
  color: var(--ink-bright);
  font-size: 13px;
  transform: translateY(-150%);
  transition: transform .18s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: .05;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
}

.fatal {
  max-width: 640px;
  margin: 120px auto;
  padding: 30px;
  border: 1px solid var(--line);
  color: var(--danger);
  font-family: var(--mono);
}

.noscript {
  position: fixed;
  inset: auto 20px 20px;
  z-index: 300;
  padding: 18px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--ink);
  font-size: 14px;
}

/* ------------------------------------------------------------------ *
 * Type and shared details
 * ------------------------------------------------------------------ */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  color: var(--gold);
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .26em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow-line {
  display: block;
  width: 28px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold));
  opacity: .8;
}

.eyebrow-line:last-child {
  background: linear-gradient(to left, transparent, var(--gold));
}

.section-title {
  font-size: clamp(38px, 4.2vw, 58px);
  line-height: 1.02;
}

.section {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 108px 30px;
}

.section-head {
  max-width: 700px;
  margin-bottom: 54px;
}

.section-head--split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  max-width: none;
  gap: 40px;
}

.section-aside {
  max-width: 320px;
  padding-bottom: 8px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.75;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  transition: color .18s ease, gap .18s ease;
}

button.text-link {
  cursor: pointer;
}

.text-link .icon {
  width: 15px;
  height: 15px;
}

.text-link:hover {
  color: var(--gold-bright);
  gap: 11px;
}

.text-link--small {
  font-size: 11.5px;
}

.link-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--faint);
  font-size: 11px;
  text-decoration: underline;
  text-decoration-color: rgba(201, 168, 106, .3);
  text-underline-offset: 3px;
  transition: color .18s ease;
}

.link-button .icon {
  width: 13px;
  height: 13px;
}

.link-button:hover {
  color: var(--gold-bright);
}

.divider {
  height: 1px;
  background: var(--line);
}

/* ------------------------------------------------------------------ *
 * Buttons
 * ------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .02em;
  line-height: 1;
  white-space: nowrap;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.btn .icon {
  width: 16px;
  height: 16px;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  border-color: rgba(231, 206, 154, .5);
  background: linear-gradient(180deg, #ddbd7d, #c19a57);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 12px 30px -16px rgba(201, 168, 106, .75);
  color: #1b160d;
}

.btn--primary:hover {
  background: linear-gradient(180deg, #ebcf94, #cca766);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .4) inset, 0 16px 38px -16px rgba(201, 168, 106, .9);
}

.btn--ghost {
  border-color: var(--line);
  background: rgba(255, 255, 255, .018);
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--line-strong);
  background: rgba(201, 168, 106, .07);
  color: var(--gold-bright);
}

.btn--small {
  min-height: 36px;
  padding: 0 13px;
  font-size: 11.5px;
}

.btn--small .icon {
  width: 14px;
  height: 14px;
}

.btn--wide {
  width: 100%;
}

.btn--danger {
  border-color: rgba(223, 144, 121, .4);
  background: rgba(223, 144, 121, .12);
  color: #f0b5a3;
}

.btn--danger:hover {
  background: rgba(223, 144, 121, .2);
  border-color: rgba(223, 144, 121, .6);
}

.btn.is-saved {
  border-color: rgba(201, 168, 106, .5);
  background: rgba(201, 168, 106, .1);
  color: var(--gold-bright);
}

.btn:disabled {
  cursor: default;
  opacity: .35;
  transform: none;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--faint);
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}

.icon-btn .icon {
  width: 15px;
  height: 15px;
}

.icon-btn:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, .025);
  color: var(--gold-bright);
}

.chip {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, .015);
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: .01em;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}

.chip:hover {
  border-color: var(--line-strong);
  background: rgba(201, 168, 106, .06);
  color: var(--gold-bright);
}

/* ------------------------------------------------------------------ *
 * Header
 * ------------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid transparent;
  background: rgba(10, 11, 8, .55);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: background .25s ease, border-color .25s ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  background: rgba(10, 11, 8, .88);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 36px;
  width: 100%;
  max-width: 1360px;
  height: 78px;
  margin: 0 auto;
  padding: 0 30px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  flex: 0 0 auto;
  color: var(--gold);
}

.brand-mark {
  width: 30px;
  height: 33px;
  color: var(--gold);
  transition: color .2s ease, transform .3s ease;
}

.brand:hover .brand-mark {
  color: var(--gold-bright);
  transform: rotate(-4deg);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1;
}

.brand-word {
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 600;
  color: var(--ink-bright);
  letter-spacing: .015em;
}

.brand-sub {
  color: var(--faint);
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: .19em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-left: auto;
}

.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  transition: color .18s ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink-bright);
}

.site-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border: 1px solid rgba(201, 168, 106, .35);
  border-radius: 20px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.header-random {
  min-height: 34px;
  border-color: transparent;
  color: var(--muted);
}

.header-random:hover {
  border-color: var(--line);
}

.menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
}

.menu-btn .icon {
  width: 18px;
  height: 18px;
}

.menu-btn .icon--close {
  display: none;
}

.site-header.is-menu-open .menu-btn .icon--menu {
  display: none;
}

.site-header.is-menu-open .menu-btn .icon--close {
  display: block;
}

/* ------------------------------------------------------------------ *
 * Search form
 * ------------------------------------------------------------------ */

.search-shell {
  width: 100%;
}

.search-form {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 58px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(18, 20, 14, .86);
  box-shadow: 0 12px 45px -30px rgba(0, 0, 0, .9), 0 1px 0 rgba(255, 255, 255, .025) inset;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.search-form:focus-within {
  border-color: rgba(201, 168, 106, .6);
  background: rgba(20, 22, 15, .96);
  box-shadow: 0 0 0 4px rgba(201, 168, 106, .08), 0 20px 60px -30px rgba(0, 0, 0, 1);
}

.search-form-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  width: 19px;
  height: 19px;
  color: var(--gold);
  transform: translateY(-50%);
  pointer-events: none;
  opacity: .9;
}

.search-form input {
  flex: 1 1 auto;
  min-width: 0;
  height: 46px;
  padding: 0 12px 0 51px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink-bright);
  font-size: 15.5px;
  letter-spacing: .005em;
}

.search-form input::placeholder {
  color: var(--faint);
  opacity: .85;
}

.search-form input[aria-invalid="true"] {
  color: #f0b5a3;
}

.search-submit {
  flex: 0 0 auto;
  height: 46px;
  padding: 0 19px;
  margin-left: 6px;
}

.search-submit .icon {
  transition: transform .2s ease;
}

.search-submit:hover .icon {
  transform: translateX(2px);
}

.search-hint {
  margin: 10px 0 0 4px;
  color: var(--faint);
  font-size: 11.5px;
  letter-spacing: .015em;
}

.search-form--hero {
  min-height: 68px;
  padding: 7px;
  border-color: rgba(201, 168, 106, .24);
  background: rgba(18, 20, 14, .9);
}

.search-form--hero .search-form-icon {
  left: 24px;
  width: 20px;
  height: 20px;
}

.search-form--hero input {
  height: 54px;
  padding-left: 58px;
  font-size: 17px;
}

.search-form--hero .search-submit {
  height: 54px;
  padding: 0 25px;
  font-size: 13px;
}

.search-form--large {
  min-height: 66px;
  padding: 6px;
}

.search-form--large .search-form-icon {
  left: 22px;
}

.search-form--large input {
  height: 54px;
  padding-left: 56px;
  font-size: 16.5px;
}

.search-form--large .search-submit {
  height: 54px;
  padding: 0 23px;
}

.form-feedback {
  display: none;
  margin-top: 12px;
  padding: 11px 14px;
  border-left: 2px solid rgba(223, 144, 121, .65);
  border-radius: 0 4px 4px 0;
  background: rgba(223, 144, 121, .06);
  color: #e6b09f;
  font-size: 12.5px;
  line-height: 1.7;
}

.form-feedback.is-visible {
  display: block;
}

.form-feedback .bad-char,
.bad-char {
  display: inline-block;
  min-width: 20px;
  margin: 0 1px;
  padding: 1px 5px;
  border: 1px solid rgba(223, 144, 121, .3);
  border-radius: 3px;
  background: rgba(223, 144, 121, .08);
  color: #f1c3b5;
  font-family: var(--mono);
  font-size: 11px;
  text-align: center;
}

.feedback-action {
  display: inline;
  margin-left: 4px;
  color: var(--gold-bright);
  font-size: 12.5px;
  text-decoration: underline;
  text-decoration-color: rgba(201, 168, 106, .4);
  text-underline-offset: 3px;
  cursor: pointer;
}

.feedback-action:hover {
  color: #fff3da;
}

/* ------------------------------------------------------------------ *
 * Hero
 * ------------------------------------------------------------------ */

.hero {
  position: relative;
  overflow: hidden;
  padding: 82px 30px 0;
}

.hero-aura {
  position: absolute;
  top: -20%;
  left: 50%;
  width: min(1000px, 90vw);
  height: 900px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 168, 106, .1), transparent 62%);
  transform: translateX(-50%);
  pointer-events: none;
}

.hero-geometry {
  position: absolute;
  top: -290px;
  left: 50%;
  width: min(1180px, 130vw);
  height: 1180px;
  transform: translateX(-50%);
  pointer-events: none;
  opacity: .42;
  -webkit-mask-image: radial-gradient(circle, #000 25%, transparent 70%);
  mask-image: radial-gradient(circle, #000 25%, transparent 70%);
}

.hero-geometry svg {
  width: 100%;
  height: 100%;
}

.geo-dashed circle {
  fill: none;
  stroke: rgba(201, 168, 106, .28);
  stroke-width: 1;
  stroke-dasharray: 2 14;
  transform-origin: 500px 500px;
  animation: slowspin 300s linear infinite;
}

.geo-hex polygon,
.geo-hex path {
  fill: none;
  stroke: rgba(201, 168, 106, .3);
  stroke-width: 1;
}

.geo-hex polygon:nth-child(2) {
  stroke: rgba(201, 168, 106, .18);
}

.geo-hex polygon:nth-child(3) {
  stroke: rgba(201, 168, 106, .4);
  stroke-dasharray: 1 8;
}

.geo-stars circle {
  fill: rgba(231, 206, 154, .6);
}

@keyframes slowspin {
  to { transform: rotate(360deg); }
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  animation: rise-in .9s var(--ease) both;
}

.hero .eyebrow {
  justify-content: center;
  margin-bottom: 28px;
}

.hero h1 {
  max-width: 900px;
  margin: 0 auto;
  font-size: clamp(47px, 7.2vw, 91px);
  font-weight: 500;
  line-height: .96;
  letter-spacing: -.02em;
}

.hero h1 em {
  display: inline-block;
  color: var(--gold-bright);
  font-weight: 400;
  text-shadow: 0 0 60px rgba(201, 168, 106, .18);
}

.hero-lede {
  max-width: 600px;
  margin: 28px auto 0;
  color: var(--muted);
  font-size: 16.5px;
  line-height: 1.75;
}

.hero-search {
  max-width: 740px;
  margin: 40px auto 0;
  text-align: left;
}

.hero-explore {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.explore-label {
  margin-right: 3px;
  color: var(--faint);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-top: 27px;
}

.hero-dot {
  color: var(--faint);
  font-size: 12px;
}

.hero-stats {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  max-width: 900px;
  margin: 74px auto 0;
  padding: 28px 0 32px;
  border-top: 1px solid var(--line);
  animation: fade-in 1.2s .25s ease both;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 0 clamp(20px, 5vw, 60px);
  text-align: center;
}

.hero-stat + .hero-stat {
  border-left: 1px solid var(--line);
}

.stat-value {
  color: var(--gold-bright);
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
}

.stat-label {
  color: var(--faint);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ------------------------------------------------------------------ *
 * Home sections
 * ------------------------------------------------------------------ */

.resume-wrap {
  max-width: 1060px;
  margin: 26px auto 0;
  padding: 0 30px;
}

.resume-strip {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(100deg, rgba(201, 168, 106, .065), rgba(255, 255, 255, .01) 65%);
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.resume-strip:hover {
  border-color: var(--line-strong);
  background: linear-gradient(100deg, rgba(201, 168, 106, .1), rgba(255, 255, 255, .015) 65%);
  transform: translateY(-1px);
}

.resume-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--gold);
}

.resume-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.resume-label {
  color: var(--gold);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.resume-title {
  overflow: hidden;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resume-sep {
  color: var(--faint);
}

.resume-page {
  margin-left: auto;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  white-space: nowrap;
}

.resume-page span {
  color: var(--faint);
}

.resume-arrow {
  color: var(--gold);
  transition: transform .2s ease;
}

.resume-strip:hover .resume-arrow {
  transform: translateX(3px);
}

.volume-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
}

.volume-card {
  display: block;
  min-width: 0;
}

.volume-cover {
  position: relative;
  display: flex;
  flex-direction: column;
  aspect-ratio: 4 / 5;
  padding: 26px 24px 22px;
  overflow: hidden;
  border: 1px solid rgba(231, 206, 154, .2);
  border-radius: 3px 8px 8px 3px;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, .07), transparent 32%),
    linear-gradient(145deg, var(--cover-a), var(--cover-b));
  box-shadow: 0 26px 50px -30px rgba(0, 0, 0, .95), 0 1px 0 rgba(255, 255, 255, .1) inset;
  color: var(--cover-foil);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .25s ease;
}

.volume-cover::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 13px;
  width: 1px;
  background: rgba(231, 206, 154, .25);
  box-shadow: 4px 0 9px rgba(0, 0, 0, .25);
}

.volume-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
  opacity: .1;
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.volume-card:hover .volume-cover {
  border-color: rgba(231, 206, 154, .4);
  box-shadow: 0 34px 70px -32px rgba(0, 0, 0, 1), 0 1px 0 rgba(255, 255, 255, .14) inset;
  transform: translateY(-7px) rotate(-.35deg);
}

.cover-frame {
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(231, 206, 154, .22);
  border-radius: 1px;
  pointer-events: none;
}

.cover-top {
  position: relative;
  z-index: 1;
  color: var(--cover-foil);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: .19em;
  opacity: .78;
  text-transform: uppercase;
}

.cover-numeral {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  color: var(--cover-foil);
  font-family: var(--serif);
  font-size: clamp(72px, 9vw, 120px);
  font-weight: 500;
  line-height: 1;
  opacity: .9;
  text-shadow: 0 2px 22px rgba(0, 0, 0, .25);
}

.cover-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  color: rgba(231, 206, 154, .18);
  transform: translate(-50%, -50%);
}

.cover-mark .icon {
  width: 190px;
  height: 190px;
  stroke-width: .5;
}

.cover-hex {
  position: relative;
  z-index: 1;
  color: var(--cover-foil);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .1em;
  opacity: .65;
  text-align: center;
}

.volume-info {
  padding: 17px 4px 0;
}

.volume-call {
  color: var(--gold);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.volume-incipit {
  display: -webkit-box;
  min-height: 3.4em;
  margin-top: 9px;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.7;
  letter-spacing: .01em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.volume-open {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 13px;
  color: var(--ink);
  font-size: 12px;
  transition: color .18s ease, gap .18s ease;
}

.volume-open .icon {
  width: 14px;
  height: 14px;
  color: var(--gold);
}

.volume-card:hover .volume-open {
  gap: 10px;
  color: var(--gold-bright);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.feature-card {
  position: relative;
  min-height: 310px;
  padding: 32px 30px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(255, 255, 255, .028), rgba(255, 255, 255, .008));
  transition: border-color .25s ease, background .25s ease, transform .25s ease;
}

.feature-card:hover {
  border-color: var(--line-strong);
  background: linear-gradient(150deg, rgba(201, 168, 106, .055), rgba(255, 255, 255, .01));
  transform: translateY(-3px);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 47px;
  height: 47px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--gold);
  background: rgba(201, 168, 106, .04);
}

.feature-icon .icon {
  width: 21px;
  height: 21px;
}

.feature-card h3 {
  margin-top: 25px;
  font-size: 27px;
}

.feature-card p {
  margin-top: 13px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.feature-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  color: var(--gold);
  font-size: 11.5px;
  transition: gap .18s ease, color .18s ease;
}

.feature-link .icon {
  width: 14px;
  height: 14px;
}

.feature-link:hover {
  gap: 11px;
  color: var(--gold-bright);
}

.quote-section {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 100px 30px 115px;
  text-align: center;
}

.quote-ornament {
  margin-bottom: 30px;
  color: var(--gold);
  font-size: 18px;
  opacity: .8;
}

.quote-section blockquote {
  margin: 0;
  color: var(--ink-bright);
  font-family: var(--serif);
  font-size: clamp(27px, 3.4vw, 42px);
  font-style: italic;
  font-weight: 400;
  line-height: 1.28;
  letter-spacing: -.005em;
}

.quote-attribution {
  margin-top: 26px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.quote-attribution span {
  margin: 0 7px;
  color: var(--faint);
}

.quote-link {
  margin-top: 26px;
}

.cta-band {
  max-width: 1220px;
  margin: 0 auto 100px;
  padding: 0 30px;
}

.cta-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  overflow: hidden;
  padding: 50px 54px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(600px 300px at 0% 0%, rgba(201, 168, 106, .1), transparent 70%),
    linear-gradient(120deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .005));
}

.cta-inner::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -110px;
  width: 380px;
  height: 380px;
  border: 1px solid var(--line);
  transform: rotate(30deg);
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  pointer-events: none;
}

.cta-inner .eyebrow {
  margin-bottom: 15px;
}

.cta-inner h2 {
  font-size: clamp(36px, 4vw, 52px);
}

.cta-inner p:not(.eyebrow) {
  margin-top: 9px;
  color: var(--muted);
  font-size: 13.5px;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
  z-index: 1;
}

/* ------------------------------------------------------------------ *
 * Search
 * ------------------------------------------------------------------ */

.page-section {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 30px;
}

.catalogue-hero {
  position: relative;
  max-width: 1060px;
  padding-top: 85px;
  padding-bottom: 30px;
  text-align: center;
}

.catalogue-aura {
  position: absolute;
  top: -100px;
  left: 50%;
  width: 780px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 168, 106, .09), transparent 65%);
  transform: translateX(-50%);
  pointer-events: none;
}

.catalogue-hero .eyebrow {
  position: relative;
  justify-content: center;
}

.catalogue-hero h1 {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  font-size: clamp(45px, 6vw, 76px);
  line-height: 1;
  letter-spacing: -.018em;
}

.catalogue-hero h1 em {
  color: var(--gold-bright);
  font-weight: 400;
}

.catalogue-lede {
  max-width: 670px;
  margin: 24px auto 0;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.8;
}

.search-panel {
  position: relative;
  max-width: 840px;
  margin: 38px auto 0;
  text-align: left;
}

.search-panel-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  margin: 14px 5px 0;
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.6;
}

.search-panel-foot strong {
  color: var(--muted);
  font-weight: 500;
}

.search-panel-foot code {
  color: var(--gold);
  font-size: 10px;
}

.suggestion-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.history-section {
  max-width: 900px;
  margin: 70px auto 0;
  padding: 28px 0 8px;
  border-top: 1px solid var(--line);
}

.section-head-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.section-head-inline h2 {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
}

.inline-actions {
  display: flex;
  gap: 16px;
}

.history-list {
  display: flex;
  flex-direction: column;
}

.history-row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 54px;
  border-top: 1px solid rgba(201, 168, 106, .08);
}

.history-row:last-child {
  border-bottom: 1px solid rgba(201, 168, 106, .08);
}

.history-query {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  padding: 12px 0;
  text-align: left;
  color: var(--ink);
  transition: color .18s ease;
}

.history-query .icon {
  width: 14px;
  height: 14px;
  color: var(--gold-deep);
  flex: 0 0 auto;
}

.history-query span {
  overflow: hidden;
  font-family: var(--mono);
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-query:hover {
  color: var(--gold-bright);
}

.history-time {
  flex: 0 0 auto;
  color: var(--faint);
  font-size: 10.5px;
  white-space: nowrap;
}

.search-how {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  max-width: 1060px;
  margin: 75px auto 0;
  padding: 0 30px;
}

.how-card {
  padding: 4px 0 0;
  border-top: 1px solid var(--line);
}

.how-num {
  display: block;
  margin-top: 17px;
  color: var(--gold-deep);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
}

.how-card h3 {
  margin-top: 9px;
  font-size: 28px;
}

.how-card p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.75;
}

.search-landing-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1060px;
  margin: 70px auto 0;
  padding: 24px 30px 70px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 11.5px;
  line-height: 1.7;
}

/* Results */

.search-result-view {
  padding-bottom: 50px;
}

.result-head {
  max-width: 1280px;
  margin: 0 auto;
  padding: 70px 30px 30px;
}

.result-head-main {
  max-width: 1050px;
}

.result-head h1 {
  font-size: clamp(42px, 5.4vw, 68px);
  line-height: 1;
}

.found-query {
  max-height: 9.4rem;
  margin: 23px 0 0;
  padding-left: 21px;
  overflow-y: auto;
  border-left: 1px solid var(--line-strong);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(22px, 2.6vw, 32px);
  font-style: italic;
  font-weight: 400;
  line-height: 1.38;
  overflow-wrap: anywhere;
}

.query-meta {
  margin-top: 16px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .03em;
}

.location-ribbon {
  display: grid;
  grid-template-columns: minmax(0, 2.6fr) repeat(4, minmax(0, 1fr));
  max-width: 1050px;
  margin-top: 33px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.loc-cell {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  padding: 14px 18px;
}

.loc-cell + .loc-cell {
  border-left: 1px solid var(--line);
}

.loc-label {
  color: var(--faint);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.loc-value {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .02em;
}

.loc-cell--hex {
  position: relative;
  padding-right: 44px;
}

.loc-cell--hex .loc-value {
  overflow: hidden;
  color: var(--gold-bright);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.loc-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 27px;
  height: 27px;
  border: 1px solid transparent;
  border-radius: 3px;
  color: var(--faint);
  transition: color .18s ease, border-color .18s ease;
}

.loc-cell--hex .loc-copy {
  position: absolute;
  right: 12px;
  bottom: 9px;
}

.loc-copy .icon {
  width: 13px;
  height: 13px;
}

.loc-copy:hover {
  border-color: var(--line);
  color: var(--gold-bright);
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
  gap: 38px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 30px 20px;
}

.result-main {
  min-width: 0;
}

.found-sheet-wrap {
  position: relative;
}

.found-seal {
  position: absolute;
  top: -30px;
  right: 26px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 82px;
  height: 82px;
  border: 1px solid rgba(255, 235, 200, .22);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, #b76546, #8a402d 65%, #6e2f21);
  box-shadow: 0 14px 30px -14px rgba(80, 26, 12, .8), 0 0 0 4px rgba(138, 64, 45, .12);
  color: #f0d8b4;
  transform: rotate(-8deg);
}

.found-seal::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(255, 235, 200, .2);
  border-radius: 50%;
}

.found-seal .seal-star {
  font-size: 10px;
  line-height: 1;
}

.found-seal span:last-child {
  font-family: var(--serif);
  font-size: 16px;
  font-style: italic;
  letter-spacing: .04em;
}

.result-caption {
  margin: 18px 6px 0;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.7;
}

.result-search-again {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin-top: 22px;
}

.result-rail {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  position: sticky;
  top: 98px;
}

.rail-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(255, 255, 255, .025), rgba(255, 255, 255, .005));
}

.rail-card--quiet {
  background: rgba(255, 255, 255, .012);
}

.rail-label {
  margin: 0 0 14px;
  color: var(--gold);
  font-family: var(--sans);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.rail-text {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.rail-text--small {
  font-size: 11.5px;
  line-height: 1.7;
}

.rail-note {
  margin-top: 16px;
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.65;
}

.occurrence-number {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}

.occ-value {
  color: var(--ink-bright);
  font-family: var(--serif);
  font-size: 40px;
  line-height: 1;
}

.occ-of {
  color: var(--faint);
  font-family: var(--serif);
  font-size: 18px;
  font-style: italic;
}

.rail-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 16px;
}

.rail-button-row {
  display: flex;
  gap: 8px;
}

.rail-button-row .btn {
  flex: 1;
  padding-left: 10px;
  padding-right: 10px;
}

.alt-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.alt-occurrence {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 0;
  border-top: 1px solid rgba(201, 168, 106, .08);
  color: var(--ink);
  text-align: left;
  transition: color .18s ease;
}

.alt-occurrence:last-child {
  border-bottom: 1px solid rgba(201, 168, 106, .08);
}

.alt-index {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .03em;
}

.alt-place {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  color: var(--faint);
  font-size: 9.5px;
}

.alt-place code {
  color: var(--gold-deep);
  font-size: 9.5px;
}

.alt-occurrence > .icon {
  width: 13px;
  height: 13px;
  color: var(--gold-deep);
  transition: transform .18s ease, color .18s ease;
}

.alt-occurrence:hover {
  color: var(--gold-bright);
}

.alt-occurrence:hover > .icon {
  color: var(--gold);
  transform: translateX(2px);
}

/* Invalid search */

.search-invalid .invalid-head {
  max-width: 930px;
  padding-top: 85px;
  padding-bottom: 100px;
}

.invalid-head h1 {
  max-width: 820px;
  font-size: clamp(40px, 5vw, 65px);
  line-height: 1.02;
}

.alphabet-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  margin-top: 36px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, .015);
}

.alphabet-label {
  color: var(--gold);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: .19em;
  text-transform: uppercase;
}

.alphabet-string {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .05em;
}

.alphabet-gap {
  opacity: .18;
}

.alphabet-note {
  color: var(--faint);
  font-size: 10px;
  letter-spacing: .03em;
}

.invalid-block {
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.invalid-chars {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.invalid-token {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 35px;
  min-height: 35px;
  padding: 4px 9px;
  border: 1px solid rgba(223, 144, 121, .26);
  border-radius: 4px;
  background: rgba(223, 144, 121, .055);
  color: #e8b2a0;
  font-family: var(--mono);
  font-size: 13px;
}

.invalid-extra {
  color: var(--faint);
  font-size: 11px;
}

.suggestion-box {
  max-width: 760px;
  margin-top: 36px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(400px 200px at 0 0, rgba(201, 168, 106, .07), transparent 70%),
    rgba(255, 255, 255, .012);
}

.suggestion-value {
  margin-bottom: 20px;
  color: var(--ink-bright);
  font-family: var(--serif);
  font-size: 25px;
  font-style: italic;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.invalid-form {
  max-width: 760px;
  margin-top: 42px;
}

.invalid-form .rail-label {
  margin-bottom: 12px;
}

.invalid-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 30px;
}

/* ------------------------------------------------------------------ *
 * The page itself
 * ------------------------------------------------------------------ */

.book-page {
  position: relative;
  padding: clamp(16px, 3.2vw, 44px) clamp(12px, 3.4vw, 48px) clamp(13px, 2.2vw, 26px);
  overflow: hidden;
  border: 1px solid rgba(97, 77, 44, .28);
  border-radius: 2px;
  background:
    radial-gradient(1100px 380px at 18% -12%, rgba(255, 251, 240, .9), transparent 55%),
    linear-gradient(112deg, #f4ebd8 0%, #efe4cd 55%, #e7dac0 100%);
  box-shadow: var(--shadow-page);
  color: var(--paper-ink);
}

.book-page::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.24'/%3E%3C/svg%3E");
  opacity: .14;
  mix-blend-mode: multiply;
}

.book-page::after {
  content: "";
  position: absolute;
  inset: 14px;
  z-index: 0;
  border: 1px solid rgba(95, 75, 42, .1);
  pointer-events: none;
}

.page-inner {
  position: relative;
  z-index: 1;
  overflow-x: auto;
  scrollbar-width: none;
}

.page-inner::-webkit-scrollbar {
  display: none;
}

.book-page--tagged .page-inner {
  padding-top: 16px;
}

.found-sheet .page-inner {
  padding-top: 26px;
}

.page-text {
  color: #2e2a20;
  font-family: var(--mono);
  font-size: clamp(6.4px, 1.28vw, 13.4px);
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: .005em;
  white-space: pre;
  font-variant-ligatures: none;
}

.page-line {
  min-height: 1.7em;
  white-space: pre;
}

.book-page .hl {
  border-radius: 2px;
  background: rgba(198, 130, 47, .3);
  box-shadow: inset 0 -1px 0 rgba(125, 76, 17, .3);
  color: #211b10;
  animation: mark-breathe 1.3s ease both;
}

@keyframes mark-breathe {
  0% { background: rgba(198, 130, 47, .52); }
  100% { background: rgba(198, 130, 47, .3); }
}

.page-folio {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: clamp(18px, 3vw, 32px);
  color: var(--paper-faint);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .16em;
}

.folio-orn {
  color: rgba(125, 100, 55, .5);
  font-size: 7px;
}

.contains-tag {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid rgba(137, 91, 30, .26);
  border-radius: 2px;
  background: rgba(238, 220, 185, .85);
  color: #7b4f1d;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.contains-tag .icon {
  width: 11px;
  height: 11px;
}

.reader-sheet {
  scroll-margin-top: 100px;
}

/* ------------------------------------------------------------------ *
 * Hexagon browser
 * ------------------------------------------------------------------ */

.browse-page {
  padding-top: 62px;
  padding-bottom: 100px;
}

.browse-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
  margin-bottom: 36px;
}

.browse-head-copy {
  min-width: 0;
}

.browse-head h1 {
  font-size: clamp(40px, 5.2vw, 68px);
  line-height: 1;
  overflow-wrap: anywhere;
}

.hex-id {
  display: inline-block;
  max-width: 100%;
  color: var(--gold);
  font-family: var(--mono);
  font-size: .42em;
  font-weight: 400;
  letter-spacing: .01em;
  vertical-align: .3em;
  white-space: nowrap;
}

.browse-lede {
  max-width: 680px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.browse-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 25px;
}

.hex-seal {
  position: relative;
  flex: 0 0 auto;
  width: 226px;
  height: 226px;
}

.hex-seal svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.seal-outer {
  fill: none;
  stroke: rgba(201, 168, 106, .4);
  stroke-width: 1;
}

.seal-mid {
  fill: none;
  stroke: rgba(201, 168, 106, .17);
  stroke-width: 1;
  stroke-dasharray: 1 6;
}

.seal-inner {
  fill: rgba(201, 168, 106, .035);
  stroke: rgba(201, 168, 106, .33);
  stroke-width: 1;
}

.seal-spokes {
  fill: none;
  stroke: rgba(201, 168, 106, .18);
  stroke-width: .7;
}

.seal-dot {
  fill: var(--gold);
}

.seal-center {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transform: translate(-50%, -50%);
  text-align: center;
}

.seal-kicker {
  color: var(--faint);
  font-size: 7px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.seal-center strong {
  color: var(--gold-bright);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .03em;
}

.seal-caption {
  color: var(--faint);
  font-family: var(--serif);
  font-size: 13px;
  font-style: italic;
}

.browse-utility {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hex-coordinate {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.hex-coordinate .loc-label {
  flex: 0 0 auto;
}

.hex-coordinate code {
  overflow: hidden;
  color: var(--gold-bright);
  font-family: var(--mono);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hex-coordinate .loc-copy {
  flex: 0 0 auto;
}

.hex-jump {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 1 360px;
}

.hex-jump input {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  outline: none;
  background: rgba(255, 255, 255, .02);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  transition: border-color .18s ease;
}

.hex-jump input:focus {
  border-color: var(--gold);
}

.hex-jump input::placeholder {
  color: var(--faint);
}

.wall-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .011);
}

.wall-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 16px 20px 15px;
  min-width: 0;
  color: var(--muted);
  transition: background .18s ease, color .18s ease;
}

.wall-tab + .wall-tab {
  border-left: 1px solid var(--line);
}

.wall-tab::after {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: -1px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform .22s ease;
}

.wall-tab:hover {
  background: rgba(201, 168, 106, .035);
  color: var(--ink);
}

.wall-tab.is-active {
  background: rgba(201, 168, 106, .06);
  color: var(--gold-bright);
}

.wall-tab.is-active::after {
  transform: scaleX(1);
}

.wall-tab-label {
  color: var(--faint);
  font-size: 7.5px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.wall-tab strong {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.2;
}

.wall-tab-count {
  color: var(--faint);
  font-size: 9px;
}

.bookcase {
  margin-top: 26px;
  padding: 26px 28px 22px;
  border: 1px solid rgba(201, 168, 106, .22);
  border-radius: var(--radius);
  background:
    radial-gradient(700px 240px at 20% 0, rgba(201, 168, 106, .045), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, .02), rgba(0, 0, 0, .1));
  box-shadow: 0 32px 80px -50px rgba(0, 0, 0, .9);
}

.bookcase-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 22px;
}

.bookcase-head .eyebrow {
  margin-bottom: 8px;
}

.bookcase-head h2 {
  font-size: clamp(28px, 3vw, 38px);
  font-style: italic;
  color: var(--gold-bright);
}

.bookcase-aside {
  color: var(--faint);
  font-size: 9.5px;
  letter-spacing: .04em;
  line-height: 1.8;
  text-align: right;
}

.bookcase-aside .text-link {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.bookcase-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.shelf-unit {
  position: relative;
}

.shelf-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 7px;
}

.shelf-name {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  color: var(--muted);
  transition: color .18s ease;
}

.shelf-name:hover {
  color: var(--gold-bright);
}

.shelf-roman {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: .02em;
}

.shelf-count {
  color: var(--faint);
  font-size: 7.5px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.shelf-icon {
  width: 13px;
  height: 13px;
  color: var(--gold-deep);
  opacity: .7;
}

.shelf-rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--line), transparent);
}

.shelf-row {
  position: relative;
}

/* "Swipe ›" affordance, only where shelf rows actually scroll. */
.shelf-scroll-hint {
  display: none;
}

.shelf-books {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 96px;
  padding: 10px 9px 0;
  overflow: visible;
  border: 1px solid rgba(0, 0, 0, .45);
  border-bottom: 0;
  border-radius: 2px 2px 0 0;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, .55), rgba(15, 13, 9, .2) 65%, rgba(0, 0, 0, .1)),
    repeating-linear-gradient(to right, rgba(255, 255, 255, .015) 0 1px, transparent 1px 28px);
  box-shadow: inset 0 12px 24px -18px rgba(0, 0, 0, .9);
}

.spine {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  height: 84px;
  padding-bottom: 5px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, .4);
  border-bottom: 0;
  border-radius: 2px 2px 0 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .32), transparent 20%, rgba(255, 255, 255, .07) 52%, transparent 76%, rgba(0, 0, 0, .36)),
    linear-gradient(180deg, var(--spine-a), var(--spine-b));
  color: var(--spine-c);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .13);
  transition: transform .18s var(--ease), box-shadow .18s ease, filter .18s ease;
}

.spine:hover,
.spine:focus-visible {
  z-index: 4;
  filter: brightness(1.18);
  outline: none;
  box-shadow: 0 10px 20px -8px rgba(0, 0, 0, .75), inset 0 1px 0 rgba(255, 255, 255, .2);
  transform: translateY(-7px);
}

.spine-band {
  position: absolute;
  top: 10px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--spine-c), transparent);
  opacity: .5;
}

.spine-band::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--spine-c);
  opacity: .35;
}

.spine-num {
  color: var(--spine-c);
  font-family: var(--mono);
  font-size: 6.5px;
  letter-spacing: .06em;
  opacity: .72;
  transform: rotate(180deg);
  writing-mode: vertical-rl;
}

.shelf-plank {
  height: 9px;
  border-top: 1px solid rgba(231, 206, 154, .22);
  border-radius: 0 0 2px 2px;
  background:
    linear-gradient(180deg, #5b4930, #352a1b 55%, #1e1810);
  box-shadow: 0 8px 15px -5px rgba(0, 0, 0, .65), inset 0 1px 0 rgba(255, 255, 255, .12);
}

.shelf-readout {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 20px;
  margin: 16px 3px 34px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .03em;
}

.shelf-readout .icon {
  width: 11px;
  height: 11px;
  color: var(--gold-deep);
}

.room-info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.info-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 24px;
}

.info-card + .info-card {
  border-left: 1px solid var(--line);
}

.info-value {
  color: var(--gold-bright);
  font-family: var(--serif);
  font-size: clamp(24px, 2.8vw, 35px);
  line-height: 1;
}

.info-label {
  color: var(--faint);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.browse-footnote {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 30px;
}

.browse-footnote p {
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.7;
}

.footnote-num {
  margin-right: 5px;
  color: var(--gold-deep);
  font-family: var(--mono);
  font-size: 9px;
}

/* ------------------------------------------------------------------ *
 * Reader
 * ------------------------------------------------------------------ */

.reader-page {
  max-width: 1380px;
  padding-top: 32px;
  padding-bottom: 90px;
}

.reader-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--faint);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.breadcrumbs a {
  color: var(--muted);
  transition: color .18s ease;
}

.breadcrumbs a:hover {
  color: var(--gold-bright);
}

.crumb-sep {
  color: rgba(201, 168, 106, .3);
}

.context-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--gold);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.chip-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(201, 168, 106, .7);
}

.reader-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-top: 32px;
  margin-bottom: 24px;
}

.reader-head .eyebrow {
  margin-bottom: 12px;
}

.reader-title {
  font-size: clamp(42px, 5vw, 62px);
  line-height: 1;
}

.reader-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .03em;
}

.reader-sub code {
  color: var(--gold);
  font-size: 10px;
}

.reader-sub > span:nth-child(even) {
  color: var(--faint);
}

.reader-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 4px;
}

.reader-warning {
  margin: 0 0 20px;
  padding: 12px 16px;
  border-left: 2px solid rgba(223, 144, 121, .5);
  background: rgba(223, 144, 121, .05);
  color: #dda38f;
  font-size: 11.5px;
  line-height: 1.6;
}

.reader-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 326px;
  align-items: start;
  gap: 34px;
  margin-top: 26px;
}

.reader-main {
  min-width: 0;
}

.reader-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.page-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 37px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .02em;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}

.page-nav-btn .icon {
  width: 14px;
  height: 14px;
}

.page-nav-btn:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, .02);
  color: var(--gold-bright);
}

.page-nav-btn:disabled {
  cursor: default;
  opacity: .28;
}

.page-jump {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 37px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, .015);
}

.page-jump label,
.page-total {
  color: var(--faint);
  font-size: 9px;
  letter-spacing: .05em;
}

.page-jump input {
  width: 48px;
  height: 27px;
  padding: 0 3px;
  border: 0;
  border-bottom: 1px solid rgba(201, 168, 106, .2);
  outline: none;
  background: transparent;
  color: var(--gold-bright);
  font-family: var(--mono);
  font-size: 11px;
  text-align: center;
  -moz-appearance: textfield;
}

.page-jump input::-webkit-inner-spin-button,
.page-jump input::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.reader-toolbar-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.page-percent {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .04em;
}

.progress-track {
  height: 2px;
  margin-top: 11px;
  overflow: hidden;
  background: rgba(201, 168, 106, .09);
}

.progress-fill {
  display: block;
  height: 100%;
  background: linear-gradient(to right, var(--gold-deep), var(--gold));
  transition: width .25s ease;
}

.page-stage {
  margin-top: 20px;
}

.reader-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  color: var(--faint);
  font-size: 9.5px;
  line-height: 1.7;
}

.reader-foot kbd {
  height: 18px;
  min-width: 18px;
  padding: 0 4px;
  font-size: 8px;
}

.reader-rail {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  min-width: 0;
}

.reader-rail .rail-card {
  padding: 21px;
}

.reader-rail .rail-actions {
  margin-top: 0;
}

.location-list {
  margin-top: 18px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.location-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(201, 168, 106, .08);
  font-size: 10px;
}

.location-row span {
  color: var(--faint);
  letter-spacing: .03em;
}

.location-row code {
  overflow: hidden;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.location-row strong {
  color: var(--ink);
  font-weight: 500;
}

.rail-copy-link {
  margin-top: 13px;
}

.find-form {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 3px 3px 3px 11px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, .018);
  transition: border-color .18s ease;
}

.find-form:focus-within {
  border-color: rgba(201, 168, 106, .5);
}

.find-form input {
  flex: 1;
  min-width: 0;
  height: 33px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
}

.find-form input::placeholder {
  color: var(--faint);
}

.find-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 3px;
  color: var(--gold);
  transition: background .18s ease, color .18s ease;
}

.find-submit:hover {
  background: rgba(201, 168, 106, .1);
  color: var(--gold-bright);
}

.find-submit .icon {
  width: 15px;
  height: 15px;
}

.find-feedback {
  display: none;
  margin-top: 10px;
  padding: 9px 10px;
  border-left: 2px solid rgba(223, 144, 121, .5);
  background: rgba(223, 144, 121, .05);
  color: #dda38f;
  font-size: 10px;
  line-height: 1.6;
}

.find-feedback.is-visible {
  display: block;
}

.highlight-status {
  margin-top: 12px;
  padding: 9px 11px;
  border-left: 2px solid rgba(201, 168, 106, .4);
  background: rgba(201, 168, 106, .05);
}

.highlight-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.6;
}

.highlight-line code {
  color: var(--gold-bright);
  font-size: 9.5px;
}

.highlight-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
}

.highlight-line--sub {
  justify-content: space-between;
  margin-top: 3px;
  color: var(--faint);
  font-size: 9px;
}

.find-results {
  margin-top: 13px;
}

.find-summary {
  margin-bottom: 7px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.find-list {
  max-height: 250px;
  overflow-y: auto;
  padding-right: 3px;
}

.find-hit {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  padding: 9px 0;
  border-top: 1px solid rgba(201, 168, 106, .08);
  text-align: left;
  transition: background .18s ease;
}

.find-hit:last-child {
  border-bottom: 1px solid rgba(201, 168, 106, .08);
}

.find-hit.is-active {
  background: rgba(201, 168, 106, .045);
  box-shadow: -8px 0 0 rgba(201, 168, 106, .045), 8px 0 0 rgba(201, 168, 106, .045);
}

.find-page {
  color: var(--gold-deep);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .05em;
}

.find-context {
  overflow: hidden;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8.5px;
  line-height: 1.6;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.find-context mark {
  background: rgba(201, 168, 106, .24);
  color: var(--gold-bright);
}

.find-hit:hover .find-context {
  color: var(--muted);
}

.find-empty {
  padding: 12px 0 3px;
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.7;
}

.find-empty p {
  margin-bottom: 8px;
}

.find-empty .text-link {
  font-size: 10px;
}

.find-loading {
  display: flex;
  align-items: center;
  gap: 9px;
}

.spinner {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border: 1px solid rgba(201, 168, 106, .2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.find-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 11px;
}

.find-foot .text-link {
  font-size: 9.5px;
}

.context-card {
  border-left: 2px solid rgba(201, 168, 106, .4);
}

.context-query {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 21px;
  font-style: italic;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.context-card .rail-text {
  margin-top: 10px;
}

.context-card .rail-button-row {
  margin-top: 15px;
}

.facts-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
}

.facts-list > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(201, 168, 106, .07);
}

.facts-list dt {
  color: var(--faint);
  font-size: 9.5px;
}

.facts-list dd {
  margin: 0;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 9.5px;
}

/* ------------------------------------------------------------------ *
 * Shelf
 * ------------------------------------------------------------------ */

.shelf-page {
  padding-top: 68px;
  padding-bottom: 100px;
}

.shelf-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 38px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.shelf-head h1 {
  font-size: clamp(46px, 6vw, 76px);
  line-height: .96;
}

.shelf-head .catalogue-lede {
  margin-left: 0;
  margin-right: 0;
  max-width: 540px;
}

.shelf-head-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 9px;
  flex: 0 0 auto;
}

.shelf-stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.shelf-stat-value {
  color: var(--gold-bright);
  font-family: var(--serif);
  font-size: 38px;
  line-height: 1;
}

.shelf-stat-label {
  color: var(--faint);
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.shelf-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.shelf-item {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(255, 255, 255, .025), rgba(255, 255, 255, .006));
  transition: border-color .2s ease, transform .2s ease;
}

.shelf-item:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.shelf-cover {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: 220px;
  padding: 14px 10px;
  overflow: hidden;
  border-right: 1px solid rgba(0, 0, 0, .35);
  background:
    linear-gradient(110deg, rgba(255, 255, 255, .08), transparent 38%),
    linear-gradient(160deg, var(--cover-a), var(--cover-b));
  color: var(--cover-foil);
}

.shelf-cover::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 9px;
  width: 1px;
  background: rgba(255, 235, 200, .22);
}

.shelf-cover-top {
  align-self: flex-start;
  font-size: 7px;
  font-weight: 500;
  letter-spacing: .18em;
  opacity: .7;
  text-transform: uppercase;
}

.shelf-cover-num {
  font-family: var(--serif);
  font-size: 55px;
  line-height: 1;
  opacity: .9;
}

.shelf-cover-hex {
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: .06em;
  opacity: .65;
}

.shelf-item-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 19px 20px 17px;
}

.shelf-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.shelf-item-kicker {
  color: var(--gold-deep);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.shelf-item-head h3 {
  margin-top: 3px;
  font-size: 23px;
  line-height: 1.15;
}

.shelf-remove {
  flex: 0 0 auto;
  margin: -4px -6px 0 0;
}

.shelf-meta {
  margin-top: 9px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .02em;
}

.shelf-meta span {
  margin: 0 4px;
  color: rgba(201, 168, 106, .3);
}

.context-badge {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 12px;
  padding: 7px 9px;
  border-left: 1px solid rgba(201, 168, 106, .35);
  background: rgba(201, 168, 106, .045);
  color: var(--gold);
  font-family: var(--serif);
  font-size: 13px;
  font-style: italic;
  line-height: 1.4;
}

.context-badge .icon {
  width: 12px;
  height: 12px;
  margin-top: 3px;
  flex: 0 0 auto;
}

.shelf-snippet {
  display: -webkit-box;
  margin-top: 12px;
  overflow: hidden;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.shelf-item-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
}

.shelf-item-foot .text-link {
  color: var(--ink);
}

.shelf-item-foot .link-button .icon {
  width: 12px;
  height: 12px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 720px;
  margin: 10px auto 20px;
  padding: 52px 30px;
  border: 1px dashed rgba(201, 168, 106, .22);
  border-radius: var(--radius);
  text-align: center;
}

.empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--gold);
}

.empty-icon .icon {
  width: 22px;
  height: 22px;
}

.empty-state h3 {
  margin-top: 18px;
  font-size: 32px;
}

.empty-state p {
  max-width: 440px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.8;
}

.empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-top: 22px;
}

.shelf-view .history-section {
  max-width: none;
  margin-top: 48px;
}

.shelf-about {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 50px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.7;
}

/* ------------------------------------------------------------------ *
 * About
 * ------------------------------------------------------------------ */

.about-page {
  max-width: 1180px;
  padding-top: 72px;
  padding-bottom: 100px;
}

.about-hero {
  position: relative;
  max-width: 880px;
  padding-bottom: 68px;
}

.about-hero h1 {
  font-size: clamp(48px, 6.7vw, 88px);
  line-height: .95;
  letter-spacing: -.018em;
}

.about-hero h1 em {
  color: var(--gold-bright);
  font-weight: 400;
}

.about-hero .catalogue-lede {
  margin-left: 0;
  max-width: 640px;
}

.about-orb {
  position: absolute;
  top: -20px;
  right: -290px;
  color: rgba(201, 168, 106, .07);
  transform: rotate(12deg);
}

.about-orb .icon {
  width: 360px;
  height: 360px;
  stroke-width: .45;
}

.prose--wide {
  max-width: 100%;
}

.about-section {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 48px;
  padding: 45px 0;
  border-top: 1px solid var(--line);
}

.about-section-label {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.about-section-label > span {
  margin-top: 6px;
  color: var(--gold-deep);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .08em;
}

.about-section-label h2 {
  font-size: 31px;
  line-height: 1.1;
}

.about-section-body {
  max-width: 740px;
}

.about-section-body > p {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.85;
}

.about-section-body p:last-child {
  margin-bottom: 0;
}

.about-section-body code {
  color: var(--gold);
  font-size: 12px;
}

.about-quote {
  margin: 27px 0;
  padding: 3px 0 3px 22px;
  border-left: 1px solid var(--line-strong);
  color: var(--ink-bright);
  font-family: var(--serif);
  font-size: 25px;
  font-style: italic;
  line-height: 1.4;
}

.about-quote span {
  display: block;
  margin-top: 10px;
  color: var(--faint);
  font-family: var(--sans);
  font-size: 9px;
  font-style: normal;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.math-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 8px 0 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.math-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 19px 16px;
}

.math-card + .math-card {
  border-left: 1px solid var(--line);
}

.math-value {
  color: var(--gold-bright);
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1;
}

.math-label {
  color: var(--faint);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: .12em;
  line-height: 1.5;
  text-transform: uppercase;
}

.about-note {
  color: var(--faint) !important;
  font-size: 11px !important;
  font-style: italic;
}

.about-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 26px;
  margin: 24px 0 0;
}

.about-facts > div {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.about-facts dt {
  color: var(--gold);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.about-facts dd {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 32px;
}

.shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(201, 168, 106, .1);
  color: var(--muted);
  font-size: 11.5px;
}

.shortcut-keys {
  display: flex;
  gap: 5px;
  flex: 0 0 auto;
}

.about-links {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 22px 0;
  border-top: 1px solid var(--line);
}

.external-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  transition: color .18s ease, padding .18s ease;
}

.external-link .icon {
  width: 14px;
  height: 14px;
  color: var(--gold);
}

.external-link:hover {
  padding-left: 5px;
  color: var(--gold-bright);
}

.about-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-top: 55px;
  padding: 38px 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(500px 260px at 0 0, rgba(201, 168, 106, .08), transparent 70%),
    rgba(255, 255, 255, .012);
}

.about-cta h2 {
  font-size: clamp(34px, 3.5vw, 46px);
}

.about-cta .eyebrow {
  margin-bottom: 10px;
}

/* ------------------------------------------------------------------ *
 * Not found
 * ------------------------------------------------------------------ */

.not-found-view .not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 760px;
  padding-top: 110px;
  padding-bottom: 140px;
  text-align: center;
}

.not-found .eyebrow {
  justify-content: center;
}

.not-found-sigil {
  margin-bottom: 26px;
  color: var(--gold-deep);
  opacity: .7;
}

.not-found-sigil .icon {
  width: 54px;
  height: 54px;
  stroke-width: 1;
}

.not-found h1 {
  font-size: clamp(48px, 7vw, 80px);
  line-height: .97;
}

.not-found h1 em {
  color: var(--gold-bright);
  font-weight: 400;
}

.not-found-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}

/* ------------------------------------------------------------------ *
 * Modal
 * ------------------------------------------------------------------ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  overflow-y: auto;
  background: rgba(5, 6, 4, .76);
  opacity: 0;
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
  transition: opacity .18s ease;
}

.modal-backdrop.is-open {
  opacity: 1;
}

.modal {
  display: flex;
  flex-direction: column;
  width: min(720px, 100%);
  max-height: min(880px, calc(100vh - 60px));
  overflow: hidden;
  border: 1px solid rgba(201, 168, 106, .26);
  border-radius: 10px;
  background:
    radial-gradient(700px 300px at 10% 0, rgba(201, 168, 106, .06), transparent 65%),
    #12140e;
  box-shadow: 0 50px 120px -30px rgba(0, 0, 0, 1);
  transform: translateY(16px) scale(.986);
  transition: transform .22s var(--ease);
}

.modal-backdrop.is-open .modal {
  transform: translateY(0) scale(1);
}

.modal--wide {
  width: min(1120px, 100%);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex: 0 0 auto;
  padding: 24px 27px 19px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  font-size: 33px;
  line-height: 1.1;
}

.modal-kicker {
  margin-bottom: 7px;
}

.modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}

.modal-close:hover {
  border-color: var(--line-strong);
  background: rgba(201, 168, 106, .06);
  color: var(--gold-bright);
}

.modal-close .icon {
  width: 17px;
  height: 17px;
}

.modal-body {
  padding: 24px 27px 30px;
  overflow-y: auto;
}

.modal-copy {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 26px;
}

.modal-note {
  margin-top: 16px;
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.7;
}

.modal-shelf-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.modal-shelf-head .rail-text {
  max-width: 540px;
}

.modal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.modal-book {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 255, 255, .012);
  transition: border-color .18s ease, transform .18s ease;
}

.modal-book:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.modal-cover {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: 118px;
  padding: 10px;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, .08), transparent 40%),
    linear-gradient(160deg, var(--cover-a), var(--cover-b));
  color: var(--cover-foil);
}

.modal-cover-num {
  margin-top: 20px;
  font-family: var(--serif);
  font-size: 44px;
  line-height: 1;
  opacity: .9;
}

.modal-cover-hex {
  font-family: var(--mono);
  font-size: 7px;
  opacity: .65;
}

.modal-book-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
}

.modal-book-call {
  color: var(--gold);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.modal-book-incipit {
  overflow: hidden;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ------------------------------------------------------------------ *
 * Toast
 * ------------------------------------------------------------------ */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 130;
  max-width: calc(100vw - 40px);
  padding: 11px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: rgba(20, 22, 15, .97);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .9);
  color: var(--ink);
  font-size: 11.5px;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px);
  transition: opacity .22s ease, transform .22s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast--error {
  border-color: rgba(223, 144, 121, .4);
  color: #e8b2a0;
}

/* ------------------------------------------------------------------ *
 * Footer
 * ------------------------------------------------------------------ */

.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  background: rgba(8, 9, 6, .5);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.15fr 1.35fr auto;
  align-items: start;
  gap: 50px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 30px 35px;
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.footer-mark {
  width: 27px;
  height: 30px;
  flex: 0 0 auto;
  color: var(--gold-deep);
}

.footer-word {
  color: var(--ink-bright);
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1;
}

.footer-tag {
  margin-top: 6px;
  color: var(--faint);
  font-size: 9.5px;
  letter-spacing: .03em;
}

.footer-note {
  max-width: 460px;
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.8;
}

.footer-note a {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: rgba(201, 168, 106, .3);
  text-underline-offset: 2px;
}

.footer-note a:hover {
  color: var(--gold-bright);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 22px;
  max-width: 260px;
}

.footer-links a {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: color .18s ease;
}

.footer-links a:hover {
  color: var(--gold-bright);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 30px 24px;
  border-top: 1px solid rgba(201, 168, 106, .08);
  color: var(--faint);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.footer-kbd kbd {
  height: 18px;
  min-width: 18px;
  padding: 0 4px;
  font-size: 8px;
}

/* ------------------------------------------------------------------ *
 * Responsive
 * ------------------------------------------------------------------ */

@media (max-width: 1180px) {
  .result-layout,
  .reader-layout {
    grid-template-columns: minmax(0, 1fr) 304px;
    gap: 28px;
  }

  .hex-seal {
    width: 190px;
    height: 190px;
  }

  .about-orb {
    right: -190px;
  }

  .about-orb .icon {
    width: 300px;
    height: 300px;
  }
}

@media (max-width: 980px) {
  .header-inner {
    gap: 24px;
    padding: 0 22px;
  }

  .site-nav {
    gap: 22px;
  }

  .result-layout,
  .reader-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .result-rail,
  .reader-rail {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .result-rail .rail-card:last-child:nth-child(odd),
  .reader-rail .rail-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .reader-rail {
    gap: 14px;
  }

  .reader-head {
    align-items: flex-start;
  }

  .about-section {
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 32px;
  }

  .about-orb {
    display: none;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .footer-links {
    grid-column: 1 / -1;
    max-width: none;
  }
}

@media (max-width: 860px) {
  .header-random {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    min-height: 38px;
    padding: 0;
    border: 1px solid var(--line);
  }

  .header-random span {
    display: none;
  }

  .header-random .icon {
    width: 17px;
    height: 17px;
  }

  .menu-btn {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 5px 22px 15px;
    border-bottom: 1px solid var(--line);
    background: rgba(10, 11, 8, .98);
    box-shadow: 0 30px 50px -30px rgba(0, 0, 0, .9);
  }

  .site-header.is-menu-open .site-nav {
    display: flex;
  }

  .site-nav a {
    padding: 15px 2px;
    border-bottom: 1px solid rgba(201, 168, 106, .08);
    font-size: 12px;
  }

  .site-nav a::after {
    display: none;
  }

  .volume-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .volume-card:last-child {
    grid-column: 1 / -1;
    max-width: calc(50% - 15px);
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature-card {
    min-height: 0;
  }

  .browse-head {
    gap: 24px;
  }

  .hex-seal {
    width: 150px;
    height: 150px;
  }

  .seal-center strong {
    font-size: 9px;
  }

  .bookcase {
    padding: 22px 18px 18px;
  }

  .shelf-books {
    height: 86px;
  }

  .spine {
    height: 74px;
  }

  .shelf-list {
    grid-template-columns: 1fr;
  }

  .modal-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .search-how {
    grid-template-columns: 1fr;
    gap: 18px;
    max-width: 620px;
  }

  .how-card {
    padding-top: 18px;
  }

  .how-num {
    margin-top: 0;
  }

  .search-landing-foot {
    align-items: flex-start;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 15px;
  }

  .header-inner {
    height: 68px;
    padding: 0 18px;
  }

  .brand-word {
    font-size: 24px;
  }

  .brand-sub {
    font-size: 7px;
  }

  .section {
    padding: 72px 20px;
  }

  .page-section {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero {
    padding: 60px 18px 0;
  }

  .hero h1 {
    font-size: clamp(42px, 12vw, 68px);
  }

  .hero-lede {
    margin-top: 22px;
    font-size: 14.5px;
  }

  .hero-search {
    margin-top: 30px;
  }

  .hero-stats {
    margin-top: 52px;
    padding: 22px 0 26px;
  }

  .hero-stat {
    padding: 0 14px;
  }

  .stat-value {
    font-size: 22px;
  }

  .stat-label {
    font-size: 7.5px;
    letter-spacing: .08em;
  }

  .resume-wrap {
    padding: 0 18px;
  }

  .resume-page,
  .resume-sep {
    display: none;
  }

  .resume-title {
    font-size: 16px;
  }

  .section-head--split {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 34px;
  }

  .section-aside {
    max-width: 100%;
    padding-bottom: 0;
  }

  .section-title {
    font-size: clamp(34px, 9vw, 46px);
  }

  .volume-grid {
    gap: 22px;
  }

  .volume-cover {
    padding: 20px 18px 16px;
  }

  .cover-frame {
    inset: 12px;
  }

  .cover-numeral {
    font-size: clamp(62px, 18vw, 95px);
  }

  .cta-band {
    padding: 0 20px;
    margin-bottom: 70px;
  }

  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 34px 26px;
  }

  .quote-section {
    padding: 70px 22px 80px;
  }

  .catalogue-hero {
    padding-top: 60px;
  }

  .catalogue-hero h1 {
    font-size: clamp(40px, 10.5vw, 58px);
  }

  .catalogue-lede {
    font-size: 14px;
  }

  .search-panel {
    margin-top: 28px;
  }

  .search-panel-foot {
    flex-direction: column;
    gap: 6px;
  }

  .suggestion-row {
    justify-content: flex-start;
  }

  .history-section {
    margin-top: 48px;
  }

  .history-row {
    gap: 10px;
  }

  .history-time {
    display: none;
  }

  .search-how {
    padding: 0 18px;
    margin-top: 55px;
  }

  .search-landing-foot {
    padding-left: 18px;
    padding-right: 18px;
    margin-top: 48px;
  }

  .result-head {
    padding: 50px 18px 24px;
  }

  .result-head h1 {
    font-size: clamp(38px, 10vw, 52px);
  }

  .found-query {
    max-height: 7rem;
    font-size: 22px;
  }

  .location-ribbon {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 24px;
  }

  .loc-cell--hex {
    grid-column: 1 / -1;
    border-bottom: 1px solid var(--line);
  }

  .loc-cell + .loc-cell {
    border-left: 1px solid var(--line);
  }

  .loc-cell--hex + .loc-cell {
    border-left: 0;
  }

  .result-layout {
    padding: 0 18px 20px;
    gap: 26px;
  }

  .found-seal {
    top: -20px;
    right: 14px;
    width: 64px;
    height: 64px;
  }

  .found-seal span:last-child {
    font-size: 13px;
  }

  .result-caption {
    font-size: 10px;
  }

  .result-rail,
  .reader-rail {
    grid-template-columns: 1fr;
  }

  .result-rail .rail-card:last-child:nth-child(odd),
  .reader-rail .rail-card:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .browse-page {
    padding-top: 45px;
    padding-bottom: 70px;
  }

  .browse-head {
    align-items: flex-start;
  }

  .browse-head h1 {
    font-size: clamp(38px, 9.5vw, 52px);
  }

  .hex-seal {
    display: none;
  }

  .browse-utility {
    flex-direction: column;
    align-items: stretch;
    gap: 13px;
  }

  .hex-jump {
    flex: 1 1 auto;
  }

  .wall-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wall-tab:nth-child(3) {
    border-left: 0;
  }

  .wall-tab:nth-child(n+3) {
    border-top: 1px solid var(--line);
  }

  .bookcase-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .bookcase-aside {
    text-align: left;
  }

  .shelf-books {
    height: 92px;
    padding-left: 8px;
    padding-right: 8px;
    gap: 3px;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    mask-image: linear-gradient(to right, black calc(100% - 28px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black calc(100% - 28px), transparent 100%);
  }

  /* Quiet cue only: a soft chevron on the faded edge. No pill, no text. */
  .shelf-scroll-hint {
    position: absolute;
    right: 9px;
    top: 50%;
    z-index: 2;
    display: block;
    color: rgba(231, 206, 154, .75);
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 400;
    line-height: 1;
    text-shadow: 0 1px 6px rgba(0, 0, 0, .9);
    pointer-events: none;
    transform: translateY(-50%);
    transition: opacity .25s ease;
    animation: shelf-nudge 2.2s ease-in-out infinite;
  }

  @keyframes shelf-nudge {
    0%, 100% { transform: translate(-2px, -50%); }
    50% { transform: translate(2px, -50%); }
  }

  .shelf-unit.is-at-end .shelf-scroll-hint {
    opacity: 0;
  }

  .shelf-books::-webkit-scrollbar {
    display: none;
  }

  .spine {
    flex: 0 0 30px;
    min-width: 30px;
    height: 80px;
    border-radius: 2px 2px 0 0;
    scroll-snap-align: start;
  }

  .spine:hover,
  .spine:focus-visible {
    transform: translateY(-5px);
  }

  .spine-num {
    display: block;
    font-size: 7px;
    padding-bottom: 2px;
  }

  .shelf-plank {
    height: 7px;
  }

  .room-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .info-card:nth-child(3) {
    border-left: 0;
  }

  .info-card:nth-child(n+3) {
    border-top: 1px solid var(--line);
  }

  .browse-footnote {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .reader-page {
    padding-top: 22px;
    padding-bottom: 65px;
  }

  .reader-head {
    flex-direction: column;
    gap: 18px;
    margin-top: 24px;
  }

  .reader-actions {
    padding-bottom: 0;
  }

  .reader-toolbar {
    flex-wrap: wrap;
    gap: 10px;
  }

  .reader-toolbar-meta {
    order: 2;
    width: 100%;
    justify-content: space-between;
  }

  .reader-layout {
    margin-top: 20px;
  }

  .book-page {
    padding: 14px 10px 10px;
  }

  .book-page::after {
    inset: 8px;
  }

  .page-text {
    font-size: clamp(6.1px, 1.8vw, 9.5px);
    line-height: 1.65;
  }

  .page-line {
    min-height: 1.65em;
  }

  .page-folio {
    margin-top: 14px;
  }

  .reader-foot {
    font-size: 8.5px;
  }

  .shelf-page {
    padding-top: 48px;
    padding-bottom: 70px;
  }

  .shelf-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .shelf-head-side {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .shelf-item {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .shelf-cover {
    min-height: 205px;
  }

  .about-page {
    padding-top: 50px;
    padding-bottom: 70px;
  }

  .about-hero {
    padding-bottom: 48px;
  }

  .about-hero h1 {
    font-size: clamp(42px, 11.5vw, 62px);
  }

  .about-section {
    grid-template-columns: 1fr;
    gap: 17px;
    padding: 34px 0;
  }

  .about-section-label {
    align-items: baseline;
  }

  .about-section-label h2 {
    font-size: 27px;
  }

  .math-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .math-card:nth-child(3) {
    border-left: 0;
  }

  .math-card:nth-child(n+3) {
    border-top: 1px solid var(--line);
  }

  .about-facts {
    grid-template-columns: 1fr;
  }

  .shortcut-grid {
    grid-template-columns: 1fr;
  }

  .about-cta {
    flex-direction: column;
    align-items: flex-start;
    padding: 30px 26px;
    margin-top: 40px;
  }

  .not-found-view .not-found {
    padding-top: 80px;
    padding-bottom: 100px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 38px 20px 28px;
  }

  .footer-links {
    grid-column: auto;
  }

  .footer-bottom {
    padding: 16px 20px 22px;
    font-size: 7.5px;
  }

  .modal-backdrop {
    padding: 12px;
  }

  .modal {
    max-height: calc(100vh - 24px);
  }

  .modal-head {
    padding: 19px 20px 15px;
  }

  .modal-head h2 {
    font-size: 27px;
  }

  .modal-body {
    padding: 18px 20px 24px;
  }

  .modal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .modal-shelf-head {
    flex-direction: column;
  }
}

@media (max-width: 580px) {
  .brand-sub {
    display: none;
  }

  .header-inner {
    height: 62px;
  }

  .brand {
    gap: 10px;
  }

  .brand-mark {
    width: 26px;
    height: 29px;
  }

  .hero {
    padding-top: 50px;
  }

  .hero .eyebrow {
    margin-bottom: 20px;
  }

  .hero h1 {
    font-size: clamp(38px, 12.5vw, 54px);
  }

  .hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 44px;
  }

  .hero-stat {
    padding: 0 8px;
  }

  .stat-value {
    font-size: 20px;
  }

  .stat-label {
    font-size: 7px;
    line-height: 1.5;
  }

  .search-form--hero {
    min-height: 60px;
  }

  .search-form--hero input {
    height: 48px;
    font-size: 14px;
    padding-left: 45px;
  }

  .search-form--hero .search-form-icon {
    left: 17px;
    width: 17px;
    height: 17px;
  }

  .search-form--hero .search-submit,
  .search-form--large .search-submit {
    height: 46px;
    padding: 0 14px;
  }

  .search-form--hero .search-submit span,
  .search-form--large .search-submit span,
  .search-submit span {
    display: none;
  }

  .search-submit {
    padding: 0 16px;
  }

  .search-form--large {
    min-height: 58px;
  }

  .search-form--large input {
    height: 46px;
    font-size: 14px;
    padding-left: 45px;
  }

  .search-form--large .search-form-icon {
    left: 17px;
    width: 17px;
    height: 17px;
  }

  .volume-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .volume-card:last-child {
    grid-column: auto;
    max-width: none;
  }

  .volume-cover {
    aspect-ratio: 16 / 10;
  }

  .cover-numeral {
    font-size: 84px;
  }

  .cover-mark .icon {
    width: 150px;
    height: 150px;
  }

  .cover-frame {
    inset: 10px;
  }

  .feature-card {
    padding: 26px 22px;
  }

  .quote-section blockquote {
    font-size: 25px;
  }

  .cta-inner {
    padding: 28px 20px;
  }

  .cta-actions {
    width: 100%;
  }

  .cta-actions .btn {
    flex: 1 1 auto;
  }

  .resume-icon {
    width: 32px;
    height: 32px;
  }

  .resume-strip {
    gap: 12px;
    padding: 13px 15px;
  }

  .resume-title {
    font-size: 14px;
  }

  .resume-arrow {
    display: none;
  }

  .shelf-item {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .shelf-cover-num {
    font-size: 42px;
  }

  .shelf-item-body {
    padding: 15px 15px 13px;
  }

  .shelf-item-head h3 {
    font-size: 20px;
  }

  .shelf-item-foot {
    padding-top: 10px;
  }

  .shelf-cover {
    min-height: 190px;
  }

  .empty-state {
    padding: 38px 20px;
  }

  .empty-actions {
    width: 100%;
  }

  .empty-actions .btn {
    flex: 1 1 100%;
  }

  .page-nav-btn span {
    display: none;
  }

  .page-nav-btn {
    width: 37px;
    justify-content: center;
    padding: 0;
  }

  .page-jump {
    padding: 0 7px;
  }

  .page-jump label {
    display: none;
  }

  .reader-title {
    font-size: 38px;
  }

  .reader-sub {
    font-size: 9px;
  }

  .reader-head .eyebrow {
    margin-bottom: 9px;
  }

  .page-text {
    font-size: 6.2px;
    line-height: 1.6;
  }

  .page-line {
    min-height: 1.6em;
  }

  .contains-tag {
    top: 9px;
    right: 9px;
    font-size: 6.5px;
    padding: 3px 5px;
  }

  .book-page--tagged .page-inner {
    padding-top: 15px;
  }

  .found-sheet .page-inner {
    padding-top: 16px;
  }

  .found-seal {
    width: 56px;
    height: 56px;
  }

  .found-seal span:last-child {
    font-size: 11px;
  }

  .loc-cell {
    padding: 10px 12px;
  }

  .loc-value {
    font-size: 11px;
  }

  .loc-cell--hex {
    padding-right: 40px;
  }

  .loc-cell--hex .loc-copy {
    right: 8px;
    bottom: 7px;
  }

  .result-search-again {
    gap: 12px;
  }

  .search-panel-foot strong {
    display: inline-block;
    margin-right: 4px;
  }

  .shelf-head-side {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .shelf-stat-value {
    font-size: 30px;
  }

  .about-hero h1 {
    font-size: clamp(37px, 11.5vw, 50px);
  }

  .about-section-body > p {
    font-size: 13px;
  }

  .about-quote {
    font-size: 21px;
  }

  .about-cta {
    padding: 25px 20px;
  }

  .not-found h1 {
    font-size: 42px;
  }

  .not-found-actions {
    flex-direction: column;
    width: 100%;
  }

  .not-found-actions .btn {
    width: 100%;
  }

  .modal-grid {
    grid-template-columns: 1fr;
  }

  .modal-cover {
    min-height: 96px;
  }

  .modal-cover-num {
    margin-top: 12px;
    font-size: 36px;
  }

  .modal-book {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .modal-book-info {
    justify-content: center;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-kbd {
    display: none;
  }
}

@media (max-width: 380px) {
  .page-text {
    font-size: 5.7px;
  }

  .page-section {
    padding-left: 12px;
    padding-right: 12px;
  }

  .hero {
    padding-left: 13px;
    padding-right: 13px;
  }

  .hero-stat {
    padding: 0 5px;
  }

  .stat-label {
    font-size: 6.5px;
  }

  .search-form--hero input {
    padding-left: 39px;
  }

  .search-form--hero .search-form-icon {
    left: 13px;
  }

  .shelf-item {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .shelf-item-body {
    padding: 13px 12px;
  }
}

/* Touch devices: bring the smallest links up to a comfortable tap size
   without changing the desktop rhythm. */
@media (pointer: coarse) {
  .text-link {
    min-height: 36px;
  }

  .link-button {
    min-height: 32px;
    padding: 0 6px;
  }

  .chip {
    min-height: 34px;
  }

  .icon-btn {
    width: 36px;
    height: 36px;
  }

  .loc-copy {
    min-width: 36px;
    min-height: 36px;
  }
}

/* Floating toast should clear the phone home indicator. */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .toast {
    bottom: calc(28px + env(safe-area-inset-bottom));
  }
}

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

  .hero-geometry {
    opacity: .35;
  }
}

