/* ==========================================================================
   Vierkirchen — Ghost Theme Stylesheet
   Editorial Bavarian magazine aesthetic: royal blue + gold + letterpress type
   ========================================================================== */

:root {
  --paper: #f4ede0;
  --paper-dark: #e8dfcd;
  --ink: #0d1530;
  --ink-soft: #2a3558;
  --blue: #14337a;
  --blue-deep: #081944;
  --blue-bright: #2f5fc8;
  --gold: #e6b422;
  --gold-soft: #c9941a;
  --gold-light: #f5d97a;
  --cream: #faf5e8;
  --red: #8a2a20;

  /* Accent colour (overridable via Ghost custom setting) */
  --accent: var(--gold);

  /* Theme's own display / body font stacks */
  --theme-font-heading: 'Fraunces', Georgia, serif;
  --theme-font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --theme-font-mono: 'DM Mono', ui-monospace, monospace;

  /* Ghost custom fonts — use user-selected fonts if present, fall back to theme fonts */
  --font-heading: var(--gh-font-heading, var(--theme-font-heading));
  --font-body: var(--gh-font-body, var(--theme-font-body));

  --container: 1400px;
  --container-narrow: 860px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* =========================
   A11Y: skip link + focus
   ========================= */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--blue-deep);
  color: var(--cream);
  padding: 0.8rem 1.2rem;
  font-family: var(--theme-font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  z-index: 1000;
  border: 2px solid var(--accent);
}
.skip-link:focus {
  top: 0;
  outline: 3px solid var(--accent);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.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;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Paper grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
  opacity: 0.18;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: multiply;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }

/* =========================
   TOP UTILITY BAR
   ========================= */
.topbar {
  position: relative;
  z-index: 10;
  background: var(--blue-deep);
  color: var(--cream);
  padding: 0.6rem 2rem;
  font-family: var(--theme-font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--gold);
  gap: 1rem;
  flex-wrap: wrap;
}
.topbar a { color: inherit; text-decoration: none; opacity: 0.85; }
.topbar a:hover { color: var(--gold-light); }
.topbar .marquee-item { opacity: 0.75; }
.topbar .brass-dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--gold-light);
  border-radius: 50%;
  margin: 0 0.8rem;
  vertical-align: middle;
}

/* =========================
   MASTHEAD (home)
   ========================= */
.masthead-full {
  position: relative;
  z-index: 10;
  padding: 2.5rem 2rem 1.5rem;
  border-bottom: 2px solid var(--ink);
  background: var(--paper);
}
.masthead-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-family: var(--theme-font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1.2rem;
}
.masthead-top .edition { display: flex; gap: 2rem; }

