/* FCS Magazine — page.hbs (static-page reading vehicle) styles.
 *
 * Spec: Doc #163 §2b. Five static pages — About, Advertise, Magazine Issues,
 * Media Kit, Contact — all share this layout: typographic page hero on
 * paper-deep ground, single-column 720px reading well, closing-CTA partial
 * (Media Kit echo) at the bottom.
 *
 * Inheritance principles (Doc #163 §0):
 *   - Lift V7 tokens, fonts, eyebrow, nav, footer verbatim.
 *   - Page heroes are typographic only — no featured image, that register
 *     is reserved for the homepage cover-spread.
 *   - Body content does NOT get reveal animations (staged reveals fight reading).
 */

/* ─── 1. PAGE HERO ──────────────────────────────────────────
 * Smaller than homepage cover-spread. paper-deep ground gives static pages
 * weight without competing with the homepage. Inherits .section-eyebrow.
 */
.page-hero {
  background: var(--paper-deep);
  padding: 7rem 0 5rem;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  /* Echo of the ambient copper/sage gradient on the homepage paper-deep grounds */
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 18% 25%, rgba(207, 125, 95, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 82% 80%, rgba(91, 140, 106, 0.05) 0%, transparent 45%);
  pointer-events: none;
}

.page-hero-inner {
  position: relative;
  z-index: 2;
}

.page-hero-title {
  font-family: var(--font-display);
  /* Per Doc #163 §2b: clamp(2.75rem, 6vw, 5rem). Smaller than homepage hero,
   * larger than article H2. The masthead moment for a static page. */
  font-size: clamp(2.75rem, 6vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--ink);
  margin-top: 1.25rem;
  /* The global h1 em rule in base.css triggers Zodiak italic on word-level
   * <em> inside the title — same masthead permission as the homepage. */
}

.page-hero-subtitle {
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.55;
  color: var(--ink-mute);
  margin-top: 1.5rem;
  max-width: 640px;
}

/* ─── 1b. OPTIONAL FEATURE IMAGE BAND ──────────────────────
 * Renders only if Caity uploads a page feature image. Sits between the
 * typographic hero and the body well, full-bleed within the 1320px container.
 * Quiet supporting band — NOT a hero overlay (Doc #163 §2b reserves the
 * cover-photo register for the homepage). Required for GScan page-features
 * compliance via the {{feature_image}} reference in page.hbs.
 */
.page-feature-image {
  max-width: 1320px;
  margin: 0 auto;
  padding: 3rem 2.5rem 0;
  background: var(--paper);
}

.page-feature-image img {
  width: 100%;
  max-height: 60vh;
  object-fit: cover;
  border-radius: 4px;
  display: block;
  aspect-ratio: 16 / 9;
}

.page-feature-caption {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-style: italic;
  color: var(--ink-whisper);
  text-align: right;
  padding-top: 0.75rem;
  max-width: 1320px;
  margin: 0 auto;
}

/* ─── 2. PAGE BODY (Ghost-rendered {{content}} flows here) ───
 * Reading-well typography per Doc #163 spec for page.hbs:
 *   Satoshi 1.05rem / line-height 1.65.
 * Slightly tighter than post.hbs body (which is 1.15rem / 1.7) because static
 * pages tend to be marketing/info copy with less sustained reading load.
 * --ink-soft (not pure --ink) at length, eyestrain rule from §2a applies here too.
 */
.page-body {
  background: var(--paper);
  padding: 5rem 0 6rem;
  position: relative;
  z-index: 2;
}

.page-body-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 2.5rem;
  /* The 720px reading well sits inside the standard 1320px container.
   * Container provides outer padding; this provides reading-comfort line length
   * (~65-75 char at 1.05rem Satoshi). */
}

.page-body-inner > p,
.page-body-inner > ul,
.page-body-inner > ol,
.page-body-inner > blockquote,
.page-body-inner > pre,
.page-body-inner > figure {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
}

.page-body-inner > p:last-child,
.page-body-inner > ul:last-child,
.page-body-inner > ol:last-child {
  margin-bottom: 0;
}

/* Headings inside page body — Clash Display, scaled below the page-hero title
 * so a section break inside a page can never compete with the page's own masthead. */
