/* ------------------------------------------------------------------
 * lod-editorial.css — about ecosystem, journal / insights, learn &
 * remedies, zodiac, FAQ, contact, legal pages.
 * Loaded after lod.css. Use ONLY tokens from lod.css. No new colour
 * literals, no !important.
 *
 *   1  Page shell
 *   2  Breadcrumbs
 *   3  Editorial hero
 *   4  Article layout + sticky table of contents
 *   5  Long-form prose
 *   6  Tables
 *   7  Callouts & pull-quotes
 *   8  Fact strips, chips & tags
 *   9  FAQ accordion
 *  10  Related reading + closing CTA
 *  11  Hub / index grids
 *  12  About ecosystem
 *  13  Journal index
 *  14  FAQ page
 *  15  Contact page
 *  16  Legal pages
 *  17  Motion & reduced motion
 * ------------------------------------------------------------------ */

/* ---------- 1. Page shell ---------------------------------------- */
.ed-page {
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
.ed-page *, .ed-page *::before, .ed-page *::after { box-sizing: border-box; }
.ed-page img, .ed-page svg { display: block; max-width: 100%; }
.ed-page img { height: auto; }
.ed-page h1, .ed-page h2, .ed-page h3, .ed-page h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -.01em;
}
:where(.ed-page) a { color: inherit; }  /* :where() → zero specificity, so .btn and every component rule still wins (see lod.css §5) */
.ed-page .eyebrow {
  font-family: var(--font-body); font-size: var(--t-eyebrow); font-weight: 500;
  letter-spacing: .22em; text-transform: uppercase; color: var(--gold);
  display: block;
}
.ed-page .lede {
  font-family: var(--font-display);
  font-size: var(--t-body-l); line-height: 1.6; color: var(--ink-3); font-weight: 400;
  max-width: 62ch;
}

/* ---------- 2. Breadcrumbs --------------------------------------- */
.ed-page .ed-crumbs { border-bottom: 1px solid var(--line); background: var(--bg); }
.ed-page .crumb {
  font-family: var(--font-body); font-size: var(--t-caption);
  letter-spacing: .06em; color: var(--ink-muted);
  padding: var(--s-4) 0; display: flex; flex-wrap: wrap; align-items: center; gap: .1rem;
}
.ed-page .crumb a { color: var(--ink-muted); text-decoration: none; transition: color var(--t-fast) var(--ease); }
.ed-page .crumb a:hover { color: var(--gold); }
.ed-page .crumb span { color: var(--line-strong); margin: 0 .55rem; }

/* ---------- 3. Editorial hero ------------------------------------ */
.ed-page .ed-hero {
  padding-block: clamp(2.2rem, 1.4rem + 2.6vw, 4.2rem) clamp(1.6rem, 1rem + 1.8vw, 2.8rem);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--gold-soft), transparent 78%);
}
.ed-page .ed-hero-inner { max-width: var(--w-page); }
.ed-page .ed-hero h1 {
  font-size: var(--t-h1); line-height: 1.08; margin: var(--s-3) 0 0;
  max-width: 20ch; letter-spacing: -.015em;
}
.ed-page .ed-hero .lede { margin-top: var(--s-4); }
.ed-page .ed-meta {
  display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-3);
  margin-top: var(--s-5); align-items: center;
}
.ed-page .ed-meta .pill,
.ed-page .ed-hero .pill {
  font-family: var(--font-body); font-size: var(--t-caption); font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted);
  background: none; border: 0; border-radius: 0; padding: 0;
  display: inline-flex; align-items: center;
}
.ed-page .ed-meta .pill + .pill::before {
  content: ""; width: 3px; height: 3px; border-radius: 50%;
  background: var(--line-strong); margin-right: var(--s-3); display: inline-block;
}
.ed-page .ed-meta .pill strong { color: var(--gold); font-weight: 600; }
.ed-page .hero-ctas {
  display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-6);
}
.ed-page .zodiac-ring {
  display: flex; align-items: center; justify-content: center;
  width: 86px; height: 86px; border: 1px solid var(--line-strong); border-radius: 50%;
  margin-bottom: var(--s-4); color: var(--gold);
  background: var(--surface); box-shadow: var(--shadow-sm);
  font-family: var(--font-display); font-size: 2.1rem; line-height: 1;
}

