/* ══════════════════════════════════════════════════════════════════════════
   Storefront layout — a dark navigation rail beside a parchment content
   column, matching the Oakevale mock.
   ══════════════════════════════════════════════════════════════════════ */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-neutral-900);
  color: #fff;
  padding: 10px 16px;
  z-index: 300;
  border-radius: 0 0 6px 0;
}
.skip-link:focus {
  left: 0;
}

.boot {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--color-neutral-600);
}

.shell {
  display: flex;
  min-height: 100vh;
  align-items: stretch;
}

/* ── Sidebar ────────────────────────────────────────────────────────────── */

/*
 * The rail is a full-height flex item that paints the dark background for the
 * entire page; the *inner* wrapper is what sticks. Putting `height: 100vh` on
 * the rail itself leaves bare parchment below it on any page taller than the
 * viewport — which reads as a mysterious gap the width of the navigation.
 */
.sidebar {
  width: 276px;
  flex: none;
  background: var(--color-sidebar);
  box-shadow: inset -6px 0 16px rgba(0, 0, 0, 0.28);
  z-index: 10;
}

.sidebar-inner {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 16px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--color-sidebar-hover) transparent;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand:hover {
  text-decoration: none;
}
.brand-mark {
  width: 48px;
  height: 48px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Most server logos are pixel art; smoothing them on the way down is what
     makes an uploaded mark look mushy next to the rest of the chrome. */
  image-rendering: pixelated;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.45));
}
.brand-name {
  font-family: var(--font-heading);
  font-size: 19px;
  letter-spacing: 0.5px;
  color: var(--color-sidebar-text);
  line-height: 1;
}
.brand-tagline {
  font-size: 10px;
  color: var(--color-sidebar-accent);
  letter-spacing: 1.4px;
  margin-top: 3px;
  font-weight: 700;
  text-transform: uppercase;
}

.nav-group + .nav-group {
  border-top: 1px solid var(--color-sidebar-hover);
  padding-top: 14px;
}
.nav-heading {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: var(--color-sidebar-muted);
  margin: 0 6px 8px;
}
.nav-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 10px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  position: relative;
  color: var(--color-sidebar-text);
  opacity: 0.75;
  background: none;
  border: none;
  text-align: left;
  width: 100%;
  font-family: inherit;
  transition: background 0.15s ease, opacity 0.15s ease;
  text-decoration: none;
}
.nav-item:hover {
  background: var(--color-sidebar-hover);
  color: var(--color-sidebar-strong);
  opacity: 1;
  text-decoration: none;
}
.nav-item.active {
  background: var(--color-sidebar-hover);
  color: var(--color-sidebar-strong);
  opacity: 1;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 3px;
  bottom: 3px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--color-accent-500);
}
.nav-badge {
  margin-left: auto;
  background: var(--color-accent-500);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
}

.sidebar-spacer {
  flex: 1;
  min-height: 10px;
}

.side-account {
  padding: 12px;
}
.side-account-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.side-avatar {
  width: 36px;
  height: 36px;
  overflow: hidden;
  padding: 2px;
  border-color: var(--color-accent-600);
  flex: none;
}
.side-avatar img {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  border-radius: 2px;
}
.side-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-sidebar-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.side-link {
  font-size: 11px;
  color: var(--color-sidebar-accent);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
}
.side-link:hover {
  text-decoration: underline;
}
.side-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--color-sidebar-text);
  margin-bottom: 8px;
}

/* ── Main column ────────────────────────────────────────────────────────── */

.main {
  flex: 1;
  min-width: 0;
}

/*
 * Centred rather than left-aligned. On a wide monitor a left-aligned column
 * inside a 1600px `main` leaves a lake of empty parchment on the right and the
 * whole composition looks pushed against the sidebar.
 */
.main-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 26px 40px 0;
}

