/* =====================================================================
   de.css — page-specific styles for prova/de/domiciles.html
   ---------------------------------------------------------------------
   Builds on base.css + pages.css (shared jabbah system). Adds only what
   this page needs: a quieter text header (no photographic hero), the
   white card that frames the embedded animation, the planet-centric
   scheme table, and the Ptolemy disclosure (details/summary).
   Colours come from base.css variables (--c-* cool, --w-* warm).
   ===================================================================== */

/* ---- 1. QUIET PAGE HEADER (text left, ornament right) -------------- */
.page-head {
  position: relative;
  background: var(--c-cloud);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}
.page-head__inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.25rem) var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(1.5rem, 5vw, 4rem);
}
.page-head__text { max-width: 40rem; }
.page-head__eyebrow {
  font-family: 'Noto Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--w-terra);
  margin: 0 0 0.9rem;
  text-align: left;
}
.page-head__title {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 500;
  font-style: normal;            /* upright: quieter than the hero's italic */
  font-size: clamp(1.9rem, 4.4vw, 3.05rem);
  line-height: 1.1;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin: 0 0 1.1rem;
  text-align: left;
  text-wrap: balance;
}
.page-head__sub {
  font-family: 'Newsreader', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.1rem, 2.1vw, 1.4rem);
  line-height: 1.5;
  color: var(--c-harbor);
  margin: 0;
  max-width: 36rem;
  text-align: left;
  text-wrap: pretty;
}
.page-head__art { flex: none; justify-self: end; }
.page-head__art img {
  width: clamp(160px, 22vw, 268px);
  height: auto;
  opacity: 0.95;
}
@media (max-width: 760px) {
  .page-head__inner { grid-template-columns: 1fr; }
  .page-head__art { display: none; }
}

/* ---- 2. ANIMATION BAND — same width as the reading column ---------- */
/* The inner wrapper matches .page (880px), so the animation frame lines
   up edge-to-edge with the white reading panels below it. */
.anim-band {
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  padding: clamp(2rem, 4.5vw, 3.25rem) 0 clamp(1.5rem, 3vw, 2.25rem);
}
.anim-band__inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.anim-intro {
  background: var(--surface);
  border: 1px solid var(--rule-soft);
  padding: clamp(1.5rem, 3.5vw, 2.4rem);
  margin-bottom: clamp(1.2rem, 2.5vw, 1.75rem);
}
/* pull the first reading section closer to the animation band */
.page { padding-top: clamp(2rem, 4vw, 3rem); }
.anim-intro .section-heading { margin-bottom: 1rem; }
.anim-card__hint {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: 'Noto Sans', sans-serif;
  font-size: 0.82rem;
  color: var(--text-mute);
  margin: 0.9rem 0 0;
}
.anim-card__hint::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--w-amber);
  flex: none;
}
.anim-frame {
  display: block;
  width: 100%;
  border: 0;
  margin: 0;
  background: #f4f6f8;
  /* height is set by JS (same-origin auto-fit); fallback for no-JS: */
  min-height: 520px;
}

/* ---- 3. PLANET-CENTRIC SCHEME TABLE --------------------------------- */
.scheme-table-wrap { overflow-x: auto; margin: 1.6rem 0 0.4rem; }
.scheme-table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Noto Sans', sans-serif;
  font-size: 0.8rem;
  min-width: 540px;
}
.scheme-table thead th {
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute);
  padding: 0.4rem 0.65rem;
  border-bottom: 1.5px solid var(--ink);
  text-align: left;
  white-space: nowrap;
}
.scheme-table tbody td,
.scheme-table tbody th {
  padding: 0.46rem 0.65rem;
  border-bottom: 1px solid var(--rule);
  color: var(--text-soft);
  text-align: left;
  font-weight: 400;
  vertical-align: middle;
}
.scheme-table tbody tr:hover td,
.scheme-table tbody tr:hover th { background: var(--w-cream); }
.scheme-table tbody tr:last-child td,
.scheme-table tbody tr:last-child th { border-bottom: none; }
.scheme-table .num {
  font-variant-numeric: tabular-nums;
  color: var(--text-faint);
  font-weight: 700;
  width: 2.4rem;
}
.scheme-table .planet {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}
.scheme-table .opp {
  font-weight: 600;
  color: var(--c-harbor);
}
.scheme-table caption {
  caption-side: bottom;
  text-align: left;
  font-family: 'Noto Sans', sans-serif;
  font-size: 0.73rem;
  color: var(--text-mute);
  margin-top: 0.9rem;
  line-height: 1.5;
}