/* ---------- 4. Article layout + table of contents ---------------- */
.ed-page .ed-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 4.5rem);
  padding-block: clamp(2rem, 1.2rem + 2.4vw, 3.6rem) var(--section-y);
  align-items: start;
}
@media (min-width: 1024px) {
  .ed-page .ed-layout { grid-template-columns: 236px minmax(0, 1fr); }
  .ed-page .ed-layout.is-solo { grid-template-columns: minmax(0, 1fr); }
}
.ed-page .ed-side { min-width: 0; }
@media (min-width: 1024px) {
  .ed-page .ed-side { position: sticky; top: 120px; max-height: calc(100vh - 160px); overflow-y: auto; }
}
.ed-page .ed-toc {
  border-top: 1px solid var(--line-strong);
  padding-top: var(--s-4);
}
.ed-page .ed-toc-title {
  font-family: var(--font-body); font-size: var(--t-eyebrow); font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase; color: var(--gold);
  margin: 0 0 var(--s-3);
}
.ed-page .ed-toc-toggle {
  display: none; width: 100%; align-items: center; justify-content: space-between;
  gap: var(--s-3); background: none; border: 0; padding: .2rem 0; cursor: pointer;
  font-family: var(--font-body); font-size: var(--t-eyebrow); font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase; color: var(--gold); text-align: left;
}
.ed-page .ed-toc-chev {
  width: .55rem; height: .55rem; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px); transition: transform var(--t-std) var(--ease);
}
.ed-page .ed-toc[data-open="true"] .ed-toc-chev { transform: rotate(225deg) translate(-2px, -2px); }
.ed-page .ed-toc-list { list-style: none; margin: 0; padding: 0; }
.ed-page .ed-toc-list li { margin: 0; }
.ed-page .ed-toc-link {
  display: block; padding: .42rem 0 .42rem var(--s-3);
  border-left: 1px solid var(--line);
  color: var(--ink-3); text-decoration: none;
  font-size: var(--t-small); line-height: 1.4;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.ed-page .ed-toc-link:hover { color: var(--gold); border-left-color: var(--line-strong); }
.ed-page .ed-toc-link.is-current { color: var(--ink); border-left-color: var(--gold); font-weight: 500; }
.ed-page .ed-toc-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: var(--r-sm); }

@media (max-width: 1023px) {
  .ed-page .ed-toc {
    border: 1px solid var(--line); border-radius: var(--r-md);
    background: var(--surface-muted); padding: var(--s-3) var(--s-4);
  }
  .ed-page .ed-toc-title { display: none; }
  .ed-page .ed-toc-toggle { display: flex; }
  .ed-page .ed-toc-list { display: none; margin-top: var(--s-3); }
  .ed-page .ed-toc[data-open="true"] .ed-toc-list { display: block; }
}

/* ---------- 5. Long-form prose ----------------------------------- */
.ed-page .ed-content { min-width: 0; max-width: 68ch; }
.ed-page .ed-index-body { padding-block: clamp(2rem, 1.2rem + 2.4vw, 3.6rem) var(--section-y); }

.ed-page .block { padding: 0; margin: 0; border: 0; }
.ed-page .ed-content > .block + .block { margin-top: var(--s-7); }
.ed-page .ed-index-body > .block + .block { margin-top: var(--s-8); }