.testmode-banner {
  background: var(--color-warning-bg);
  border: 1px solid var(--color-warning);
  color: #6d4808;
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-head {
  border-radius: var(--radius-lg);
  background: linear-gradient(120deg, var(--color-accent-2-100), var(--color-accent-100));
  padding: 28px 32px;
  margin-bottom: 26px;
  border: 1px solid var(--color-neutral-300);
}
.page-head h1 {
  font-size: clamp(24px, 2.6vw, 32px);
  margin: 0 0 6px;
}
.page-head p {
  margin: 0;
  color: var(--color-neutral-700);
  font-size: 14px;
  max-width: 70ch;
}

/* ── Hero ───────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-neutral-400);
  min-height: 460px;
  display: flex;
  align-items: flex-end;
  background:
    radial-gradient(120% 90% at 78% 15%, rgba(214, 127, 72, 0.34) 0%, transparent 60%),
    linear-gradient(155deg, #3a332a 0%, #211d18 45%, #100e0c 100%);
  box-shadow: var(--shadow-md);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(16, 14, 12, 0.92) 0%, rgba(16, 14, 12, 0.6) 48%, rgba(16, 14, 12, 0.18) 82%);
  pointer-events: none;
}
/*
 * Terrain silhouette for heroes with no uploaded artwork. Built from stacked
 * box-shadows on a single element: a blocky skyline of "chunks" at two depths,
 * which reads as a built world rather than the repeating-gradient parapet this
 * replaced — that one looked like a placeholder because it was one.
 */
.hero-terrain {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 190px;
  pointer-events: none;
  overflow: hidden;
}
.hero-terrain::before,
.hero-terrain::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: -5%;
  width: 110%;
  /* Each stop is one 28px "block" column; the uneven run lengths are what
     stop it reading as a repeating pattern. */
  background: repeating-linear-gradient(90deg, currentColor 0 28px, transparent 28px 56px);
}
.hero-terrain::before {
  height: 96px;
  color: rgba(0, 0, 0, 0.34);
  -webkit-mask-image: linear-gradient(to top, #000 58%, transparent);
  mask-image: linear-gradient(to top, #000 58%, transparent);
  clip-path: polygon(
    0 46%, 8% 46%, 8% 30%, 17% 30%, 17% 52%, 26% 52%, 26% 22%, 35% 22%,
    35% 40%, 47% 40%, 47% 14%, 56% 14%, 56% 36%, 66% 36%, 66% 26%, 74% 26%,
    74% 50%, 85% 50%, 85% 34%, 100% 34%, 100% 100%, 0 100%
  );
}
.hero-terrain::after {
  height: 58px;
  color: rgba(0, 0, 0, 0.5);
  clip-path: polygon(
    0 40%, 11% 40%, 11% 62%, 22% 62%, 22% 28%, 33% 28%, 33% 55%, 44% 55%,
    44% 34%, 58% 34%, 58% 66%, 69% 66%, 69% 42%, 81% 42%, 81% 58%, 100% 58%,
    100% 100%, 0 100%
  );
}
.hero-body {
  position: relative;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
}
/* A stamped plate rather than floating text — it anchors the headline block. */
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-pixel);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--color-accent-300);
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-left: 3px solid var(--color-accent-500);
  padding: 6px 12px 5px;
  margin-bottom: 16px;
  border-radius: 2px;
}
.hero h1 {
  font-size: clamp(30px, 4.2vw, 54px);
  color: #fff;
  margin: 0 0 12px;
  line-height: 0.98;
  letter-spacing: -0.5px;
  /* A hard black offset under the type: it keeps the headline readable over
     any uploaded screenshot without washing the image out behind a scrim. */
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.42);
  max-width: 15ch;
}
.hero-sub {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.86);
  margin: 0;
  max-width: 50ch;
  line-height: 1.6;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  background: rgba(16, 14, 12, 0.6);
  backdrop-filter: blur(4px);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 13px;
}
.hero-chip .muted {
  color: rgba(255, 255, 255, 0.62);
}
.hero-chip a {
  color: #fff;
  font-weight: 600;
}
.hero-chip a:hover {
  color: var(--color-accent-300);
}
.dot-live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7bd88f;
  box-shadow: 0 0 0 3px rgba(123, 216, 143, 0.25);
  flex: none;
}
.dot-offline {
  background: var(--color-neutral-500);
  box-shadow: 0 0 0 3px rgba(161, 151, 134, 0.2);
}
.copy-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  padding: 0;
  font-family: inherit;
}
.copy-btn:hover {
  color: var(--color-accent-300);
}

/* ── Section headings ───────────────────────────────────────────────────── */

.section {
  margin-top: 44px;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(20px, 2vw, 26px);
  margin: 0;
}
.section-sub {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--color-neutral-600);
  max-width: 62ch;
}
.section-link {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

/* ── Assurance strip ────────────────────────────────────────────────────── */

.assurances {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.assurance {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--color-neutral-100);
  border: 1px solid var(--color-neutral-300);
}
.assurance-icon {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-100);
  color: var(--color-accent-700);
}
.assurance-title {
  font-weight: 700;
  font-size: 13.5px;
  line-height: 1.2;
}
.assurance-note {
  font-size: 12px;
  color: var(--color-neutral-600);
  margin-top: 2px;
}

/* ── Donation goal ──────────────────────────────────────────────────────── */

.donation-goal {
  padding: 18px 20px;
}
.donation-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.donation-title {
  font-weight: 700;
  font-size: 16px;
}
.donation-blurb {
  font-size: 13px;
  color: var(--color-neutral-600);
  margin-top: 3px;
}
.donation-pct {
  font-family: var(--font-heading);
  font-size: 20px;
  color: var(--color-accent-700);
  flex: none;
}
.donation-track {
  height: 12px;
  border-radius: 999px;
  background: var(--color-neutral-200);
  border: 1px solid var(--color-neutral-300);
  overflow: hidden;
}
.donation-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-accent-500), var(--color-accent-600));
  transition: width 0.4s ease;
}
.donation-amounts {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 10px;
  font-size: 13px;
}
.donation-amounts b {
  font-size: 15px;
  color: var(--color-accent-800);
}

/* ── Category cards ─────────────────────────────────────────────────────── */

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 18px;
}
.cat-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-accent-300);
  background: linear-gradient(160deg, var(--color-accent-100), var(--color-bg));
  padding: 22px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  overflow: hidden;
  text-align: left;
  font-family: inherit;
  color: inherit;
  width: 100%;
  display: flex;
  flex-direction: column;
}
.cat-card.accent-2 {
  border-color: var(--color-accent-2-300);
  background: linear-gradient(160deg, var(--color-accent-2-100), var(--color-bg));
}
/* Hover motion comes from .anim-card so the admin's Card-motion choice
   governs these too; only the non-transform part is kept here. */
