/*
 * Elie Barnes Discovery Deck — homepage integration.
 *
 * The High Priestess world is the complete static baseline. High Priestess and
 * Star are the only enhanced destinations; slots 03–06 remain truthfully
 * disabled. GSAP moves one master-image card window into the active world.
 */

.discovery-deck {
  --deck-paper: #d9c39a;
  --deck-paper-rgb: 217, 195, 154;
  --deck-paper-light: #cec09c;
  --deck-ink: #2a241d;
  --deck-atmosphere: #718b85;
  --deck-atmosphere-deep: #475e61;
  --deck-signal: #8d3729;
  --deck-structural-dark: #1b2023;
  --deck-action-rest: var(--terracotta);
  --deck-action-leading: var(--red);
  --deck-action-interactive: color-mix(in srgb, var(--terracotta) 82%, var(--red) 18%);
  --deck-action-trailing: color-mix(in srgb, var(--terracotta) 96%, var(--paper-pale) 4%);
  --deck-action-active: var(--red);
  --deck-action-ink: var(--paper-pale);
  --deck-browse-arrow: var(--terracotta);
  --deck-browse-arrow-active: color-mix(in srgb, var(--terracotta) 78%, var(--red));
  --deck-copy-width: min(38vw, 38rem);
  --deck-title-max: 7.8ch;
  --deck-mobile-title-size: clamp(3.15rem, 16vw, 4.6rem);
  position: relative;
  z-index: 2;
  height: clamp(45rem, 95svh, 58.5rem);
  min-height: 45rem;
  overflow: hidden;
  scroll-margin-top: 5.5rem;
  background-color: var(--paper);
  color: var(--deck-ink);
  isolation: isolate;
}

.discovery-deck[data-discovery-transitioning="true"] .discovery-deck__world {
  z-index: 6;
}

.discovery-deck[data-discovery-transitioning="true"] .discovery-deck__content {
  z-index: 7;
}

.discovery-deck[data-discovery-transitioning="true"] .discovery-deck__navigation {
  z-index: 8;
}

.discovery-deck::before,
.discovery-deck::after {
  position: absolute;
  inset-inline: 0;
  z-index: 2;
  content: "";
  pointer-events: none;
}

.discovery-deck::before {
  inset-block-start: 0;
  height: clamp(3rem, 7vw, 6rem);
  background:
    linear-gradient(180deg, var(--paper) 0%, rgba(243, 236, 223, .66) .65rem, rgba(243, 236, 223, .2) 1.45rem, transparent 2.35rem),
    radial-gradient(ellipse 48% 95% at 12% 0%, rgba(243, 236, 223, .52), transparent 100%),
    radial-gradient(ellipse 36% 76% at 88% 0%, rgba(243, 236, 223, .34), transparent 100%);
}

.discovery-deck::after {
  inset-block-end: 0;
  height: clamp(1.25rem, 3vw, 2.5rem);
  background: linear-gradient(0deg, rgba(231, 218, 199, .42), transparent);
}

.discovery-deck__world,
.discovery-deck__world-image,
.discovery-deck__world-wash {
  position: absolute;
  inset: 0;
}

.discovery-deck__world {
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 248, 222, .2), transparent 30%),
    var(--deck-paper);
  -webkit-mask: url("../svg/discovery-deck-top-handoff-mask.svg") 0 0 / 100% 100% no-repeat;
  mask: url("../svg/discovery-deck-top-handoff-mask.svg") 0 0 / 100% 100% no-repeat;
  pointer-events: none;
}

.discovery-deck__world-image {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
}

.discovery-deck__world-wash {
  background:
    linear-gradient(90deg, rgba(var(--deck-paper-rgb), .34) 0%, rgba(var(--deck-paper-rgb), .09) 35%, transparent 51%),
    linear-gradient(180deg, rgba(var(--deck-paper-rgb), .05), transparent 62%, rgba(35, 29, 26, .07));
}

.discovery-deck__content {
  position: relative;
  z-index: 3;
  isolation: isolate;
  width: var(--deck-copy-width);
  padding: clamp(6.25rem, 12vh, 8.75rem) 0 7rem clamp(1.5rem, 5.5vw, 6.5rem);
}

.discovery-deck__content > * {
  position: relative;
  z-index: 1;
}

.discovery-deck__editorial-zone {
  position: relative;
  z-index: 1;
}

.discovery-deck__editorial-zone > * {
  position: relative;
  z-index: 1;
}

.discovery-deck__lower-copy {
  --deck-reading-field-opacity: 0;
  position: relative;
  z-index: 1;
  isolation: isolate;
  width: 100%;
}

.discovery-deck__lower-copy > * {
  position: relative;
  z-index: 1;
}

.discovery-deck__lower-copy::before {
  position: absolute;
  inset: -1.05rem 0 -1.2rem -1.45rem;
  z-index: 0;
  content: "";
  pointer-events: none;
  opacity: var(--deck-reading-field-opacity);
}

.discovery-deck__content[data-discovery-reading-field="parchment"] .discovery-deck__lower-copy {
  width: min(100%, 34rem);
}

.discovery-deck__content[data-discovery-reading-field="parchment"] .discovery-deck__lower-copy::before {
  background: radial-gradient(
    ellipse 108% 96% at 45% 49%,
    rgba(var(--deck-paper-rgb), .86) 0%,
    rgba(var(--deck-paper-rgb), .8) 62%,
    rgba(var(--deck-paper-rgb), .54) 82%,
    rgba(var(--deck-paper-rgb), 0) 100%
  );
  filter: blur(.18rem);
}

