/**
 * Zelda Wallpapers – design tokens (v1.1.0)
 *
 * The plugin inherits the active theme's palette and typography through the
 * theme.json presets WordPress prints for every theme
 * (--wp--preset--color--{slug}, --wp--preset--font-family--{slug}), with
 * neutral fallbacks. Change the theme and the wallpaper pages follow.
 *
 * Expected preset slugs: green, green-raised, paper, ink, muted, gold,
 * gold-light; heading, body.
 */
:root {
  --zw-bg-dark: var(--wp--preset--color--green, #1f2a24);
  --zw-bg-dark-2: var(--wp--preset--color--green-raised, #2e3d34);
  --zw-paper: var(--wp--preset--color--paper, #f7f3ea);
  --zw-ink: var(--wp--preset--color--ink, #1f2320);
  --zw-muted: var(--wp--preset--color--muted, #5e5b52);
  --zw-accent: var(--wp--preset--color--gold, #9b7b3a);
  --zw-accent-light: var(--wp--preset--color--gold-light, #e6cf8a);
  --zw-danger: #8b3a2f;
  --zw-font-body: var(--wp--preset--font-family--body, Georgia, serif);
  --zw-font-heading: var(--wp--preset--font-family--heading, Georgia, serif);

  /* derived */
  --zw-paper-raised: color-mix(in srgb, var(--zw-paper) 70%, white);
  --zw-well: color-mix(in srgb, var(--zw-paper) 80%, var(--zw-accent) 20%);
  --zw-mat: color-mix(in srgb, var(--zw-paper) 75%, var(--zw-accent) 25%);
  --zw-rule: color-mix(in srgb, var(--zw-accent) 40%, transparent);
  --zw-frame: color-mix(in srgb, var(--zw-ink) 55%, var(--zw-accent) 45%);
  --zw-on-dark: color-mix(in srgb, var(--zw-paper) 85%, white);
  --zw-shadow: color-mix(in srgb, var(--zw-ink) 14%, transparent);
  --zw-accent-tint: color-mix(in srgb, var(--zw-accent) 12%, transparent);
  --zw-overlay: color-mix(in srgb, var(--zw-bg-dark) 85%, transparent);
  --zw-radius: 0;
}
@supports not (color: color-mix(in srgb, red, blue)) {
  :root {
    --zw-paper-raised: #fff8e7;
    --zw-well: #e9ddb6;
    --zw-mat: #e5d4a7;
    --zw-rule: #bba16b66;
    --zw-frame: #6b613e;
    --zw-on-dark: #fff1cb;
    --zw-shadow: #37291424;
    --zw-accent-tint: #bc9b3f1e;
    --zw-overlay: rgba(9, 41, 31, 0.85);
  }
}

/* ---- Page sheet (wrapper classes come from the theme via filter) -------- */
.zw-page-sheet {
  color: var(--zw-ink);
  font-family: var(--zw-font-body);
}
.zw-page-sheet .container,
.zw-page-sheet .row,
.zw-page-sheet [class^="col-"],
.zw-page-sheet [class*=" col-"],
.zw-page-sheet .content-area,
.zw-page-sheet .site-main {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}
.zw-page-sheet :is(h1, h2, h3, h4) {
  font-family: var(--zw-font-heading);
  font-weight: 600;
  line-height: 1.15;
  color: var(--zw-bg-dark);
}
/* The sheet already IS the card — don't nest a second parchment panel for
   the page header; titles sit directly on the sheet like content pages. */
.zw-page-sheet .page-header {
  background: none;
  box-shadow: none;
  padding: 0;
  border: 0;
}
.zw-page-sheet .page-title,
.zw-page-sheet .entry-title {
  margin: 0 0 12px;
}
.zw-page-sheet .wallpaper-archive-description {
  max-width: 72ch;
  color: var(--zw-muted);
}
.zw-page-sheet a {
  text-decoration-color: var(--zw-accent);
}