.cat-card:hover {
  box-shadow: var(--shadow-lg);
}
.cat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 34%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: translateX(-120%) skewX(-10deg);
  pointer-events: none;
}
.cat-card:hover::after {
  animation: shimmerSweep 0.85s ease;
}
.cat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.cat-icon {
  width: 52px;
  height: 52px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-500);
  border-color: var(--color-accent-800);
  overflow: hidden;
}
.cat-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cat-card.accent-2 .cat-icon {
  background: var(--color-accent-2-600);
  border-color: var(--color-accent-2-900);
}
.cat-name {
  font-family: var(--font-heading);
  font-size: 20px;
}
.cat-tagline {
  font-size: 13px;
  color: var(--color-neutral-600);
  margin-top: 2px;
}
.cat-chips {
  display: flex;
  gap: 7px;
  margin: 16px 0;
  flex-wrap: wrap;
  flex: 1;
  align-content: flex-start;
}
.cat-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.cat-from {
  font-size: 13px;
  color: var(--color-neutral-600);
}
.cat-from b {
  color: var(--color-text);
  font-size: 17px;
}

/* ── Featured spotlight ─────────────────────────────────────────────────── */

.spotlight {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--color-accent-500);
  background: linear-gradient(120deg, var(--color-accent-100), var(--color-bg) 60%);
  box-shadow: var(--shadow-md);
}
.spotlight-body {
  padding: 26px 30px;
}
.spotlight-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: #fff;
  background: var(--color-accent-700);
  padding: 4px 11px;
  border-radius: 4px;
  margin-bottom: 12px;
}
.spotlight-body h3 {
  font-size: clamp(22px, 2.4vw, 30px);
  margin: 0 0 6px;
}
.spotlight-perks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 6px 18px;
  margin: 16px 0 0;
}
.spotlight-side {
  background: rgba(255, 255, 255, 0.4);
  border-left: 1px solid var(--color-accent-300);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 6px;
}
.spotlight-price {
  font-family: var(--font-heading);
  font-size: 40px;
  line-height: 1;
  color: var(--color-accent-800);
}
.spotlight-was {
  font-size: 14px;
  color: var(--color-neutral-500);
  text-decoration: line-through;
}
.spotlight-save {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-success);
}

/* ── Steps ──────────────────────────────────────────────────────────────── */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 20px 20px 20px 22px;
  border-radius: var(--radius-md);
  background: var(--color-neutral-100);
  border: 1px solid var(--color-neutral-300);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -13px;
  left: 20px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--color-accent-600);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 0 var(--color-accent-900);
}
.step h4 {
  margin: 8px 0 5px;
  font-size: 16px;
}
.step p {
  margin: 0;
  font-size: 13px;
  color: var(--color-neutral-700);
  line-height: 1.55;
}

/* ── Rank cards ─────────────────────────────────────────────────────────── */

.rank-scroll {
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 8px;
}
.rank-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(200px, 1fr);
  gap: 14px;
  min-width: min-content;
  align-items: stretch;
  padding-top: 6px;
}
.rank-card {
  border-radius: var(--radius-md);
  border: 2px solid var(--color-neutral-300);
  background: var(--color-neutral-100);
  cursor: pointer;
  box-shadow: var(--lift-2);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
/* Hover and click motion come from .anim-card in the selectable-motion block,
   so an admin's choice under Theme actually governs these cards. */
.rank-card.sold-out {
  filter: grayscale(0.55);
}

/* Corner flag, not a rotated banner across the card — it stops fighting the
   crest for attention and no longer needs an animation to be noticed. */
.rank-ribbon {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--color-accent-700);
  color: #fff;
  font-family: var(--font-pixel);
  font-size: 8px;
  letter-spacing: 0.4px;
  padding: 5px 9px 4px;
  border-bottom-left-radius: var(--radius-sm);
  box-shadow: var(--lift-1);
  z-index: 2;
}

.rank-top {
  padding: 20px 14px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: relative;
  /* A subtle field behind the crest so it sits on something. */
  background:
    radial-gradient(90% 70% at 50% 0%, rgba(0, 0, 0, 0.05), transparent 70%),
    var(--color-neutral-200);
  border-bottom: 2px solid var(--color-neutral-300);
}
.rank-tier {
  font-family: var(--font-pixel);
  font-size: 8px;
  letter-spacing: 0.6px;
  color: var(--color-neutral-500);
}
.rank-crest {
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 3px 0 rgba(46, 43, 37, 0.24));
  transition: transform 0.18s cubic-bezier(0.2, 0.7, 0.3, 1);
}
/* Scoped to a live hover mode: with hover set to None the card must be
   completely still, and a crest that still lifts makes the setting look
   broken. */
[data-card-hover]:not([data-card-hover='none']) .rank-card:hover .rank-crest {
  transform: translateY(-3px) scale(1.05);
}
.rank-crest img {
  width: 66px;
  height: 66px;
  object-fit: contain;
  image-rendering: pixelated;
}

