*, *::before, *::after { box-sizing: border-box; }
:root {
  --tb-green: #1a6b3a;
  --tb-green-dark: #0f3f23;
  --tb-green-light: #e8f4ed;
  --tb-amber: #b87333;
  --tb-ink: #111914;
  --tb-muted: #64736a;
  --tb-border: #d8e4db;
  --tb-paper: #fbfaf7;
  --tb-white: #ffffff;
  --tb-night: #0b1320;
}
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--tb-ink);
  background: var(--tb-paper);
  line-height: 1.65;
}
a { color: var(--tb-green); }
img { max-width: 100%; height: auto; }
.books-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem clamp(1.25rem, 4vw, 2.75rem);
  border-bottom: 1px solid var(--tb-border);
  background: rgba(251,250,247,.96);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.books-brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-weight: 700;
  color: var(--tb-green);
  text-decoration: none;
  letter-spacing: -.01em;
}
.books-brand img { width: 32px; height: 32px; }
.books-links {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  font-size: .9rem;
}
.books-links a { color: var(--tb-muted); text-decoration: none; font-weight: 600; }
.books-links a:hover { color: var(--tb-green); }
.books-container {
  width: min(1080px, calc(100% - 2.5rem));
  margin: 0 auto;
}
.books-narrow {
  width: min(820px, calc(100% - 2.5rem));
  margin: 0 auto;
}
.books-hero {
  padding: clamp(4rem, 8vw, 7rem) 0 clamp(3rem, 7vw, 5rem);
}
.books-kicker {
  display: inline-block;
  color: var(--tb-amber);
  text-transform: uppercase;
  letter-spacing: .13em;
  font-size: .72rem;
  font-weight: 800;
  margin-bottom: 1.1rem;
}
.books-title {
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(2.5rem, 7vw, 5.2rem);
  line-height: 1.03;
  letter-spacing: -.04em;
  margin: 0 0 1.25rem;
}
.books-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--tb-muted);
  max-width: 720px;
  margin: 0 0 2rem;
}
.books-actions { display: flex; flex-wrap: wrap; gap: .85rem; align-items: center; }
.books-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .75rem 1.15rem;
  border-radius: 999px;
  border: 1.5px solid var(--tb-green);
  color: var(--tb-green);
  background: transparent;
  text-decoration: none;
  font-weight: 800;
  font-size: .92rem;
}
.books-btn.primary { background: var(--tb-green); color: #fff; }
.books-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(26,107,58,.14); }
.books-note { color: var(--tb-muted); font-size: .9rem; }
.books-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
}
.book-card {
  background: var(--tb-white);
  border: 1px solid var(--tb-border);
  border-radius: 22px;
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: 0 18px 45px rgba(17,25,20,.06);
  display: grid;
  grid-template-columns: minmax(120px, 190px) 1fr;
  gap: clamp(1.1rem, 3vw, 1.75rem);
  align-items: start;
}
.book-card-cover {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 14px 35px rgba(10,15,20,.22);
  background: #111;
}
.book-card h2 {
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  line-height: 1.15;
  margin: 0 0 .55rem;
}
.book-card p { margin: 0 0 1rem; color: var(--tb-muted); }
.book-meta {
  color: var(--tb-amber);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 800;
  margin-bottom: .7rem;
}
.books-section {
  padding: clamp(3rem, 7vw, 5rem) 0;
  border-top: 1px solid var(--tb-border);
}
.books-section h2, .book-detail h2 {
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.65rem);
  line-height: 1.15;
  margin: 0 0 1rem;
}
.books-section p, .book-detail p, .book-detail li { color: var(--tb-muted); }
.book-detail-hero {
  display: grid;
  grid-template-columns: minmax(220px, 350px) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding: clamp(3rem, 8vw, 6rem) 0;
}
.book-detail-cover {
  border-radius: 14px;
  box-shadow: 0 26px 70px rgba(10,15,20,.25);
}
.book-detail h1 {
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(2.5rem, 6vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -.04em;
  margin: 0 0 1rem;
}
.book-detail-tagline {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--tb-muted);
  margin-bottom: 1.5rem;
}
.book-prose {
  max-width: 760px;
  font-size: 1.03rem;
}
.book-feature-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}
.book-feature {
  padding: 1.25rem;
  background: var(--tb-white);
  border: 1px solid var(--tb-border);
  border-radius: 14px;
}
.book-feature strong { display: block; margin-bottom: .35rem; }
.purchase-section {
  background: rgba(255, 255, 255, .45);
}
.purchase-format-list {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}
.purchase-format {
  padding: 1.25rem;
  background: var(--tb-white);
  border: 1px solid var(--tb-border);
  border-radius: 14px;
  box-shadow: 0 14px 35px rgba(17,25,20,.05);
}
.purchase-format-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.purchase-format-header h3 {
  margin: 0;
  font-size: 1.05rem;
}
.purchase-format-header span {
  color: var(--tb-amber);
  font-weight: 900;
}
.purchase-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}
.purchase-link.featured {
  min-height: 50px;
  padding-inline: 1.35rem;
  border-color: var(--tb-green-dark);
  background: var(--tb-green-dark);
  color: #fff;
  box-shadow: 0 12px 28px rgba(15,63,35,.2);
}
.purchase-format-note {
  margin: .2rem 0 0;
  color: var(--tb-muted);
  font-weight: 800;
}
.praise-section {
  background: var(--tb-white);
}
.praise-quote {
  margin: 1.5rem 0 0;
}
.praise-quote blockquote {
  margin: 0;
  padding: 1.5rem;
  border: 1px solid var(--tb-border);
  border-radius: 14px;
  background: var(--tb-paper);
  box-shadow: 0 14px 35px rgba(17,25,20,.05);
}
.praise-quote blockquote p {
  margin: 0 0 1rem;
}
.praise-quote blockquote p:last-child { margin-bottom: 0; }
.praise-quote figcaption {
  margin-top: 1rem;
  color: var(--tb-muted);
  font-size: .95rem;
}
.praise-quote figcaption strong {
  color: var(--tb-ink);
}
.praise-quote figcaption span {
  display: block;
  margin-top: .45rem;
}
.media-feature-list {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}
.media-feature {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(0, .8fr);
  gap: 1.25rem;
  align-items: center;
  padding: 1.25rem;
  border: 1px solid var(--tb-border);
  border-radius: 14px;
  background: var(--tb-white);
  box-shadow: 0 14px 35px rgba(17,25,20,.05);
}
.media-feature h3 {
  margin: 0 0 .3rem;
  font-size: 1.2rem;
}
.media-feature p {
  margin: 0 0 1rem;
}
.media-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: #111;
}
.media-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.book-map-section {
  margin-top: 2.75rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--tb-border);
}
.book-map-frame {
  display: block;
  margin-top: 1.5rem;
  border: 1px solid var(--tb-border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--tb-white);
  box-shadow: 0 18px 45px rgba(17,25,20,.06);
}
.book-map-frame img {
  display: block;
  width: 100%;
}
.book-map-caption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: .8rem;
  color: var(--tb-muted);
  font-size: .86rem;
}
.book-map-caption a {
  font-weight: 800;
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
}
.book-source-section {
  margin-top: 2.75rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--tb-border);
}
.book-source-list {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  gap: .7rem;
}
.book-source-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: .7rem;
  border-bottom: 1px solid rgba(216, 228, 219, .7);
}
.book-source-list a {
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
}
.book-source-download {
  flex: 0 0 auto;
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--tb-muted);
}
.source-reader-header {
  padding: clamp(3rem, 7vw, 5rem) 0 2rem;
}
.source-reader-header h1 {
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -.04em;
  max-width: 860px;
  margin: 0 0 1rem;
}
.source-reader-header p {
  color: var(--tb-muted);
  margin: 0 0 1.5rem;
}
.source-reader-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}
.source-viewer-shell {
  border-top: 1px solid var(--tb-border);
  background: #171717;
}
.source-toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding-top: .85rem;
  padding-bottom: .85rem;
  background: rgba(17, 25, 20, .92);
  backdrop-filter: blur(8px);
}
.source-tool {
  min-width: 42px;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.source-tool.text {
  min-width: auto;
  padding: 0 .9rem;
  font-size: .86rem;
}
.source-tool:hover {
  background: rgba(255, 255, 255, .16);
}
.source-zoom-label {
  color: rgba(255, 255, 255, .78);
  font-size: .86rem;
  font-weight: 800;
  min-width: 56px;
  text-align: center;
}
.source-scan-frame {
  width: min(1400px, calc(100% - 2rem));
  height: min(78vh, 980px);
  margin: 0 auto;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 1rem;
}
.source-scan-image {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0 auto;
  box-shadow: 0 20px 70px rgba(0, 0, 0, .55);
  cursor: zoom-in;
}
.author-layout {
  display: grid;
  grid-template-columns: minmax(230px, 360px) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  padding: clamp(3rem, 8vw, 6rem) 0;
}
.author-photo {
  border-radius: 18px;
  box-shadow: 0 22px 60px rgba(10,15,20,.18);
}
.author-bio h1 {
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -.04em;
  margin: 0 0 1rem;
}
.author-bio p { color: var(--tb-muted); font-size: 1.04rem; }
.books-footer {
  border-top: 1px solid var(--tb-border);
  padding: 2rem 0;
  color: var(--tb-muted);
  font-size: .86rem;
}
.books-footer .books-container {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
@media (max-width: 820px) {
  .books-nav { position: static; flex-direction: column; align-items: flex-start; }
  .books-links { flex-wrap: wrap; }
  .books-grid, .book-detail-hero, .author-layout { grid-template-columns: 1fr; }
  .book-card { grid-template-columns: 1fr; }
  .book-card-cover { max-width: 220px; }
  .book-feature-list { grid-template-columns: 1fr; }
  .media-feature { grid-template-columns: 1fr; }
  .book-source-list li { align-items: flex-start; flex-direction: column; gap: .2rem; }
  .source-toolbar { justify-content: flex-start; overflow-x: auto; }
  .source-scan-frame { width: 100%; height: 76vh; padding: .75rem; }
}
