/* /faq-alt-d : "a hand of cards". Seven real playing cards (2.5 x 3.5, all one size), ace to seven, in four spring
   suit colours, each with a printed double-rule border and little flowers in the free corners; the drawn icon is the
   suit (corners) and, in a ring, the centre. The face carries the question and a few-word answer; tapping a card
   lifts it out, enlarged, with the full answer. A small stack of card backs sits beside the sign-off.
   Wide screens: the hand fanned across the page. Phones: the cards tumble down the one scroll panel, zig-zag. */
.page--faq-alt-d .art .collage { overflow: visible; }
/* suits: a bright tone for the printing (rules, ring, flowers) and a deeper one of the same hue for anything read
   (rank, short answer): the deeper tones are all at least 4.5:1 on the card stock */
.page--faq-alt-d .suit-pink { --suit: #ee6f9a; --suit-ink: #c2376b; }
.page--faq-alt-d .suit-green { --suit: #4fae62; --suit-ink: #2c7a43; }
.page--faq-alt-d .suit-apricot { --suit: #f39a3d; --suit-ink: #b05a12; }
.page--faq-alt-d .suit-blue { --suit: #6f8ee6; --suit-ink: #4063c4; }
.page--faq-alt-d .card__face, .page--faq-alt-d .answer__card { --stock: #fffdf8; }

/* phones: a tumbling cascade, left then right, each card leaning its own way over the one before */
/* the panel scrolls up and down only: it can never be dragged sideways, so no card can be sliced at its edge */
.page--faq-alt-d .panel { overflow-x: hidden; touch-action: pan-y; overscroll-behavior-x: none; padding-left: 0; padding-right: 0; }
/* side room for the tilt: a card leaning 6 degrees is about 7% of its width wider each side, plus its shadow, so the
   pile keeps 1.7rem clear on both sides and every corner (rank and suit) stays inside the panel */
.page--faq-alt-d .hand { display: flex; flex-direction: column; max-width: 23rem; margin-inline: auto; padding: 1.1rem 1.7rem 0.6rem; }
.page--faq-alt-d .card { width: 52%; rotate: calc(var(--t, 0deg) * 0.75); z-index: calc(var(--n) + 1); }
.page--faq-alt-d .card:nth-child(even) { align-self: flex-end; }
.page--faq-alt-d .card + .card { margin-top: -5.6rem; }
/* the photo cluster keeps clear of the panel's sides too (its tilted strips are a little wider than their box) */
.page--faq-alt-d .panel-art { width: calc(100% - 1.6rem); }

.page--faq-alt-d .card__face {
  position: relative; display: grid; align-content: center; justify-items: center; gap: 0.3rem; width: 100%; aspect-ratio: 5 / 7; padding: 2.2rem 0.85rem; cursor: pointer;
  font: inherit; color: var(--ink); text-align: center; background: var(--stock) linear-gradient(160deg, #fff, #fbf7ec); border: 1px solid rgb(70 55 30 / 0.35); border-radius: 0.8rem;
  box-shadow: 0 1px 1px rgb(70 55 30 / 0.3), 0 0.4rem 0.9rem rgb(70 55 30 / 0.22); transition: transform 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.page--faq-alt-d .card__face:hover, .page--faq-alt-d .card__face:focus-visible, .page--faq-alt-d .card:has(:popover-open) .card__face { transform: translateY(-0.6rem); }
/* the printed border: a rule set in from the edge with a fine second rule inside it */
.page--faq-alt-d .card__face::before, .page--faq-alt-d .answer__card::before { content: ""; position: absolute; inset: 0.36rem; border: 1.5px solid var(--suit); border-radius: 0.5rem; pointer-events: none; }
.page--faq-alt-d .card__face::after, .page--faq-alt-d .answer__card::after { content: ""; position: absolute; inset: 0.6rem; border: 1px solid color-mix(in srgb, var(--suit) 60%, transparent); border-radius: 0.32rem; pointer-events: none; }
/* corner index: rank over suit, top left and (upside down) bottom right; it interrupts the border, as the flowers do */
.page--faq-alt-d .idx { position: absolute; z-index: 1; left: 0.42rem; top: 0.4rem; display: grid; justify-items: center; gap: 0.05rem; padding: 0.1rem 0.22rem 0.2rem; color: var(--suit-ink); line-height: 1; background: var(--stock); border-radius: 0.3rem; }
.page--faq-alt-d .idx > b { font-family: var(--font-display); font-weight: 400; font-size: 1.35rem; }
.page--faq-alt-d .idx svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.page--faq-alt-d .idx--foot { left: auto; top: auto; right: 0.42rem; bottom: 0.4rem; rotate: 180deg; }
.page--faq-alt-d .fl { position: absolute; z-index: 1; width: 1.05rem; height: 1.05rem; padding: 0.12rem; background: var(--stock); border-radius: 50%; color: var(--suit); }
.page--faq-alt-d .fl svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.page--faq-alt-d .fl--tr { right: 0.1rem; top: 0.1rem; }
.page--faq-alt-d .fl--bl { left: 0.1rem; bottom: 0.1rem; }
/* the centre: the suit in a ring */
.page--faq-alt-d .pip { display: grid; place-items: center; width: 2.5rem; aspect-ratio: 1; border-radius: 50%; border: 1.5px solid var(--suit); outline: 1px solid color-mix(in srgb, var(--suit) 60%, transparent); outline-offset: 2px; background: color-mix(in srgb, var(--suit) 16%, var(--stock)); color: var(--suit-ink); margin-bottom: 0.25rem; }
.page--faq-alt-d .pip svg { display: block; width: 62%; height: auto; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.page--faq-alt-d .card__q { font-family: var(--font-display); font-size: 1.05rem; line-height: 1.2; text-wrap: balance; max-width: 100%; }
.page--faq-alt-d .card__s { font-family: var(--font-body); font-weight: 700; font-size: 1rem; line-height: 1.2; color: var(--suit-ink); text-wrap: balance; max-width: 100%; }

/* the rest of the deck, face down, beside the sign-off: a lattice back with its own printed border */
.page--faq-alt-d .aside { display: flex; align-items: center; justify-content: center; gap: 1.2rem; margin: 0.5rem 0 0.2rem; }
.page--faq-alt-d .deck { position: relative; flex: none; width: 3.4rem; aspect-ratio: 5 / 7; rotate: -8deg; }
.page--faq-alt-d .deck > i {
  position: absolute; inset: 0; border-radius: 0.45rem; border: 0.26rem solid #fffdf8; outline: 1px solid rgb(70 55 30 / 0.35);
  box-shadow: 0 1px 2px rgb(70 55 30 / 0.3), inset 0 0 0 1.5px #ee6f9a, inset 0 0 0 0.22rem #fffdf8, inset 0 0 0 calc(0.22rem + 1px) #4fae62;
  background-color: #6f8ee6;
  background-image: radial-gradient(circle at 50% 50%, #fffdf8 0 0.42rem, #f39a3d 0.42rem 0.56rem, transparent 0.58rem), repeating-linear-gradient(45deg, rgb(255 253 248 / 0.55) 0 1.5px, transparent 1.5px 7px), repeating-linear-gradient(-45deg, rgb(255 253 248 / 0.55) 0 1.5px, transparent 1.5px 7px);
}
.page--faq-alt-d .deck > i:nth-child(1) { translate: -0.35rem 0.3rem; rotate: -5deg; }
.page--faq-alt-d .deck > i:nth-child(2) { translate: -0.15rem 0.15rem; rotate: -2deg; }
.page--faq-alt-d .aside > .signoff { font-family: var(--font-display); font-size: var(--fs-h3); line-height: 1.2; }

/* a card picked out of the hand (a native popover that fills the screen). Behind the card is a close button the size
   of the screen, so a click or tap outside the card only puts it back: it can never reach a card underneath. */
.page--faq-alt-d .answer { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 1rem; border: 0; background: none; overflow: hidden; place-items: center; }
.page--faq-alt-d .answer:popover-open { display: grid; }
.page--faq-alt-d .answer::backdrop { background: rgb(241 238 227 / 0.8); }
.page--faq-alt-d .answer__scrim { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: default; }
.page--faq-alt-d .answer__card {
  position: relative; display: flex; flex-direction: column; justify-content: center; width: min(26rem, 100%); min-height: min(36.4rem, 100%); max-height: 100%;
  background: var(--stock) linear-gradient(160deg, #fff, #fbf7ec); border: 1px solid rgb(70 55 30 / 0.35); border-radius: 1.2rem; box-shadow: 0 1px 2px rgb(70 55 30 / 0.3), 0 1rem 2.6rem rgb(70 55 30 / 0.3);
}
.page--faq-alt-d .answer__card::before { inset: 0.5rem; border-radius: 0.8rem; border-width: 2px; }
.page--faq-alt-d .answer__card::after { inset: 0.85rem; border-radius: 0.55rem; }
.page--faq-alt-d .answer__card > .idx { left: 0.6rem; top: 0.55rem; padding: 0.15rem 0.35rem 0.3rem; }
.page--faq-alt-d .answer__card > .idx > b { font-size: 2.1rem; }
.page--faq-alt-d .answer__card > .idx svg { width: 1.6rem; height: 1.6rem; }
.page--faq-alt-d .answer__card > .idx--foot { left: auto; top: auto; right: 0.6rem; bottom: 0.55rem; }
.page--faq-alt-d .answer__card > .fl { width: 1.5rem; height: 1.5rem; padding: 0.16rem; }
.page--faq-alt-d .answer__card > .fl--tr { right: 0.16rem; top: 0.16rem; }
.page--faq-alt-d .answer__card > .fl--bl { left: 0.16rem; bottom: 0.16rem; }
.page--faq-alt-d .answer__body { position: relative; flex: 0 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; margin: 4.6rem 0 clamp(1.4rem, 4dvh, 4.3rem); padding: 0 2.1rem; text-align: left; font-family: var(--font-body); font-size: var(--fs-body); line-height: 1.45; color: #33373f; }
.page--faq-alt-d .answer__body > .subhead { color: var(--suit-ink); font-family: var(--font-display); font-weight: 400; font-size: var(--fs-h3); line-height: 1.25; }
.page--faq-alt-d .answer__body > * + * { margin-top: 0.6em; }
.page--faq-alt-d .answer__body .hotels > li + li { margin-top: 0.4em; }
.page--faq-alt-d .answer__body > :last-child { margin-right: 2.6rem; }
.page--faq-alt-d .answer__close {
  display: block; margin-top: 0.8rem; font: inherit; font-family: var(--font-display); font-size: 1rem; color: var(--ink); background: none; border: 0;
  min-height: 2.75rem; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 0.18em;
}

@media (prefers-reduced-motion: no-preference) {
  /* the hand is dealt, one card after another */
  .js:not(.ready) .page--faq-alt-d .card { opacity: 0; }
  .js.ready .page--faq-alt-d .card { animation: faq-d-deal 600ms cubic-bezier(0.2, 0.75, 0.25, 1) calc(300ms + var(--n) * 130ms) both; will-change: transform, opacity; }
  /* the face-down stack is set down only once the seventh card has landed (it starts at 300 + 6 x 130 ms and takes 600) */
  .js:not(.ready) .page--faq-alt-d .deck { opacity: 0; }
  .js.ready .page--faq-alt-d .deck { animation: faq-d-stack 450ms cubic-bezier(0.2, 0.75, 0.25, 1) 1750ms both; }
  @keyframes faq-d-stack { from { opacity: 0; transform: translateY(-1rem) scale(0.9); } to { opacity: 1; transform: none; } }
  @keyframes faq-d-deal { 0% { opacity: 0; transform: translate(4rem, -16rem) rotate(30deg); } 12% { opacity: 1; } 100% { opacity: 1; transform: none; } }
  /* a picked card rises and turns to face you */
  .page--faq-alt-d .answer { transition: overlay 380ms allow-discrete, display 380ms allow-discrete; }
  .page--faq-alt-d .answer__card { opacity: 0; transform: perspective(60rem) translateY(3rem) rotateY(-70deg) scale(0.6); transition: opacity 180ms ease, transform 380ms cubic-bezier(0.2, 0.7, 0.2, 1); }
  .page--faq-alt-d .answer:popover-open .answer__card { opacity: 1; transform: perspective(60rem) translateY(0) rotateY(0deg) scale(1); }
  .page--faq-alt-d .answer::backdrop { opacity: 0; transition: opacity 260ms ease, overlay 380ms allow-discrete, display 380ms allow-discrete; }
  .page--faq-alt-d .answer:popover-open::backdrop { opacity: 1; }
  @starting-style {
    .page--faq-alt-d .answer:popover-open .answer__card { opacity: 0; transform: perspective(60rem) translateY(3rem) rotateY(70deg) scale(0.6); }
    .page--faq-alt-d .answer:popover-open::backdrop { opacity: 0; }
  }
}

@media (min-width: 37.5rem) and (min-aspect-ratio: 1/1) {
  .page--faq-alt-d .art { position: absolute; left: var(--ax); top: var(--ay); width: var(--aw); rotate: var(--ar0, 0deg); z-index: var(--az, 1); }
  /* both strips hang from the top right, with the small pieces gathered round them */
  .page--faq-alt-d .art--strip-a { --ax: 69%; --ay: -62%; --aw: 14.4%; --ar0: 2deg; --az: 3; }
  .page--faq-alt-d .art--strip-b { --ax: 83.5%; --ay: -46%; --aw: 14.4%; --ar0: 3deg; --az: 2; }
  .page--faq-alt-d .art--net { --ax: 60%; --ay: -9%; --aw: 19%; --az: 1; }
  .page--faq-alt-d .art--receipt { --ax: 64.6%; --ay: -3%; --aw: 8.4%; --ar0: -6deg; --az: 2; }
  .page--faq-alt-d .art--ny { --ax: 66.6%; --ay: 20%; --aw: 5.2%; --az: 4; }
  .page--faq-alt-d .art--heart { --ax: 93%; --ay: 36%; --aw: 7.6%; --az: 4; }
  .page--faq-alt-d .art--bow { --ax: 76.5%; --ay: 26%; --aw: 7.6%; --az: 5; }
  .page--faq-alt-d .art--seal { --ax: 80.5%; --ay: 2.5%; --aw: 6%; --az: 5; }


  /* the hand: seven cards across, tilting and dropping away from the middle one, each overlapping the next */
  .page--faq-alt-d .panel {
    position: absolute; left: 0; top: 0; width: 100%; height: calc(100% - 1.2cqw - 4rem); max-width: none; margin: 0; padding: 21.6cqw 2.2cqw 0; overflow-y: auto; overflow-x: hidden; z-index: 4;
  }
  .page--faq-alt-d .hand { flex-direction: row; flex-wrap: nowrap; align-items: flex-start; justify-content: center; max-width: none; padding: 0; }
  .page--faq-alt-d .hand > .card.card { flex: 0 0 14.6%; width: auto; align-self: auto; margin: 0 -0.55cqw; rotate: calc(var(--i) * 4.2deg); translate: 0 calc(var(--i) * var(--i) * 0.62cqw); transform-origin: 50% 100%; }
  .page--faq-alt-d .card__face { padding: 3.2cqw 1.1cqw; border-radius: 1cqw; gap: 0.4cqw; }
  .page--faq-alt-d .card__face:hover, .page--faq-alt-d .card__face:focus-visible, .page--faq-alt-d .card:has(:popover-open) .card__face { transform: translateY(-1.8cqw); }
  .page--faq-alt-d .card__face::before { inset: 0.42cqw; border-radius: 0.62cqw; }
  .page--faq-alt-d .card__face::after { inset: 0.72cqw; border-radius: 0.4cqw; }
  .page--faq-alt-d .card__face > .idx { left: 0.5cqw; top: 0.48cqw; }
  .page--faq-alt-d .card__face > .idx--foot { left: auto; top: auto; right: 0.5cqw; bottom: 0.48cqw; }
  .page--faq-alt-d .card__face > .idx > b { font-size: max(1.3rem, 1.9cqw); }
  .page--faq-alt-d .card__face > .idx svg { width: max(1rem, 1.4cqw); height: max(1rem, 1.4cqw); }
  .page--faq-alt-d .card__face > .fl { width: max(1rem, 1.35cqw); height: max(1rem, 1.35cqw); }
  .page--faq-alt-d .pip { width: max(2.6rem, 3.7cqw); margin-bottom: 0.3cqw; }
  .page--faq-alt-d .card__q { font-size: max(1.1rem, 1.42cqw); }
  .page--faq-alt-d .card__s { font-size: max(1rem, 1.22cqw); }
  .page--faq-alt-d .aside { position: absolute; left: 38.5%; top: 3.4cqw; margin: 0; gap: 1.6cqw; }
  .page--faq-alt-d .deck { width: 6cqw; }
  .page--faq-alt-d .aside > .signoff { font-size: max(1rem, 1.75cqw); line-height: 1.2; }
}