.rank-body {
  text-align: center;
  padding: 14px 12px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.rank-name {
  display: block;
  font-family: var(--font-heading);
  font-size: 17px;
  letter-spacing: 0.2px;
  margin: 0 0 5px;
  white-space: nowrap;
  /* The rank's colour now lives in the type itself and the crest, rather than
     a filled pill — five stacked pills read as a colour swatch chart. */
  background: none;
  box-shadow: none;
  padding: 0;
}
.rank-tagline {
  font-size: 11px;
  color: var(--color-neutral-600);
  min-height: 14px;
  margin-bottom: 8px;
}
.rank-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
}
.rank-price .was {
  font-size: 12px;
  color: var(--color-neutral-500);
  text-decoration: line-through;
}
.rank-price .now {
  font-family: var(--font-heading);
  font-size: 26px;
  letter-spacing: -0.5px;
}
.rank-billing {
  font-family: var(--font-pixel);
  font-size: 8px;
  letter-spacing: 0.5px;
  color: var(--color-neutral-500);
  margin-bottom: 14px;
  text-transform: uppercase;
}
.rank-perks {
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: left;
  margin-bottom: 14px;
  flex: 1;
}
.rank-perk {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 11.5px;
  color: var(--color-neutral-700);
  line-height: 1.35;
}
.rank-perk svg {
  flex: none;
  margin-top: 2px;
}

/* ── Comparison matrix ──────────────────────────────────────────────────── */

.matrix-scroll {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-neutral-300);
  background: var(--color-neutral-100);
}
.matrix {
  border-collapse: collapse;
  width: 100%;
  min-width: 820px;
  font-size: 13px;
}
.matrix th,
.matrix td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--color-neutral-200);
}
.matrix thead th {
  background: var(--color-neutral-200);
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 13px;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 1;
}
.matrix thead th:first-child {
  text-align: left;
  width: 210px;
}
.matrix .group-row td {
  background: var(--color-neutral-200);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--color-neutral-600);
  padding: 8px 16px;
  text-transform: uppercase;
}
.matrix .perk-label {
  color: var(--color-neutral-700);
  padding-left: 16px;
}
.matrix .perk-value {
  text-align: center;
  font-weight: 600;
}
.matrix tbody tr:hover td {
  background: var(--color-accent-100);
}
.matrix tbody tr:hover .group-row td {
  background: var(--color-neutral-200);
}

/* ── Product / grant cards ──────────────────────────────────────────────── */

.grant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 18px;
}
.grant-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
/* Hover/click motion lives in the selectable-motion block so the admin's
   Theme choice governs this card too. */
.grant-head {
  padding: 20px 22px;
  border-bottom: 1px solid var(--color-neutral-200);
  display: flex;
  align-items: center;
  gap: 14px;
}
.grant-icon {
  width: 56px;
  height: 56px;
  flex: none;
  padding: 4px;
  background: var(--color-accent-2-100);
  border-color: var(--color-accent-2-500);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.grant-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px;
}
.grant-body {
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.grant-price {
  font-family: var(--font-heading);
  font-size: 22px;
  color: var(--color-accent-2-800);
  margin-bottom: 12px;
}
.feature-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.feature {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 12.5px;
  color: var(--color-neutral-700);
  line-height: 1.4;
}
.feature svg {
  flex: none;
  margin-top: 2px;
}
.grant-note {
  font-size: 11.5px;
  color: var(--color-neutral-500);
  font-style: italic;
  margin-bottom: 14px;
}

/* Compact tile for generic categories. */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(224px, 1fr));
  gap: 16px;
}
.tile {
  display: flex;
  flex-direction: column;
  padding: 18px;
  text-align: center;
}
/* Hover/click motion lives in the selectable-motion block. */
.tile-art {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  overflow: hidden;
}
.tile-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px;
}
.tile-name {
  font-family: var(--font-heading);
  font-size: 16px;
}
.tile-tagline {
  font-size: 12px;
  color: var(--color-neutral-600);
  margin: 3px 0 10px;
  flex: 1;
}
.tile-price {
  font-family: var(--font-heading);
  font-size: 20px;
  margin-bottom: 12px;
}

/* ── Category jump bar (store page) ─────────────────────────────────────── */

.cat-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 26px;
  padding-bottom: 2px;
}
.cat-nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  border-radius: 999px;
  border: 2px solid var(--color-neutral-300);
  background: var(--color-neutral-100);
  font-size: 13px;
  font-weight: 700;
  color: var(--color-neutral-700);
  text-decoration: none;
  transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
}
.cat-nav a:hover {
  border-color: var(--color-accent-500);
  color: var(--color-accent-800);
  background: var(--color-accent-100);
  text-decoration: none;
}
.cat-nav .count {
  font-weight: 600;
  color: var(--color-neutral-500);
}

.cat-section {
  scroll-margin-top: 16px;
}

/* ── Supporters ─────────────────────────────────────────────────────────── */

