:root {
  color-scheme: light;
  --ink: #18212f;
  --muted: #536070;
  --line: #d9dfeb;
  --paper: #f7f4ec;
  --panel: #ffffff;
  --accent: #006b5f;
  --accent-strong: #034b42;
  --gold: #a86f19;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

.page {
  min-height: 100vh;
  padding: clamp(24px, 4vw, 56px);
}

.home-page {
  display: block;
}

.home-header,
.book-shelf,
.site-nav {
  max-width: 1160px;
  margin-right: auto;
  margin-left: auto;
}

.home-header {
  padding-top: clamp(12px, 4vw, 48px);
}

.home-header h1 {
  max-width: 13ch;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.brand-lockup .publisher {
  margin: 0;
}

.brand-logo {
  display: block;
  width: clamp(58px, 8vw, 76px);
  height: auto;
  border-radius: 50%;
  box-shadow: 0 16px 36px rgba(24, 33, 47, 0.16);
}

.book-shelf {
  margin-top: clamp(42px, 8vw, 86px);
  padding-top: clamp(24px, 4vw, 42px);
  border-top: 1px solid var(--line);
}

.site-nav {
  margin-bottom: clamp(24px, 4vw, 40px);
}

.site-nav a {
  color: var(--gold);
  font-size: 0.84rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.site-brand-logo {
  display: block;
  width: 34px;
  height: auto;
  border-radius: 50%;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--accent);
}

.book-card {
  display: grid;
  grid-template-columns: minmax(180px, 270px) minmax(0, 1fr);
  gap: clamp(22px, 5vw, 54px);
  align-items: center;
  margin-top: clamp(24px, 5vw, 42px);
  padding: clamp(18px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
  text-decoration: none;
}

.book-card:hover,
.book-card:focus-visible,
.book-card:focus-within {
  border-color: rgba(0, 107, 95, 0.42);
  background: #ffffff;
}

.book-card:focus-visible {
  outline: 3px solid rgba(0, 107, 95, 0.28);
  outline-offset: 3px;
}

.book-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 22px 52px rgba(24, 33, 47, 0.18);
}

.book-card picture,
.cover-panel picture,
.cover-stack picture {
  display: block;
  min-width: 0;
}

.book-card-cover,
.book-card-title-link {
  color: inherit;
  text-decoration: none;
}

.book-card-cover:focus-visible,
.book-card-title-link:focus-visible {
  outline: 3px solid rgba(0, 107, 95, 0.28);
  outline-offset: 3px;
}

.book-card-copy {
  display: grid;
  gap: 12px;
}

.book-card-label {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.book-card-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 4.25rem);
  font-weight: 700;
  line-height: 1.02;
}

.book-card-description {
  max-width: 48ch;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.22rem);
}

.book-card-meta {
  color: var(--muted);
  font-weight: 800;
}

.book-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-self: start;
  margin-top: 2px;
}

.book-card-actions .button {
  min-height: 44px;
  padding: 0 14px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 390px);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  max-width: 1160px;
  min-height: min(760px, calc(100vh - clamp(112px, 14vw, 180px)));
  margin: 0 auto;
}

.hero-copy {
  max-width: 680px;
  min-width: 0;
}

.publisher {
  margin: 0 0 16px;
  color: var(--gold);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  max-width: min(100%, 11ch);
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 7vw, 6.2rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 0.96;
  overflow-wrap: break-word;
}

.subtitle {
  max-width: 62ch;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 800;
  text-decoration: none;
}

.button-icon {
  flex: 0 0 auto;
  width: 1.05em;
  height: 1.05em;
}

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.button.primary:hover,
.button.primary:focus-visible {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.62);
}

.button.secondary:hover,
.button.secondary:focus-visible {
  background: #ffffff;
}

.button.kindle {
  border-color: #8ec7f4;
  background: #eef7ff;
  color: #145d93;
  box-shadow: 0 10px 24px rgba(20, 110, 180, 0.12);
}

.button.kindle:hover,
.button.kindle:focus-visible {
  border-color: #146eb4;
  background: #146eb4;
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(20, 110, 180, 0.24);
}

.button.github {
  border-color: #24292f;
  background: #24292f;
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(24, 33, 47, 0.18);
}

.button.github:hover,
.button.github:focus-visible {
  border-color: #0969da;
  background: #0969da;
  box-shadow: 0 14px 32px rgba(9, 105, 218, 0.22);
}

.button:focus-visible {
  outline: 3px solid rgba(0, 107, 95, 0.28);
  outline-offset: 3px;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 34px 0 0;
}

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

.facts dt {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.facts dd {
  margin: 0;
  font-weight: 800;
}

.cover-panel {
  margin: 0;
  min-width: 0;
}

.cover-panel img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 28px 70px rgba(24, 33, 47, 0.22);
}

.book-page .hero.adl-paperback-hero {
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 620px);
}

.cover-panel.hero-mockup {
  justify-self: center;
  width: min(100%, 620px);
}

.cover-panel.hero-mockup img {
  border-radius: 8px;
}

.contents {
  max-width: 1160px;
  margin: clamp(18px, 4vw, 44px) auto 0;
  padding-top: clamp(24px, 4vw, 42px);
  border-top: 1px solid var(--line);
}

.samples {
  max-width: 1160px;
  margin: clamp(18px, 4vw, 44px) auto 0;
  padding-top: clamp(24px, 4vw, 42px);
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.48fr) minmax(0, 1fr);
  gap: clamp(18px, 5vw, 64px);
  align-items: end;
}

.section-heading .publisher {
  margin: 0;
}

.license-note {
  margin: clamp(14px, 3vw, 24px) 0 0;
  max-width: 68ch;
  color: var(--muted);
  font-weight: 700;
}

h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
}

.toc-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px 18px;
  margin: clamp(24px, 5vw, 42px) 0 0;
  padding: 0;
  list-style: none;
  counter-reset: chapters;
}

.toc-list li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
  min-height: 72px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-weight: 800;
  counter-increment: chapters;
}

.toc-list li::before {
  color: var(--accent);
  content: counter(chapters, decimal-leading-zero);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.toc-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: start;
  min-width: 0;
}

.toc-title {
  display: block;
  min-width: 0;
}

.toc-slide-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  width: 38px;
  height: 34px;
  margin-top: -4px;
  border: 1px solid rgba(0, 107, 95, 0.28);
  border-radius: 6px;
  background: rgba(0, 107, 95, 0.06);
  color: var(--accent);
  text-decoration: none;
}

.toc-slide-link:hover,
.toc-slide-link:focus-visible {
  border-color: rgba(0, 107, 95, 0.48);
  background: rgba(0, 107, 95, 0.11);
  color: var(--accent-strong);
}

.toc-slide-link:focus-visible {
  outline: 3px solid rgba(0, 107, 95, 0.28);
  outline-offset: 3px;
}

