@font-face {
  font-family: "Lato";
  src: url("/assets/fonts/Lato-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --ink: #17212b;
  --ink-soft: #4e5f77;
  --paper: #ffffff;
  --surface: #f3f6fb;
  --surface-strong: #e7edf8;
  --line: #cad6e9;
  --forest: #2b4ea2;
  --forest-dark: #1f3c82;
  --rust: #b74f36;
  --amber: #d9a441;
  --success: #18734f;
  --danger: #b42318;
  --shadow: 0 14px 34px rgba(23, 33, 43, .08);
  --header-height: 68px;
  color-scheme: light;
  font-family: "Lato", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { min-width: 320px; background: var(--surface); }

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-size: 16px;
  line-height: 1.55;
}

a { color: inherit; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid rgba(43, 78, 162, .25);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -80px;
  z-index: 1000;
  background: var(--ink);
  color: #fff;
  padding: .7rem 1rem;
}
.skip-link:focus { top: 1rem; }

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--header-height);
  display: grid;
  grid-template-columns: minmax(330px, 1fr) minmax(620px, 1.7fr) minmax(210px, .7fr);
  align-items: center;
  gap: 1.25rem;
  padding: .65rem clamp(1rem, 3vw, 2.75rem);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
}
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  background: var(--forest);
  font-family: "Lato", Arial, sans-serif;
  font-weight: 700;
  letter-spacing: 0;
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1rem; line-height: 1.15; }
.brand small { color: var(--ink-soft); font-size: .72rem; }
.brand-publisher-logo { width: 62px; height: 28px; margin-left: .35rem; object-fit: contain; }

.primary-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .25rem;
}
.primary-nav a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: .48rem;
  padding: .6rem .45rem;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  font-size: .92rem;
}

