/* ==========================================================================
   szasz-texte.de — Site-Stylesheet
   Archiv-Neufassung, responsiv, typografiebetont.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Design-Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Farben (aus dem Bestand übernommen, leicht abgemildert) */
  --ink:           #1a1a1a;
  --ink-soft:      #444;
  --ink-muted:     #777;
  --rule:          #d6d6d6;
  --paper:         #ffffff;
  --paper-warm:    #faf9f7;
  --accent:        #b85a12;          /* ehemals #EF8700, etwas ruhiger */
  --accent-hover:  #4994c5;
  --header-bg:     #2a2a2a;          /* ehemals #666 */
  --nav-bg:        #e8e6e1;
  --nav-ink:       #002245;

  /* Typografie */
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
           Georgia, "Times New Roman", serif;
  --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
           Arial, sans-serif;
  --mono:  "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;

  --font-base: 18px;
  --leading:   1.6;
  --measure:   38rem;             /* ca. 65 Zeichen */
  --measure-wide: 52rem;

  --space: 1.5rem;
  --radius: 3px;
}

/* --------------------------------------------------------------------------
   Reset / Basis
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--serif);
  font-size: var(--font-base);
  line-height: var(--leading);
  font-feature-settings: "kern" 1, "liga" 1, "onum" 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  hyphens: auto;
  -webkit-hyphens: auto;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* --------------------------------------------------------------------------
   Typografie
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
  hyphens: manual;
  margin: 1.6em 0 0.6em;
}

h1 { font-size: 2rem;     margin-top: 0; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem;  font-weight: 600; }
h4 { font-size: 1.1rem; }

/* Artikel-Überschrift: etwas großzügiger */
article > h1, .article-title {
  font-size: 2.1rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 0.4em;
}

h3.author {
  font-size: 1.05rem;
  font-style: italic;
  font-weight: 400;
  color: var(--ink-soft);
  margin-top: 0;
}

p {
  margin: 0 0 1em;
  orphans: 2;
  widows: 2;
}

em, i { font-style: italic; }
strong, b { font-weight: 600; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(184, 90, 18, 0.35);
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
a:hover {
  color: var(--accent-hover);
  text-decoration-color: var(--accent-hover);
}
a:focus-visible {
  outline: 2px solid var(--accent-hover);
  outline-offset: 2px;
  border-radius: 1px;
}

/* Externe Links: kleines Symbol statt PNG, per Unicode */
a[href^="http"]:not([href*="szasz-texte.de"])::after {
  content: "\2009\2197";       /* schmaler Leerzeichen + Pfeil nach oben-rechts */
  font-size: 0.8em;
  opacity: 0.7;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  border: none;
  vertical-align: middle;
}

hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2em 0;
}

/* Listen */
ul, ol {
  margin: 0.6em 0 1em;
  padding-left: 1.5em;
}
ul { list-style: square; }
li { margin-bottom: 0.3em; }

dl { margin: 0.6em 0 1em; }
dt { font-weight: 600; margin-bottom: 0.2em; }
dd { margin-left: 1.5em; margin-bottom: 0.4em; }

/* Zitat / Epigraph */
blockquote, .epigraph {
  margin: 1.4em 0;
  padding: 0 0 0 1.2em;
  border-left: 3px solid var(--rule);
  color: var(--ink-soft);
  font-style: italic;
}
.epigraph .attribution,
.epigraph .raggedleft { text-align: left; }
.epigraph .raggedright { text-align: right; }
.epigraph p { margin-bottom: 0; }

/* Tabellen */
table { border-collapse: collapse; width: 100%; margin: 1em 0; }
#curriculum-vitae {
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
#curriculum-vitae td {
  padding: 0.3em 0.8em 0.3em 0;
  vertical-align: top;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

/* --- Text-Header (alle Seiten außer Startseite) --- */
.site-header {
  background: #666;
  color: #ddd;
}
.site-header__inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0.7rem 1.2rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--sans);
}
.site-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.site-title:hover { color: var(--accent); }
.site-tagline {
  font-size: 1.05rem;
  color: #ccc;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Startseiten-Banner --- */
.intro-banner {
  background: #666;
  width: 100%;
  height: 20vh;
  overflow: hidden;
  position: relative;
}
.intro-banner__inner {
  max-width: var(--measure);
  margin: 0 auto;
  height: 100%;
  padding: 0 1.2rem;
  position: relative;
}
.intro-banner img { display: block; }
.intro-banner #logopic {
  height: 100%;
  width: auto;
  position: relative;
  z-index: 1;
  margin-left: -1em;
}
.intro-banner #logotyp {
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  height: 42%;
  width: auto;
  z-index: 2;
}
.site-main--home { padding-top: 2.5rem; }

/* --- Navigation --- */
.site-nav {
  background: var(--nav-bg);
}
.site-nav__inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.2rem;
  display: flex;
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 600;
}
.site-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 1.2rem;
  color: #555;
  text-decoration: none;
  border-right: 1px solid #b8b5ad;
}
.site-nav a:first-child {
  border-left: 1px solid #b8b5ad;
}
.site-nav a:hover {
  color: var(--accent);
  background: #dfdcd5;
}
.site-nav .is-current {
  color: var(--ink);
  background: #d4d1ca;
}

.site-main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.5rem 1.2rem 3rem;
}

/* Artikel-Körper: auf schmalere, lesbare Maßzahl begrenzt */
.prose {
  max-width: var(--measure);
}
.prose--wide {
  max-width: var(--measure-wide);
}

