/* Aufzeichnungen – Stylesheet
   Ton: Papier, Serifen, Ruhe. Die Titelseite als Broadsheet, die Einträge als Buchseite. */

:root {
  --paper: #f3eee4;
  --paper-deep: #ebe4d6;
  --ink: #221f1b;
  --ink-soft: #4a443c;
  --muted: #7a7266;
  --rule: #d3cab9;
  --rule-strong: #8f8371;
  --accent: #5b3a2e;
  --measure: 36rem;
  --broadsheet: 74rem;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", Georgia, "Times New Roman", serif;
  --display: "Bodoni MT", "Didot", "Bodoni 72", "Libre Bodoni", "Playfair Display", var(--serif);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1b1916;
    --paper-deep: #211e1a;
    --ink: #e6dfd2;
    --ink-soft: #c9c1b2;
    --muted: #8f8779;
    --rule: #3a352d;
    --rule-strong: #6b6253;
    --accent: #c9a48f;
  }
}

* { box-sizing: border-box; }

html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 112.5%;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: oldstyle-nums;
  hyphens: auto;
  -webkit-hyphens: auto;
}

body {
  margin: 0;
  padding: 3rem 1.25rem 4rem;
  max-width: var(--measure);
  margin-inline: auto;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--rule-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { text-decoration-color: var(--accent); color: var(--accent); }

/* ============ Gemeinsames ============ */

.kicker,
.entry__date {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-variant-numeric: lining-nums;
}

/* Sprachumschalter oben rechts */
.lang-switch {
  display: flex;
  justify-content: flex-end;
  align-items: baseline;
  gap: 0.7rem;
  margin: -1.75rem 0 1.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-variant-numeric: lining-nums;
}
body.front .lang-switch { margin: 0 0 0.6rem; }
.lang-switch__current { color: var(--ink-soft); }
.lang-switch__link {
  text-decoration: none;
  color: var(--ink-soft);
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  padding: 0.12rem 0.6rem 0.08rem;
}
.lang-switch__link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--paper-deep);
}

code {
  font-family: ui-monospace, Consolas, "Courier New", monospace;
  font-size: 0.85em;
}
.empty { color: var(--muted); font-style: italic; }

/* ============ Kopf der Innenseiten ============ */

.masthead {
  text-align: center;
  padding-bottom: 1.1rem;
  margin-bottom: 2.75rem;
  border-bottom: 1px solid var(--rule-strong);
  position: relative;
}
.masthead::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  border-bottom: 1px solid var(--rule-strong);
}
.masthead__title {
  display: inline-block;
  font-size: 1.05rem;
  font-variant: small-caps;
  letter-spacing: 0.32em;
  text-indent: 0.32em;
  text-decoration: none;
  color: var(--ink);
}
.masthead__subtitle {
  margin: 0.35rem 0 0;
  font-style: italic;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ============ Titelseite (Broadsheet) ============ */

body.front {
  max-width: var(--broadsheet);
  padding-top: 1.5rem;
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(0, 0, 0, 0.012) 3px 4px);
}

.front__topline {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule);
  padding: 0.35rem 0;
  font-variant-numeric: lining-nums;
}
.front__topline span:nth-child(2) { text-align: center; }
.front__topline span:last-child { text-align: right; }

