:root {
  color-scheme: light;
  --site-canvas: #f7f3ea;
  --site-paper: #fffdf9;
  --site-paper-bright: #ffffff;
  --site-ink: #17243d;
  --site-ink-soft: #30405a;
  --site-muted: #626b78;
  --site-accent: #bf5549;
  --site-accent-soft: #f7e5df;
  --site-blue-soft: #e8eef4;
  --site-border: #dedbd2;
  --site-border-strong: #c8c5bc;
  --site-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --site-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --site-shadow-sm: 0 0.35rem 1.25rem rgba(23, 36, 61, 0.06);
  --site-shadow-lg: 0 1.35rem 3rem rgba(23, 36, 61, 0.1);
  --bs-body-font-family: var(--site-sans);
  --bs-body-color: var(--site-ink);
  --bs-body-bg: var(--site-canvas);
  --bs-primary-rgb: 23, 36, 61;
  --bs-secondary-color: var(--site-muted);
  --bs-border-color: var(--site-border);
  --bs-link-color-rgb: 36, 77, 114;
  --bs-link-hover-color-rgb: 145, 55, 48;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  background: var(--site-canvas);
  color: var(--site-ink);
  font-family: var(--site-sans);
  text-rendering: optimizeLegibility;
}

a {
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  border-radius: 0.25rem;
  outline: 3px solid rgba(191, 85, 73, 0.45);
  outline-offset: 3px;
}

.btn {
  border-radius: 0.7rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.btn-lg {
  font-size: 1rem;
  padding: 0.85rem 1.35rem;
}

.btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--site-ink);
  --bs-btn-border-color: var(--site-ink);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--site-ink-soft);
  --bs-btn-hover-border-color: var(--site-ink-soft);
  --bs-btn-focus-shadow-rgb: 191, 85, 73;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #0f192b;
  --bs-btn-active-border-color: #0f192b;
}

.skip-link {
  background: var(--site-paper-bright);
  border: 2px solid var(--site-ink);
  border-radius: 0.5rem;
  color: var(--site-ink);
  font-weight: 750;
  left: 1rem;
  padding: 0.75rem 1rem;
  position: fixed;
  top: -6rem;
  z-index: 2000;
}

.skip-link:focus { top: 1rem; }

.site-header {
  backdrop-filter: blur(14px);
  background: rgba(255, 253, 249, 0.92);
  border-bottom: 1px solid rgba(200, 197, 188, 0.75);
  position: sticky;
  top: 0;
  z-index: 1030;
}

.site-header .navbar { min-height: 4.5rem; }

.brand-lockup {
  align-items: center;
  color: var(--site-ink);
  display: inline-flex;
  gap: 0.7rem;
  text-decoration: none;
}

.brand-lockup:hover { color: var(--site-ink); }

.brand-mark {
  border: 1px solid rgba(23, 36, 61, 0.08);
  border-radius: 0.8rem;
  box-shadow: 0 0.2rem 0.75rem rgba(23, 36, 61, 0.1);
  flex: 0 0 auto;
}

