/* Shared website / PWA illustration gallery.
 * The default layout is a readable illustrated document. The controller opts
 * into the card stage only after all controls and accessible states are ready.
 */
.rights-gallery {
  --rg-ink: #153e35;
  --rg-green: #16705a;
  --rg-paper: #fffdf7;
  --rg-motion: 650ms;
  --rg-ease: cubic-bezier(0.2, 0.75, 0.2, 1);
  position: relative;
  isolation: isolate;
  min-width: 0;
  max-width: 100%;
  padding: clamp(24px, 4vw, 52px);
  border: 1px solid #d7e3cc;
  border-radius: 36px;
  background: linear-gradient(145deg, #f7faed 0%, #eef7e4 58%, #edf2e7 100%);
  color: var(--rg-ink);
  font-family: "DM Sans", Arial, sans-serif;
  overflow: hidden;
}
.rights-gallery *,
.rights-gallery *::before,
.rights-gallery *::after {
  box-sizing: border-box;
}
.rights-gallery [hidden] {
  display: none !important;
}
.rights-gallery__header {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.rights-gallery__eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--rg-green);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  line-height: 1.5;
}
.rights-gallery .rights-gallery__header h2 {
  margin: 0;
  color: var(--rg-ink);
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1.08;
}
.rights-gallery__header h2 em {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
}
.rights-gallery__header > p {
  max-width: 280px;
  margin: 0 0 2px;
  color: #496358;
  font-size: 13px;
  line-height: 1.65;
}
.rights-gallery__stage {
  position: relative;
  min-width: 0;
  margin-top: 28px;
}
.rights-gallery__connection {
  display: none;
}
.rights-gallery__cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.rights-gallery__card {
  --rg-accent: #eef7e4;
  min-width: 0;
  margin: 0;
  color: var(--rg-ink);
  background: var(--rg-paper);
  border: 1px solid #153e3519;
  border-radius: 24px;
}
.rights-gallery__card--selected-experience {
  --rg-accent: #ffe1cc;
}
.rights-gallery__card--access-rights {
  --rg-accent: #e8e0fa;
}
.rights-gallery__front {
  position: relative;
  padding: 12px;
}
.rights-gallery__art {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  overflow: hidden;
  min-height: 0;
  aspect-ratio: 1;
  border-radius: 18px;
  background: linear-gradient(155deg, #fffdf7 2%, var(--rg-accent) 100%);
}
.rights-gallery__disc {
  position: absolute;
  inset: 15% 8% 0;
  z-index: -1;
  border: 1px solid #fffdf7b3;
  border-radius: 50%;
  background: #fffdf738;
}
.rights-gallery__art img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  object-fit: contain;
}
.rights-gallery__glint {
  display: none;
}
.rights-gallery__card-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 18px 6px 10px;
}
.rights-gallery__seal {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border: 1px solid #153e3519;
  border-radius: 50%;
  color: var(--rg-green);
  background: #fffdf78c;
}
.rights-gallery__icon {
  display: inline-block;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  vertical-align: middle;
}
.rights-gallery__card-note {
  display: block;
  margin-bottom: 5px;
  color: #587467;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.3;
}
.rights-gallery .rights-gallery__card-heading h3 {
  margin: 0;
  color: var(--rg-ink);
  font-size: clamp(14px, 1.7vw, 18px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.2;
}
.rights-gallery__back {
  padding: 4px 22px 24px;
}
.rights-gallery__back-top,
.rights-gallery__back > h3,
.rights-gallery__back-brand {
  display: none;
}
.rights-gallery__back-scroll p {
  margin: 0;
  color: #36574a;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.75;
  overflow-wrap: break-word;
}
.rights-gallery__hit {
  position: absolute;
  z-index: 4;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
}

/* Enhanced stage: slot -1 / 0 / 1 follows a shallow arc. Retargeting CSS
 * transitions gives rapid selection the final word, without queued timelines.
 */
.rights-gallery[data-rights-ready="true"] .rights-gallery__stage {
  height: 500px;
  margin-top: 22px;
}
.rights-gallery[data-rights-ready="true"] .rights-gallery__cards {
  position: absolute;
  inset: 0;
  display: block;
  perspective: 1400px;
}
.rights-gallery[data-rights-ready="true"] .rights-gallery__connection {
  position: absolute;
  display: block;
  inset: 4% -8% 0;
  width: 116%;
  height: 96%;
  pointer-events: none;
}
.rights-gallery__path {
  stroke: #8bab8d;
  stroke-width: 1.1;
  stroke-dasharray: 3 7;
  opacity: 0.65;
}
.rights-gallery__path--echo {
  stroke: #fffdf7;
  stroke-width: 2;
  stroke-dasharray: none;
  opacity: 0.8;
}
.rights-gallery__marker {
  transform: translate(500px, 142px);
  opacity: 0.9;
}
.rights-gallery[data-rights-ready="true"] .rights-gallery__card {
  --rg-slot: 0;
  --rg-y: 0px;
  --rg-scale: 1;
  position: absolute;
  top: 24px;
  left: 50%;
  width: min(42%, 350px);
  height: 418px;
  border: 0;
  background: transparent;
  transform: translate3d(calc(-50% + var(--rg-slot) * 77%), var(--rg-y), 0)
    rotateY(calc(var(--rg-slot) * -12deg)) rotateZ(calc(var(--rg-slot) * 8deg))
    scale(var(--rg-scale));
  transform-origin: 50% 80%;
  transition: transform var(--rg-motion) var(--rg-ease);
  z-index: 1;
}
.rights-gallery[data-rights-ready="true"]
  .rights-gallery__card[data-rights-active="true"] {
  z-index: 3;
}
.rights-gallery__pose {
  height: 100%;
}
/* Scroll owns this inner layer, so the outer selection transition never
 * chases a changing scroll target. The final pose is the approved card fan. */
.rights-gallery__depth {
  height: 100%;
}
.rights-gallery[data-rights-ready="true"] .rights-gallery__depth {
  transform: translate3d(
      calc(var(--rg-slot) * var(--rg-entry-x, 0%)),
      var(--rg-entry-y, 0px),
      0
    )
    rotateY(calc(var(--rg-slot) * var(--rg-entry-yaw, 0deg)))
    rotateZ(calc(var(--rg-slot) * var(--rg-entry-roll, 0deg)));
  transform-origin: 50% 80%;
  transform-style: preserve-3d;
}
.rights-gallery[data-rights-input="selection"] .rights-gallery__depth {
  transition: transform var(--rg-motion) var(--rg-ease);
}
.rights-gallery[data-rights-ready="true"] .rights-gallery__art img {
  transform: translate3d(0, var(--rg-art-y, 0px), 0);
}
.rights-gallery[data-rights-ready="true"] .rights-gallery__pose {
  transform: rotateX(var(--rg-tilt-x, 0deg)) rotateY(var(--rg-tilt-y, 0deg));
  transform-style: preserve-3d;
  transition: transform 240ms var(--rg-ease);
}
.rights-gallery[data-rights-pointer="true"]
  .rights-gallery__card[data-rights-active="true"]
  .rights-gallery__pose {
  transition-duration: 100ms;
}
.rights-gallery[data-rights-ready="true"] .rights-gallery__turn {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateY(0deg);
  transition: transform 580ms var(--rg-ease);
}
.rights-gallery[data-rights-flipped="true"]
  .rights-gallery__card[data-rights-active="true"]
  .rights-gallery__turn {
  transform: rotateY(180deg);
}
.rights-gallery[data-rights-ready="true"] .rights-gallery__front,
.rights-gallery[data-rights-ready="true"] .rights-gallery__back {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border: 1px solid #fffdf7;
  border-radius: 25px;
  box-shadow:
    0 24px 45px -23px #274b3a40,
    0 2px 7px #274b3a0a;
  background: var(--rg-paper);
}
.rights-gallery[data-rights-ready="true"] .rights-gallery__front {
  display: flex;
  flex-direction: column;
  padding: 11px;
}
.rights-gallery[data-rights-ready="true"] .rights-gallery__art {
  flex: 1 1 auto;
  aspect-ratio: auto;
}
.rights-gallery[data-rights-ready="true"] .rights-gallery__card-heading {
  flex: 0 0 auto;
  min-height: 82px;
  padding-inline: 8px;
}
.rights-gallery[data-rights-ready="true"] .rights-gallery__glint {
  position: absolute;
  display: block;
  z-index: 2;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  background: radial-gradient(
    ellipse 70% 80% at var(--rg-light-x, 50%) var(--rg-light-y, 50%),
    #fffefca6,
    #fffefc00 72%
  );
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}
/* A narrow pearl reflection gives the illustration a material finish. It is
 * clipped to its existing art frame; titles and explanatory text stay clear.
 * Only pointer input moves this layer. No filter, blend mode or idle timeline. */
.rights-gallery[data-rights-ready="true"] .rights-gallery__glint::before {
  content: "";
  position: absolute;
  inset: -45%;
  background: linear-gradient(
    115deg,
    #b3ead500 29%,
    #b3ead552 39%,
    #fffefa91 46%,
    #c9e5f547 52%,
    #f3d6b83d 58%,
    #f3d6b800 68%
  );
  transform: translate3d(
    var(--rg-light-shift-x, 0px),
    var(--rg-light-shift-y, 0px),
    0
  );
}
.rights-gallery[data-rights-ready="true"] .rights-gallery__glint::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid #fffdf7b3;
  border-radius: inherit;
  box-shadow: inset 0 0 20px #fffdf71f;
}
.rights-gallery[data-rights-pointer="true"]
  .rights-gallery__card[data-rights-active="true"]
  .rights-gallery__glint {
  opacity: 0.58;
}
.rights-gallery[data-rights-ready="true"] .rights-gallery__back {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 27px;
  transform: rotateY(180deg);
  background: linear-gradient(160deg, var(--rg-paper) 50%, var(--rg-accent));
}
.rights-gallery[data-rights-ready="true"] .rights-gallery__back-top {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #587467;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.11em;
}
.rights-gallery__edition {
  margin-left: auto;
  color: var(--rg-green);
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 26px;
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.03em;
}
.rights-gallery[data-rights-ready="true"] .rights-gallery__back > h3 {
  display: block;
  margin: 0;
  color: var(--rg-ink);
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.12;
}
.rights-gallery[data-rights-ready="true"] .rights-gallery__back-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #a9c7ac transparent;
  padding-right: 6px;
  border-radius: 3px;
}
.rights-gallery[data-rights-ready="true"] .rights-gallery__back-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--rg-green);
  font-size: 12px;
  font-weight: 600;
}
.rights-gallery__back-brand > span {
  font-size: 22px;
  font-weight: 400;
}
.rights-gallery__controls {
  position: relative;
  z-index: 4;
  max-width: 530px;
  margin-inline: auto;
}
.rights-gallery__choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  padding: 5px;
  border: 1px solid #c8d9bd;
  border-radius: 18px;
  background: #fffdf780;
}
.rights-gallery__choice,
.rights-gallery__flip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #4f695b;
  font:
    500 12px/1.25 "DM Sans",
    Arial,
    sans-serif;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.rights-gallery__choice[aria-pressed="true"] {
  border-color: #c7dcaf;
  color: var(--rg-ink);
  background: #d8ff75;
  box-shadow: 0 2px 4px #153e3508;
}
.rights-gallery__detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}
.rights-gallery__hint {
  max-width: 240px;
  color: #587467;
  font-size: 11px;
  line-height: 1.5;
}
.rights-gallery__flip {
  flex: 0 0 auto;
  gap: 9px;
  min-height: 44px;
  padding-inline: 14px;
  border-color: #b5cbb1;
  border-radius: 999px;
  color: var(--rg-green);
  background: #fffdf780;
}
.rights-gallery__flip .rights-gallery__icon {
  width: 17px;
  height: 17px;
}
.rights-gallery__choice:focus-visible,
.rights-gallery__flip:focus-visible,
.rights-gallery__hit:focus-visible,
.rights-gallery__back-scroll:focus-visible {
  outline: 2px solid var(--rg-green);
  outline-offset: 4px;
}
.rights-gallery__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Compact PWA layout retains three readable choice targets at 320px. */
.rights-gallery--compact {
  padding: clamp(18px, 3vw, 32px);
  border-radius: 28px;
}
.rights-gallery--compact .rights-gallery__header {
  align-items: flex-start;
  flex-direction: column;
  gap: 12px;
}
.rights-gallery--compact .rights-gallery__header h2 {
  font-size: clamp(28px, 4vw, 36px);
}
.rights-gallery--compact .rights-gallery__header > p {
  font-size: 12px;
}
.rights-gallery--compact[data-rights-ready="true"] .rights-gallery__stage {
  height: 440px;
  margin-top: 10px;
}
.rights-gallery--compact[data-rights-ready="true"] .rights-gallery__card {
  width: min(72%, 315px);
  height: 380px;
}
.rights-gallery--compact[data-rights-ready="true"] .rights-gallery__back {
  gap: 16px;
  padding: 23px;
}
@media (hover: hover) and (pointer: fine) {
  .rights-gallery__choice:hover,
  .rights-gallery__flip:hover {
    color: var(--rg-ink);
    background: #e7f7ce;
  }
  .rights-gallery__choice[aria-pressed="true"]:hover {
    background: #d8ff75;
  }
}
@media (max-width: 760px) {
  .rights-gallery {
    padding: 26px 22px;
    border-radius: 28px;
  }
  .rights-gallery__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
  .rights-gallery__header > p {
    font-size: 12px;
  }
  .rights-gallery__cards {
    grid-template-columns: 1fr;
  }
  .rights-gallery__front {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: center;
    gap: 8px;
  }
  .rights-gallery__card-heading {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 6px;
  }
  .rights-gallery[data-rights-ready="true"] .rights-gallery__stage {
    height: 440px;
    margin-top: 16px;
  }
  .rights-gallery[data-rights-ready="true"] .rights-gallery__card {
    width: min(72%, 315px);
    height: 380px;
  }
  .rights-gallery[data-rights-ready="true"] .rights-gallery__front {
    align-items: stretch;
    gap: 0;
  }
  .rights-gallery[data-rights-ready="true"] .rights-gallery__card-heading {
    align-items: center;
    flex-direction: row;
    min-height: 76px;
    gap: 9px;
    padding: 16px 2px 9px;
  }
  .rights-gallery .rights-gallery__card-heading h3 {
    font-size: 16px;
  }
}
@media (max-width: 420px) {
  .rights-gallery,
  .rights-gallery--compact {
    padding: 24px 16px;
    border-radius: 24px;
  }
  .rights-gallery__eyebrow {
    margin-bottom: 10px;
    font-size: 9px;
  }
  .rights-gallery .rights-gallery__header h2 {
    font-size: 30px;
  }
  .rights-gallery[data-rights-ready="true"] .rights-gallery__stage {
    height: 386px;
    margin-top: 8px;
  }
  .rights-gallery[data-rights-ready="true"] .rights-gallery__card {
    top: 20px;
    width: 82%;
    height: 330px;
  }
  .rights-gallery[data-rights-ready="true"] .rights-gallery__front {
    padding: 8px;
    border-radius: 22px;
  }
  .rights-gallery[data-rights-ready="true"] .rights-gallery__art {
    border-radius: 16px;
  }
  .rights-gallery .rights-gallery__card-heading h3 {
    font-size: 14px;
  }
  .rights-gallery__card-note {
    font-size: 10px;
  }
  .rights-gallery__seal {
    width: 32px;
    height: 32px;
  }
  .rights-gallery__seal .rights-gallery__icon {
    width: 17px;
    height: 17px;
  }
  .rights-gallery[data-rights-ready="true"] .rights-gallery__back {
    gap: 14px;
    padding: 20px;
    border-radius: 22px;
  }
  .rights-gallery[data-rights-ready="true"] .rights-gallery__back > h3 {
    font-size: 23px;
  }
  .rights-gallery__back-scroll p {
    font-size: 13px;
    line-height: 1.7;
  }
  .rights-gallery__choices {
    gap: 3px;
    padding: 4px;
    border-radius: 16px;
  }
  .rights-gallery__choice {
    flex-direction: column;
    gap: 5px;
    min-height: 58px;
    padding: 8px 3px;
    font-size: 12px;
  }
  .rights-gallery__choice .rights-gallery__icon {
    width: 18px;
    height: 18px;
  }
  .rights-gallery__detail-row {
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px 12px;
    margin-top: 12px;
  }
  .rights-gallery__hint {
    width: 100%;
    max-width: none;
    text-align: center;
    font-size: 11px;
  }
  .rights-gallery__flip {
    min-height: 44px;
    font-size: 12px;
  }
}

