/* ── 14 Conhecer a Bíblia (#conhecer) ───────────────────────────────────── */
/* Two tabs (Personagens, Lugares), three cards each. Every card is the app's
   subject page (TopicScreen) as a scrolling screen: the engraving whole and
   uncropped, the torn folha (the DS borda-rasgada), the kind and the name, the
   "✦ Ad Scriptura" card with the wrap-up, then Família (FamilyTree's grid) or
   Localização (a baked relief map). The cards are written by
   web/scripts/gen-conhecer.mjs; ./conhecer.js switches the tabs. Phones: the
   tabs over a sideways, snapping row of cards. */
.l-know {
  background: var(--bg-2);
  padding: clamp(88px, 12vh, 130px) clamp(28px, 6vw, 80px);
}
.l-know-in {
  max-width: 1240px;
  margin: 0 auto;
}
.l-know-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px 60px;
  flex-wrap: wrap;
  margin-bottom: clamp(24px, 4vh, 40px);
}
.l-know-tabs {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid var(--separator);
}
.l-know-tab {
  position: relative;
  min-height: 48px;
  padding: 10px 2px;
  border: 0;
  background: none;
  font-family: var(--font-roman);
  font-weight: 700;
  font-size: 21px;
  color: var(--ink-3);
  cursor: pointer;
  transition: color 0.3s;
}
/* The underline travels in from the middle instead of switching. */
.l-know-tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.l-know-tab[aria-selected="true"] {
  color: var(--ink);
}
.l-know-tab[aria-selected="true"]::after {
  transform: none;
}
.l-know-tab:hover {
  color: var(--ink);
}
.l-know-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.l-know-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2vw, 28px);
}
.l-know-row[hidden] {
  display: none;
}

