/* Editorial reading layer for generated AUG lexicon term pages. */
:root {
  --lex-paper: #f7f1e6;
  --lex-paper-deep: #eee4d3;
  --lex-ink: #102443;
  --lex-muted: #52627a;
  --lex-copper: #a85f31;
  --lex-blue: #1d5f87;
  --lex-line: #d9c8b2;
}

html { background: var(--lex-paper); }

body.sitewide-page[data-page-family="lexicon"] {
  min-height: 100vh;
  background: var(--lex-paper) !important;
  color: var(--lex-ink) !important;
  font-family: "Newsreader", "AugText", Georgia, serif !important;
  font-size: clamp(18px, 1.15vw, 20px) !important;
  line-height: 1.7 !important;
  text-shadow: none !important;
}

body.sitewide-page[data-page-family="lexicon"]::before,
body.sitewide-page[data-page-family="lexicon"]::after {
  display: none !important;
  content: none !important;
}

body.sitewide-page[data-page-family="lexicon"] :is(p, li, dd, dt, figcaption, blockquote, summary, h1, h2, h3, h4) {
  color: inherit;
  text-shadow: none !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  hyphens: manual !important;
}

body.sitewide-page[data-page-family="lexicon"] :is(a, .xref, .back, .lex-verwandt a, .lex-rueckweg a, .term-nav a, .reading-links a) {
  color: var(--lex-blue) !important;
  text-decoration-color: color-mix(in srgb, var(--lex-blue) 52%, transparent) !important;
  text-underline-offset: .16em;
}

body.sitewide-page[data-page-family="lexicon"] :is(a:hover, a:focus-visible) {
  color: var(--lex-copper) !important;
  text-decoration-color: currentColor !important;
}

/* The two older page structures: C48 documents and translated term pages. */
body.sitewide-page[data-page-family="lexicon"] :is(#seiten-inhalt.wrap, main.page.term, .wrap) {
  width: min(100% - 2.5rem, 64ch) !important;
  max-width: 64ch !important;
  margin-inline: auto !important;
  padding: clamp(1.5rem, 4vw, 3.5rem) 0 clamp(3rem, 8vw, 6rem) !important;
  background: transparent !important;
}