.supporter-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 18px;
}
.supporter-list {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.supporter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px;
  border-radius: 6px;
}
.supporter-row:hover {
  background: var(--color-neutral-200);
}
.supporter-avatar {
  width: 38px;
  height: 38px;
  overflow: hidden;
  padding: 2px;
  flex: none;
}
.supporter-avatar img {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  border-radius: 2px;
}
.top-customer {
  padding: 20px;
  background: linear-gradient(160deg, var(--color-accent-100), var(--color-bg));
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  border-color: var(--color-accent-300);
}

/* ── Wiki ───────────────────────────────────────────────────────────────── */

.wiki-layout {
  display: grid;
  grid-template-columns: 246px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

/* ── Wiki sidebar ───────────────────────────────────────────────────────── */

.wiki-nav {
  position: sticky;
  top: 22px;
  background: var(--color-neutral-100);
  border: 1px solid var(--color-neutral-300);
  border-radius: var(--radius-lg);
  padding: 16px 12px;
  box-shadow: var(--shadow-sm);
}
.wiki-search {
  margin-bottom: 14px;
  position: relative;
}
.wiki-search .input {
  padding-left: 34px;
  min-height: 34px;
  font-size: 13px;
}
.wiki-search svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-neutral-500);
  pointer-events: none;
}
.wiki-nav-section + .wiki-nav-section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--color-neutral-200);
}
.wiki-nav-heading {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.3px;
  color: var(--color-neutral-500);
  margin: 0 0 6px 10px;
  text-transform: uppercase;
}
.wiki-link {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 6px;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-neutral-700);
  cursor: pointer;
  text-decoration: none;
  position: relative;
  transition: background 0.12s ease, color 0.12s ease;
}
.wiki-link:hover {
  background: var(--color-accent-100);
  color: var(--color-accent-800);
  text-decoration: none;
}
.wiki-link.active {
  background: var(--color-accent-100);
  color: var(--color-accent-800);
}
.wiki-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--color-accent-600);
}
.wiki-empty {
  font-size: 12.5px;
  color: var(--color-neutral-500);
  padding: 8px 10px;
}

/* ── Wiki article ───────────────────────────────────────────────────────── */

.wiki-article {
  min-width: 0;
}
.wiki-header {
  padding-bottom: 18px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--color-neutral-300);
  position: relative;
}
.wiki-header::after {
  /* A short accent rule overlapping the divider, so the header reads as a
     masthead rather than just a line. */
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 62px;
  height: 2px;
  background: var(--color-accent-600);
}
.wiki-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.3px;
  color: var(--color-accent-700);
  margin-bottom: 8px;
  text-transform: uppercase;
}
.wiki-header h2 {
  font-size: clamp(26px, 3vw, 36px);
  margin: 0 0 8px;
  line-height: 1.1;
}
.wiki-meta {
  font-size: 12px;
  color: var(--color-neutral-500);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.wiki-body {
  max-width: 74ch;
  font-size: 15.5px;
}
.wiki-body > *:first-child {
  margin-top: 0;
}
.wiki-body h3 {
  font-size: 20px;
  margin: 34px 0 10px;
  scroll-margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.wiki-body h3::before {
  content: '';
  width: 6px;
  height: 18px;
  border-radius: 2px;
  background: var(--color-accent-400);
  flex: none;
}
.wiki-body p {
  font-size: 15.5px;
  line-height: 1.8;
  color: var(--color-neutral-800);
  margin: 0 0 16px;
}
/* Lead paragraph: the first one carries the summary, so give it weight. */
.wiki-body > p:first-of-type {
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-neutral-700);
}
.wiki-body ul {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wiki-body li {
  font-size: 15px;
  line-height: 1.65;
  color: var(--color-neutral-800);
  padding-left: 26px;
  position: relative;
}
.wiki-body li::before {
  /* A small lozenge instead of a bullet — reads as heraldic at this size. */
  content: '';
  position: absolute;
  left: 6px;
  top: 9px;
  width: 7px;
  height: 7px;
  background: var(--color-accent-500);
  transform: rotate(45deg);
  border-radius: 1px;
}

.wiki-callout {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--color-accent-2-100);
  border-left: 4px solid var(--color-accent-2-600);
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-accent-2-900);
}

.qa-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.qa-item {
  border: 1px solid var(--color-neutral-300);
  border-radius: var(--radius-md);
  background: var(--color-neutral-100);
  overflow: hidden;
}
.qa-item[open] {
  border-color: var(--color-accent-300);
  background: var(--color-accent-100);
}
.qa-item summary {
  padding: 13px 16px;
  font-weight: 700;
  font-size: 14.5px;
  color: var(--color-accent-800);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.qa-item summary::-webkit-details-marker {
  display: none;
}
.qa-item summary::after {
  content: '+';
  font-family: var(--font-heading);
  font-size: 19px;
  line-height: 1;
  color: var(--color-accent-600);
  flex: none;
}
.qa-item[open] summary::after {
  content: '−';
}
.qa-item summary:hover {
  background: var(--color-accent-100);
}
.qa-answer {
  padding: 0 16px 14px;
  font-size: 14px;
  color: var(--color-neutral-700);
  line-height: 1.65;
}

.wiki-figure {
  margin: 0 0 22px;
}
.wiki-figure img {
  border-radius: var(--radius-md);
  border: 2px solid var(--color-neutral-300);
  width: 100%;
  box-shadow: var(--shadow-sm);
}
.wiki-figure figcaption {
  font-size: 12.5px;
  color: var(--color-neutral-500);
  margin-top: 8px;
  text-align: center;
  font-style: italic;
}

.wiki-video-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--color-neutral-300);
  box-shadow: var(--shadow-sm);
  background: var(--color-neutral-900);
}
.wiki-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.wiki-body code {
  background: var(--color-neutral-200);
  border-radius: 4px;
  padding: 0.15em 0.4em;
  font-size: 0.9em;
}
.wiki-body a {
  color: var(--color-accent-700);
  text-decoration: underline;
  text-decoration-color: var(--color-accent-300);
  text-underline-offset: 2px;
}
.wiki-body a:hover {
  text-decoration-color: var(--color-accent-700);
}

