/* ========================================================================
   OPENBUREAU — site-level overrides on top of shibui.
   Differentiation from kgva.ch: serif body, strong wordmark, wider column,
   editorial journal entries (not portfolio cards), more breathing room,
   no 8bit cursor.
   ======================================================================== */

@import url('https://fonts.bunny.net/css?family=newsreader:400,400i,500,500i,600,600i,700,700i,800,800i|ibm-plex-mono:400,500|space-grotesk:400,500,700|inter:400,500,600');

:root {
  /* Typography — editorial:
     serif body, display for headings/nav, sans (Inter) for listings/labels,
     mono kept narrow (code, dates, technical stamps). */
  --font-family-serif: 'Newsreader', Charter, 'Source Serif Pro', Georgia, serif;
  --font-family-sans:  'Inter', system-ui, -apple-system, sans-serif;
  --font-family-mono:  'IBM Plex Mono', 'Courier New', ui-monospace, monospace;
  --font-family-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-family-mono-shibui: var(--font-family-mono);

  --font-size-base: 1.1875rem;   /* +2pt vs. 1.0625 — better body legibility */
  --font-size-small: 0.875rem;
  --font-size-code: 0.95rem;

  --spacing-base: 1.7em;
  --spacing-xs: calc(var(--spacing-base) * 0.25);
  --spacing-sm: calc(var(--spacing-base) * 0.5);
  --spacing-md: var(--spacing-base);
  --spacing-lg: calc(var(--spacing-base) * 2);
  --spacing-xl: calc(var(--spacing-base) * 3);

  --container-width: 72ch;

  /* Off-white paper + warm ink */
  --bg-h: 35;
  --bg-s: 14%;
  --bg-l: 96%;

  --color-bg-primary: hsl(var(--bg-h) var(--bg-s) var(--bg-l));
  --color-bg-secondary: hsl(var(--bg-h) var(--bg-s) calc(var(--bg-l) - 3%));
  --color-border: hsl(var(--bg-h) var(--bg-s) calc(var(--bg-l) - 12%));
  --color-text-primary: hsl(25 18% 10%);
  --color-text-muted: hsl(25 8% 38%);
  --color-text-code: hsl(25 10% 22%);

  --accent: #b54a2c;
  --accent-soft: #d97a5a;

  /* Republik-aligned tokens */
  --color-dark-panel: #191919;        /* masthead/footer/hero */
  --color-dark-panel-text: #f0f0f0;
  --color-dark-panel-muted: #a9a9a9;

  /* Section accents — warm palette tuned to OPENBUREAU's terracotta brand.
     Each library section reads on the warm-paper background. */
  --section-color-software: #b54a2c;       /* terracotta — brand primary */
  --section-color-buerofuehrung: #D0913C;  /* gold — warm/editorial */
  --section-color-theorie: #7d2e16;        /* deep rust — heavier weight */

  /* Per-post color palette — Japanese accents, soft and editorial.
     Set `color: <name>` in front matter (e.g. color: sakura). */
  --palette-ajisai:   #A39EC4;  /* hydrangea (lavender) */
  --palette-sakura:   #C49EC4;  /* cherry blossom (pink) */
  --palette-suna:     #C4C19E;  /* sand (warm beige) */
  --palette-ichigo:   #C49EA0;  /* strawberry (rose) */
  --palette-yuyake:   #CEB188;  /* sunset (peach) */
  --palette-sora:     #9EC3C4;  /* sky (teal) */
  --palette-kusa:     #9EC49F;  /* grass (green) */
  --palette-kori:     #A5B4CB;  /* ice (cool blue) */
  --palette-amagumo:  #4C4C4C;  /* rain cloud (grey) */
  --palette-yuki:     #F0F0F0;  /* snow (near white) */

  color-scheme: light;
}

/* ------------------------------------------------------------------------
   Base body — serif editorial, 3-col grid so header/footer can full-bleed
   while content stays boxed
   ------------------------------------------------------------------------ */
/* Theme setzt html{margin-left:calc(100vw - 100%)} (Anti-Scrollbar-Sprung) —
   das schiebt die GANZE Seite um die Scrollbar-Breite nach rechts → weißer
   Streifen links. Zurücknehmen: alles bündig am linken Rand. */
/* Scrollbalken-Platz auf der Wurzel reservieren UND horizontalen Überlauf hier
   kappen → Inhaltsbreite identisch auf ALLEN Seiten (auch Home ohne Scrollbar),
   damit das zentrierte Logo/Menü nirgends springt. */
/* Kein Seiten-Scroll, kein Scrollbalken-Gutter → Header/Footer reichen bis ganz
   an den rechten Rand (schwarz bis zur Kante). Gescrollt wird nur main intern. */
html { margin: 0; overflow: hidden; }

body {
  font-family: var(--font-family-serif);
  font-size: var(--font-size-base);
  line-height: 1.55;
  padding: 0;
  margin: 0;
  /* App-Rahmen auf ALLEN Seiten: feste Höhe, Seite scrollt nicht — Header oben,
     Footer unten, der Inhalt (main) scrollt INTERN mit verstecktem Scrollbalken. */
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0;   /* Theme-main.css setzt body{gap:spacing-lg} → erzeugte Balken zwischen Header/main/Footer */
}
body > header.site-header,
body > footer { flex: none; }
body > main {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;            /* Scrollbalken aus (kein weißer Streifen) */
  -ms-overflow-style: none;
}
body > main::-webkit-scrollbar { width: 0; height: 0; display: none; }
/* Kurzer Inhalt vertikal zentriert zwischen Header und Footer; langer Inhalt
   scrollt normal von oben (safe center fällt bei Überlauf auf start zurück). */
body:not(.is-home) > main {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;   /* Inhalt startet direkt unter dem Header (keine Zentrier-Bänder) */
}
/* Inhalt 72ch-zentriert in der vollbreiten Scroll-Fläche (Home = Vollbreite). */
body:not(.is-home) > main > * {
  max-width: calc(var(--container-width) + 3.5rem);
  margin-inline: auto;
  padding-inline: 1.75rem;
  flex: none;
}
/* Full-Bleed-Hero füllt die ganze Breite (main ist schon viewportbreit). */
body:not(.is-home) > main > .single-hero-image {
  max-width: none;
  margin-inline: 0;
  padding-inline: 0;
}


p { margin: var(--spacing-sm) 0; }
/* Republik-style: serif headlines as the visual anchor, not sans display */
h1, h2, h3, h4, h5 { font-family: var(--font-family-serif); font-weight: 600; letter-spacing: -0.015em; }

/* Disable shibui's nested h2/h3/h4 counters everywhere on this site */
h2::before, h3::before, h4::before, h5::before { content: none !important; }

code, pre, kbd, samp { font-family: var(--font-family-mono); }
code { font-size: var(--font-size-code); }

a {
  color: var(--color-text-primary);
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
  margin-left: 0;
}
a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ------------------------------------------------------------------------
   Site header — black masthead, Republik-style serif wordmark
   Full-bleed bar with content-column-aligned inner layout
   ------------------------------------------------------------------------ */
.site-header {
  background: var(--color-dark-panel);
  color: var(--color-dark-panel-text);
  /* etwas Luft über dem Logo und unter dem Menü */
  padding: 0.7rem 0 0.35rem;
  border-bottom: none;
  margin-bottom: 0;
  /* inner 3-col grid matches body so wordmark/nav align with content column */
  display: grid;
  grid-template-columns:
    1fr
    min(var(--container-width), 100% - 3.5rem)
    1fr;
  align-items: center;
  row-gap: 0;
}
.site-header > * { grid-column: 2; }
.site-header .wordmark-link,
.site-header .site-nav {
  grid-column: 2;
}
/* Inner row: wordmark center, nav under it (closer to Republik's stacked masthead).
   To get wordmark + nav as one row instead, change to grid-template-columns: auto 1fr. */
.site-header {
  /* override: stack wordmark above nav, both within content column */
}

