/* public/css/book_policy.css
   Book-reader layout for the legal policy pages (/terms, /privacy, /refund)
   plus the global lens-selection highlight accent applied by public/js/ai/lens.js. */

/* ------------------------------------------------------------------ */
/* Global lens highlight (transient overlay).                          */
/* !important is intentional: the class is applied by JS to arbitrary  */
/* page elements and must win over page/component styles while active. */
/* ------------------------------------------------------------------ */
.lens-highlighted {
  background-color: rgba(212, 175, 55, 0.18) !important; /* gold wash */
  border-left: 3px solid #d4af37 !important;
  border-radius: 2px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* ------------------------------------------------------------------ */
/* Scoped book reader                                                   */
/* ------------------------------------------------------------------ */
.book-reader-container {
  --br-bg: #faf7f2;
  --br-ink: #2b0b10;
  --br-accent: #4a121a;
  --br-cream: #e4d8b4;
  --br-muted: #8a6a55;
  --br-rule: rgba(74, 18, 26, 0.18);

  background: var(--br-bg);
  color: var(--br-ink);
  font-family: "Unna";
  font-size: 1rem;
  line-height: 1.65;
  letter-spacing: 0.01em;

  width: min(840px, 100%);
  margin: 15vh auto 0;
  padding: 2.75rem 2.25rem 8rem;
  min-height: 85vh;
  box-shadow: 0 10px 24px rgba(43, 11, 16, 0.12);
}

.book-reader-container *,
.book-reader-container *::before,
.book-reader-container *::after {
  box-sizing: border-box;
}

/* Title + metadata grid */
.book-reader__title {
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--br-accent);
  margin: 0 0 1.5rem;
}

.book-reader__meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--br-rule);
  border: 1px solid var(--br-rule);
  border-radius: 8px;
  overflow: hidden;
  margin: 0 0 1.75rem;
}

.book-reader__meta-item {
  background: var(--br-bg);
  padding: 0.7rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.book-reader__meta-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--br-muted);
}

.book-reader__meta-value {
  font-size: 0.95rem;
  color: var(--br-ink);
}

/* Prose */
.book-reader__lede,
.book-reader__section p {
  margin: 0 0 1rem;
  text-align: justify;
  text-align-last: left;
}

.book-reader__section {
  margin: 0 0 2.5rem;
}

.book-reader__heading {
  font-size: clamp(1.25rem, 2.5vw, 1.55rem);
  font-weight: 600;
  color: var(--br-accent);
  letter-spacing: 0.01em;
  margin: 2.25rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--br-rule);
}

.book-reader__subheading {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--br-accent);
  margin: 1.5rem 0 0.75rem;
}

.book-reader__section ul,
.book-reader__section ol {
  margin: 0 0 1rem;
  padding-left: 1.3rem;
}

.book-reader__section li {
  margin: 0 0 0.55rem;
}

.book-reader__section strong {
  color: var(--br-accent);
  font-weight: 600;
}

.book-reader__section a {
  color: var(--br-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Privacy cookie table */
.book-reader__table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
}

.book-reader__table th,
.book-reader__table td {
  border: 1px solid var(--br-rule);
  padding: 0.6rem 0.7rem;
  text-align: left;
  vertical-align: top;
}

.book-reader__table th {
  background: rgba(74, 18, 26, 0.06);
  color: var(--br-accent);
  font-weight: 600;
}

/* Responsive */
@media (max-width: 640px) {
  .book-reader-container {
    padding: 1.75rem 1.25rem 6rem;
  }
}