/* ---- 3b. PRIMARY / SECONDARY PATTERN — tree diagrams ---------------- */
.pattern-tree {
  font-family: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas,
               "Liberation Mono", monospace;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-soft);
  background: var(--c-cloud);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--c-harbor);
  padding: 1.05rem 1.3rem;
  margin: 0 0 1.4rem;
  overflow-x: auto;
  white-space: pre;
  text-align: left;
  -moz-tab-size: 2;
  tab-size: 2;
}
.pattern-tree b { font-weight: 700; color: var(--ink); }

/* ---- 4. PTOLEMY DISCLOSURE (details / summary) ---------------------- */
.tetrabiblos {
  background: var(--box-editorial, #f8f5ee);
  border: 1px solid var(--rule-warm);
  border-left: 3px solid var(--w-amber);
  padding: clamp(1.4rem, 3vw, 2rem) clamp(1.5rem, 3.5vw, 2.4rem);
  margin: 1.6rem 0 0;
}
.tetrabiblos__src {
  font-family: 'Noto Sans', sans-serif;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text-mute);
  margin: 0 0 1.4rem;
}
.tetrabiblos__title {
  font-family: 'Newsreader', Georgia, serif;
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  font-weight: 500;
  font-style: italic;
  color: var(--ink);
  margin: 0 0 1rem;
}
.tetrabiblos p {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 1.06rem;
  line-height: 1.72;
  color: var(--c-ink);
  margin: 0 0 1.05rem;
  text-wrap: pretty;
}
.tetrabiblos p:last-child { margin-bottom: 0; }
.tetrabiblos details { margin-top: 0.4rem; }
.tetrabiblos details[open] { margin-top: 1.1rem; }
.tetrabiblos summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-family: 'Noto Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--w-terra);
  padding: 0.3rem 0;
  user-select: none;
}
.tetrabiblos summary::-webkit-details-marker { display: none; }
.tetrabiblos summary::after {
  content: "";
  width: 0; height: 0;
  border-left: 5px solid currentColor;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform 0.2s ease;
}
.tetrabiblos details[open] summary::after { transform: rotate(90deg); }
.tetrabiblos summary:hover { color: var(--w-brick); }
.tetrabiblos details[open] summary { margin-bottom: 1rem; }

/* ---- 5. CLOSING NOTE ------------------------------------------------ */
.panel--closing {
  border-top: 3px solid var(--w-terra);
}
.panel--closing .section-heading { font-style: italic; }
.closing-lede {
  font-family: 'Newsreader', Georgia, serif;
  font-style: italic;
  font-size: clamp(1.2rem, 2.3vw, 1.5rem);
  line-height: 1.5;
  color: var(--c-deep);
  margin: 0 0 1.2rem;
  text-wrap: pretty;
}

/* ---- 6. small helpers ----------------------------------------------- */
.lead-rule {
  border: none;
  border-top: 1px solid var(--rule);
  max-width: 880px;
  margin: 0 auto;
}
ol.rule-steps {
  margin: 0 0 1.2rem;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
ol.rule-steps li {
  position: relative;
  padding-left: 2.4rem;
  margin-bottom: 0.7rem;
  font-family: 'Noto Sans', sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-soft);
}
ol.rule-steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 1.6rem;
  height: 1.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.74rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--w-rust);
  background: var(--w-sand);
  border-radius: 50%;
}
ol.rule-steps strong { color: var(--ink); font-weight: 600; }