.ed-page .block h2, .ed-page .ed-h2 {
  font-family: var(--font-display); font-size: var(--t-h2); font-weight: 500;
  line-height: 1.18; color: var(--ink); margin: 0 0 var(--s-4);
  scroll-margin-top: 128px; letter-spacing: -.012em;
}
.ed-page .block h3 {
  font-family: var(--font-display); font-size: var(--t-h3); font-weight: 600;
  color: var(--ink); margin: var(--s-6) 0 var(--s-3); scroll-margin-top: 128px;
}
.ed-page .block h4 {
  font-family: var(--font-body); font-size: var(--t-h4); font-weight: 600;
  color: var(--ink); margin: var(--s-5) 0 var(--s-2); letter-spacing: 0;
}
.ed-page .block p {
  font-size: var(--t-body-l); font-weight: 400; line-height: 1.78;
  color: var(--ink-2); margin: 0 0 var(--s-4); max-width: 68ch;
}
.ed-page .block p:last-child { margin-bottom: 0; }
.ed-page .block ul, .ed-page .block ol { margin: 0 0 var(--s-4); padding-left: 1.35rem; max-width: 68ch; }
.ed-page .block li { margin-bottom: var(--s-2); line-height: 1.72; color: var(--ink-2); }
.ed-page .block li:last-child { margin-bottom: 0; }
.ed-page .block strong { color: var(--ink); font-weight: 600; }
.ed-page .block em { font-style: italic; }
.ed-page .block a {
  color: var(--gold); text-decoration: underline;
  text-underline-offset: 3px; text-decoration-thickness: 1px;
  transition: color var(--t-fast) var(--ease);
}
.ed-page .block a:hover { color: var(--gold-bright); }
.ed-page .block hr { height: 1px; background: var(--line); border: 0; margin-block: var(--s-6); }

/* Refined opening: the first paragraph of the article sets the tone. */
.ed-page .ed-content > .block:first-child > p:first-child {
  font-size: clamp(1.12rem, 1.02rem + .5vw, 1.34rem);
  line-height: 1.66; color: var(--ink);
}
.ed-page .ed-content > .block:first-child > p:first-child::first-letter {
  font-family: var(--font-display); font-weight: 500;
  float: left; font-size: 3.5em; line-height: .84;
  padding: .06em .1em 0 0; margin-right: .04em;
  color: var(--gold);
}
@media (max-width: 480px) {
  .ed-page .ed-content > .block:first-child > p:first-child::first-letter { font-size: 3em; }
}

/* ---------- 6. Tables -------------------------------------------- */
.ed-page .ed-tablewrap {
  max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
  margin: var(--s-5) 0; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface);
}
.ed-page .ed-tablewrap:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.ed-page .ed-tablewrap table, .ed-page table.tbl {
  width: 100%; min-width: 34rem; border-collapse: collapse; margin: 0;
  font-family: var(--font-body); font-size: var(--t-small);
}
.ed-page .ed-tablewrap th, .ed-page .ed-tablewrap td,
.ed-page table.tbl th, .ed-page table.tbl td {
  text-align: left; padding: .85rem 1.1rem; border-bottom: 1px solid var(--line);
  color: var(--ink-2); font-weight: 400; line-height: 1.55; vertical-align: top;
}
.ed-page .ed-tablewrap thead th, .ed-page table.tbl thead th {
  color: var(--ink); font-weight: 600; font-size: var(--t-caption);
  letter-spacing: .1em; text-transform: uppercase;
  background: var(--surface-muted); border-bottom: 1px solid var(--line-strong);
}
.ed-page .ed-tablewrap tbody tr:last-child td { border-bottom: 0; }
.ed-page .ed-tablewrap tbody tr:hover td { background: var(--gold-soft); }

/* ---------- 7. Callouts & pull-quotes ---------------------------- */
.ed-page .callout, .ed-page .ed-pull {
  border: 0; border-left: 2px solid var(--gold);
  background: var(--gold-soft); border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: var(--s-5) var(--s-5); margin: var(--s-6) 0; max-width: 68ch;
}
.ed-page .callout p, .ed-page .ed-pull p {
  font-family: var(--font-display); font-size: var(--t-h3); line-height: 1.5;
  color: var(--ink); font-style: italic; margin: 0; max-width: none;
}
.ed-page .callout p strong, .ed-page .ed-pull p strong { color: var(--ink); font-style: normal; }
.ed-page .note { border-left: 2px solid var(--gold); background: var(--gold-soft); padding: var(--s-4) var(--s-5); border-radius: 0 var(--r-md) var(--r-md) 0; margin: var(--s-5) 0; }
.ed-page .quote-by { font-family: var(--font-body); font-size: var(--t-caption); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-muted); margin-top: var(--s-4); font-style: normal; }