.toc-slide-icon {
  position: relative;
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  width: 21px;
  height: 25px;
  padding-bottom: 3px;
  border: 2px solid currentColor;
  border-radius: 3px;
  font-size: 0.43rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

.toc-slide-icon::before {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 7px;
  height: 7px;
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  background: var(--paper);
  content: "";
}

.sample-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: clamp(24px, 5vw, 42px) 0 0;
}

.sample-card {
  display: grid;
  gap: 10px;
  min-height: 238px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  text-decoration: none;
}

.sample-card:hover,
.sample-card:focus-visible {
  border-color: rgba(0, 107, 95, 0.42);
  background: #ffffff;
}

.sample-card:focus-visible {
  outline: 3px solid rgba(0, 107, 95, 0.28);
  outline-offset: 3px;
}

.sample-meta {
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sample-title {
  max-width: 28ch;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 3vw, 2.05rem);
  font-weight: 700;
  line-height: 1.08;
}

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

.sample-action {
  align-self: end;
  color: var(--accent);
  font-weight: 900;
}


.book-card.two-volume {
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
}

.book-card-covers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.book-card-covers img {
  max-width: none;
}

.book-card.three-volume {
  grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
}

.three-volume .book-card-covers {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

body.kimi-site-theme {
  --accent: #385592;
  --accent-strong: #243963;
  --gold: #806023;
  background:
    linear-gradient(125deg, rgba(91, 61, 145, 0.08), transparent 42%),
    linear-gradient(245deg, rgba(42, 136, 152, 0.1), transparent 44%),
    var(--paper);
}

body.kimi-site-theme .toc-slide-link {
  border-color: rgba(56, 85, 146, 0.28);
  background: rgba(56, 85, 146, 0.06);
}

body.kimi-site-theme .toc-slide-link:hover,
body.kimi-site-theme .toc-slide-link:focus-visible {
  border-color: rgba(56, 85, 146, 0.48);
  background: rgba(56, 85, 146, 0.11);
}

body.kimi-site-theme .toc-slide-link:focus-visible {
  outline-color: rgba(56, 85, 146, 0.28);
}

.three-volume-page .hero {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 540px);
}

.three-volume-page .cover-stack {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1.5vw, 18px);
  max-width: 540px;
}

.three-volume-page .volume-grid,
.three-volume-page .toc-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.two-volume-page .hero {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 520px);
}

.cover-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 3vw, 26px);
  align-items: end;
  margin: 0;
  min-width: 0;
}

.cover-stack img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 28px 70px rgba(24, 33, 47, 0.22);
}

.cover-stack img:nth-child(2) {
  margin-top: clamp(20px, 4vw, 42px);
}

.volume-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 1160px;
  margin: clamp(18px, 4vw, 44px) auto 0;
  padding-top: clamp(24px, 4vw, 42px);
  border-top: 1px solid var(--line);
}

.volume-card {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: clamp(18px, 3vw, 24px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.volume-label {
  margin: 0;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.volume-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.05;
}

.volume-description {
  margin: 0;
  color: var(--muted);
}

.volume-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
}

.volume-links .button {
  min-height: 42px;
  padding: 0 13px;
}

.toc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 5vw, 64px);
  margin: clamp(24px, 5vw, 42px) 0 0;
}

