/* Reference composition: a face-on central cover and four receding side covers. */
.tssfc.tssfc--reference {
  --tssfc-navy: #08283e;
  --tssfc-orange: #b66c4c;
  --tssfc-muted: #153249;
  --tssfc-dot: rgba(41, 65, 82, .16);
  --tssfc-card-depth: 6px;
  --tssfc-stage-height: 360px;
  --tssfc-card-top: 170px;
  --tssfc-scene-perspective: 850px;
  container-type: inline-size;
  height: auto;
  grid-template-rows: auto var(--tssfc-stage-height) 44px auto 44px;
  row-gap: 0;
}
.tss-home-hero .tssfc.tssfc--reference {
  grid-template-rows: auto var(--tssfc-stage-height) 44px auto 44px;
}
.tssfc.tssfc--reference .tssfc__header h2,
.tss-home-hero .tssfc.tssfc--reference .tssfc__header h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(26px, 5.8cqw, 48px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -.035em;
}
.tssfc.tssfc--reference .tssfc__header p { margin-top: 12px; font-size: clamp(12px, 2.55cqw, 22px); line-height: 1.3; }
.tssfc.tssfc--reference .tssfc__stage,
.tss-home-hero .tssfc.tssfc--reference .tssfc__stage {
  min-height: 0;
  height: var(--tssfc-stage-height);
  margin-top: 0;
}
.tssfc.tssfc--reference .tssfc__viewport {
  inset: 0 22px;
  perspective: var(--tssfc-scene-perspective);
  perspective-origin: 50% var(--tssfc-card-top);
  /* Compose whole cards in z-index order. Each card keeps its own 3D faces. */
  transform-style: flat;
}
.tssfc.tssfc--reference .tssfc__card {
  top: var(--tssfc-card-top);
  aspect-ratio: .64;
  border-radius: 5px;
  transform: translate(-50%, -50%) translate3d(var(--tssfc-x), var(--tssfc-y), 0) rotateY(var(--tssfc-display-angle)) scale(var(--tssfc-scale));
}
.tssfc.tssfc--reference .tssfc__card[data-position="0"] { --tssfc-display-angle: 0deg; }
.tssfc.tssfc--reference .tssfc__card[data-position="-1"] { --tssfc-display-angle: calc(-1 * var(--tssfc-near-angle, 40deg)); }
.tssfc.tssfc--reference .tssfc__card[data-position="1"] { --tssfc-display-angle: var(--tssfc-near-angle, 40deg); }
.tssfc.tssfc--reference .tssfc__card[data-position="-2"] { --tssfc-display-angle: -40deg; }
.tssfc.tssfc--reference .tssfc__card[data-position="2"] { --tssfc-display-angle: 40deg; }
.tssfc.tssfc--reference .tssfc__card[data-position="hidden"] { --tssfc-display-angle: 0deg; }
.tssfc.tssfc--reference .tssfc__card[data-tssfc-returning="true"] { z-index: 1; }
.tssfc.tssfc--reference .tssfc__cover {
  container-type: inline-size;
  border: 1px solid rgba(208,224,235,.75);
  border-radius: 5px;
  box-shadow: -2px 0 0 #8297a6, 1px 0 2px rgba(24,52,74,.24);
}
.tssfc.tssfc--reference .tssfc__cover::after {
  background: linear-gradient(100deg, rgba(234,245,255,.09), transparent 18%, transparent 90%, rgba(4,22,36,.08));
  box-shadow: inset 0 2px 3px rgba(219,238,251,.15);
}
.tssfc.tssfc--reference .tssfc__book::before,
.tssfc.tssfc--reference .tssfc__card[data-position="0"] .tssfc__book::before {
  background: #233a4a;
  box-shadow: 0 15px 15px rgba(16,40,55,.22);
}
.tssfc.tssfc--reference .tssfc__face--pages,
.tssfc.tssfc--reference .tssfc__face--top,
.tssfc.tssfc--reference .tssfc__face--bottom {
  background: linear-gradient(90deg, #738b9a, #d5e0e6 50%, #849aa8);
  border-color: #5c778a;
}
.tssfc__cover-copy {
  position: absolute;
  inset: 8% 9% auto;
  z-index: 1;
  display: block;
  color: #f4f7f8;
  text-shadow: 0 1px 2px rgba(0,0,0,.3);
}
.tssfc__cover-meta { display: block; max-width: 79%; font: 500 5.8cqw/1.18 Arial, sans-serif; text-transform: uppercase; }
.tssfc__cover-title { display: block; margin-top: 6.8cqw; font: 400 14.2cqw/1.04 Georgia, 'Times New Roman', serif; letter-spacing: -.025em; overflow-wrap: anywhere; }
.tssfc__cover-type { display: block; margin-top: 6.1cqw; font: 400 7.1cqw/1.2 Arial, sans-serif; }
.tssfc.tssfc--reference .tssfc__new { top: 3.3%; right: 6%; min-height: 0; padding: 3px 7px; border-radius: 4px; font-size: 6.5cqw; font-weight: 700; letter-spacing: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,.27); }
.tssfc__reflection {
  display: block;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  height: 10%;
  overflow: hidden;
  pointer-events: none;
  opacity: .16;
  filter: blur(1px);
  transform: translateZ(-1px);
  mask-image: linear-gradient(to bottom, #000, transparent 90%);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 90%);
}
.tssfc__reflection img { position: absolute; top: 0; left: 0; display: block; width: 100%; height: 1000%; max-width: none; object-fit: contain; object-position: center; background: var(--tssfc-cover-background, #233a4a); transform: scaleY(-1); }
/* Dedicated 16:25 covers fill the matching card face and its reflection. */
.tssfc.tssfc--reference .tssfc__card--dedicated-cover .tssfc__cover img,
.tssfc.tssfc--reference .tssfc__card--dedicated-cover .tssfc__reflection img {
  object-fit: cover;
  object-position: center;
}
.tssfc.tssfc--reference .tssfc__controls { margin-top: -8px; min-height: 44px; gap: 12px; }
.tssfc.tssfc--reference .tssfc__arrow { width: 40px; height: 40px; border: 1px solid #08283e; background: #08283e; color: #fff; box-shadow: none; }
.tssfc.tssfc--reference .tssfc__arrow:hover { background: #153d59; transform: none; }
.tssfc.tssfc--reference .tssfc__arrow span { font-size: 29px; }
.tssfc.tssfc--reference .tssfc__details { min-height: 0; padding: 3px 12px 15px; margin: 0; }
.tssfc.tssfc--reference .tssfc__details h3 { font-size: clamp(20px, 3.6cqw, 31px); line-height: 1.12; font-weight: 500; letter-spacing: -.015em; }
.tssfc.tssfc--reference .tssfc__meta,
.tssfc.tssfc--reference .tssfc__type { font-size: clamp(14px, 2.6cqw, 22px); line-height: 1.24; margin-top: 7px; }
.tssfc.tssfc--reference .tssfc__link { font-size: clamp(14px, 2.6cqw, 22px); line-height: 1.3; margin-top: 10px; font-weight: 500; text-decoration: underline; text-underline-offset: .15em; }
.tssfc.tssfc--reference .tssfc__dots { gap: clamp(12px, 3.2cqw, 28px); align-self: center; }
.tssfc.tssfc--reference .tssfc__dot { flex: 0 0 auto; width: clamp(10px, 2.1cqw, 18px); height: clamp(10px, 2.1cqw, 18px); }
@media (prefers-reduced-motion: reduce) {
  .tssfc.tssfc--reference .tssfc__card { transition: none; }
}

/* Explicit rows also keep a one-resource carousel aligned when controls hide. */
.tssfc.tssfc--reference > .tssfc__header { grid-row: 1; }
.tssfc.tssfc--reference > .tssfc__stage { grid-row: 2; }
.tssfc.tssfc--reference > .tssfc__controls { grid-row: 3; }
.tssfc.tssfc--reference > .tssfc__details { grid-row: 4; }
.tssfc.tssfc--reference > .tssfc__dots { grid-row: 5; }
.tssfc.tssfc--reference.has-one-item,
.tss-home-hero .tssfc.tssfc--reference.has-one-item { grid-template-rows: auto var(--tssfc-stage-height) 0 auto 44px; }

/* Centre the arrows between the covers and title; pagination stays below the details. */
.tssfc.tssfc--reference > .tssfc__controls {
  grid-column: 1;
  justify-self: center;
  align-self: center;
  justify-content: center;
  width: max-content;
  margin: 0;
  pointer-events: none;
}
.tssfc.tssfc--reference > .tssfc__controls button { pointer-events: auto; }
.tssfc.tssfc--reference > .tssfc__dots { grid-column: 1; justify-self: center; width: max-content; }

/* The resource preview sits above the cards without changing the hero layout. */
.tssfc.tssfc--reference {
  position: relative;
  --tssfc-preview-width: 566px;
  --tssfc-preview-fade-speed: .8;
}
.tssfc__preview-hint {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.tssfc.tssfc--reference .tssfc__preview-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 4px 11px;
  margin: 8px 0 0 10px;
  border: 1px solid #a8b7bf;
  border-radius: 6px;
  color: #08283e;
  background: rgba(255, 253, 249, .92);
  font: 600 13px/1.3 'Segoe UI', Arial, sans-serif;
  cursor: pointer;
}
.tssfc.tssfc--reference .tssfc__preview-toggle:hover,
.tssfc.tssfc--reference .tssfc__preview-toggle[aria-expanded="true"] {
  border-color: #08283e;
  background: #edf2f4;
}
.tssfc.tssfc--reference .tssfc__preview {
  position: absolute;
  z-index: 50;
  display: block;
  width: var(--tssfc-preview-width, 566px);
  padding: 35px;
  margin: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #d4bcae;
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(8, 40, 62, .22), 0 2px 6px rgba(8, 40, 62, .10);
  background: #fffdf9;
  color: #153249;
  font: 400 16px/1.5 'Segoe UI', Arial, sans-serif;
  text-align: left;
}
.tssfc.tssfc--reference .tssfc__preview[hidden],
.tssfc.tssfc--reference .tssfc__preview [hidden] { display: none; }
.tssfc.tssfc--reference .tssfc__preview-close {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #edf2f4;
  color: #08283e;
  font: 400 25px/1 Arial, sans-serif;
  cursor: pointer;
}
.tssfc.tssfc--reference .tssfc__preview-close:hover { background: #dce6eb; }
.tssfc.tssfc--reference .tssfc__preview-eyebrow {
  margin: 0 30px 9px 0;
  color: #925234;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.tssfc.tssfc--reference .tssfc__preview h3 {
  margin: 0 16px 7px 0;
  color: #08283e;
  font: 600 24px/1.18 'Segoe UI', Arial, sans-serif;
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
}
.tssfc.tssfc--reference .tssfc__preview-meta { margin: 0 0 12px; color: #50616c; font-size: 12px; line-height: 1.45; }
.tssfc.tssfc--reference .tssfc__preview-summary { margin: 0 0 15px; overflow-wrap: anywhere; }
.tssfc.tssfc--reference .tssfc__preview figure { margin: 0 0 13px; padding: 9px; border: 1px solid #e4e9eb; border-radius: 7px; background: #f1f4f4; }
.tssfc.tssfc--reference .tssfc__preview figure img { display: block; width: 100%; height: 252px; object-fit: contain; border: 0; border-radius: 3px; }
.tssfc.tssfc--reference .tssfc__preview figcaption { margin-top: 6px; color: #586b75; font-size: 11px; text-align: center; }
.tssfc.tssfc--reference .tssfc__preview-note { margin: 0 0 11px; color: #6a625b; font-size: 12px; }
.tssfc.tssfc--reference .tssfc__preview-link { color: #925234; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.tssfc.tssfc--reference .tssfc__preview-toggle:focus-visible,
.tssfc.tssfc--reference .tssfc__preview-close:focus-visible,
.tssfc.tssfc--reference .tssfc__preview-link:focus-visible { outline: 3px solid #4e88af; outline-offset: 3px; }

@keyframes tssfc-preview-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: no-preference) {
  .tssfc.tssfc--reference .tssfc__preview:not([hidden]) {
    /* A 400ms reference fade at 80% speed takes 500ms. */
    animation: tssfc-preview-fade-in calc(400ms / var(--tssfc-preview-fade-speed, .8)) ease-in-out both;
  }
}
