/*
 * Home + tier pages: facade hero, tier band, the grid app, how it works, price table, CTA band.
 * Loaded only on index.php (page_meta 'css'). Uses the tokens and components from site.css.
 *
 * Contents
 *   01 Hero (home) + facade      05 Grid viewport + overlays   09 How it works
 *   02 Tier hero (tier pages)    06 Legend + live links        10 Price table
 *   03 Grid app head             07 Selection panel / sheet    11 CTA band
 *   04 Tier switch + hint        08 Dialog                     12 Motion
 */

/* ------------------------------------------------------------------ 01 Hero (home) + facade */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--seam);
}
.hero__inner {
  position: relative;
  z-index: 1;
  padding-block: clamp(40px, 9vw, 120px) var(--s-8);
}
.hero__title { max-width: 11ch; margin-bottom: var(--s-6); }
/* Local legibility halo (the scrim is light so the wall shows through the words) */
.hero__title, .hero__lede, .hero__facts { text-shadow: 0 0 24px rgba(11, 10, 8, 0.8), 0 1px 2px rgba(11, 10, 8, 0.9); }
.hero__lede { max-width: 40ch; color: var(--paper); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-8); }
.hero__actions .btn { flex: 1 1 auto; }
.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-5);
  margin-top: var(--s-8);
  font-size: var(--fs-small);
  color: var(--mute);
}
.hero__facts li { display: inline-flex; align-items: center; gap: var(--s-2); }
.hero__facts li::before { content: ""; width: 6px; height: 6px; background: var(--gold); }

/* Below 1100px the facade is the hero's full-bleed background: copy sits on a scrim, tiles and
   VIP panels show in a top band and a deeper bottom band. From 1100px: copy left, facade right. */
.hero__facade {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__facade canvas { width: 100%; height: 100%; }
.hero__inner { pointer-events: none; padding-block: 48px 128px; }
.hero__copy { position: relative; pointer-events: auto; }
.hero__copy::before { /* scrim behind the text block only */
  content: "";
  position: absolute;
  z-index: -1;
  inset: -20px calc(var(--gutter) * -1);
  background: linear-gradient(180deg, rgba(11, 10, 8, 0) 0, rgba(11, 10, 8, 0.6) 20px, rgba(11, 10, 8, 0.6) calc(100% - 20px), rgba(11, 10, 8, 0) 100%);
  pointer-events: none;
}
.hero__inner { z-index: 1; }
.hero__facade .facade__links { z-index: 2; }
.facade__caption {
  position: absolute;
  right: var(--gutter);
  bottom: var(--s-3);
  z-index: 3;
  margin: 0;
  padding: 3px 8px;
  background: rgba(11, 10, 8, 0.9);
  border: 1px solid var(--seam-2);
  font-size: 0.6875rem;
  color: var(--gold);
  text-decoration: none;
  pointer-events: auto;
}
.facade__caption:hover { color: var(--gold-hi); border-color: var(--gold-lo); }
/* links sit above the copy layer in the exposed bands */
.hero { isolation: isolate; }

@media (min-width: 640px) {
  .hero__actions .btn { flex: 0 0 auto; }
  .hero__inner { padding-block: 64px 148px; }
}
@media (min-width: 1100px) {
  /* One wall: the facade spans the whole hero and the copy is painted on it. A horizontal scrim is
     solid behind the text column and fades out towards the right; a vertical fade melts the top and
     bottom into the header seam and the next section. --hero-clear must match CLEAR_* in facade.js. */
  .hero {
    --hero-text: calc(max(32px, (100% - 1240px) / 2) + 600px); /* right edge of the text column */
    min-height: min(760px, calc(100svh - var(--header-h) - 140px));
    display: flex;
    align-items: center;
  }
  .hero__inner { padding-block: var(--s-16); }
  .hero__copy { width: calc(7 / 12 * 100%); padding-right: var(--s-8); }
  .hero__copy::before { display: none; }
  .hero__facade::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
      linear-gradient(180deg, #0b0a08 0, rgba(11, 10, 8, 0) 56px, rgba(11, 10, 8, 0) calc(100% - 64px), #0b0a08 100%),
      linear-gradient(90deg,
        rgba(11, 10, 8, 0.62) 0,
        rgba(11, 10, 8, 0.62) calc(var(--hero-text) - 40px),
        rgba(11, 10, 8, 0.52) var(--hero-text),
        rgba(11, 10, 8, 0.28) calc(var(--hero-text) + 100px),
        rgba(11, 10, 8, 0.1) calc(var(--hero-text) + 170px),
        rgba(11, 10, 8, 0) calc(var(--hero-text) + 220px));
  }
}

.tier-band { padding-block: var(--s-6); border-top: 1px solid var(--seam-2); border-bottom: 1px solid var(--seam); }

/* ------------------------------------------------------------------ 02 Tier hero */
.tier-hero__title { max-width: 16ch; }
.tier-hero__spec {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  margin: var(--s-8) 0 0;
  background: var(--seam);
  border: 1px solid var(--seam);
  width: fit-content;
  max-width: 100%;
}
.tier-hero__spec > div { flex: 1 1 auto; padding: var(--s-3) var(--s-5); background: var(--ink-1); }
.tier-hero__spec dt { font-size: var(--fs-label); font-weight: 650; font-stretch: var(--stretch-label); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--mute); }
.tier-hero__spec dd { margin: 0; font-size: 1.375rem; font-weight: 700; color: var(--gold-hi); font-variant-numeric: tabular-nums lining-nums; }
.tier-hero .hero__actions { margin-top: var(--s-6); }