.toc-volume h3 {
  margin: 0 0 16px;
  color: var(--gold);
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.toc-grid .toc-list {
  grid-template-columns: 1fr;
  margin: 0;
  counter-reset: chapters var(--chapter-start, 0);
}

.toc-grid .toc-list li {
  min-height: 64px;
  padding: 14px 0;
}

.toc-bridge {
  display: block;
  min-height: 0;
  margin: 0 0 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-weight: 800;
}

.toc-appendices {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 2px solid var(--line);
}

.toc-appendices h4 {
  margin: 0 0 8px;
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.toc-appendix-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: appendices;
}

.toc-appendix-list li {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-weight: 800;
  counter-increment: appendices;
}

.toc-appendix-list li::before {
  color: var(--accent);
  content: "Appendix " counter(appendices, upper-alpha);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

@media (max-width: 960px) {
  .book-page .hero {
    grid-template-columns: 1fr;
    align-items: start;
    min-height: 0;
  }

  .book-page .hero.adl-paperback-hero {
    grid-template-columns: 1fr;
  }

  .book-page .cover-panel {
    max-width: 300px;
  }

  .book-page .cover-panel.hero-mockup {
    max-width: 560px;
  }

  .two-volume-page .cover-stack {
    max-width: 560px;
  }

  .three-volume-page .hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .page {
    padding: 22px;
  }

  .book-card,
  .book-card.two-volume,
  .book-card.three-volume,
  .volume-grid,
  .three-volume-page .volume-grid,
  .three-volume-page .toc-grid,
  .toc-grid {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .book-card img {
    max-width: 240px;
  }

  .book-card-covers {
    max-width: 360px;
  }

  .book-card-covers img {
    max-width: none;
  }

  .three-volume .book-card-covers {
    max-width: 420px;
  }

  .hero {
    grid-template-columns: 1fr;
    align-items: start;
    min-height: 0;
  }

  h1 {
    max-width: none;
  }

  .cover-panel {
    max-width: 280px;
  }

  .cover-panel.hero-mockup {
    max-width: 560px;
  }

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

  .facts dt {
    font-size: 0.68rem;
  }

  .facts dd {
    font-size: 0.9rem;
  }

  .section-heading,
  .sample-list,
  .toc-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 460px) {
  .site-nav {
    margin-bottom: 18px;
  }

  .actions,
  .volume-links,
  .book-card.two-volume .book-card-actions,
  .book-card.three-volume .book-card-actions {
    display: grid;
    margin-top: 22px;
  }

  .button {
    width: 100%;
  }

  .book-card {
    padding: 16px;
  }

  .book-card img {
    max-width: 172px;
  }

  .book-card-covers {
    max-width: 260px;
  }

  .book-card-covers img {
    max-width: none;
  }

  .three-volume .book-card-covers {
    max-width: 320px;
    gap: 8px;
  }

  .facts {
    display: none;
  }

  .book-page .hero {
    gap: 20px;
  }

  .book-page .cover-panel {
    max-width: 210px;
  }

  .book-page .cover-panel.hero-mockup {
    max-width: 420px;
  }

  .two-volume-page .cover-stack {
    max-width: 420px;
  }
}

body.sglang-site-theme {
  --ink: #17131b;
  --muted: #5f545b;
  --line: rgba(87, 38, 45, 0.18);
  --glass-strong: rgba(255, 249, 243, 0.78);
  --glass-border: rgba(255, 235, 220, 0.74);
  --glass-line: rgba(91, 29, 33, 0.14);
  --shadow-soft: 0 24px 70px rgba(58, 14, 20, 0.16);
  --shadow-card: 0 16px 42px rgba(58, 14, 20, 0.1);
  --accent: #9b2f2f;
  --accent-strong: #5d151c;
  --gold: #9a6323;
  --blue: #7d3425;
  --charcoal: #1a1217;
  position: relative;
  overflow-x: hidden;
  background:
    linear-gradient(125deg, rgba(145, 31, 37, 0.16), rgba(145, 31, 37, 0) 34%),
    linear-gradient(245deg, rgba(26, 18, 23, 0.12), rgba(26, 18, 23, 0) 40%),
    linear-gradient(180deg, #fbf7f2 0%, #f2e7df 50%, #fff5e8 100%);
}

body.adl-site-theme {
  --ink: #172234;
  --muted: #546171;
  --line: rgba(0, 91, 83, 0.18);
  --glass-strong: rgba(250, 255, 252, 0.76);
  --glass-border: rgba(232, 249, 245, 0.78);
  --glass-line: rgba(0, 91, 83, 0.14);
  --shadow-soft: 0 24px 64px rgba(7, 67, 71, 0.14);
  --shadow-card: 0 16px 40px rgba(7, 67, 71, 0.09);
  --accent: #006b5f;
  --accent-strong: #034b42;
  --gold: #a86f19;
  position: relative;
  overflow-x: hidden;
  background:
    linear-gradient(130deg, rgba(0, 107, 95, 0.13), rgba(0, 107, 95, 0) 34%),
    linear-gradient(250deg, rgba(168, 111, 25, 0.12), rgba(168, 111, 25, 0) 38%),
    linear-gradient(180deg, #f8fbf8 0%, #edf6f2 52%, #fff7ea 100%);
}

body.adl-site-theme::before,
body.adl-site-theme::after {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
}

body.adl-site-theme::before {
  background-image:
    linear-gradient(rgba(0, 91, 83, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 91, 83, 0.07) 1px, transparent 1px);
  background-size: 84px 84px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 82%);
  opacity: 0.24;
}

body.adl-site-theme::after {
  z-index: -1;
  background:
    linear-gradient(110deg, transparent 0 16%, rgba(255, 251, 240, 0.58) 16% 17%, transparent 17% 54%, rgba(0, 107, 95, 0.1) 54% 55%, transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0));
  opacity: 0.7;
}

body.adl-site-theme a {
  text-underline-offset: 0.16em;
}

body.adl-site-theme .page {
  position: relative;
  isolation: isolate;
}

body.adl-site-theme .site-nav {
  position: sticky;
  top: clamp(10px, 2vw, 18px);
  z-index: 20;
}

body.adl-site-theme .site-nav a {
  padding: 9px 12px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: rgba(250, 255, 252, 0.62);
  box-shadow: 0 12px 30px rgba(7, 67, 71, 0.09);
  -webkit-backdrop-filter: blur(18px) saturate(1.18);
  backdrop-filter: blur(18px) saturate(1.18);
}

body.adl-site-theme .site-nav a:hover,
body.adl-site-theme .site-nav a:focus-visible {
  border-color: rgba(0, 107, 95, 0.34);
  background: rgba(250, 255, 252, 0.82);
}

body.adl-site-theme .hero {
  min-height: min(620px, calc(100vh - clamp(190px, 22vw, 250px)));
}

body.adl-site-theme .book-page .hero.adl-paperback-hero {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 460px);
}

body.adl-site-theme .cover-panel.hero-mockup {
  align-self: center;
  width: min(100%, 460px);
}

body.adl-site-theme .cover-panel.hero-mockup img {
  border-radius: 8px;
  box-shadow: 0 24px 58px rgba(7, 67, 71, 0.18);
}

body.adl-site-theme .button {
  border: 1px solid var(--glass-line);
  background: var(--glass-strong);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.16);
  backdrop-filter: blur(18px) saturate(1.16);
}

body.adl-site-theme .button.primary {
  border-color: rgba(0, 107, 95, 0.48);
  background: linear-gradient(135deg, #007c70 0%, #034b42 100%);
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(0, 91, 83, 0.22);
}

body.adl-site-theme .button.primary:hover,
body.adl-site-theme .button.primary:focus-visible {
  border-color: rgba(3, 75, 66, 0.7);
  background: linear-gradient(135deg, #008d7f 0%, #023d36 100%);
}

body.adl-site-theme .button.kindle {
  border-color: rgba(20, 110, 180, 0.28);
  background: rgba(238, 247, 255, 0.76);
  color: #145d93;
  box-shadow: 0 10px 24px rgba(20, 110, 180, 0.12);
}

body.adl-site-theme .button.kindle:hover,
body.adl-site-theme .button.kindle:focus-visible {
  border-color: rgba(20, 110, 180, 0.46);
  background: rgba(238, 247, 255, 0.94);
  color: #145d93;
  box-shadow: 0 14px 30px rgba(20, 110, 180, 0.16);
}

body.adl-site-theme .button.github {
  border-color: #24292f;
  background: linear-gradient(135deg, #2f3746 0%, #111827 100%);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(24, 33, 47, 0.18);
}

body.adl-site-theme .button.github:hover,
body.adl-site-theme .button.github:focus-visible {
  border-color: #111827;
  background: linear-gradient(135deg, #2f3746 0%, #111827 100%);
  box-shadow: 0 14px 32px rgba(17, 24, 39, 0.26);
}

body.adl-site-theme .button:focus-visible,
body.adl-site-theme .sample-card:focus-visible,
body.adl-site-theme .book-card:focus-visible,
body.adl-site-theme .book-card-cover:focus-visible,
body.adl-site-theme .book-card-title-link:focus-visible,
body.adl-site-theme .toc-slide-link:focus-visible {
  outline: 3px solid rgba(0, 107, 95, 0.28);
  outline-offset: 3px;
}

body.adl-site-theme .sample-card,
body.adl-site-theme .toc-list li {
  border-color: var(--glass-line);
}

body.adl-site-theme .sample-card {
  background:
    linear-gradient(145deg, rgba(250, 255, 252, 0.76), rgba(250, 255, 252, 0.46)),
    rgba(250, 255, 252, 0.56);
  box-shadow: var(--shadow-card);
  -webkit-backdrop-filter: blur(18px) saturate(1.18);
  backdrop-filter: blur(18px) saturate(1.18);
}

body.adl-site-theme .sample-card:hover,
body.adl-site-theme .sample-card:focus-visible {
  border-color: rgba(0, 107, 95, 0.4);
  background:
    linear-gradient(145deg, rgba(250, 255, 252, 0.9), rgba(250, 255, 252, 0.62)),
    rgba(250, 255, 252, 0.82);
}

body.adl-site-theme .contents,
body.adl-site-theme .samples {
  border-top-color: var(--glass-line);
}

body.adl-site-theme .toc-slide-link {
  border-color: rgba(0, 107, 95, 0.24);
  background: rgba(250, 255, 252, 0.56);
  box-shadow: 0 8px 18px rgba(7, 67, 71, 0.08);
  -webkit-backdrop-filter: blur(14px) saturate(1.14);
  backdrop-filter: blur(14px) saturate(1.14);
}

body.adl-site-theme .toc-slide-link:hover,
body.adl-site-theme .toc-slide-link:focus-visible {
  border-color: rgba(0, 107, 95, 0.42);
  background: rgba(250, 255, 252, 0.82);
}

body.adl-site-theme .toc-slide-icon::before {
  background: #f5faf6;
}

body.adl-site-theme .license-note a {
  color: var(--accent-strong);
  font-weight: 900;
}

@media (prefers-reduced-motion: no-preference) {
  body.adl-site-theme .site-nav a,
  body.adl-site-theme .button,
  body.adl-site-theme .sample-card,
  body.adl-site-theme .toc-slide-link {
    transition:
      border-color 160ms ease,
      background 160ms ease,
      box-shadow 160ms ease,
      color 160ms ease,
      transform 160ms ease;
  }

  body.adl-site-theme .site-nav a:hover,
  body.adl-site-theme .site-nav a:focus-visible,
  body.adl-site-theme .button:hover,
  body.adl-site-theme .button:focus-visible,
  body.adl-site-theme .sample-card:hover,
  body.adl-site-theme .sample-card:focus-visible,
  body.adl-site-theme .toc-slide-link:hover,
  body.adl-site-theme .toc-slide-link:focus-visible {
    transform: translateY(-1px);
  }

  body.adl-site-theme .button.github:hover,
  body.adl-site-theme .button.github:focus-visible {
    transform: none;
  }
}

@media (max-width: 960px) {
  body.adl-site-theme .book-page .hero.adl-paperback-hero {
    grid-template-columns: 1fr;
  }

  body.adl-site-theme .cover-panel.hero-mockup {
    max-width: 460px;
  }
}

@media (max-width: 620px) {
  body.adl-site-theme .hero {
    gap: 22px;
  }
}

@media (max-width: 460px) {
  body.adl-site-theme .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
  }

  body.adl-site-theme .actions .button {
    width: auto;
    min-height: 46px;
    padding: 0 12px;
  }

  body.adl-site-theme .cover-panel.hero-mockup {
    max-width: 280px;
  }
}

body.sglang-site-theme::before,
body.sglang-site-theme::after {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
}

body.sglang-site-theme::before {
  background-image:
    linear-gradient(rgba(91, 29, 33, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 29, 33, 0.07) 1px, transparent 1px);
  background-size: 84px 84px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.58), transparent 82%);
  opacity: 0.26;
}

body.sglang-site-theme::after {
  z-index: -1;
  background:
    linear-gradient(110deg, transparent 0 16%, rgba(255, 244, 232, 0.58) 16% 17%, transparent 17% 54%, rgba(184, 83, 48, 0.12) 54% 55%, transparent 55%),
    linear-gradient(180deg, rgba(255, 249, 242, 0.24), rgba(255, 249, 242, 0));
  opacity: 0.7;
}

body.sglang-site-theme a {
  text-underline-offset: 0.16em;
}

body.sglang-site-theme .page {
  position: relative;
  isolation: isolate;
}

body.sglang-site-theme .site-nav {
  position: sticky;
  top: clamp(10px, 2vw, 18px);
  z-index: 20;
}

body.sglang-site-theme .site-nav a {
  padding: 9px 12px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: rgba(255, 249, 243, 0.62);
  box-shadow: 0 12px 30px rgba(58, 14, 20, 0.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.18);
  backdrop-filter: blur(18px) saturate(1.18);
}

body.sglang-site-theme .site-nav a:hover,
body.sglang-site-theme .site-nav a:focus-visible {
  border-color: rgba(155, 47, 47, 0.36);
  background: rgba(255, 249, 243, 0.82);
}

body.sglang-site-theme .hero {
  min-height: min(660px, calc(100vh - clamp(190px, 22vw, 250px)));
}

body.sglang-site-theme .button {
  border: 1px solid var(--glass-line);
  background: var(--glass-strong);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.16);
  backdrop-filter: blur(18px) saturate(1.16);
}

body.sglang-site-theme .button.primary {
  border-color: rgba(155, 47, 47, 0.48);
  background: linear-gradient(135deg, #b83a32 0%, #5d151c 100%);
  box-shadow: 0 16px 34px rgba(122, 24, 29, 0.24);
}

body.sglang-site-theme .button.primary:hover,
body.sglang-site-theme .button.primary:focus-visible {
  border-color: rgba(93, 21, 28, 0.7);
  background: linear-gradient(135deg, #c94438 0%, #4a1016 100%);
}

body.sglang-site-theme .button.secondary {
  background: rgba(255, 249, 243, 0.64);
}

body.sglang-site-theme .button.secondary:hover,
body.sglang-site-theme .button.secondary:focus-visible {
  border-color: rgba(155, 47, 47, 0.28);
  background: rgba(255, 249, 243, 0.86);
}

body.sglang-site-theme .button.kindle {
  border-color: rgba(154, 99, 35, 0.32);
  background: rgba(255, 241, 221, 0.74);
  color: var(--blue);
  box-shadow: 0 10px 24px rgba(154, 99, 35, 0.14);
}

body.sglang-site-theme .button.kindle:hover,
body.sglang-site-theme .button.kindle:focus-visible {
  border-color: rgba(154, 99, 35, 0.48);
  background: rgba(255, 241, 221, 0.92);
  color: var(--blue);
  box-shadow: 0 14px 30px rgba(154, 99, 35, 0.18);
}

body.sglang-site-theme .button.github {
  border-color: #24292f;
  background: linear-gradient(135deg, #2f3746 0%, #111827 100%);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(24, 33, 47, 0.18);
}

body.sglang-site-theme .button.github:hover,
body.sglang-site-theme .button.github:focus-visible {
  border-color: #111827;
  background: linear-gradient(135deg, #2f3746 0%, #111827 100%);
  box-shadow: 0 14px 32px rgba(17, 24, 39, 0.26);
}

body.sglang-site-theme .button:focus-visible,
body.sglang-site-theme .sample-card:focus-visible,
body.sglang-site-theme .toc-slide-link:focus-visible,
body.sglang-site-theme .book-card:focus-visible,
body.sglang-site-theme .book-card-cover:focus-visible,
body.sglang-site-theme .book-card-title-link:focus-visible {
  outline: 3px solid rgba(155, 47, 47, 0.28);
  outline-offset: 3px;
}

body.sglang-site-theme .toc-slide-link {
  border-color: rgba(155, 47, 47, 0.3);
  background: rgba(155, 47, 47, 0.07);
  color: var(--accent);
}

body.sglang-site-theme .toc-slide-link:hover,
body.sglang-site-theme .toc-slide-link:focus-visible {
  border-color: rgba(155, 47, 47, 0.52);
  background: rgba(155, 47, 47, 0.13);
  color: var(--accent-strong);
}

body.sglang-site-theme .toc-slide-icon::before {
  background: #fff9f3;
}

body.sglang-site-theme .cover-stack {
  position: relative;
  padding: clamp(14px, 2.4vw, 24px);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255, 249, 243, 0.76), rgba(255, 249, 243, 0.34)),
    linear-gradient(315deg, rgba(28, 16, 19, 0.12), rgba(155, 47, 47, 0.12));
  box-shadow: var(--shadow-soft);
  -webkit-backdrop-filter: blur(22px) saturate(1.22);
  backdrop-filter: blur(22px) saturate(1.22);
}

body.sglang-site-theme .cover-stack::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 244, 232, 0.72), rgba(255, 244, 232, 0) 42%),
    linear-gradient(180deg, rgba(255, 249, 243, 0), rgba(155, 47, 47, 0.1));
  content: "";
}

