/* ==========================================================================
   Styles the Laravel site adds to the static design: the blog (article list,
   article page and the text inside it) and the text block. Tokens only, from
   :root in style.css, so the dark theme and the palette switcher reach them.
   ========================================================================== */

/* --- article list ------------------------------------------------------ */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2.4vw, 1.6rem); }
@media (max-width: 1000px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .post-grid { grid-template-columns: 1fr; } }

.post-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--color-surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  transition: transform var(--dur-ui) var(--ease), box-shadow var(--dur-ui) var(--ease);
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.post-card__img { display: block; aspect-ratio: 16 / 9; background: var(--tint); overflow: hidden; }
.post-card__img img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.post-card__ph { display: grid; place-items: center; height: 100%; }
.post-card__ph .fuzu { width: 96px; }
.post-card__body { display: flex; flex-direction: column; gap: .5rem; padding: 1.2rem 1.3rem 1.4rem; flex: 1; }
.post-card__body h3 { font-size: var(--step-1); margin: 0; line-height: 1.25; }
.post-card__body h3 a { color: inherit; text-decoration: none; }
.post-card__body h3 a:hover { color: var(--color-primary); }
.post-card__body p { margin: 0; color: var(--color-text-muted); font-size: var(--step--1); }
.post-card__body .card__link { margin-top: auto; padding-top: .6rem; }
.post-meta { font-size: var(--step--2) !important; text-transform: uppercase; letter-spacing: .06em; }
.post-meta a { color: var(--color-primary); text-decoration: none; font-weight: 600; }

.pager { display: flex; justify-content: center; gap: .8rem; margin-top: 2rem; }

/* --- article page -------------------------------------------------------- */
.hero--post .lede { max-width: 46rem; }
.post-byline { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin: 1rem 0 0; color: var(--on-dark-muted); font-size: var(--step--1); }
.post-draft { margin: 1rem 0 0; display: inline-block; padding: .35rem .8rem; border-radius: var(--radius-pill); background: var(--duma); color: var(--duma-on); font-size: var(--step--2); font-weight: 600; }
.hero--post a.pill { text-decoration: none; }
.post__cover { display: block; width: 100%; height: auto; margin: 0 0 2rem; box-shadow: var(--shadow); }
.post__help {
  display: flex; flex-direction: column; gap: .3rem; margin-top: 2.6rem; padding: 1.2rem 1.4rem;
  border: 1px solid var(--line); border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-sm); background: var(--color-surface);
}
.post__help span { color: var(--color-text-muted); }

/* --- text inside an article or a text block ----------------------------- */
.prose { font-size: var(--step-0); line-height: 1.75; color: var(--color-text); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: var(--step-3); margin-top: 1.8em; line-height: 1.2; }
.prose h3 { font-size: var(--step-2); margin-top: 1.6em; line-height: 1.25; }
.prose h4 { font-size: var(--step-1); margin-top: 1.4em; }
.prose p, .prose li { color: var(--color-text); }
.prose a { color: var(--color-primary); text-underline-offset: .18em; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li + li { margin-top: .4em; }
.prose blockquote {
  margin-left: 0; padding: .4rem 0 .4rem 1.2rem; border-left: 4px solid var(--color-accent);
  color: var(--color-text-muted); font-style: italic;
}
.prose img, .prose figure img { max-width: 100%; height: auto; }
.prose figure { margin: 1.8em 0; }
.prose figcaption { margin-top: .5rem; font-size: var(--step--1); color: var(--color-text-muted); text-align: center; }
.prose code { padding: .1em .35em; border-radius: 6px; background: var(--tint); font-size: .92em; }
.prose pre { overflow-x: auto; padding: 1rem 1.2rem; border-radius: var(--radius-sm); background: var(--ink); color: var(--on-dark); }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.prose th, .prose td { padding: .6rem .7rem; border-bottom: 1px solid var(--line); text-align: left; }