/* Prev / next pager at the foot of an article. */
.wiki-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--color-neutral-300);
}
.wiki-pager a {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 13px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-neutral-300);
  background: var(--color-neutral-100);
  text-decoration: none;
  color: var(--color-text);
  transition: border-color 0.12s ease, transform 0.12s ease;
}
.wiki-pager a:hover {
  border-color: var(--color-accent-500);
  transform: translateY(-2px);
  text-decoration: none;
}
.wiki-pager .dir {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--color-neutral-500);
  text-transform: uppercase;
}
.wiki-pager .title {
  font-weight: 700;
  font-size: 14px;
}
.wiki-pager .next {
  text-align: right;
  grid-column: 2;
}

/* ── About / rules ──────────────────────────────────────────────────────── */

.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 34px;
}
.staff-card {
  padding: 18px;
  text-align: center;
}
.staff-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 10px;
  overflow: hidden;
  border: 3px solid var(--color-accent-300);
  background: var(--color-neutral-200);
}
.staff-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}
.timeline-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  align-items: baseline;
  margin-bottom: 14px;
}
.timeline-when {
  font-family: var(--font-heading);
  color: var(--color-accent-700);
  font-size: 14px;
}
.timeline-text {
  font-size: 14px;
  color: var(--color-neutral-800);
  border-left: 2px solid var(--color-accent-300);
  padding-left: 14px;
}

.decree {
  max-width: 760px;
  margin: 0 auto;
  padding: 44px 48px;
  background: linear-gradient(160deg, var(--color-accent-100), var(--color-bg));
  position: relative;
  box-shadow: var(--shadow-md);
}
.decree-seal {
  position: absolute;
  top: -18px;
  right: 44px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-accent-600);
  border-color: var(--color-accent-900);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 19px;
}
.decree-kicker {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--color-accent-700);
  margin-bottom: 6px;
}
.decree h1 {
  font-size: 28px;
  text-align: center;
  margin: 0 0 28px;
}
.rule-row {
  display: flex;
  gap: 14px;
  margin-bottom: 16px;
}
.rule-num {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: var(--color-accent-600);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex: none;
  box-shadow: 0 2px 0 var(--color-accent-900);
}
.rule-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-neutral-800);
  padding-top: 3px;
}

/* ── Cart & checkout ────────────────────────────────────────────────────── */

.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}
.cart-line {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-neutral-200);
}
.cart-line:last-child {
  border-bottom: none;
}
.cart-thumb {
  width: 48px;
  height: 48px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-100);
  overflow: hidden;
}
.cart-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px;
}
.cart-info {
  flex: 1;
  min-width: 0;
}
.cart-name {
  font-weight: 700;
  font-size: 14.5px;
}
.cart-meta {
  font-size: 12px;
  color: var(--color-neutral-600);
  margin-top: 2px;
}
.qty-control {
  display: flex;
  align-items: center;
  border: 2px solid var(--color-neutral-300);
  border-radius: 6px;
  overflow: hidden;
  background: var(--color-neutral-100);
}
.qty-control button {
  width: 30px;
  height: 32px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  color: var(--color-neutral-700);
  font-family: inherit;
}
.qty-control button:hover {
  background: var(--color-neutral-200);
}
.qty-control span {
  min-width: 28px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.summary {
  padding: 20px;
  position: sticky;
  top: 24px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
  padding: 6px 0;
}
.summary-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: 2px solid var(--color-neutral-300);
  margin-top: 10px;
  padding-top: 12px;
  font-family: var(--font-heading);
  font-size: 20px;
}
.gateway-option {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border: 2px solid var(--color-neutral-300);
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 10px;
  background: var(--color-neutral-100);
  transition: border-color 0.12s ease, background 0.12s ease;
}
.gateway-option:hover {
  border-color: var(--color-accent-400);
}
.gateway-option.selected {
  border-color: var(--color-accent-500);
  background: var(--color-accent-100);
}
.gateway-option input {
  margin-top: 3px;
  accent-color: var(--color-accent-600);
}
.gateway-name {
  font-weight: 700;
  font-size: 14px;
}
.gateway-desc {
  font-size: 12.5px;
  color: var(--color-neutral-600);
  margin-top: 2px;
}

.test-card-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.test-card {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  padding: 6px 10px;
  background: var(--color-neutral-100);
  border: 1px solid var(--color-neutral-300);
  border-radius: 5px;
  cursor: pointer;
  font-family: var(--font-mono);
  align-items: center;
}
.test-card:hover {
  border-color: var(--color-accent-500);
  background: var(--color-accent-100);
}
.test-card .label {
  font-family: var(--font-body);
  color: var(--color-neutral-600);
  font-size: 11.5px;
  text-align: right;
}

