/*
 * MOYASAI editorial refresh · local review, 15 October 2026.
 * Load after the existing editorial/edition styles and before shared header CSS.
 * Integration contract: body.editorial-refresh on /archiv/, /suche/, /blog/**,
 * including the two standalone chart pages under /blog/das-lamm-gottes/.
 * No content, image sources, brand marks, navigation or form logic is replaced.
 */
@font-face {
  font-family: "MOYASAI Editorial Serif";
  src: url("/assets/instrument-serif.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "MOYASAI Editorial Body";
  src: url("/assets/manrope.ttf") format("truetype");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

html:has(body.editorial-refresh) {
  height: auto;
  min-height: 100%;
  background: #faf8f2 !important;
  scroll-padding-top: 24px;
}
body.editorial-refresh {
  --editorial-cream: #faf8f2;
  --editorial-white: #ffffff;
  --editorial-soft: #f8f3e9;
  --editorial-ink: #302d27;
  --editorial-muted: #635b4f;
  --editorial-gold: #8b682c;
  --editorial-line: #ded3be;
  --editorial-shadow: 0 8px 28px #59421f0b;
  --editorial-display: "MOYASAI Editorial Serif", "Instrument Serif", Instrument, Georgia, serif;
  --editorial-body: "MOYASAI Editorial Body", Manrope, Arial, sans-serif;
  --outer: var(--editorial-cream);
  --paper: var(--editorial-white);
  --surface: var(--editorial-white);
  --soft: var(--editorial-soft);
  --ink: var(--editorial-ink);
  --muted: var(--editorial-muted);
  --gold: var(--editorial-gold);
  --goldtext: var(--editorial-gold);
  --line: var(--editorial-line);
  height: auto;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow: visible;
  color-scheme: light;
  background: var(--editorial-cream) !important;
  color: var(--editorial-ink) !important;
  font: 17px/1.75 var(--editorial-body);
}

/* Both established edition shells now follow the document's scroll position. */
body.editorial-refresh .master-shell {
  width: 100%;
  max-width: none;
  height: auto;
  min-height: 100vh;
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
body.editorial-refresh .master-window {
  width: calc(100% - 48px);
  max-width: 1200px;
  height: auto;
  min-height: 0;
  margin: 24px auto 32px;
  display: block;
  overflow: visible;
  border: 1px solid var(--editorial-line);
  border-radius: 18px;
  background-color: var(--editorial-white);
  box-shadow: var(--editorial-shadow);
}
body.editorial-refresh .master-stage {
  height: auto;
  min-height: 0;
  overflow: visible;
  border-radius: 0 0 18px 18px;
  background-color: var(--editorial-white);
}
body.editorial-refresh .master-toolbar {
  padding: 13px 30px;
  border-bottom: 1px solid var(--editorial-line);
  border-radius: 18px 18px 0 0;
  background-color: #fcf9f2;
  color: var(--editorial-muted);
  font: 11px/1.6 var(--editorial-body);
  letter-spacing: .06em;
  overflow-wrap: anywhere;
}
body.editorial-refresh .master-reader {
  width: 100%;
  max-width: none;
  height: auto;
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 34px clamp(24px, 4vw, 48px) 44px;
  overflow: visible;
  overscroll-behavior: auto;
  scrollbar-gutter: auto;
  background-color: transparent;
}
body.editorial-refresh > main,
body.editorial-refresh .page {
  width: 100%;
  max-width: 1248px;
  height: auto;
  margin-inline: auto;
  padding: 32px 24px 48px;
  background-color: transparent;
}
body.editorial-refresh .reader-frame {
  height: auto;
  max-height: none;
  border: 1px solid var(--editorial-line);
  border-radius: 18px;
  background-color: var(--editorial-white);
  box-shadow: var(--editorial-shadow);
}
body.editorial-refresh .reader-scroll,
body.editorial-refresh .legacy-content .prayer-scroll {
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
  overscroll-behavior: auto;
  touch-action: auto;
  scrollbar-gutter: auto;
}
body.editorial-refresh .reader-scroll {
  padding: 40px clamp(24px, 5vw, 72px) 48px;
  border-radius: 18px;
}
body.editorial-refresh :is(.master-reader, .reader-scroll) :is(section, aside, h2, h3) {
  scroll-margin-top: 28px;
}

/* Typography is shared with the warm homepage; original glyph images stay intact. */
body.editorial-refresh :is(.master-reader, .page, main) :is(h1, h2, h3) {
  font-family: var(--editorial-display);
  font-weight: 400;
  letter-spacing: -.015em;
  color: var(--editorial-gold);
  overflow-wrap: break-word;
  text-wrap: pretty;
}
body.editorial-refresh :is(.master-reader, .page, main) h1 {
  font-size: clamp(44px, 5.6vw, 72px);
  line-height: 1.06;
}
body.editorial-refresh :is(.master-reader, .page, main) h2 {
  font-size: clamp(32px, 3.3vw, 44px);
  line-height: 1.15;
}
body.editorial-refresh :is(.master-reader, .page, main) h3 {
  font-size: clamp(26px, 2.7vw, 33px);
  line-height: 1.2;
}
body.editorial-refresh .legacy-content {
  max-width: 1100px;
  color: var(--editorial-ink);
}
body.editorial-refresh .legacy-content :is(.article-main, .reading, .article-text),
body.editorial-refresh .article-text {
  max-width: 800px;
  min-width: 0;
  font: 18px/1.85 var(--editorial-body);
  color: var(--editorial-ink);
}
body.editorial-refresh .legacy-content :is(p, li),
body.editorial-refresh .article-text :is(p, li) {
  font-family: var(--editorial-body);
  font-size: 17px;
  line-height: 1.85;
  color: var(--editorial-ink);
  overflow-wrap: break-word;
}
body.editorial-refresh .legacy-content :is(.lead, .dek),
body.editorial-refresh .article-text .opening {
  font-size: 20px;
  line-height: 1.7;
}
body.editorial-refresh .legacy-content .article-heading {
  margin: 22px auto 30px;
}
body.editorial-refresh .legacy-content :is(.article-section, .reading > section) {
  padding-block: 28px;
  border-bottom-color: var(--editorial-line);
}
body.editorial-refresh .legacy-content :is(.source, .note, .credit, .citations, .source-list li, figcaption),
body.editorial-refresh :is(.rights, .source-links, .reader-help, .source-footer, .news-sources, .archive-figure figcaption) {
  color: var(--editorial-muted);
  font: 13px/1.8 var(--editorial-body);
  overflow-wrap: anywhere;
}
body.editorial-refresh :is(.master-kicker, .eyebrow, .kicker, .thought-label),
body.editorial-refresh .legacy-content :is(.eyebrow, .kicker, .label) {
  font-family: var(--editorial-body);
  font-size: 11px;
  line-height: 1.65;
  letter-spacing: .11em;
  color: var(--editorial-gold);
}
body.editorial-refresh :is(.legacy-content, .article-text) :is(blockquote, .pullquote) {
  margin: 30px 0;
  padding: 22px 26px;
  border: 1px solid var(--editorial-line);
  border-left: 3px solid #b69756;
  border-radius: 0 12px 12px 0;
  background-color: #fbf7ee;
  color: var(--editorial-gold);
  font: 400 clamp(28px, 3.1vw, 40px)/1.3 var(--editorial-display);
}
body.editorial-refresh :is(.legacy-content, .article-text) blockquote > p {
  font: inherit;
  color: inherit;
}
body.editorial-refresh .owner-letter .article-main blockquote {
  border: 0;
  background-color: transparent;
  padding: 0;
  font-size: clamp(34px, 4.3vw, 52px);
  line-height: 1.22;
}
body.editorial-refresh .owner-letter .article-main .garden-quote {
  font-size: clamp(30px, 3.5vw, 42px);
}

/* Archive/search: generous white cards and visible, accessible controls. */
body.editorial-refresh .archive-head {
  align-items: center;
  padding: 6px 0 26px;
  border-bottom: 1px solid var(--editorial-line);
}
body.editorial-refresh .archive-head h1 { margin: 0; }
body.editorial-refresh .archive-head p {
  max-width: 40ch;
  font: 16px/1.75 var(--editorial-body);
  color: var(--editorial-muted);
}
body.editorial-refresh .archive-tools {
  padding: 24px 0 8px;
}
body.editorial-refresh .archive-tools label {
  margin-bottom: 9px;
  font: 650 14px/1.5 var(--editorial-body);
}
body.editorial-refresh .search-controls { gap: 12px; }
body.editorial-refresh .search-controls input {
  min-height: 50px;
  padding: 13px 16px;
  border: 1px solid #cabc9e;
  border-radius: 9px;
  background-color: var(--editorial-white);
  color: var(--editorial-ink);
  font: 16px/1.5 var(--editorial-body);
}
body.editorial-refresh .search-controls input::placeholder { color: #71695d; }
body.editorial-refresh #search-status {
  min-height: 24px;
  margin: 16px 0 4px;
  color: var(--editorial-muted);
  font: 14px/1.6 var(--editorial-body);
}
body.editorial-refresh #search-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin: 18px 0 28px;
  padding: 0;
  list-style: none;
}
body.editorial-refresh #search-results li {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--editorial-line);
  border-radius: 14px;
  background-color: var(--editorial-white);
  box-shadow: var(--editorial-shadow);
}
body.editorial-refresh #search-results li:nth-child(3n + 2) { background-color: #fcf9f3; }
body.editorial-refresh #search-results li:hover { border-color: #bca16c; }
body.editorial-refresh #search-results time {
  font: 11px/1.5 var(--editorial-body);
  letter-spacing: .07em;
  color: var(--editorial-gold);
}
body.editorial-refresh #search-results h2 {
  margin: 10px 0;
  font-size: 32px;
  line-height: 1.15;
}
body.editorial-refresh #search-results h2 a {
  display: block;
  min-height: 44px;
  padding: 3px 0;
  color: inherit;
}
body.editorial-refresh #search-results p {
  margin: 0;
  color: var(--editorial-muted);
  font: 15px/1.75 var(--editorial-body);
}
body.editorial-refresh .archive-thumb {
  width: 100%;
  height: 210px;
  margin-bottom: 16px;
  object-fit: contain;
  border: 1px solid #eee7d9;
  border-radius: 8px;
  background-color: #fdfbf6;
}
body.editorial-refresh .archive-caption {
  padding-top: 18px;
  border-top-color: var(--editorial-line);
  color: var(--editorial-muted);
  font: 13px/1.7 var(--editorial-body);
}