body.sglang-site-theme .cover-stack img,
body.sglang-site-theme .book-card img {
  position: relative;
  border-radius: 6px;
  box-shadow: 0 28px 70px rgba(24, 33, 47, 0.24);
}

body.sglang-site-theme .cover-stack.hero-mockup {
  display: block;
  align-self: center;
  padding: 0;
  border: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

body.sglang-site-theme .cover-stack.hero-mockup::before {
  content: none;
}

body.sglang-site-theme .cover-stack.hero-mockup img {
  width: 100%;
  border-radius: 8px;
}

body.sglang-site-theme .volume-card,
body.sglang-site-theme .sample-card,
body.sglang-site-theme .toc-volume {
  border: 1px solid var(--glass-border);
  background:
    linear-gradient(145deg, rgba(255, 249, 243, 0.76), rgba(255, 249, 243, 0.46)),
    rgba(255, 249, 243, 0.56);
  box-shadow: var(--shadow-card);
  -webkit-backdrop-filter: blur(18px) saturate(1.18);
  backdrop-filter: blur(18px) saturate(1.18);
}

body.sglang-site-theme .toc-volume {
  padding: clamp(18px, 3vw, 24px);
  border-radius: 8px;
}

body.sglang-site-theme .sample-card:hover,
body.sglang-site-theme .sample-card:focus-visible {
  border-color: rgba(155, 47, 47, 0.4);
  background:
    linear-gradient(145deg, rgba(255, 249, 243, 0.9), rgba(255, 249, 243, 0.62)),
    rgba(255, 249, 243, 0.82);
}

body.sglang-site-theme .license-note a {
  color: var(--accent-strong);
  font-weight: 900;
}

@media (prefers-reduced-motion: no-preference) {
  body.sglang-site-theme .site-nav a,
  body.sglang-site-theme .button,
  body.sglang-site-theme .sample-card,
  body.sglang-site-theme .toc-slide-link {
    transition:
      border-color 160ms ease,
      background 160ms ease,
      box-shadow 160ms ease,
      color 160ms ease,
      transform 160ms ease;
  }

  body.sglang-site-theme .site-nav a:hover,
  body.sglang-site-theme .site-nav a:focus-visible,
  body.sglang-site-theme .button:hover,
  body.sglang-site-theme .button:focus-visible,
  body.sglang-site-theme .sample-card:hover,
  body.sglang-site-theme .sample-card:focus-visible,
  body.sglang-site-theme .toc-slide-link:hover,
  body.sglang-site-theme .toc-slide-link:focus-visible {
    transform: translateY(-1px);
  }

  body.sglang-site-theme .button.github:hover,
  body.sglang-site-theme .button.github:focus-visible {
    transform: none;
  }
}

@media (max-width: 620px) {
  body.sglang-site-theme .hero {
    gap: 22px;
  }
}

@media (max-width: 460px) {
  body.sglang-site-theme .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
  }

  body.sglang-site-theme .actions .button {
    width: auto;
    min-height: 46px;
    padding: 0 12px;
  }

  body.sglang-site-theme .volume-links .button {
    width: 100%;
  }
}

