/* ==========================================================================
   Slice of the Slayer — the blog, news and reviews (cms/)
   The CMS prints its pages in its own cms-* classes; this styles them with the
   theme's tokens (theme.css), so they follow the dark and light themes like
   every other page: cards like the home page's, crimson for Buffy, indigo for
   Angel.
   ========================================================================== */

.cms-content { margin-top: clamp(1rem, 2.5vw, 1.75rem); }

/* Breadcrumb, over the page heading */
.cms-crumbs ol { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; margin: 0 0 .8rem; padding: 0; font-size: .85rem; color: var(--text-dim); }
.cms-crumbs li + li::before { content: "›"; margin-right: .35rem; color: var(--text-faint); }
.cms-crumbs a { color: var(--text-dim); }
.cms-crumbs a:hover { color: var(--text); }
.cms-meta { margin: .6rem 0 0; color: var(--text-dim); }

/* Blog · News · Reviews */
.cms-tabs { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 1.5rem; }
.cms-tabs a {
  padding: .45rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-1);
  color: var(--text-dim);
  font-weight: 600;
  font-size: .92rem;
  text-decoration: none;
}
.cms-tabs a:hover { border-color: var(--accent-line); color: var(--text); }
.cms-tabs a[aria-current] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* The list: cards like the home page's */
.cms-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1rem; }
.cms-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
  transition: transform .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.cms-card:hover { transform: translateY(-3px); border-color: var(--accent-line); box-shadow: var(--shadow-2); }
.cms-card img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--bg-3); }
.cms-card div { padding: 1rem 1.15rem 1.2rem; }
.cms-card h3 { margin: .3rem 0 .4rem; font-size: 1.05rem; line-height: 1.3; }
.cms-card p { margin: 0; color: var(--text-dim); font-size: .9rem; }
.cms-date { font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.cms-by { margin: 0 0 .4rem !important; font-weight: 600; color: var(--text) !important; }
.cms-stars { color: #f0b429; letter-spacing: .08em; }
.cms-stars span { color: var(--line); }

.cms-empty { border: 1px dashed var(--line); border-radius: var(--radius); padding: 2rem; text-align: center; color: var(--text-dim); }
.cms-empty h2 { margin: 0 0 .4rem; color: var(--text); }
.cms-feed { margin: 1.75rem 0 0; font-size: .88rem; color: var(--text-faint); }
.cms-pager { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; font-weight: 600; }

/* A post */
.cms-article { max-width: 46rem; }
.cms-cover { margin: 0 0 1.75rem; }
.cms-cover img { display: block; width: 100%; height: auto; border-radius: var(--radius); }
.cms-body { font-size: 1.04rem; line-height: 1.75; }
.cms-body h2 { font-size: 1.4rem; margin: 2.2rem 0 .6rem; }
.cms-body h3 { font-size: 1.15rem; margin: 1.8rem 0 .5rem; }
.cms-body h4 { font-size: 1rem; margin: 1.5rem 0 .4rem; }
.cms-body p, .cms-body ul, .cms-body ol { margin: 0 0 1.1rem; }
.cms-body li { margin: .3rem 0; }
.cms-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.cms-body blockquote { margin: 1.5rem 0; padding: .4rem 1.2rem; border-left: 3px solid var(--cool); background: var(--cool-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.cms-body figure { margin: 1.8rem 0; }
.cms-body img { display: block; max-width: 100%; max-height: 80vh; width: auto; height: auto; margin-inline: auto; border-radius: var(--radius-sm); }
.cms-body figcaption { margin-top: .5rem; font-size: .86rem; color: var(--text-dim); text-align: center; }
.cms-body code { background: var(--bg-3); padding: .1rem .35rem; border-radius: 5px; font-family: var(--font-mono); font-size: .9em; }
.cms-body hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.cms-reviewer { margin-top: 1rem; font-weight: 600; }
.cms-back { margin-top: 2.25rem; font-weight: 600; }
.cms-related { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.cms-related h2 { margin: 0 0 1.2rem; }

/* The admin's preview of a draft */
.cms-preview {
  position: sticky; top: var(--header-h); z-index: 30;
  margin-bottom: 1rem; padding: .6rem 1rem;
  border-radius: var(--radius-sm);
  background: #f0b429; color: #17151c; font-weight: 600; text-align: center;
}
.cms-preview a { color: #17151c; text-decoration: underline; }

/* The band under a post or list, and the home page's block */
.cms-promo { margin-top: 2.5rem; }
.cms-promo > p { margin: 0; padding: 1.15rem 1.15rem 0; color: var(--text-dim); }
.cms-promo .button-row { margin: 0; padding: 1rem 1.15rem 1.25rem; }
.cms-home { margin-top: 2.5rem; }
.cms-home .cms-cards { padding: 1.15rem; }
.cms-home .panel-head a { font-size: .85rem; font-weight: 600; }
.cms-home-review { margin: 0; padding: 1.25rem 1.15rem; }
.cms-home-review blockquote { margin: 0; font-family: var(--font-display); font-size: clamp(1.15rem, 2.4vw, 1.5rem); line-height: 1.35; }
.cms-home-review blockquote a { color: var(--text); text-decoration: none; }
.cms-home-review figcaption { margin-top: .6rem; color: var(--text-dim); font-weight: 600; }
