:root {
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --font-accent: 'Cormorant Garamond', Georgia, serif;
  --font-nav: 'Open Sans', -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --bg: #e1e7dc;
  --surface: #edf0eb;
  --ink: #362a25;
  --heading: #4a3b34;
  --link: #a0724e;
  --link-hover: #7f8c6c;
  --accent: #b58b4c;
  --accent-soft: #c4a484;
  --nav-bg: #ffffff;
  --nav-ink: #000000;
  --nav-hover: #ca9b52;
  --muted: #a1a1a1;
  --meta: #7a6a57;
  --rule: #d5ddd0;
  --footer-bg: #f6f6f6;
  --footer-ink: #333333;
  --selection: #e6d3b3;
  --base-size: 18px;
  --line-height: 1.75;
  --letter-spacing: 0.2px;
  --letter-spacing-heading: 0.3px;
  --line-height-heading: 1.3;
  --scale-h1: 2.2rem;
  --scale-h2: 1.7rem;
  --scale-h3: 1.2rem;
  --scale-h4: 1.15rem;
  --scale-h5: 1.05rem;
  --scale-h6: 1rem;
  --nav-size: 15px;
  --nav-spacing: 1px;
  --nav-weight: 600;
  --measure: 48rem;
  --wide: 72rem;
  --gutter: 20px;
  --card-padding: 40px;
  --block-gap: 1.4rem;
  --radius: 8px;
  --radius-lg: 12px;
  --banner-height: 500px;
  --nav-height: 70px;
  --shadow: 0 2px 10px rgba(0,0,0,0.06);
  --nav-shadow: 0 1px 5px rgba(0,0,0,0.1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1b1f1a;
    --surface: #242a22;
    --ink: #e6e2da;
    --heading: #e8dccb;
    --link: #d0a173;
    --link-hover: #a8b795;
    --accent: #d8ae68;
    --accent-soft: #8a6f4e;
    --nav-bg: #242a22;
    --nav-ink: #e6e2da;
    --nav-hover: #d8ae68;
    --muted: #8d8478;
    --meta: #a99a86;
    --rule: #39412f;
    --footer-bg: #1f241d;
    --footer-ink: #c9c3b8;
    --selection: #4a3f28;
  }
}

/* Optional override layer.
   Loaded AFTER the original theme CSS, so anything here adjusts the inherited
   design rather than replacing it. The site's real look comes from the captured
   templates in templates/ and the original stylesheets in public/assets/.
   Tokens from content/theme.json are emitted above this file as :root vars. */

/* Keep titles readable in dark mode.

   The "Open Book" design in openbook.css paints fixed parchment surfaces
   (--parchment, --page-bg) that deliberately have NO dark-scheme variants — it
   is a printed-book look, light by design. But theme.json's `dark` group is a
   leftover from the old Ashe theme, and it shares the token name `--ink` with
   Open Book. Under prefers-color-scheme: dark it flips --ink to a light cream
   (#e6e2da) while the paper stays cream, so every element that INHERITS its
   colour — .chapter-title and .page-title, which set no colour of their own —
   renders cream-on-cream and reads as washed-out grey.

   Elements with an explicit colour (--rust, --olive, --muted-prose) were never
   affected, which is why only the titles looked broken.

   Re-assert Open Book's ink values after the dark block so text stays dark on
   the light paper. Remove this once theme.json's `dark` group is either given a
   full Open Book palette or dropped. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #2f2a20;
    --heading: #4a3b34;
  }
}

/* The static build has no comment form, search or subscribe widget; hide any
   leftover chrome the theme still reserves space for. */
.post-comments,
.comments-link,
.main-nav-search,
.ashe-subscribe-box { display: none !important; }

/* Pagination for generated listings, styled to match the theme's own controls */
.blog-pagination { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.blog-pagination .page-of { color: #a1a1a1; font-size: 0.85rem; }

/* Like button that replaces Jetpack's widget (see public/js/like.js) */
.like-box { display: flex; align-items: center; gap: 12px; }
.like-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid #d5ddd0; border-radius: 4px;
  padding: 6px 14px; cursor: pointer; font: inherit; font-size: 15px;
  color: #4a3b34; transition: border-color .2s ease, color .2s ease;
}
.like-btn:hover { border-color: #ca9b52; color: #ca9b52; }
.like-btn.is-liked { color: #ca9b52; border-color: #ca9b52; }
.like-star { font-size: 17px; line-height: 1; }
.like-count { color: #7a6a57; font-size: 15px; }

/* Subscribe form pointed at a real provider (see content/site.json) */
.subscribe-form { display: flex; justify-content: center; gap: 0; flex-wrap: wrap; }
.subscribe-email {
  border: 1px solid #d5ddd0; padding: 14px 18px; font: inherit; font-size: 16px;
  min-width: 280px; background: #fff; color: #362a25;
}
.subscribe-btn {
  background: #c4a484; color: #fff; border: none; padding: 14px 28px;
  font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic;
  font-size: 17px; cursor: pointer; transition: background-color .3s ease;
}
.subscribe-btn:hover { background: #b3906c; }

/* The comment thread is styled in openbook.css with the rest of the design
   system. The Ashe-era rules that used to sit here (Playfair on a mint panel)
   were written for the card layout the site no longer has, and because this
   file loads last they would have overridden the real styles. */

/* The Jetpack like widget needs a backend; hide it until features.likes is on
   in content/site.json. Hidden with CSS, never cut out of the markup — these
   blocks nest, and removing them by pattern leaves unbalanced tags. */
body[data-likes="off"] .jetpack-likes-widget-wrapper,
body[data-likes="off"] .sd-like { display: none !important; }
