/* ==========================================================
   Ingenieurbüro Kern GmbH – Stylesheet
   Farben aus dem Deckblatt / Teams-Hintergrund
   ========================================================== */
:root {
  --slate: #61748a;        /* großes Sechseck */
  --slate-dark: #45566b;
  --slate-ink: #2c3a4b;    /* Fließtext */
  --lime: #bfd661;         /* Sechseck unten rechts */
  --lime-dark: #9fb83f;
  --logo: #59c134;         /* Logo-Grün */
  --grey-light: #e3e8ed;
  --grey-mid: #90a0b0;
  --line: #a5b2bf;         /* Kontur-Sechsecke */
  --bg: #ffffff;
  --bg-soft: #f4f6f8;
  --text: #2c3a4b;
  --muted: #5d6b7b;
  --radius: 6px;
  --maxw: 1180px;
  --font: "Century Gothic", "Avenir Next", Avenir, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --hex: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
main { overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--slate-dark); text-underline-offset: 3px; }
a:hover { color: var(--logo); }
h1, h2, h3 { line-height: 1.2; font-weight: 600; color: var(--slate-ink); margin: 0 0 .6em; letter-spacing: .01em; }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--slate); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--logo); outline-offset: 2px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--grey-light);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--slate-ink); }
.brand .logo { width: 35px; height: 47px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-size: 1.02rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.brand-sub { font-size: .8rem; color: var(--muted); letter-spacing: .03em; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; align-items: center; }
.nav a {
  display: block; padding: 10px 14px; text-decoration: none; color: var(--slate-ink);
  font-size: .97rem; border-radius: var(--radius);
}
.nav a:hover { background: var(--bg-soft); color: var(--slate-dark); }
.nav a[aria-current="page"] { color: var(--slate-dark); box-shadow: inset 0 -3px 0 var(--lime); border-radius: 0; }
.nav .btn { margin-left: 8px; }
.nav-toggle {
  display: none; background: none; border: 0; padding: 10px; cursor: pointer; color: var(--slate-ink);
}
.nav-toggle svg { width: 28px; height: 28px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius);
  font: inherit; font-weight: 600; font-size: .98rem; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: background .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--lime); color: var(--slate-ink); }