body.mdl-site-theme {
  --ink: #15252d;
  --muted: #52636a;
  --line: rgba(20, 126, 135, 0.18);
  --glass-strong: rgba(249, 255, 253, 0.76);
  --glass-border: rgba(228, 249, 247, 0.78);
  --glass-line: rgba(20, 126, 135, 0.14);
  --shadow-soft: 0 24px 66px rgba(10, 73, 84, 0.14);
  --shadow-card: 0 16px 40px rgba(10, 73, 84, 0.09);
  --accent: #0c7f89;
  --accent-strong: #0c5060;
  --gold: #b27518;
  --lavender: #8f7fc3;
  position: relative;
  overflow-x: hidden;
  background:
    linear-gradient(130deg, rgba(20, 190, 198, 0.13), rgba(20, 190, 198, 0) 34%),
    linear-gradient(250deg, rgba(178, 117, 24, 0.12), rgba(178, 117, 24, 0) 38%),
    linear-gradient(180deg, #f8fcfb 0%, #edf8f7 52%, #fff8ea 100%);
}

body.mdl-site-theme::before,
body.mdl-site-theme::after {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
}

body.mdl-site-theme::before {
  background-image:
    linear-gradient(rgba(20, 126, 135, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 126, 135, 0.07) 1px, transparent 1px);
  background-size: 84px 84px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.52), transparent 82%);
  opacity: 0.24;
}

body.mdl-site-theme::after {
  z-index: -1;
  background:
    linear-gradient(110deg, transparent 0 16%, rgba(255, 252, 240, 0.58) 16% 17%, transparent 17% 54%, rgba(20, 190, 198, 0.1) 54% 55%, transparent 55%),
    linear-gradient(25deg, transparent 0 61%, rgba(143, 127, 195, 0.1) 61% 62%, transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0));
  opacity: 0.72;
}

body.mdl-site-theme a {
  text-underline-offset: 0.16em;
}

body.mdl-site-theme .page {
  position: relative;
  isolation: isolate;
}

body.mdl-site-theme .site-nav {
  position: sticky;
  top: clamp(10px, 2vw, 18px);
  z-index: 20;
}

body.mdl-site-theme .site-nav a {
  padding: 9px 12px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: rgba(249, 255, 253, 0.62);
  box-shadow: 0 12px 30px rgba(10, 73, 84, 0.09);
  -webkit-backdrop-filter: blur(18px) saturate(1.18);
  backdrop-filter: blur(18px) saturate(1.18);
}