/* ---------- 8. Fact strips, chips & tags ------------------------- */
.ed-page .facts {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px; margin: var(--s-6) 0 0; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden;
}
.ed-page .fact { border: 0; border-radius: 0; padding: var(--s-4); background: var(--surface); }
.ed-page .fact .k {
  font-family: var(--font-body); font-size: var(--t-eyebrow); letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-muted); font-weight: 500;
}
.ed-page .fact .val {
  font-family: var(--font-display); font-size: var(--t-h4); color: var(--ink);
  margin-top: .35rem; line-height: 1.3;
}
@media (max-width: 900px) { .ed-page .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.ed-page .tags { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: var(--s-3) 0 var(--s-5); }
.ed-page .tag {
  font-family: var(--font-body); font-size: var(--t-caption); letter-spacing: .04em;
  border: 1px solid var(--line-strong); border-radius: var(--r-pill);
  padding: .4rem 1rem; color: var(--ink-3); background: var(--surface);
  text-decoration: none; transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.ed-page a.tag:hover, .ed-page a.chip:hover { border-color: var(--gold); color: var(--gold); }
.ed-page .ed-chiprow { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: var(--s-3) 0 var(--s-5); }

/* legacy inline TOC from older builds — kept harmless */
.ed-page .toc { border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-4) var(--s-5); background: var(--surface-muted); margin: var(--s-5) 0; }
.ed-page .toc h4 { font-family: var(--font-body); font-size: var(--t-eyebrow); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin-bottom: var(--s-2); }
.ed-page .toc a { display: block; color: var(--ink-3); text-decoration: none; font-size: var(--t-small); padding: .22rem 0; }
.ed-page .toc a:hover { color: var(--gold); }

/* ---------- 9. FAQ accordion ------------------------------------- */
.ed-page .faq { border-top: 1px solid var(--line); margin-top: var(--s-4); }
.ed-page .faq-item { border-bottom: 1px solid var(--line); }
.ed-page .faq-q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  color: var(--ink); font-family: var(--font-display); font-size: var(--t-h4);
  font-weight: 600; line-height: 1.4; padding: var(--s-4) 2.4rem var(--s-4) 0;
  position: relative; display: block;
  transition: color var(--t-fast) var(--ease);
}
.ed-page .faq-q:hover { color: var(--gold); }
.ed-page .faq-q:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; border-radius: var(--r-sm); }
.ed-page .faq-q::after {
  content: "+"; position: absolute; right: .2rem; top: 50%; transform: translateY(-50%);
  color: var(--gold); font-family: var(--font-body); font-size: 1.35rem; font-weight: 300; line-height: 1;
}
.ed-page .faq-item.open .faq-q::after { content: "–"; }
.ed-page .faq-item.open .faq-q { color: var(--gold); }
.ed-page .faq-a { max-height: 0; overflow: hidden; transition: max-height var(--t-std) var(--ease); }
.ed-page .faq-item.open .faq-a { max-height: 90rem; }
.ed-page .faq-a-inner {
  padding: 0 var(--s-6) var(--s-5) 0; font-size: var(--t-body);
  line-height: 1.75; color: var(--ink-2); max-width: 66ch;
}
.ed-page .faq-a-inner a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.ed-page .faq-item[hidden] { display: none; }

/* ---------- 10. Related reading + closing CTA -------------------- */
.ed-page .related {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: var(--s-4); margin-top: var(--s-5);
}
.ed-page .related a {
  text-decoration: none; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s-5); background: var(--surface); display: flex; flex-direction: column; gap: .3rem;
  transition: border-color var(--t-std) var(--ease), box-shadow var(--t-std) var(--ease), transform var(--t-std) var(--ease);
}
.ed-page .related a:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.ed-page .related .r-for {
  font-family: var(--font-body); font-size: var(--t-eyebrow); letter-spacing: .18em;
  text-transform: uppercase; color: var(--gold); font-weight: 500;
}
.ed-page .related .r-title { font-family: var(--font-display); font-size: var(--t-h4); color: var(--ink); margin-top: .3rem; line-height: 1.3; }
.ed-page .related .r-price { font-family: var(--font-body); font-size: var(--t-caption); color: var(--ink-muted); margin-top: .35rem; letter-spacing: .04em; }