.front__masthead {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
  padding: 1.6rem 0 1.1rem;
}
.front__masthead > * { min-width: 0; }
.front__title { text-align: center; }
.front__name {
  margin: 0;
  font-family: var(--display);
  font-weight: normal;
  font-size: clamp(1.6rem, 6.4vw, 5.2rem);
  line-height: 1;
  letter-spacing: 0.08em;
  text-indent: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.front__name a { text-decoration: none; color: var(--ink); }
.front__subtitle {
  margin: 0.55rem 0 0;
  font-style: italic;
  font-size: 1rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.ear {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  border: 1px solid var(--rule-strong);
  padding: 0.55rem 0.8rem;
  font-size: 0.82rem;
  line-height: 1.35;
  white-space: nowrap;
  font-variant-numeric: lining-nums;
}
.ear--left { justify-self: start; }
.ear--right { justify-self: end; text-align: right; }
.ear__label {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.front__dateline {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 0;
  margin-bottom: 2rem;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  font-size: 0.85rem;
  font-variant-caps: small-caps;
  font-variant-numeric: lining-nums;
  letter-spacing: 0.12em;
  position: relative;
}
.front__dateline::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  border-bottom: 1px solid var(--ink);
}

/* Raster: Aufmacher links, Randspalte rechts, durch Hairline getrennt */
.front__grid {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(15rem, 1fr);
  gap: 0 2.5rem;
}
.rail {
  border-left: 1px solid var(--rule);
  padding-left: 2.5rem;
}

/* Aufmacher */
.lead__title {
  margin: 0.15rem 0 0.5rem;
  font-family: var(--display);
  font-weight: normal;
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.lead__title a { text-decoration: none; }
.lead__title a:hover { text-decoration: underline; }
.lead__dek {
  margin: 0 0 1.4rem;
  font-style: italic;
  color: var(--muted);
  font-size: 0.95rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--rule);
}
.lead__body {
  column-count: 2;
  column-gap: 2.2rem;
  column-rule: 1px solid var(--rule);
  text-align: justify;
  font-size: 1rem;
  line-height: 1.58;
}
.lead__body p {
  margin: 0;
  text-indent: 1.4em;
  orphans: 3;
  widows: 3;
}
.lead__body p:first-child { text-indent: 0; }
.lead__body p:first-child::first-letter {
  float: left;
  font-family: var(--display);
  font-size: 3.9em;
  line-height: 0.78;
  padding: 0.08em 0.08em 0 0;
  color: var(--ink);
}
.lead__continue {
  margin: 1.2rem 0 0;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: right;
  font-variant-numeric: lining-nums;
}
.lead__continue a { text-decoration: none; border-bottom: 1px solid var(--rule-strong); }
.lead__continue a:hover { border-color: var(--accent); }

/* Randspalte: Kästen */
.box {
  padding: 0 0 1.4rem;
  margin: 0 0 1.4rem;
  border-bottom: 1px solid var(--rule);
}
.box:last-child { border-bottom: 0; }
.box__title {
  margin: 0 0 0.7rem;
  font-size: 0.72rem;
  font-weight: normal;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.box__title::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--rule);
}
.box p { margin: 0; font-size: 0.92rem; }

.toc {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
  font-variant-numeric: lining-nums;
}
.toc__item + .toc__item { margin-top: 0.35rem; }
.toc__item a {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  text-decoration: none;
}
.toc__item a:hover .toc__title { text-decoration: underline; }
.toc__title { hyphens: none; }
.toc__leader {
  flex: 1;
  border-bottom: 1px dotted var(--rule-strong);
  transform: translateY(-0.3em);
  min-width: 1rem;
}
.toc__page { color: var(--muted); }

.pull {
  margin: 0;
  padding: 0;
  font-size: 1.22rem;
  line-height: 1.35;
  font-style: italic;
  text-wrap: balance;
}
.pull p { margin: 0; font-size: inherit; }
.pull p::before { content: "«"; }
.pull p::after { content: "»"; }
/* Französische Guillemets mit schmalem geschütztem Abstand */
:lang(fr) .pull p::before { content: "«\202F"; }
:lang(fr) .pull p::after { content: "\202F»"; }
.pull__cite {
  margin: 0.6rem 0 0 !important;
  font-size: 0.8rem !important;
  color: var(--muted);
  text-align: right;
}
.pull__cite a { text-decoration: none; }
.pull__cite::before { content: "— "; }

.box--notice p { color: var(--ink-soft); font-size: 0.88rem; }

/* Frühere Einträge, unterhalb des Falzes */
.briefs { margin-top: 2.5rem; }
.section-rule {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 0 1.2rem;
  font-size: 0.78rem;
  font-weight: normal;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-rule::before,
.section-rule::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--ink);
}
.briefs__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 2rem;
}
.brief {
  padding: 0 0 1.5rem;
  border-right: 1px solid var(--rule);
  padding-right: 2rem;
  margin-bottom: 1.5rem;
}
.brief:nth-child(3n),
.brief:last-child { border-right: 0; }
.brief__title {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  font-weight: normal;
  line-height: 1.2;
  text-wrap: balance;
}
.brief__title a { text-decoration: none; }
.brief__title a:hover { text-decoration: underline; }
.brief__excerpt {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
  text-align: justify;
}
.brief__page {
  margin: 0.5rem 0 0;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-variant-numeric: lining-nums;
}
.brief__page a { text-decoration: none; }