.order-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.empty {
  text-align: center;
  padding: 70px 20px;
  color: var(--color-neutral-600);
}
.empty h3 {
  font-size: 22px;
  margin-bottom: 8px;
  color: var(--color-text);
}

.auth-card {
  max-width: 420px;
  margin: 40px auto;
  padding: 32px;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */

.site-footer {
  margin-top: 34px;
  border-top: 1px solid var(--color-neutral-300);
  padding: 12px 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px 16px;
  flex-wrap: wrap;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--color-neutral-500);
}
.footer-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.footer-links a {
  color: var(--color-neutral-600);
}
.footer-sep {
  color: var(--color-neutral-400);
}

/* ══════════════════════════════════════════════════════════════════════════
   Inline edit mode — only ever rendered for signed-in admins.
   ══════════════════════════════════════════════════════════════════════ */

.edit-toggle {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 120;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 17px;
  border-radius: 999px;
  border: 2px solid var(--color-neutral-950);
  background: var(--color-neutral-900);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
}
.edit-toggle:hover {
  background: var(--color-neutral-800);
}
.edit-toggle.on {
  background: var(--color-accent-600);
  border-color: var(--color-accent-900);
}

/* Editable regions only light up while the mode is active, so the storefront
   looks identical to a customer even when an admin is signed in. */
body.edit-mode [data-edit] {
  position: relative;
  outline: 2px dashed var(--color-accent-500);
  outline-offset: 3px;
  border-radius: 3px;
  cursor: pointer;
  transition: outline-color 0.12s ease, background 0.12s ease;
}
body.edit-mode [data-edit]:hover {
  outline-style: solid;
  outline-color: var(--color-accent-700);
  background: rgba(214, 127, 72, 0.1);
}
body.edit-mode [data-edit]::after {
  content: attr(data-edit-label);
  position: absolute;
  top: -9px;
  left: 0;
  transform: translateY(-100%);
  background: var(--color-accent-700);
  color: #fff;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 2px 7px;
  border-radius: 3px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
  z-index: 30;
}
body.edit-mode [data-edit]:hover::after {
  opacity: 1;
}
/* Inside the dark hero the dashed outline needs a lighter colour to read. */
body.edit-mode .hero [data-edit] {
  outline-color: var(--color-accent-300);
}

.edit-hint {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 119;
  background: var(--color-accent-700);
  color: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  pointer-events: none;
}

/* ── Media picker ───────────────────────────────────────────────────────── */

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
  gap: 10px;
  max-height: 340px;
  overflow-y: auto;
  padding: 4px;
}
.media-item {
  border: 2px solid var(--color-neutral-300);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: var(--color-neutral-100);
  padding: 0;
  display: flex;
  flex-direction: column;
  transition: border-color 0.12s ease, transform 0.12s ease;
}
.media-item:hover {
  border-color: var(--color-accent-500);
  transform: translateY(-2px);
}
.media-item.selected {
  border-color: var(--color-accent-600);
  box-shadow: 0 0 0 3px var(--color-accent-200);
}
.media-thumb {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background:
    repeating-conic-gradient(var(--color-neutral-200) 0% 25%, var(--color-neutral-100) 0% 50%) 50% / 14px 14px;
  display: block;
}
.media-caption {
  font-size: 10px;
  color: var(--color-neutral-600);
  padding: 4px 6px;
  text-align: center;
  border-top: 1px solid var(--color-neutral-200);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.media-drop {
  border: 2px dashed var(--color-neutral-400);
  border-radius: var(--radius-md);
  padding: 22px;
  text-align: center;
  color: var(--color-neutral-600);
  font-size: 13.5px;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
  margin-bottom: 14px;
}
.media-drop:hover,
.media-drop.dragover {
  border-color: var(--color-accent-500);
  background: var(--color-accent-100);
  color: var(--color-accent-800);
}
.media-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--color-neutral-300);
  border-radius: 8px;
  background: var(--color-neutral-100);
  margin-bottom: 10px;
}
.media-preview img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 4px;
  flex: none;
  background: var(--color-neutral-200);
}

/* ── Mobile ─────────────────────────────────────────────────────────────── */

.mobile-bar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--color-sidebar);
  padding: 10px 14px;
  align-items: center;
  gap: 12px;
}
.mobile-bar .brand-name {
  font-size: 16px;
}
.hamburger {
  background: none;
  border: 2px solid var(--color-sidebar-muted);
  border-radius: 6px;
  color: var(--color-sidebar-strong);
  padding: 6px 9px;
  cursor: pointer;
  line-height: 0;
  position: relative;
}
.hamburger .nav-badge {
  position: absolute;
  top: -7px;
  right: -8px;
  margin: 0;
}
.scrim {
  display: none;
}

@media (max-width: 1100px) {
  .spotlight {
    grid-template-columns: 1fr;
  }
  .spotlight-side {
    border-left: none;
    border-top: 1px solid var(--color-accent-300);
    flex-direction: row;
    justify-content: space-between;
    padding: 18px 24px;
  }
}