.discovery-deck__content[data-discovery-reading-field-extent="editorial-band"] .discovery-deck__editorial-zone {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.discovery-deck__content[data-discovery-reading-field-extent="editorial-band"] .discovery-deck__lower-copy {
  grid-column: 1;
  grid-row: 1;
}

.discovery-deck__content[data-discovery-reading-field-extent="editorial-band"] .discovery-deck__lower-copy::before {
  inset: clamp(1.85rem, 2.25vw, 2.55rem) -1.5rem -3rem -2.5rem;
  background: linear-gradient(
    90deg,
    rgba(var(--deck-paper-rgb), 0) 0%,
    rgba(var(--deck-paper-rgb), .64) 5%,
    rgba(var(--deck-paper-rgb), .66) 88%,
    rgba(var(--deck-paper-rgb), 0) 100%
  );
  filter: blur(.12rem);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
}

.discovery-deck__content[data-discovery-reading-field-extent="editorial-band"] .discovery-deck__description {
  margin-block-start: clamp(1.75rem, 2.2vw, 2.25rem);
}

.discovery-deck__content[data-discovery-reading-field-extent="editorial-band"] .discovery-deck__description,
.discovery-deck__content[data-discovery-reading-field-extent="editorial-band"] .discovery-deck__cta {
  margin-inline-start: clamp(2rem, 2.2vw, 2.25rem);
}

.discovery-deck__content[data-discovery-reading-field-extent="editorial-band"] .discovery-deck__title-mask {
  overflow: visible;
}

/* Community uses the existing editorial band, extended upward to group its
   eyebrow and headline with the protected copy and action area. */
.discovery-deck__content[data-discovery-composition="center-deck-reserved"][data-discovery-reading-field-extent="editorial-band"] .discovery-deck__lower-copy::before {
  inset-block-start: clamp(-13rem, -15vw, -9rem);
  background:
    radial-gradient(
      ellipse 130% 105% at 50% 100%,
      rgba(var(--deck-paper-rgb), .28) 0%,
      rgba(var(--deck-paper-rgb), .25) 38%,
      rgba(var(--deck-paper-rgb), .18) 62%,
      rgba(var(--deck-paper-rgb), .08) 78%,
      rgba(var(--deck-paper-rgb), 0) 100%
    ),
    linear-gradient(
      90deg,
      rgba(var(--deck-paper-rgb), 0) 0%,
      rgba(var(--deck-paper-rgb), .64) 5%,
      rgba(var(--deck-paper-rgb), .66) 88%,
      rgba(var(--deck-paper-rgb), 0) 100%
    );
}

/* The extended Community field originates in lower-copy, which follows the
   eyebrow/title in source order. Keep those title-mask siblings above it. */
.discovery-deck__content[data-discovery-composition="center-deck-reserved"][data-discovery-reading-field-extent="editorial-band"] > .discovery-deck__category,
.discovery-deck__content[data-discovery-composition="center-deck-reserved"][data-discovery-reading-field-extent="editorial-band"] > .discovery-deck__title {
  z-index: 2;
}

.discovery-deck__content[data-discovery-copy-side="right"] {
  margin-inline-start: auto;
  padding-inline: 0 clamp(1.5rem, 5.5vw, 6.5rem);
}

.discovery-deck__category,
.discovery-deck__thought,
.discovery-deck__description,
.discovery-deck__active-meta,
.discovery-deck__development,
.discovery-deck__number,
.discovery-deck__archetype {
  margin: 0;
}

.discovery-deck__category {
  display: flex;
  color: var(--deck-ink);
  font-family: var(--font-interface);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .2em;
  opacity: .94;
  text-transform: uppercase;
  align-items: center;
  gap: .7rem;
}

.discovery-deck__mobile-number {
  display: none;
}

[data-discovery-description-mobile] {
  display: none;
}

.discovery-deck__category::before {
  width: 2.2rem;
  height: 2px;
  content: "";
  background: var(--deck-signal);
}

.discovery-deck__title {
  /* Headlines are the component's dominant editorial paint layer. */
  position: relative;
  z-index: 1000;
  isolation: isolate;
  overflow: visible;
  pointer-events: none;
  max-width: var(--deck-title-max);
  margin: clamp(1rem, 2vh, 1.6rem) 0 1.25rem;
  color: var(--deck-ink);
  font-family: var(--font-display);
  font-size: clamp(4rem, 6.7vw, 7.4rem);
  font-weight: 400;
  letter-spacing: -.055em;
  line-height: .82;
  text-transform: uppercase;
}

.discovery-deck__title-mask {
  position: relative;
  z-index: 1;
  display: block;
  overflow: visible;
  -webkit-clip-path: none;
  clip-path: none;
  /* Keep the existing geometry-neutral side-bearing allowance. */
  margin-inline: -.08em;
  padding-inline: .08em;
}

.discovery-deck__title-line {
  position: relative;
  z-index: 1;
  display: block;
  overflow: visible;
  -webkit-clip-path: none;
  clip-path: none;
}

.discovery-deck__thought {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1.7vw, 1.85rem);
  font-style: italic;
  line-height: 1.25;
}

.discovery-deck__description {
  max-width: 34rem;
  margin-block-start: 1.15rem;
  font-size: clamp(1.5rem, 1.7vw, 1.625rem);
  line-height: 1.45;
}

.discovery-deck[data-active-destination="patreon"] {
  --deck-copy-width: min(52vw, 52rem);
  --deck-title-max: 14ch;
}

.discovery-deck[data-active-destination="patreon"] .discovery-deck__content {
  width: min(52vw, 52rem);
}

.discovery-deck[data-active-destination="patreon"] .discovery-deck__title {
  max-width: 14ch;
}

/* The approved Star-world editorial treatment is a decorative desktop layer.
   It stays behind real content and lets the supplied alpha edge reveal the
   landscape rather than introducing an opaque panel or synthetic dissolve. */