.ed-page .cta-band {
  text-align: center; padding-block: var(--section-y);
  border-top: 1px solid var(--line); background: var(--bg-2);
}
.ed-page .cta-band .wrap { max-width: var(--w-text); margin-inline: auto; padding-inline: var(--pad-x); }
.ed-page .cta-band h2 { font-family: var(--font-display); font-size: var(--t-h2); font-weight: 500; margin: 0 0 var(--s-4); }
.ed-page .cta-band p { max-width: 60ch; margin: 0 auto var(--s-6); color: var(--ink-3); font-size: var(--t-body-l); line-height: 1.7; }
.ed-page .cta-band .btn + .btn { margin-left: var(--s-2); }

/* ---------- 11. Hub / index grids -------------------------------- */
.ed-page .hub-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--s-5); margin-top: var(--s-5);
}
.ed-page .hub-card {
  text-decoration: none; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(1.4rem, 1rem + 1vw, 2rem); background: var(--surface);
  display: flex; flex-direction: column; align-items: flex-start;
  transition: border-color var(--t-std) var(--ease), box-shadow var(--t-std) var(--ease), transform var(--t-std) var(--ease);
}
.ed-page .hub-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.ed-page .hub-card .r-for {
  font-family: var(--font-body); font-size: var(--t-eyebrow); letter-spacing: .18em;
  text-transform: uppercase; color: var(--gold); font-weight: 500;
}
.ed-page .hub-card h3 { font-family: var(--font-display); font-size: var(--t-h3); font-weight: 600; color: var(--ink); margin: var(--s-2) 0 var(--s-3); line-height: 1.25; }
.ed-page .hub-card p { font-size: var(--t-small); font-weight: 400; color: var(--ink-3); line-height: 1.65; margin: 0 0 var(--s-4); flex: 1; }
.ed-page .hub-card .r-price {
  font-family: var(--font-body); font-size: var(--t-caption); font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--gold);
}
.ed-page .hub-card .zodiac-ring { width: 58px; height: 58px; font-size: 1.5rem; margin-bottom: var(--s-3); }

/* ---------- 12. About ecosystem ---------------------------------- */
.ed-about .ed-portrait-split {
  display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: clamp(2rem, 4vw, 4rem); align-items: center;
}
@media (max-width: 860px) { .ed-about .ed-portrait-split { grid-template-columns: minmax(0, 1fr); } }
.ed-about .ed-portrait-fig { margin: 0; }
.ed-about .ed-portrait {
  border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line);
  background: var(--surface-muted); aspect-ratio: 4/5; box-shadow: var(--shadow-md);
}
.ed-about .ed-portrait img { width: 100%; height: 100%; object-fit: cover; }
.ed-about .ed-portrait-cap {
  font-size: var(--t-caption); color: var(--ink-muted); margin-top: var(--s-3);
  letter-spacing: .06em; text-align: center;
}
.ed-about .ed-signature { font-family: var(--font-script); font-size: 2.2rem; color: var(--gold); line-height: 1.1; margin-top: var(--s-5); }