.page-body-inner h2 {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
  margin: 3rem 0 1rem;
}

.page-body-inner h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  margin: 2.5rem 0 0.75rem;
}

.page-body-inner h4 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 2rem 0 0.5rem;
}

/* Inline em/strong/links — match post.hbs body register so reading feels
 * consistent across templates. */
.page-body-inner em {
  /* Per Doc #163 §2a: body-level <em> stays Satoshi italic, NOT Zodiak.
   * Zodiak is reserved for headings and pull quotes. */
  font-family: var(--font-body);
  font-style: italic;
}

.page-body-inner strong {
  font-weight: 700;
  color: var(--ink);
}

.page-body-inner a {
  color: var(--copper-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.2s ease, text-decoration-thickness 0.2s ease;
}

.page-body-inner a:hover {
  color: var(--copper);
  text-decoration-thickness: 2px;
}

.page-body-inner ul,
.page-body-inner ol {
  padding-left: 1.5rem;
}

.page-body-inner li {
  margin-bottom: 0.5rem;
}

.page-body-inner blockquote {
  /* Body-register Zodiak per Doc #163 §2a — half-step below homepage Quote
   * (clamp(2rem, 4vw, 3.75rem)) so the homepage Quote stays primary. */
  font-family: var(--font-script);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.3;
  color: var(--ink);
  padding: 2rem 0 2rem 2rem;
  border-left: 2px solid var(--copper);
  max-width: 600px;
  margin: 2.5rem 0;
}

.page-body-inner img,
.page-body-inner figure img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 1.5rem 0;
}

/* Inline image alone in its paragraph wrapper (the <p><img></p> pattern from
 * Markdown cards) → float left as a byline portrait, body text wraps around.
 * Editorial profile-piece pattern. The :only-child guard means the rule
 * doesn't fire on inline images that share a paragraph with text. */
.page-body-inner p:has(> img:only-child) {
  float: left;
  width: 200px;
  margin: 0.4rem 1.75rem 1rem 0;
  shape-outside: margin-box;
}

.page-body-inner p:has(> img:only-child) img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0;
  box-shadow: var(--shadow-soft);
}

/* H2 always clears any preceding float so each new section starts cleanly
 * below the previous bio's portrait, regardless of how short the bio runs. */
.page-body-inner h2 {
  clear: left;
}

/* Below ~720px viewport, a 200px float inside a ~640px column starves
 * line length. Drop the float and re-center at portrait scale. */
@media (max-width: 720px) {
  .page-body-inner p:has(> img:only-child) {
    float: none;
    width: auto;
    margin: 2rem auto;
    text-align: center;
  }
  .page-body-inner p:has(> img:only-child) img {
    max-width: 260px;
    margin: 0 auto;
  }
}

.page-body-inner figcaption {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-style: italic;
  color: var(--ink-whisper);
  text-align: right;
  padding-top: 0.75rem;
}

.page-body-inner code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.92rem;
  background: var(--sage-wash);
  padding: 0.1em 0.4em;
  border-radius: 3px;
}

.page-body-inner pre {
  background: var(--paper-deep);
  padding: 1.25rem;
  border-radius: 4px;
  overflow-x: auto;
}

.page-body-inner pre code {
  background: transparent;
  padding: 0;
}

/* ─── 3. RESPONSIVE ─────────────────────────────────────────
 * Container/page-body inherit responsive.css patterns; only the page-hero
 * needs a small mobile pad reduction so the 7rem top doesn't crowd the nav.
 */
@media (max-width: 768px) {
  .page-hero { padding: 5.5rem 0 3.5rem; }
  .page-hero-subtitle { font-size: 1.05rem; }
  .page-body { padding: 3rem 0 4.5rem; }
  .page-body-inner { padding: 0 1.25rem; }
  .page-body-inner h2 { font-size: 1.6rem; margin: 2.25rem 0 0.75rem; }
}

/* ─────────────────────────────────────────────────────────────────────
 * Page closer — lighter sage-deep band on static pages (see partials/
 * page-closer.hbs). Visual rhyme with homepage closing-cta but ~half the
 * vertical weight + a single mailto CTA pointing at Emma.
 * ───────────────────────────────────────────────────────────────────── */