.wordmark-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  margin: 0.5rem 0 0.3rem;
}
.wappen {
  width: clamp(70px, 10vw, 130px);
  height: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 8px rgba(13,21,48,0.25));
}
.wordmark {
  font-family: var(--font-heading);
  font-weight: 900;
  font-style: italic;
  font-size: clamp(2.4rem, 9vw, 7rem);
  line-height: 0.85;
  letter-spacing: -0.04em;
  text-align: left;
  color: var(--ink);
}
.wordmark span {
  font-style: normal;
  font-weight: 300;
  color: var(--blue);
}
.subline {
  text-align: center;
  font-family: var(--theme-font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  margin-top: 1rem;
}

/* Compact masthead on non-home pages */
.masthead-compact {
  padding: 1.2rem 2rem;
  border-bottom: 1px solid var(--ink);
  background: var(--paper);
  position: relative;
  z-index: 10;
}
.masthead-compact-inner {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  max-width: var(--container);
  margin: 0 auto;
  text-decoration: none;
  color: inherit;
}
.masthead-compact .wappen { width: 52px; }
.wordmark-compact {
  font-family: var(--font-heading);
  font-weight: 900;
  font-style: italic;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.wordmark-compact span {
  font-weight: 300;
  font-style: normal;
  color: var(--blue);
}
.subline-compact {
  font-family: var(--theme-font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 0.3rem;
}

/* =========================
   PRIMARY NAV (desktop)
   ========================= */
nav.primary {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
  padding: 0.9rem 2rem;
  display: flex;
  justify-content: center;
  gap: 2.2rem;
  flex-wrap: wrap;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 500;
}
nav.primary a {
  color: var(--ink);
  text-decoration: none;
  position: relative;
  padding: 0.2rem 0;
  transition: color 0.25s;
}
nav.primary a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
nav.primary a:hover { color: var(--blue); }
nav.primary a:hover::after { transform: scaleX(1); }
nav.primary a.active { color: var(--blue); font-style: italic; }
nav.primary a.active::after { transform: scaleX(1); background: var(--blue); }

/* =========================
   MOBILE NAV
   ========================= */
.nav-mobile-bar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
  padding: 0.9rem 1.2rem;
  align-items: center;
  justify-content: space-between;
}
.nav-mobile-bar .brand-mini {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--ink);
  letter-spacing: -0.02em;
  text-decoration: none;
}
.nav-mobile-bar .brand-mini span { color: var(--blue); font-weight: 300; font-style: normal; }

.hamburger {
  width: 42px;
  height: 42px;
  border: 1px solid var(--ink);
  background: var(--paper);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 0;
}
.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.3s ease, opacity 0.25s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-panel {
  position: fixed;
  inset: 0;
  background: var(--blue-deep);
  color: var(--cream);
  z-index: 55;
  padding: 5.5rem 2rem 2rem;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.7, 0, 0.3, 1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.mobile-panel.open { transform: translateX(0); }
.mobile-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
  opacity: 0.08;
  pointer-events: none;
}
.mobile-panel .mp-kicker {
  font-family: var(--theme-font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1.5rem;
}
.mobile-panel a {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 1.8rem;
  line-height: 1.3;
  color: var(--cream);
  text-decoration: none;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(230, 180, 34, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.2s, padding-left 0.25s;
}
.mobile-panel a:hover, .mobile-panel a.active {
  color: var(--gold-light);
  padding-left: 0.5rem;
  font-style: italic;
}
.mobile-panel a .arr {
  font-family: var(--theme-font-mono);
  font-size: 0.9rem;
  opacity: 0.5;
}
.mobile-panel .mp-footer {
  margin-top: auto;
  padding-top: 2.5rem;
  font-family: var(--theme-font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-light);
  opacity: 0.7;
  line-height: 2;
}
.mobile-panel .mp-footer a { font-size: inherit; border: none; padding: 0; display: inline; }
body.nav-open { overflow: hidden; }

/* =========================
   HERO (home)
   ========================= */
.hero {
  position: relative;
  z-index: 5;
  padding: 4rem 2rem 6rem;
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 3rem;
  align-items: start;
}
.hero-left { padding-top: 2rem; }
.hero-left .kicker {
  font-family: var(--theme-font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.hero-left .kicker::before {
  content: '';
  width: 24px;
  height: 1px;
  background: currentColor;
}
.kicker-red { color: var(--red) !important; }
.hero-left h2 {
  font-family: var(--font-heading);
  font-weight: 400;
  font-style: italic;
  font-size: 1.5rem;
  line-height: 1.3;
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
}
.hero-left p { font-size: 0.95rem; color: var(--ink-soft); }
.hero-left p::first-letter {
  font-family: var(--font-heading);
  font-size: 3.4rem;
  float: left;
  line-height: 0.9;
  margin: 0.3rem 0.5rem 0 0;
  color: var(--blue);
  font-weight: 800;
}

.hero-center {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
}
.hero-image-frame {
  position: relative;
  aspect-ratio: 3/4;
  background: linear-gradient(145deg, #1a3a82 0%, #081944 100%);
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.35);
}
.hero-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}
.hero-center:hover .hero-image-frame img { transform: scale(1.04); }
.hero-image-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(230,180,34,0.22), transparent 50%),
    repeating-linear-gradient(0deg, rgba(0,0,0,0.04) 0, rgba(0,0,0,0.04) 1px, transparent 1px, transparent 3px);
  pointer-events: none;
}
.hero-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-image-placeholder .wappen { width: 55%; }

.hero-center .caption {
  font-family: var(--theme-font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 0.8rem;
  display: flex;
  justify-content: space-between;
}

.hero-right { padding-top: 1rem; }
.headline {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 1.5rem;
}
.headline a { color: inherit; text-decoration: none; background-image: linear-gradient(transparent 90%, var(--gold) 90%); background-size: 0 100%; background-repeat: no-repeat; transition: background-size 0.4s ease; }
.headline a:hover { background-size: 100% 100%; }
.lede {
  font-size: 1.05rem;
  color: var(--ink-soft);
  line-height: 1.65;
  margin-bottom: 2rem;
  border-left: 3px solid var(--gold);
  padding-left: 1.2rem;
}
.cta-row { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.5rem;
  font-family: var(--theme-font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--ink);
  transition: all 0.25s ease;
  cursor: pointer;
}
.btn-primary {
  background: var(--blue);
  color: var(--cream);
  border-color: var(--blue);
}
.btn-primary:hover {
  background: var(--blue-deep);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--ink);
}
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover {
  background: var(--ink);
  color: var(--cream);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--gold);
}

/* =========================
   TICKER
   ========================= */
.ticker {
  position: relative;
  z-index: 5;
  background: var(--blue);
  color: var(--cream);
  padding: 1.2rem 0;
  overflow: hidden;
  border-top: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
}
.ticker-track {
  display: flex;
  gap: 3rem;
  white-space: nowrap;
  animation: ticker 45s linear infinite;
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.4rem;
}
.ticker-track span { display: inline-flex; align-items: center; gap: 2rem; }
.ticker-track .sep { color: var(--gold-light); font-style: normal; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* =========================
   SECTION HEADERS
   ========================= */
.section {
  position: relative;
  z-index: 5;
  padding: 6rem 2rem;
  max-width: var(--container);
  margin: 0 auto;
}
.section-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 2rem;
  align-items: end;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--ink);
  margin-bottom: 3rem;
}
.section-num {
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: 4rem;
  line-height: 1;
  color: var(--blue);
}
.section-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.section-title em { font-style: italic; color: var(--blue); font-weight: 400; }
.section-meta {
  font-family: var(--theme-font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: right;
}

/* =========================
   POST GRID & CARDS
   ========================= */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem 2.2rem;
}
.post-grid-featured {
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.post-grid-featured .post-card:first-child {
  grid-row: span 1;
}
.post-grid-featured .post-card:first-child .post-card-title {
  font-size: 2rem;
}

.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
}
.post-card-link {
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.post-card-image {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--blue-deep);
  margin-bottom: 1.2rem;
}
.post-card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease, filter 0.4s ease;
  filter: saturate(0.95);
}
.post-card:hover .post-card-image img { transform: scale(1.05); filter: saturate(1.1); }
.post-card-flag {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  background: var(--accent);
  color: var(--blue-deep);
  font-family: var(--theme-font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  z-index: 2;
}
.post-card-tag {
  font-family: var(--theme-font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.6rem;
}
.post-card-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.15;
  margin-bottom: 0.6rem;
  color: var(--ink);
  transition: color 0.25s;
}
.post-card:hover .post-card-title { color: var(--blue); }
.post-card-excerpt {
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 1rem;
}
.post-card-meta {
  margin-top: auto;
  padding-top: 0.8rem;
  border-top: 1px solid var(--ink);
  font-family: var(--theme-font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: flex;
  gap: 0.8rem;
  align-items: center;
}
.post-card-meta .dot { color: var(--accent); }

/* =========================
   ARTICLE (single post)
   ========================= */
.single-post { position: relative; z-index: 5; }

.article-header {
  padding: 5rem 2rem 3rem;
  max-width: var(--container);
  margin: 0 auto;
  border-bottom: 1px solid var(--ink);
}
.article-header-inner {
  max-width: var(--container-narrow);
  margin: 0 auto;
  text-align: center;
}
.article-kicker {
  display: inline-block;
  font-family: var(--theme-font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  text-decoration: none;
  margin-bottom: 1.5rem;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--red);
}
.article-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 1.2rem;
}
.article-dek {
  font-family: var(--font-heading);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  line-height: 1.4;
  color: var(--ink-soft);
  margin-bottom: 2.5rem;
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
}
.article-meta {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  font-family: var(--theme-font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  padding-top: 1.5rem;
  border-top: 1px solid var(--ink);
  margin-top: 2rem;
}
.article-byline { display: flex; align-items: center; gap: 0.8rem; }
.article-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--gold);
}
.meta-label {
  display: block;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink-soft);
  opacity: 0.7;
}
.meta-value {
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 500;
}
a.meta-value:hover { color: var(--blue); }