/* ---------- 13. Journal index ------------------------------------ */
.ed-journal .ed-feature {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-5);
  border: 1px solid var(--line-strong); border-radius: var(--r-lg);
  background: linear-gradient(160deg, var(--gold-soft), transparent 62%), var(--surface);
  padding: clamp(1.6rem, 1.1rem + 2vw, 3rem); text-decoration: none;
  transition: box-shadow var(--t-std) var(--ease), transform var(--t-std) var(--ease);
}
.ed-journal .ed-feature:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.ed-journal .ed-feature h2 { font-size: var(--t-h1); line-height: 1.1; margin: var(--s-3) 0 var(--s-4); max-width: 20ch; }
.ed-journal .ed-feature p { font-family: var(--font-display); font-size: var(--t-body-l); color: var(--ink-3); line-height: 1.6; max-width: 58ch; margin: 0 0 var(--s-5); }
.ed-journal .ed-feature .r-price { font-family: var(--font-body); font-size: var(--t-caption); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.ed-journal .ed-featline {
  display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-6);
}
.ed-journal .ed-featline span {
  font-family: var(--font-body); font-size: var(--t-eyebrow); font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; color: var(--gold); white-space: nowrap;
}
.ed-journal .ed-featline::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }

/* ---------- 14. FAQ page ----------------------------------------- */
.ed-faq .ed-faqtools {
  display: flex; flex-direction: column; gap: var(--s-4);
  padding: var(--s-5); border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); margin-bottom: var(--s-7);
}
.ed-faq .ed-search { position: relative; }
.ed-faq .ed-search input {
  width: 100%; font-family: var(--font-body); font-size: var(--t-body);
  color: var(--ink); background: var(--bg); border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); padding: .85rem 1rem;
}
.ed-faq .ed-search input::placeholder { color: var(--ink-muted); }
.ed-faq .ed-search input:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
.ed-faq .ed-filters { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.ed-faq .ed-filters .chip { cursor: pointer; font-family: var(--font-body); }
.ed-faq .ed-count { font-size: var(--t-caption); color: var(--ink-muted); letter-spacing: .08em; text-transform: uppercase; }
.ed-faq .ed-empty { padding: var(--s-6) 0; color: var(--ink-3); font-size: var(--t-body-l); }
.ed-faq .ed-index-body > .block[hidden] { display: none; }

/* ---------- 15. Contact page ------------------------------------- */
.ed-contact .ed-channels {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: var(--s-4);
}
.ed-contact .ed-channel {
  display: flex; flex-direction: column; gap: .35rem; text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-5);
  background: var(--surface);
  transition: border-color var(--t-std) var(--ease), box-shadow var(--t-std) var(--ease), transform var(--t-std) var(--ease);
}
.ed-contact .ed-channel:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.ed-contact .ed-channel .k { font-family: var(--font-body); font-size: var(--t-eyebrow); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); font-weight: 500; }
.ed-contact .ed-channel .t { font-family: var(--font-display); font-size: var(--t-h3); color: var(--ink); line-height: 1.25; }
.ed-contact .ed-channel .v { font-size: var(--t-small); color: var(--ink-3); }
.ed-contact .ed-office {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .85fr);
  gap: clamp(1.5rem, 3vw, 3rem); align-items: start;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface-muted); padding: clamp(1.5rem, 1rem + 1.6vw, 2.4rem);
}
@media (max-width: 760px) { .ed-contact .ed-office { grid-template-columns: minmax(0, 1fr); } }
.ed-contact .ed-office-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-5); }
.ed-contact .ed-office-card dl { margin: 0; display: grid; gap: var(--s-4); }
.ed-contact .ed-office-card dt { font-family: var(--font-body); font-size: var(--t-eyebrow); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); font-weight: 500; }
.ed-contact .ed-office-card dd { margin: .3rem 0 0; font-size: var(--t-body); color: var(--ink-2); line-height: 1.6; }