.btn-primary:hover { background: var(--lime-dark); color: var(--slate-ink); }
.btn-ghost { border-color: rgba(255,255,255,.75); color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--slate-dark); }
.btn-dark { background: var(--slate); color: #fff; }
.btn-dark:hover { background: var(--slate-dark); color: #fff; }
.nav .btn-primary { padding: 9px 18px; }

/* ---------- Hero (Deckblatt-Motiv) ---------- */
.hero { position: relative; overflow: hidden; padding: 36px 0; }
.hero-hex { display: none; }
.hero-lime {
  display: none; position: absolute; aspect-ratio: .866; background: var(--lime); clip-path: var(--hex);
}
.hero-outline { display: none; position: absolute; }
.hero .container { position: relative; z-index: 2; }
/* Text-Sechseck links, Themen-Waben direkt daneben */
.hero-grid { display: flex; align-items: center; gap: 28px; }
.hero-grid .hero-content { flex: 0 0 auto; }
.hero-themen {
  flex: 0 0 auto; display: block; height: auto;
  width: clamp(560px, 48vw, 860px);
}
.hero-content {
  width: 640px; aspect-ratio: .866; margin-left: -150px; padding: 0 56px 0 150px;
  display: flex; flex-direction: column; justify-content: center;
  background: var(--slate); clip-path: var(--hex); color: #fff;
}
.hero-content h1 { color: #fff; font-size: 2.7rem; }
.eyebrow {
  display: inline-block; font-size: .85rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--lime); font-weight: 600; margin-bottom: 18px;
}
.hero-content p { font-size: 1.06rem; color: rgba(255,255,255,.92); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* Seitenkopf für Unterseiten */
.page-head { position: relative; overflow: hidden; background: var(--slate); color: #fff; padding: 72px 0 84px; }
.page-head h1 { color: #fff; margin-bottom: .3em; }
.page-head p { max-width: 60ch; color: rgba(255,255,255,.9); font-size: 1.08rem; margin: 0; }
.page-head .deco { position: absolute; right: -40px; top: -20px; width: 340px; opacity: .55; }
.page-head .deco-lime {
  position: absolute; right: 8%; bottom: -70px; width: 150px; aspect-ratio: .866;
  background: var(--lime); clip-path: var(--hex);
}

/* ---------- Abschnitte ---------- */
section.block { padding: 88px 0; }
section.soft { background: var(--bg-soft); }
.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head p { color: var(--muted); font-size: 1.06rem; }
.kicker { display: block; color: var(--slate); font-weight: 600; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 10px; }
.kicker::before { content: ""; display: inline-block; width: 12px; height: 14px; margin-right: 8px; vertical-align: -1px; background: var(--lime); clip-path: var(--hex); }

/* Karten */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: #fff; border: 1px solid var(--grey-light); border-radius: 10px; padding: 30px 28px;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(44,58,75,.09); border-color: #d3dae1; }
.card p { color: var(--muted); margin: 0; }
.card ul { color: var(--muted); padding-left: 1.1em; margin: .6em 0 0; }
.card ul li { margin-bottom: .3em; }
.hex-icon {
  width: 52px; height: 60px; display: grid; place-items: center; margin-bottom: 18px;
  background: var(--grey-light); clip-path: var(--hex); color: var(--slate-dark);
}
.hex-icon svg { width: 24px; height: 24px; }
.card:nth-child(3n+2) .hex-icon { background: var(--lime); color: var(--slate-ink); }
.card:nth-child(3n+3) .hex-icon { background: var(--slate); color: #fff; }
.card-link { display: inline-block; margin-top: 14px; font-weight: 600; text-decoration: none; }
.card-link::after { content: " →"; }

/* Bild + Text */
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.split.reverse { grid-template-columns: 1fr 1.1fr; }
.split figure { margin: 0; position: relative; }
.split figure img { border-radius: 10px; box-shadow: 0 20px 50px rgba(44,58,75,.14); }
.split figure::after {
  content: ""; position: absolute; width: 90px; aspect-ratio: .866; background: var(--lime);
  clip-path: var(--hex); right: -22px; bottom: -28px; z-index: -1;
}
.checklist { list-style: none; padding: 0; margin: 20px 0 0; }
.checklist li { position: relative; padding-left: 30px; margin-bottom: 12px; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .42em; width: 14px; height: 16px;
  background: var(--lime); clip-path: var(--hex);
}
.checklist strong { color: var(--slate-ink); }

/* Kennzahlen */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 8px; }
.fact { border-left: 4px solid var(--lime); padding: 6px 0 6px 18px; }
.fact b { display: block; white-space: nowrap; font-size: 1.5rem; color: var(--slate-dark); line-height: 1.2; }
.fact span { color: var(--muted); font-size: .95rem; }

/* Ablauf */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; background: #fff; border-radius: 10px; padding: 24px 20px; border: 1px solid var(--grey-light); }
.steps li::before {
  content: counter(s); display: grid; place-items: center; width: 40px; height: 46px; margin-bottom: 14px;
  background: var(--slate); color: #fff; font-weight: 700; clip-path: var(--hex);
}
.steps li:nth-child(even)::before { background: var(--lime); color: var(--slate-ink); }
.steps h3 { font-size: 1.05rem; margin-bottom: .35em; }
.steps p { color: var(--muted); font-size: .95rem; margin: 0; }

/* Tags */
.tags { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.tags li { background: #fff; border: 1px solid var(--grey-light); padding: 8px 16px; border-radius: 30px; font-size: .95rem; }

/* CTA-Band */
.cta { position: relative; overflow: hidden; background: var(--lime); padding: 64px 0; }
.cta .container { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; position: relative; z-index: 1; }
.cta h2 { margin: 0 0 .25em; }
.cta p { margin: 0; color: var(--slate-ink); }
.cta .deco { position: absolute; left: -30px; top: -30px; width: 240px; opacity: .35; }

/* ---------- Kontakt ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; align-items: start; }
.info-card { background: var(--slate); color: #fff; border-radius: 10px; padding: 34px 30px; position: relative; overflow: hidden; }
.info-card h2 { color: #fff; font-size: 1.5rem; }
.info-card a { color: #fff; }
.info-card a:hover { color: var(--lime); }
.info-card dl { margin: 0; }
.info-card dt { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--lime); margin-top: 18px; }
.info-card dd { margin: 4px 0 0; }
.info-card::after {
  content: ""; position: absolute; width: 120px; aspect-ratio: .866; right: -30px; bottom: -40px;
  background: var(--lime); clip-path: var(--hex); opacity: .9;
}
form.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
label { font-weight: 600; font-size: .93rem; color: var(--slate-ink); }
.req { color: var(--slate); }
input, textarea, select {
  font: inherit; font-size: 1rem; color: var(--text);
  padding: 12px 14px; border: 1px solid #c9d2db; border-radius: var(--radius); background: #fff; width: 100%;
}
input:focus, textarea:focus { outline: none; border-color: var(--slate); box-shadow: 0 0 0 3px rgba(97,116,138,.2); }
textarea { min-height: 160px; resize: vertical; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; font-size: .92rem; color: var(--muted); }
.consent input { width: 20px; height: 20px; margin-top: 3px; flex: none; accent-color: var(--slate); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .85rem; color: var(--muted); margin: 0; }
.alert { grid-column: 1 / -1; padding: 14px 18px; border-radius: var(--radius); font-weight: 600; display: none; }
.alert.ok { background: #eef6d6; color: #3d5113; border: 1px solid var(--lime-dark); }
.alert.err { background: #fbe9e7; color: #8a2a1d; border: 1px solid #e3a297; }
.alert.show { display: block; }

/* ---------- Rechtstexte ---------- */
.legal { max-width: 820px; }
.legal h2 { font-size: 1.35rem; margin-top: 1.8em; }
.legal h3 { font-size: 1.08rem; margin-top: 1.4em; }
.legal address { font-style: normal; }

/* ---------- Footer ---------- */
.site-footer { background: var(--slate-ink); color: #c7d0d9; padding: 64px 0 28px; font-size: .95rem; }
.site-footer a { color: #e3e8ed; text-decoration: none; }
.site-footer a:hover { color: var(--lime); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; }
.site-footer h3 { color: #fff; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer address { font-style: normal; }
.footer-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; color: #fff; }
.footer-brand .logo { width: 34px; height: 45px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12); margin-top: 44px; padding-top: 22px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: .85rem;
}
.hex-trio { display: flex; gap: 6px; }
.hex-trio i { width: 22px; height: 25px; clip-path: var(--hex); display: block; }
.hex-trio i:nth-child(1) { background: var(--grey-light); }
.hex-trio i:nth-child(2) { background: var(--lime); }
.hex-trio i:nth-child(3) { background: var(--slate); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .split, .split.reverse { grid-template-columns: 1fr; gap: 40px; }
  .split.reverse figure { order: -1; }
  .contact-grid { grid-template-columns: 1fr; }
}
/* Menü mit 6 Punkten: ab 1100px als Klappmenü */
@media (max-width: 1100px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: 76px 0 auto 0; background: #fff; border-bottom: 1px solid var(--grey-light);
    box-shadow: 0 18px 30px rgba(44,58,75,.12); display: none;
  }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; padding: 10px 16px 18px; gap: 2px; }
  .nav a { padding: 14px 12px; font-size: 1.05rem; }
  .nav a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--lime); }
  .nav .btn { margin: 10px 0 0; justify-content: center; }

}
@media (max-width: 1099px) {
  .hero { padding: 0 0 50px; background: #fff; }
  .hero-hex {
    display: block; position: absolute; left: 0; top: 0; width: 100%; height: calc(100% - 50px);
    background: var(--slate); clip-path: polygon(0 0, 100% 0, 100% calc(100% - 64px), 50% 100%, 0 calc(100% - 64px));
  }
  .hero-content { width: auto; aspect-ratio: auto; margin: 0; padding: 64px 0 120px; background: none; clip-path: none; max-width: 600px; }
  .hero-content h1 { font-size: clamp(2rem, 6vw, 2.8rem); }
  .hero-outline { display: block; width: min(46vw, 300px); right: -6vw; top: 14px; opacity: .45; }
  .hero-lime { display: block; width: 100px; right: 18px; bottom: 0; }
  .hero-themen { display: none; }
  .hero-grid { display: block; }
}
@media (max-width: 860px) {
  .page-head { padding: 52px 0 96px; }
  .page-head .deco-lime { width: 80px; right: 18px; bottom: -36px; }
  .info-card { padding-bottom: 80px; }
  .page-head .deco { width: 220px; opacity: .35; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  section.block { padding: 60px 0; }
  .container { padding: 0 18px; }
  .cards, .facts, .steps { grid-template-columns: 1fr; }
  form.contact { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .brand-sub { display: none; }
  .brand-name { font-size: .9rem; }
  .cta { padding: 48px 0; }
  .hero-actions .btn { flex: 1 1 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .cta, .hero-outline, .hero-themen, .hero-lime { display: none; }
  .hero-hex, .page-head { background: none; }
  .hero-content, .page-head, .page-head h1, .hero-content h1 { color: #000; }
}

/* Tag „und viele weitere“ */
.tags li.more { background: var(--lime); border-color: var(--lime); font-weight: 600; color: var(--slate-ink); }

/* ==========================================================
   Fachbeiträge (Übersicht und Artikel)
   ========================================================== */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; font-size: .9rem; margin-bottom: 22px; color: #fff; }
.breadcrumb a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255,255,255,.45); text-underline-offset: 4px; }
.breadcrumb a:hover { color: var(--lime); text-decoration-color: var(--lime); }
.breadcrumb .sep { display: inline-block; width: 7px; height: 8px; margin: 0 12px; background: var(--lime); clip-path: var(--hex); }
.breadcrumb [aria-current] { font-weight: 600; }
.page-head .post-meta { color: #fff; margin-top: 26px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.25); max-width: 60ch; font-size: .92rem; }
.page-head .post-meta span::before, .page-head .post-meta time + span::before { background: var(--lime); }

/* Meta-Zeile: Datum · Thema · Lesezeit */
.post-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .88rem; color: var(--muted); }
.post-meta span { position: relative; padding-left: 18px; }
.post-meta span::before {
  content: ""; position: absolute; left: 0; top: .45em; width: 8px; height: 9px;
  background: var(--grey-mid); clip-path: var(--hex);
}

/* Beitragsliste */
.post-list { display: grid; gap: 20px; }
.post-card {
  background: #fff; border: 1px solid var(--grey-light); border-left: 5px solid var(--lime);
  border-radius: 0 10px 10px 0; padding: 26px 30px; display: grid; gap: 10px;
  transition: box-shadow .2s, border-color .2s;
}
.post-card:hover { box-shadow: 0 14px 34px rgba(44,58,75,.09); }
.post-card h3 { font-size: 1.4rem; margin: 0; }
.post-card h3 a { color: var(--slate-ink); text-decoration: none; }
.post-card h3 a:hover { color: var(--slate-dark); text-decoration: underline; }
.post-card p { color: var(--muted); margin: 0; max-width: 75ch; }
.post-card .card-link { margin-top: 2px; justify-self: start; }
.post-topics { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 28px; }
.post-topics li { background: var(--bg-soft); border: 1px solid var(--grey-light); padding: 6px 14px; border-radius: 30px; font-size: .9rem; }
.post-soon { margin-top: 28px; color: var(--muted); font-size: .95rem; }

/* Artikel-Layout: Text links, Seitenleiste rechts */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 64px; align-items: start; }
.prose { max-width: 720px; min-width: 0; }
section.article-body { padding-top: 56px; }
.prose > .lead {
  font-size: 1.16rem; line-height: 1.7; color: var(--slate-ink);
  padding: 4px 0 4px 22px; border-left: 4px solid var(--lime); margin-bottom: 1.4em;
}
.prose h2 { font-size: 1.6rem; margin-top: 1.9em; scroll-margin-top: 96px; }
.prose h2::before {
  content: ""; display: inline-block; width: .6em; height: .7em; margin-right: .45em;
  background: var(--lime); clip-path: var(--hex); vertical-align: .02em;
}
.prose a { font-weight: 600; }
.prose code { font-family: Consolas, "Courier New", monospace; font-size: .92em; background: var(--bg-soft); padding: 1px 5px; border-radius: 4px; }
.code {
  margin: 1.4em 0 .6em; background: #24303d; color: #e6ebf0; border-radius: 10px;
  border: 1px solid #1b2530; box-shadow: 0 12px 28px rgba(44,58,75,.16);
  overflow: hidden; font-family: Consolas, "Courier New", monospace; font-size: .9rem; line-height: 1.65;
}
.code::before {
  content: attr(data-lang); display: block; padding: 8px 18px; font-family: var(--font);
  font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--slate-ink); background: var(--lime);
}
.code code { display: block; padding: 16px 20px 18px; overflow-x: auto; white-space: pre; background: none; font: inherit; color: inherit; }
.code .c { color: #8fa3b8; font-style: italic; }
.code .k { color: #7cc4ff; font-weight: 600; }
.code .n { color: #f2b872; }
.code .s { color: #f2b872; }
.code .io { color: #bfd661; }
.code .pv { color: #ffffff; font-weight: 600; }
.code .fb { color: #e5a0ff; }
.code .o { color: #9fb0c2; }
.code-note { font-size: .92rem; color: var(--muted); margin-bottom: 1.4em; }

/* Ebenenmodell */
.layers { margin: 1.4em 0; display: grid; gap: 6px; }
.layer {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; align-items: center;
  padding: 12px 18px; background: #fff; border: 1px solid var(--grey-light); border-radius: var(--radius);
}
.layer b { color: var(--slate-ink); }
.layer span { grid-column: 1; font-size: .92rem; color: var(--muted); }
.layer em {
  grid-column: 2; grid-row: 1 / span 2; font-style: normal; font-size: .75rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--grey-mid);
}
.layer.individuell { border: 2px solid var(--lime); background: #f8fbec; }
.layer.individuell em { color: var(--slate-ink); background: var(--lime); padding: 3px 10px; border-radius: 20px; }
.layers-caption { font-size: .9rem; color: var(--muted); margin-top: -.4em; }

/* Farblich abgesetzter Hinweis */
.note {
  position: relative; overflow: hidden; margin: 2.2em 0; padding: 30px 34px;
  background: #f3f8df; border: 2px solid var(--lime); border-left-width: 8px; border-radius: 10px;
  box-shadow: 0 12px 28px rgba(159,184,63,.18);
}
.note::after {
  content: ""; position: absolute; right: -26px; top: -30px; width: 110px; aspect-ratio: .866;
  background: var(--lime); clip-path: var(--hex); opacity: .35;
}
.note .kicker { margin-bottom: 6px; }
.note h3 { font-size: 1.45rem; margin-bottom: .5em; position: relative; z-index: 1; }
.note p, .note ul { position: relative; z-index: 1; }
.note p:last-child { margin: 0; }

/* Seitenleiste */
.article-aside { position: sticky; top: 100px; display: grid; gap: 22px; }
.aside-box { border: 1px solid var(--grey-light); border-radius: 10px; padding: 22px 22px 18px; background: #fff; }
.aside-box h2 { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--slate); margin: 0 0 12px; }
.aside-box ol, .aside-box ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: .93rem; }
.aside-box a { text-decoration: none; color: var(--slate-ink); }
.aside-box a:hover { color: var(--slate-dark); text-decoration: underline; }
.aside-box.dark { background: var(--slate); border-color: var(--slate); color: #fff; }
.aside-box.dark h2 { color: var(--lime); }
.aside-box.dark p { color: rgba(255,255,255,.9); font-size: .95rem; }
.aside-box.dark .btn { width: 100%; justify-content: center; }

/* Weiterführende Leistungen unter dem Artikel */
.related-cards { grid-template-columns: repeat(4, 1fr); }
.related-cards .card { padding: 24px 22px; display: flex; flex-direction: column; }
.related-cards .card p { flex: 1; }
.article-end { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2.2em; padding-top: 1.6em; border-top: 1px solid var(--grey-light); }

@media (max-width: 1080px) {
  .related-cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  .article-layout { grid-template-columns: 1fr; gap: 40px; }
  .article-aside { position: static; }
  .article-aside .toc { display: none; }
}
@media (max-width: 640px) {
  .post-card { padding: 22px 20px; }
  .note { padding: 24px 20px; }
  .related-cards { grid-template-columns: 1fr; }
  .layer { grid-template-columns: 1fr; }
  .layer em { grid-column: 1; grid-row: auto; justify-self: start; }
}
@media print {
  .article-aside, .related, .article-end { display: none; }
  .article-layout { display: block; }
}