@media (max-width: 1400px) {
  #focusSearch { display: none; }
}
.primary-nav a:hover, .primary-nav a.is-active {
  color: var(--forest);
  border-bottom-color: var(--forest);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .5rem;
  min-width: 0;
}
.icon-button {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
}
.icon-button:hover { color: var(--forest); background: var(--surface); }
.icon-button.bordered { border: 1px solid var(--line); }
.account-button {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: var(--ink-soft);
  text-decoration: none;
}
.account-button span { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.app-main { width: 100%; min-height: calc(100vh - var(--header-height)); }

.research-toolbar, .plain-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(2rem, 5vw, 4.5rem) clamp(1rem, 4vw, 4.5rem) 2rem;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.research-toolbar > div:first-child { max-width: 820px; }
.eyebrow, .side-label {
  display: block;
  color: var(--forest);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.research-toolbar h1, .plain-heading h1 {
  margin: .35rem 0 .25rem;
  font-family: "Lato", Arial, sans-serif;
  font-size: clamp(2rem, 4.4vw, 4.1rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: 0;
}
.research-toolbar p, .plain-heading p { margin: .5rem 0 0; color: var(--ink-soft); font-size: 1.06rem; }
.collection-stat {
  width: 190px;
  flex: 0 0 auto;
  padding-left: 1.25rem;
  border-left: 3px solid var(--rust);
}
.collection-stat strong { display: block; font-size: 2rem; line-height: 1; }
.collection-stat span { display: block; margin-top: .35rem; color: var(--ink-soft); font-size: .82rem; }

.search-workspace {
  display: grid;
  grid-template-columns: minmax(230px, 290px) minmax(0, 1fr);
  min-height: calc(100vh - 250px);
}
.research-sidebar {
  padding: 2rem clamp(1rem, 2vw, 2rem);
  border-right: 1px solid var(--line);
  background: var(--surface-strong);
}
.side-section + .side-section { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.side-label { margin-bottom: .75rem; }
.alphabet { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.alphabet button {
  aspect-ratio: 1;
  border: 1px solid transparent;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
}
.alphabet button:hover { border-color: var(--line); color: var(--forest); background: #fff; }
.alphabet button.is-active { color: #fff; background: var(--forest); }
.alphabet button.wide { grid-column: span 5; aspect-ratio: auto; min-height: 38px; }

.segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  background: #fff;
}
.segmented-control button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
}
.segmented-control button + button { border-left: 1px solid var(--line); }
.segmented-control button.is-active { background: var(--ink); color: #fff; }
.side-link {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .52rem 0;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .9rem;
}
.side-link:hover { color: var(--forest); }

.research-results { min-width: 0; padding: 2rem clamp(1rem, 4vw, 4.5rem) 4rem; }
.search-form {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 42px auto;
  align-items: center;
  gap: .35rem;
  width: 100%;
  max-width: 1160px;
  min-height: 62px;
  border: 1px solid #aebdd7;
  background: #fff;
  box-shadow: var(--shadow);
  padding: .5rem .55rem .5rem 1rem;
}
.search-form > .bi-search { color: var(--forest); font-size: 1.15rem; }
.search-form input {
  min-width: 0;
  height: 44px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 1.05rem;
}
.search-form input::placeholder { color: #7c8983; }
.search-submit, .primary-button, .secondary-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border: 1px solid transparent;
  padding: .65rem 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.search-submit, .primary-button { color: #fff; background: var(--forest); border-color: var(--forest); }
.search-submit:hover, .primary-button:hover { background: var(--forest-dark); border-color: var(--forest-dark); }
.secondary-button { color: var(--ink); background: #fff; border-color: var(--line); }
.secondary-button:hover { color: var(--forest); border-color: var(--forest); }
.autocomplete {
  position: absolute;
  z-index: 20;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}
.autocomplete[hidden] { display: none; }
.autocomplete a {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 24px;
  gap: .5rem;
  align-items: center;
  padding: .78rem 1rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.autocomplete a:hover { background: var(--surface); color: var(--forest); }

.result-bar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-bottom: .8rem;
  border-bottom: 1px solid var(--line);
}
.result-bar strong, .result-bar span { display: block; }
.result-bar strong { font-size: 1.1rem; }
.result-bar span { color: var(--ink-soft); font-size: .82rem; }
.sort-control { color: var(--ink-soft); font-size: .8rem; }
.sort-control select { margin-left: .4rem; border: 1px solid var(--line); background: #fff; padding: .42rem .55rem; color: var(--ink); }

.result-list { display: grid; min-width: 0; }
.result-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  align-items: center;
  min-width: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
}
.result-item:hover { background: rgba(255, 255, 255, .72); }
.result-link {
  min-width: 0;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 1.15rem;
  align-items: center;
  padding: 1rem .35rem 1rem 0;
  text-decoration: none;
}
.result-portrait {
  width: 72px;
  height: 82px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #e3eaf7;
  color: var(--forest-dark);
  font-family: "Lato", Arial, sans-serif;
  font-size: 1.25rem;
}
.result-portrait img { width: 100%; height: 100%; object-fit: cover; }
.result-copy { min-width: 0; display: block; }
.result-title, .result-author, .result-snippet { display: block; }
.result-title { color: var(--ink); font-family: "Lato", Arial, sans-serif; font-size: 1.24rem; line-height: 1.22; }
.result-author { margin-top: .22rem; color: var(--rust); font-size: .78rem; font-weight: 700; }
.result-snippet { margin-top: .35rem; color: var(--ink-soft); font-size: .9rem; line-height: 1.45; }
.favorite-toggle {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
}
.favorite-toggle:hover { border-color: var(--line); background: #fff; color: var(--forest); }
.favorite-toggle.is-favorite { color: var(--rust); }
.favorite-toggle:disabled { opacity: .45; cursor: wait; }

.result-list.is-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: .75rem;
  padding-top: 1rem;
}
.result-list.is-grid .result-item { border: 1px solid var(--line); background: #fff; }
.result-list.is-grid .result-link { grid-template-columns: 64px minmax(0, 1fr); padding: 1rem; }
.result-list.is-grid .result-portrait { width: 58px; height: 68px; }
.result-list.is-grid .result-snippet { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }

.loading-sentinel {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  color: var(--ink-soft);
  font-size: .84rem;
}
.spinner {
  width: 18px;
  height: 18px;
  display: inline-block;
  border: 2px solid var(--line);
  border-top-color: var(--forest);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  color: var(--ink-soft);
}
.empty-state > .bi { color: var(--forest); font-size: 2rem; }
.empty-state h1, .empty-state h2 { margin: .8rem 0 .2rem; color: var(--ink); }
.empty-state .primary-button { margin-top: .8rem; }

.plain-heading { align-items: center; padding-top: 3rem; }
.plain-heading h1 { font-size: clamp(2rem, 3.5vw, 3.35rem); }
.favorites-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 2rem;
  max-width: 1420px;
  margin: 0 auto;
  padding: 2rem clamp(1rem, 4vw, 4rem) 5rem;
}
.context-panel, .related-panel, .carelit-impulse {
  padding: 1.25rem;
  border: 1px solid var(--line);
  background: #fff;
}
.context-panel h2, .related-panel h2, .carelit-impulse h2 { margin: .3rem 0; font-family: "Lato", Arial, sans-serif; font-weight: 700; }
.context-panel p { color: var(--ink-soft); }

.entry-loading { min-height: 60vh; display: flex; align-items: center; justify-content: center; gap: .75rem; color: var(--ink-soft); }
.entry-loading[hidden] { display: none; }
.entry-shell { max-width: 1520px; margin: 0 auto; padding: 1.25rem clamp(1rem, 4vw, 4rem) 5rem; }
.entry-shell[hidden] { display: none; }
.breadcrumb { display: flex; align-items: center; gap: .75rem; color: var(--ink-soft); font-size: .82rem; }
.breadcrumb a { display: inline-flex; gap: .4rem; align-items: center; color: var(--forest); text-decoration: none; }
.breadcrumb span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry-header {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) minmax(220px, 300px);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: end;
  padding: 2rem 0 2.5rem;
  border-bottom: 1px solid var(--line);
}
.entry-portrait-wrap { width: 210px; height: 250px; border: 1px solid var(--line); background: #e3eaf7; overflow: hidden; }
.entry-portrait { width: 100%; height: 100%; object-fit: cover; }
.portrait-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: var(--forest-dark); font-family: "Lato", Arial, sans-serif; font-size: 3rem; }
.portrait-placeholder[hidden] { display: none; }
.entry-heading h1 {
  margin: .45rem 0 .3rem;
  max-width: 900px;
  font-family: "Lato", Arial, sans-serif;
  font-size: clamp(2.2rem, 4.8vw, 5rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}
.entry-author { margin: .7rem 0; color: var(--rust); font-weight: 700; }
.entry-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.3rem; }
.entry-facts { margin: 0; border-top: 3px solid var(--forest); }
.entry-facts div { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: .75rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.entry-facts dt { color: var(--ink-soft); font-size: .76rem; }
.entry-facts dd { min-width: 0; margin: 0; overflow-wrap: anywhere; font-size: .82rem; font-weight: 700; }
.entry-facts a { color: var(--forest); text-decoration-thickness: 1px; text-underline-offset: 2px; }

.timeline-section {
  padding: 2.75rem 0 3rem;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(43, 78, 162, .045), transparent 16%, transparent 84%, rgba(183, 79, 54, .035));
}
.section-heading h2 { margin: .25rem 0 1rem; font-family: "Lato", Arial, sans-serif; font-size: clamp(1.65rem, 2.7vw, 2.45rem); font-weight: 700; }
.life-timeline { padding: 1.5rem 0 .25rem; }
.timeline-range {
  position: relative;
  height: 8px;
  margin: 0 12px;
  background: linear-gradient(90deg, var(--rust) 0%, var(--amber) 46%, #6b87c9 74%, var(--forest) 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 5px 14px rgba(43, 78, 162, .12);
}
.timeline-range::before,
.timeline-range::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 26px;
  height: 26px;
  border: 5px solid #fff;
  background: var(--ink);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 1px var(--line), 0 5px 14px rgba(23, 33, 43, .14);
}
.timeline-range::before { left: 0; }
.timeline-range::after { left: 100%; }
.timeline-range span { display: none; }
.timeline-labels { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; padding-top: 1rem; }
.timeline-labels strong { color: var(--ink); font-size: 1.08rem; font-variant-numeric: tabular-nums; }
.timeline-labels strong:last-child { text-align: right; }
.timeline-labels span {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--ink-soft);
  font-size: .84rem;
  font-weight: 700;
  letter-spacing: 0;
}
.timeline-labels span::before,
.timeline-labels span::after { content: ""; width: 24px; height: 1px; background: var(--line); }

.timeline-events {
  --timeline-event-count: 1;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(var(--timeline-event-count), minmax(0, 1fr));
  grid-template-rows: minmax(128px, auto) 54px minmax(128px, auto);
  gap: 0 clamp(.45rem, 1vw, .9rem);
  margin-top: 2rem;
  padding: .25rem 0;
}
.timeline-events::before {
  content: "";
  z-index: -1;
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: center;
  height: 5px;
  background: linear-gradient(90deg, #5d78b9 0%, #2b4ea2 35%, #b74f36 68%, #d9a441 100%);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 8px 50%);
  opacity: .86;
}
.timeline-event {
  --event-color: #2b4ea2;
  position: relative;
  grid-column: var(--timeline-column);
  display: block;
  min-width: 0;
  padding: .9rem .9rem 1rem;
  border: 1px solid var(--line);
  border-top: 4px solid var(--event-color);
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 10px 22px rgba(23, 33, 43, .065);
  color: var(--ink-soft);
  font-size: clamp(.75rem, .86vw, .84rem);
  line-height: 1.45;
}
.timeline-event.is-above { grid-row: 1; align-self: end; }
.timeline-event.is-below { grid-row: 3; align-self: start; }
.timeline-event::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 1px;
  height: 27px;
  background: var(--event-color);
}
.timeline-event::before {
  content: "";
  position: absolute;
  z-index: 2;
  left: 50%;
  width: 12px;
  height: 12px;
  border: 3px solid #fff;
  background: var(--event-color);
  transform: translateX(-50%);
  box-shadow: 0 0 0 1px var(--event-color);
}
.timeline-event.is-above::after { top: 100%; }
.timeline-event.is-above::before { top: calc(100% + 22px); }
.timeline-event.is-below::after { bottom: 100%; }
.timeline-event.is-below::before { bottom: calc(100% + 22px); }
.timeline-event strong {
  display: block;
  margin-bottom: .3rem;
  color: var(--event-color);
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
}
.timeline-event span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}
.timeline-event.is-p { --event-color: var(--rust); }
.timeline-event.is-m { --event-color: var(--forest); }
.timeline-event.is-o { --event-color: #397d83; }

.entry-content-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: clamp(2rem, 5vw, 5rem); padding-top: 2.5rem; }
.entry-content-grid > div, .entry-content-grid aside { min-width: 0; }
.entry-section + .entry-section { margin-top: 3rem; padding-top: 2.5rem; border-top: 1px solid var(--line); }
.rich-text { max-width: 850px; font-family: "Lato", Arial, sans-serif; font-size: 1.04rem; line-height: 1.78; }
.rich-text p { margin: 0 0 1.25rem; }
.bibliography { margin: 0; padding-left: 1.35rem; }
.bibliography li { padding: .65rem .5rem; border-bottom: 1px solid var(--line); color: var(--ink-soft); overflow-wrap: anywhere; }
.bibliography a, .entry-name-link { color: var(--forest); text-decoration-thickness: 1px; text-underline-offset: 2px; }
.entry-name-link { font-weight: 700; }
.entry-content-grid aside { display: flex; flex-direction: column; gap: 1rem; }
.citation-panel { border-top: 3px solid var(--rust); }
.citation-panel p { font-size: .84rem; line-height: 1.55; overflow-wrap: anywhere; }
.related-panel a { display: grid; grid-template-columns: minmax(0, 1fr) 20px; gap: .5rem; padding: .75rem 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.related-panel a:hover { color: var(--forest); }
.carelit-impulse { border-top: 3px solid var(--forest); }
.carelit-impulse > div > a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  gap: .2rem .55rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
.carelit-impulse > div > a strong { font-size: .9rem; line-height: 1.35; }
.carelit-impulse > div > a span { grid-column: 1; color: var(--ink-soft); font-size: .75rem; }
.carelit-impulse > div > a i { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--forest); }
.carelit-search-link { display: inline-flex; gap: .35rem; margin-top: 1rem; color: var(--forest); font-size: .82rem; font-weight: 700; }

.citation-dialog { width: min(640px, calc(100vw - 2rem)); border: 1px solid var(--line); padding: 1.25rem; background: #fff; box-shadow: var(--shadow); }
.citation-dialog::backdrop { background: rgba(23, 33, 43, .6); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); }
.dialog-heading h2 { font-family: "Lato", Arial, sans-serif; font-weight: 700; }
.citation-box { margin: 1rem 0; padding: 1rem; background: var(--surface); overflow-wrap: anywhere; }

.toast-region { position: fixed; z-index: 100; right: 1rem; bottom: 1rem; display: grid; gap: .5rem; }
.toast-message { max-width: 360px; padding: .8rem 1rem; border-left: 4px solid var(--forest); background: var(--ink); color: #fff; box-shadow: var(--shadow); }
.toast-message.is-error { border-left-color: var(--danger); }

.admin-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem clamp(1rem, 3vw, 3rem);
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.admin-heading h1 { margin: .25rem 0 0; font-family: "Lato", Arial, sans-serif; font-size: clamp(2rem, 3vw, 3rem); font-weight: 700; }
.admin-heading p { margin: .25rem 0 0; color: var(--ink-soft); }
.admin-workspace { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); min-height: calc(100vh - 190px); }
.admin-list-panel { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: var(--surface-strong); }
.admin-search { display: grid; grid-template-columns: 22px minmax(0, 1fr) 42px; align-items: center; gap: .4rem; margin: 1rem; border: 1px solid var(--line); background: #fff; padding-left: .7rem; }
.admin-search input { min-width: 0; height: 44px; border: 0; outline: 0; background: transparent; }
.admin-list-meta { padding: 0 1rem .75rem; color: var(--ink-soft); font-size: .8rem; }
.admin-entry-list { display: grid; max-height: calc(100vh - 300px); overflow-y: auto; }
.admin-entry { display: block; width: 100%; padding: .8rem 1rem; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.admin-entry:hover, .admin-entry.is-active { background: #fff; box-shadow: inset 3px 0 var(--forest); }
.admin-entry span, .admin-entry small { display: block; }
.admin-entry span { font-weight: 700; }
.admin-entry small { margin-top: .2rem; color: var(--ink-soft); }
.admin-load-more { margin: 1rem; }
.editor-panel { min-width: 0; background: #fff; }
.editor-empty { min-height: 520px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--ink-soft); text-align: center; }
.editor-empty > i { color: var(--forest); font-size: 2rem; }
.editor-empty h2 { margin: .6rem 0 .2rem; color: var(--ink); font-family: "Lato", Arial, sans-serif; font-weight: 700; }
.entry-editor { padding: 1.5rem clamp(1rem, 3vw, 3rem) 3rem; }
.entry-editor[hidden] { display: none; }
.editor-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--line); }
.editor-header h2 { margin: .2rem 0 0; max-width: 700px; font-family: "Lato", Arial, sans-serif; font-size: 1.8rem; font-weight: 700; overflow-wrap: anywhere; }
.editor-actions { display: flex; gap: .5rem; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; padding-top: 1.5rem; }
.field { display: grid; gap: .4rem; color: var(--ink-soft); font-size: .8rem; font-weight: 700; }
.field.span-2 { grid-column: span 2; }
.field input, .field textarea { width: 100%; min-width: 0; border: 1px solid var(--line); background: #fff; color: var(--ink); padding: .7rem; font-weight: 400; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--forest); outline: 3px solid rgba(43, 78, 162, .12); }
.editor-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.danger-button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; border: 1px solid var(--danger); background: #fff; color: var(--danger); padding: .62rem 1rem; font-weight: 700; cursor: pointer; }
.danger-button:hover { background: var(--danger); color: #fff; }
.confirm-dialog { width: min(480px, calc(100vw - 2rem)); border: 1px solid var(--line); padding: 1.25rem; box-shadow: var(--shadow); }
.confirm-dialog::backdrop { background: rgba(23, 33, 43, .6); }
.dialog-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1rem; }

.image-upload-field { grid-template-columns: 110px minmax(0, 1fr); align-items: center; }
.image-upload-preview { width: 100px; height: 118px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); background: var(--surface-strong); color: var(--ink-soft); }
.image-upload-preview img { width: 100%; height: 100%; object-fit: cover; }
.image-upload-controls { display: grid; gap: .6rem; }
.image-upload-controls input[type="file"] { padding: .5rem; }

.app-footer { border-top: 1px solid var(--line); background: #fff; color: var(--ink-soft); }
.footer-inner { display: grid; grid-template-columns: 1.15fr 1fr .75fr 1.15fr; gap: clamp(1.5rem, 4vw, 4rem); max-width: 1520px; margin: 0 auto; padding: 2.5rem clamp(1rem, 4vw, 4rem); }
.footer-inner section, .footer-inner nav { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; }
.footer-inner strong { margin-bottom: .4rem; color: var(--ink); }
.footer-inner a { color: var(--ink-soft); text-decoration: none; }
.footer-inner a:hover { color: var(--forest); text-decoration: underline; }
.footer-inner p { margin: 0 0 .35rem; }
.footer-publisher img { width: 112px; height: 48px; object-fit: contain; object-position: left center; }
.footer-action { margin-top: .45rem; border-bottom: 2px solid var(--forest); color: var(--forest) !important; font-weight: 700; }
.footer-bottom { padding: .9rem clamp(1rem, 4vw, 4rem); border-top: 1px solid var(--line); background: var(--surface); font-size: .78rem; text-align: center; }

.login-page { min-height: 100vh; background: var(--surface); }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr); }
.login-intro { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: clamp(2rem, 8vw, 8rem); background: var(--forest-dark); color: #fff; }
.login-intro img { width: 120px; height: 54px; margin-bottom: 2rem; padding: .4rem; background: #fff; object-fit: contain; }
.login-intro .eyebrow { color: #cbd8f5; }
.login-intro h1 { max-width: 700px; margin: .6rem 0 1rem; font-size: clamp(2.6rem, 6vw, 5.6rem); line-height: 1; }
.login-intro p { max-width: 680px; font-size: 1.15rem; color: #e5ebf8; }
.login-intro ul { margin: 1.5rem 0 0; padding-left: 1.2rem; color: #e5ebf8; }
.login-intro li + li { margin-top: .55rem; }
.login-form-panel { display: flex; flex-direction: column; justify-content: center; padding: clamp(2rem, 7vw, 7rem); background: #fff; }
.login-form-panel h2 { margin: .4rem 0 .25rem; font-size: 2rem; }
.login-form-panel > div > p { margin: 0 0 1.5rem; color: var(--ink-soft); }
.login-form-panel form, .login-form-panel label { display: grid; gap: .45rem; }
.login-form-panel form { gap: 1rem; }
.login-form-panel label span { font-weight: 700; }
.login-form-panel input { width: 100%; min-height: 48px; border: 1px solid var(--line); padding: .7rem .8rem; }
.login-submit { width: 100%; margin-top: .25rem; }
.login-divider { display: flex; align-items: center; gap: .8rem; margin: 1rem 0; color: var(--ink-soft); font-size: .78rem; }
.login-divider::before, .login-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.login-intranet { width: 100%; justify-content: center; min-height: 48px; text-decoration: none; }
.login-error { margin-bottom: 1rem; padding: .8rem 1rem; border-left: 4px solid var(--danger); background: #fff1f0; color: var(--danger); }
.password-reset { align-self: flex-start; margin-top: 1rem; color: var(--forest); }
.login-purchase { margin-top: 2rem; color: var(--ink-soft); }
.login-purchase a { color: var(--forest); font-weight: 700; }
.login-client-ip {
  position: fixed;
  right: .75rem;
  bottom: .55rem;
  z-index: 10;
  color: var(--ink-soft);
  font-size: .68rem;
  line-height: 1;
  opacity: .78;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

/* Startseite */
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, .65fr);
  gap: clamp(2rem, 6vw, 7rem);
  align-items: center;
  padding: clamp(3rem, 7vw, 7rem) clamp(1rem, 5vw, 6rem);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(231, 237, 248, .84), rgba(255, 255, 255, .96) 62%), var(--paper);
}
.home-hero-copy { max-width: 920px; }
.home-hero h1 { max-width: 850px; margin: .55rem 0 1rem; font-size: clamp(3rem, 6.5vw, 6.7rem); font-weight: 700; line-height: .98; }
.home-hero-copy > p { max-width: 760px; margin: 0; color: var(--ink-soft); font-size: 1.12rem; }
.home-search { max-width: 900px; margin-top: 2rem; }
.home-quicklinks { display: flex; flex-wrap: wrap; gap: .55rem 1.2rem; margin-top: 1rem; }
.home-quicklinks a { display: inline-flex; align-items: center; gap: .4rem; color: var(--forest); font-size: .84rem; font-weight: 700; text-decoration: none; }
.home-quicklinks a:hover { text-decoration: underline; }
.featured-person { position: relative; display: grid; grid-template-columns: 112px minmax(0, 1fr) 24px; gap: 1rem; align-items: end; min-width: 0; padding: 1.25rem; border: 1px solid var(--line); border-top: 4px solid var(--rust); background: #fff; color: var(--ink); text-decoration: none; box-shadow: var(--shadow); }
.featured-person:hover { border-color: var(--forest); }
.featured-label { position: absolute; top: 1rem; left: 1.25rem; color: var(--forest); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.featured-portrait { width: 112px; height: 138px; display: grid; place-items: center; overflow: hidden; margin-top: 1.5rem; background: var(--surface-strong); color: var(--forest); font-size: 2rem; font-weight: 700; }
.featured-portrait img { width: 100%; height: 100%; object-fit: cover; }
.featured-copy { min-width: 0; display: block; }
.featured-copy strong, .featured-copy small, .featured-copy > span { display: block; }
.featured-copy strong { font-size: 1.2rem; line-height: 1.25; }
.featured-copy small { margin-top: .25rem; color: var(--rust); font-weight: 700; }
.featured-copy > span { display: -webkit-box; margin-top: .6rem; overflow: hidden; color: var(--ink-soft); font-size: .82rem; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
.featured-person > .bi { align-self: start; color: var(--forest); }
.home-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); background: var(--forest-dark); color: #fff; }
.home-metrics > div, .home-metrics > a { min-width: 0; padding: 1.5rem clamp(1rem, 3vw, 3rem); border-right: 1px solid rgba(255,255,255,.2); color: #fff; text-decoration: none; }
.home-metrics > :last-child { border-right: 0; }
.home-metrics strong, .home-metrics span { display: block; }
.home-metrics strong { font-size: clamp(1.8rem, 3vw, 3rem); line-height: 1; }
.home-metrics span { margin-top: .45rem; color: #dce6fb; font-size: .78rem; }
.home-metrics a:hover { background: rgba(255,255,255,.08); }
.home-editorial { padding: 3.5rem clamp(1rem, 5vw, 6rem); border-bottom: 1px solid var(--line); background: #fff; }
.home-editorial > header { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .65fr); gap: 2rem; align-items: end; max-width: 1500px; margin: 0 auto 1.5rem; }
.home-editorial h2 { margin: .3rem 0 0; font-size: clamp(1.8rem, 3vw, 3.2rem); line-height: 1.1; }
.home-editorial header > p { margin: 0; color: var(--ink-soft); }
.editorial-paths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 1500px; margin: 0 auto; border-top: 1px solid var(--line); }
.editorial-paths > a { display: grid; grid-template-columns: 44px minmax(0, 1fr) 24px; gap: 1rem; align-items: center; padding: 1.25rem .75rem; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.editorial-paths > a:nth-child(odd) { border-right: 1px solid var(--line); }
.editorial-paths > a > .bi:first-child { color: var(--rust); font-size: 1.4rem; }
.editorial-paths strong, .editorial-paths small { display: block; }
.editorial-paths small { margin-top: .25rem; color: var(--ink-soft); }
.editorial-paths > a > .bi:last-child { color: var(--forest); }
.editorial-paths > a:hover { color: var(--forest); background: var(--surface); }
.home-page .search-workspace { scroll-margin-top: var(--header-height); }

/* Redaktionelle Seiten */
.editorial-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3rem; align-items: end; padding: clamp(3rem, 7vw, 7rem) clamp(1rem, 5vw, 6rem) 3rem; border-bottom: 1px solid var(--line); background: #fff; }
.editorial-hero > div:first-child { max-width: 1050px; }
.editorial-hero h1 { margin: .5rem 0 .8rem; font-size: clamp(2.8rem, 5.5vw, 5.8rem); line-height: 1; }
.editorial-hero p { max-width: 850px; margin: 0; color: var(--ink-soft); font-size: 1.08rem; }
.editorial-hero-number { color: var(--surface-strong); font-size: clamp(7rem, 16vw, 15rem); font-weight: 700; line-height: .65; user-select: none; }
.volume-tabs { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line); background: var(--paper); }
.volume-tabs a { min-height: 72px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-right: 1px solid var(--line); color: var(--ink-soft); text-decoration: none; }
.volume-tabs a:last-child { border-right: 0; }
.volume-tabs a small { margin-top: .1rem; }
.volume-tabs a:hover, .volume-tabs a.is-active { color: #fff; background: var(--forest); }
.volume-tabs.compact { max-width: 1500px; margin: 1.5rem auto 0; border: 1px solid var(--line); }
.volume-tabs.compact a { min-height: 54px; }
.preface-layout { display: grid; grid-template-columns: minmax(0, 860px) minmax(260px, 340px); gap: clamp(2rem, 7vw, 7rem); max-width: 1400px; margin: 0 auto; padding: 3rem clamp(1rem, 4vw, 4rem) 6rem; }
.preface-article { min-width: 0; }
.preface-article header { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.preface-article h2 { margin: .35rem 0; font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1.08; }
.preface-byline { margin: 0; color: var(--rust); font-weight: 700; }
.preface-article > p { margin: 0 0 1.35rem; font-family: "Lato", Arial, sans-serif; font-size: 1.05rem; line-height: 1.8; }
.preface-article > .preface-lead { font-size: 1.22rem; color: #293a52; }
.preface-article > .preface-lead::first-letter { float: left; margin: .12rem .5rem 0 0; color: var(--forest); font-size: 4rem; font-weight: 700; line-height: .8; }
.preface-article footer { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: .84rem; }
.preface-aside { display: flex; flex-direction: column; gap: 1rem; }
.preface-aside section { padding: 1.25rem; border: 1px solid var(--line); border-top: 3px solid var(--rust); background: #fff; }
.preface-aside strong { display: block; margin-top: .5rem; font-size: 2.4rem; }
.preface-aside p { color: var(--ink-soft); }
.preface-aside a { display: inline-flex; align-items: center; gap: .4rem; color: var(--forest); font-size: .84rem; font-weight: 700; }
.people-summary { display: flex; gap: 2rem; }
.people-summary div { min-width: 100px; padding-left: 1rem; border-left: 3px solid var(--rust); }
.people-summary strong, .people-summary span { display: block; }
.people-summary strong { font-size: 2.2rem; }
.people-summary span { color: var(--ink-soft); font-size: .75rem; }
.people-directory { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; max-width: 1500px; margin: 2rem auto 5rem; padding: 0 clamp(1rem, 4vw, 4rem); background: var(--line); border: 1px solid var(--line); }
.person-card { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 1rem; min-width: 0; padding: 1.3rem; background: #fff; }
.person-monogram { width: 50px; height: 50px; display: grid; place-items: center; background: var(--surface-strong); color: var(--forest); font-weight: 800; }
.person-card h2, .author-card h2 { margin: 0; font-size: 1.05rem; }
.person-card p { margin: .25rem 0 .65rem; color: var(--ink-soft); font-size: .8rem; }
.volume-badges { display: flex; flex-wrap: wrap; gap: .25rem; }
.volume-badges span { padding: .18rem .4rem; background: var(--surface); color: var(--forest); font-size: .67rem; font-weight: 700; }
.author-directory { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; max-width: 1500px; margin: 0 auto; padding: 2.5rem clamp(1rem, 4vw, 4rem) 6rem; }
.author-card { display: flex; flex-direction: column; min-width: 0; min-height: 270px; padding: 1.25rem; border: 1px solid var(--line); border-top: 3px solid var(--forest); background: #fff; }
.author-card header { display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: .85rem; align-items: center; }
.author-card header p { margin: .2rem 0 0; color: var(--rust); font-size: .75rem; font-weight: 700; }
.author-location { display: flex; gap: .4rem; margin: .8rem 0; color: var(--ink-soft); font-size: .78rem; }
.author-entry-links { display: grid; margin-top: .5rem; }
.author-entry-links a { display: grid; grid-template-columns: minmax(0, 1fr) 18px; gap: .35rem; padding: .45rem 0; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: .76rem; text-decoration: none; }
.author-entry-links a:hover { color: var(--forest); }
.author-search { margin-top: auto; padding-top: .9rem; color: var(--forest); font-size: .8rem; font-weight: 700; }
.index-total { padding-left: 1.2rem; border-left: 4px solid var(--rust); }
.index-total strong, .index-total span { display: block; }
.index-total strong { font-size: clamp(2.5rem, 5vw, 5rem); line-height: 1; }
.index-total span { margin-top: .4rem; color: var(--ink-soft); font-size: .8rem; }
.index-tools { position: sticky; top: var(--header-height); z-index: 20; display: grid; grid-template-columns: minmax(280px, 520px) minmax(0, 1fr); gap: 2rem; align-items: center; padding: 1rem clamp(1rem, 4vw, 4rem); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.97); }
.index-tools form { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: .5rem; border: 1px solid var(--line); padding-left: .7rem; }
.index-tools input { min-width: 0; height: 44px; border: 0; outline: 0; }
.index-tools button { align-self: stretch; border: 0; padding: 0 1rem; background: var(--forest); color: #fff; font-weight: 700; cursor: pointer; }
.index-alphabet { display: flex; justify-content: flex-end; overflow-x: auto; }
.index-alphabet a { min-width: 29px; height: 34px; display: grid; place-items: center; color: var(--ink-soft); font-size: .72rem; text-decoration: none; }
.index-alphabet a:hover, .index-alphabet a.is-active { background: var(--forest); color: #fff; }
.index-results { max-width: 1500px; margin: 0 auto; padding: 2rem clamp(1rem, 4vw, 4rem); }
.index-results > header { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: .75rem; border-bottom: 2px solid var(--ink); }
.index-results > header span { color: var(--ink-soft); font-size: .8rem; }
.name-register { margin: 0; padding: 0; list-style: none; }
.name-register li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .55fr); gap: 1rem; align-items: center; padding: .72rem .4rem; border-bottom: 1px solid var(--line); }
.register-name { min-width: 0; }
.register-name a, .register-name span { display: inline-flex; align-items: center; gap: .4rem; overflow-wrap: anywhere; font-size: .94rem; }
.register-name a { color: var(--forest); font-weight: 700; text-decoration: none; }
.register-name a:hover { text-decoration: underline; }
.register-name i { font-size: .72rem; }
.register-references { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .3rem; }
.register-references span { padding: .22rem .45rem; background: var(--surface-strong); color: var(--ink-soft); font-size: .68rem; }
.pagination { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center; max-width: 1500px; margin: 0 auto 5rem; padding: 0 clamp(1rem, 4vw, 4rem); }
.pagination a { display: inline-flex; align-items: center; gap: .4rem; color: var(--forest); font-weight: 700; text-decoration: none; }
.pagination a:last-child { justify-self: end; }
.pagination > span { color: var(--ink-soft); }

@media (max-width: 1050px) {
  .app-header { grid-template-columns: minmax(280px, 1fr) minmax(0, 1.45fr) auto; }
  .brand-publisher-logo { display: none; }
  .primary-nav a span { display: none; }
  .account-button span { display: none; }
  .entry-header { grid-template-columns: 160px minmax(0, 1fr); }
  .entry-portrait-wrap { width: 160px; height: 200px; }
  .entry-facts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .entry-facts div { display: block; padding: .75rem; border-right: 1px solid var(--line); }
  .timeline-events {
    display: block;
    margin-top: 1.75rem;
    padding: 0 0 0 42px;
  }
  .timeline-events::before {
    position: absolute;
    z-index: 0;
    inset: 0 auto 0 14px;
    width: 4px;
    height: auto;
    background: linear-gradient(180deg, #2b4ea2, #b74f36 68%, #d9a441);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), 50% 100%, 0 calc(100% - 8px));
  }
  .timeline-event,
  .timeline-event.is-above,
  .timeline-event.is-below {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    gap: .75rem;
    margin: 0 0 .9rem;
  }
  .timeline-event strong { margin: 0; }
  .timeline-event span { -webkit-line-clamp: 4; }
  .timeline-event::after {
    top: 1.45rem !important;
    bottom: auto !important;
    left: -28px;
    width: 28px;
    height: 1px;
  }
  .timeline-event::before {
    top: calc(1.45rem - 5px) !important;
    bottom: auto !important;
    left: -30px;
  }
  .home-hero { grid-template-columns: minmax(0, 1fr) minmax(300px, .55fr); gap: 2rem; }
  .home-hero h1 { font-size: clamp(3rem, 7vw, 5.2rem); }
  .featured-person { grid-template-columns: 82px minmax(0, 1fr) 18px; }
  .featured-portrait { width: 82px; height: 106px; }
  .people-directory, .author-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .index-tools { display: block; }
  .index-alphabet { justify-content: flex-start; margin-top: .75rem; }
}

@media (max-width: 780px) {
  :root { --header-height: 62px; }
  .app-header { grid-template-columns: minmax(0, 1fr) auto; padding-inline: .8rem; }
  .brand small { display: none; }
  .brand-title strong { font-size: .86rem; }
  .brand-mark { width: 38px; height: 38px; }
  .primary-nav {
    position: fixed;
    z-index: 50;
    left: 0;
    right: 0;
    bottom: 0;
    justify-content: space-around;
    min-height: 58px;
    border-top: 1px solid var(--line);
    background: #fff;
  }
  .primary-nav a { flex-direction: column; gap: 0; padding: .35rem .55rem; font-size: .68rem; }
  .primary-nav a span { display: block; }
  .primary-nav a.nav-optional { display: none; }
  .header-actions > .icon-button { display: none; }
  .account-button span { display: none; }
  .app-main { padding-bottom: 58px; }
  .research-toolbar, .plain-heading { align-items: start; padding-top: 2rem; }
  .collection-stat { display: none; }
  .search-workspace { display: block; }
  .research-sidebar { border-right: 0; border-bottom: 1px solid var(--line); padding-block: 1rem; }
  .research-sidebar .side-section:not(:first-child) { display: none; }
  .side-section + .side-section { margin: 0; padding: 0; border: 0; }
  .alphabet { grid-template-columns: repeat(9, minmax(0, 1fr)); overflow-x: auto; }
  .alphabet button { min-width: 34px; aspect-ratio: auto; height: 34px; }
  .alphabet button.wide { grid-column: span 2; }
  .research-results { padding: 1rem 1rem 3rem; }
  .search-form { grid-template-columns: 24px minmax(0, 1fr) 38px; }
  .search-submit { grid-column: 1 / -1; }
  .result-bar { align-items: start; }
  .sort-control { display: none; }
  .favorites-layout, .entry-content-grid { grid-template-columns: 1fr; }
  .favorites-layout .context-panel { order: -1; }
  .entry-header { grid-template-columns: 100px minmax(0, 1fr); gap: 1rem; align-items: start; }
  .entry-portrait-wrap { width: 100px; height: 126px; }
  .entry-heading h1 { font-size: clamp(1.9rem, 8vw, 3rem); }
  .entry-facts { display: block; }
  .entry-facts div { display: grid; border-right: 0; }
  .entry-content-grid aside { order: -1; }
  .timeline-labels span::before, .timeline-labels span::after { display: none; }
  .admin-heading { align-items: flex-start; }
  .admin-workspace { grid-template-columns: 1fr; }
  .admin-list-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .admin-entry-list { max-height: 300px; }
  .field-grid { grid-template-columns: 1fr; }
  .field.span-2 { grid-column: span 1; }
  .editor-header { align-items: flex-start; flex-direction: column; }
  .footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-shell { grid-template-columns: 1fr; }
  .login-intro { min-height: 42vh; padding: 2.5rem 1.5rem; }
  .login-intro h1 { font-size: 2.7rem; }
  .login-form-panel { padding: 2.5rem 1.5rem 4rem; }
  .home-hero { display: block; padding-top: 3rem; }
  .home-hero h1 { font-size: clamp(2.8rem, 12vw, 4.5rem); }
  .featured-person { margin-top: 2rem; }
  .home-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-metrics > div, .home-metrics > a { border-bottom: 1px solid rgba(255,255,255,.2); }
  .home-editorial > header, .editorial-paths { grid-template-columns: 1fr; }
  .editorial-paths > a:nth-child(odd) { border-right: 0; }
  .editorial-hero { display: block; padding-top: 3rem; }
  .editorial-hero-number { display: none; }
  .people-summary { margin-top: 2rem; }
  .volume-tabs { overflow-x: auto; grid-template-columns: repeat(7, minmax(105px, 1fr)); }
  .preface-layout { grid-template-columns: 1fr; }
  .preface-aside { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .people-directory, .author-directory { grid-template-columns: 1fr; }
  .name-register li { grid-template-columns: 1fr; }
  .register-references { justify-content: flex-start; }
}

@media (max-width: 520px) {
  .research-toolbar, .plain-heading { padding-inline: 1rem; }
  .research-toolbar h1 { font-size: 2.15rem; }
  .result-link { grid-template-columns: 58px minmax(0, 1fr); gap: .75rem; }
  .result-portrait { width: 54px; height: 64px; }
  .result-title { font-size: 1.06rem; }
  .result-snippet { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .entry-header { display: block; }
  .entry-portrait-wrap { width: 118px; height: 145px; margin-bottom: 1rem; }
  .brand-title small { display: none; }
  .footer-inner { grid-template-columns: 1fr; }
  .image-upload-field { grid-template-columns: 1fr; }
  .home-metrics { grid-template-columns: 1fr; }
  .featured-person { grid-template-columns: 72px minmax(0, 1fr) 18px; }
  .featured-portrait { width: 72px; height: 92px; }
  .home-editorial { padding-inline: 1rem; }
  .editorial-paths > a { grid-template-columns: 36px minmax(0, 1fr) 18px; padding-inline: .25rem; }
  .people-summary { flex-wrap: wrap; gap: 1rem; }
  .preface-aside { grid-template-columns: 1fr; }
  .index-hero .index-total { margin-top: 1.5rem; }
  .index-tools { position: static; }
  .pagination { grid-template-columns: 1fr auto 1fr; }
}

@media print {
  @page { size: A4 portrait; margin: 14mm 15mm 16mm; }

  html, body {
    min-width: 0;
    background: #fff !important;
    color: #111;
    font-family: "Lato", Arial, sans-serif;
    font-size: 10.5pt;
    line-height: 1.48;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .app-header, .app-footer, .entry-actions, .breadcrumb, .primary-nav,
  .toast-region, .citation-dialog, .related-panel, .carelit-impulse,
  .context-panel button { display: none !important; }

  .app-main { min-height: 0; padding: 0 !important; }
  .entry-loading { display: none !important; }
  .entry-shell {
    display: block !important;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
  }
  .entry-shell::before {
    content: "Biographisches Lexikon zur Pflegegeschichte  |  hpsmedia";
    display: block;
    margin-bottom: 7mm;
    padding-bottom: 2.5mm;
    border-bottom: .6pt solid #7f8da3;
    color: #334155;
    font-size: 8.5pt;
    font-weight: 700;
  }

  .entry-header {
    display: grid !important;
    grid-template-columns: 34mm minmax(0, 1fr) !important;
    gap: 4mm 8mm !important;
    align-items: start;
    padding: 0 0 6mm;
    border-bottom: .6pt solid #aeb8c7;
    break-inside: avoid;
  }
  .entry-portrait-wrap {
    grid-row: 1 / span 2;
    width: 34mm !important;
    height: 43mm !important;
    margin: 0;
    border: .6pt solid #aeb8c7;
  }
  .entry-heading { min-width: 0; }
  .entry-heading .eyebrow { color: #2b4ea2; font-size: 7.5pt; }
  .entry-heading h1 {
    max-width: none;
    margin: 2mm 0 1.5mm;
    color: #111;
    font-size: 23pt !important;
    font-weight: 700;
    line-height: 1.08;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: auto;
  }
  .entry-author { margin: 1.5mm 0 0; color: #5d2c22; font-size: 9.5pt; }
  .entry-facts {
    grid-column: 2;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    margin: 0;
    border-top: .8pt solid #2b4ea2;
  }
  .entry-facts div {
    display: block !important;
    min-width: 0;
    padding: 2mm 2.5mm;
    border-right: .4pt solid #d5dbe5;
    border-bottom: .4pt solid #d5dbe5;
  }
  .entry-facts div:last-child { border-right: 0; }
  .entry-facts dt { margin-bottom: .8mm; font-size: 7pt; }
  .entry-facts dd { font-size: 8pt; overflow-wrap: anywhere; }

  .timeline-section {
    padding: 7mm 0 6mm;
    border-bottom: .6pt solid #aeb8c7;
    break-inside: avoid;
  }
  .section-heading h2 { margin: 1mm 0 4mm; font-size: 16pt; }
  .life-timeline { padding-top: 3mm; }
  .timeline-range { height: 2mm; box-shadow: none; }
  .timeline-range::before, .timeline-range::after { width: 4mm; height: 4mm; border-width: 1mm; box-shadow: none; }
  .timeline-labels { padding-top: 2mm; }
  .timeline-labels span::before, .timeline-labels span::after { display: none; }
  .timeline-events {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    gap: 0 6mm;
    margin-top: 4mm;
    padding: 0;
    border-top: .4pt solid #d5dbe5;
  }
  .timeline-events::before, .timeline-event::before, .timeline-event::after { display: none; }
  .timeline-event,
  .timeline-event.is-above,
  .timeline-event.is-below {
    grid-column: auto;
    grid-row: auto;
    display: grid;
    grid-template-columns: 14mm minmax(0, 1fr);
    gap: 2mm;
    margin: 0;
    padding: 2mm 0;
    border: 0;
    border-bottom: .4pt solid #d5dbe5;
    background: transparent;
    box-shadow: none;
    font-size: 8.5pt;
  }
  .timeline-event strong { margin: 0; font-size: 9pt; }
  .timeline-event span { display: block; overflow: visible; }

  .entry-content-grid {
    display: block !important;
    padding-top: 7mm;
  }
  .entry-content-grid > div { min-width: 0; }
  .entry-section + .entry-section { margin-top: 8mm; padding-top: 6mm; }
  .rich-text { max-width: none; font-size: 10.5pt; line-height: 1.55; }
  .rich-text p { margin: 0 0 3.5mm; orphans: 3; widows: 3; }
  .bibliography { padding-left: 6mm; font-size: 9pt; }
  .bibliography li { padding: 2mm 1mm; break-inside: avoid; }
  .bibliography a, .entry-name-link { color: #111; text-decoration: underline; font-weight: inherit; }

  .entry-content-grid aside { display: block !important; margin-top: 8mm; }
  .citation-panel {
    padding: 4mm 0 0;
    border: 0;
    border-top: .8pt solid #b74f36;
    background: transparent;
    break-inside: avoid;
  }
  .citation-panel p { margin-bottom: 0; color: #333; font-size: 8.5pt; }
}