/* ---------- 16. Legal pages -------------------------------------- */
.ed-legal { max-width: var(--w-text); margin-inline: auto; padding: clamp(2.4rem, 1.6rem + 3vw, 4.5rem) var(--pad-x) var(--section-y); }
.ed-legal .legal-eyebrow {
  font-family: var(--font-body); font-size: var(--t-eyebrow); font-weight: 500;
  letter-spacing: .22em; text-transform: uppercase; color: var(--gold);
}
.ed-legal h1 { font-family: var(--font-display); font-size: var(--t-h1); font-weight: 500; line-height: 1.1; color: var(--ink); margin: var(--s-3) 0 var(--s-3); letter-spacing: -.015em; }
.ed-legal .legal-updated {
  font-family: var(--font-body); font-size: var(--t-caption); color: var(--ink-muted);
  letter-spacing: .06em; border-bottom: 1px solid var(--line); padding-bottom: var(--s-5); margin-bottom: var(--s-6);
}
.ed-legal .legal-updated strong { color: var(--ink-3); }
.ed-legal .lead { font-family: var(--font-display); font-size: var(--t-body-l); color: var(--ink-3); line-height: 1.65; margin-bottom: var(--s-6); max-width: 62ch; }
.ed-legal h2 {
  font-family: var(--font-display); font-size: var(--t-h3); font-weight: 600; color: var(--ink);
  margin: var(--s-7) 0 var(--s-3); scroll-margin-top: 100px;
}
.ed-legal h3 { font-family: var(--font-display); font-size: var(--t-h4); font-weight: 600; color: var(--ink); margin: var(--s-5) 0 var(--s-2); }
.ed-legal p { font-size: var(--t-body); line-height: 1.78; color: var(--ink-2); margin: 0 0 var(--s-4); max-width: 70ch; }
.ed-legal ul, .ed-legal ol { margin: 0 0 var(--s-4) 1.35rem; padding: 0; max-width: 70ch; }
.ed-legal li { margin-bottom: var(--s-2); color: var(--ink-2); line-height: 1.72; }
.ed-legal strong { color: var(--ink); font-weight: 600; }
.ed-legal a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.ed-legal a:hover { color: var(--gold-bright); }
.ed-legal .ph { color: var(--ink); border-bottom: 1px dotted var(--line-strong); font-style: italic; }
.ed-legal .legal-callout {
  border: 1px solid var(--line); border-left: 2px solid var(--gold); border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: var(--s-4) var(--s-5); margin: var(--s-5) 0; background: var(--gold-soft); font-size: var(--t-small);
}
.ed-legal .legal-callout p { font-size: var(--t-small); margin-bottom: var(--s-2); }
.ed-legal .legal-callout p:last-child { margin-bottom: 0; }
.ed-legal .legal-toc {
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-5) var(--s-6);
  margin-bottom: var(--s-7); background: var(--surface);
}
.ed-legal .legal-toc h2 {
  margin: 0 0 var(--s-3); font-family: var(--font-body); font-size: var(--t-eyebrow);
  font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--gold);
}
.ed-legal .legal-toc ol { margin: 0 0 0 1.2rem; columns: 2; column-gap: var(--s-6); }
@media (max-width: 640px) { .ed-legal .legal-toc ol { columns: 1; } }
.ed-legal .legal-toc li { margin-bottom: var(--s-2); break-inside: avoid; }
.ed-legal .legal-toc a { text-decoration: none; color: var(--ink-2); }
.ed-legal .legal-toc a:hover { color: var(--gold); text-decoration: underline; }
.ed-legal table.legal, .ed-legal table {
  width: 100%; border-collapse: collapse; margin: var(--s-5) 0;
  font-family: var(--font-body); font-size: var(--t-small);
}
.ed-legal table th, .ed-legal table td {
  border: 1px solid var(--line); padding: .75rem .9rem; text-align: left; vertical-align: top; color: var(--ink-2);
}
.ed-legal table th { color: var(--ink); font-weight: 600; background: var(--surface-muted); font-size: var(--t-caption); letter-spacing: .08em; text-transform: uppercase; }
.ed-legal .ed-tablewrap { margin: var(--s-5) 0; }
.ed-legal .legal-foot {
  border-top: 1px solid var(--line); margin-top: var(--s-8); padding-top: var(--s-5);
  display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); font-size: var(--t-caption);
}
.ed-legal .legal-foot a { color: var(--ink-muted); text-decoration: none; letter-spacing: .06em; }
.ed-legal .legal-foot a:hover { color: var(--gold); }
.ed-legalcopy {
  max-width: var(--w-text); margin-inline: auto;
  padding: 0 var(--pad-x) var(--s-8); color: var(--ink-muted);
  font-family: var(--font-body); font-size: var(--t-caption); letter-spacing: .08em;
}
.ed-legal-body { background: var(--bg); color: var(--ink-2); font-family: var(--font-body); margin: 0; }
/* The legal pages don't load site.css, so the shared skip-link needs its own
   off-screen treatment here or it renders as visible text at the top. */
