/* Blog — layered on /styles.css, /promptkits/kit.css and /signup.css. Only blog components live here. */

.blog-home > *,
.blog-post > * {
  max-width: calc(860px * var(--site-scale));
}

/* Overview */

.blog-list {
  display: grid;
  gap: 1rem;
}

.blog-card {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  padding: 1.5rem;
  border: calc(1px * var(--site-scale)) solid #dce5f2;
  border-radius: calc(12px * var(--site-scale));
  background: #f2f6fc;
  color: var(--ink);
  transition: background-color .22s ease, border-color .22s ease, transform .22s ease;
}

.blog-card span {
  color: var(--blue);
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.blog-card strong {
  margin-top: .4rem;
  color: var(--navy);
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  font-weight: 750;
  letter-spacing: -.02em;
  line-height: 1.2;
}

.blog-card p {
  margin: .3rem 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.blog-card:hover,
.blog-card:focus-visible {
  border-color: #bfd0e9;
  background: #eaf2ff;
  transform: translateY(calc(-2px * var(--site-scale)));
  outline: none;
}

.blog-older {
  margin-top: 3.5rem;
}

.blog-older h2 {
  margin: 0 0 .5rem;
}

.blog-empty {
  color: var(--muted);
}

/* Post */

.blog-title {
  padding: 2.5rem 0 1rem;
}

.blog-title h1 {
  margin-bottom: .6rem;
}

.blog-date {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: .95rem;
}

.blog-title .lede {
  margin: 0;
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.65;
}

.blog-content {
  line-height: 1.65;
}

.blog-content h2 {
  margin: 3rem 0 1rem;
  padding-top: 2rem;
  border-top: calc(1px * var(--site-scale)) solid var(--line);
}

.blog-content h3 {
  margin: 2.2rem 0 .6rem;
  color: var(--navy);
  font-size: 1.25rem;
  letter-spacing: -.01em;
  line-height: 1.3;
}

.blog-region {
  white-space: nowrap;
}

.blog-content p {
  margin: 0 0 1rem;
}

/* Keep source citations visually connected to their news item. */
.blog-content p.blog-sources {
  margin-top: -.45rem;
}


.blog-content p.cta {
  margin: 2.25rem 0 0;
  padding: 1.15rem 1.35rem;
  border-left: 0;
  border-radius: calc(8px * var(--site-scale));
  background: #f2f6fc;
  color: var(--navy);
  font-size: 1rem;
  line-height: 1.65;
}

.blog-content p.cta a {
  color: var(--blue);
  font-weight: 650;
}

.blog-content ul,
.blog-content ol {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.blog-content li {
  margin-bottom: .4rem;
}

.blog-content a {
  color: var(--blue);
  border-bottom: calc(1px * var(--site-scale)) solid currentColor;
  overflow-wrap: anywhere;
}

.blog-content a:hover,
.blog-content a:focus-visible {
  color: var(--navy);
  outline: none;
}

.blog-topics {
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.6;
}

.blog-topics strong {
  color: var(--navy);
}

.blog-topics a,
.blog-book a:not(.button) {
  color: var(--blue);
  border-bottom: calc(1px * var(--site-scale)) solid currentColor;
}

.blog-content h3 {
  scroll-margin-top: 6rem;
}

.blog-book {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  align-items: center;
  gap: 2rem;
  margin-top: 5rem;
  padding: 0;
  border: 0;
  border-radius: 0;
}

.blog-book-line {
  margin: 0 0 1.5rem;
  color: var(--navy);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 750;
  letter-spacing: -.025em;
  line-height: 1.2;
}

.blog-book img {
  width: 100%;
  height: auto;
}

/* Keep the book proportionate to the headline on tablet and desktop. */
@media (min-width: 561px) {
  .blog-book-visual img {
    display: block;
    width: 95%;
    margin-inline: auto;
  }
}

.blog-book .button.primary {
  margin-left: 0;
  background: #f2f6fc;
  color: var(--navy);
  border-color: #dce5f2;
  box-shadow: none;
  transition: background-color .22s ease, border-color .22s ease, transform .22s ease;
}
.blog-book .button.primary:hover,
.blog-book .button.primary:focus-visible {
  background: #eaf2ff;
  border-color: #bfd0e9;
  box-shadow: none;
  transform: translateY(calc(-2px * var(--site-scale)));
}

@media (max-width: 560px) {
  .blog-book {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .blog-book-visual img {
    display: block;
    width: 100%;
    max-width: 360px;
    margin-inline: auto;
  }
}

/* Previous week, index, next week. Equal side columns keep „Alle Beiträge“ centered when one week is missing. */
.kit-nav.bottom.blog-issue-nav {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  /* No separator above or below the blog navigation. */
  margin-top: 3rem;
  padding-top: 0;
  border-top: 0;
}

.blog-issue-nav > :first-child {
  justify-self: start;
}

.blog-issue-nav > :last-child {
  justify-self: end;
}

/* All blog issue navigation buttons share the same appearance and interaction
   on mobile, tablet and desktop, regardless of primary/secondary class. */
.blog-issue-nav .button,
.blog-issue-nav .button.primary,
.blog-issue-nav .button.secondary {
  white-space: nowrap;
  margin-left: 0;
  background: #fff;
  border-color: #b9c7de;
  color: var(--navy);
}

.blog-issue-nav .button:hover,
.blog-issue-nav .button:focus-visible,
.blog-issue-nav .button.primary:hover,
.blog-issue-nav .button.primary:focus-visible,
.blog-issue-nav .button.secondary:hover,
.blog-issue-nav .button.secondary:focus-visible {
  background: #eaf2ff;
  border-color: #bfd0e9;
  color: var(--navy);
}

@media (max-width: 560px) {
  .blog-issue-nav .button {
    min-height: calc(40px * var(--site-scale));
    padding-inline: .65rem;
    font-size: .8125rem;
  }
}

/* Sign-up box */

.blog-subscribe {
  margin-top: 3.5rem;
  border: calc(1px * var(--site-scale)) solid #dce5f2;
  border-radius: calc(12px * var(--site-scale));
  background: #f2f6fc;
}

.blog-subscribe .signup-actions {
  justify-content: flex-start;
}



.blog-book-quote {
  margin: 1rem 0 0;
  color: var(--navy);
  font-size: .9rem;
  line-height: 1.5;
}
.blog-book-quote p {
  margin: 0 0 .6rem;
  font-weight: 760;
}
.blog-book-quote cite {
  font-size: .8rem;
  font-style: normal;
}
@media (prefers-reduced-motion: no-preference) {
  .blog-book-quote.quote-reveal {
    transform: translate3d(calc(72px * var(--site-scale)), 0, 0);
    transition: transform .85s cubic-bezier(.16, 1, .3, 1) .15s;
  }
  .blog-book-quote.quote-reveal.is-visible {
    transform: translate3d(0, 0, 0);
  }
}

.blog-book-copy {
  align-self: stretch;
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.blog-book-copy .blog-book-line {
  margin-top: auto;
}
.blog-book-authors {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  width: 100%;
  margin-top: auto;
  padding-top: 3rem;
}
.blog-book-authors > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .6rem;
}
.blog-book-authors img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 50%;
}
.blog-book-authors span {
  color: var(--navy);
  font-size: .8rem;
  font-weight: 400;
  line-height: 1.3;
}
@media (max-width: 560px) {
  .blog-book-authors {
    padding-top: 2rem;
  }
  .blog-book-authors img {
    margin-inline: 0;
  }
}

.blog-book-line {
  font-size: clamp(2.2rem, 4.62vw, 3.465rem);
  font-weight: 780;
  letter-spacing: -.05em;
  line-height: 1.12;
}
.blog-book-authors img {
  width: 84px;
  height: 84px;
}
.blog-book-authors span {
  font-size: .8rem;
  line-height: 1.5;
}
@media (max-width: 560px) {
  .blog-book-line {
    font-size: 1.65rem;
  }
  .blog-book-authors img {
    width: 72px;
    height: 72px;
  }
}

.blog-book-line { white-space: pre-line; }
@media (max-width: 560px) {
  .blog-book-line { white-space: normal; }
  .blog-book-desktop-break { display: none; }
}

.blog-book-footer {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 2rem;
  align-items: stretch;
}
.blog-book-footer .blog-book-quote {
  margin: 0;
}
.blog-book-footer .blog-book-authors {
  margin: 0;
  padding: 0 0 .22rem;
}
.blog-book-footer .blog-book-authors > div {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: start;
  justify-items: center;
}
.blog-book-footer .blog-book-authors img {
  contain: size;
  width: auto;
  height: 100%;
  min-height: 0;
  max-width: 100%;
  aspect-ratio: 1;
}
.blog-book-authors span {
  text-align: center;
  line-height: 1.15;
}
@media (max-width: 560px) {
  .blog-book-footer {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .blog-book-footer .blog-book-authors img {
    contain: none;
    width: 88px;
    height: 88px;
  }
}

@media (max-width: 560px) {
  .blog-book-copy { padding-bottom: 0; }
  .blog-book-footer .blog-book-authors { padding-bottom: 0; }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .blog-book-authors img {
    transition: transform .28s ease;
  }
  .blog-book-authors img:hover {
    transform: translateY(calc(-2px * var(--site-scale))) scale(1.04);
  }
}


/* Mobile book promotion follows the requested reading order. */
@media (max-width: 560px) {
  .blog-book { grid-template-columns: minmax(0, 1fr); }
  .blog-book-copy,
  .blog-book-footer { display: contents; }
  .blog-book-visual { order: 1; min-width: 0; }
  .blog-book-line { order: 2; margin: 0; }
  .blog-book-quote { order: 3; min-width: 0; }
  .blog-book .button.primary { order: 4; justify-self: start; }
  .blog-book-authors {
    order: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    width: 100%;
    padding-top: 1.5rem;
  }
  .blog-book-footer .blog-book-authors {
    display: grid;
  }
}
@media (max-width: 560px) and (prefers-reduced-motion: no-preference) {
  .blog-book-quote.quote-reveal {
    transform: translate3d(0, 22px, 0);
  }
  .blog-book-quote.quote-reveal.is-visible {
    transform: translate3d(0, 0, 0);
  }
}

/* Match the quiet portrait hover on the book cover. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .blog-book-visual img { transition: transform .28s ease; }
  .blog-book-visual img:hover {
    transform: translateY(calc(-3px * var(--site-scale))) scale(1.025);
  }
}

/* To-dos use white numbers in navy circles, matching the reference. */
.blog-content ol.blog-todos {
  margin-top: 2.2rem;
  padding-left: 0;
  list-style: none;
  counter-reset: todo;
}
.blog-todos > li {
  position: relative;
  padding-left: 2.25rem;
  counter-increment: todo;
}
.blog-todos > li::before {
  content: counter(todo);
  position: absolute;
  left: 0;
  top: .2em;
  display: grid;
  place-items: center;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  line-height: 1;
}

/* Keep the fixed break in desktop/tablet book promotion; hide it only on phones. */
@media (max-width: 560px) {
  .blog-book-line .blog-book-desktop-break { display: none; }
}

/* More visible line spacing for the mobile book promotion headline only. */
@media (max-width: 560px) {
  .blog-book .blog-book-line { line-height: 1.32; }
}

/* Final book-promotion alignment overrides the general layout rules. */
/* Match the bottom of the CTA with the book instead of leaving a gap below it. */
@media (min-width: 561px) {
  .blog-book {
    align-items: stretch;
  }
  .blog-book-copy {
    /* The image contains white pixels below the visible book; align to the book edge. */
    padding-bottom: clamp(1.5rem, 3.5vw, 3.5rem);
  }
  .blog-book-copy .blog-book-line {
    margin-top: 0;
  }
  .blog-book .button.primary {
    margin-top: auto;
  }
}

@media (max-width: 560px) {
  .blog-book { margin-top: 5rem; }
  /* Bring the headline only slightly closer to the book on phones. */
  .blog-book .blog-book-line { margin-top: -.5rem; }
}

/* Short videos in posts (!video[...](...) in the Markdown, see redaktion/VIDEO-WORKFLOW.md). */
.blog-content .blog-videos {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1.5rem 0 2rem;
  max-width: 17rem;
}

.blog-content .blog-videos-row {
  grid-template-columns: 1fr 1fr;
  max-width: 34rem;
}

@media (max-width: 480px) {
  .blog-content .blog-videos-row { grid-template-columns: 1fr; max-width: 17rem; }
}

.blog-content .blog-video {
  margin: 0;
  min-width: 0;
}

.blog-content .blog-video video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  background: var(--navy);
  border: calc(1px * var(--site-scale)) solid var(--line);
  border-radius: calc(8px * var(--site-scale));
}

.blog-content .blog-video figcaption {
  margin-top: .5rem;
  color: var(--muted);
  font-size: .85rem;
  line-height: 1.4;
}
