/* =========================================================================
   easy-lappen · Blog (Magazin-Übersicht, Themen, Beiträge)
   Nur auf /blog… geladen, baut auf styles.css (Design v3) auf.
   Seiten werden von tools/build_blog.py erzeugt.
   ========================================================================= */

[hidden] { display: none !important; }

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

/* --- Themen-Leiste ------------------------------------------------------- */
.blog-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 40px;
}
.blog-topic {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 18px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.blog-topic small {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--sage);
  font-size: 12.5px;
  font-weight: 800;
}
.blog-topic:hover { transform: translate(-1px, -2px); box-shadow: 3px 4px 0 var(--ink); }
.blog-topic[aria-current='page'] { background: var(--tbg, var(--olive)); color: var(--tfg, var(--paper)); box-shadow: 3px 3px 0 var(--ink); }
.blog-topic[aria-current='page'] small { background: var(--paper); color: var(--ink); }

/* --- Themen-Etikett ------------------------------------------------------ */
.post-card__meta,
.post-head-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
}
.post-tag,
.post-new {
  display: inline-block;
  padding: 3px 11px 4px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--tbg, var(--sage));
  color: var(--tfg, var(--ink));
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
}
a.post-tag:hover { box-shadow: 2px 2px 0 var(--ink); }
.post-new { background: var(--ink); color: var(--sun); transform: rotate(-3deg); }
.post-tag--expired { background: var(--paper); color: var(--text-quiet); border-style: dashed; }

/* --- Aufmacher (neuester Beitrag) --------------------------------------- */
.post-lead {
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
  margin: 0 0 64px;
  border: 2px solid var(--ink);
  border-radius: 32px;
  background: var(--sun);
  box-shadow: 7px 7px 0 var(--ink);
}
.post-lead__media { display: block; border-bottom: 2px solid var(--ink); background: var(--sage); }
.post-lead__media img { display: block; width: 100%; height: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.post-lead__body { display: flex; flex-direction: column; justify-content: center; padding: clamp(24px, 4vw, 48px); }
.post-lead__title {
  margin: 0 0 14px;
  font-size: clamp(30px, 3.6vw, 52px);
  line-height: 1;
  letter-spacing: -0.035em;
}
.post-lead__title a { color: var(--ink); text-decoration: none; }
.post-lead__title a:hover { text-decoration: underline; text-decoration-color: var(--olive); text-decoration-thickness: 4px; text-underline-offset: 6px; }
.post-lead__excerpt { margin: 0 0 18px; font-size: 18px; line-height: 1.55; color: var(--ink); max-width: 60ch; }
.post-lead__more {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 12px 22px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
}
.post-lead__more:hover { background: var(--olive); color: var(--sun); transform: translateX(3px); }
@media (min-width: 900px) {
  .post-lead { grid-template-columns: 1.25fr 1fr; }
  .post-lead__media { border-bottom: 0; border-right: 2px solid var(--ink); }
  .post-lead__media img { aspect-ratio: auto; min-height: 420px; }
}

/* --- Kartenraster ------------------------------------------------------- */
.blog-section { margin: 0 0 64px; }
.blog-section__head {
  margin: 0 0 22px;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.post-grid > li { display: flex; }
.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 26px;
  background: var(--paper);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.post-card:hover { transform: translate(-2px, -3px); box-shadow: 6px 7px 0 var(--ink); }
.post-card__media { display: block; border-bottom: 2px solid var(--ink); background: var(--sage); }
.post-card__media img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.post-card__body { display: flex; flex: 1; flex-direction: column; padding: 20px 22px 18px; }
.post-card__title { margin: 0 0 10px; font-size: 23px; line-height: 1.12; letter-spacing: -0.02em; }
.post-card__title a,
main .post-grid li .post-card__title a { color: var(--ink); font-weight: inherit; text-decoration: none; }
.post-card:hover .post-card__title a { text-decoration: underline; text-decoration-color: var(--sun); text-decoration-thickness: 3px; text-underline-offset: 4px; }
/* ganze Karte klickbar */
.post-card__title a::after { content: ''; position: absolute; inset: 0; }
.post-card__title a:focus-visible { outline: none; }
.post-card:has(.post-card__title a:focus-visible) { outline: 3px solid var(--sun); outline-offset: 3px; }
.post-card__excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 16px;
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--text);
}
.post-card__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: auto 0 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-quiet);
}
.post-card__foot > * + *::before { content: '·'; margin-right: 14px; color: var(--soon-line); }
.post-lead .post-card__foot { color: var(--ink); font-size: 14.5px; }
.post-lead .post-card__foot > * + *::before { color: var(--ink); }