@media (min-width: 64rem) and (orientation: landscape) {
  .discovery-deck[data-active-destination="patreon"] .discovery-deck__content::before {
    position: absolute;
    z-index: 0;
    inset: .25rem auto auto clamp(-9.25rem, -10.25vw, -6rem);
    width: clamp(60rem, 72vw, 68rem);
    aspect-ratio: 1536 / 1024;
    content: "";
    pointer-events: none;
    background: url("../img/tarot/patreon/patreon-copy-parchment.webp") left top / 100% auto no-repeat;
    filter: saturate(.55) contrast(.85) brightness(1.06);
    opacity: .94;
    transition: opacity 120ms ease-out;
  }

  .discovery-deck[data-patreon-parchment-exiting="true"] .discovery-deck__content::before {
    opacity: 0;
  }

  .discovery-deck[data-active-destination="patreon"] .discovery-deck__title {
    max-width: 13ch;
  }

  .discovery-deck[data-active-destination="patreon"] .discovery-deck__title-mask:nth-child(2) .discovery-deck__title-line {
    white-space: nowrap;
  }

  /* The Hermit keeps its world intact while the supplied alpha parchment
     groups the complete learning editorial field.  This lives on content
     rather than lower-copy so the eyebrow and headline share the same sheet;
     the global title foreground invariant remains above it at z-index: 1000. */
  .discovery-deck[data-active-destination="learning"] .discovery-deck__content::before {
    position: absolute;
    z-index: 0;
    inset: clamp(2.5rem, 3.05vw, 3rem) auto auto clamp(-4.75rem, -5.5vw, -3rem);
    width: clamp(31.25rem, 45.8vw, 41.25rem);
    aspect-ratio: 1086 / 1448;
    content: "";
    pointer-events: none;
    background: url("../img/tarot/learn/online-courses-parchment.webp") left top / 100% auto no-repeat;
    opacity: 1;
    transition: opacity 120ms ease-out;
  }

  .discovery-deck[data-learning-parchment-exiting="true"] .discovery-deck__content::before {
    opacity: 0;
  }

  /* Replace the former lower-copy radial readability field for Online
     Courses; no synthetic panel sits beneath the real parchment. */
  .discovery-deck[data-active-destination="learning"] .discovery-deck__lower-copy::before {
    display: none;
  }
}

@media (min-width: 48.0625rem) {
  .discovery-deck[data-active-destination="artifacts"] .discovery-deck__title {
    font-size: clamp(3.875rem, 6.35vw, 7rem);
  }
}

/* Compact desktop needs the Star figure sooner than the wide composition.
   This mask multiplies the supplied parchment alpha; browsers without mask
   support retain the approved asset's native distressed edge. */