.page-closer {
  background: var(--sage-deep);
  color: var(--paper);
  padding: 4rem 0 4.5rem;
  position: relative;
  overflow: hidden;
}

.page-closer::before {
  content: '';
  position: absolute;
  top: -30%; left: -10%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(207, 125, 95, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.page-closer-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 2.5rem;
}

.page-closer-eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 1rem;
}

.page-closer-headline {
  font-family: var(--font-display);
  font-weight: 550;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--paper);
  margin-bottom: 0.75rem;
}

.page-closer-headline em {
  font-family: var(--font-script);
  font-style: italic;
  font-weight: 545;
  color: var(--copper-pale);
}

.page-closer-sub {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  color: rgba(245, 241, 234, 0.7);
  margin-bottom: 1.75rem;
  font-weight: 500;
}

.btn-page-closer {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.8rem;
  background: var(--copper);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 12px 28px -10px rgba(207, 125, 95, 0.4);
}

.btn-page-closer:hover {
  background: var(--copper-dark);
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -10px rgba(207, 125, 95, 0.5);
}

/* Page-closer state machine — default / form-open / submitted.
 * The trigger button is replaced by the form, which is replaced by the
 * success state. The secondary "Or get the media kit" link sits below
 * everything and stays visible across all states. */

.page-closer-form { display: none; max-width: 540px; margin: 1.75rem auto 0; }
.page-closer.is-form-open .btn-page-closer { display: none; }
.page-closer.is-form-open .page-closer-form { display: block; }
.page-closer.is-submitted .page-closer-form { display: none; }
.page-closer.is-submitted .btn-page-closer { display: none; }

.page-closer-success {
  max-width: 540px;
  margin: 2rem auto 0;
  padding: 1.75rem 2rem;
  background: rgba(245, 241, 234, 0.06);
  border: 1px solid rgba(207, 125, 95, 0.3);
  border-radius: 4px;
  text-align: center;
}

.page-closer-success-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  margin-bottom: 0.85rem;
  background: var(--copper);
  color: var(--paper);
  border-radius: 50%;
  font-size: 1rem;
  font-weight: 700;
}

.page-closer-success-headline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.4rem;
  line-height: 1.2;
  color: var(--paper);
  margin-bottom: 0.5rem;
}

.page-closer-success-sub {
  font-family: var(--font-body);
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(245, 241, 234, 0.7);
  margin: 0;
  text-wrap: pretty;
}

.page-closer-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: fit-content;
  margin: 2.75rem auto 0;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--copper-pale);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.page-closer-secondary:hover {
  color: var(--paper);
  border-bottom-color: var(--copper);
}

.page-closer-secondary span {
  transition: transform 0.3s ease;
  display: inline-block;
}

.page-closer-secondary:hover span { transform: translateX(3px); }

/* Textarea treatment — matches .issues-closer-field input styling so the
 * page-closer form (which adds a "Tell us about your brand" textarea)
 * sits next to the standard inputs without visual inconsistency. The
 * issues-closer-* primitives don't ship a textarea rule because the
 * reader signup doesn't have one. */
.issues-closer-field textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.7rem 0.85rem;
  background: rgba(245, 241, 234, 0.06);
  border: 1px solid rgba(245, 241, 234, 0.18);
  border-radius: 3px;
  color: var(--paper);
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.issues-closer-field textarea::placeholder { color: rgba(245, 241, 234, 0.35); }

.issues-closer-field textarea:focus {
  outline: none;
  border-color: var(--copper);
  background: rgba(245, 241, 234, 0.10);
}

/* ─────────────────────────────────────────────────────────────────────
 * Issues page closer — reader-focused signup band, replaces the default
 * page-closer (advertiser CTA) on /issues/ only via partials/page-issues-
 * closer.hbs. Sage-deep ground rhymes with the standard closer; the
 * centered editorial pitch + 2-column form is the conversion moment for
 * print + email subscriptions.
 * ───────────────────────────────────────────────────────────────────── */

.issues-closer {
  background: var(--sage-deep);
  color: var(--paper);
  padding: 5.5rem 0 6rem;
  position: relative;
  overflow: hidden;
}