.impressum {
  margin-top: 3rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--ink);
  font-size: 0.78rem;
  color: var(--muted);
  font-style: italic;
  text-align: center;
}
.impressum p { margin: 0; }

body.front .colophon { margin-top: 1.5rem; border-top: 0; }

/* ============ Einzelner Eintrag ============ */

.backlink {
  margin: -1.5rem 0 2.25rem;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--muted);
}
.entry__head { margin-bottom: 2rem; }
.entry__title {
  margin: 0;
  font-size: 2rem;
  font-weight: normal;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.entry__dek {
  margin: 0.5rem 0 0;
  font-style: italic;
  color: var(--muted);
}
.entry__body p {
  margin: 0;
  text-indent: 1.6em;
}
.entry__body p:first-child,
.entry__body .sources + p {
  text-indent: 0;
}
.entry__body p:first-child::first-letter {
  font-size: 1.15em;
}
/* Folgeabsätze nur eingerückt, ohne Abstand (Buchsatz); nach einer Quellenzeile neuer Absatzblock. */
.entry__body p + p { margin-top: 0; }
.entry__body .sources + p { margin-top: 1rem; }

.sources {
  margin: 0.4rem 0 0 !important;
  text-indent: 0 !important;
  font-size: 0.74rem;
  line-height: 1.5;
  color: var(--muted);
  letter-spacing: 0.01em;
  hyphens: none;
}
.sources__label {
  font-variant: small-caps;
  letter-spacing: 0.12em;
  margin-right: 0.35em;
}
.sources__label::after { content: ":"; }

/* Vor/Zurück */
.entry-nav {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9rem;
}
.entry-nav a {
  display: block;
  max-width: 48%;
  text-decoration: none;
  line-height: 1.35;
}
.entry-nav a:hover { text-decoration: underline; }
.entry-nav__newer { text-align: right; margin-left: auto; }
.entry-nav__label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.15rem;
  font-variant-numeric: lining-nums;
}

/* ============ Fuß ============ */

.colophon {
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  font-variant: small-caps;
  letter-spacing: 0.14em;
}
.colophon p { margin: 0; }

/* ============ Kleine Bildschirme ============ */

@media (max-width: 56rem) {
  .front__grid { grid-template-columns: 1fr; }
  .rail {
    border-left: 0;
    padding-left: 0;
    margin-top: 2.5rem;
    border-top: 1px solid var(--ink);
    padding-top: 1.5rem;
  }
  .briefs__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brief:nth-child(3n) { border-right: 1px solid var(--rule); }
  .brief:nth-child(2n), .brief:last-child { border-right: 0; }
}

@media (max-width: 40rem) {
  html { font-size: 106%; }
  body { padding: 2rem 1.1rem 3rem; }
  body.front { padding-top: 1rem; overflow-x: hidden; }
  .front__topline span:nth-child(2) { display: none; }
  .front__name { font-size: clamp(1.5rem, 7.6vw, 2.4rem); letter-spacing: 0.06em; }
  .front__masthead {
    grid-template-columns: 1fr;
    gap: 0.8rem;
    padding: 1.2rem 0 0.8rem;
  }
  .ear { display: none; }
  .front__dateline { flex-direction: column; gap: 0.1rem; }
  .lead__body { column-count: 1; }
  .briefs__grid { grid-template-columns: 1fr; }
  .brief { border-right: 0 !important; padding-right: 0; }
  .entry__title { font-size: 1.65rem; }
  .masthead { margin-bottom: 2rem; }
}

@media print {
  html { background: #fff; color: #000; font-size: 11.5pt; }
  body { max-width: none; padding: 0; }
  .backlink, .entry-nav, .colophon, .lead__continue, .brief__page, .lang-switch { display: none; }
  a { text-decoration: none; color: inherit; }
}