/* Motion can stop immediately when a parent route, tab or document hides.
 * Card content and explicit selection continue to work in every motion mode.
 */
.rights-gallery[data-rights-motion="paused"] *,
.rights-gallery[data-rights-motion="reduced"] * {
  transition: none !important;
}
.rights-gallery[data-rights-motion="paused"] .rights-gallery__pose,
.rights-gallery[data-rights-motion="reduced"] .rights-gallery__pose,
.rights-gallery[data-rights-motion="paused"] .rights-gallery__depth,
.rights-gallery[data-rights-motion="reduced"] .rights-gallery__depth,
.rights-gallery[data-rights-motion="paused"] .rights-gallery__art img,
.rights-gallery[data-rights-motion="reduced"] .rights-gallery__art img {
  transform: none !important;
}
.rights-gallery[data-rights-motion="paused"] .rights-gallery__glint,
.rights-gallery[data-rights-motion="reduced"] .rights-gallery__glint {
  opacity: 0 !important;
}
@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="full"]) .rights-gallery * {
    transition: none !important;
  }
}
@media print {
  .rights-gallery[data-rights-ready="true"] .rights-gallery__stage {
    height: auto;
  }
  .rights-gallery[data-rights-ready="true"] .rights-gallery__cards {
    position: static;
    display: grid;
    grid-template-columns: 1fr;
  }
  .rights-gallery[data-rights-ready="true"] .rights-gallery__card {
    position: static;
    width: 100%;
    height: auto;
    transform: none;
    break-inside: avoid;
  }
  .rights-gallery[data-rights-ready="true"] .rights-gallery__pose,
  .rights-gallery[data-rights-ready="true"] .rights-gallery__depth,
  .rights-gallery[data-rights-ready="true"] .rights-gallery__art img,
  .rights-gallery[data-rights-ready="true"] .rights-gallery__turn {
    transform: none !important;
  }
  .rights-gallery[data-rights-ready="true"] .rights-gallery__front,
  .rights-gallery[data-rights-ready="true"] .rights-gallery__back {
    position: static;
    height: auto;
    transform: none;
    box-shadow: none;
    backface-visibility: visible;
  }
  .rights-gallery[data-rights-ready="true"] .rights-gallery__art {
    max-height: 240px;
  }
  .rights-gallery__back-scroll {
    overflow: visible !important;
  }
  .rights-gallery__controls,
  .rights-gallery__hit,
  .rights-gallery__connection {
    display: none !important;
  }
}