/* Seitenspalte mit Druck/PDF-Links (Artikel) */
.article-actions {
  font-family: var(--sans);
  font-size: 0.88rem;
  margin: 2rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
}
.article-actions a {
  color: var(--ink-soft);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
}
.article-actions a:hover { color: var(--accent); }
.article-actions img { height: 0.95em; width: auto; }

/* Seitenfuß-Info: Aktualisierung, URL */
.pageinfo {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--ink-muted);
  text-align: center;
}
#thisurl { display: none; }

/* Footer / Site-Links */
.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--paper-warm);
  font-family: var(--sans);
  font-size: 0.88rem;
  color: var(--ink-muted);
}
.site-footer__inner {
  max-width: var(--measure-wide);
  margin: 0 auto;
  padding: 1.2rem;
  text-align: center;
}
.site-footer a {
  color: var(--ink-soft);
  text-decoration: none;
  margin: 0 0.4em;
}
.site-footer a:hover { color: var(--accent); text-decoration: underline; }

/* --------------------------------------------------------------------------
   Inhalts-spezifische Elemente
   -------------------------------------------------------------------------- */

/* Texte-Übersicht: Listeneinträge */
.clink {
  margin: 1.6em 0;
  padding-top: 1em;
  border-top: 1px solid var(--rule);
}
.clink:first-child { border-top: 0; padding-top: 0; }
.clink > strong,
.clink > a:first-child {
  display: block;
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.3em;
}
.clink > div {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.clink a { text-decoration: none; }
.clink a:hover { text-decoration: underline; }

/* Buchtipps */
.buchtipp { margin-top: 1.4em; }
.buchtipp .title { font-weight: 600; }
.buchtipp .author { font-style: italic; }
.buchtipp div.author { margin-bottom: 0.4em; }

/* Inhaltsverzeichnis */
#toc {
  list-style: none;
  margin-left: 0;
  margin-bottom: 1.4em;
  padding-left: 0;
}
#toc ul { list-style: none; padding-left: 1.2em; }

/* Publikationsliste */
#publist .bibentry {
  margin-left: 1.5em;
  text-indent: -1.5em;
  line-height: 1.4;
  margin-bottom: 0.5em;
}
#publist h3.yearsect { margin-bottom: 0.5em; }

/* News-Liste */
div.newsitem { clear: both; margin-top: 1.6em; padding-top: 1em; border-top: 1px solid var(--rule); }
.newsitem .date {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-bottom: 0.2em;
}
.newsitem .title { font-weight: 600; margin-bottom: 0.3em; }
.newsitem .content { line-height: 1.55; }

/* "Zum Anfang" Springer */
#topref {
  margin: 2.5em 0 0;
  font-family: var(--sans);
  font-size: 0.85rem;
}
#topref a {
  color: var(--ink-muted);
  text-decoration: none;
  margin-right: 1.2em;
}
#topref a:hover { color: var(--accent); }
#topref img { height: 0.9em; width: auto; margin-right: 0.3em; }

/* --------------------------------------------------------------------------
   Fußnoten
   -------------------------------------------------------------------------- */
#footnotes {
  margin-top: 2.5em;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
#footnotes hr { width: 30%; margin-left: 0; }
.fnref { margin-top: 0.8em; }
.fnnum { display: block; float: left; font-family: var(--sans); font-size: 0.8rem; }
.fntext { margin-left: 2.2em; }
.fnref a { text-decoration: none; color: var(--accent); }
.fnref a:hover { text-decoration: underline; }

/* Pop-up-Variante (JS) */
#footnote-popup {
  position: absolute;
  left: 1em;
  max-width: 26rem;
  background: var(--paper-warm);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1em 1.4em;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  font-size: 0.9rem;
  z-index: 10;
}
#footnote-popup-close {
  text-align: right;
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--ink-muted);
  cursor: pointer;
  margin-top: 0.6em;
}
#footnote-popup-close span:hover { color: var(--accent); }

/* --------------------------------------------------------------------------
   Responsivität
   -------------------------------------------------------------------------- */

/* Tablets und kleiner */
@media (max-width: 768px) {
  :root {
    --font-base: 17px;
    --measure: 34rem;
    --measure-wide: 44rem;
  }
  .site-header__inner { padding: 0.5rem 1rem; gap: 0.6rem; }
  .site-title { font-size: 0.95rem; }
  .site-tagline { font-size: 0.95rem; }
  .site-nav__inner { padding: 0 1rem; }
  .site-nav a { padding: 0.4rem 1rem; font-size: 0.88rem; }
  .site-main { padding: 1.8rem 1rem 2.2rem; }
  article > h1, .article-title { font-size: 1.7rem; }
  h2 { font-size: 1.4rem; }
}

/* Mobil */
@media (max-width: 520px) {
  :root {
    --font-base: 16.5px;
    --leading: 1.55;
  }
  .site-header__inner { padding: 0.5rem 0.8rem; gap: 0.6rem; }
  .site-title { font-size: 0.95rem; }
  .site-tagline { font-size: 0.72rem; }
  .site-nav__inner { padding: 0 0.5rem; }
  .site-nav a { padding: 0.55rem 0.6rem; font-size: 0.85rem; }
  .site-main { padding: 1.4rem 0.9rem 1.8rem; }
  article > h1, .article-title { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1.1rem; }
  .clink > strong, .clink > a:first-child { font-size: 1.05rem; }
  .article-actions { gap: 0.9rem; }
}

/* Sehr breit: Maßzahl hält den Zeilenfall lesbar */
@media (min-width: 1100px) {
  :root { --font-base: 19px; }
}

/* --------------------------------------------------------------------------
   Barrierefreiheit / Bewegungsreduktion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* Versteckte Helfer */
.noScreen, .visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