.article-feature-image {
  max-width: var(--container);
  margin: 3rem auto;
  padding: 0 2rem;
}
.article-feature-image img {
  width: 100%;
  max-height: 70vh;
  object-fit: cover;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.3);
}
.article-feature-image figcaption {
  font-family: var(--theme-font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 0.8rem;
  text-align: center;
}

/* Prose body — Ghost content */
.article-body {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--ink);
}
.article-body > p:first-of-type::first-letter {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 5.5rem;
  float: left;
  line-height: 0.85;
  margin: 0.4rem 0.7rem 0 0;
  color: var(--blue);
}
.article-body p { margin-bottom: 1.4rem; }
.article-body h2 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 2rem;
  line-height: 1.15;
  margin: 3rem 0 1rem;
  letter-spacing: -0.015em;
}
.article-body h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.5rem;
  font-style: italic;
  margin: 2.2rem 0 0.8rem;
  color: var(--blue);
}
.article-body h4, .article-body h5, .article-body h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  margin: 1.8rem 0 0.6rem;
}
.article-body a {
  color: var(--blue);
  text-decoration: none;
  background-image: linear-gradient(transparent 92%, var(--gold) 92%);
  background-size: 100% 100%;
  transition: background-size 0.3s;
}
.article-body a:hover { background-image: linear-gradient(transparent 0%, var(--gold-light) 0%); }
.article-body strong { font-weight: 700; color: var(--blue-deep); }
.article-body em { font-style: italic; }
.article-body blockquote {
  border-left: 4px solid var(--gold);
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  font-size: 1.3rem;
  color: var(--blue-deep);
}
.article-body ul, .article-body ol { padding-left: 1.5rem; margin-bottom: 1.5rem; }
.article-body li { margin-bottom: 0.5rem; }
.article-body hr {
  border: none;
  text-align: center;
  margin: 3rem 0;
  height: 1rem;
}
.article-body hr::before {
  content: '◆ ◆ ◆';
  color: var(--accent);
  letter-spacing: 1rem;
  font-size: 0.8rem;
}
.article-body code {
  font-family: var(--theme-font-mono);
  font-size: 0.9em;
  background: var(--paper-dark);
  padding: 0.1em 0.4em;
  border-radius: 2px;
}
.article-body pre {
  font-family: var(--theme-font-mono);
  background: var(--blue-deep);
  color: var(--cream);
  padding: 1.5rem;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 2rem 0;
}
.article-body pre code { background: transparent; padding: 0; }
.article-body img { margin: 2rem auto; box-shadow: 0 15px 40px -10px rgba(0,0,0,0.25); }
.article-body figure { margin: 2rem 0; }
.article-body figcaption {
  font-family: var(--theme-font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: center;
  margin-top: 0.8rem;
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-body);
  font-size: 0.95rem;
  margin: 2rem 0;
}
.article-body table th, .article-body table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--ink);
  text-align: left;
}
.article-body table th {
  font-family: var(--theme-font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--blue);
  border-bottom: 2px solid var(--ink);
}