/* ------------------------------------------------------------------ 03 Grid app head */
.grid-app { padding-block: clamp(40px, 6vw, 80px); scroll-margin-top: var(--header-h); }
.grid-app__head { display: grid; gap: var(--s-5); margin-bottom: var(--s-5); }
.grid-app__head > * { min-width: 0; } /* lets the tier switch scroll instead of widening the page */
.grid-app__title { margin-bottom: var(--s-2); }
.grid-app__tier {
  margin: 0;
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--gold-hi);
  font-variant-numeric: tabular-nums;
}
@media (min-width: 960px) {
  .grid-app__head { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
}

/* ------------------------------------------------------------------ 04 Tier switch + hint */
/* Segmented control. Fits 5 across from 320px; scrolls with snap if it ever cannot. */
.tier-switch__list {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(60px, 1fr);
  gap: 1px;
  background: var(--seam);
  border: 1px solid var(--seam);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.tier-switch__list::-webkit-scrollbar { display: none; }
.tier-switch__list li { scroll-snap-align: start; }
.tier-switch__list li + li { margin-top: 0; }
.tier-switch__btn {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 2px;
  min-height: 60px;
  padding: var(--s-2) var(--s-1);
  border-top: 2px solid transparent;
  background: var(--ink-1);
  color: var(--paper);
  text-align: center;
  text-decoration: none;
  transition: background-color var(--t-fast) ease-out, border-color var(--t-fast) ease-out;
}
.tier-switch__btn:hover { background: var(--ink-2); color: var(--paper); }
.tier-switch__btn:focus-visible { outline-offset: -2px; }
.tier-switch__code { font-size: 0.6875rem; font-weight: 650; font-stretch: var(--stretch-label); letter-spacing: var(--track-label); color: var(--mute); font-variant-numeric: tabular-nums; line-height: 1; }
.tier-switch__name { font-size: 0.875rem; font-weight: 800; font-stretch: 68%; letter-spacing: 0.02em; text-transform: uppercase; line-height: 1.1; }
.tier-switch__price { font-size: 0.875rem; font-weight: 650; color: var(--gold); font-variant-numeric: tabular-nums lining-nums; line-height: 1.1; }
.tier-switch__btn.is-active, .tier-switch__btn[aria-current] { border-top-color: var(--gold); background: var(--ink-2); }
.tier-switch__btn.is-active .tier-switch__code, .tier-switch__btn[aria-current] .tier-switch__code { color: var(--gold-hi); }
.tier-switch__btn.is-active .tier-switch__price, .tier-switch__btn[aria-current] .tier-switch__price { color: var(--gold-hi); }
@media (min-width: 640px) {
  .tier-switch__list { grid-auto-columns: minmax(96px, 1fr); }
  .tier-switch__name { font-size: 1.0625rem; }
  .tier-switch__price { font-size: 1rem; }
}

.grid-hint {
  display: flex;
  align-items: center;
  gap: var(--s-3) var(--s-4);
  margin-bottom: var(--s-4);
  padding: var(--s-3) var(--s-3) var(--s-3) var(--s-4);
  border: 1px solid var(--seam);
  border-left: 2px solid var(--gold);
  background: var(--ink-1);
  font-size: var(--fs-small);
  line-height: 1.45;
}
.grid-hint .tile-icon { flex: 0 0 auto; }
.grid-hint__text { flex: 1 1 auto; margin: 0; color: var(--paper); }
.grid-hint__text strong { color: var(--gold-hi); font-weight: 650; }
.grid-hint__text--touch { display: none; }
.is-touch .grid-hint__text--mouse { display: none; }
.is-touch .grid-hint__text--touch { display: block; }
@media (pointer: coarse) {
  .grid-app__wrap:not(.is-mouse) .grid-hint__text--mouse { display: none; }
  .grid-app__wrap:not(.is-mouse) .grid-hint__text--touch { display: block; }
}
.grid-hint__close {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 var(--s-3);
  border: 1px solid var(--seam-2);
  border-radius: var(--radius);
  background: transparent;
  color: var(--paper);
  font-size: var(--fs-label);
  font-weight: 700;
  font-stretch: var(--stretch-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  cursor: pointer;
}
.grid-hint__close:hover { border-color: var(--gold-lo); color: var(--gold-hi); }

/* ------------------------------------------------------------------ 05 Grid viewport + overlays */
/* Full bleed: the stage spans the whole window; the grid fits the width (engine zooms/pans inside). */
.grid-app__stage { position: relative; min-width: 0; }
.grid-app__bottom { padding-top: var(--s-4); }
.grid-viewport {
  position: relative;
  width: 100%;
  height: clamp(300px, min(100vw, calc(100svh - var(--header-h))), 2000px); /* the whole grid at fit-width, or the full screen below the header */
  border-block: 1px solid var(--seam-2);
  background: var(--ink-0);
  overflow: hidden;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
#grid-canvas, #selection-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
}
#grid-canvas { cursor: crosshair; outline: none; }
#grid-canvas:focus-visible { outline: none; }
.grid-viewport:has(#grid-canvas:focus-visible) { box-shadow: inset 0 0 0 2px var(--gold-hi); }
#selection-canvas { pointer-events: none; z-index: 2; }
.is-panning #grid-canvas { cursor: grabbing !important; }
.is-selecting .grid-viewport { touch-action: none; }

.grid-zoom {
  position: absolute;
  right: var(--s-2);
  bottom: var(--s-2);
  z-index: 4;
  display: flex;
  gap: 1px;
  background: var(--seam-2);
  border: 1px solid var(--seam-2);
}
.grid-zoom__btn {
  min-width: 44px;
  height: 44px;
  padding: 0 var(--s-3);
  border: 0;
  border-radius: 0;
  background: rgba(11, 10, 8, 0.94);
  color: var(--paper);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background-color var(--t-fast) ease-out, color var(--t-fast) ease-out;
}
.grid-zoom__btn--fit {
  font-size: var(--fs-label);
  font-weight: 700;
  font-stretch: var(--stretch-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
}
.grid-zoom__btn:hover:not(:disabled) { background: var(--gold); color: var(--ink-0); }
.grid-zoom__btn:active:not(:disabled) { background: var(--gold-lo); }
.grid-zoom__btn:disabled { color: #5d5546; cursor: default; }
.grid-zoom__btn:focus-visible { outline-offset: -2px; }
.grid-zoom__btn--fs { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--fs-label); font-weight: 700; font-stretch: var(--stretch-label); letter-spacing: var(--track-label); text-transform: uppercase; }
.tile-icon--sm { grid-template-columns: repeat(3, 4px); gap: 2px; }
.tile-icon--sm i { width: 4px; height: 4px; }
.grid-zoom__btn--fs:hover .tile-icon i.is-lit { background: var(--ink-0); }
.grid-zoom__btn--fs[aria-pressed="true"] { color: var(--gold-hi); }
/* On touch, "Full view" is the way back out: give it the gold plate once zoomed */
.is-touch.is-zoomed .grid-zoom__btn--fit { background: var(--gold); color: var(--ink-0); }

.grid-coords {
  position: absolute;
  left: var(--s-2);
  bottom: var(--s-2);
  z-index: 4;
  max-width: calc(100% - 200px);
  margin: 0;
  padding: 4px 8px;
  background: rgba(11, 10, 8, 0.94);
  border: 1px solid var(--seam-2);
  color: var(--gold-hi);
  font-size: var(--fs-label);
  font-weight: 650;
  font-stretch: var(--stretch-label);
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.grid-toast {
  position: absolute;
  top: var(--s-2);
  left: var(--s-2);
  right: var(--s-2);
  z-index: 6;
  margin: 0;
  padding: var(--s-3) var(--s-4);
  background: var(--ink-1);
  border: 1px solid var(--seam-2);
  border-left: 2px solid var(--err);
  color: var(--paper);
  font-size: var(--fs-small);
  line-height: 1.4;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity var(--t-fast) ease-out, transform var(--t-fast) ease-out;
  pointer-events: none;
}
.grid-toast.is-info { border-left-color: var(--gold); }
.grid-toast.is-shown { opacity: 1; transform: none; }

.grid-loading, .grid-error {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  padding: var(--s-6);
  background: rgba(11, 10, 8, 0.86);
  color: var(--mute);
  font-size: var(--fs-small);
  text-align: center;
}
.grid-loading.show { display: flex; }
.grid-error:not([hidden]) { display: flex; }
.grid-error__title { margin: 0; font-size: var(--fs-h3); font-weight: 700; color: var(--paper); }
.grid-error__text { margin: 0 0 var(--s-2); }
.grid-loading__icon i { animation: mgc-tile 1.35s var(--ease-out) infinite; }
.grid-loading__icon i:nth-child(1) { animation-delay: 0s; }
.grid-loading__icon i:nth-child(2), .grid-loading__icon i:nth-child(4) { animation-delay: 0.15s; }
.grid-loading__icon i:nth-child(3), .grid-loading__icon i:nth-child(5), .grid-loading__icon i:nth-child(7) { animation-delay: 0.3s; }
.grid-loading__icon i:nth-child(6), .grid-loading__icon i:nth-child(8) { animation-delay: 0.45s; }
.grid-loading__icon i:nth-child(9) { animation-delay: 0.6s; }
@keyframes mgc-tile {
  0%, 100% { background: var(--seam-2); }
  40% { background: var(--gold); }
}

/* ------------------------------------------------------------------ 06 Legend + live links */
.grid-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-5);
  margin-top: var(--s-4);
  font-size: var(--fs-small);
  color: var(--mute);
}
.grid-legend li { display: inline-flex; align-items: center; gap: var(--s-2); }
.grid-legend li + li { margin-top: 0; }
.grid-legend__sw { width: 14px; height: 14px; flex: 0 0 auto; border: 1px solid var(--seam-2); }
.grid-legend__sw--free { background: #1c1914; }
.grid-legend__sw--sold { background: #8a7440; border-color: #8a7440; }
.grid-legend__sw--sel { background: var(--gold-hi); border-color: var(--paper); }
.grid-legend__sw--res { background: #3d3527 linear-gradient(135deg, transparent 45%, #5f5239 45%, #5f5239 58%, transparent 58%); }

.grid-owners { margin-top: var(--s-5); border-top: 1px solid var(--seam); font-size: var(--fs-small); }
.grid-owners summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-weight: 650;
  color: var(--paper);
  cursor: pointer;
  list-style: none;
}
.grid-owners summary::-webkit-details-marker { display: none; }
.grid-owners summary::after { content: "+"; margin-left: auto; color: var(--gold); font-size: 1.25rem; }
.grid-owners[open] summary::after { content: "−"; }
.grid-owners summary:hover { color: var(--gold-hi); }
.grid-owners ul { display: grid; gap: var(--s-2); padding-bottom: var(--s-4); }
.grid-owners li + li { margin-top: 0; }
.grid-owners a { font-weight: 600; }
.grid-owners__meta { display: block; color: var(--mute); font-size: var(--fs-label); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ 07 Selection panel (floating card / mobile bottom sheet) */
/* Appears once there is a selection or a hold. ≥1024px: a card floating over the top-right of the grid. */
.grid-panel {
  background: rgba(19, 17, 13, 0.97);
  border: 1px solid var(--seam-2);
  border-top: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: var(--s-5);
}
.grid-app__wrap:not(.has-selection) .grid-panel { visibility: hidden; opacity: 0; pointer-events: none; }
.grid-panel__label { margin-bottom: var(--s-2); }
.grid-panel__total {
  margin: 0 0 var(--s-3);
  font-size: clamp(2rem, 1.6rem + 1.6vw, 2.75rem);
  font-weight: 800;
  font-stretch: var(--stretch-display);
  line-height: 1;
  color: var(--gold-hi);
  font-variant-numeric: tabular-nums lining-nums;
}
.grid-panel__spec { margin-bottom: var(--s-3); }
.grid-panel__spec > div { padding: var(--s-2) 0; }
.grid-panel__info { margin: 0 0 var(--s-3); font-size: var(--fs-small); color: var(--mute); }
.grid-panel__hold {
  margin: 0 0 var(--s-3);
  padding: var(--s-2) var(--s-3);
  border-left: 2px solid var(--warn);
  background: var(--ink-0);
  font-size: var(--fs-small);
  color: var(--paper);
}
.grid-panel__actions { display: grid; gap: var(--s-2); }
.grid-panel__clear { justify-self: center; min-height: 44px; }
.grid-panel__note { margin: var(--s-3) 0 0; font-size: var(--fs-label); color: var(--mute); text-align: center; }
.grid-panel [aria-busy="true"] { cursor: progress; }

@media (min-width: 1024px) {
  .grid-panel {
    position: absolute;
    top: var(--s-4);
    right: var(--s-4);
    z-index: 7;
    width: 300px;
    transition: opacity var(--t-fast) ease-out;
  }
}
/* Below 1024px: bottom sheet */
@media (max-width: 1023px) {
  .grid-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 110;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--s-1) var(--s-4);
    padding: var(--s-3) var(--gutter) calc(var(--s-3) + env(safe-area-inset-bottom, 0px));
    border: 0;
    border-top: 2px solid var(--gold);
    border-radius: 0;
    transition: transform 200ms var(--ease-out), visibility 0s;
  }
  .grid-app__wrap:not(.has-selection) .grid-panel { transform: translateY(105%); transition: transform 200ms var(--ease-out), visibility 0s linear 200ms; }
  .grid-panel__label, .grid-panel__spec > .grid-panel__opt, .grid-panel__info, .grid-panel__note { display: none; }
  .grid-panel__summary, .grid-panel__actions { display: contents; }
  .grid-panel__total { grid-column: 1; grid-row: 1; margin: 0; font-size: 1.75rem; }
  .grid-panel__clear { grid-column: 2; grid-row: 1; padding: 0 var(--s-3); }
  .grid-panel__spec { grid-column: 1 / -1; grid-row: 2; display: flex; gap: var(--s-4); margin: 2px 0 0; }
  .grid-panel__spec > div { padding: 0; border: 0; gap: var(--s-2); }
  .grid-panel__spec dt, .grid-panel__spec dd { font-size: var(--fs-small); }
  .grid-panel__hold { grid-column: 1 / -1; grid-row: 3; margin: 0; padding: 4px 8px; font-size: var(--fs-label); }
  .grid-panel__actions .btn--block { grid-column: 1 / -1; grid-row: 4; margin-top: var(--s-2); }
  .has-selection .grid-app__bottom { padding-bottom: 160px; }
  .has-selection .grid-zoom { top: var(--s-2); bottom: auto; }
}

/* ------------------------------------------------------------------ 07b Full screen (Fullscreen API or CSS fallback) */
.grid-app__wrap:fullscreen { width: 100%; height: 100%; }
.grid-app__wrap.is-fullscreen {
  display: flex;
  flex-direction: column;
  background: var(--ink-0);
}
.grid-app__wrap.is-fs-fallback {
  position: fixed;
  inset: 0;
  z-index: 1000;
  height: 100vh;
  height: 100dvh;
}
html.grid-fs-lock, html.grid-fs-lock body { overflow: hidden; overscroll-behavior: none; }
.is-fullscreen .grid-app__top { flex: 0 0 auto; max-width: none; padding-block: var(--s-2); border-bottom: 1px solid var(--seam); }
.is-fullscreen .grid-app__head { margin: 0; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s-3); }
.is-fullscreen .grid-app__heading .label, .is-fullscreen .grid-app__title, .is-fullscreen .grid-hint, .is-fullscreen .grid-app__bottom { display: none; }
.is-fullscreen .grid-app__tier { font-size: var(--fs-label); }
.is-fullscreen .tier-switch__btn { min-height: 44px; padding-block: 2px; }
.is-fullscreen .tier-switch__code { display: none; }
.is-fullscreen .grid-app__stage { flex: 1 1 auto; min-height: 0; }
.is-fullscreen .grid-viewport { height: 100%; border: 0; }
@media (max-width: 639px) {
  .is-fullscreen .grid-app__head { grid-template-columns: 1fr; gap: var(--s-1); }
}

/* ------------------------------------------------------------------ 08 Dialog (holding squares on another grid) */
.grid-dialog {
  width: min(440px, calc(100vw - 2 * var(--gutter)));
  padding: var(--s-6);
  border: 1px solid var(--seam-2);
  border-top: 2px solid var(--gold);
  border-radius: var(--radius);
  background: var(--ink-1);
  color: var(--paper);
}
.grid-dialog::backdrop { background: rgba(11, 10, 8, 0.8); }
.grid-dialog__title { font-size: var(--fs-h3); }
.grid-dialog p { color: var(--paper); }
.grid-dialog__actions { display: grid; gap: var(--s-2); margin-top: var(--s-5); }
.grid-dialog__actions .btn--ghost { justify-self: center; min-height: 44px; }

/* ------------------------------------------------------------------ 09 How it works (cards; .swipe in site.css lays them out) */
.steps { margin: 0; }
.steps__item {
  position: relative;
  padding: var(--s-6);
  background: var(--ink-1);
  border: 1px solid var(--seam);
}
.steps__item .tile-icon { margin-bottom: var(--s-5); }
.steps__code { display: block; margin-bottom: var(--s-2); }
.steps__title { margin-bottom: var(--s-3); font-size: var(--fs-h3); }
.steps__item p:last-child { color: var(--mute); font-size: var(--fs-small); line-height: 1.55; }
.how .steps__item:last-child { border-top: 2px solid var(--gold); }
.how .steps__item:last-child .steps__code { color: var(--gold-hi); }
.how .steps.swipe .steps__item:first-child:not(:last-child) { border-top-color: var(--seam-2); }
/* Fallback layout if the shared .swipe component is not loaded */
.steps:not(.swipe) { display: grid; gap: var(--s-4); }
@media (min-width: 960px) {
  .steps:not(.swipe) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ------------------------------------------------------------------ 10 Price table */
.compare th[scope="row"] a { color: var(--paper); font-weight: 700; text-decoration: none; }
.compare th[scope="row"] a:hover { color: var(--gold-hi); text-decoration: underline; }
.compare td, .compare th { white-space: nowrap; }
.compare td.is-num { color: var(--paper); }
.compare tbody tr.is-current th, .compare tbody tr.is-current td { background: var(--ink-2); }
.compare tbody tr.is-current th { box-shadow: inset 2px 0 0 var(--gold); }
.compare tbody tr.is-current a { color: var(--gold-hi); }
.compare__note { margin-top: var(--s-4); font-size: var(--fs-small); }

/* ------------------------------------------------------------------ 11 CTA band */
.cta-band {
  padding-block: clamp(56px, 8vw, 112px);
  border-top: 1px solid var(--seam);
  background-color: var(--ink-1);
  background-image:
    linear-gradient(var(--seam) 1px, transparent 1px),
    linear-gradient(90deg, var(--seam) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: right -1px top -1px;
  position: relative;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--ink-1) 40%, rgba(19, 17, 13, 0.78));
  pointer-events: none;
}
.cta-band__inner { position: relative; display: grid; gap: var(--s-8); align-items: end; }
.cta-band__title { font-size: var(--fs-h1); max-width: 14ch; margin-bottom: var(--s-3); }
.cta-band__text { color: var(--mute); margin: 0; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }
@media (min-width: 960px) {
  .cta-band__inner { grid-template-columns: minmax(0, 1fr) auto; }
}

/* ------------------------------------------------------------------ 12 Motion */
@media (prefers-reduced-motion: reduce) {
  .grid-loading__icon i { animation: none; }
  .grid-loading__icon i:nth-child(odd) { background: var(--gold); }
}

/* ------------------------------------------------------------------ 13 Facade VIP overlays (links over the banner canvas) */
.hero__facade { overflow: hidden; }
.facade__links { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; pointer-events: none; }
.facade__links li + li { margin-top: 0; }
.facade__vip, .facade__slot { position: absolute; display: block; pointer-events: auto; }
.facade__vip { transition: filter var(--t-fast) ease-out; }
.facade__vip:hover, .facade__vip:focus-visible { filter: brightness(1.12); }
.facade__vip:focus-visible, .facade__slot:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
.facade__tip {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  max-width: 220px;
  padding: 4px 8px;
  background: var(--ink-0);
  border: 1px solid var(--gold-lo);
  color: var(--gold-hi);
  font-size: var(--fs-label);
  font-weight: 650;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity var(--t-fast) ease-out, transform var(--t-fast) ease-out;
  pointer-events: none;
}
.facade__vip--up .facade__tip { top: auto; bottom: calc(100% + 6px); }
.facade__vip:hover .facade__tip, .facade__vip:focus-visible .facade__tip { opacity: 1; transform: none; }
.facade__slot {
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 4px 10px;
  border: 1px dashed var(--gold-lo);
  color: var(--gold);
  text-decoration: none;
  line-height: 1.2;
  overflow: hidden;
}
.facade__slot:hover { border-style: solid; border-color: var(--gold); color: var(--gold-hi); background: rgba(193, 165, 97, 0.06); }
.facade__slot-title { font-size: 0.875rem; font-weight: 800; font-stretch: var(--stretch-display); letter-spacing: 0.04em; text-transform: uppercase; }
.facade__slot-text { font-size: 0.6875rem; color: var(--mute); }
.tier-hero__perk { max-width: 60ch; margin: var(--s-6) 0 0; }
.how__story { margin-top: var(--s-6); font-size: var(--fs-small); max-width: 68ch; }
.hero__actions .btn--secondary:not(:hover):not(:active) { --btn-bg: rgba(11, 10, 8, 0.82); } /* ghost plate stays readable on the lit wall */

/* ------------------------------------------------------------------ 14 Pan hint + order limit */
.grid-pan-hint {
  position: absolute;
  bottom: var(--s-2);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  z-index: 4;
  animation: grid-pan-hint-out 400ms ease-out 5s forwards; /* shown briefly, then gets out of the artwork's way */
  display: none;
  margin: 0;
  padding: 4px 8px;
  background: rgba(11, 10, 8, 0.9);
  border: 1px solid var(--seam-2);
  color: var(--paper);
  font-size: var(--fs-label);
  font-weight: 650;
  font-stretch: var(--stretch-label);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
}
.can-pan:not(.is-fullscreen) .grid-pan-hint { display: block; }
.is-touch .grid-pan-hint { display: none !important; }
@keyframes grid-pan-hint-out { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .grid-pan-hint { animation-duration: 1ms; } }
.is-over-limit .grid-panel__info { color: var(--err); }
.is-over-limit .grid-panel__total { color: var(--mute); }
@media (max-width: 1023px) {
  .is-over-limit .grid-panel__info { display: block; grid-column: 1 / -1; grid-row: 3; margin: 0; font-size: var(--fs-label); }
}

/* ------------------------------------------------------------------ 15 Notice above the grid (?error=…) */
.grid-notice { display: flex; align-items: center; gap: var(--s-3) var(--s-4); margin: 0 0 var(--s-4); }
.grid-notice__text { flex: 1 1 auto; margin: 0; }
.grid-notice:focus { outline: 2px solid var(--gold-hi); outline-offset: 2px; }

/* ------------------------------------------------------------------ 16 Extend mode + earn free squares */
@media (max-width: 1023px) {
  .is-extend .grid-panel__label { display: block; grid-column: 1 / -1; grid-row: 3; margin: 0; }
}
.hero__earn { margin: var(--s-4) 0 0; font-size: var(--fs-small); text-shadow: 0 0 24px rgba(11, 10, 8, 0.8), 0 1px 2px rgba(11, 10, 8, 0.9); }
.tier-hero__earn { margin: var(--s-5) 0 0; font-size: var(--fs-small); }

.earn-band {
  padding-block: clamp(48px, 7vw, 96px);
  border-top: 1px solid var(--seam);
  background: var(--ink-1);
}
.earn-band__inner { display: grid; gap: var(--s-8); align-items: center; }
.earn-band__title { margin-bottom: var(--s-3); max-width: 18ch; }
.earn-band__text { margin: 0; color: var(--mute); max-width: 44ch; }
.earn-band__cta { justify-self: start; }
/* Tile grammar: three single credits falling in line next to the 2 × 2 block they become */
.earn-band__wall { display: flex; align-items: flex-end; gap: 10px; }
.earn-band__credit { width: 22px; height: 22px; background: var(--gold-lo); }
.earn-band__credit:nth-child(2) { background: var(--gold); transform: translateY(-14px); }
.earn-band__credit:nth-child(3) { background: var(--gold); transform: translateY(-28px); }
.earn-band__block { display: grid; grid-template-columns: repeat(2, 22px); gap: 2px; padding: 3px; border: 1px solid var(--gold-hi); }
.earn-band__block i { width: 22px; height: 22px; background: var(--gold-hi); }
@media (min-width: 960px) {
  .earn-band__inner { grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s-12); }
  .earn-band__cta { justify-self: end; }
}

/* ------------------------------------------------------------------ 17 Share (button + panel: popover / bottom sheet) */
.grid-zoom__btn--share { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--fs-label); font-weight: 700; font-stretch: var(--stretch-label); letter-spacing: var(--track-label); text-transform: uppercase; }
@media (max-width: 479px) {
  .grid-zoom__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .grid-zoom__btn--fs, .grid-zoom__btn--share { padding: 0 var(--s-3); }
}
.tier-hero__share .tile-icon { margin-right: var(--s-1); }
.tier-hero__share .tile-icon i { background: var(--seam-2); }
.tier-hero__share .tile-icon i.is-lit { background: var(--gold); }

.share-panel {
  position: fixed;
  z-index: 1100;
  right: var(--s-4);
  bottom: var(--s-4);
  width: min(380px, calc(100vw - 2 * var(--s-4)));
  padding: var(--s-5);
  background: var(--ink-1);
  border: 1px solid var(--seam-2);
  border-top: 2px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}
.share-panel__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s-3); }
.share-panel__title { margin: 0; }
.share-panel__close { width: 44px; height: 44px; margin: -10px -10px -10px 0; border: 0; background: none; color: var(--paper); font-size: 1.75rem; line-height: 1; cursor: pointer; }
.share-panel__close:hover { color: var(--gold-hi); }
.share-panel__ref { margin: 0 0 var(--s-4); padding: var(--s-2) var(--s-3); border-left: 2px solid var(--gold); background: var(--ink-0); font-size: var(--fs-small); line-height: 1.45; }
.share-panel__choice { display: flex; gap: var(--s-2); margin-bottom: var(--s-3); }
.share-panel__choice .chip { min-height: 32px; background: none; cursor: pointer; }
.share-panel__copy { display: flex; gap: var(--s-2); }
.share-panel__url { flex: 1 1 auto; min-width: 0; min-height: 40px; font-size: var(--fs-small) !important; }
.share-panel__status { min-height: 1.4em; margin: var(--s-2) 0; font-size: var(--fs-small); color: var(--ok); }
.share-panel__links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--seam); border: 1px solid var(--seam); }
.share-panel__links li + li { margin-top: 0; }
.share-panel__links a { display: flex; align-items: center; justify-content: center; min-height: 44px; background: var(--ink-1); color: var(--paper); font-size: var(--fs-small); font-weight: 600; text-decoration: none; }
.share-panel__links a:hover, .share-panel__links a:focus-visible { background: var(--ink-2); color: var(--gold-hi); }
@media (max-width: 639px) {
  .share-panel { left: 0; right: 0; bottom: 0; width: auto; border-radius: 0; border-inline: 0; border-bottom: 0; padding-bottom: calc(var(--s-5) + env(safe-area-inset-bottom, 0px)); }
}