.brand-name {
  font-family: var(--site-serif);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.brand-description {
  border-left: 1px solid var(--site-border-strong);
  color: var(--site-muted);
  font-size: 0.76rem;
  line-height: 1.25;
  max-width: 9.5rem;
  padding-left: 1rem;
}

.site-nav-link {
  border-radius: 0.55rem;
  color: var(--site-ink);
  font-size: 0.86rem;
  font-weight: 750;
  padding: 0.55rem 0.75rem;
  text-decoration: none;
}

.site-nav-link:hover {
  background: var(--site-blue-soft);
  color: var(--site-ink);
}

.catalog-hero {
  background:
    radial-gradient(circle at 92% 6%, rgba(191, 85, 73, 0.12), transparent 25rem),
    radial-gradient(circle at 4% 90%, rgba(62, 96, 130, 0.1), transparent 28rem),
    var(--site-canvas);
  border-bottom: 1px solid var(--site-border);
  overflow: hidden;
  position: relative;
}

.catalog-hero::after {
  border: 1px solid rgba(23, 36, 61, 0.08);
  border-radius: 50%;
  content: "";
  height: 28rem;
  position: absolute;
  right: -16rem;
  top: -15rem;
  width: 28rem;
}

.catalog-hero .container {
  position: relative;
  z-index: 1;
}

.section-kicker,
.guide-nav-kicker {
  color: var(--site-accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero-title,
.section-title,
.book-title,
.book-content h1,
.book-content h2,
.book-content h3,
.book-content h4,
.guide-nav-title,
.footer-brand {
  font-family: var(--site-serif);
}

.hero-title {
  font-size: clamp(3rem, 7vw, 5.4rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.97;
  max-width: 11ch;
}

.hero-title em {
  color: var(--site-accent);
  font-weight: 500;
}

.hero-lede {
  color: var(--site-muted);
  font-size: clamp(1.08rem, 1.8vw, 1.25rem);
  line-height: 1.7;
  max-width: 43rem;
}

.hero-text-link {
  color: var(--site-ink);
  font-size: 0.95rem;
  font-weight: 750;
}

.hero-text-link span {
  color: var(--site-accent);
  display: inline-block;
  margin-left: 0.2rem;
}

.hero-index {
  background: rgba(255, 253, 249, 0.94);
  border: 1px solid var(--site-border);
  border-radius: 1.35rem;
  box-shadow: var(--site-shadow-lg);
  overflow: hidden;
  position: relative;
}

.hero-index::before {
  background: var(--site-accent);
  content: "";
  height: 0.28rem;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.hero-index-heading {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1.55rem 1.6rem 1.1rem;
}

.hero-index-label {
  color: var(--site-ink);
  font-family: var(--site-serif);
  font-size: 1.1rem;
  font-weight: 700;
}

.hero-index-count {
  color: var(--site-muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.hero-index-item {
  align-items: start;
  border-top: 1px solid var(--site-border);
  display: grid;
  gap: 1rem;
  grid-template-columns: 2rem 1fr;
  padding: 1.15rem 1.6rem;
}

.hero-index-item strong,
.hero-index-item small { display: block; }

.hero-index-item strong {
  color: var(--site-ink);
  font-size: 0.94rem;
  margin-bottom: 0.2rem;
}

.hero-index-item small {
  color: var(--site-muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.hero-index-number {
  color: var(--site-accent);
  font-family: var(--site-serif);
  font-size: 0.88rem;
  font-weight: 700;
  padding-top: 0.08rem;
}

.catalog-section { scroll-margin-top: 5rem; }

.section-title {
  font-size: clamp(2.15rem, 4vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.catalog-count {
  color: var(--site-muted);
  font-size: 0.85rem;
  font-weight: 650;
}

.book-card {
  background: var(--site-paper-bright);
  border: 1px solid var(--site-border);
  border-radius: 1.15rem;
  box-shadow: var(--site-shadow-sm);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.book-card:hover,
.book-card:focus-within {
  border-color: rgba(23, 36, 61, 0.24);
  box-shadow: var(--site-shadow-lg);
  transform: translateY(-0.25rem);
}

.book-card-body {
  flex: 1 1 auto;
  min-height: 15.5rem;
  padding: 1.6rem 1.6rem 1.8rem;
}

.book-series {
  color: var(--site-accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  line-height: 1.35;
  text-transform: uppercase;
}

.book-volume {
  align-items: center;
  background: var(--site-blue-soft);
  border-radius: 50%;
  color: var(--site-ink);
  display: inline-flex;
  flex: 0 0 auto;
  font-family: var(--site-serif);
  font-size: 0.78rem;
  font-weight: 700;
  height: 2.25rem;
  justify-content: center;
  width: 2.25rem;
}

.book-title {
  font-size: clamp(1.75rem, 3vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.book-title a { color: var(--site-ink); }
.book-title a:hover { color: var(--site-ink-soft); }

.book-author {
  color: var(--site-muted);
  font-size: 0.9rem;
}

.book-card-footer {
  align-items: center;
  background: rgba(232, 238, 244, 0.58);
  border-top: 1px solid var(--site-border);
  color: var(--site-ink);
  display: flex;
  font-size: 0.8rem;
  font-weight: 750;
  justify-content: space-between;
  padding: 0.9rem 1.6rem;
}

.book-card-arrow {
  color: var(--site-accent);
  font-size: 1.1rem;
  transition: transform 180ms ease;
}

.book-card:hover .book-card-arrow,
.book-card:focus-within .book-card-arrow { transform: translate(0.12rem, -0.12rem); }

.guide-page { max-width: 82rem; }

.guide-breadcrumb {
  --bs-breadcrumb-divider-color: var(--site-border-strong);
  --bs-breadcrumb-item-active-color: var(--site-muted);
  align-items: baseline;
  font-size: 0.8rem;
  flex-wrap: nowrap;
  font-weight: 650;
  line-height: 1.5;
  overflow: hidden;
}

.guide-breadcrumb .breadcrumb-item {
  flex: 0 0 auto;
  white-space: nowrap;
}

.guide-breadcrumb .breadcrumb-item.active {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.guide-breadcrumb a {
  color: var(--site-ink-soft);
  text-decoration-color: rgba(48, 64, 90, 0.35);
}

.article-context {
  align-items: center;
  color: var(--site-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.73rem;
  font-weight: 750;
  gap: 0.45rem;
  letter-spacing: 0.055em;
  padding-inline: clamp(0rem, 2vw, 1.5rem);
  text-transform: uppercase;
}

.article-context span:first-child { color: var(--site-accent); }

.book-content {
  background: var(--site-paper-bright);
  border: 1px solid var(--site-border);
  border-radius: 1.25rem;
  box-shadow: var(--site-shadow-sm);
  font-family: var(--site-serif);
  font-size: clamp(1.05rem, 1.5vw, 1.16rem);
  line-height: 1.82;
  overflow-wrap: anywhere;
  padding: clamp(1.4rem, 4.5vw, 4rem);
}

.book-content > :first-child { margin-top: 0; }
.book-content > :last-child { margin-bottom: 0; }

.book-content h1,
.book-content h2,
.book-content h3,
.book-content h4,
.book-content h5,
.book-content h6 {
  color: var(--site-ink);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  max-width: 24ch;
}

.book-content h1 {
  font-size: clamp(2.5rem, 6vw, 4.35rem);
  letter-spacing: -0.05em;
  margin-bottom: 1.75rem;
}

.book-content h1 + p {
  color: var(--site-ink-soft);
  font-size: 1.12em;
  line-height: 1.7;
}

.book-content h2 {
  border-top: 1px solid var(--site-border);
  font-size: clamp(1.8rem, 3.5vw, 2.35rem);
  margin-top: 3.5rem;
  padding-top: 2.25rem;
}

.book-content h3 {
  font-size: clamp(1.4rem, 2.5vw, 1.7rem);
  margin-top: 2.5rem;
}

.book-content h4 {
  font-size: 1.22rem;
  margin-top: 2rem;
}

.book-content h5,
.book-content h6 {
  font-family: var(--site-sans);
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  margin-top: 1.8rem;
  text-transform: uppercase;
}

.book-content p,
.book-content ul,
.book-content ol { max-width: 68ch; }

.book-content li { margin-block: 0.35rem; }

.book-content li::marker {
  color: var(--site-accent);
  font-weight: 700;
}

.book-content a {
  color: #244d72;
  font-weight: 650;
  text-decoration-color: rgba(36, 77, 114, 0.4);
}

.book-content a:hover { text-decoration-color: currentColor; }

.book-content blockquote {
  background: var(--site-accent-soft);
  border-left: 0.28rem solid var(--site-accent);
  color: var(--site-ink-soft);
  font-style: italic;
  margin: 2rem 0;
  max-width: 66ch;
  padding: 1.2rem 1.4rem;
}

.book-content blockquote > :last-child { margin-bottom: 0; }

.book-content hr {
  border-color: var(--site-border-strong);
  margin: 3rem 0;
  max-width: 7rem;
  opacity: 1;
}

.book-content code {
  background: var(--site-blue-soft);
  border-radius: 0.25rem;
  color: var(--site-ink-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.86em;
  padding: 0.12rem 0.3rem;
}

.book-content table {
  border-collapse: collapse;
  display: block;
  font-family: var(--site-sans);
  font-size: 0.87rem;
  line-height: 1.55;
  margin: 2rem 0;
  max-width: 100%;
  overflow-x: auto;
  width: max-content;
}

.book-content th,
.book-content td {
  border: 1px solid var(--site-border);
  min-width: 9rem;
  overflow-wrap: normal;
  padding: 0.75rem 0.9rem;
  vertical-align: top;
}

.book-content th {
  background: var(--site-blue-soft);
  color: var(--site-ink);
  font-weight: 750;
}

.book-guide-nav {
  background: var(--site-paper-bright);
  border: 1px solid var(--site-border);
  border-radius: 1.1rem;
  box-shadow: var(--site-shadow-sm);
  overflow: hidden;
}

.guide-nav-disclosure > summary,
.guide-section > summary {
  cursor: pointer;
  list-style: none;
}

.guide-nav-disclosure > summary::-webkit-details-marker,
.guide-section > summary::-webkit-details-marker { display: none; }

.guide-mobile-summary {
  align-items: center;
  display: flex;
  gap: 0.8rem;
  min-height: 4.75rem;
  padding: 0.9rem 1rem;
}

.guide-mobile-summary > span:first-child { min-width: 0; }

.guide-mobile-summary small,
.guide-mobile-summary strong { display: block; }

.guide-mobile-summary small {
  color: var(--site-accent);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  margin-bottom: 0.12rem;
  text-transform: uppercase;
}

.guide-mobile-summary strong {
  font-family: var(--site-serif);
  font-size: 1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guide-mobile-summary::after {
  color: var(--site-accent);
  content: "+";
  flex: 0 0 auto;
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1;
  margin-left: 0.1rem;
}

.guide-nav-disclosure[open] > .guide-mobile-summary::after { content: "−"; }

.guide-mobile-count {
  background: var(--site-blue-soft);
  border-radius: 999px;
  color: var(--site-muted);
  flex: 0 0 auto;
  font-size: 0.65rem;
  font-weight: 750;
  margin-left: auto;
  padding: 0.35rem 0.55rem;
}

.guide-nav-body {
  border-top: 1px solid var(--site-border);
  padding: 1.35rem;
}

.guide-nav-title {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.guide-nav-author {
  color: var(--site-muted);
  font-size: 0.78rem;
}

.guide-overview-link {
  align-items: center;
  border: 1px solid var(--site-border);
  border-radius: 0.6rem;
  color: var(--site-ink-soft);
  display: flex;
  font-size: 0.82rem;
  font-weight: 750;
  min-height: 2.75rem;
  padding: 0.65rem 0.75rem;
  text-decoration: none;
}

.guide-overview-link:hover,
.guide-overview-link.active {
  background: var(--site-blue-soft);
  border-color: rgba(23, 36, 61, 0.18);
  color: var(--site-ink);
}

.guide-overview-link.active::before {
  background: var(--site-accent);
  border-radius: 50%;
  content: "";
  height: 0.45rem;
  margin-right: 0.55rem;
  width: 0.45rem;
}

.guide-sections { border-bottom: 1px solid var(--site-border); }

.guide-section { border-top: 1px solid var(--site-border); }

.guide-section > summary {
  align-items: center;
  color: var(--site-ink-soft);
  display: grid;
  font-size: 0.78rem;
  font-weight: 750;
  gap: 0.65rem;
  grid-template-columns: minmax(0, 1fr) auto auto;
  min-height: 3.15rem;
  padding: 0.65rem 0.15rem;
}

.guide-section > summary::after {
  color: var(--site-accent);
  content: "+";
  font-size: 1rem;
  font-weight: 500;
}

.guide-section[open] > summary::after { content: "−"; }

.guide-section-count {
  background: var(--site-canvas);
  border-radius: 999px;
  color: var(--site-muted);
  font-size: 0.65rem;
  min-width: 1.65rem;
  padding: 0.22rem 0.45rem;
  text-align: center;
}

.guide-link {
  border-left: 0.18rem solid transparent;
  color: var(--site-muted);
  display: block;
  font-size: 0.76rem;
  line-height: 1.4;
  margin-block: 0.12rem;
  padding: 0.48rem 0.6rem;
  text-decoration: none;
}

.guide-link:hover,
.guide-link.active {
  background: var(--site-canvas);
  border-left-color: var(--site-accent);
  color: var(--site-ink);
}

.guide-link.active { font-weight: 750; }

.site-footer {
  background: #eee9de;
  border-top: 1px solid var(--site-border-strong);
}

.footer-brand {
  align-items: center;
  color: var(--site-ink);
  display: inline-flex;
  font-size: 1.25rem;
  font-weight: 700;
  gap: 0.65rem;
  letter-spacing: -0.03em;
}

.footer-brand:hover { color: var(--site-ink); }

.footer-mark {
  border: 1px solid rgba(23, 36, 61, 0.08);
  border-radius: 0.65rem;
}

.footer-description {
  color: var(--site-muted);
  font-size: 0.82rem;
  line-height: 1.6;
  max-width: 34rem;
}

.footer-link {
  color: var(--site-ink);
  font-size: 0.82rem;
  font-weight: 750;
}

.footer-note {
  color: var(--site-muted);
  font-size: 0.72rem;
}

@media (min-width: 992px) {
  .catalog-hero .container,
  .catalog-section {
    padding-bottom: 6rem !important;
    padding-top: 6rem !important;
  }

  .book-guide-nav {
    max-height: calc(100vh - 7.5rem);
    overflow-y: auto;
    position: sticky;
    scrollbar-color: var(--site-border-strong) transparent;
    scrollbar-width: thin;
    top: 6rem;
  }

  .guide-mobile-summary { display: none; }

  .guide-nav-body {
    border-top: 0;
    padding: 1.6rem;
  }
}

@media (max-width: 767.98px) {
  .site-header .navbar { min-height: 4rem; }

  .brand-mark {
    height: 2.35rem;
    width: 2.35rem;
  }

  .brand-name { font-size: 1.08rem; }

  .site-nav-link {
    font-size: 0.78rem;
    padding-inline: 0.5rem;
  }

  .hero-title { font-size: clamp(3rem, 16vw, 4.4rem); }

  .hero-index-heading,
  .hero-index-item { padding-inline: 1.2rem; }

  .book-card-body { min-height: 13rem; }

  .book-content { border-radius: 1rem; }

  .book-content h1 { font-size: clamp(2.35rem, 13vw, 3.5rem); }
}

@media (max-width: 374.98px) {
  .brand-lockup { gap: 0.45rem; }
  .brand-name { font-size: 1rem; }
  .site-nav-link { padding-inline: 0.35rem; }
  .guide-mobile-count { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .book-card,
  .book-card-arrow { transition: none; }
}

@media print {
  .site-header,
  .site-footer,
  .book-guide-nav,
  .guide-breadcrumb,
  .article-context { display: none !important; }

  body { background: #fff; }

  .guide-page { max-width: none; }

  .book-content {
    border: 0;
    box-shadow: none;
    padding: 0;
  }
}