/* A screen: its own scroll, the folha's paper, a lifted shadow. */
.l-know-card {
  height: clamp(560px, 80vh, 780px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--rule-soft) transparent;
  background: var(--folha);
  border: 1px solid var(--edge);
  border-radius: 12px;
  box-shadow:
    0 1px 2px rgba(58, 47, 35, 0.18),
    0 34px 44px -30px rgba(30, 21, 14, 0.6);
}
.l-know-row.deal .l-know-card {
  animation: l-know-deal 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.l-know-row.deal .l-know-card:nth-child(2) {
  animation-delay: 90ms;
}
.l-know-row.deal .l-know-card:nth-child(3) {
  animation-delay: 180ms;
}
@keyframes l-know-deal {
  from {
    transform: translateY(34px) rotate(0.6deg);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.l-know-capa img {
  display: block;
  width: 100%;
  height: auto;
}

/* The torn folha rides up over the engraving's foot; its top 40 px are the
   tear (the DS strip's own height), so the paper's colour starts under it. */
.l-know-folha {
  position: relative;
  margin-top: -40px;
  padding: 0 18px 26px;
  background: linear-gradient(transparent 39px, var(--folha) 39px);
}
.l-know-torn {
  display: block;
  width: calc(100% + 36px);
  height: 40px;
  margin: 0 -18px;
  overflow: visible;
}
.l-know-torn .fibre {
  fill: #fffaf1;
  opacity: 0.85;
}
.l-know-torn .sheet {
  fill: var(--folha);
}

.l-know-head {
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
  padding: 10px 0 18px;
}
.l-know-head .kind {
  margin: 0;
  font-family: var(--font-roman);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
}
.l-know-head .name {
  margin: 0;
  font-family: var(--font-black);
  font-weight: 400;
  font-size: clamp(34px, 3vw, 44px);
  line-height: 1;
  color: var(--ink);
}
/* A theme or a doctrine heads its page on the paper itself, no engraving above
   it: the summary sits under the name, in italics (the app's useTopicHead). */
.l-know-card.plain .l-know-folha {
  margin-top: 0;
  padding-top: 30px;
  background: var(--folha);
}
.l-know-head .sum {
  margin: 4px 0 0;
  max-width: 30ch;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 17px;
  line-height: 1.4;
  color: var(--ink-2);
}
/* "Veja também": the related subjects as chips (TopicFacts). */
.l-know-related {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.l-know-related li {
  padding: 6px 12px;
  font-size: 15px;
  line-height: 1.3;
  color: var(--ink);
  border-radius: var(--radius-chip);
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.l-know-wrap {
  background: var(--card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.l-know-wrap .tabs {
  display: flex;
  gap: 18px;
  padding: 0 16px;
  border-bottom: 1px solid var(--separator);
  font-family: var(--font-roman);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink-3);
}
.l-know-wrap .tabs span {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 0 9px;
  border-bottom: 2px solid transparent;
}
.l-know-wrap .tabs .on {
  color: var(--ink);
  border-bottom-color: var(--accent);
}
.l-know-wrap .tabs svg {
  fill: var(--accent);
}
.l-know-wrap .prose {
  margin: 0;
  padding: 16px 16px 18px;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  text-wrap: pretty;
  hyphens: auto;
}
/* The drop cap is always blackletter (owner, 2026-11-17). */
.l-know-wrap .prose::first-letter {
  float: left;
  font-family: var(--font-black);
  font-weight: 400;
  font-size: 52px;
  line-height: 0.82;
  margin: 5px 8px 0 0;
  color: var(--accent);
}
.l-know-wrap .ref {
  color: var(--accent);
}

.l-know-sec {
  margin-top: 26px;
}
.l-know-sec h4 {
  margin: 0 0 10px;
  font-family: var(--font-roman);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.l-know-tree {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--rule-soft) transparent;
  background: var(--bg-2);
  border: 1.5px solid var(--separator);
  border-radius: var(--radius-card);
}
.l-know-tree:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.l-know-svg {
  display: block;
}
.l-know-svg .ln {
  stroke: var(--accent);
  stroke-opacity: 0.45;
  stroke-width: 1;
}
.l-know-svg .nd {
  fill: var(--card);
}
.l-know-svg .me {
  fill: var(--accent-fill);
}
.l-know-svg text {
  text-anchor: middle;
}
.l-know-svg .nd-t,
.l-know-svg .me-t {
  font-family: var(--font-body);
  font-size: 15px;
}
.l-know-svg .nd-t {
  fill: var(--ink);
}
.l-know-svg .me-t {
  fill: var(--on-accent);
  font-size: 17px;
}
.l-know-svg .nd-r {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  fill: var(--ink-3);
}

.l-know-map {
  position: relative;
  margin: 0;
  border: 1.5px solid var(--separator);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.l-know-map img {
  display: block;
  width: 100%;
  height: auto;
}
.l-know-map .pin {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -90%);
  overflow: visible;
}
.l-know-map .pin path {
  fill: var(--accent);
  stroke: var(--card);
  stroke-width: 1.5;
}
.l-know-map .pin circle {
  fill: var(--card);
}
.l-know-map .pin-shadow {
  fill: rgba(30, 21, 14, 0.32);
}
.l-know-map .place {
  position: absolute;
  left: calc(50% + 14px);
  top: calc(50% - 30px);
  padding: 1px 7px 2px;
  border-radius: 3px;
  background: rgba(252, 249, 243, 0.88);
  box-shadow: 0 2px 6px -3px rgba(30, 21, 14, 0.45);
  font-family: var(--font-roman);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
}
.l-know-map .attr {
  position: absolute;
  right: 6px;
  bottom: 4px;
  padding: 1px 4px;
  background: rgba(247, 242, 232, 0.8);
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--ink-2);
}

/* Without scripts the tabs do nothing: the people stand alone. */
:root:not([data-theme-choice]) .l-know-tabs {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .l-know-row.deal .l-know-card {
    animation: none;
  }
  .l-know-tab,
  .l-know-tab::after {
    transition: none;
  }
}

/* Phones: the tabs on top, the cards in a row that snaps, one at a time,
   the next one's edge in sight. */
@media (max-width: 820px) {
  .l-know {
    padding: 88px 0 46px;
  }
  .l-know-top {
    flex-direction: column;
    align-items: stretch;
    gap: 22px;
    padding: 0 20px;
  }
  /* Four indices share the width: tighter type, and the row spreads them edge to
     edge instead of pushing the page sideways. */
  .l-know-tabs {
    gap: 0;
    justify-content: space-between;
  }
  .l-know-tab {
    font-size: 17px;
  }
  .l-know-row {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 20px;
    /* The card's cast shadow reaches ~48 px under it: the row is a scroller, so it
       clips anything past its own padding. */
    padding: 6px 20px 52px;
    scrollbar-width: none;
  }
  .l-know-row::-webkit-scrollbar {
    display: none;
  }
  .l-know-card {
    flex: 0 0 min(86vw, 360px);
    height: min(76svh, 660px);
    scroll-snap-align: start;
  }
}
