:root {
  --tpc-ink: #2d2340;
  --tpc-purple: #4d2b72;
  --tpc-purple-dark: #2f174b;
  --tpc-gold: #f6c453;
  --tpc-cream: #fff9eb;
  --tpc-sky: #e8f4ff;
  --tpc-card: #ffffff;
  --tpc-shadow: 0 16px 40px rgba(45, 35, 64, .13);
}

.tpc-hub,
.tpc-book-page {
  color: var(--tpc-ink);
  font-size: 1.125rem;
  line-height: 1.7;
}

.tpc-hub h2,
.tpc-hub h3,
.tpc-book-page h2,
.tpc-book-page h3 {
  color: var(--tpc-purple-dark);
  line-height: 1.18;
}

.tpc-eyebrow {
  color: var(--tpc-purple);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .12em;
  margin-bottom: .35rem;
  text-transform: uppercase;
}

.tpc-hero,
.tpc-section {
  border-radius: 26px;
  margin: 0 0 2rem;
  overflow: hidden;
  padding: clamp(1.4rem, 4vw, 3.5rem);
}

.tpc-hero {
  align-items: center;
  background: linear-gradient(135deg, var(--tpc-cream), #f8e6ff);
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, .8fr);
}

.tpc-hero figure,
.tpc-section figure {
  margin: 0;
}

.tpc-hero img,
.tpc-section img,
.tpc-card img {
  border-radius: 18px;
  display: block;
  height: auto;
  width: 100%;
}

.tpc-question,
.tpc-lede {
  color: var(--tpc-purple-dark);
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  font-weight: 750;
}

.tpc-section--what {
  align-items: center;
  background: var(--tpc-sky);
  display: grid;
  gap: 2.5rem;
  grid-template-columns: minmax(0, 1.25fr) minmax(220px, .75fr);
}

.tpc-section--origin { background: #f5effa; }
.tpc-section--find { background: var(--tpc-cream); }
.tpc-wide-art { margin-top: 1.5rem !important; }

.tpc-card-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tpc-card {
  background: var(--tpc-card);
  border: 1px solid rgba(77, 43, 114, .13);
  border-radius: 20px;
  box-shadow: var(--tpc-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tpc-card > div {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.35rem;
}
.tpc-card--book > img {
  aspect-ratio: 16 / 10;
  background: #f2ecf8;
  border-radius: 0;
  height: auto;
  object-fit: contain;
  object-position: center;
  padding: 1rem;
}
.tpc-card .button { align-self: flex-start; margin-top: auto; }
.tpc-card__media { display: block; overflow: hidden; }
.tpc-card__media img {
  aspect-ratio: 16 / 10;
  border-radius: 0;
  height: auto;
  object-fit: cover;
  object-position: top center;
  transition: transform .2s ease;
}
.tpc-card__media:hover img { transform: scale(1.02); }
.tpc-card .button,
.tpc-reader-launch .button { font-size: 1rem; min-height: 44px; padding: .7em 1.2em; }

.tpc-book-page { max-width: 850px; }
.tpc-book-page > section { margin-top: 2.25rem; }
.tpc-book-page li { margin-bottom: .55rem; }
.tpc-back-link a { font-weight: 700; text-decoration: none; }
.tpc-more { background: var(--tpc-cream); border-radius: 20px; padding: 1.4rem 1.6rem; }

.tpc-reader-launch {
  align-items: center;
  background: linear-gradient(135deg, var(--tpc-purple-dark), var(--tpc-purple));
  border-radius: 20px;
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin: 2rem 0;
  padding: 1.5rem;
  text-align: center;
}
.tpc-reader-launch p { margin: 0; }
.tpc-read-now { background: var(--tpc-gold) !important; color: #21132f !important; font-weight: 800; }

.tpc-reader[hidden] { display: none !important; }
.tpc-reader {
  background: rgba(14, 9, 22, .96);
  inset: 0;
  padding: clamp(.4rem, 1.5vw, 1rem);
  position: fixed;
  z-index: 2147483647;
}
.tpc-reader__shell { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; height: 100%; }
.tpc-reader__header { align-items: center; display: flex; gap: 1rem; justify-content: space-between; }
.tpc-reader__header h2 { color: #fff; font-size: clamp(1rem, 2vw, 1.45rem); margin: 0; }
.tpc-reader button {
  background: #fff;
  border: 2px solid transparent;
  border-radius: 9px;
  color: #241733;
  cursor: pointer;
  font-size: .95rem;
  font-weight: 700;
  min-height: 44px;
  padding: .55rem .8rem;
}
.tpc-reader button:focus-visible,
.tpc-hub a:focus-visible,
.tpc-book-page a:focus-visible { outline: 3px solid var(--tpc-gold); outline-offset: 3px; }
.tpc-reader button:disabled { cursor: not-allowed; opacity: .42; }
.tpc-reader__header-actions,
.tpc-reader__controls,
.tpc-reader__zoom { display: flex; gap: .5rem; }
.tpc-reader__status { color: #fff; min-height: 1.5rem; padding: .25rem 0; text-align: center; }
.tpc-reader__stage {
  align-items: center;
  cursor: grab;
  display: flex;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  padding: .25rem;
  touch-action: none;
}
.tpc-reader[data-zoomed="true"] .tpc-reader__stage { cursor: grabbing; }
.tpc-reader__pages {
  align-items: center;
  display: flex;
  gap: clamp(2px, .5vw, 8px);
  height: 100%;
  justify-content: center;
  transform-origin: center;
  width: 100%;
  will-change: transform;
}
.tpc-reader__page {
  align-items: center;
  background: #fff;
  box-shadow: 0 10px 35px rgba(0, 0, 0, .42);
  display: flex;
  justify-content: center;
  max-height: 100%;
  max-width: calc(50% - 4px);
}
.tpc-reader[data-effective-mode="single"] .tpc-reader__page { max-width: 100%; }
.tpc-reader__page canvas { display: block; height: auto; max-height: 100%; max-width: 100%; width: auto; }
.tpc-reader__toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: .55rem 1rem;
  justify-content: center;
  padding-top: .55rem;
}
.tpc-reader__controls,
.tpc-reader__zoom { align-items: center; justify-content: center; }
.tpc-reader__controls span { color: #fff; min-width: 8.5rem; text-align: center; }
.tpc-reader__zoom output { color: #fff; min-width: 3.7rem; text-align: center; }

body.tpc-reader-open { overflow: hidden; }
html.tpc-reader-open > ins.adsbygoogle.adsbygoogle-noablate,
html:has(body.tpc-reader-open) > ins.adsbygoogle.adsbygoogle-noablate { display: none !important; }

@media (max-width: 760px) {
  .tpc-hero,
  .tpc-section--what,
  .tpc-card-grid { grid-template-columns: 1fr; }
  .tpc-hero figure,
  .tpc-section--what figure { margin-inline: auto; max-width: 380px; }
  .tpc-reader__header { align-items: flex-start; }
  .tpc-reader__header-actions button { font-size: .82rem; padding-inline: .55rem; }
  .tpc-reader__controls { display: grid; grid-template-columns: repeat(4, 1fr); }
  .tpc-reader__controls span { grid-column: 1 / -1; grid-row: 1; min-width: 0; }
  .tpc-reader__controls button,
  .tpc-reader__zoom button { font-size: .82rem; padding-inline: .55rem; }
}

@media (prefers-reduced-motion: reduce) {
  .tpc-reader *, .tpc-hub *, .tpc-book-page * { scroll-behavior: auto !important; transition: none !important; }
}