.ed-legal-body .lod-skip {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--gold); color: var(--surface); padding: .8rem 1.2rem;
  border-radius: 0 0 var(--r-md) 0; text-decoration: none; font-size: var(--t-small);
}
.ed-legal-body .lod-skip:focus { left: 0; }
.ed-legal-top {
  border-bottom: 1px solid var(--line); background: var(--surface);
  padding: var(--s-4) var(--pad-x); display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
}
.ed-legal-top a { text-decoration: none; }
.ed-legal-top a.brand { font-family: var(--font-script); color: var(--gold); font-size: 1.65rem; line-height: 1; }
.ed-legal-top a.back { font-family: var(--font-body); color: var(--ink-3); font-size: var(--t-caption); letter-spacing: .1em; text-transform: uppercase; }
.ed-legal-top a.back:hover { color: var(--gold); }

/* ---------- 17. Motion ------------------------------------------- */
.ed-page .reveal { opacity: 0; transform: translateY(16px); transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease); }
.ed-page .reveal.in, .ed-page .reveal.is-in { opacity: 1; transform: none; }
/* No-JS safety: if the reveal script never runs, nothing may stay invisible. */
.no-js .ed-page .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .ed-page .reveal { opacity: 1; transform: none; transition: none; }
}
/* Smooth in-page jumps are handled in lod-editorial.js, scoped to .ed-page —
   deliberately NOT a global `html { scroll-behavior }` rule, which would leak
   to every other page on the site. */

/* ---------- 18. Generated art ------------------------------------
   art-lib.js draws every knowledge / editorial page a piece of line art from
   the page's own slug; lod.css §17 sizes and veils it. These rules only place
   it inside the editorial shell — no colours, no new veils, no !important.
   ------------------------------------------------------------------ */

/* The hero art is centred in the RIGHT half of the header, so the eyebrow, h1
   and lede never sit over linework on desktop — the §17 veil is the safety net,
   this is the belt. Below 860px the veil turns vertical and the art goes back
   to full width behind the whole hero. */
.ed-page .ed-hero.art-hero > svg.lod-art { left: auto; width: 52%; opacity: .85; }
/* Below 860px the §17 veil turns vertical — near-opaque over the text and fully
   opaque below 62% — so the art goes back to full width behind the whole hero.
   The veil, not a lowered opacity, is what protects the copy there; measured at
   390px the worst ratio is unchanged from desktop. */
@media (max-width: 860px) {
  .ed-page .ed-hero.art-hero > svg.lod-art { left: 0; width: 100%; }
}

/* A band sits directly above the hero, so the hero's own top rule is redundant. */
.ed-page .art-band + .ed-hero { border-top: 0; }
/* §17 gives .art-band an aspect-ratio AND a max-height. With width:auto Chrome
   resolves the ratio by SHRINKING the box (measured: 1384px inside a 1460px
   page, leaving a bare strip down the right edge). Stating the width makes the
   ratio drive the height instead, and max-height simply crops it. */
.ed-page .art-band { width: 100%; }

/* Card art: a tile at the top of a hub card or a related-reading card. */
.ed-page .hub-card > .art-mark { margin-bottom: var(--s-4); }
.ed-page .related a > .art-mark { margin-bottom: var(--s-3); }

/* The 27 lunar mansions: the same 27 links as before, now each with its own
   sky. Tighter cards than the standard hub grid so all 27 stay scannable. */
.ed-page .ed-nakgrid { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: var(--s-4); }
.ed-page .ed-nakcard { padding: var(--s-3); }
.ed-page .ed-nakcard > .art-mark { margin-bottom: var(--s-3); }
.ed-page .ed-nakcard h3 { font-size: var(--t-body); font-weight: 500; margin: 0; }