.issues-closer::before {
  content: '';
  position: absolute;
  top: -30%; left: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(207, 125, 95, 0.18) 0%, transparent 65%);
  pointer-events: none;
}

.issues-closer::after {
  content: '';
  position: absolute;
  bottom: -30%; right: -15%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(91, 140, 106, 0.20) 0%, transparent 65%);
  pointer-events: none;
}

.issues-closer-inner {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 2.5rem;
  text-align: center;
}

.issues-closer-eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 1.25rem;
}

.issues-closer-headline {
  font-family: var(--font-display);
  font-weight: 550;
  font-size: clamp(2.25rem, 4.2vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--paper);
  margin-bottom: 1.25rem;
}

.issues-closer-headline em {
  font-family: var(--font-script);
  font-style: italic;
  font-weight: 545;
  color: var(--copper-pale);
}

.issues-closer-sub {
  font-family: var(--font-body);
  font-size: 1.1rem;
  line-height: 1.6;
  color: rgba(245, 241, 234, 0.78);
  max-width: 580px;
  margin: 0 auto 2.5rem;
  font-weight: 400;
  text-wrap: pretty;
}

.issues-closer-trust {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--copper-pale);
  margin-bottom: 2.75rem;
  padding: 1.5rem 1.5rem 0;
  border-top: 1px solid rgba(207, 125, 95, 0.25);
}

.issues-closer-form {
  max-width: 560px;
  margin: 0 auto;
  text-align: left;
}

.issues-closer-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.issues-closer-row--full { grid-template-columns: 1fr; }
.issues-closer-row--addr { grid-template-columns: 2fr 1fr 1fr; }

.issues-closer-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.issues-closer-field label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(245, 241, 234, 0.65);
}

.issues-closer-field input {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.7rem 0.85rem;
  background: rgba(245, 241, 234, 0.06);
  border: 1px solid rgba(245, 241, 234, 0.18);
  border-radius: 3px;
  color: var(--paper);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.issues-closer-field input::placeholder {
  color: rgba(245, 241, 234, 0.35);
}

.issues-closer-field input:focus {
  outline: none;
  border-color: var(--copper);
  background: rgba(245, 241, 234, 0.10);
}

.issues-closer-submit {
  margin-top: 1.5rem;
  width: 100%;
  padding: 1rem 2rem;
  background: var(--copper);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 0;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 12px 28px -10px rgba(207, 125, 95, 0.45);
}

.issues-closer-submit:hover {
  background: var(--copper-dark);
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -10px rgba(207, 125, 95, 0.55);
}

.issues-closer-fineprint {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: rgba(245, 241, 234, 0.55);
  margin-top: 1.25rem;
  text-align: center;
  text-wrap: pretty;
}

@media (max-width: 600px) {
  .issues-closer { padding: 4rem 0 4.5rem; }
  .issues-closer-inner { padding: 0 1.5rem; }
  .issues-closer-row,
  .issues-closer-row--addr { grid-template-columns: 1fr; }
}

/* ─────────────────────────────────────────────────────────────────────
 * Tables in body — primarily for the Advertise page rate cards + editorial
 * calendar. Editorial-publication treatment: sage-deep header row, paper-
 * soft alternating body rows, copper accent on price cells.
 * ───────────────────────────────────────────────────────────────────── */

.page-body-inner table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0 2.25rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ink-soft);
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
}

.page-body-inner thead {
  background: var(--sage-deep);
  color: var(--paper);
}

.page-body-inner thead th {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  padding: 0.85rem 1rem;
}

.page-body-inner tbody td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

.page-body-inner tbody tr:nth-child(even) {
  background: var(--paper-soft);
}

.page-body-inner tbody tr:last-child td {
  border-bottom: none;
}

/* Right-align any column whose cells start with $ — pricing tables read
 * better when monetary values stack flush-right. The :has() selector
 * matches body cells; the matching <th> in <thead> is targeted via
 * nth-of-type, but Markdown-generated tables don't expose enough hooks
 * to align headers cleanly per-column. Body alignment alone is the win. */
.page-body-inner tbody td:not(:first-child):has(+ td) {
  font-variant-numeric: tabular-nums;
}