/* Ghost Koenig card support */
.kg-card { margin: 2rem 0; }
.kg-width-wide { max-width: 1100px; margin-left: auto; margin-right: auto; }
.kg-width-full { max-width: none; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
.kg-image-card img, .kg-gallery-image img { width: 100%; }
.kg-bookmark-card {
  border: 1px solid var(--ink);
  display: flex;
  text-decoration: none;
  color: var(--ink);
  overflow: hidden;
}
.kg-bookmark-content { padding: 1.5rem; flex: 1; }
.kg-bookmark-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}
.kg-bookmark-description {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.5;
}
.kg-bookmark-thumbnail { max-width: 240px; }
.kg-bookmark-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.kg-gallery-container { display: flex; flex-direction: column; gap: 0.5rem; }
.kg-gallery-row { display: flex; gap: 0.5rem; }
.kg-gallery-image { flex: 1; }
.kg-callout-card {
  padding: 1.5rem;
  background: var(--paper-dark);
  border-left: 4px solid var(--gold);
  font-family: var(--font-heading);
}
.kg-toggle-card { border: 1px solid var(--ink); padding: 1rem 1.5rem; }
.kg-header-card { padding: 3rem 2rem; text-align: center; background: var(--paper-dark); }

/* Article footer */
.article-footer {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 2rem 2rem 4rem;
  border-top: 1px solid var(--ink);
}
.article-tags { margin-bottom: 3rem; }
.tag-chip {
  display: inline-block;
  font-family: var(--theme-font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  padding: 0.3rem 0.7rem;
  margin: 0.3rem 0.3rem 0 0;
  border: 1px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
  transition: all 0.2s;
}
.tag-chip:hover { background: var(--blue); color: var(--cream); border-color: var(--blue); }

.article-author-box {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 2rem;
  background: var(--paper-dark);
  border: 1px solid var(--ink);
}
.article-author-box img {
  width: 90px; height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
  flex-shrink: 0;
}
.article-author-box h4 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.4rem;
  margin: 0.3rem 0 0.6rem;
}
.article-author-box h4 a { color: var(--ink); text-decoration: none; }
.article-author-box p { font-size: 0.95rem; color: var(--ink-soft); }