.blog-empty {
  padding: 40px;
  border: 2px dashed var(--soon-line);
  border-radius: 26px;
  text-align: center;
  font-weight: 600;
}
.blog-back { margin: 28px 0 0; }

/* --- Beitrag ------------------------------------------------------------ */
.post h1 {
  max-width: 24ch;
  font-size: clamp(38px, 5.4vw, 76px);
  line-height: 0.98;
}
.post .article__lead { margin-bottom: 18px; }
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 0 0 30px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-quiet);
}
.post-meta > * + *::before { content: '·'; margin-right: 14px; color: var(--soon-line); }
.post-until {
  display: inline-block;
  margin: 0 0 22px;
  padding: 6px 14px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--sun-soft);
  font-weight: 700;
  color: var(--ink);
}
.post-cover {
  margin: 0 0 8px;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 30px;
  background: var(--sage);
  box-shadow: 7px 7px 0 var(--ink);
}
.post-cover img { display: block; width: 100%; height: auto; max-height: 620px; aspect-ratio: 16 / 9; object-fit: cover; }
.post-cover figcaption,
.post-figure figcaption {
  padding: 8px 16px;
  border-top: 2px solid var(--ink);
  background: var(--paper);
  font-size: 13px;
  color: var(--text-quiet);
}
.post-body { margin-top: 48px; }
.post-body > p:first-child { font-size: 19px; }
.post-figure {
  max-width: 95ch;
  margin: 28px 0;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 22px;
}
.post-figure img { display: block; width: 100%; height: auto; }
.post-body blockquote {
  max-width: 95ch;
  margin: 24px 0;
  padding: 4px 0 4px 22px;
  border-left: 6px solid var(--sun);
  font-size: 19px;
  font-style: italic;
  color: var(--ink);
}
.post-body hr { max-width: 95ch; margin: 40px 0; border: 0; border-top: 2px dashed var(--line); }
.post-body code { padding: 1px 6px; border-radius: 6px; background: var(--sage-soft); font-size: 0.92em; }
.table-wrap { max-width: 95ch; margin: 20px 0 24px; overflow-x: auto; }
.table-wrap table { margin: 0; min-width: 480px; }

/* Hinweiskästen: > [!ACHTUNG] / [!INFO] / [!TIPP] */
.callout {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  max-width: 95ch;
  margin: 26px 0;
  padding: 18px 22px;
  border: 2px solid var(--ink);
  border-radius: 20px;
  background: var(--sage-soft);
  color: var(--text);
}
.callout__mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  font-weight: 800;
  color: var(--ink);
}
.callout b { display: block; margin: 2px 0 4px; font-family: var(--display); font-size: 18px; color: var(--ink); }
.callout p { margin: 0 0 8px; font-size: 16.5px; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout--warn { background: var(--sun-soft); box-shadow: 5px 5px 0 var(--ink); }
.callout--warn .callout__mark { background: var(--sun); }
.callout--tip .callout__mark { background: var(--olive); color: var(--sun); }
.post-expired { margin: 0 0 22px; }

.post .faq__content p { margin: 0 0 10px; }
.post .faq__content p:last-child { margin: 0; }
.post-note { max-width: 95ch; margin-top: 40px; }
.post-related { margin-top: 64px; }

@media (max-width: 700px) {
  .post h1 { font-size: clamp(34px, 9.5vw, 46px); }
  .post-cover { border-radius: 22px; box-shadow: 5px 5px 0 var(--ink); }
  .post-lead { border-radius: 26px; box-shadow: 5px 5px 0 var(--ink); }
  .post-card__title { font-size: 21px; }
}

@media print {
  .blog-topics, .post-related, .post-cover { display: none; }
}