body.mdl-site-theme .site-nav a:hover,
body.mdl-site-theme .site-nav a:focus-visible {
  border-color: rgba(12, 127, 137, 0.34);
  background: rgba(249, 255, 253, 0.82);
}

body.mdl-site-theme .hero {
  min-height: min(640px, calc(100vh - clamp(190px, 22vw, 250px)));
}

body.mdl-site-theme .book-page .hero.mdl-cover-hero {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
}

body.mdl-site-theme .book-page .hero.mdl-hardcover-hero {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 380px);
}

body.mdl-site-theme .cover-panel.mdl-cover-showcase {
  position: relative;
  justify-self: center;
  width: min(100%, 380px);
  max-width: none;
  padding: clamp(14px, 2.4vw, 22px);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(249, 255, 253, 0.78), rgba(249, 255, 253, 0.38)),
    linear-gradient(315deg, rgba(12, 127, 137, 0.13), rgba(143, 127, 195, 0.1));
  box-shadow: var(--shadow-soft);
  -webkit-backdrop-filter: blur(22px) saturate(1.22);
  backdrop-filter: blur(22px) saturate(1.22);
}

body.mdl-site-theme .cover-panel.mdl-cover-showcase::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 252, 240, 0.7), rgba(255, 252, 240, 0) 42%),
    linear-gradient(180deg, rgba(249, 255, 253, 0), rgba(12, 127, 137, 0.1));
  content: "";
}

body.mdl-site-theme .cover-panel.mdl-cover-showcase img {
  position: relative;
  border-radius: 6px;
  box-shadow: 0 28px 70px rgba(24, 33, 47, 0.24);
}

body.mdl-site-theme .cover-panel.mdl-hardcover-showcase {
  align-self: center;
  justify-self: center;
  width: min(100%, 380px);
  max-width: none;
}

body.mdl-site-theme .cover-panel.mdl-hardcover-showcase img {
  border-radius: 8px;
  box-shadow: 0 24px 58px rgba(10, 73, 84, 0.18);
}

body.mdl-site-theme .button {
  border: 1px solid var(--glass-line);
  background: var(--glass-strong);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.16);
  backdrop-filter: blur(18px) saturate(1.16);
}

