/* Augmanitai terminology pages. Loaded after the source stylesheets.
   Root sets body.sitewide-page[data-page-family="lexicon"] on these pages. */
html body.sitewide-page[data-page-family="lexicon"] h1>.accent:not([data-de]):not([data-en]){display:none!important;}
html body.sitewide-page[data-page-family="lexicon"] {
  --sw-ink: #f5efe2;
  --sw-muted: #c5cbd0;
  --sw-soft: #aebac5;
  --sw-gold: #dfbd79;
  --sw-line: rgb(245 239 226 / 14%);
  --sw-line-gold: rgb(223 189 121 / 35%);
  color: var(--sw-ink);
  color-scheme: dark;
}

html body.sitewide-page[data-page-family="lexicon"] :where(main.wrap, main.page) {
  width: min(100% - 48px, 1120px);
  margin-inline: auto;
}

html body.sitewide-page[data-page-family="lexicon"] :where(h1, h2, h3) {
  text-wrap: balance;
}

html body.sitewide-page[data-page-family="lexicon"] :where(a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible) {
  outline: 2px solid var(--sw-gold);
  outline-offset: 3px;
}

/* Shared vocabulary between the legacy localized templates and the newer
   DE/EN edition. Preserve hero media and all interactive graphic layers. */
html body.sitewide-page[data-page-family="lexicon"] :where(.site-header, .topbar) {
  position: relative;
  z-index: 5;
  min-height: 68px;
  padding: 14px clamp(20px, 4vw, 52px);
  border-bottom: 1px solid var(--sw-line);
  background: linear-gradient(180deg, #07111ef2, #07111edb);
  backdrop-filter: blur(12px);
}

html body.sitewide-page[data-page-family="lexicon"] :where(.site-header, .topbar) :where(.brand, .c43-nav a, .main-nav a, .language-links a, .langswitch button) {
  color: var(--sw-muted);
}

html body.sitewide-page[data-page-family="lexicon"] :where(.site-header, .topbar) :where(a:hover, a[aria-current="page"], .current-language, button.active) {
  color: var(--sw-gold);
}

html body.sitewide-page[data-page-family="lexicon"] :where(.language-menu, .nav-dropdown) {
  color: var(--sw-ink);
}

html body.sitewide-page[data-page-family="lexicon"] :where(.language-menu, .nav-dropdown) :where(summary, .language-links, .c43-panel) {
  border-color: var(--sw-line-gold);
  background-color: #091625;
}

/* Newer DE/EN catalogue: a calm editorial title block above usable controls. */
html body.sitewide-page[data-page-family="lexicon"] .lex-hero {
  min-height: 0;
  padding: clamp(44px, 7vw, 94px) 0 clamp(28px, 4vw, 54px);
  border-bottom: 1px solid var(--sw-line-gold);
}

html body.sitewide-page[data-page-family="lexicon"] .lex-hero-inner {
  width: min(100% - 48px, 1120px);
  margin-inline: auto;
}

html body.sitewide-page[data-page-family="lexicon"] .lex-hero h1 {
  max-width: 15ch;
  margin-block: 12px 18px;
  color: var(--sw-ink);
  font-size: clamp(42px, 6.5vw, 78px);
  line-height: 1.02;
  letter-spacing: -.025em;
}

html body.sitewide-page[data-page-family="lexicon"] .lex-hero :where(.kicker, .lex-hero-badge) {
  color: var(--sw-gold);
  letter-spacing: .14em;
}

html body.sitewide-page[data-page-family="lexicon"] .lex-hero .lede {
  max-width: 62ch;
  color: #d2d7dc;
  font-size: clamp(19px, 2.1vw, 24px);
  line-height: 1.58;
}

html body.sitewide-page[data-page-family="lexicon"] :where(.lex-controls, .lexicon-search) {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 14px;
  margin: 24px 0 18px;
  padding: clamp(16px, 2.5vw, 24px);
  border: 1px solid var(--sw-line-gold);
  border-radius: 12px;
  background: linear-gradient(135deg, #101f2c, #0a1623 78%);
  box-shadow: 0 16px 42px rgb(0 0 0 / 18%);
}

html body.sitewide-page[data-page-family="lexicon"] :where(.lex-field, .lexicon-search label) {
  display: flex;
  flex: 1 1 220px;
  flex-direction: column;
  gap: 7px;
  min-width: min(100%, 190px);
  color: var(--sw-muted);
  font-size: 14px;
  letter-spacing: .025em;
}

html body.sitewide-page[data-page-family="lexicon"] :where(.lex-search, .lex-select, .lexicon-search input) {
  min-height: 48px;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgb(197 203 208 / 24%);
  border-radius: 7px;
  background: #07111e;
  color: var(--sw-ink);
  font: inherit;
  font-size: 16px;
}

html body.sitewide-page[data-page-family="lexicon"] :where(.lex-search, .lex-select, .lexicon-search input)::placeholder {
  color: #aebac5;
  opacity: .8;
}

html body.sitewide-page[data-page-family="lexicon"] :where(.lex-count, .lexicon-search output, .lex-collection-note) {
  color: var(--sw-soft);
}

html body.sitewide-page[data-page-family="lexicon"] .lexicon-jumps {
  display: flex;
  flex: 1 1 100%;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}

html body.sitewide-page[data-page-family="lexicon"] .lexicon-jumps a {
  display: inline-grid;
  min-width: 36px;
  min-height: 36px;
  place-items: center;
  border: 1px solid var(--sw-line);
  border-radius: 6px;
  color: var(--sw-gold);
  text-decoration: none;
}

html body.sitewide-page[data-page-family="lexicon"] .lexicon-list {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--sw-line);
}

html body.sitewide-page[data-page-family="lexicon"] .lexicon-list > li {
  display: grid;
  grid-template-columns: minmax(12rem, .42fr) minmax(0, 1fr);
  gap: 7px 24px;
  padding: 22px clamp(14px, 2vw, 24px);
  border-bottom: 1px solid var(--sw-line);
  background: linear-gradient(100deg, rgb(15 29 42 / 78%), rgb(9 20 31 / 46%));
}

html body.sitewide-page[data-page-family="lexicon"] .lexicon-list > li > a {
  grid-row: span 2;
  align-self: start;
  color: var(--sw-ink);
  font-family: 'AugHead', Georgia, serif;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.25;
  text-decoration-color: var(--sw-line-gold);
  text-underline-offset: 4px;
}

html body.sitewide-page[data-page-family="lexicon"] .lexicon-list > li :where(span[lang], p) {
  margin: 0;
  color: var(--sw-muted);
}

html body.sitewide-page[data-page-family="lexicon"] .lexicon-list > li:hover {
  background: linear-gradient(100deg, rgb(223 189 121 / 9%), rgb(9 20 31 / 52%));
}

html body.sitewide-page[data-page-family="lexicon"] .lex-list {
  margin-top: 22px;
}

html body.sitewide-page[data-page-family="lexicon"] .lex-row {
  border-color: var(--sw-line);
}

html body.sitewide-page[data-page-family="lexicon"] .lex-row > a {
  min-height: 68px;
  padding: 18px 10px;
  border-radius: 8px;
  transition: background-color .18s ease, color .18s ease;
}

html body.sitewide-page[data-page-family="lexicon"] :where(.lex-name-en, .lex-name-de) {
  color: var(--sw-ink);
}

html body.sitewide-page[data-page-family="lexicon"] .lex-teaser {
  flex: 1 1 100%;
  max-width: 76ch;
  color: var(--sw-muted);
  line-height: 1.6;
}

html body.sitewide-page[data-page-family="lexicon"] :where(.lex-id, .lex-risk, .lex-meta) {
  color: var(--sw-soft);
}

/* Localized term entries share semantic classes; widen reading measure and
   give the headword, identifier and definition separate levels. */
html body.sitewide-page[data-page-family="lexicon"] main.page.term {
  max-width: 900px;
  padding-block: clamp(28px, 5vw, 64px) 72px;
  line-height: 1.78;
}

html body.sitewide-page[data-page-family="lexicon"] main.page.term .definition {
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid var(--sw-line-gold);
  border-top: 2px solid var(--sw-gold);
  border-radius: 14px;
  background: linear-gradient(145deg, #102131, #0a1724 76%);
  box-shadow: 0 22px 56px rgb(0 0 0 / 22%);
}

html body.sitewide-page[data-page-family="lexicon"] main.page.term .definition h1 {
  margin: 4px 0 8px;
  color: var(--sw-ink);
  font: 400 clamp(38px, 6vw, 66px)/1.04 'AugHead', Georgia, serif;
  letter-spacing: -.02em;
}

html body.sitewide-page[data-page-family="lexicon"] .english-name {
  margin: 0 0 8px;
  color: var(--sw-gold);
  font: italic clamp(19px, 2.6vw, 25px)/1.4 'AugHead', Georgia, serif;
}

html body.sitewide-page[data-page-family="lexicon"] .term-id {
  color: var(--sw-soft);
  font: 12px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .08em;
}

html body.sitewide-page[data-page-family="lexicon"] :where(.translation-note, .cite-box) {
  padding: 12px 16px;
  border-inline-start: 2px solid var(--sw-gold);
  background: rgb(223 189 121 / 7%);
  color: var(--sw-muted);
}

html body.sitewide-page[data-page-family="lexicon"] .definition-label {
  margin: 26px 0 8px;
  color: var(--sw-gold);
  font: 600 12px/1.5 system-ui, sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
}

html body.sitewide-page[data-page-family="lexicon"] .definition-first {
  margin: 0;
  color: var(--sw-ink);
  font-size: clamp(19px, 2.2vw, 23px);
  line-height: 1.72;
  text-wrap: pretty;
}

html body.sitewide-page[data-page-family="lexicon"] main.page.term > .term-section {
  margin: 18px 0 0;
  padding: clamp(20px, 3.5vw, 34px);
  border: 1px solid var(--sw-line);
  border-radius: 12px;
  background: linear-gradient(125deg, rgb(17 32 45 / 84%), rgb(9 21 33 / 72%));
}

html body.sitewide-page[data-page-family="lexicon"] main.page.term > .term-section h2 {
  margin: 0 0 10px;
  color: var(--sw-gold);
  font: 400 clamp(23px, 3vw, 32px)/1.2 'AugHead', Georgia, serif;
}

html body.sitewide-page[data-page-family="lexicon"] main.page.term > .term-section p,
html body.sitewide-page[data-page-family="lexicon"] main.page.term > .term-section li {
  color: #dbe0e2;
}

html body.sitewide-page[data-page-family="lexicon"] .term-nav,
html body.sitewide-page[data-page-family="lexicon"] .reading-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: 24px;
}

html body.sitewide-page[data-page-family="lexicon"] :where(.term-nav a, .reading-links a, .wc-back, .back) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--sw-line-gold);
  border-radius: 7px;
  color: var(--sw-gold);
  text-decoration: none;
}