@media (max-width: 980px) {
  .supporter-grid,
  .checkout-layout,
  .wiki-layout {
    grid-template-columns: 1fr;
  }
  .summary {
    position: static;
  }
  .wiki-nav {
    position: static;
  }
  .main-inner {
    padding-inline: 24px;
  }
}

@media (max-width: 820px) {
  .shell {
    flex-direction: column;
  }
  .mobile-bar {
    display: flex;
  }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 276px;
    height: 100dvh;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    z-index: 100;
    box-shadow: 6px 0 24px rgba(0, 0, 0, 0.4);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-inner {
    height: 100dvh;
    position: static;
  }
  .sidebar.open ~ .scrim,
  .scrim.open {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(16, 14, 12, 0.5);
    z-index: 90;
  }
  .main-inner {
    padding: 18px 16px 0;
  }
  .hero {
    min-height: 400px;
  }
  .hero-body {
    padding: 24px 20px;
  }
  .decree {
    padding: 28px 22px;
  }
  .page-head {
    padding: 20px;
  }
  .timeline-row {
    grid-template-columns: 90px 1fr;
  }
}

/* ── Card affordance ────────────────────────────────────────────────────── */

/*
 * Whole cards are clickable, which is invisible until you try it. A quiet
 * label on hover says so without adding chrome to the resting state.
 */
.card-hint {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(16, 14, 12, 0.72);
  color: #fff;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  pointer-events: none;
}
.rank-card,
.grant-card,
.tile {
  cursor: pointer;
}
.rank-card:hover .card-hint,
.rank-card:focus-visible .card-hint,
.grant-card:hover .card-hint,
.grant-card:focus-visible .card-hint {
  opacity: 1;
  transform: translateY(0);
}
/* On a rank card the whole top belongs to the tier stamp and crest, so the
   hint drops to the foot rather than covering the stamp on narrow cards. */
.rank-card .card-hint {
  top: auto;
  bottom: 10px;
  right: 10px;
}
body.edit-mode .card-hint {
  display: none;
}

/* ── Product detail modal ───────────────────────────────────────────────── */

.pd-hero {
  position: relative;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 20px;
}
.pd-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pd-hero-fallback {
  opacity: 0.9;
}
.pd-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--color-accent-800);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 5px 12px;
  border-radius: 4px;
  box-shadow: var(--shadow-sm);
}
.pd-badge-out {
  left: auto;
  right: 12px;
  background: var(--color-danger);
}

.pd-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 24px;
  align-items: start;
}
.pd-tagline {
  font-size: 15px;
  color: var(--color-neutral-700);
  margin: 0 0 10px;
  font-weight: 600;
}
.pd-desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-neutral-800);
  margin: 0 0 18px;
}
.pd-h4 {
  font-size: 15px;
  margin: 0 0 10px;
}
.pd-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 7px 18px;
  margin-bottom: 20px;
}

.pd-perk-group {
  margin-bottom: 14px;
}
.pd-perk-group-name {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-neutral-500);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.pd-perk-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: 13px;
  padding: 5px 0;
  border-bottom: 1px solid var(--color-neutral-200);
  color: var(--color-neutral-700);
}
.pd-perk-row b {
  color: var(--color-text);
  white-space: nowrap;
}

.pd-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 12.5px;
  font-style: italic;
  color: var(--color-neutral-600);
  background: var(--color-neutral-100);
  border-left: 3px solid var(--color-neutral-400);
  padding: 10px 12px;
  border-radius: 0 6px 6px 0;
}
.pd-note svg {
  flex: none;
  margin-top: 1px;
}

.pd-side {
  position: sticky;
  top: 0;
}
.pd-price-box {
  background: linear-gradient(160deg, var(--color-accent-100), var(--color-bg));
  border: 2px solid var(--color-accent-300);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
  margin-bottom: 16px;
}
.pd-was {
  font-size: 14px;
  color: var(--color-neutral-500);
  text-decoration: line-through;
}
.pd-price {
  font-family: var(--font-heading);
  font-size: 34px;
  line-height: 1.05;
  color: var(--color-accent-800);
}
.pd-billing {
  font-size: 10.5px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--color-neutral-600);
  margin-top: 2px;
}
.pd-save {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-success);
  margin-top: 6px;
}

.pd-meta {
  margin: 0;
  font-size: 12.5px;
}
.pd-meta dt {
  font-weight: 700;
  color: var(--color-neutral-600);
  font-size: 10.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-top: 12px;
}
.pd-meta dd {
  margin: 2px 0 0;
  color: var(--color-neutral-800);
  line-height: 1.45;
}

@media (max-width: 760px) {
  .pd-grid {
    grid-template-columns: 1fr;
  }
  .pd-side {
    position: static;
    order: -1;
  }
  .pd-hero {
    height: 160px;
  }
}

/* Boxes inside the rail (the account panel) follow the sidebar colour instead of
   staying a fixed dark brown, which looked like a hole in a light sidebar. */
.sidebar .bf-slot-dark {
  background: var(--color-sidebar-hover);
  border-color: var(--color-sidebar-hover);
  box-shadow: none;
  color: var(--color-sidebar-text);
}