body.mdl-site-theme .button.primary {
  border-color: rgba(12, 127, 137, 0.48);
  background: linear-gradient(135deg, #0d98a3 0%, #0c5060 100%);
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(10, 105, 118, 0.22);
}

body.mdl-site-theme .button.primary:hover,
body.mdl-site-theme .button.primary:focus-visible {
  border-color: rgba(12, 80, 96, 0.7);
  background: linear-gradient(135deg, #13aab5 0%, #083f4c 100%);
}

body.mdl-site-theme .button.kindle {
  border-color: rgba(178, 117, 24, 0.32);
  background: rgba(255, 244, 222, 0.76);
  color: #84540f;
  box-shadow: 0 10px 24px rgba(178, 117, 24, 0.12);
}

body.mdl-site-theme .button.kindle:hover,
body.mdl-site-theme .button.kindle:focus-visible {
  border-color: rgba(178, 117, 24, 0.48);
  background: rgba(255, 244, 222, 0.94);
  color: #84540f;
  box-shadow: 0 14px 30px rgba(178, 117, 24, 0.16);
}

body.mdl-site-theme .button.github {
  border-color: #24292f;
  background: linear-gradient(135deg, #2f3746 0%, #111827 100%);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(24, 33, 47, 0.18);
}

body.mdl-site-theme .button.github:hover,
body.mdl-site-theme .button.github:focus-visible {
  border-color: #111827;
  background: linear-gradient(135deg, #2f3746 0%, #111827 100%);
  box-shadow: 0 14px 32px rgba(17, 24, 39, 0.26);
}

body.mdl-site-theme .button:focus-visible,
body.mdl-site-theme .sample-card:focus-visible,
body.mdl-site-theme .book-card:focus-visible,
body.mdl-site-theme .book-card-cover:focus-visible,
body.mdl-site-theme .book-card-title-link:focus-visible,
body.mdl-site-theme .toc-slide-link:focus-visible {
  outline: 3px solid rgba(12, 127, 137, 0.28);
  outline-offset: 3px;
}

body.mdl-site-theme .sample-card,
body.mdl-site-theme .toc-list li {
  border-color: var(--glass-line);
}

body.mdl-site-theme .sample-card {
  background:
    linear-gradient(145deg, rgba(249, 255, 253, 0.76), rgba(249, 255, 253, 0.46)),
    rgba(249, 255, 253, 0.56);
  box-shadow: var(--shadow-card);
  -webkit-backdrop-filter: blur(18px) saturate(1.18);
  backdrop-filter: blur(18px) saturate(1.18);
}

body.mdl-site-theme .sample-card:hover,
body.mdl-site-theme .sample-card:focus-visible {
  border-color: rgba(12, 127, 137, 0.4);
  background:
    linear-gradient(145deg, rgba(249, 255, 253, 0.9), rgba(249, 255, 253, 0.62)),
    rgba(249, 255, 253, 0.82);
}

body.mdl-site-theme .contents,
body.mdl-site-theme .samples {
  border-top-color: var(--glass-line);
}

body.mdl-site-theme .toc-slide-link {
  border-color: rgba(12, 127, 137, 0.24);
  background: rgba(249, 255, 253, 0.56);
  box-shadow: 0 8px 18px rgba(10, 73, 84, 0.08);
  -webkit-backdrop-filter: blur(14px) saturate(1.14);
  backdrop-filter: blur(14px) saturate(1.14);
}

body.mdl-site-theme .toc-slide-link:hover,
body.mdl-site-theme .toc-slide-link:focus-visible {
  border-color: rgba(12, 127, 137, 0.42);
  background: rgba(249, 255, 253, 0.82);
}

body.mdl-site-theme .toc-slide-icon::before {
  background: #f5fbfa;
}

body.mdl-site-theme .license-note a {
  color: var(--accent-strong);
  font-weight: 900;
}

@media (prefers-reduced-motion: no-preference) {
  body.mdl-site-theme .site-nav a,
  body.mdl-site-theme .button,
  body.mdl-site-theme .sample-card,
  body.mdl-site-theme .toc-slide-link {
    transition:
      border-color 160ms ease,
      background 160ms ease,
      box-shadow 160ms ease,
      color 160ms ease,
      transform 160ms ease;
  }

  body.mdl-site-theme .site-nav a:hover,
  body.mdl-site-theme .site-nav a:focus-visible,
  body.mdl-site-theme .button:hover,
  body.mdl-site-theme .button:focus-visible,
  body.mdl-site-theme .sample-card:hover,
  body.mdl-site-theme .sample-card:focus-visible,
  body.mdl-site-theme .toc-slide-link:hover,
  body.mdl-site-theme .toc-slide-link:focus-visible {
    transform: translateY(-1px);
  }

  body.mdl-site-theme .button.github:hover,
  body.mdl-site-theme .button.github:focus-visible {
    transform: none;
  }
}

@media (max-width: 960px) {
  body.mdl-site-theme .book-page .hero.mdl-cover-hero,
  body.mdl-site-theme .book-page .hero.mdl-hardcover-hero {
    grid-template-columns: 1fr;
  }

  body.mdl-site-theme .cover-panel.mdl-hardcover-showcase {
    width: min(100%, 380px);
    max-width: none;
  }

  body.mdl-site-theme .cover-panel.mdl-cover-showcase {
    width: min(100%, 340px);
    max-width: none;
  }
}

@media (max-width: 620px) {
  body.mdl-site-theme .hero {
    gap: 22px;
  }
}

@media (max-width: 460px) {
  body.mdl-site-theme .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
  }

  body.mdl-site-theme .actions .button {
    width: auto;
    min-height: 46px;
    padding: 0 12px;
  }

  body.mdl-site-theme .cover-panel.mdl-cover-showcase {
    width: min(100%, 270px);
    max-width: none;
    padding: 12px;
  }

  body.mdl-site-theme .cover-panel.mdl-hardcover-showcase {
    width: min(100%, 280px);
    max-width: none;
  }
}

body.deepseek-site-theme {
  --ink: #0b1c2d;
  --muted: #4a6478;
  --line: rgba(20, 103, 164, 0.18);
  --glass-strong: rgba(247, 253, 255, 0.78);
  --glass-border: rgba(215, 241, 252, 0.82);
  --glass-line: rgba(16, 107, 169, 0.15);
  --accent: #0879bd;
  --accent-strong: #04517f;
  --gold: #32779f;
  position: relative;
  overflow-x: hidden;
  background:
    linear-gradient(126deg, rgba(20, 158, 218, 0.16), rgba(20, 158, 218, 0) 34%),
    linear-gradient(246deg, rgba(38, 61, 204, 0.11), rgba(38, 61, 204, 0) 42%),
    linear-gradient(180deg, #f8fcff 0%, #edf7fc 52%, #f7fbff 100%);
}

body.deepseek-site-theme::before,
body.deepseek-site-theme::after {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
}

body.deepseek-site-theme::before {
  background-image:
    linear-gradient(rgba(12, 95, 151, 0.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(12, 95, 151, 0.075) 1px, transparent 1px);
  background-size: 84px 84px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.58), transparent 82%);
  opacity: 0.28;
}

body.deepseek-site-theme::after {
  z-index: -1;
  background:
    radial-gradient(circle at 76% 18%, rgba(42, 198, 232, 0.16), transparent 24%),
    linear-gradient(112deg, transparent 0 17%, rgba(255, 255, 255, 0.7) 17% 18%, transparent 18% 58%, rgba(44, 111, 232, 0.1) 58% 59%, transparent 59%);
  opacity: 0.72;
}

body.deepseek-site-theme .page {
  position: relative;
  isolation: isolate;
}

body.deepseek-site-theme .site-nav {
  position: sticky;
  top: clamp(10px, 2vw, 18px);
  z-index: 20;
}

body.deepseek-site-theme .site-nav a {
  padding: 9px 12px;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: rgba(247, 253, 255, 0.68);
  box-shadow: 0 12px 30px rgba(5, 54, 91, 0.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.18);
  backdrop-filter: blur(18px) saturate(1.18);
}

body.deepseek-site-theme .site-nav a:hover,
body.deepseek-site-theme .site-nav a:focus-visible {
  border-color: rgba(8, 121, 189, 0.38);
  background: rgba(247, 253, 255, 0.88);
  color: var(--accent);
}

body.deepseek-site-theme .hero {
  min-height: min(660px, calc(100vh - clamp(190px, 22vw, 250px)));
}

body.deepseek-site-theme .button {
  border-color: var(--glass-line);
  background: var(--glass-strong);
  box-shadow: 0 10px 24px rgba(5, 54, 91, 0.09);
  -webkit-backdrop-filter: blur(18px) saturate(1.16);
  backdrop-filter: blur(18px) saturate(1.16);
}

body.deepseek-site-theme .button.primary {
  border-color: rgba(8, 121, 189, 0.52);
  background: linear-gradient(135deg, #129bd4 0%, #075991 58%, #06345e 100%);
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(6, 89, 145, 0.24);
}

body.deepseek-site-theme .button.primary:hover,
body.deepseek-site-theme .button.primary:focus-visible {
  border-color: rgba(4, 81, 127, 0.72);
  background: linear-gradient(135deg, #21addf 0%, #06649e 58%, #052c50 100%);
}

body.deepseek-site-theme .button.secondary {
  background: rgba(247, 253, 255, 0.72);
}

body.deepseek-site-theme .button.secondary:hover,
body.deepseek-site-theme .button.secondary:focus-visible {
  border-color: rgba(8, 121, 189, 0.3);
  background: rgba(247, 253, 255, 0.94);
}

body.deepseek-site-theme .button.kindle {
  border-color: rgba(27, 123, 184, 0.3);
  background: rgba(231, 247, 255, 0.8);
  color: #075991;
}

body.deepseek-site-theme .button.kindle:hover,
body.deepseek-site-theme .button.kindle:focus-visible {
  border-color: rgba(27, 123, 184, 0.5);
  background: rgba(231, 247, 255, 0.98);
  color: #064b7b;
}

body.deepseek-site-theme .button.github {
  border-color: #0a1625;
  background: linear-gradient(135deg, #25384d 0%, #0a1625 100%);
  color: #ffffff;
}

body.deepseek-site-theme .button.github:hover,
body.deepseek-site-theme .button.github:focus-visible {
  border-color: #07101b;
  background: linear-gradient(135deg, #25384d 0%, #0a1625 100%);
}

body.deepseek-site-theme .cover-stack {
  position: relative;
  padding: clamp(14px, 2.4vw, 24px);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(247, 253, 255, 0.82), rgba(231, 247, 255, 0.42)),
    linear-gradient(315deg, rgba(4, 44, 84, 0.12), rgba(20, 158, 218, 0.16));
  box-shadow: 0 24px 70px rgba(4, 44, 84, 0.17);
  -webkit-backdrop-filter: blur(22px) saturate(1.22);
  backdrop-filter: blur(22px) saturate(1.22);
}

body.deepseek-site-theme .cover-stack::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0) 42%),
    linear-gradient(180deg, rgba(247, 253, 255, 0), rgba(8, 121, 189, 0.11));
  content: "";
}

body.deepseek-site-theme .cover-stack.hero-mockup {
  display: block;
  align-self: center;
  padding: 0;
  border: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

body.deepseek-site-theme .cover-stack.hero-mockup::before {
  content: none;
}

body.deepseek-site-theme .cover-stack.hero-mockup img {
  width: 100%;
  border-radius: 8px;
}

body.deepseek-site-theme .cover-stack picture {
  position: relative;
}

body.deepseek-site-theme .cover-stack picture:nth-child(2) {
  margin-top: clamp(20px, 4vw, 42px);
}

body.deepseek-site-theme .volume-card,
body.deepseek-site-theme .sample-card,
body.deepseek-site-theme .toc-volume {
  border-color: var(--glass-border);
  background:
    linear-gradient(145deg, rgba(247, 253, 255, 0.82), rgba(238, 249, 254, 0.5)),
    rgba(247, 253, 255, 0.58);
  box-shadow: 0 16px 42px rgba(5, 54, 91, 0.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.18);
  backdrop-filter: blur(18px) saturate(1.18);
}

body.deepseek-site-theme .toc-volume {
  padding: clamp(18px, 3vw, 24px);
  border-radius: 8px;
}

body.deepseek-site-theme .sample-card:hover,
body.deepseek-site-theme .sample-card:focus-visible {
  border-color: rgba(8, 121, 189, 0.42);
  background:
    linear-gradient(145deg, rgba(247, 253, 255, 0.96), rgba(238, 249, 254, 0.72)),
    rgba(247, 253, 255, 0.86);
}

body.deepseek-site-theme .license-note a {
  color: var(--accent-strong);
  font-weight: 900;
}

body.deepseek-site-theme .toc-slide-link {
  border-color: rgba(8, 121, 189, 0.3);
  background: rgba(8, 121, 189, 0.07);
}

body.deepseek-site-theme .toc-slide-link:hover,
body.deepseek-site-theme .toc-slide-link:focus-visible {
  border-color: rgba(8, 121, 189, 0.52);
  background: rgba(8, 121, 189, 0.13);
}

body.deepseek-site-theme .toc-slide-icon::before {
  background: #f7fdff;
}

body.deepseek-site-theme .button:focus-visible,
body.deepseek-site-theme .book-card-cover:focus-visible,
body.deepseek-site-theme .book-card-title-link:focus-visible,
body.deepseek-site-theme .sample-card:focus-visible,
body.deepseek-site-theme .toc-slide-link:focus-visible,
body.deepseek-site-theme .site-nav a:focus-visible {
  outline: 3px solid rgba(8, 121, 189, 0.3);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: no-preference) {
  body.deepseek-site-theme .button,
  body.deepseek-site-theme .sample-card,
  body.deepseek-site-theme .toc-slide-link,
  body.deepseek-site-theme .site-nav a {
    transition:
      border-color 160ms ease,
      background 160ms ease,
      box-shadow 160ms ease,
      color 160ms ease,
      transform 160ms ease;
  }

  body.deepseek-site-theme .button:hover,
  body.deepseek-site-theme .button:focus-visible,
  body.deepseek-site-theme .sample-card:hover,
  body.deepseek-site-theme .sample-card:focus-visible,
  body.deepseek-site-theme .toc-slide-link:hover,
  body.deepseek-site-theme .toc-slide-link:focus-visible,
  body.deepseek-site-theme .site-nav a:hover,
  body.deepseek-site-theme .site-nav a:focus-visible {
    transform: translateY(-1px);
  }

  body.deepseek-site-theme .button.github:hover,
  body.deepseek-site-theme .button.github:focus-visible {
    transform: none;
  }
}

@media (max-width: 960px) {
  body.deepseek-site-theme .book-page .hero {
    grid-template-columns: 1fr;
    align-items: start;
    min-height: 0;
  }

  body.deepseek-site-theme .two-volume-page .cover-stack {
    max-width: 560px;
  }
}

@media (max-width: 820px) {
  body.deepseek-site-theme .page {
    padding: 22px;
  }

  body.deepseek-site-theme .book-card,
  body.deepseek-site-theme .volume-grid,
  body.deepseek-site-theme .toc-grid,
  body.deepseek-site-theme .section-heading {
    grid-template-columns: 1fr;
    align-items: start;
  }

  body.deepseek-site-theme .book-card-covers {
    max-width: 360px;
  }
}

@media (max-width: 620px) {
  body.deepseek-site-theme .hero {
    gap: 22px;
  }

  body.deepseek-site-theme .sample-list {
    grid-template-columns: 1fr;
  }

  body.deepseek-site-theme .cover-stack {
    max-width: 420px;
  }
}

@media (max-width: 460px) {
  body.deepseek-site-theme .site-nav {
    margin-bottom: 18px;
  }

  body.deepseek-site-theme h1 {
    max-width: none;
    font-size: clamp(2.75rem, 15vw, 4.3rem);
  }

  body.deepseek-site-theme .actions {
    gap: 10px;
  }

  body.deepseek-site-theme .actions .button {
    min-height: 46px;
    padding: 0 12px;
  }

  body.deepseek-site-theme .volume-links,
  body.deepseek-site-theme .book-card-actions {
    display: grid;
  }

  body.deepseek-site-theme .volume-links .button,
  body.deepseek-site-theme .book-card-actions .button {
    width: 100%;
  }

  body.deepseek-site-theme .cover-stack {
    gap: 10px;
    padding: 10px;
  }

  body.deepseek-site-theme .book-card {
    padding: 16px;
  }

  body.deepseek-site-theme .book-card-covers {
    max-width: 260px;
  }
}

/* ------------------------------------------------------------------
   Site-wide fixes (Nov 2026)
   ------------------------------------------------------------------ */

/* The home link no longer floats over page content while scrolling. */
body[class] .site-nav {
  position: static;
}

/* Eyebrow label stacks above its section heading instead of sitting
   in a narrow side column. */
.section-heading {
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: start;
}

/* Homepage book titles are real h2 headings, sized below the page h1. */
h2.book-card-title {
  margin: 0;
  font-size: clamp(1.75rem, 3.6vw, 3rem);
  line-height: 1.05;
}

/* Site footer */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
  justify-content: space-between;
  max-width: 1160px;
  margin: clamp(40px, 7vw, 80px) auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.site-footer a {
  color: inherit;
  font-weight: 700;
  text-underline-offset: 0.18em;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--ink);
}

/* Phone: homepage card buttons stack full-width across the card. */
@media (max-width: 460px) {
  .home-page .book-card-actions,
  .home-page .book-card.two-volume .book-card-actions,
  .home-page .book-card.three-volume .book-card-actions {
    display: grid;
    grid-template-columns: 1fr;
    justify-self: stretch;
    gap: 8px;
  }

  .home-page .book-card-actions .button {
    width: 100%;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