/* Read next */
.read-next {
  background: var(--blue-deep);
  color: var(--cream);
  padding: 4rem 2rem;
  border-top: 3px solid var(--gold);
  position: relative;
  z-index: 5;
}
.read-next-label {
  max-width: var(--container-narrow);
  margin: 0 auto 1rem;
  font-family: var(--theme-font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-light);
}
.read-next-link {
  max-width: var(--container-narrow);
  margin: 0 auto;
  display: block;
  color: inherit;
  text-decoration: none;
  position: relative;
}
.read-next-link h3 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  line-height: 1.05;
  margin-bottom: 0.8rem;
  transition: color 0.25s;
}
.read-next-link:hover h3 { color: var(--gold-light); }
.read-next-link p { opacity: 0.8; max-width: 60ch; }
.read-next-arrow {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 2rem;
  color: var(--accent);
  transition: transform 0.3s;
}
.read-next-link:hover .read-next-arrow { transform: translateX(10px); }

/* Comments */
.article-comments {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 3rem 2rem;
  position: relative;
  z-index: 5;
}
.article-comments h3 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.8rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--ink);
}

/* =========================
   ARCHIVE (tag / author)
   ========================= */
.archive-header {
  max-width: var(--container);
  margin: 0 auto;
  padding: 5rem 2rem 3rem;
  border-bottom: 1px solid var(--ink);
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: end;
}
.archive-header-inner { position: relative; }
.archive-kicker {
  font-family: var(--theme-font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1rem;
}
.archive-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2.5rem, 7vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}
.archive-title em { font-style: italic; font-weight: 400; color: var(--blue); }
.archive-dek {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.3rem;
  line-height: 1.4;
  color: var(--ink-soft);
  max-width: 60ch;
  margin-bottom: 1.5rem;
}
.archive-count {
  font-family: var(--theme-font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.archive-avatar {
  width: 120px; height: 120px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  margin-bottom: 1.5rem;
}
.archive-image img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  box-shadow: 0 20px 40px -15px rgba(0,0,0,0.3);
}

/* =========================
   PAGINATION
   ========================= */
.pagination {
  max-width: var(--container-narrow);
  margin: 3rem auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 0;
  border-top: 1px solid var(--ink);
  font-family: var(--theme-font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.pagination a {
  color: var(--ink);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 1px solid var(--ink);
  transition: all 0.2s;
}
.pagination a:hover { background: var(--blue); color: var(--cream); border-color: var(--blue); }
.pagination .page-number { color: var(--ink-soft); }

/* =========================
   ERROR PAGE
   ========================= */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 2rem;
  position: relative;
  z-index: 5;
}
.error-inner { text-align: center; max-width: 500px; }
.error-code {
  font-family: var(--font-heading);
  font-weight: 900;
  font-style: italic;
  font-size: 10rem;
  line-height: 1;
  color: var(--blue);
  margin-bottom: 1rem;
}
.error-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 2rem;
  margin-bottom: 1rem;
}
.error-message {
  font-family: var(--font-heading);
  font-style: italic;
  color: var(--ink-soft);
  margin-bottom: 2rem;
}

/* =========================
   FOOTER
   ========================= */
.site-footer {
  background: var(--blue-deep);
  color: var(--cream);
  position: relative;
  z-index: 5;
  padding: 5rem 2rem 2rem;
  border-top: 3px solid var(--gold);
}
.footer-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(230,180,34,0.3);
}
.footer-brand {
  font-family: var(--font-heading);
  font-weight: 900;
  font-style: italic;
  font-size: 2.2rem;
  line-height: 1;
  margin-bottom: 1rem;
}
.footer-brand span { color: var(--gold-light); font-weight: 300; font-style: normal; }
.footer-address {
  font-family: var(--theme-font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  opacity: 0.7;
  line-height: 1.8;
}
.footer-grid h5 {
  font-family: var(--theme-font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1.2rem;
}
.footer-grid a {
  display: block;
  color: rgba(250,245,232,0.8);
  text-decoration: none;
  font-size: 0.92rem;
  line-height: 1.9;
  font-family: var(--font-heading);
  transition: color 0.2s;
}
.footer-grid a:hover { color: var(--gold-light); }
.footer-bottom {
  max-width: var(--container);
  margin: 2rem auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--theme-font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.6;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-bottom a { color: inherit; text-decoration: none; border-bottom: 1px dotted currentColor; }

/* =========================
   FADE-UP ANIMATIONS
   ========================= */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.9s ease forwards;
}
.fade-up.d1 { animation-delay: 0.1s; }
.fade-up.d2 { animation-delay: 0.25s; }
.fade-up.d3 { animation-delay: 0.4s; }
.fade-up.d4 { animation-delay: 0.55s; }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 1100px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .post-grid-featured { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 2rem; padding: 2.5rem 1.5rem 4rem; }
  .section { padding: 4rem 1.5rem; }
  .section-head { grid-template-columns: 1fr; gap: 1rem; text-align: left; }
  .section-meta { text-align: left; }
  .archive-header { grid-template-columns: 1fr; padding: 3rem 1.5rem 2rem; }
  .article-header { padding: 3rem 1.5rem 2rem; }
  .article-body { font-size: 1.05rem; padding: 2rem 1.5rem 3rem; }
  .article-body > p:first-of-type::first-letter { font-size: 4rem; }
  .article-author-box { flex-direction: column; text-align: center; align-items: center; }

  /* Desktop masthead + nav hidden; mobile bar shown */
  .masthead-full, .masthead-compact { display: none; }
  nav.primary { display: none; }
  .nav-mobile-bar { display: flex; }

  .topbar { font-size: 0.6rem; padding: 0.5rem 1rem; }
  .topbar .marquee-item:nth-child(n+2) { display: none; }

  .site-footer { padding: 3.5rem 1.5rem 1.5rem; }
}

@media (max-width: 620px) {
  .post-grid, .post-grid-featured { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .mobile-panel a { font-size: 1.5rem; }
  .article-meta { gap: 1.2rem; }
  .article-body blockquote { font-size: 1.1rem; padding-left: 1rem; }
  .error-code { font-size: 6rem; }
}

@media (min-width: 901px) {
  .nav-mobile-bar, .mobile-panel { display: none !important; }
}

/* =========================
   A11Y: user preference media queries
   ========================= */

/* Reduced motion — disable animations for users who opt out */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .ticker-track { animation: none !important; transform: none !important; }
  .fade-up { opacity: 1 !important; transform: none !important; animation: none !important; }
  .post-card:hover .post-card-image img,
  .hero-center:hover .hero-image-frame img { transform: none !important; }
  .btn:hover { transform: none !important; box-shadow: none !important; }
  html { scroll-behavior: auto; }
}

/* Higher contrast — darken mid-tone accents, remove subtle opacity */
@media (prefers-contrast: more) {
  :root {
    --gold: #7a5410;
    --gold-soft: #5c3f0c;
    --ink-soft: var(--ink);
    --accent: #7a5410;
  }
  .article-body { font-weight: 500; }
  .topbar .marquee-item,
  .footer-bottom,
  .meta-label { opacity: 1 !important; }
  .post-card-image img { filter: none !important; }
  body::before { display: none; }
  a { text-decoration: underline; }
}

/* Reduced transparency */
@media (prefers-reduced-transparency: reduce) {
  body::before,
  .mobile-panel::before,
  .termin-header::before { display: none; }
  .hero-image-frame::after { display: none; }
}

/* Forced colours (Windows High Contrast) — respect system palette */
@media (forced-colors: active) {
  .btn,
  .tag-chip,
  .hamburger,
  .pagination a { border: 1px solid CanvasText; }
  .btn-primary { background: ButtonFace; color: ButtonText; border-color: ButtonText; }
  nav.primary a.active::after,
  nav.primary a:hover::after { background: LinkText; }
  .wappen, .kg-bookmark-thumbnail img { forced-color-adjust: auto; }
}

/* Data saver — drop the paper grain and decorative gradients */
@media (prefers-reduced-data: reduce) {
  body::before,
  .mobile-panel::before,
  .hero-image-frame::after,
  .termin-header::before { display: none; }
}

/* =========================
   TERMIN (custom template)
   ========================= */
.single-termin { position: relative; z-index: 5; }

.termin-header {
  background: var(--blue-deep);
  color: var(--cream);
  padding: 5rem 2rem 4rem;
  border-bottom: 3px solid var(--accent);
  position: relative;
  overflow: hidden;
}
.termin-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
  opacity: 0.08;
  pointer-events: none;
}
.termin-header-inner {
  max-width: var(--container);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.termin-kicker {
  font-family: var(--theme-font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}
.termin-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.025em;
  margin-bottom: 3rem;
  max-width: 20ch;
}

.termin-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3rem;
  align-items: center;
  padding: 2rem 0;
  border-top: 1px solid rgba(230,180,34,0.3);
  border-bottom: 1px solid rgba(230,180,34,0.3);
}
.termin-date-block {
  font-family: var(--font-heading);
  line-height: 0.95;
  text-align: center;
  padding-right: 3rem;
  border-right: 1px solid rgba(230,180,34,0.3);
}
.termin-day {
  display: block;
  font-size: clamp(4rem, 9vw, 7rem);
  font-weight: 900;
  font-style: italic;
  color: var(--accent);
}
.termin-month {
  display: block;
  font-family: var(--theme-font-mono);
  font-size: 0.9rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-top: 0.5rem;
}
.termin-year {
  display: block;
  font-family: var(--theme-font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  opacity: 0.65;
  margin-top: 0.3rem;
}

.termin-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem 2.5rem;
}
.termin-fact .meta-label {
  color: var(--accent);
  opacity: 0.85;
  margin-bottom: 0.3rem;
}
.termin-fact .meta-value {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--cream);
  font-weight: 500;
}

.termin-dek {
  margin-top: 2.5rem;
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 300;
  font-size: 1.3rem;
  line-height: 1.45;
  color: var(--gold-light);
  max-width: 60ch;
}

/* Hide the raw structured-data block in the post body */
.termin-body .termin-data,
.termin-body .kg-html-card .termin-data { display: none !important; }

@media (max-width: 700px) {
  .termin-hero { grid-template-columns: 1fr; gap: 1.5rem; }
  .termin-date-block { padding: 0 0 1.5rem; border-right: none; border-bottom: 1px solid rgba(230,180,34,0.3); }
  .termin-facts { grid-template-columns: 1fr; gap: 1rem; }
}