/* Logo as background image (paths-only SVG, no font dependency) */
/* Wortmark: eigener SVG-Schriftzug „openbureau" (logo-ob2.svg). */
.wordmark-link {
  border: none;
  margin: 0;
  padding: 0;
  display: block;
  justify-self: center;
  width: clamp(154px, 19.8vw, 220px);
  aspect-ratio: 1412 / 231;
  height: auto;
  background-image: url("/logo/logo.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
.wordmark-text {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.wordmark-link:hover,
.wordmark-link:focus { border: none; opacity: 0.85; }

.site-header .site-nav {
  justify-self: center;
  /* Luft zwischen Logo und Menü. */
  margin-top: 0.32em;
}

.wordmark-link:focus-visible { outline: 2px dotted var(--color-text-muted); outline-offset: 4px; }

.wordmark-tagline {
  font-family: var(--font-family-serif);
  font-style: italic;
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
  margin: 0;
  max-width: 32ch;
  line-height: 1.35;
  text-align: right;
}
@media (max-width: 720px) {
  .wordmark-tagline { text-align: left; max-width: 38ch; }
}

/* Site nav — under wordmark, white on black masthead.
   Keeps the original display font (Space Grotesk) — only colour changes. */
.site-nav nav {
  margin: 0;
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.6rem;
  font-family: var(--font-family-display);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.site-nav li { margin: 0; }
.site-nav a {
  border: none;
  color: #d4d4d4;
}
.site-nav a:hover { color: #fff; }
.site-nav a.active,
.site-nav a.ancestor {
  color: #fff;
  font-weight: 600;
}

/* Breadcrumb (only on non-home pages) */
.path-nav {
  font-family: var(--font-family-mono);
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.path-nav ol {
  list-style: none;
  margin-left: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
}
.path-nav li { margin: 0; }
.path-nav a {
  border: none;
  color: var(--color-text-muted);
}
.path-nav a:hover { color: var(--accent); }
.path-nav li.current a { color: var(--color-text-primary); }

/* ------------------------------------------------------------------------
   Journal (home) — editorial entries, not portfolio cards
   ------------------------------------------------------------------------ */
.journal-header {
  margin-top: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}
.journal-header h2 {
  font-size: 0.95rem;
  font-family: var(--font-family-mono);
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin: 0 0 0.25rem;
}
.journal-header p {
  margin: 0;
  font-style: italic;
}

.journal-list {
  list-style: none;
  margin-left: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── Journal: ZWEI eigenständig scrollbare Spalten, eckige Karten aneinander ──
   .journal-cols = zwei Spalten nebeneinander (kein Abstand). Jede .journal-list
   ist EINE Spalte, die für sich scrollt (overflow-y). Karten ohne Rundung und
   ohne Abstände — direkt aneinander, nur eine Hairline als Trenner. */
/* Volle Breite (aus der 72ch-Spalte ausbrechen) */
.journal { width: 100vw; position: relative; left: 50%; margin-left: -50vw; }
.journal-header { padding: 0 10px; }
.journal-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.journal-list {            /* eine Spalte — eigenständig scrollbar */
  margin: 0;
  padding: 0;
  max-height: 82vh;
  overflow-y: auto;
}
.journal-cols > .journal-list:first-child { border-right: 1px solid var(--color-border); }
.journal-entry {
  border: none;
  border-radius: 0;
  background: var(--color-bg-secondary);
  padding: 1.5rem;
  margin: 0;
}
.journal-entry + .journal-entry { border-top: 1px solid var(--color-border); }
/* In den Karten links bündig statt zentriert */
.journal-list .journal-entry .journal-entry-body { justify-items: start; text-align: left; }
.journal-list .journal-entry .journal-entry-body > * { max-width: none; }
.journal-list .journal-bg-image {
  width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: 0; margin-bottom: 0.9rem;
}
@media (max-width: 720px) {
  .journal-cols { grid-template-columns: 1fr; }
  .journal-cols > .journal-list:first-child { border-right: none; }
  .journal-list { max-height: none; overflow: visible; }
}

/* ── Startseite: Full-Height-Layout ──────────────────────────────────────────
   Masthead oben, zwei eigenständig scrollbare Spalten in der Mitte, Footer klebt
   unten. Die Seite selbst scrollt nicht — nur die Spalten (overflow-y). Kette
   definierter Höhen: body 100dvh → main (1fr) → .journal → .journal-cols → Spalte. */
/* Flexbox statt Grid für die Home-Höhenverteilung: flex:none hält Header und
   Footer exakt auf Inhaltshöhe (im Grid wurde der Header gestreckt → Menü
   rutschte nach unten). Nur main füllt die Mitte. */
body.is-home {
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0;
}
body.is-home > header.site-header { margin-bottom: 0; flex: none; }
body.is-home > footer { flex: none; }
body.is-home > main {
  flex: 1 1 auto;             /* füllt die Mitte */
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
/* Kein Text über den Spalten: Intro + „Journal"-Header weg → Spalten beginnen
   direkt unter der Masthead und füllen die volle weiße Höhe. */
body.is-home > main > p { display: none; }
body.is-home .journal-header { display: none; }
body.is-home .journal {
  width: auto; left: auto; margin: 0;   /* 100vw-Ausbruch zurücknehmen */
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
}
body.is-home .journal-cols { flex: 1; min-height: 0; }
body.is-home .journal-list {
  display: flex; flex-direction: column;
  max-height: none; height: 100%; min-height: 0; overflow-y: auto;
  scrollbar-width: none;          /* Firefox: Scrollbar aus */
  -ms-overflow-style: none;       /* alte Edge */
}
body.is-home .journal-list::-webkit-scrollbar { width: 0; height: 0; display: none; }
/* Karten in NATÜRLICHER Höhe (kein Stretch) → Bild + Headline bleiben kompakt
   zusammen; die Spalte scrollt bei Überlauf. Kein Auseinanderreißen mehr. */
body.is-home .journal-entry { flex: 0 0 auto; }
body.is-home .more { flex: none; padding: 0.4rem 10px; margin: 0; }
/* Footer kompakt (~1/3): kein großer Außenabstand, knappes Padding. */
body.is-home > footer { margin-top: 0; padding: 0.55rem 1.5rem; }

@media (max-width: 720px) {
  /* Mobil: kein Full-Height-Rahmen — normale Seite scrollt, kein interner Scroll. */
  html { overflow: visible; }
  body { height: auto; min-height: 100dvh; overflow: visible; }
  body > main { overflow: visible; }
  body.is-home { height: auto; overflow: visible; }
  body.is-home > main { display: block; overflow: visible; }
  body.is-home .journal { display: block; }
  body.is-home .journal-cols { min-height: 0; }
  body.is-home .journal-list { height: auto; overflow: visible; }
}

/* Card link: image (optional) + body block */
.journal-entry-link,
.journal-entry-link:hover,
.journal-entry-link:focus {
  display: block;
  border: none;
  margin: 0;
  padding: 0;
  color: inherit;
  text-decoration: none;
}

.journal-entry-body {
  display: grid;
  grid-auto-flow: row;
  row-gap: 0.7rem;
}
.journal-entry-body > * { margin: 0; }

/* Center non-hero entries' content (excluding icon-mode which has horizontal layout) */
.journal-entry:not(.journal-entry--hero):not([data-image="icon"]) .journal-entry-body {
  justify-items: start;
  text-align: left;
}
.journal-entry:not(.journal-entry--hero):not([data-image="icon"]) .journal-entry-body > * {
  max-width: 55ch;
}
.journal-entry:not(.journal-entry--hero):not([data-image="icon"]) > .tag-pills {
  text-align: center;
}

/* Rubric (section label, own line above headline) — Republik pattern */
.journal-rubric {
  margin: 0;
  line-height: 1;
}

/* Byline: single smooth sans line, "Von Author, DD.MM.YYYY" — Republik-style */
.journal-byline {
  font-family: var(--font-family-sans);
  font-size: 0.95rem;
  font-style: normal;
  font-weight: 400;
  line-height: 1.4;
  color: var(--color-text-muted);
  margin: 0;
  white-space: normal;
}
.journal-byline .journal-author {
  color: var(--color-text-primary);
  font-weight: 500;
  text-decoration: none;
}
.journal-byline .journal-date { font-variant-numeric: tabular-nums; }

/* Legacy .journal-meta retained for backwards-compat if any markup references it */
.journal-meta {
  font-family: var(--font-family-mono);
  font-size: var(--font-size-small);
  line-height: 1.3;
  color: var(--color-text-muted);
  display: flex;
  gap: 0.8rem;
  align-items: baseline;
}
.journal-section {
  display: inline-block;
  background: color-mix(in oklab, var(--section-color, var(--accent)) 35%, transparent);
  color: var(--color-text-primary);
  font-family: var(--font-family-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
  line-height: 1.35;
}
/* Hero section label sits on its own line above the headline */
.journal-entry--hero .journal-section {
  font-size: 0.9rem;
  letter-spacing: 0.12em;
}
.journal-author::before { content: "Von "; color: var(--color-text-muted); font-weight: 400; }
.journal-entry--hero .journal-author::before { color: var(--color-dark-panel-muted); }

.journal-title {
  font-family: var(--font-family-serif);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--color-text-primary);
  transition: color 0.15s ease;
}

/* Section-color mapping — sets --section-color per entry so meta label
   and hero top-border pick up the right accent. */
[data-section="software"]       { --section-color: var(--section-color-software); }
[data-section="buerofuehrung"]  { --section-color: var(--section-color-buerofuehrung); }
[data-section="theorie"]        { --section-color: var(--section-color-theorie); }

/* Per-post color override (front matter `color: <name>`) — wins over section */
[data-color="ajisai"]   { --section-color: var(--palette-ajisai); }
[data-color="sakura"]   { --section-color: var(--palette-sakura); }
[data-color="suna"]     { --section-color: var(--palette-suna); }
[data-color="ichigo"]   { --section-color: var(--palette-ichigo); }
[data-color="yuyake"]   { --section-color: var(--palette-yuyake); }
[data-color="sora"]     { --section-color: var(--palette-sora); }
[data-color="kusa"]     { --section-color: var(--palette-kusa); }
[data-color="kori"]     { --section-color: var(--palette-kori); }
[data-color="amagumo"]  { --section-color: var(--palette-amagumo); }
[data-color="yuki"]     { --section-color: var(--palette-yuki); }

/* Autor-Seite (/authors/<slug>/) — zentriert: rundes Bild, Name, Kurztext */
.author-page {
  max-width: 54ch;
  margin: 0 auto;
  padding: var(--spacing-xl) var(--spacing-md);
  text-align: center;
}
.author-photo {
  width: 168px;
  height: 168px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto var(--spacing-md);
}
.author-name {
  font-family: var(--font-family-serif);
  margin: 0 0 var(--spacing-sm);
}
.author-bio {
  color: var(--color-text-muted);
  line-height: 1.7;
}
.author-bio p { margin: 0 0 1em; }
a.byline-author, a.journal-author { color: inherit; text-decoration: none; }
a.byline-author:hover, a.journal-author:hover { color: var(--accent); }

/* ── Dialog ───────────────────────────────────────────────────────────────── */
/* Link am Ende des Beitrags (der Beitrag selbst bleibt sauber) */
/* Dialog-Pill: Akzent-Outline + Pfeil — sticht neben den gefüllten Tag-Pills
   hervor (wie der frühere Dialog-Link). */
.prov-dialog {
  display: inline-block;
  font-family: var(--font-family-display);
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--accent);
  text-decoration: none;
  background: none;
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.28em 0.85em;
}
.prov-dialog:hover { background: var(--accent); color: #fff; }

/* Eigene Dialog-Seite (/dialog/?thread=…) */
/* Füllt die normale Inhaltsspalte (kein eigenes max-width/Seiten-Padding → gleiche Breite wie andere Seiten) */
/* width:100% → füllt immer die ganze Inhaltsspalte (sonst schrumpft .dialog-page
   als Flex-Item mit margin-inline:auto bei schmalem Inhalt, z.B. Forum-Ansicht). */
.dialog-page { width: 100%; padding: var(--spacing-sm) 0 var(--spacing-xl); }
.dialog-overview { display: flex; flex-direction: column; gap: 0.6em; }
.dialog-overview-item {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1em;
  border: 1px solid var(--color-border); border-radius: 12px;
  padding: 0.8em 1em; background: var(--color-bg-secondary);
}
.dialog-overview-item:hover { border-color: var(--accent); color: inherit; }
.dialog-ov-title { font-family: var(--font-family-serif); font-weight: 600; }
.dialog-ov-meta { font-size: var(--font-size-small); color: var(--color-text-muted); flex: none; }
.dialog-back { margin: 0 0 var(--spacing-sm); }
.dialog-back:empty { margin: 0; }
.dialog-back a { color: var(--color-text-muted); text-decoration: none; }
.dialog-back a:hover { color: var(--accent); }
/* Dialog-Navigation oben: Breadcrumb (Dialoge › Forum). */
.dialog-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45em; font-size: var(--font-size-small); }
.dialog-crumb a { color: var(--color-text-muted); text-decoration: none; }
.dialog-crumb a:hover { color: var(--accent); }
.dialog-crumb-sep { color: var(--color-text-muted); }

.dialog-title {
  font-family: var(--font-family-serif);
  margin: 0 0 var(--spacing-md);
}
.dialog-list { display: flex; flex-direction: column; margin-bottom: var(--spacing-lg); }
.dialog-empty { color: var(--color-text-muted); font-style: italic; }
/* Nüchterne Wortmeldung: keine Box — nur feine Trennlinie + Abstand. */
.dialog-post { padding: 1.15em 0; border-bottom: 1px solid var(--color-border); }
.dialog-post:first-child { padding-top: 0.2em; }
.dialog-post:last-child { border-bottom: none; }
.dialog-post-head { display: flex; align-items: center; gap: 0.7em; margin-bottom: 0.5em; }
.dialog-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  background: var(--color-border) center/cover no-repeat;
  display: grid; place-items: center; font-weight: 600; color: var(--color-text-muted);
}
.dialog-ident { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.dialog-nameline { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.5em; }
.dialog-name { font-weight: 600; }
.dialog-pos { font-size: var(--font-size-small); color: var(--color-text-muted); }
.dialog-time { font-size: var(--font-size-small); color: var(--color-text-muted); margin-top: 0.1em; }
.dialog-replyto { font-size: var(--font-size-small); color: var(--accent); }
.dialog-body { font-family: var(--font-family-serif); line-height: 1.6; white-space: pre-wrap; }
.dialog-actions { display: flex; gap: 0.8em; margin-top: 0.6em; }
.dialog-actions button {
  background: none; border: none; padding: 0; cursor: pointer;
  font-size: var(--font-size-small); color: var(--color-text-muted);
}
.dialog-actions button:hover { color: var(--accent); }

.dialog-composer { display: flex; flex-direction: column; gap: 0.6em; }
.dialog-loginhint { color: var(--color-text-muted); margin: 0; }
/* Subtiles Login: dezenter Text-Link statt dominantem Formular. */
.dialog-loginlink {
  align-self: flex-start; font: inherit; font-size: var(--font-size-small);
  background: none; border: none; padding: 0.2em 0; cursor: pointer;
  color: var(--color-text-muted); text-decoration: underline; text-underline-offset: 3px;
}
.dialog-loginlink:hover { color: var(--accent); }
.dialog-loginform { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4em; font-size: var(--font-size-small); max-width: 30em; }
.dialog-loginform .dialog-input { width: auto; flex: 1 1 8em; min-width: 7em; padding: 0.35em 0.6em; font-size: inherit; border-radius: 7px; }
.dialog-loginform .dialog-send { padding: 0.35em 0.9em; font-size: inherit; }
.dialog-logincancel { align-self: center; }

/* ── Übersicht: Split-View (links letzte Wortmeldungen, rechts Foren) ── */
.dialog-split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2.4em; align-items: start; }
@media (max-width: 720px) { .dialog-split { grid-template-columns: 1fr; gap: 1.6em; } }
/* Schlichte Auflistung statt Karten: nur Trennlinien + großzügiger Abstand. */
.dialog-recent-list, .dialog-forum-list, .dialog-thread-list { display: flex; flex-direction: column; }
.dialog-recent-item, .dialog-forum-item, .dialog-thread-item {
  display: block; text-decoration: none; color: inherit;
  padding: 1.05em 0;
  border-bottom: 1px solid var(--color-border);
  transition: color .12s;
}
.dialog-recent-item:first-child, .dialog-forum-item:first-child, .dialog-thread-item:first-child { padding-top: 0.3em; }
.dialog-recent-item:last-child, .dialog-forum-item:last-child, .dialog-thread-item:last-child { border-bottom: none; }
.dialog-recent-item:hover, .dialog-thread-item:hover { color: var(--accent); }
.dialog-recent-top { display: flex; justify-content: space-between; gap: 1em; align-items: baseline; }
.dialog-recent-author { font-weight: 600; }
.dialog-recent-meta, .dialog-thread-meta, .dialog-forum-meta { color: var(--color-text-muted); font-size: var(--font-size-small); }
.dialog-recent-thread { font-family: var(--font-family-serif); font-style: italic; color: var(--accent); margin: 0.15em 0; }
.dialog-recent-body { color: var(--color-text-muted); font-size: var(--font-size-small);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Foren-Auflistung: Name mit kleinem Farbpunkt (Forum-Farbe), Meta darunter. */
.dialog-forum-name {
  display: flex; align-items: center; gap: 0.55em;
  font-family: var(--font-family-serif); font-weight: 600; font-size: var(--font-size-base);
}
.dialog-forum-name::before {
  content: ""; flex: none; width: 0.6em; height: 0.6em; border-radius: 2px;
  background: var(--forum-accent, var(--accent));
}
.dialog-forum-item:hover .dialog-forum-name { color: var(--accent); }
.dialog-forum-meta { display: block; margin-top: 0.15em; }
.dialog-forum-desc { display: block; color: var(--color-text-muted); font-size: var(--font-size-small); margin-top: 0.2em; }

/* Forum-Ansicht */
.dialog-forum-head { border-left: 4px solid var(--forum-accent, var(--accent)); padding-left: 0.6em; }
.dialog-thread-title { display: block; font-weight: 600; }
.dialog-lock { color: var(--color-text-muted); }
.dialog-newthread { margin: 0.4em 0 1.4em; display: flex; flex-direction: column; gap: 0.6em; }
.dialog-newbtn { align-self: flex-start; font: inherit; cursor: pointer; padding: 0.5em 1.2em; border-radius: 999px;
  background: var(--accent); color: #fff; border: 1px solid var(--accent); }
.dialog-newbtn:hover { background: #a23f23; }

/* Thread-Ansicht: Moderationsleiste */
.dialog-modbar { display: flex; align-items: center; gap: 0.6em; margin: 0.2em 0 1em; flex-wrap: wrap; }
.dialog-modbar:empty { display: none; }
.dialog-modlabel { color: var(--color-text-muted); font-size: var(--font-size-small); }
.dialog-modbtn { font: inherit; font-size: var(--font-size-small); cursor: pointer; padding: 0.3em 0.9em; border-radius: 999px;
  background: none; border: 1px solid var(--color-border); color: var(--color-text-muted); }
.dialog-modbtn:hover { border-color: var(--accent); color: var(--accent); }
.dialog-locked { color: var(--color-text-muted); font-style: italic; margin: 0.4em 0; }
.dialog-textarea, .dialog-input {
  width: 100%; font: inherit; padding: 0.7em 0.9em;
  border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-bg-primary);
}
.dialog-textarea { min-height: 90px; resize: vertical; font-family: var(--font-family-serif); }
.dialog-row { display: flex; gap: 0.6em; }
.dialog-send {
  font: inherit; cursor: pointer; padding: 0.55em 1.3em; border-radius: 999px;
  background: var(--accent); color: #fff; border: 1px solid var(--accent);
}
.dialog-send:hover { background: #a23f23; }
.dialog-logout { font: inherit; cursor: pointer; padding: 0.55em 1.1em; border-radius: 999px; background: none; border: 1px solid var(--color-border); color: var(--color-text-muted); }
.dialog-replychip { align-self: flex-start; font-size: var(--font-size-small); cursor: pointer; padding: 0.25em 0.8em; border-radius: 999px; border: 1px solid var(--accent); color: var(--accent); background: none; }

/* ── Dialog: Lade-Skelett, Links im Text, Composer-Hinweis ── */
.dialog-skel { display: flex; flex-direction: column; gap: 1.1em; padding: 0.7em 0; }
.dialog-skel-line {
  height: 1.05em; width: 100%; border-radius: 6px;
  background: linear-gradient(90deg, var(--color-border) 25%, var(--color-bg-secondary) 37%, var(--color-border) 63%);
  background-size: 400% 100%; animation: dialog-shimmer 1.4s ease infinite;
}
.dialog-skel-line:nth-child(3n)   { width: 68%; }
.dialog-skel-line:nth-child(3n+1) { width: 92%; }
@keyframes dialog-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .dialog-skel-line { animation: none; } }
.dialog-body .dialog-link { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; word-break: break-word; }
.dialog-hint { font-size: var(--font-size-small); color: var(--color-text-muted); align-self: center; opacity: 0.7; }
.dialog-spacer { flex: 1; }

/* ── Library: gleiches Gerüst wie Archiv (Übersicht = .atlas, Eintrag = .single).
   Eintrags-Fuss: Gruppe + weitere Einträge + bearbeiten-Link. ── */
.entry-foot { margin-top: var(--spacing-lg); padding-top: var(--spacing-sm); border-top: 1px solid var(--color-border);
  display: flex; gap: 0.6em 1.2em; flex-wrap: wrap; align-items: baseline; font-size: var(--font-size-small); color: var(--color-text-muted); }
.entry-foot .entry-more { flex: 1; min-width: 14em; }
.entry-foot .entry-more a { color: var(--accent); text-decoration: none; }
.entry-foot .entry-more a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.entry-foot a { color: var(--color-text-muted); text-decoration: none; }
.entry-foot a:hover { color: var(--accent); }

/* Wiki-Links in Library-Einträgen */
.wikilink { color: var(--section-color, var(--accent)); text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 0.2em; }
.wikilink:hover { text-decoration-style: solid; }
.wikilink-missing { color: var(--color-text-muted); border-bottom: 1px dashed currentColor; }

/* Querverweise: „Siehe auch" + „Erwähnt in" */
.entry-links { margin-top: var(--spacing-md); padding: 0.7em 1em;
  background: color-mix(in oklab, var(--section-color, var(--accent)) 8%, transparent);
  border-left: 3px solid var(--section-color, var(--accent)); border-radius: 0 8px 8px 0; }
.entry-links + .entry-links { margin-top: 0.5em; }
.entry-links ul { list-style: none; margin: 0.3em 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25em 0.8em; }
.entry-links li { font-size: var(--font-size-small); }
.entry-links a { color: var(--section-color, var(--accent)); text-decoration: none; }
.entry-links a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.entry-links-label { font-size: var(--font-size-small); font-weight: 600; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.04em; }

/* Library-Übersicht: Suchfeld + Kategorie-Pills */
.lib-filter { margin-bottom: var(--spacing-sm); display: flex; flex-direction: column; gap: 0.5em; }
.lib-search { width: 100%; padding: 0.45em 0.8em; border: 1px solid var(--color-border); border-radius: 6px;
  background: var(--color-bg-secondary); color: var(--color-text-primary); font-size: var(--font-size-base); font-family: inherit; }
.lib-search:focus { outline: none; border-color: var(--section-color, var(--accent)); }
.lib-pills { display: flex; flex-wrap: wrap; gap: 0.3em; }
.lib-pill { font-family: var(--font-family-display); font-size: var(--font-size-small); cursor: pointer;
  padding: 0.28em 0.85em; border-radius: 999px;
  background: none; border: 1px solid var(--color-border); color: var(--color-text-muted); }
.lib-pill:hover { border-color: var(--section-color, var(--accent)); color: var(--color-text-primary); }
.lib-pill.active { background: var(--section-color, var(--accent)); border-color: var(--section-color, var(--accent)); color: white; }

/* Library-Atlas: zwei Kategorien nebeneinander */
.atlas--grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--spacing-md); align-items: start; }
@media (max-width: 600px) { .atlas--grid2 { grid-template-columns: 1fr; } }

/* ── Software-Landing: Werkzeuge getrennt von Texten ── */
.software-h { font-family: var(--font-family-serif); margin: var(--spacing-md) 0 var(--spacing-sm); }
.software-tools { margin-bottom: var(--spacing-lg); }
.tool-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.8em; }
.tool-item { display: flex; align-items: flex-start; gap: 0.5em; background: var(--color-bg-secondary);
  border: 1px solid var(--color-border); border-left: 4px solid var(--section-color, var(--accent)); border-radius: 12px; padding: 0.9em 1em; }
.tool-item:hover { border-color: var(--section-color, var(--accent)); }
.tool-main { flex: 1; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 0.2em; min-width: 0; }
.tool-name { font-family: var(--font-family-serif); font-weight: 600; font-size: 1.05rem; }
.tool-item:hover .tool-name { color: var(--accent); }
.tool-sum { font-size: var(--font-size-small); }
.tool-ext { flex: none; color: var(--color-text-muted); text-decoration: none; font-size: 1.15em; line-height: 1; }
.tool-ext:hover { color: var(--accent); }

/* ------------------------------------------------------------------------
   Journal entries — three Republik-style layouts (set in front matter
   via `layout: image|icon|text`). Every entry is a full-bleed coloured
   or image panel; per-section/per-post colour drives the bg.
   - image: cover image fills panel; text on dark gradient overlay; white type
   - icon:  coloured bg; small centred image above text; dark type
   - text:  coloured bg; no image; dark type
   ------------------------------------------------------------------------ */

/* Base panel — break out of the boxed content column */
.journal-entry--layout-image,
.journal-entry--layout-icon,
.journal-entry--layout-text {
  list-style: none;
  border: none;
  margin: 0 calc(50% - 50vw);
  padding: 0;
  position: relative;
  overflow: hidden;
}

.journal-entry--layout-image .journal-entry-link,
.journal-entry--layout-icon .journal-entry-link,
.journal-entry--layout-text .journal-entry-link {
  display: block;
  width: 100%;
  color: inherit;
  text-decoration: none;
  border: none;
}

/* Centred body, generous padding */
.journal-entry--layout-image .journal-entry-body,
.journal-entry--layout-icon .journal-entry-body,
.journal-entry--layout-text .journal-entry-body {
  max-width: 60ch;
  margin: 0 auto;
  padding: 3.5rem 1.75rem 3rem;
  display: grid;
  justify-items: center;
  row-gap: 1.1rem;
  text-align: center;
}
.journal-entry--layout-image .journal-entry-body > *,
.journal-entry--layout-icon .journal-entry-body > *,
.journal-entry--layout-text .journal-entry-body > * {
  margin: 0;
  max-width: 60ch;
}

/* Title sizes per layout — image (hero) is bigger, icon/text more modest */
.journal-entry--layout-image .journal-title {
  font-size: clamp(2rem, 3.8vw, 2.8rem);
  line-height: 1.08;
  letter-spacing: -0.026em;
  font-weight: 800;
}
.journal-entry--layout-icon .journal-title,
.journal-entry--layout-text .journal-title {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  line-height: 1.1;
  letter-spacing: -0.022em;
  font-weight: 800;
}

.journal-entry--layout-image .journal-summary,
.journal-entry--layout-icon .journal-summary,
.journal-entry--layout-text .journal-summary {
  font-size: 1.15rem;
  line-height: 1.4;
  max-width: 42ch;
}
.journal-entry--layout-image .journal-byline,
.journal-entry--layout-icon .journal-byline,
.journal-entry--layout-text .journal-byline {
  font-size: 0.95rem;
}

/* ---- Layout: IMAGE (full-bleed photo as background, no overlay) ---- */
.journal-entry--layout-image {
  background: #1a1a1a;
  color: #fff;
}
/* (Alte Vollflächen-Mechanik entfernt: Link war display:flex + min-height:70vh
   + justify-content:flex-end, Bild position:absolute, Body padding-top:3rem —
   das zog Bild und Headline in der Karte auseinander. Karten-Layout läuft jetzt
   ausschließlich über die .journal-list-Regeln weiter oben.) */
/* Solid white text — no shadow halo. Legibility comes from the slight
   darkening of the image at the bottom (where the body sits). */
.journal-entry--layout-image .journal-title,
.journal-entry--layout-image .journal-rubric,
.journal-entry--layout-image .journal-summary,
.journal-entry--layout-image .journal-byline {
  color: #fff;
  text-shadow: none;
}
.journal-entry--layout-image .journal-section {
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.journal-entry--layout-image .journal-byline,
.journal-entry--layout-image .journal-byline .journal-author,
.journal-entry--layout-image .journal-byline .journal-date,
.journal-entry--layout-image .journal-byline .journal-author::before { color: #fff; }
.journal-entry--layout-image .journal-byline .journal-author { text-decoration: none; }

/* ---- Layout: ICON (coloured bg + small centred image, image is NOT tinted) ---- */
.journal-entry--layout-icon {
  background: var(--section-color, var(--accent));
  color: var(--color-text-primary);
}
.journal-icon-image {
  display: block;
  max-width: 240px;
  max-height: 240px;
  width: auto;
  height: auto;
  margin: 0 auto 1rem;
  filter: none;
}
.journal-icon-image:hover { filter: none; }

/* ---- Layout: TEXT (coloured bg only) ---- */
.journal-entry--layout-text {
  background: var(--section-color, var(--accent));
  color: var(--color-text-primary);
}

/* Section pill on coloured panels — darker overlay on the colour bg */
.journal-entry--layout-icon .journal-section,
.journal-entry--layout-text .journal-section {
  background: color-mix(in oklab, var(--color-text-primary) 10%, transparent);
  color: var(--color-text-primary);
}

/* All text on coloured panels is solid text-primary — including byline */
.journal-entry--layout-icon .journal-title,
.journal-entry--layout-text .journal-title,
.journal-entry--layout-icon .journal-summary,
.journal-entry--layout-text .journal-summary,
.journal-entry--layout-icon .journal-byline,
.journal-entry--layout-text .journal-byline,
.journal-entry--layout-icon .journal-byline .journal-author,
.journal-entry--layout-text .journal-byline .journal-author,
.journal-entry--layout-icon .journal-byline .journal-date,
.journal-entry--layout-text .journal-byline .journal-date,
.journal-entry--layout-icon .journal-byline .journal-author::before,
.journal-entry--layout-text .journal-byline .journal-author::before {
  color: var(--color-text-primary);
}


/* Tags sit centred inside the coloured panel, below the link */
.journal-entry--layout-image > .tag-pills,
.journal-entry--layout-icon > .tag-pills,
.journal-entry--layout-text > .tag-pills {
  margin: 0 auto;
  padding: 0 1.75rem 2.6rem;
  max-width: var(--container-width);
  text-align: center;
}
.journal-entry--layout-image > .tag-pills a {
  background: color-mix(in oklab, var(--section-color, var(--accent-soft)) 30%, transparent);
  color: var(--color-dark-panel-text);
}
.journal-entry--layout-image > .tag-pills a:hover {
  background: color-mix(in oklab, var(--section-color, var(--accent-soft)) 50%, transparent);
}
.journal-entry--layout-icon > .tag-pills a,
.journal-entry--layout-text > .tag-pills a {
  background: color-mix(in oklab, var(--color-text-primary) 12%, transparent);
  color: var(--color-text-primary);
}
.journal-entry--layout-icon > .tag-pills a:hover,
.journal-entry--layout-text > .tag-pills a:hover {
  background: color-mix(in oklab, var(--color-text-primary) 22%, transparent);
}

.journal-tags { /* extends .tag-pills */ }

/* ════════════════════════════════════════════════════════════════════════
   Journal-Startseite: KARTEN-Kontext. Nimmt die Vollflächen-Panel-Regeln von
   oben innerhalb von .journal-list zurück — kompakte 2-Spalten-Karten:
   Bild als 16/9-Block OBEN (kein absolutes Overlay), dunkle Schrift,
   natürliche Höhe (align-items:start → keine Zeilen-Stretchung; ein hoher
   Eintrag zieht den Nachbarn NICHT mit).
   ════════════════════════════════════════════════════════════════════════ */
.journal-list .journal-entry,
.journal-list .journal-entry--layout-image,
.journal-list .journal-entry--layout-icon,
.journal-list .journal-entry--layout-text {
  margin: 0;
  /* oben/unten 20% knapper (1.25rem → 1rem), links/rechts unverändert */
  padding: 1rem 1.25rem;
  position: relative;
  overflow: hidden;
  border-radius: 0;
}
.journal-list .journal-entry--layout-image {
  background: var(--color-bg-secondary);
  color: var(--color-text-primary);
}
/* Inhalt oben-bündig (kein altes justify-content:flex-end/min-height:70vh mehr,
   das Bild und Text in der gewachsenen Karte auseinanderzog). */
/* Flexbox-Spalte: Bild oben, Body darunter, oben-bündig. In Flex werden reine
   Whitespace-Textknoten NICHT gerendert → die 78px-Inline-Lücke ist unmöglich. */
.journal-list .journal-entry-link {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 0;
  height: auto;
}

/* Bild: normaler Block oben statt absolutem Hintergrund-Overlay.
   display:block + vertical-align:bottom killen die Inline-Baseline-Lücke
   (der „whitespace" unter dem Bild, den du im DevTools gesehen hast). */
.journal-list .journal-bg-image {
  display: block;
  vertical-align: bottom;
  position: static;
  inset: auto;
  z-index: auto;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 0;       /* eckig */
  margin: 0 0 0.7rem;
}

/* Body: linksbündig, normaler Textfluss, kompakt, dunkle Schrift */
.journal-list .journal-entry-body {
  position: static;
  z-index: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  display: grid;
  justify-items: start;
  text-align: left;
  row-gap: 0.55rem;
  color: var(--color-text-primary);
}
.journal-list .journal-entry-body > * { max-width: none; }

/* Bild-Layout: Schrift wieder dunkel (kein Weiß-auf-Bild) */
.journal-list .journal-entry--layout-image .journal-title,
.journal-list .journal-entry--layout-image .journal-rubric,
.journal-list .journal-entry--layout-image .journal-summary,
.journal-list .journal-entry--layout-image .journal-byline,
.journal-list .journal-entry--layout-image .journal-byline .journal-author,
.journal-list .journal-entry--layout-image .journal-byline .journal-date,
.journal-list .journal-entry--layout-image .journal-byline .journal-author::before {
  color: var(--color-text-primary);
  text-shadow: none;
}
.journal-list .journal-entry--layout-image .journal-section {
  background: color-mix(in oklab, var(--section-color, var(--accent)) 35%, transparent);
  color: var(--color-text-primary);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Kompaktere Karten-Typografie (nicht Hero-Größe) */
.journal-list .journal-title { font-size: 1.4rem; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }
.journal-list .journal-summary { font-size: 1rem; line-height: 1.45; max-width: none; }
.journal-list .journal-byline { font-size: 0.9rem; }

/* Icon-Bild kleiner und linksbündig */
.journal-list .journal-icon-image { max-width: 96px; max-height: 96px; margin: 0 0 0.6rem; }

/* Tags innerhalb der Karte links, kompakt */
.journal-list .journal-entry > .tag-pills {
  margin: 0.6rem 0 0;
  padding: 0;
  max-width: none;
  text-align: left;
}

.more {
  margin-top: var(--spacing-md);
  font-family: var(--font-family-mono);
  font-size: var(--font-size-small);
}

/* ------------------------------------------------------------------------
   Library — Atlas view
   ------------------------------------------------------------------------ */
.atlas {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  margin-top: var(--spacing-sm);
}
.atlas-section h2,
.atlas-tags h2 {
  font-family: var(--font-family-serif);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.018em;
  color: var(--color-text-primary);
  border-bottom: 3px solid var(--section-color, var(--accent));
  padding-bottom: 0.03em;
  margin-bottom: var(--spacing-sm);
}
.atlas-section h2 a,
.atlas-tags h2 a { border: none; color: inherit; }
.atlas-section h2 a:hover { color: var(--accent); }
.atlas-section > p { font-style: italic; color: var(--color-text-muted); margin-bottom: var(--spacing-sm); }

.atlas-list {
  list-style: none;
  margin-left: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.atlas-list li {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  flex-wrap: wrap;
}
.atlas-list .list-meta { font-family: var(--font-family-mono); font-size: 0.78rem; }

.tag-cloud {
  list-style: none;
  margin-left: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.1rem;
  font-family: var(--font-family-sans);
  font-size: var(--font-size-small);
}
.tag-cloud li { margin: 0; }
.tag-cloud a { border: none; }

/* ------------------------------------------------------------------------
   Library subsection (chronological list)
   ------------------------------------------------------------------------ */
.section-header {
  border-top: 8px solid var(--section-color, var(--accent));
  padding-top: var(--spacing-sm);
  margin-top: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}
.section-rubric {
  font-family: var(--font-family-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.85rem;
  color: var(--section-color, var(--accent));
  margin: 0 0 0.4rem;
}
.section-title {
  font-family: var(--font-family-serif);
  font-size: clamp(1.5rem, 2.6vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.012em;
  line-height: 1.1;
  margin: 0 0 0.4rem;
}
.section-description {
  font-style: italic;
  color: var(--color-text-muted);
  margin: 0 0 var(--spacing-sm);
  max-width: 60ch;
}

/* Übersicht (Archiv/Library): wie eine Artikelseite — Inhalt in der Lesespalte
   (≈55ch, zentriert), gleicher Oberabstand wie .single, Titel mit Linie darunter
   in der Sektionsfarbe (Archiv grün, Library rot). */
.collection { margin-top: var(--spacing-sm); }
.collection-title,
.collection-inner { max-width: 48.5rem; margin-inline: auto; }
.collection .section-rubric { max-width: 48.5rem; margin-inline: auto; margin-top: var(--spacing-sm); }
.collection-title {
  text-align: left;
  font-family: var(--font-family-serif);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.12;
  color: var(--color-text-primary);
  border-bottom: 3px solid var(--section-color, var(--accent));
  padding-bottom: 0.03em;
  margin: 0 0 var(--spacing-sm);
}

/* Archiv-Umschalter (Kategorie ↔ Jahr) */
.archiv-toggle { display: inline-flex; gap: 0.3em; margin: 0 0 0.5em; }
.archiv-toggle button {
  font-family: var(--font-family-display); font-size: var(--font-size-small); cursor: pointer;
  padding: 0.3em 0.95em; border-radius: 999px;
  background: none; border: 1px solid var(--color-border); color: var(--color-text-muted);
}
.archiv-toggle button:hover { border-color: var(--section-color, var(--accent)); color: var(--color-text-primary); }
.archiv-toggle button.is-active {
  background: var(--section-color, var(--accent));
  border-color: var(--section-color, var(--accent));
  color: white; font-weight: 600;
}
.archiv-view[hidden] { display: none; }

.time-list ul {
  list-style: none;
  margin-left: 0;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}
.list-item {
  border-top: 1px solid var(--color-border);
  padding: var(--spacing-sm) 0;
}
.list-item:last-child { border-bottom: 1px solid var(--color-border); }
.list-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.list-title {
  margin: 0;
  font-family: var(--font-family-serif);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  flex: 1;
}
.list-title a { border: none; }
.list-meta {
  font-family: var(--font-family-mono);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.list-summary {
  margin-top: 0.3rem;
  font-style: italic;
  line-height: 1.45;
}
/* Im Grid: Datum unter dem Titel, keine Trennlinie zwischen Cards */
.time-list .list-title-row { flex-direction: column; align-items: flex-start; gap: 0.2em; }
.time-list .list-item, .time-list .list-item:last-child { border-top: none; border-bottom: none; }

/* ------------------------------------------------------------------------
   Software showcase
   ------------------------------------------------------------------------ */
.software-showcase {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-lg);
  margin-top: var(--spacing-md);
}
.software-item {
  border-top: 1px solid var(--color-border);
  padding-top: var(--spacing-md);
}
.software-item:last-child { border-bottom: 1px solid var(--color-border); padding-bottom: var(--spacing-md); }
.software-item h2 {
  font-family: var(--font-family-serif);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.024em;
  line-height: 1.08;
  margin: 0 0 0.4rem;
}
.software-item h2 a { border: none; }
.software-summary {
  margin: 0 0 0.5rem;
  font-style: italic;
  color: var(--color-text-primary);
  max-width: 55ch;
}
.software-meta {
  font-family: var(--font-family-mono);
  font-size: var(--font-size-small);
  display: flex;
  gap: 0.4rem;
  align-items: baseline;
  flex-wrap: wrap;
}
.software-external {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ------------------------------------------------------------------------
   Single page (article)
   ------------------------------------------------------------------------ */
.single { margin-top: var(--spacing-sm); }
.single-header { margin-bottom: var(--spacing-md); }
/* Cover-Bild füllt die volle Breite des Scroll-Rahmens, bündig unter dem Header. */
.single-hero-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 60vh;
  object-fit: cover;
  margin: 0 0 var(--spacing-sm);
  filter: none;
}
.single-hero-image:hover { filter: none; }
/* Nach einem Hero-Bild: Artikel + Header bündig → kein Riesenabstand Bild↔Headline */
.single-hero-image + .single { margin-top: 0; }
.single-hero-image + .single .single-header { margin-top: 0; }

.single-header {
  position: relative;
  margin-top: 0;
  margin-bottom: var(--spacing-md);
}
.single-header h1 {
  font-family: var(--font-family-serif);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.12;
  margin: 0 0 var(--spacing-sm);
}
.single-summary {
  font-family: var(--font-family-serif);
  font-style: normal;
  font-size: 1.2rem;
  line-height: 1.45;
  color: var(--color-text-primary);
  margin: 0 0 var(--spacing-md);   /* breathing room before byline */
  max-width: 55ch;
}
.single-byline {
  font-family: var(--font-family-sans);
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--color-text-muted);
  margin: 0 0 0.6rem;
}

/* Reading time + last-modified — sits just below the byline */
.single-meta {
  font-family: var(--font-family-sans);
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--color-text-muted);
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: baseline;
}
.single-meta .reading-time,
.single-meta .lastmod { font-variant-numeric: tabular-nums; }
.single-byline .byline-author {
  color: var(--color-text-primary);
  font-weight: 500;
  text-decoration: none;
}
.single-byline .byline-author::before {
  content: "Von ";
  color: var(--color-text-muted);
  font-weight: 400;
  text-decoration: none;
}
.single-byline .byline-date { font-variant-numeric: tabular-nums; }
.byline-author { color: var(--color-text-primary); font-weight: 500; }
.byline-date { font-variant-numeric: tabular-nums; }

.single-content h2 {
  font-family: var(--font-family-serif);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-xs);
}
.single-content h3 {
  font-family: var(--font-family-serif);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: var(--spacing-md);
  margin-bottom: var(--spacing-xs);
}
.single-content blockquote {
  border-left: 2px solid var(--accent);
  padding-left: 1rem;
  margin: var(--spacing-md) 0;
  font-style: italic;
  color: var(--color-text-muted);
}
.single-content ul, .single-content ol { margin: var(--spacing-sm) 0 var(--spacing-sm) 1.6rem; }
.single-content li { margin: 0.3rem 0; }

.toc {
  font-family: var(--font-family-sans);
  font-size: var(--font-size-small);
  line-height: 1.45;
  border-left: 2px solid var(--color-border);
  padding: var(--spacing-xs) 0 var(--spacing-xs) var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
  color: var(--color-text-muted);
}
.toc strong {
  color: var(--color-text-primary);
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.toc a { border: none; color: var(--color-text-muted); }
.toc a:hover { color: var(--accent); }
.toc ul, .toc ol { margin: 0 0 0 1.2rem; padding: 0; }
.toc li { margin: 0.15rem 0; }

/* Tag pills — small section-tinted chips at the foot of the article.
   No hash symbol, lowercase, rounded; subtle on the warm paper. */
.tag-pills {
  list-style: none;
  margin: var(--spacing-sm) 0 0;
  margin-left: 0;
  padding: 0;
  line-height: 1;
}
.tag-pills li {
  display: inline-block;
  margin: 0 0.3rem 0.3rem 0;
  padding: 0;
  list-style: none;
  vertical-align: middle;
}
.tag-pills a {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  line-height: 1.3;
  font-family: var(--font-family-display);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  background: color-mix(in oklab, var(--section-color, var(--accent)) 14%, transparent);
  color: var(--color-text-primary);
  border: none;
  border-radius: 999px;
  margin: 0;
  white-space: nowrap;
  text-decoration: none;
  vertical-align: middle;
  transition: background-color 0.15s ease;
}
.tag-pills a:hover {
  background: color-mix(in oklab, var(--section-color, var(--accent)) 30%, transparent);
  border: none;
}

.time {
  font-family: var(--font-family-sans);
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-top: var(--spacing-md);
  padding-top: var(--spacing-sm);
  border-top: 1px solid var(--color-border);
}

.back-nav-wrap {
  margin-top: var(--spacing-md);
  font-family: var(--font-family-sans);
  font-size: 0.9rem;
}
.back-link { border: none; color: var(--color-text-muted); }
.back-link:hover { color: var(--accent); }

/* ------------------------------------------------------------------------
   Page foot breadcrumb (moved from top → bottom)
   ------------------------------------------------------------------------ */
.page-foot-nav {
  margin-top: var(--spacing-md);
  font-family: var(--font-family-sans);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  letter-spacing: 0.01em;
}
.page-foot-nav ol {
  list-style: none;
  margin-left: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
}
.page-foot-nav li { margin: 0; }
.page-foot-nav a { border: none; color: var(--color-text-muted); }
.page-foot-nav a:hover { color: var(--accent); }
.page-foot-nav li.current a { color: var(--color-text-primary); }

/* ------------------------------------------------------------------------
   Footer — dark full-bleed bar mirroring the masthead
   ------------------------------------------------------------------------ */
footer {
  background: var(--color-dark-panel);
  color: var(--color-dark-panel-text);   /* hell & lesbar auf Schwarz */
  margin-top: 0;
  /* voll-breit; horizontal bündig zum Journal-Karten-Inhalt (1.5rem) */
  padding: 0.55rem 1.5rem;
  border-top: none;
}
footer a, footer a:hover, footer a:focus { border: none; border-bottom: none; text-decoration: none; }
footer a { color: var(--color-dark-panel-text); }
footer a:hover { color: var(--accent-soft); }
footer p { margin: 0; }

/* Lizenzen ganz links (linksbündig), Footer-Menü ganz rechts. */
.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  column-gap: var(--spacing-lg);
}
.footer-legal { text-align: left; }
.footer-licenses {
  font-family: var(--font-family-mono);
  font-size: 0.8rem;
  color: var(--color-dark-panel-text);
}
.footer-hosted {
  font-family: var(--font-family-mono);
  font-size: 0.75rem;
  color: var(--color-dark-panel-muted);
  margin-top: 0.1rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem 1.3rem;
  font-family: var(--font-family-display);
  font-size: 0.9rem;
  font-weight: 500;
}

.footer-legal a { color: inherit; text-decoration: none; }
.footer-legal a:hover { color: var(--accent-soft); }

/* Mobile: alles linksbündig stapeln */
@media (max-width: 720px) {
  .footer-grid {
    flex-direction: column;
    align-items: flex-start;
    row-gap: 0.5rem;
  }
  .footer-links { justify-content: flex-start; }
}

/* ------------------------------------------------------------------------
   Images — keep grayscale-on-hover but no portfolio aspect-ratio crop
   ------------------------------------------------------------------------ */
img {
  filter: grayscale(100%);
  transition: filter 0.4s ease;
  max-width: 100%;
  height: auto;
  margin: var(--spacing-sm) 0;
}
img:hover { filter: grayscale(0%); }

/* ------------------------------------------------------------------------
   Fußnoten / Quellen — Goldmark rendert [^1] als hochgestellte Verweise +
   eine .footnotes-Sektion am Textende. Wir geben ihr eine „Quellen"-Über-
   schrift (statt des <hr>) und ein ruhigeres, kleineres Schriftbild.
   ------------------------------------------------------------------------ */
/* Hochgestellte Verweis-Nummer im Fließtext: klein + dezent unterstrichen. */
.single-content sup { font-size: 0.62em; line-height: 0; }
.single-content a.footnote-ref {
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 0.5px;
  font-variant-numeric: tabular-nums;
}

.single-content .footnotes {
  margin-top: var(--spacing-md);
  padding-top: var(--spacing-sm);
  border-top: 1px solid var(--color-border);
  font-size: var(--font-size-small);
  /* Theme vererbt eine feste Zeilenhöhe (~26px) → bei kleiner Schrift viel zu
     luftig. Unitless überschreiben, damit die Quellen kompakt sitzen. */
  line-height: 1.5;
  color: var(--color-text-muted);
}
/* Goldmark setzt ein <hr> an den Anfang — wir ersetzen es durch die Überschrift. */
.single-content .footnotes > hr { display: none; }
.single-content .footnotes::before {
  content: "Quellen";
  display: block;
  font-family: var(--font-family-serif);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-text-primary);
  margin-bottom: 0.4em;
}
.single-content .footnotes ol { margin: 0; padding-left: 1.4em; }
.single-content .footnotes li { margin: 0.2em 0; }
.single-content .footnotes li p { margin: 0; line-height: 1.5; }
.single-content .footnote-backref { text-decoration: none; margin-left: 0.3em; }

/* ------------------------------------------------------------------------
   Herkunft / Zitieren — „lebendes Dokument": Version (→ Commit), Verlauf,
   Zitieren-Knopf. Dezent unter dem Beitrag.
   ------------------------------------------------------------------------ */
/* ------------------------------------------------------------------------
   Artikel-Fuß: zitieren (Link + dezente Angabe), Aktionsreihe, Versionen.
   ------------------------------------------------------------------------ */
/* Versionen: Pill wie Dialog (Akzent-Outline) mit Uhr-Icon. */
.cite { margin-top: var(--spacing-sm); }
.versions-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: var(--font-family-display);
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--accent);
  background: none;
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.28em 0.85em;
  cursor: pointer;
}
.versions-toggle:hover,
.versions-toggle[aria-expanded="true"] { background: var(--accent); color: #fff; }
.versions-toggle .pill-icon { width: 1em; height: 1em; flex: none; stroke: var(--accent); }
.versions-toggle:hover .pill-icon,
.versions-toggle[aria-expanded="true"] .pill-icon { stroke: #fff; }

/* zitieren: kein Pill — Link in der Pill-Schrift, mit ↗ am Ende. */
.cite-toggle {
  font-family: var(--font-family-display);
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--accent);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.cite-toggle:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.cite-arrow { font-size: 0.9em; }

/* „kopieren" bleibt ein schlichter Link in der Quellenangabe. */
.cite-copy {
  font: inherit;
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.cite-copy:hover { color: var(--accent); }

.cite-box { margin-top: 0.7em; }
.cite-text {
  margin: 0 0 0.5em;
  font-family: var(--font-family-serif);
  font-size: var(--font-size-small);
  line-height: 1.6;
  color: var(--color-text-muted);
  user-select: all;   /* ein Klick markiert die ganze Angabe */
}
.cite-actions { display: flex; align-items: center; gap: 0.9em; font-size: var(--font-size-small); }
.cite-fmt {
  font: inherit;
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.cite-fmt:hover { color: var(--accent); }
.cite-fmt.is-active { color: var(--accent); font-weight: 600; }
.cite-status { color: var(--color-text-muted); }

/* Aktionsreihe: Dialog links, Tags ganz rechts; darüber eine Trennlinie.
   margin-top = spacing-sm, damit der Abstand „zitieren → Trennlinie" gleich
   gross ist wie „obere Trennlinie → Quellen" (footnotes padding-top) — der
   Quellen-Block sitzt so symmetrisch zwischen den beiden Linien. */
.article-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8em 1em;
  margin-top: var(--spacing-sm);
  padding-top: var(--spacing-sm);
  border-top: 1px solid var(--color-border);
}
.article-actions .tag-pills { margin: 0; }

/* Versionen: eine Zeile darunter, öffnet die Liste auf der Seite. */
.article-versions { margin-top: var(--spacing-sm); }

/* Versionsliste: volle Inhaltsbreite, normale Schrift/Größe wie der Text. */
.version-panel { margin-top: 0.8rem; }
.version-list { list-style: none; margin: 0; padding: 0; }
.version-list button {
  display: flex;
  gap: 1em;
  width: 100%;
  text-align: left;
  font-family: var(--font-family-serif);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-text-primary);
  background: none;
  border: none;
  border-bottom: 1px solid var(--color-border);
  padding: 0.7em 0;
  cursor: pointer;
}
.version-list li:first-child button { border-top: 1px solid var(--color-border); }
.version-list button:hover { color: var(--accent); }
.version-list .v-date { white-space: nowrap; min-width: 6em; }
.version-list .v-subject { flex: 1; color: var(--color-text-muted); }
.version-list .v-hash { white-space: nowrap; color: var(--color-text-muted); font-family: var(--font-family-mono); font-size: 0.85em; }
.version-empty { margin: 0.6rem 0; color: var(--color-text-muted); }

.version-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6em;
  margin-bottom: var(--spacing-md);
  padding: 0.5em 0.8em;
  border-left: 3px solid var(--accent);
  background: var(--color-bg-secondary);
  font-family: var(--font-family-sans);
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
}
.version-back,
.version-toggle {
  font: inherit;
  color: var(--accent);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.version-loading { color: var(--color-text-muted); font-style: italic; }

/* Diff-Ansicht (rot/grün, wie auf GitHub) — direkt auf der Seite. */
.diff {
  font-family: var(--font-family-mono);
  font-size: 0.8rem;
  line-height: 1.5;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow-x: auto;
}
.diff-line {
  white-space: pre-wrap;
  word-break: break-word;
  padding: 0.05em 0.7em;
}
.diff-line.d-add { background: color-mix(in oklab, #2ea043 20%, transparent); }
.diff-line.d-del { background: color-mix(in oklab, #f85149 20%, transparent); }
.diff-line.d-hunk { color: var(--color-text-muted); background: var(--color-bg-secondary); }
.diff-line.d-ctx { color: var(--color-text-primary); }
