/* Dark fantasy theme: black with sky blue and green accents, sharp edges, framed images.
   Loaded after base.css, which holds the structure. Contrast ratios (WCAG, computed from these colors):
     text #dfe9ee on page #07090c ............ about 16:1
     text #dfe9ee on card #0f151b ............ about 15:1
     link/heading #6fcdfa on page ............ about 11:1, on card about 10:1
     green #3fcf8e on page ................... about 10:1, on card about 9:1
     button text #04121a on #6fcdfa .......... about 10:1
     footer text #b9c9d1 on #000000 .......... about 13:1
     message text #ffd9d9 on #2a0f12 ......... about 13:1
   Decks, table and badge (computed with the WCAG relative-luminance formula):
     muted text #b9c9d1 on card #0f151b ...... 10.8:1
     text #dfe9ee on table header #16212b .... 13.2:1
     heading #6fcdfa on table header #16212b . 9.2:1
     badge text #04121a on #6fcdfa ........... about 10:1 (same pair as the buttons)
     status "Available" #3fcf8e on card ...... about 9:1
     status "Coming soon" #b9c9d1 on card .... 10.8:1 */

body.site-dark-fantasy {
  --page-bg: #07090c;
  --text: #dfe9ee;
  --heading: #6fcdfa;
  --link: #6fcdfa;
  --focus: #ffd966;
  --card-bg: #0f151b;
  --card-border: 0.125rem solid #2f8fc4;
  --accent-bg: #6fcdfa;
  --accent-text: #04121a;
  --green: #3fcf8e;
  --blue-edge: #2f8fc4;
  --body-font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --display-font: Impact, "Arial Narrow Bold", "Franklin Gothic Medium", "Arial Black", sans-serif;

  background: var(--page-bg);
  color: var(--text);
  font-family: var(--body-font);
}

.site-dark-fantasy a {
  color: var(--link);
}

.site-dark-fantasy a:focus-visible {
  outline-color: var(--focus);
}

/* Header and navigation: opaque black matches the Logo's own black, so the Logo is not a pasted box. */

.site-dark-fantasy .site-header {
  background: #000000;
  color: #ffffff;
  border-bottom: 0.2rem solid var(--green);
}

.site-dark-fantasy .site-nav a {
  color: var(--link);
}

/* Display type */

.site-dark-fantasy .hero h1,
.site-dark-fantasy .product-card h3,
.site-dark-fantasy .category-card {
  font-family: var(--display-font);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.site-dark-fantasy .hero h1,
.site-dark-fantasy .product-card h3 {
  color: var(--heading);
}

/* Category cards */

.site-dark-fantasy .category-card {
  background: var(--card-bg);
  color: var(--link);
  border: var(--card-border);
  border-left: 0.5rem solid var(--green);
  border-radius: 0;
}

.site-dark-fantasy .category-card:hover,
.site-dark-fantasy .category-card:focus-visible {
  background: var(--accent-bg);
  color: var(--accent-text);
}

/* Product cards */

.site-dark-fantasy .product-list {
  --card-min: 16rem;
  --card-gap: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--card-min)), 1fr));
  gap: var(--card-gap);
  list-style: none;
  margin: 0;
  padding: 0;
  container-type: inline-size;
}

/* A lone card is as wide as one of two cards would be, left-aligned.  The 33.5rem
   threshold is 2 x --card-min + --card-gap (a container query cannot read custom
   properties); below it only one column fits and the card keeps the full width. */
@container (min-width: 33.5rem) {
  .site-dark-fantasy .product-list > li:only-child {
    max-width: calc((100cqw - var(--card-gap)) / 2);
  }
}

.site-dark-fantasy .product-card {
  background: var(--card-bg);
  color: var(--text);
  border: var(--card-border);
  border-radius: 0;
}

.site-dark-fantasy .product-card .cover {
  padding: 0.35rem;
  background: #000000;
  border: 0.125rem solid var(--green);
  border-radius: 0;
  outline: 0.125rem solid var(--blue-edge);
  outline-offset: 0.2rem;
}

.site-dark-fantasy .product-card .blurb {
  color: var(--text);
}

/* Description markup: strong is white (about 17:1 on the card and page backgrounds); em is the focus
   yellow #ffd966 (about 13:1 on #0f151b and 15:1 on #07090c). */

.site-dark-fantasy #product-description strong,
.site-dark-fantasy .deck-description strong,
.site-dark-fantasy .blurb strong {
  color: #ffffff;
  font-weight: 700;
}

.site-dark-fantasy #product-description em,
.site-dark-fantasy .deck-description em,
.site-dark-fantasy .blurb em {
  color: #ffd966;
  font-style: italic;
}