/* C48 English/German entry template */
html body.sitewide-page[data-page-family="lexicon"] main.wrap:is(.hf-63252b) {
  max-width: 1120px;
  padding-block: 30px 76px;
}

html body.sitewide-page[data-page-family="lexicon"] main.wrap > :where(.c48-header, .term-section, .src-details, .lex-verwandt, .lex-rueckweg) {
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

html[data-c48="1"] body.sitewide-page[data-page-family="lexicon"] main.wrap > :where(.c48-header, .term-section, .src-details, .lex-verwandt, .lex-rueckweg) {
  border-radius: 0 !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

html body.sitewide-page[data-page-family="lexicon"] .c48-header {
  padding: 24px 0 34px;
  border: 0;
  border-bottom: 1px solid var(--sw-line-gold);
}

html body.sitewide-page[data-page-family="lexicon"] .c48-header h1 {
  color: var(--sw-ink);
  max-width: 18ch;
  margin-block: 12px 18px;
  font-size: clamp(42px, 7vw, 82px) !important;
  line-height: 1.02 !important;
  letter-spacing: -.035em !important;
  text-transform: none !important;
  overflow-wrap: anywhere;
  word-break: normal;
  text-wrap: balance;
}

html body.sitewide-page[data-page-family="lexicon"] .c48-header :where(.c48-intro p, .c48-risk-label) {
  color: var(--sw-muted);
}

html body.sitewide-page[data-page-family="lexicon"] .c48-header .c48-meta {
  color: var(--sw-soft);
}

html body.sitewide-page[data-page-family="lexicon"] main.wrap > .term-section {
  margin: 0;
  padding: clamp(26px, 4vw, 42px) 0;
  border: 0;
  border-bottom: 1px solid var(--sw-line);
}

html body.sitewide-page[data-page-family="lexicon"] main.wrap > .term-section h2 {
  max-width: 32ch;
  margin-block: 0 12px;
  color: var(--sw-gold);
  font: 400 clamp(28px, 4vw, 40px)/1.15 'AugHead', Georgia, serif !important;
  letter-spacing: -.01em;
  text-transform: none;
}

html body.sitewide-page[data-page-family="lexicon"] main.wrap > .term-section :where(p, li) {
  max-width: 72ch;
  font-size: clamp(18px, 1.8vw, 21px);
  line-height: 1.72;
}

html body.sitewide-page[data-page-family="lexicon"] main.wrap details.src-details {
  margin-block: 28px;
  padding: 16px 0;
  border-block: 1px solid var(--sw-line-gold);
}

html body.sitewide-page[data-page-family="lexicon"] main.wrap details.src-details > summary {
  color: var(--sw-ink);
  font-size: 19px;
}

/* 100-term core sample detail pages */
html body.sitewide-page[data-page-family="lexicon"] main.wrap:is(.hf-7fed06) {
  max-width: 1120px;
  padding-block: 32px 76px;
}

html body.sitewide-page[data-page-family="lexicon"] .ruhe-platte.rp-kopf {
  padding: 22px 0 34px;
  border: 0;
  border-bottom: 1px solid var(--sw-line-gold);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

html body.sitewide-page[data-page-family="lexicon"] main.wrap .ruhe-platte {
  border-radius: 0 !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

html body.sitewide-page[data-page-family="lexicon"] .wc-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 18px;
  margin-bottom: 28px;
}

html body.sitewide-page[data-page-family="lexicon"] .wc-nr {
  color: var(--sw-soft);
  font-size: 13px;
  letter-spacing: .04em;
}

html body.sitewide-page[data-page-family="lexicon"] .ruhe-platte.rp-kopf .eyebrow {
  color: var(--sw-gold);
  letter-spacing: .14em;
}

html body.sitewide-page[data-page-family="lexicon"] .ruhe-platte.rp-kopf .symbol {
  margin-block: 4px 8px;
  color: var(--sw-gold);
}

html body.sitewide-page[data-page-family="lexicon"] .ruhe-platte.rp-kopf h1 {
  max-width: 20ch;
  margin: 8px 0 4px;
  color: var(--sw-ink);
  font: 400 clamp(42px, 7vw, 82px)/1.02 'AugHead', Georgia, serif !important;
  letter-spacing: -.035em !important;
  text-transform: none !important;
  overflow-wrap: anywhere;
  word-break: normal;
  text-wrap: balance;
}

html body.sitewide-page[data-page-family="lexicon"] main.wrap > .ruhe-platte:not(.rp-kopf) {
  margin: 0;
  padding: clamp(26px, 4vw, 40px) 0;
  border: 0;
  border-bottom: 1px solid var(--sw-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

html body.sitewide-page[data-page-family="lexicon"] main.wrap > .def-block,
html body.sitewide-page[data-page-family="lexicon"] main.wrap > .simple-block {
  max-width: 74ch;
  margin: 0;
  padding: 28px 0;
  border: 0;
  border-bottom: 1px solid var(--sw-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

html body.sitewide-page[data-page-family="lexicon"] :where(.simple-label, .def-label) {
  color: var(--sw-gold);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

html body.sitewide-page[data-page-family="lexicon"] :where(.simple-de, .def-de, .simple-en, .def-en) {
  line-height: 1.72;
}

html body.sitewide-page[data-page-family="lexicon"] :where(.simple-de, .def-de) {
  color: var(--sw-ink);
  font-size: clamp(19px, 2vw, 23px);
}

html body.sitewide-page[data-page-family="lexicon"] :where(.simple-en, .def-en) {
  color: var(--sw-muted);
  font-size: clamp(17px, 1.8vw, 20px);
}

html body.sitewide-page[data-page-family="lexicon"] .wc-related {
  padding-block: 22px;
  border-bottom: 1px solid var(--sw-line);
}

html body.sitewide-page[data-page-family="lexicon"] :where(.wc-related a, .links a) {
  color: var(--sw-gold);
  text-decoration-color: var(--sw-line-gold);
  text-underline-offset: 4px;
}

html body.sitewide-page[data-page-family="lexicon"] :where(.c48-xrefs, .lex-verwandt, .lex-rueckweg) a {
  color: var(--sw-gold);
  text-decoration-color: var(--sw-line-gold);
  text-underline-offset: 4px;
}

/* Core-sample catalogue and its bilingual entry cards. */
html body.sitewide-page[data-page-family="lexicon"] main.wrap.index,
html body.sitewide-page[data-page-family="lexicon"] main#hauptinhalt:is(.hf-c4792b) {
  max-width: 1180px;
  padding-block: clamp(28px, 5vw, 64px) 80px;
}

html body.sitewide-page[data-page-family="lexicon"] .hero {
  padding: clamp(28px, 5vw, 54px);
  border: 1px solid var(--sw-line-gold);
  border-radius: 16px;
  background: linear-gradient(135deg, #102131, #091625 80%);
}

html body.sitewide-page[data-page-family="lexicon"] .hero h1,
html body.sitewide-page[data-page-family="lexicon"] main#hauptinhalt > h1 {
  max-width: 17ch;
  color: var(--sw-ink);
  font-size: clamp(40px, 6vw, 74px);
  line-height: 1.04;
}

html body.sitewide-page[data-page-family="lexicon"] :where(.count-hero, .count-line, .lex-collection-note) {
  color: var(--sw-muted);
}

html body.sitewide-page[data-page-family="lexicon"] :where(.toolbar, .searchbox) {
  border-color: var(--sw-line-gold);
}

html body.sitewide-page[data-page-family="lexicon"] .searchbox {
  min-height: 54px;
  border-radius: 9px;
  background: #091725;
}

html body.sitewide-page[data-page-family="lexicon"] .searchbox input,
html body.sitewide-page[data-page-family="lexicon"] #termsearch {
  min-height: 48px;
  color: var(--sw-ink);
  background: #07111e;
  border: 1px solid rgb(197 203 208 / 24%);
  border-radius: 7px;
  padding: 10px 14px;
}

html body.sitewide-page[data-page-family="lexicon"] .domain-group {
  margin-block: 22px;
  padding: clamp(18px, 3vw, 32px);
  border: 1px solid var(--sw-line);
  border-radius: 14px;
  background: linear-gradient(135deg, #0d1b29, #081522);
}

html body.sitewide-page[data-page-family="lexicon"] .term-list > li,
html body.sitewide-page[data-page-family="lexicon"] .groups .term {
  border-color: var(--sw-line);
}

html body.sitewide-page[data-page-family="lexicon"] :where(.term-list, .groups) :where(a, .tname) {
  color: var(--sw-ink);
}

/* Explanatory terminology essay, kept to its own content region. */
html body.sitewide-page[data-page-family="lexicon"] main#hauptinhalt:is(.hf-c4792b) {
  max-width: 900px;
}

html body.sitewide-page[data-page-family="lexicon"] main#hauptinhalt:is(.hf-c4792b) > :where(h1, .lede, .content) {
  max-width: 72ch;
}

html body.sitewide-page[data-page-family="lexicon"] .content :where(.def-box, .faq, .terms) {
  margin-block: 18px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--sw-line);
  border-radius: 12px;
  background: linear-gradient(130deg, #102131, #091725);
  color: var(--sw-ink);
}

html body.sitewide-page[data-page-family="lexicon"] .content :where(h2, h3) {
  color: var(--sw-gold);
}

html[lang="ar"] body.sitewide-page[data-page-family="lexicon"] .lexicon-list > li {
  grid-template-columns: minmax(10rem, .44fr) minmax(0, 1fr);
  text-align: start;
}

html[lang="ar"] body.sitewide-page[data-page-family="lexicon"] .lexicon-list > li > a {
  grid-column: 1;
}

html[lang="ar"] body.sitewide-page[data-page-family="lexicon"] .lexicon-list > li > span,
html[lang="ar"] body.sitewide-page[data-page-family="lexicon"] .lexicon-list > li > p {
  grid-column: 2;
}

html[lang="ar"] body.sitewide-page[data-page-family="lexicon"] :where(.term-id, .english-name, .term-code) {
  text-align: start;
}

@media (max-width: 700px) {
  html[data-c48] body.sitewide-page[data-page-family="lexicon"] .c48-header h1{font-size:32px!important;line-height:1.12!important;hyphens:none!important;}
  html[data-c48] body.sitewide-page.lang-de[data-page-family="lexicon"] h1>.accent[data-de],html[data-c48] body.sitewide-page.lang-en[data-page-family="lexicon"] h1>.accent[data-en]{display:block!important;font-size:.9em!important;margin-top:9px!important;}
  html body.sitewide-page[data-page-family="lexicon"] :where(main.wrap, main.page, .lex-hero-inner) {
    width: min(100% - 32px, 1120px);
  }

  html body.sitewide-page[data-page-family="lexicon"] :where(.site-header, .topbar) {
    padding-inline: 16px;
  }

  html body.sitewide-page[data-page-family="lexicon"] .lexicon-list > li {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
    padding: 18px 14px;
  }

  html body.sitewide-page[data-page-family="lexicon"] .lexicon-list > li > a {
    grid-row: auto;
  }

  html[lang="ar"] body.sitewide-page[data-page-family="lexicon"] .lexicon-list > li {
    grid-template-columns: minmax(0, 1fr);
  }

  html[lang="ar"] body.sitewide-page[data-page-family="lexicon"] .lexicon-list > li > :where(a, span, p) {
    grid-column: 1;
  }

  html body.sitewide-page[data-page-family="lexicon"] :where(.lex-controls, .lexicon-search) {
    align-items: stretch;
  }

  html body.sitewide-page[data-page-family="lexicon"] main.page.term .definition {
    padding: 22px 18px;
  }

  html body.sitewide-page[data-page-family="lexicon"] .term-nav {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body.sitewide-page[data-page-family="lexicon"] :where(a, button, input, select) {
    scroll-behavior: auto;
    transition-duration: .01ms;
  }
}
