/* Page chrome for the demo's blog posts.
   rd-post.css restyles the host site's header/footer hooks (#main-header,
   .logo, #site-footer) but does not lay them out — that lives in the Nuxt app
   this theme came from. These rules supply that layout, built only from the
   theme's own tokens so any palette still works. */

body {
  margin: 0;
  font-family: var(--tc-sans);
}

/* ---- header ---- */
#main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 26px 0 4px;
}
#main-header .logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--tc-sans);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.01em;
  color: var(--ink);
}
#main-header .logo svg { width: 30px; height: 28px; }
.rd-back {
  font-family: var(--tc-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--dim);
  transition: color 0.15s ease;
}
.rd-back:hover { color: var(--ink); }

/* ---- contents rail ---- */
/* The rail is fixed at left:44px and 240px wide; the article column is centred
   and 664px, so under ~1280px they collide. The theme leaves this to the host
   app, so hide it here and let the prose run full width. */
@media (max-width: 1279px) {
  .rd-toc { display: none; }
}
/* It is also fixed at top:200px, which puts it on top of the full-bleed hero
   band. Fade it in once the hero has scrolled past (class set by blog.js). */
.rd-toc {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.rd-toc.rd-toc--ready {
  opacity: 1;
  pointer-events: auto;
}
@media (prefers-reduced-motion: reduce) {
  .rd-toc { transition: none; }
}

/* ---- footer ---- */
#site-footer {
  width: min(664px, calc(100% - 48px));
  margin: clamp(64px, 9vw, 96px) auto 0;
  padding: 0 0 72px;
  border-top: 1px solid rgba(var(--line-rgb), 0.16);
}
.rd-more { padding-top: 30px; }
.rd-more .rd-toc-head { margin-bottom: 14px; }
.rd-more a {
  display: block;
  margin-bottom: 10px;
  font-family: var(--tc-serif);
  font-size: 22px;
  line-height: 1.3;
  text-decoration: none;
  color: var(--ink);
  transition: color 0.15s ease;
}
.rd-more a:hover { color: var(--accent); }
.rd-fine {
  margin: 30px 0 0;
  font-family: var(--tc-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--faint);
}

/* ---- small screens ---- */
@media (max-width: 700px) {
  #main-header { padding: 18px 0 0; }
  #main-header .logo { font-size: 15px; }
  .rd-article { font-size: 16.5px; }
}
