/* Updates (/updates, /updates/<slug>), the privacy page, and the "follow
   the updates" block (.follow), which also sits on the home page.
   Markup: src/pages/updates.rs, src/pages/posts/*, src/pages/privacy.rs,
   src/components/follow.rs. Tokens only. */

/* ---------- Article column: about 70 characters per line ---------- */
.post-wrap { max-width: calc(46rem + 2 * var(--gutter)); padding-block: var(--sp-16) var(--sp-8); }
.post__header { margin-bottom: var(--sp-8); }
.post__header .breadcrumb { margin-bottom: var(--sp-4); }
.post__header h1 { font-size: var(--fs-3xl); line-height: 0.95; margin-bottom: var(--sp-4); }
.post__byline { margin: 0; font-size: var(--fs-sm); color: var(--text-muted); }
.post__byline span { color: var(--text); font-weight: 600; }

.post__body { font-size: var(--fs-base); line-height: 1.7; }
.post__body > p, .post__body > .post__list { max-width: 70ch; }
.post__body > p { margin-bottom: var(--sp-6); }
.post__intro { font-size: var(--fs-lg); color: var(--text); }
.post__body h2 {
  margin: var(--sp-16) 0 var(--sp-4); font-size: clamp(1.9rem, 1.5rem + 1.4vw, 2.5rem); line-height: 1;
  scroll-margin-top: calc(var(--header-h) + var(--sp-4));
}
.post__body h3 { margin: var(--sp-12) 0 var(--sp-3); font-size: var(--fs-lg); }
.post__body code { color: var(--text); }
.post__body kbd {
  padding: 0 0.35em; border: 1px solid var(--border-strong); border-bottom-width: 2px;
  border-radius: var(--radius-sm); background: var(--surface); color: var(--text); white-space: nowrap;
}
.post__body .code-block { margin-bottom: var(--sp-6); }
.post__body .install-cmd { margin-bottom: var(--sp-3); }
.post__aside { font-size: var(--fs-sm); color: var(--text-muted); }

.post__list { margin: 0 0 var(--sp-6); padding: 0; list-style: none; }
.post__list li { position: relative; padding-left: var(--sp-6); margin-bottom: var(--sp-3); }
.post__list li::before {
  content: ""; position: absolute; left: 0; top: 0.8em; width: 10px; height: 2px; background: var(--straw);
}
:root[data-theme="light"] .post__list li::before { background: var(--link); }

/* Hero mock-up: the animated app window, with a caption. */
.post__figure { margin: var(--sp-8) 0 var(--sp-12); }
.post__demo .demo__body { min-height: 340px; }
.post__figure figcaption { margin-top: var(--sp-3); font-size: var(--fs-sm); color: var(--text-muted); }

/* Product rows: logo, linked name with kind, one line. */
.post-apps { list-style: none; margin: 0 0 var(--sp-8); padding: 0; border-top: 1px solid var(--border); }
.post-app {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--sp-4); align-items: start;
  padding: var(--sp-4) 0; border-bottom: 1px solid var(--border);
}
.post-app .app-logo { margin-top: 2px; }
.post__body .post-app__name { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--sp-3); }
.post-app__name a { font-weight: 600; color: var(--text); text-decoration-color: var(--app-accent); }
.post-app__name a:hover { color: var(--text); text-decoration-thickness: 2px; }
.post-app__kind { font-size: var(--fs-sm); color: var(--text-faint); }
.post__body .post-app__text { margin: var(--sp-1) 0 0; font-size: var(--fs-sm); color: var(--text-muted); line-height: 1.55; }

/* ---------- /updates index ---------- */
.post-index { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border-strong); }
.post-index__item { padding: var(--sp-8) 0; border-bottom: 1px solid var(--border); }
.post-index__date { margin-bottom: var(--sp-2); font-size: var(--fs-sm); color: var(--text-muted); }
.post-index__title { margin-bottom: var(--sp-3); font-size: clamp(1.9rem, 1.5rem + 1.4vw, 2.5rem); line-height: 1; }
.post-index__title a { color: var(--text); text-decoration: none; }
.post-index__title a:hover { text-decoration: underline; text-decoration-color: var(--straw); text-decoration-thickness: 2px; }
.post-index__summary { margin: 0; color: var(--text-muted); max-width: 62ch; }

/* ---------- Follow the updates (Atom feed) ---------- */
.follow {
  margin-top: var(--sp-16); padding: var(--sp-8);
  border: 1px solid var(--border); border-top: 2px solid var(--straw); border-radius: var(--radius-lg);
  background: var(--bg-elev); scroll-margin-top: calc(var(--header-h) + var(--sp-4));
}
:root[data-theme="light"] .follow { border-top-color: var(--link); }
.follow__title { margin-bottom: var(--sp-2); font-size: clamp(1.7rem, 1.4rem + 1vw, 2.2rem); line-height: 1; }
.follow__lead { color: var(--text-muted); max-width: 52ch; margin-bottom: var(--sp-6); }
.follow__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.follow--compact { margin-top: 0; }

@media (min-width: 900px) {
  .follow--compact { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--sp-12); align-items: end; }
  .follow--compact .follow__lead { margin-bottom: 0; }
}
@media (max-width: 559px) {
  .follow { padding: var(--sp-6) var(--sp-4); }
}