/* Article content and topic cards; background images are intentionally retained. */
body.editorial-refresh .legacy-content :is(.panel, .window, .card, .article-cta, .prayer, .prayer-window, .context, .source-note, .quote-card, .data-card),
body.editorial-refresh :is(.archive-card, .world-article, .edition-card) {
  border-color: var(--editorial-line);
  border-radius: 14px;
  background-color: var(--editorial-white);
  color: var(--editorial-ink);
  box-shadow: var(--editorial-shadow);
}
body.editorial-refresh .legacy-content :is(.context, .source-note, .quote-card, .article-cta) {
  background-color: #fcf8ef;
}
body.editorial-refresh .legacy-content :is(.point, .outro) {
  padding: 22px;
  border: 1px solid var(--editorial-line);
  border-radius: 12px;
  background-color: #fcf8ef;
  color: var(--editorial-ink);
}
body.editorial-refresh .legacy-content .article-layout {
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 34px;
}
body.editorial-refresh .legacy-content .article-layout > .toc {
  position: sticky;
  top: 24px;
  padding: 16px;
  border: 1px solid var(--editorial-line);
  border-radius: 12px;
  background-color: #fcf9f3;
}
body.editorial-refresh .legacy-content .toc a {
  font: 13px/1.6 var(--editorial-body);
  color: var(--editorial-ink);
  overflow-wrap: anywhere;
}
body.editorial-refresh .legacy-content .world-heading {
  padding-block: 22px 30px;
  border-bottom-color: var(--editorial-line);
}
body.editorial-refresh .legacy-content .world-description { max-width: 66ch; }
body.editorial-refresh .world-article {
  margin-block: 18px 24px;
  border: 1px solid var(--editorial-line);
}
body.editorial-refresh .world-article-image img {
  object-fit: contain;
  background-color: #fdfbf6;
}
body.editorial-refresh .world-article > div { padding: 26px 26px 26px 0; }
body.editorial-refresh .legacy-content .world-article h3 { font-size: 34px; }
body.editorial-refresh .world-invitation {
  border-color: var(--editorial-line);
  gap: 24px;
}
body.editorial-refresh .edition-card { padding: 20px; border: 1px solid var(--editorial-line); }
body.editorial-refresh .edition-card .visual { object-fit: contain; background-color: #fdfbf6; }
body.editorial-refresh .archive-card {
  padding: 18px;
  border: 1px solid var(--editorial-line);
}
body.editorial-refresh .archive-card :is(p, .rights, .source-links) {
  font: 13px/1.8 var(--editorial-body);
  color: var(--editorial-muted);
}
body.editorial-refresh .archive-card h3 { margin: 0 0 12px; font-size: 29px; }
body.editorial-refresh .archive-card .full-image { background-color: #fdfbf6; border-color: #eee7d9; }
body.editorial-refresh .news-sources { border-top: 1px solid var(--editorial-line); margin-top: 30px; }

/* Gold controls retain dark, readable labels; no interaction changes. */
body.editorial-refresh :is(.search-controls button, #search-retry, .button, .cta-link, .archive-read) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  max-width: 100%;
  padding: 12px 19px;
  border: 1px solid #ad8c4c;
  border-radius: 7px;
  background-color: #a88a4c;
  background-image: linear-gradient(142deg, #c1a467 0%, #f6dea0 25%, #a88a4c 56%, #c5a15c 83%, #b79a60 100%);
  color: #211b11;
  box-shadow: inset 0 1px 0 #f9e6bb;
  font: 700 15px/1.5 var(--editorial-body);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
body.editorial-refresh :is(.search-controls button, #search-retry, .button, .cta-link, .archive-read):hover {
  background-color: #c3a465;
  text-decoration: underline;
  text-underline-offset: 4px;
}
body.editorial-refresh .article-cta .cta-link { display: flex; }
body.editorial-refresh #search-results .archive-read { margin-top: 20px; }
body.editorial-refresh :is(.master-reader, main) :is(a, button, input, summary, [tabindex]):focus-visible {
  outline: 3px solid #71511c;
  outline-offset: 4px;
}
body.editorial-refresh .legacy-content :is(a, .citations),
body.editorial-refresh .article-text a { overflow-wrap: anywhere; }
body.editorial-refresh :is(.table-wrap, .table-scroll) {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}
body.editorial-refresh table { font-family: var(--editorial-body); }
body.editorial-refresh :is(td, th) { border-color: var(--editorial-line); }
body.editorial-refresh [hidden] { display: none !important; }

@media (max-width: 1000px) {
  body.editorial-refresh #search-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.editorial-refresh .legacy-content .article-layout { grid-template-columns: 1fr; }
  body.editorial-refresh .legacy-content .article-layout > .toc {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-bottom: 24px;
  }
  body.editorial-refresh .legacy-content .article-layout > .toc p { width: 100%; margin: 0 0 4px; }
  body.editorial-refresh .legacy-content .article-layout > .toc a { padding-block: 7px; }
}
@media (max-width: 650px) {
  body.editorial-refresh { font-size: 16px; }
  body.editorial-refresh .master-window {
    width: calc(100% - 24px);
    margin: 14px auto 24px;
    border-radius: 12px;
  }
  body.editorial-refresh .master-toolbar {
    padding: 11px 17px;
    border-radius: 12px 12px 0 0;
    font-size: 10px;
    letter-spacing: .025em;
  }
  body.editorial-refresh .master-reader { padding: 24px 17px 30px; }
  body.editorial-refresh > main,
  body.editorial-refresh .page { padding: 22px 14px 34px; }
  body.editorial-refresh .reader-scroll { padding: 28px 20px 32px; }
  body.editorial-refresh .reader-frame { border-radius: 12px; }
  body.editorial-refresh :is(.master-reader, .page, main) h1 { font-size: clamp(38px, 10vw, 48px); }
  body.editorial-refresh :is(.master-reader, .page, main) h2 { font-size: 33px; }
  body.editorial-refresh :is(.master-reader, .page, main) h3 { font-size: 28px; }
  body.editorial-refresh .legacy-content :is(p, li),
  body.editorial-refresh .article-text :is(p, li) { font-size: 16px; line-height: 1.8; }
  body.editorial-refresh .legacy-content :is(.lead, .dek),
  body.editorial-refresh .article-text .opening { font-size: 18px; line-height: 1.7; }
  body.editorial-refresh :is(.legacy-content, .article-text) :is(blockquote, .pullquote) {
    padding: 20px 18px;
    margin-block: 24px;
    font-size: 29px;
  }
  body.editorial-refresh .owner-letter .article-main blockquote { padding: 0; font-size: 34px; }
  body.editorial-refresh .owner-letter .article-main .garden-quote { font-size: 30px; }
  body.editorial-refresh .archive-head { display: block; padding-bottom: 22px; }
  body.editorial-refresh .archive-head h1 { margin-bottom: 16px; }
  body.editorial-refresh .archive-head p { font-size: 15px; }
  body.editorial-refresh .archive-tools { padding-top: 22px; }
  body.editorial-refresh .search-controls { flex-wrap: wrap; }
  body.editorial-refresh .search-controls input { flex-basis: 100%; width: 100%; }
  body.editorial-refresh .search-controls button { width: 100%; }
  body.editorial-refresh #search-results { grid-template-columns: 1fr; gap: 18px; }
  body.editorial-refresh #search-results li { padding: 16px; }
  body.editorial-refresh #search-results h2 { font-size: 32px; }
  body.editorial-refresh #search-results p { font-size: 15px; line-height: 1.75; }
  body.editorial-refresh .archive-thumb { height: 220px; }
  body.editorial-refresh .archive-caption { font-size: 13px; }
  body.editorial-refresh .legacy-content :is(.source, .note, .credit, .citations, figcaption),
  body.editorial-refresh :is(.rights, .source-links, .reader-help, .source-footer, .news-sources, .archive-figure figcaption) { font-size: 13px; }
  body.editorial-refresh .legacy-content :is(.panel, .window, .point, .outro, .article-cta) { padding: 18px; }
  body.editorial-refresh .world-article { display: block; }
  body.editorial-refresh .world-article-image { min-height: 0; aspect-ratio: 3 / 2; }
  body.editorial-refresh .world-article > div { padding: 22px; }
  body.editorial-refresh .legacy-content .world-article h3 { font-size: 31px; }
  body.editorial-refresh .world-invitation { display: block; }
  body.editorial-refresh .world-invitation .button { margin-top: 12px; }
  body.editorial-refresh .archive-grid { grid-template-columns: 1fr; gap: 18px; }
  body.editorial-refresh .archive-card :is(p, .rights, .source-links) { font-size: 13px; }
  body.editorial-refresh .legacy-content :is(.two, .chart-layout, .data-cards, .steps, .edition-top) { display: block; }
  body.editorial-refresh .legacy-content :is(.two, .chart-layout, .data-cards, .steps) > * + * { margin-top: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html:has(body.editorial-refresh),
  body.editorial-refresh .reader-scroll { scroll-behavior: auto; }
}
@media print {
  body.editorial-refresh { background: white !important; }
  body.editorial-refresh .master-window,
  body.editorial-refresh .reader-frame { width: 100%; margin: 0; border: 0; box-shadow: none; }
  body.editorial-refresh .master-reader,
  body.editorial-refresh .reader-scroll { padding: 16px; }
  body.editorial-refresh :is(.archive-card, .world-article, #search-results li) { box-shadow: none; break-inside: avoid; }
}