@media (min-width: 64rem) and (max-width: 82rem) and (orientation: landscape) {
  @supports ((mask-image: linear-gradient(#000, transparent)) or (-webkit-mask-image: linear-gradient(#000, transparent))) {
    .discovery-deck[data-active-destination="patreon"] .discovery-deck__content::before {
      -webkit-mask-image: linear-gradient(90deg, #000 0 61%, rgba(0, 0, 0, .88) 66%, rgba(0, 0, 0, .42) 74%, transparent 84%);
      mask-image: linear-gradient(90deg, #000 0 61%, rgba(0, 0, 0, .88) 66%, rgba(0, 0, 0, .42) 74%, transparent 84%);
      -webkit-mask-repeat: no-repeat;
      mask-repeat: no-repeat;
      -webkit-mask-size: 100% 100%;
      mask-size: 100% 100%;
    }
  }
}

.amicus-action-button {
  --amicus-action-height: 52px;
  --amicus-action-panel: 52px;
  position: relative;
  isolation: isolate;
  display: inline-block;
  width: 16.5rem;
  max-width: 100%;
  height: var(--amicus-action-height);
  margin-block-start: 1.7rem;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(50, 45, 29, .26);
  border-radius: 6px;
  background: var(--deck-action-rest);
  box-shadow: 0 .4rem 1.2rem rgba(50, 45, 29, .16);
  color: var(--deck-action-ink);
  appearance: none;
  cursor: pointer;
  font-family: var(--font-interface);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  vertical-align: middle;
  transition: background-color 240ms ease-out, border-color 240ms ease-out, box-shadow 240ms ease-out;
}

.amicus-action-button__leading,
.amicus-action-button__label,
.amicus-action-button__trailing {
  position: absolute;
  inset-block: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.amicus-action-button__leading,
.amicus-action-button__trailing {
  width: var(--amicus-action-panel);
  transition: transform 250ms cubic-bezier(.22, .75, .25, 1);
}

.amicus-action-button__leading {
  inset-inline-start: 0;
  border-inline-end: 1px solid rgba(50, 45, 29, .18);
  background: var(--deck-action-leading);
  transform: translateX(0);
}

.amicus-action-button__trailing {
  inset-inline-end: 0;
  border-inline-start: 1px solid rgba(50, 45, 29, .14);
  background: var(--deck-action-trailing);
  transform: translateX(100%);
}

.amicus-action-button__label {
  inset-inline: var(--amicus-action-panel) 0;
  white-space: nowrap;
  transform: translateX(0);
  transition: transform 250ms cubic-bezier(.22, .75, .25, 1);
}

.amicus-action-button--text-only .amicus-action-button__label {
  inset-inline-start: 0;
}

.amicus-action-button__leading svg,
.amicus-action-button__trailing svg {
  width: 1.4rem;
  height: 1.4rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.discovery-deck__cta-icon,
.discovery-deck__cta-direction--external {
  display: none;
}

.discovery-deck__cta-direction--forward,
.discovery-deck[data-active-destination="readings"] .discovery-deck__cta-icon--readings,
.discovery-deck[data-active-destination="patreon"] .discovery-deck__cta-icon--patreon,
.discovery-deck[data-active-destination="learning"] .discovery-deck__cta-icon--learning,
.discovery-deck[data-active-destination="community"] .discovery-deck__cta-icon--community,
.discovery-deck[data-active-destination="alexandrian"] .discovery-deck__cta-icon--alexandrian,
.discovery-deck[data-active-destination="events"] .discovery-deck__cta-icon--events,
.discovery-deck[data-active-destination="artifacts"] .discovery-deck__cta-icon--artifacts {
  display: block;
}

.discovery-deck[data-active-destination="alexandrian"] .discovery-deck__cta-direction--forward {
  display: none;
}

.discovery-deck[data-active-destination="alexandrian"] .discovery-deck__cta-direction--external {
  display: block;
}

.amicus-action-button:hover,
.amicus-action-button:focus-visible {
  border-color: rgba(50, 45, 29, .36);
  background: var(--deck-action-interactive);
  box-shadow: 0 .5rem 1.35rem rgba(50, 45, 29, .2);
  color: var(--deck-action-ink);
}

.amicus-action-button--light-surface:focus-visible {
  outline: 3px solid var(--deck-ink);
  outline-offset: 5px;
}

.amicus-action-button:hover .amicus-action-button__leading,
.amicus-action-button:focus-visible .amicus-action-button__leading {
  transform: translateX(-100%);
}

.amicus-action-button:hover .amicus-action-button__label,
.amicus-action-button:focus-visible .amicus-action-button__label {
  transform: translateX(calc(-1 * var(--amicus-action-panel)));
}

.amicus-action-button:hover .amicus-action-button__trailing,
.amicus-action-button:focus-visible .amicus-action-button__trailing {
  transform: translateX(0);
}

.amicus-action-button:active {
  border-color: rgba(50, 45, 29, .4);
  background: var(--deck-action-active);
  box-shadow: 0 .2rem .6rem rgba(50, 45, 29, .18);
  color: var(--deck-action-ink);
}

.discovery-deck__action-row {
  anchor-name: --discovery-deck-action-row;
  margin: 0;
}

.discovery-deck__browse {
  position: absolute;
  z-index: 5;
  inset: auto auto clamp(5.5rem, 12vh, 6rem) clamp(1.5rem, 5.5vw, 6.5rem);
  display: flex;
  width: max-content;
  margin: 0;
  gap: .8rem;
}

.discovery-deck__browse button {
  display: grid;
  width: 3.85rem;
  height: 3.85rem;
  padding: 0;
  border: 1.5px solid var(--deck-ink);
  border-radius: 50%;
  background: rgba(var(--deck-paper-rgb), .92);
  box-shadow: inset 0 0 0 1px rgba(255, 248, 222, .44), 0 .18rem .5rem rgba(42, 36, 29, .12);
  color: var(--deck-ink);
  font-family: var(--font-interface);
  font-size: 1.3rem;
  line-height: 1;
  transition: border-color 180ms ease, color 180ms ease, background-color 180ms ease, transform 180ms ease;
  place-items: center;
}

.discovery-deck__browse button[data-discovery-step="1"] {
  border-color: color-mix(in srgb, var(--deck-signal) 68%, var(--deck-ink));
  background: linear-gradient(135deg, rgba(var(--deck-paper-rgb), .99), rgba(var(--deck-paper-rgb), .9));
  box-shadow: inset 0 0 0 1px rgba(255, 248, 222, .56), 0 .24rem .68rem rgba(42, 36, 29, .15), 0 0 0 1px color-mix(in srgb, var(--deck-signal) 16%, transparent);
  color: color-mix(in srgb, var(--deck-ink) 70%, var(--deck-signal));
  font-size: 1.38rem;
}

.discovery-deck__browse-icon {
  display: none;
}

/* Keep card navigation independent from the editorial copy column. */
@media (min-width: 48.0625rem) and (orientation: landscape) {
  .discovery-deck__browse {
    inset: auto auto clamp(2rem, 3.5vw, 3rem) 50%;
    gap: clamp(.5rem, .8vw, .75rem);
    transform: translateX(-50%);
  }

  .discovery-deck__browse button,
  .discovery-deck__browse button[data-discovery-step="1"] {
    width: 3.4rem;
    height: 3.4rem;
    border-color: color-mix(in srgb, var(--deck-browse-arrow) 58%, var(--deck-ink));
    color: var(--deck-browse-arrow);
    font-size: 1.45rem;
    font-weight: 700;
  }

  .discovery-deck__browse button:not(:disabled) {
    opacity: 1;
  }

}

.discovery-deck__browse button[data-discovery-step="1"].is-inviting:not(:disabled) {
  animation: discovery-deck-forward-invitation 1.5s ease-out both;
}

@keyframes discovery-deck-forward-invitation {
  0%, 14%, 34%, 54%, 74%, 100% { transform: translateX(0); }
  24%, 44%, 64% { transform: translateX(5px); }
}

.discovery-deck__browse button:not(:disabled):hover {
  border-color: var(--deck-signal);
  background: rgba(var(--deck-paper-rgb), .98);
  color: var(--deck-signal);
  transform: translateY(-2px);
}

.discovery-deck__browse button:focus-visible {
  border-color: var(--deck-signal);
  outline: 3px solid var(--deck-signal);
  outline-offset: 3px;
}

.discovery-deck__browse button:disabled {
  cursor: default;
  opacity: .68;
}

@media (min-width: 48.0625rem) and (orientation: landscape) {
  .discovery-deck__browse button:not(:disabled):hover,
  .discovery-deck__browse button:focus-visible {
    border-color: var(--deck-browse-arrow-active);
    color: var(--deck-browse-arrow-active);
    outline-color: var(--deck-browse-arrow-active);
  }

  .discovery-deck__browse button:not(:disabled):active {
    color: var(--deck-browse-arrow-active);
  }
}

@media (prefers-reduced-motion: reduce) {
  .discovery-deck__browse button[data-discovery-step="1"].is-inviting:not(:disabled) {
    animation: none;
  }
}

.discovery-deck__navigation {
  position: absolute;
  z-index: 4;
  inset: auto clamp(1.5rem, 4vw, 4.5rem) clamp(2rem, 4.2vh, 3.2rem) auto;
  display: grid;
  width: min(30rem, 38vw);
  color: var(--deck-ink);
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: .55rem 1.25rem;
  pointer-events: none;
}

.discovery-deck__hand {
  position: relative;
  grid-column: 1 / -1;
  justify-self: end;
  width: 16rem;
  height: 13rem;
  margin-block-end: .3rem;
  pointer-events: none;
}

.discovery-deck__queue-anchor {
  position: absolute;
  inset: auto auto 0 0;
  width: 8.35rem;
  aspect-ratio: 1201.9138755980862 / 1800;
  pointer-events: none;
  visibility: hidden;
}

.discovery-deck__card {
  --slot: 0;
  position: absolute;
  inset: auto auto 0 0;
  width: 8.35rem;
  aspect-ratio: 1201.9138755980862 / 1800;
  padding: .84rem .72rem;
  overflow: hidden;
  border: 1px solid rgba(42, 36, 29, .42);
  border-radius: 2px;
  background:
    linear-gradient(140deg, rgba(255, 248, 222, .18), transparent 50%),
    repeating-linear-gradient(135deg, rgba(42, 36, 29, .035) 0 1px, transparent 1px 7px),
    #cbb88f;
  box-shadow: 0 .72rem 1.35rem rgba(42, 36, 29, .1);
  color: rgba(42, 36, 29, .78);
  opacity: 1;
  text-align: left;
  transform: translate(calc(var(--slot) * 1.9rem), calc(var(--slot) * .22rem)) rotate(calc(var(--slot) * .38deg));
  transform-origin: left bottom;
  z-index: calc(12 - var(--slot));
}

.discovery-deck__card:disabled {
  color: rgba(42, 36, 29, .78);
  opacity: 1;
}

.discovery-deck__card--destination {
  z-index: calc(20 - var(--slot));
  padding: 0;
  border-color: rgba(42, 36, 29, .7);
  cursor: pointer;
  background: var(--card-paper, var(--deck-paper));
  color: var(--card-ink, var(--deck-ink));
  pointer-events: auto;
  touch-action: manipulation;
}

.discovery-deck__card--destination:not(:disabled):hover {
  box-shadow: 0 .9rem 1.65rem rgba(42, 36, 29, .18);
  transform: translate(calc(var(--slot) * 1.9rem), calc(var(--slot) * .22rem - 3px)) rotate(calc(var(--slot) * .38deg));
}

.discovery-deck__card--destination:focus-visible {
  outline: 3px solid var(--card-signal, var(--deck-signal));
  outline-offset: 4px;
}

.discovery-deck__card--destination.is-transition-card {
  margin: 0;
  transform: none;
  transform-origin: left top;
  pointer-events: none;
  will-change: transform, width, height, box-shadow, border-radius;
}

.discovery-deck__card-image,
.discovery-deck__card-wash,
.discovery-deck__card-edge {
  position: absolute;
  inset: 0 auto auto 0;
}

.discovery-deck__card-image {
  z-index: 0;
  display: block;
  max-width: none;
  user-select: none;
  -webkit-user-drag: none;
}

.discovery-deck__card-image--queue {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.discovery-deck__card-wash {
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
}

.discovery-deck__card-edge {
  z-index: 3;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(236, 218, 178, .7);
  box-shadow: inset 0 0 0 1px rgba(42, 36, 29, .48);
  pointer-events: none;
}

.discovery-deck__card-label {
  position: absolute;
  inset: auto .45rem .42rem;
  z-index: 4;
  display: grid;
  padding: .75rem .55rem .45rem;
  background: linear-gradient(180deg, transparent, rgba(217, 195, 154, .92) 42%);
  color: var(--card-ink, var(--deck-ink));
  font-family: var(--font-interface);
  line-height: 1.25;
  text-align: left;
  text-transform: uppercase;
}

.discovery-deck__card-label strong {
  font-size: .6rem;
  letter-spacing: .11em;
}

.discovery-deck__card-label small {
  margin-block-start: .2rem;
  font-size: .43rem;
  font-weight: 700;
  letter-spacing: .08em;
}

.discovery-deck__card-label b {
  position: absolute;
  inset: auto .2rem .45rem auto;
  color: var(--card-signal, var(--deck-signal));
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 400;
}

.discovery-deck__card-number,
.discovery-deck__card-title,
.discovery-deck__card-archetype,
.discovery-deck__card-status {
  display: block;
  font-family: var(--font-interface);
  text-transform: uppercase;
}

.discovery-deck__card--placeholder:not(:first-of-type) .discovery-deck__card-title,
.discovery-deck__card--placeholder:not(:first-of-type) .discovery-deck__card-archetype,
.discovery-deck__card--placeholder:not(:first-of-type) .discovery-deck__card-status,
.discovery-deck__card--placeholder:not(:first-of-type) .discovery-deck__card-number,
.has-discovery-deck .discovery-deck__card--placeholder .discovery-deck__card-title,
.has-discovery-deck .discovery-deck__card--placeholder .discovery-deck__card-archetype,
.has-discovery-deck .discovery-deck__card--placeholder .discovery-deck__card-status,
.has-discovery-deck .discovery-deck__card--placeholder .discovery-deck__card-number {
  visibility: hidden;
}

.discovery-deck__card-number {
  color: var(--deck-signal);
  font-family: var(--font-interface);
  font-size: 1.25rem;
}

.discovery-deck__card-title {
  margin-block-start: 3.45rem;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .11em;
  line-height: 1.35;
}

.discovery-deck__card-archetype {
  margin-block-start: .34rem;
  font-size: .51rem;
  letter-spacing: .08em;
  line-height: 1.45;
}

.discovery-deck__card-status {
  position: absolute;
  inset: auto .72rem .68rem;
  font-size: .44rem;
  font-weight: 700;
  letter-spacing: .1em;
  line-height: 1.35;
}

.discovery-deck__development {
  grid-column: 1 / -1;
  color: rgba(42, 36, 29, .66);
  font-family: var(--font-interface);
  font-size: .5rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-align: right;
  text-transform: uppercase;
}

.discovery-deck__number {
  grid-column: 1 / -1;
  justify-self: end;
  font-family: var(--font-body);
  letter-spacing: .04em;
}

.discovery-deck__number strong {
  color: var(--deck-signal);
  font-size: 1.55rem;
  font-weight: 400;
}

.discovery-deck__number span {
  margin-inline-start: .45rem;
  font-size: .85rem;
}

.discovery-deck__archetype {
  grid-column: 1 / -1;
  color: rgba(42, 36, 29, .78);
  font-family: var(--font-interface);
  font-size: .56rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-align: right;
  text-transform: uppercase;
}

.discovery-deck__progress {
  grid-column: 1 / -1;
  height: 1px;
  overflow: hidden;
  background: rgba(42, 36, 29, .28);
}

.discovery-deck__progress span {
  display: block;
  width: calc(100% / 4);
  height: 2px;
  background: var(--deck-signal);
}

@media (max-width: 82rem) and (orientation: landscape) {
  .discovery-deck__content {
    width: min(43vw, 34rem);
    padding-inline-start: clamp(1.5rem, 4vw, 4rem);
  }

  .discovery-deck[data-active-destination="patreon"] .discovery-deck__content {
    width: min(50vw, 39rem);
  }

  .discovery-deck[data-active-destination="patreon"] .discovery-deck__title {
    max-width: 14ch;
  }

  .discovery-deck__title {
    font-size: clamp(3.5rem, 6.4vw, 5.7rem);
  }

  .discovery-deck__navigation {
    width: min(27rem, 36vw);
  }

  .discovery-deck__hand {
    transform: scale(.84);
    transform-origin: right bottom;
  }

  .discovery-deck__browse {
    inset-inline-start: 50%;
  }
}

@media (min-width: 82.0625rem) and (orientation: landscape) {
  /* Position both controls in the stage; a nested positioned wrapper prevents
     Next from resolving an anchor in the sibling editorial column. */
  .discovery-deck__browse {
    --discovery-deck-next-gap: clamp(1.25rem, 2vw, 2rem);
    position: static;
    inset: auto;
    width: auto;
    transform: none;
    pointer-events: none;
  }

  .discovery-deck__browse button {
    position: absolute;
    z-index: 5;
    top: 50%;
    translate: 0 -50%;
    pointer-events: auto;
  }

  .discovery-deck__browse button[data-discovery-step="-1"] {
    left: clamp(1rem, 1.25vw, 1.5rem);
    top: calc(50% + 1rem);
  }

  .discovery-deck__browse button[data-discovery-step="1"] {
    left: calc(var(--deck-copy-width) + var(--discovery-deck-next-gap));
  }

  @supports (position-anchor: --discovery-deck-body) and (left: anchor(right)) {
    .discovery-deck__description {
      anchor-name: --discovery-deck-body;
    }

    .discovery-deck__browse button[data-discovery-step="-1"] {
      position-anchor: --discovery-deck-body;
      top: calc(anchor(center) + 1rem);
    }

    .discovery-deck__browse button[data-discovery-step="1"] {
      position-anchor: --discovery-deck-body;
      top: anchor(center);
      left: calc(anchor(right) + var(--discovery-deck-next-gap));
    }
  }

  .discovery-deck[data-discovery-transitioning="true"]
    .discovery-deck__browse button[data-discovery-step="1"] {
    visibility: hidden;
  }

  .discovery-deck__browse button,
  .discovery-deck__browse button[data-discovery-step="1"] {
    width: 3.75rem;
    height: 3.75rem;
    border-color: var(--charcoal);
    background: var(--paper-deep);
    box-shadow: 0 .12rem .35rem rgba(39, 36, 31, .14);
    color: var(--charcoal);
  }

  .discovery-deck__browse-glyph {
    display: none;
  }

  .discovery-deck__browse-icon {
    display: block;
    width: 1.35rem;
    height: 1.35rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.65;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .discovery-deck__browse button:not(:disabled):hover,
  .discovery-deck__browse button:not(:disabled):active,
  .discovery-deck__browse button:focus-visible {
    border-color: var(--charcoal);
    background: var(--paper-deep);
    box-shadow: 0 .22rem .5rem rgba(39, 36, 31, .16);
    color: var(--charcoal);
  }

  .discovery-deck__browse button:focus-visible {
    outline: 3px solid var(--charcoal);
    outline-offset: 3px;
    box-shadow: 0 0 0 6px var(--paper-pale);
  }

  .discovery-deck__browse button:not(:disabled):active {
    background: var(--paper-deep);
    transform: translateY(0) scale(.97);
  }

  .discovery-deck__browse button:disabled {
    opacity: .82;
  }

  .discovery-deck__content[data-discovery-composition="center-deck-reserved"] {
    width: min(38vw, 38rem);
    margin-inline: auto 22rem;
    padding-inline: 0;
  }

  .discovery-deck__content[data-discovery-composition="left-sky-reserved"] {
    width: min(54vw, 54rem);
    padding-inline-start: clamp(1.5rem, 3vw, 3rem);
  }
}

@media (min-width: 64.0625rem) and (max-width: 82rem) and (orientation: landscape) {
  .discovery-deck__content[data-discovery-composition="center-deck-reserved"] {
    width: min(38vw, 38rem);
    margin-inline: auto 18rem;
    padding-inline: 0;
  }

  .discovery-deck__content[data-discovery-composition="left-sky-reserved"] {
    width: min(52vw, 42rem);
    padding-inline-start: clamp(1.5rem, 3vw, 3rem);
  }
}

@media (min-width: 48.0625rem) and (max-width: 64rem) and (orientation: landscape) {
  .discovery-deck__cta.amicus-action-button {
    --amicus-action-height: 44px;
    --amicus-action-panel: 44px;
    width: 15.5rem;
    min-height: 44px;
    border-radius: 5px;
    box-shadow: 0 .25rem .8rem rgba(50, 45, 29, .14);
    font-size: .68rem;
    letter-spacing: .1em;
  }

  .discovery-deck__cta.amicus-action-button:hover,
  .discovery-deck__cta.amicus-action-button:focus-visible {
    box-shadow: 0 .32rem .9rem rgba(50, 45, 29, .18);
  }

  .discovery-deck__cta.amicus-action-button:active {
    box-shadow: 0 .15rem .45rem rgba(50, 45, 29, .16);
  }

  .discovery-deck__cta.amicus-action-button .amicus-action-button__leading svg,
  .discovery-deck__cta.amicus-action-button .amicus-action-button__trailing svg {
    width: 1.15rem;
    height: 1.15rem;
  }

  .discovery-deck__content[data-discovery-composition="center-deck-reserved"] {
    width: min(38vw, 24rem);
    margin-inline: auto clamp(16.5rem, 28vw, 18rem);
    padding-inline: 0;
  }

  .discovery-deck__content[data-discovery-composition="left-sky-reserved"] {
    width: min(54vw, 27rem);
    padding-inline-start: clamp(1.5rem, 3vw, 3rem);
  }

  .discovery-deck__content[data-discovery-reading-field-extent="editorial-band"] .discovery-deck__lower-copy::before {
    inset-inline: -1.5rem -1rem;
    inset-block-end: -2.5rem;
  }

  .discovery-deck .discovery-deck__content[data-discovery-composition="center-deck-reserved"] .discovery-deck__action-row {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 1rem;
  }

}

@media (min-width: 48.0625rem) and (orientation: landscape) {
  .discovery-deck__content[data-discovery-reading-field-extent="editorial-band"] .discovery-deck__action-row,
  .discovery-deck__content[data-discovery-composition="center-deck-reserved"] .discovery-deck__action-row {
    display: flex;
    margin-block-start: clamp(.75rem, 1.2vw, 1rem);
    align-items: center;
    justify-content: space-between;
    gap: clamp(1rem, 2vw, 2rem);
  }

  .discovery-deck__content[data-discovery-reading-field-extent="editorial-band"] .discovery-deck__cta,
  .discovery-deck__content[data-discovery-composition="center-deck-reserved"] .discovery-deck__cta {
    margin-block-start: 0;
  }

  .discovery-deck[data-active-destination="alexandrian"] .discovery-deck__action-row {
    justify-content: flex-end;
  }
}

@media (min-width: 48.0625rem) and (max-width: 64rem) and (orientation: landscape) {
  .discovery-deck__browse {
    inset-block-end: clamp(2.5rem, calc(4.2vh + .5rem), 3.7rem);
  }
}

@media (orientation: portrait), (max-width: 48rem) {
  .discovery-deck {
    height: auto;
    min-height: 0;
    padding-block-end: clamp(2rem, 7vw, 4rem);
  }

  .discovery-deck::after {
    height: 1.5rem;
  }

  .discovery-deck::before {
    height: 3.75rem;
  }

  .discovery-deck__world-image,
  .discovery-deck__world-wash {
    height: 52svh;
    min-height: 27rem;
    inset-block-end: auto;
  }

  .discovery-deck__world-image {
    object-position: 62% center;
  }

  .discovery-deck__world-wash {
    background: linear-gradient(
      180deg,
      transparent 0,
      transparent 64%,
      rgba(var(--deck-paper-rgb), .3) 78%,
      var(--deck-paper) 100%
    );
  }

  .discovery-deck__content {
    width: 100%;
    padding: calc(max(52svh, 27rem) + 1.25rem) clamp(1.25rem, 6vw, 3rem) 1.5rem;
  }

  .discovery-deck__content[data-discovery-reading-field-extent="editorial-band"] .discovery-deck__editorial-zone {
    display: block;
  }

  .discovery-deck__content[data-discovery-reading-field-extent="editorial-band"] .discovery-deck__lower-copy::before {
    display: none;
  }

  .discovery-deck__content[data-discovery-reading-field-extent="editorial-band"] .discovery-deck__description {
    margin-block-start: 1.15rem;
    margin-inline-start: 0;
  }

  .discovery-deck__content[data-discovery-reading-field-extent="editorial-band"] .discovery-deck__cta {
    margin-inline-start: 0;
  }

  .discovery-deck__browse {
    position: relative;
    inset: auto;
    z-index: 3;
    width: auto;
    margin: 0 clamp(1.25rem, 6vw, 3rem) 1.5rem;
    transform: none;
    justify-content: flex-start;
  }

  .discovery-deck .discovery-deck__cta.amicus-action-button {
    max-width: min(16.5rem, calc(100vw - 3rem));
    margin-inline-start: .5rem;
  }

  .discovery-deck__title {
    max-width: none;
    margin-block: .75rem 1rem;
    font-size: clamp(3.25rem, 13vw, 5.5rem);
    line-height: .83;
  }

  .discovery-deck__description {
    max-width: 36rem;
    font-size: clamp(1.375rem, 3.2vw, 1.5rem);
    line-height: 1.5;
  }

  .discovery-deck__navigation {
    position: relative;
    inset: auto;
    width: auto;
    margin: 0 clamp(1.25rem, 6vw, 3rem);
    padding-block-start: 1rem;
    border-block-start: 1px solid rgba(42, 36, 29, .18);
    grid-template-columns: minmax(14rem, 1fr) auto;
    align-items: end;
  }

  .discovery-deck__hand {
    grid-column: 1;
    grid-row: 1 / 4;
    justify-self: start;
    width: 16rem;
    height: 13rem;
    margin: 0;
    transform: scale(.86);
    transform-origin: left bottom;
  }

  .discovery-deck__development {
    grid-column: 1 / -1;
    grid-row: 4;
    margin-block-start: .55rem;
    text-align: left;
  }

  .discovery-deck__number {
    grid-column: 2;
    grid-row: 1;
  }

  .discovery-deck__archetype {
    grid-column: 2;
    grid-row: 2;
    max-width: 15rem;
  }

  .discovery-deck__progress {
    grid-column: 2;
    grid-row: 3;
    width: min(13rem, 100%);
    justify-self: end;
  }
}

@media (prefers-reduced-motion: reduce) {
  .amicus-action-button,
  .amicus-action-button__leading,
  .amicus-action-button__label,
  .amicus-action-button__trailing {
    transition: none;
  }

  .amicus-action-button__label,
  .amicus-action-button:hover .amicus-action-button__leading,
  .amicus-action-button:focus-visible .amicus-action-button__leading,
  .amicus-action-button:hover .amicus-action-button__label,
  .amicus-action-button:focus-visible .amicus-action-button__label {
    transform: none;
  }

  .amicus-action-button__trailing,
  .amicus-action-button:hover .amicus-action-button__trailing,
  .amicus-action-button:focus-visible .amicus-action-button__trailing {
    transform: translateX(100%);
  }
}

@media (max-width: 40rem) {
  .discovery-deck__world-image,
  .discovery-deck__world-wash {
    height: 48svh;
    min-height: 22rem;
  }

  .discovery-deck__content {
    padding-block-start: calc(max(48svh, 22rem) + 1rem);
  }

  .discovery-deck__title {
    font-size: var(--deck-mobile-title-size);
  }

  .discovery-deck__description {
    font-size: 1.25rem;
    line-height: 1.5;
  }

  .discovery-deck__cta {
    margin-block-start: 1.25rem;
  }

  .discovery-deck__navigation {
    grid-template-columns: 12.6rem minmax(0, 1fr);
    gap: .45rem .8rem;
  }

  .discovery-deck__hand {
    transform: scale(.78);
  }

  .discovery-deck__archetype {
    font-size: .5rem;
    letter-spacing: .12em;
  }
}

/* Phone: the active world, copy and controls form one compact scene. */
@media (max-width: 40rem) {
  .discovery-deck {
    --deck-mobile-art-height: clamp(15.5rem, 35svh, 22rem);
    --deck-nav-ink: #2a241d;
    --deck-nav-accent: #8d3729;
    min-height: 0;
    padding-block-end: 0;
    touch-action: pan-y pinch-zoom;
  }

  [data-discovery-description-desktop] {
    display: none;
  }

  [data-discovery-description-mobile] {
    display: inline;
  }

  .discovery-deck__world::after {
    position: absolute;
    z-index: 2;
    inset: calc(var(--deck-mobile-art-height) - 4.25rem) 0 auto;
    height: 5.5rem;
    content: "";
    background: linear-gradient(180deg, transparent, var(--deck-paper) 82%);
  }

  .discovery-deck__world-image,
  .discovery-deck__world-wash {
    min-height: 0;
    height: var(--deck-mobile-art-height);
  }

  .discovery-deck__content,
  .discovery-deck__content[data-discovery-copy-side="right"],
  .discovery-deck[data-active-destination="patreon"] .discovery-deck__content {
    width: 100%;
    min-height: calc(var(--deck-mobile-art-height) + 26rem);
    margin: 0;
    padding: calc(var(--deck-mobile-art-height) + .65rem) clamp(1.4rem, 6.5vw, 2rem) 2rem;
    text-align: left;
  }

  .discovery-deck__content[data-discovery-reading-field="parchment"] .discovery-deck__lower-copy,
  .discovery-deck__lower-copy {
    width: 100%;
  }

  .discovery-deck__mobile-heading {
    display: flex;
    min-height: 2rem;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }

  .discovery-deck__category {
    font-size: .69rem;
    letter-spacing: .16em;
  }

  .discovery-deck__category::before {
    display: none;
  }

  .discovery-deck__mobile-number {
    display: flex;
    flex: none;
    align-items: baseline;
    gap: .35rem;
    color: var(--deck-nav-ink);
    font-family: var(--font-body);
  }

  .discovery-deck__mobile-number strong {
    color: var(--deck-nav-accent);
    font-size: 1.2rem;
    font-weight: 400;
  }

  .discovery-deck__mobile-number span {
    font-size: .7rem;
  }

  .discovery-deck__title,
  .discovery-deck[data-active-destination="patreon"] .discovery-deck__title {
    max-width: 100%;
    margin: .55rem 0 .65rem;
    font-size: clamp(2.85rem, 11.9vw, 4rem);
    line-height: .88;
    letter-spacing: -.055em;
  }

  .discovery-deck__thought {
    font-size: clamp(1.3rem, 5vw, 1.7rem);
    line-height: 1.18;
  }

  .discovery-deck__description,
  .discovery-deck__content[data-discovery-reading-field-extent="editorial-band"] .discovery-deck__description {
    max-width: 34rem;
    margin-block-start: .75rem;
    margin-inline-start: 0;
    font-size: clamp(1.025rem, 4.35vw, 1.2rem);
    line-height: 1.4;
  }

  .discovery-deck .discovery-deck__cta.amicus-action-button {
    --amicus-action-height: 3.15rem;
    --amicus-action-panel: 3.15rem;
    width: min(17.5rem, calc(100% - 1rem));
    max-width: 100%;
    height: 3.15rem;
    margin: 1rem 0 0;
    padding-inline-start: 3.15rem;
    font-size: .69rem;
    letter-spacing: .1em;
  }

  .discovery-deck__cta .amicus-action-button__label {
    inset-inline-start: var(--amicus-action-panel);
    padding-inline: .65rem;
  }

  .discovery-deck__browse {
    position: absolute;
    z-index: 9;
    inset: calc(var(--deck-mobile-art-height) - 1.55rem) .9rem auto;
    width: auto;
    margin: 0;
    transform: none;
    justify-content: space-between;
  }

  .discovery-deck__browse button,
  .discovery-deck__browse button[data-discovery-step="1"] {
    width: 3.1rem;
    height: 3.1rem;
    border-color: var(--deck-nav-ink);
    background: var(--paper-pale);
    color: var(--deck-nav-ink);
    font-size: 1.35rem;
  }

  .discovery-deck__browse button:not(:disabled):hover,
  .discovery-deck__browse button:not(:disabled):active {
    border-color: var(--deck-nav-accent);
    background: var(--paper-pale);
    color: var(--deck-nav-accent);
  }

  .discovery-deck__browse button:focus-visible {
    border-color: var(--deck-nav-accent);
    outline-color: var(--deck-nav-accent);
    color: var(--deck-nav-accent);
  }

  .discovery-deck__browse button:disabled {
    opacity: .8;
  }

  .discovery-deck__navigation {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .discovery-deck *,
  .discovery-deck *::before,
  .discovery-deck *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}