body.sitewide-page[data-page-family="lexicon"] :is(.ruhe-kopf.c48-header, .page.term .definition, .wrap > .definition) {
  margin: 0 0 clamp(2rem, 5vw, 4rem) !important;
  padding: 0 0 clamp(1.5rem, 4vw, 3rem) !important;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 2px solid var(--lex-copper) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body.sitewide-page[data-page-family="lexicon"] h1 {
  max-width: none !important;
  margin: 0 0 .45em !important;
  color: var(--lex-ink) !important;
  font-family: "Cormorant Garamond", "AugHead", Georgia, serif !important;
  font-size: clamp(2.25rem, 5.2vw, 4.5rem) !important;
  font-weight: 500 !important;
  line-height: .98 !important;
  letter-spacing: -.025em !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  hyphens: auto !important;
}

/* Older C48 pages used a narrow two-column header grid.  The title, risk
   label, and plain-language definition are now a single reading column. */
body.sitewide-page[data-page-family="lexicon"] .ruhe-kopf.c48-header {
  display: block !important;
  grid-template-columns: none !important;
  grid-template-areas: none !important;
  width: 100% !important;
}

body.sitewide-page[data-page-family="lexicon"] .ruhe-kopf.c48-header > * {
  grid-column: auto !important;
  grid-row: auto !important;
}

body.sitewide-page[data-page-family="lexicon"] .ruhe-kopf.c48-header .term-section.c48-intro {
  width: 100% !important;
  max-width: 64ch !important;
}

body.sitewide-page[data-page-family="lexicon"] h1 .accent,
body.sitewide-page[data-page-family="lexicon"] .english-name,
body.sitewide-page[data-page-family="lexicon"] .term-id,
body.sitewide-page[data-page-family="lexicon"] .c48-meta,
body.sitewide-page[data-page-family="lexicon"] .lex-heimweg {
  color: var(--lex-muted) !important;
}

body.sitewide-page[data-page-family="lexicon"] h2,
body.sitewide-page[data-page-family="lexicon"] h3 {
  color: var(--lex-ink) !important;
  font-family: "Cormorant Garamond", "AugHead", Georgia, serif !important;
  font-weight: 600 !important;
  line-height: 1.12 !important;
}

body.sitewide-page[data-page-family="lexicon"] h2 { font-size: clamp(1.55rem, 3.4vw, 2.3rem) !important; }
body.sitewide-page[data-page-family="lexicon"] h3 { font-size: clamp(1.28rem, 2.4vw, 1.65rem) !important; }

body.sitewide-page[data-page-family="lexicon"] :is(.term-section, details.src-details, .lex-verwandt, nav.lex-rueckweg, .cite-box) {
  margin: 0 !important;
  padding: clamp(1.4rem, 4vw, 2.5rem) 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-top: 1px solid var(--lex-line) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body.sitewide-page[data-page-family="lexicon"] :is(.ruhe-kopf.c48-header .term-section.c48-intro, .page.term .definition) {
  border-top: 0 !important;
}

body.sitewide-page[data-page-family="lexicon"] .term-section.c48-intro {
  margin-top: 1.5rem !important;
  padding-top: 1.5rem !important;
}

body.sitewide-page[data-page-family="lexicon"] .definition-first,
body.sitewide-page[data-page-family="lexicon"] .lede {
  max-width: 58ch;
  color: var(--lex-ink) !important;
  font-size: clamp(1.15rem, 2vw, 1.45rem) !important;
  font-style: normal !important;
  line-height: 1.55 !important;
}

body.sitewide-page[data-page-family="lexicon"] details.src-details > summary {
  color: var(--lex-ink) !important;
  font-family: "Cormorant Garamond", "AugHead", Georgia, serif !important;
  font-size: clamp(1.25rem, 2.6vw, 1.7rem) !important;
}

body.sitewide-page[data-page-family="lexicon"] :is(.badge, .chip, .term-code, .c48-catalogue) {
  color: var(--lex-copper) !important;
  border-color: color-mix(in srgb, var(--lex-copper) 48%, var(--lex-line)) !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.sitewide-page[data-page-family="lexicon"] :is(.field-note, .translation-note, .small, .term-nav-name) {
  color: var(--lex-muted) !important;
}

body.sitewide-page[data-page-family="lexicon"] :is(.topbar, .site-header, .ml-topbar) {
  position: relative !important;
  z-index: 2 !important;
  width: 100% !important;
  padding: .9rem clamp(1rem, 4vw, 2.5rem) !important;
  background: var(--lex-ink) !important;
  border: 0 !important;
  border-bottom: 3px solid var(--lex-copper) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

body.sitewide-page[data-page-family="lexicon"] :is(.topbar, .site-header, .ml-topbar) :is(a, button, summary, .brand, .ml-brand) {
  color: #fffaf0 !important;
  text-shadow: none !important;
}

body.sitewide-page[data-page-family="lexicon"] :is(.topbar, .site-header, .ml-topbar) :is(a:hover, a:focus-visible) {
  color: #f3c08b !important;
}

body.sitewide-page[data-page-family="lexicon"] :is(.main-nav, .term-nav, .reading-links, .nav-links, .lex-rueckweg, .lex-verwandt) {
  gap: .55rem 1rem !important;
}

body.sitewide-page[data-page-family="lexicon"] footer,
body.sitewide-page[data-page-family="lexicon"] .site-footer {
  color: var(--lex-muted) !important;
  background: var(--lex-paper-deep) !important;
  border-top: 1px solid var(--lex-line) !important;
  text-shadow: none !important;
}

.lex-reading-anchor {
  position: absolute !important;
  inline-size: 1px !important;
  block-size: 1px !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
}

@media (max-width: 720px) {
  body.sitewide-page[data-page-family="lexicon"] h1 {
    overflow-wrap: anywhere !important;
    hyphens: auto !important;
  }
  body.sitewide-page[data-page-family="lexicon"] :is(.topbar, .site-header, .ml-topbar) {
    flex-wrap: wrap !important;
    gap: .65rem 1rem !important;
  }

  body.sitewide-page[data-page-family="lexicon"] :is(.main-nav, .term-nav, .reading-links, .nav-links, .lex-rueckweg) {
    display: flex !important;
    flex-wrap: wrap !important;
    width: 100% !important;
  }

  body.sitewide-page[data-page-family="lexicon"] .term-nav a {
    flex: 1 1 14rem;
    min-height: 2.75rem;
    align-items: center;
  }

  body.sitewide-page[data-page-family="lexicon"] :is(#seiten-inhalt.wrap, main.page.term, .wrap) {
    width: min(100% - 1.5rem, 64ch) !important;
  }
}

/* C48's late legacy rule repeats :root four times, so this deliberately
   matches its specificity while replacing the obsolete two-column grid. */
:root:root:root:root body.sitewide-page[data-page-family="lexicon"] .c48-header {
  display: block !important;
  grid-template-columns: none !important;
  grid-template-rows: none !important;
  grid-template-areas: none !important;
  grid-auto-flow: row !important;
}

:root:root:root:root body.sitewide-page[data-page-family="lexicon"] .c48-header > * {
  grid-column: auto !important;
  grid-row: auto !important;
}
:root:root:root:root body.sitewide-page[data-page-family="lexicon"] .c48-header h1{font-size:clamp(32px,3.8vw,50px)!important;overflow-wrap:anywhere!important;hyphens:auto!important;line-height:1.1!important}