/* ─────────────────────────────────────────────────────────────────────
 * Current issue band — used only on /issues/ via page-issues.hbs template.
 * Tag-driven: the most recent #magazine-issue Ghost post supplies the
 * label (title), synopsis (custom_excerpt), and Heyzine URL (canonical_url).
 * Same source of truth as the homepage Latest Issue section.
 * ───────────────────────────────────────────────────────────────────── */

.issue-current {
  background: var(--paper);
  padding: 4rem 0 3rem;
  position: relative;
  /* Clears the sticky nav (~70px) when this section is the scrollIntoView
   * target on /issues/?p=N article deep-links. Without this, the section
   * top ends up partially obscured behind the fixed nav. */
  scroll-margin-top: 5rem;
}

/* When current-issue band is immediately followed by page-body, collapse the
 * stacked vertical padding so "Past Issues" reads as a continuation of the
 * issue band, not a separate page section. Default page-body padding (5rem
 * top) plus the h2's own 3rem margin-top stacked to ~200px without this. */
.issue-current + .page-body {
  padding-top: 1rem;
}

.issue-current + .page-body .page-body-inner > h2:first-child {
  margin-top: 0;
}

.issue-current-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 2.5rem;
  text-align: center;
}

.issue-current-label {
  font-family: var(--font-display);
  font-weight: 550;
  font-size: clamp(2rem, 4vw, 2.75rem);
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--ink);
  margin: 1rem 0 1.25rem;
}

.issue-current-synopsis {
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 620px;
  margin: 0 auto 2rem;
  font-weight: 500;
  text-wrap: pretty;
}

.issue-current-embed {
  position: relative;
  width: 100%;
  /* 4:3 aspect — generous reading window without dominating the page.
   * Fullscreen link below gives the bigger experience. */
  aspect-ratio: 4 / 3;
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.issue-current-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* "Back to current issue" — hidden by default, revealed by JS only when a
 * back issue has been loaded into the flipbook iframe. Sits below the embed
 * inside .issue-current-inner so it inherits the centered text alignment.
 * Filled-copper treatment matches the theme's other primary CTAs
 * (.btn-page-closer, .issues-closer-submit) at compact button scale. */
.issue-back-to-current {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.25rem;
  padding: 0.65rem 1.35rem;
  background: var(--copper);
  color: var(--paper);
  border: 0;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 10px 24px -10px rgba(207, 125, 95, 0.45);
}

.issue-back-to-current:hover {
  background: var(--copper-dark);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -10px rgba(207, 125, 95, 0.55);
}

.issue-back-to-current[hidden] {
  display: none;
}


/* ─────────────────────────────────────────────────────────────────────
 * Back-issue archive grid — server-rendered cards from #magazine-issue
 * posts excluding the most recent (the current issue lives in the band
 * above + the Current Issue card section). Click a card → main flipbook
 * iframe above swaps to that issue. Sits inside the .page-body-inner
 * reading well so it shares the page's container/padding.
 * ───────────────────────────────────────────────────────────────────── */

.issue-archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 2rem 1.5rem;
  margin: 1.5rem 0 2rem;
}

.issue-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: inherit;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.issue-card:hover {
  transform: translateY(-3px);
}

.issue-card:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 4px;
  border-radius: 4px;
}

.issue-card-cover {
  display: block;
  position: relative;
  aspect-ratio: 8.5 / 11;
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  border-radius: 3px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.issue-card:hover .issue-card-cover {
  box-shadow: var(--shadow-float);
}

.issue-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Override .page-body-inner img { margin: 1.5rem 0 } — that rule targets
   * body inline images and shouldn't apply to grid card thumbnails. */
  margin: 0;
}

.issue-card-label {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
  transition: color 0.25s ease;
}

.issue-card:hover .issue-card-label {
  color: var(--copper);
}

/* Active state — applied by JS to the card whose issue is currently
 * loaded in the flipbook iframe. Copper accent makes it unmistakable
 * which back issue is being read. */
.issue-card.is-active .issue-card-cover {
  outline: 2px solid var(--copper);
  outline-offset: 3px;
}

.issue-card.is-active .issue-card-label {
  color: var(--copper);
}

@media (max-width: 480px) {
  .issue-archive-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1.5rem 1rem;
  }
}