/* Status labels */

.site-dark-fantasy .status {
  background: transparent;
  color: var(--green);
  border: 0.125rem solid var(--green);
  border-radius: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

/* Store links */

.site-dark-fantasy .store-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-dark-fantasy .store-links a {
  display: inline-block;
  padding: 0.5rem 1.1rem;
  background: var(--accent-bg);
  color: var(--accent-text);
  border: 0.125rem solid var(--accent-bg);
  border-radius: 0;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.site-dark-fantasy .store-links a:hover,
.site-dark-fantasy .store-links a:focus-visible {
  background: transparent;
  color: var(--link);
}

/* Sample link */

.site-dark-fantasy #sample-link {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: transparent;
  color: var(--link);
  border: 0.125rem solid var(--blue-edge);
  border-radius: 0;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.site-dark-fantasy #sample-link[hidden] {
  display: none;
}

.site-dark-fantasy #sample-link:hover,
.site-dark-fantasy #sample-link:focus-visible {
  background: var(--accent-bg);
  color: var(--accent-text);
}

/* Messages: empty-state, load-failure and not-found text */

.site-dark-fantasy .message {
  padding: 0.75rem 1rem;
  background: #2a0f12;
  color: #ffd9d9;
  border: 0.125rem solid #c0504d;
  border-left-width: 0.5rem;
  border-radius: 0;
}

.site-dark-fantasy .message a {
  color: #ffd966;
}

/* Footer */

.site-dark-fantasy .site-footer {
  background: #000000;
  color: #b9c9d1;
  border-top: 0.125rem solid var(--blue-edge);
}

.site-dark-fantasy .site-footer a {
  color: var(--link);
}

/* List card badge */

.site-dark-fantasy .product-card-badge {
  background: var(--accent-bg);
  color: var(--accent-text);
  border: 0.125rem solid var(--accent-bg);
  border-radius: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Decks */

.site-dark-fantasy .decks-section h2,
.site-dark-fantasy .ways-to-buy h2 {
  font-family: var(--display-font);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--heading);
}

.site-dark-fantasy .deck {
  background: var(--card-bg);
  color: var(--text);
  border: var(--card-border);
  border-left: 0.5rem solid var(--green);
  border-radius: 0;
}

.site-dark-fantasy .deck-title {
  font-family: var(--display-font);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--heading);
}

.site-dark-fantasy .deck-card-count {
  color: #b9c9d1;
  font-weight: 700;
}

.site-dark-fantasy .deck-sample-link {
  background: transparent;
  color: var(--link);
  border: 0.125rem solid var(--blue-edge);
  border-radius: 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.site-dark-fantasy .deck-sample-link:hover,
.site-dark-fantasy .deck-sample-link:focus-visible {
  background: var(--accent-bg);
  color: var(--accent-text);
}

/* Ways to buy table */

.site-dark-fantasy .ways-to-buy-table {
  background: var(--card-bg);
  color: var(--text);
  border: var(--card-border);
}

.site-dark-fantasy .ways-to-buy-table th {
  background: #16212b;
  color: var(--heading);
  border-bottom: 0.125rem solid var(--blue-edge);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.site-dark-fantasy .ways-to-buy-table td {
  border-bottom: 0.0625rem solid #2f8fc4;
}

.site-dark-fantasy .option-label {
  font-weight: 700;
}

.site-dark-fantasy .option-status {
  background: transparent;
  border: 0.125rem solid currentColor;
  border-radius: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.site-dark-fantasy .option-status-available {
  color: var(--green);
}

.site-dark-fantasy .option-status-coming-soon {
  color: #b9c9d1;
}

.site-dark-fantasy .option-buy a {
  background: var(--accent-bg);
  color: var(--accent-text);
  border: 0.125rem solid var(--accent-bg);
  border-radius: 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.site-dark-fantasy .option-buy a:hover,
.site-dark-fantasy .option-buy a:focus-visible {
  background: transparent;
  color: var(--link);
}

@media (max-width: 40em) {
  .site-dark-fantasy .ways-to-buy-table {
    background: transparent;
    border: 0;
  }

  .site-dark-fantasy .ways-to-buy-table tr {
    background: var(--card-bg);
    border: var(--card-border);
    border-left: 0.5rem solid var(--green);
  }

  .site-dark-fantasy .ways-to-buy-table td {
    border-bottom: 0;
  }

  .site-dark-fantasy .ways-to-buy-table td::before {
    color: #b9c9d1;
    letter-spacing: 0.08em;
  }
}
