/* =======================
   TOKENS / GLOBALS
======================= */

:root{
  --accent:#991122;
  --text:#111;
  --muted:#444;
  --bg:#fff;
  --panel:#e6e6e6;
  --rule:#cfcfcf;
  --hairline:#e6e6e6;

  /* page geometry */
  --pageW: 85vw;
  --max: 1100px;

  /* horizontal padding */
  --pagePad: 10px;
  --headerPad: 4px;

  /* type + spacing */
  --fs: 18px;
  --lh: 1.65;
  --r: 10px;

  --headerHGap: 16px;
  --blockGap: 14px;
  --blockGapLg: 22px;

  /* Legacy art knobs (kept only if referenced elsewhere) */
  --artMax: 990px;
  --artFitMaxH: min(82vh, 1040px);

  /* Art “stage” system */
  --artBodyMax: 860px;

  --artStageMax: 1240px;
  --artStagePad: 22px;
  --artStageBg: #f3f3f3;
  --artStageBorder: rgba(0,0,0,0.10);
  --artStageShadow: 0 10px 26px rgba(0,0,0,0.08);

  --artStageMaxH: min(72vh, 980px);
}

/* =======================
   BASE / RESET
======================= */

*{ box-sizing:border-box; }

html,body{
  margin:0;
  padding:0;
  background:var(--bg);
  color:var(--text);
}

body{
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Arial,Helvetica,sans-serif;
  font-size:var(--fs);
  line-height:var(--lh);
}

a{ color:var(--accent); text-decoration:none; }
a:hover{ text-decoration:underline; }

@media (min-width: 900px){
  /* Avoid layout shift when scrollbar appears/disappears */
  html{ scrollbar-gutter: stable; overflow-y: scroll; }
}

/* =======================
   SHARED LAYOUT WRAPPERS
======================= */

.siteHeader__inner,
.subnav__inner,
.pageHeader__inner,
.page__inner,
.siteFooter__inner{
  width: min(var(--pageW), var(--max));
  margin: 0 auto;
}

.siteHeader__inner,
.subnav__inner,
.siteFooter__inner{
  padding-left: var(--headerPad);
  padding-right: var(--headerPad);
}

.pageHeader__inner,
.page__inner{
  padding-left: var(--pagePad);
  padding-right: var(--pagePad);
}

.page__inner::after{
  content:"";
  display:block;
  clear:both;
}

/* =======================
   HEADER
======================= */

.siteHeader{
  background: var(--panel);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.siteHeader__inner{
  padding-top: 14px;
  padding-bottom: 12px;

  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap: 16px;
  transition: width 160ms ease;
}

.siteHeader__name{
  display:inline-block;
  font-weight: 850;
  font-size: 24px;
  line-height: 1;
  color:#000;
}

.siteNav__list{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap: 6px 10px;
}

.siteNav__item{ margin:0; padding:0; }

.siteNav__link{
  display:inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  font-weight: 650;
  color: #222;
  white-space:nowrap;
}

.siteNav__link:hover{
  text-decoration:none;
  background: rgba(0,0,0,0.06);
}

.siteNav__link.is-active{
  background: rgba(153,17,34,0.12);
  color: var(--accent);
}

@media (max-width: 680px){
  .siteHeader__inner{
    flex-direction:column;
    align-items:stretch;
  }
  .siteNav__list{ justify-content:flex-start; }
}

/* =======================
   SUBNAV
======================= */

.subnav{
  background: #fff;
  border-bottom: 1px solid var(--rule);
}

.subnav__inner{
  padding-top: 10px;
  padding-bottom: 10px;
  display:flex;
  align-items:baseline;
  gap: 12px;
  flex-wrap:wrap;
}

.subnav__title{
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0.02em;
  color:var(--muted);
  text-transform: uppercase;
}

.subnav__list{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-wrap:wrap;
  gap: 6px 10px;
  align-items: flex-end;
}

.subnav__item{
  margin: 0;
  padding: 0;
}

/* Reserve border space so state changes don’t shift pill size */
.subnav__link{
  display:inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 650;
  color:#222;
  white-space:nowrap;
  line-height: 1.2;
  border: 1px solid transparent;
}

.subnav__link:hover{
  text-decoration:none;
  background: rgba(0,0,0,0.05);
}

.subnav__link.is-active{
  background: rgba(153,17,34,0.12);
  color: var(--accent);
}

@media (min-width: 900px){
  .subnav__title{ display:none; }
}

/* Inline slide-out group */
.subnav__inlineGroup{
  display: block;

  width: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;

  transform: translateX(-8px);

  /* cancels flex gap while collapsed (gap is 10px horizontally) */
  margin-left: -10px;

  transition:
    width 280ms ease,
    opacity 200ms ease,
    transform 280ms ease,
    margin-left 280ms ease;
}

.subnav__inlineGroup.is-visible{
  width: max-content;
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
  margin-left: 0;
}

.subnav__inlineGroupInner{
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 6px 10px;
  align-items: flex-end;
  white-space: nowrap;
  padding-left: 2px;
}

.subnav__link--child{
  padding: 2px 8px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.2;
}

@media (prefers-reduced-motion: reduce){
  .subnav__inlineGroup{
    transition: none;
    transform: none;
  }
}

/* Mobile: allow the group to wrap under */
@media (max-width: 680px){
  .subnav__inlineGroup{
    width: 100%;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    margin-left: 0;
    transition: none;
  }

  .subnav__inlineGroupInner{
    flex-wrap: wrap;
    padding-left: 0;
    margin-top: 6px;
  }
}

.subnav__link.is-parent{
  background: rgba(153,17,34,0.06);
  color: #222;
  border-color: rgba(153,17,34,0.18);
}

.subnav__link.is-parent:hover{
  background: rgba(153,17,34,0.10);
  border-color: rgba(153,17,34,0.26);
}

/* =======================
   PAGE HEADER
======================= */

.pageHeader{ background: var(--bg); }

.pageHeader__inner{
  padding-top: 26px;
  padding-bottom: 14px;
}

.pageHeader__title{
  text-align: center;
  margin: 0;
  color: var(--accent);
  line-height: 1.15;
  letter-spacing: 0.01em;
  padding-bottom: 6px;
}

/* =======================
   GENERIC FILTER CHIPS
======================= */

.filters{
  display:flex;
  flex-wrap:wrap;
  gap: 6px 10px;
  margin: 6px 0 14px;
}

.filterChip{
  display:inline-block;
  padding: 3px 10px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 650;
  color: #222;
  background: #fff;
}

.filterChip.is-active{
  border-color: rgba(153,17,34,0.35);
  background: rgba(153,17,34,0.10);
  color: var(--accent);
}

/* =======================
   RESEARCH: SUBCATEGORY CHIPS + HIGHLIGHT
======================= */

.researchCategory__head{
  display:flex;
  flex-wrap:wrap;
  align-items:baseline;
  gap: 8px 10px;
  margin: 0 0 0;
}

.researchCategory__head .researchCategory__title{
  margin: 0;
}

.researchCategory__head + h3{
  margin-top: 6px;
}

.subcatChips{
  margin-left: 0;
  justify-content:flex-start;
  display:flex;
  flex-wrap:wrap;
  gap: 6px 8px;
}

.subcatChip{
  --tone: var(--accent);
  appearance:none;
  border: 1px solid rgba(0,0,0,0.14);
  background:#fff;
  color:#222;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 13px;
  font-weight: 600;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap: 8px;
  opacity: 0.92;
  text-transform: none;
}

.subcatChip:hover{ background: rgba(0,0,0,0.03); }

.subcatChip__dot{
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--tone);
  opacity: 0.6;
}

.subcatChip.is-active{
  border-color: color-mix(in srgb, var(--tone) 30%, rgba(0,0,0,0.14));
  background: color-mix(in srgb, var(--tone) 10%, white);
  color: #111;
  opacity: 1;
}

.subcatChip[data-tone="rose"]{ --tone: #b42318; }
.subcatChip[data-tone="indigo"]{ --tone: #3f51b5; }
.subcatChip[data-tone="emerald"]{ --tone: #0f8a5f; }
.subcatChip[data-tone="amber"]{ --tone: #b26a00; }
.subcatChip[data-tone="slate"]{ --tone: #334155; }
.subcatChip[data-tone="cyan"]{ --tone: #0891b2; }
.subcatChip[data-tone="purple"]{ --tone: #7c3aed; }
.subcatChip[data-tone="blue"]{ --tone: #2563eb; }
.subcatChip[data-tone="red"]{ --tone: #dc2626; }
.subcatChip[data-tone="teal"]{ --tone: #0f766e; }
.subcatChip[data-tone="violet"]{ --tone: #6d28d9; }
.subcatChip[data-tone="fuchsia"]{ --tone: #c026d3; }

.rPubList__li.is-highlighted{ background: transparent; }

.rPubList__li.is-highlighted > .rPub{
  position: relative;
}

.rPubList__li.is-highlighted > .rPub::before{
  content:"";
  position:absolute;
  left: -6px;
  right: -6px;
  top: 2px;
  bottom: 2px;
  background: color-mix(in srgb, var(--tone, var(--accent)) 10%, transparent);
  border-radius: 0;
  pointer-events: none;
  z-index: 0;
}

.rPubList__li.is-highlighted > .rPub > *{
  position: relative;
  z-index: 1;
}

.rPubList__li[data-tone="rose"]{ --tone: #b42318; }
.rPubList__li[data-tone="indigo"]{ --tone: #3f51b5; }
.rPubList__li[data-tone="emerald"]{ --tone: #0f8a5f; }
.rPubList__li[data-tone="amber"]{ --tone: #b26a00; }
.rPubList__li[data-tone="slate"]{ --tone: #334155; }
.rPubList__li[data-tone="cyan"]{ --tone: #0891b2; }
.rPubList__li[data-tone="purple"]{ --tone: #7c3aed; }
.rPubList__li[data-tone="blue"]{ --tone: #2563eb; }
.rPubList__li[data-tone="red"]{ --tone: #dc2626; }
.rPubList__li[data-tone="teal"]{ --tone: #0f766e; }
.rPubList__li[data-tone="violet"]{ --tone: #6d28d9; }
.rPubList__li[data-tone="fuchsia"]{ --tone: #c026d3; }

@media (max-width: 620px){
  .subcatChips{
    margin-left: 0;
    justify-content: flex-start;
  }
}

.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;
}

/* =======================
   HIGHLIGHT BLOCKS
======================= */

.highlight__img,
.floatHighlight__img{
  display:block;
  max-width:100%;
  width:100%;
  height:auto;
  object-fit:contain;
}

.floatHighlight{
  max-width: 280px;
  margin: 0 0 1rem 0;
}

.floatHighlight--right{
  float: right;
  margin-left: 1.5rem;
}

.floatHighlight--left{
  float: left;
  margin-right: 1.5rem;
}

.floatHighlight__link,
.highlight__linkMedia{
  display:block;
  text-decoration:none;
  color:inherit;
}

.floatHighlight__caption{
  margin-top: .5rem;
  font-size: .9em;
  color: var(--muted);
}

.floatHighlight__credit,
.highlight__credit{
  display: block;
  font-size: 0.7em;
  opacity: 0.7;
  margin-top:  0.25em;
}

.highlight__text,
.highlight__text *{
  clear:none;
}

.highlight__title{
  text-align: left !important;
  margin: 0 0 0.5rem 0;
}

.highlight__kicker{
  text-align: left;
  font-size: 0.85em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.highlight__text{ text-align: left; }

.highlight__text p{
  text-align: left;
  margin: 0 0 0.75rem 0;
}

@media (max-width: 600px){
  .floatHighlight,
  .floatHighlight--right,
  .floatHighlight--left{
    float: none;
    max-width: 100%;
    margin: 0 0 1.5rem 0;
  }
}

/* =======================
   FEATURED SECTIONS
======================= */

.featuredSection{ margin-bottom: 3rem; }
.featuredSection:last-child{ margin-bottom: 0; }

.featuredSection::after{
  content: "";
  display: block;
  clear: both;
}

.featuredSection__bucketTitle{
  font-size: 1.1rem;
  font-weight: 700;
  margin: 1.25rem 0 0.5rem 0;
  color: var(--text);
}

.featuredSection__bucketTitle:first-of-type{
  margin-top: 0.75rem;
}

/* =======================
   RESEARCH PUBLICATION LIST
======================= */

.rPubList{
  list-style: disc;
  margin: 0 0 0.5rem 0;
  padding-left: 1.25em;
}

/* =======================
   PAGE RHYTHM (TYPE + SPACING)
======================= */

.page__inner{
  padding-top: 18px;
  padding-bottom: 28px;
}

/* When there IS a pageHeader, don’t double-add top padding below it */
.page:not(.page--noPageHeader) .page__inner{
  padding-top: 0;
}

/* Don’t start a page with a giant section margin */
.page__inner > .contentSection:first-child{
  margin-top: 0;
}

.page__inner h1,
.page__inner h2,
.page__inner h3{
  line-height: 1.2;
  margin-top: var(--blockGapLg);
  margin-bottom: 10px;
}

.page__inner h1:first-child,
.page__inner h2:first-child,
.page__inner h3:first-child{
  margin-top: 0;
}

.page__inner p{
  margin: 0 0 var(--blockGap);
}

.page__inner ul,
.page__inner ol{
  margin: 0 0 var(--blockGapLg);
  padding-left: 1.2em;
}

/* Global list-item margin (good for prose lists) */
.page__inner li{
  margin: 0.35em 0;
}

hr{
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 22px 0;
}

.u-clear{ clear: both; }

/* =======================
   PUBLICATION LIST SPACING OVERRIDES
======================= */

.page__inner .rPubList{
  margin: 0 0 0.5rem 0;
  padding-left: 1.25em;
}

.page__inner .rPubList li{
  margin: 0;
}

.page__inner .rPubList > .rPubList__li{
  margin: 0.22em 0;
}

.page__inner .rPubList.rPubList--sub{
  margin: 0.12em 0 0;
  padding-left: 1.25em;
}

.page__inner .rPubList.rPubList--sub > .rPubList__li{
  margin: 0.18em 0;
}

.page__inner .rPub__line1{ line-height: 1.35; }
.page__inner .rPub__line2{ line-height: 1.45; margin-top: 0.02em; }

.page__inner .pubList__related{
  margin: 0.12em 0 0;
  padding-left: 1.25em;
}

.page__inner .pubList__related li{
  margin: 0;
}

.page__inner .pubList__relatedItem{
  margin: 0.18em 0;
}

/* =======================
   TEACHING
======================= */

.teachingCourses .courseCard{
  padding-bottom: 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--rule);
}

.teachingCourses .courseCard:last-child{
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.teachingCourses .courseCard__title{
  margin: 0 0 10px 0;
}

.teachingCourses .courseCard__schoolLine{
  margin: 0;
  padding-left: 18px;
}

.teachingCourses .courseCard__desc{
  margin-bottom: 10px;
}

.teachingCourses .courseCard__fnRef{
  font-size: 0.75em;
  vertical-align: super;
  margin-left: 4px;
}

.teachingCourses .courseCard__fnRef a{
  color: var(--muted);
  text-decoration: none;
}

.teachingCourses .courseCard__fnRef a:hover{
  text-decoration: underline;
}

.teachingFootnotes{
  margin-top: 44px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}

.teachingFootnotes__list{
  margin: 0;
  padding-left: 1.2em;
  color: var(--muted);
  font-size: 0.95em;
}

/* =======================
   PUZZLES
======================= */

.puzzleItem{
  margin: 0 0 1.5rem 0;
}
.puzzleItem:last-child{
  margin-bottom: 0;
}
.puzzleItem::after{
  content:"";
  display:block;
  clear: both;
}

.centerShowcase{
  margin: 1.25rem auto;
  text-align: center;
}
.centerShowcase__img{
  max-width: 520px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0.5rem auto 0;
}
.centerShowcase__caption{
  font-size: 0.95em;
  color: var(--muted);
  margin-top: 0.5rem;
}

/* =======================
   SHOWCASE GALLERY MODE
======================= */

.featuredSection--gallery{
  margin: 0;
  padding: 0;
  clear: both;
}

.featuredSection--gallery + .featuredSection--gallery{
  margin-top: 2.75rem;
}

.showcaseFeature--noMedia{
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 26px 0 28px 0;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.showcaseFeature__body h2,
.showcaseFeature__body h3,
.showcaseFeature__body .highlight__title{
  margin-top: 0;
}

.puzzlesPage--gallery .showcaseFeature__body{
  width: 100%;
  max-width: 860px;
  min-width: 0;
  margin-left: auto;
  margin-right: auto;
  padding-left: 0;
  padding-right: 0;
}

.puzzleBuckets{ margin-top: 1.25rem; }
.puzzleBucket{ margin-top: 1.25rem; }

.puzzleItem--gallery{
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin: 1.25rem 0;
}

.puzzleItem--gallery::after{ content: none; }

.puzzleThumb{ margin: 0; }

.puzzleThumb__link{
  display: block;
  text-decoration: none;
  color: inherit;
}

.puzzleThumb__img{
  width: 140px;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--r);
  box-shadow: 0 8px 18px rgba(0,0,0,0.14);
}

.puzzleTitle{
  margin: 0;
  line-height: 1.15;
}

.puzzleMeta__line{
  color: var(--muted);
  font-size: 0.95em;
  margin-top: 0.1rem;
  line-height: 1.35;
}

.puzzleDescription{ margin-top: 0.45rem; }

.puzzleCommentary{
  margin-top: 0.35rem;
  color: rgba(0,0,0,0.64);
  font-size: 0.95em;
  line-height: 1.55;
  padding-left: 0.75rem;
  border-left: 2px solid rgba(0,0,0,0.10);
}

.puzzleCollaborator a{
  color: inherit;
  text-decoration: none;
}
.puzzleCollaborator a:hover{ text-decoration: underline; }

@media (max-width: 760px){
  .puzzleItem--gallery{
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 14px;
  }
  .puzzleThumb__img{ width: 112px; }
}

.puzzleShowcase{
  margin: 1.25rem 0 2rem;
  padding-bottom: 22px;
}

.puzzleShowcase__link{
  display: block;
  text-decoration: none;
  color: inherit;
}

.puzzleShowcase__media{
  display: flex;
  justify-content: center;
  padding-bottom: 12px;
}

.puzzleShowcase__img{
  display: block;
  width: 100%;
  height: auto;
  max-width: 560px;
  border-radius: var(--r);
  box-shadow: 0 8px 18px rgba(0,0,0,0.14);
}

.centerShowcase--inline .puzzleShowcase__img{ max-width: 520px; }

.puzzleShowcase + .prose,
.puzzleShowcase + .contentSection__html,
.puzzleShowcase + p{ margin-top: 0; }

@media (max-width: 760px){
  .puzzleShowcase__img{ max-width: 100%; }
}

.puzzleShowcase__text{
  margin-top: 0.75rem;
  text-align: center;
}

.puzzleShowcase__title{ font-weight: 700; }

.puzzleShowcase__desc{
  margin-top: 0.35rem;
  color: var(--muted);
}

/* =======================
   GENERIC CONTENT SECTIONS
======================= */

.contentSection{
  margin: 2.25rem 0;
}

.contentSection + .contentSection{
  padding-top: 0.75rem;
  border-top: 1px solid rgba(0,0,0,0.08);
}

/* =======================
   ART: SERIES PAGE LAYOUT
======================= */

.artPageHeader{ margin-bottom: 1rem; }

.artSeriesStack{
  display: grid;
  gap: 2.25rem;
  margin: 1rem 0 2.25rem;
}

.artDetail{
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: start;
}

/* Media stage: centered, lightly framed */
.artDetail__media{
  width: 100%;
  max-width: min(var(--artStageMax), 100%);
  margin: 0 auto;
  padding: var(--artStagePad);
  background: var(--artStageBg);
  border: 1px solid var(--artStageBorder);
  border-radius: var(--r);
  box-shadow: var(--artStageShadow);
}

.artDetail__body{
  width: 100%;
  max-width: var(--artBodyMax);
  margin: 0 auto;
}

.artDetail__mediaLink{
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: calc(var(--r) - 2px);
  outline: none;
}

/* Enhance stage border/shadow when the wrapped link is hovered/focused (when :has is available) */
@supports selector(.artDetail__media:has(a.artDetail__mediaLink:hover)){
  .artDetail__media:has(a.artDetail__mediaLink:hover){
    border-color: rgba(153,17,34,0.25);
    box-shadow: 0 12px 30px rgba(0,0,0,0.10);
  }
}
@supports selector(.artDetail__media:has(a.artDetail__mediaLink:focus-visible)){
  .artDetail__media:has(a.artDetail__mediaLink:focus-visible){
    border-color: rgba(153,17,34,0.35);
    box-shadow: 0 12px 30px rgba(0,0,0,0.10);
  }
}

/* Fallback focus ring for browsers without :has */
.artDetail__mediaLink:focus-visible{
  outline: 3px solid rgba(153,17,34,0.25);
  outline-offset: 6px;
}

.artDetail__title{
  margin: 0 0 0.35rem 0;
  line-height: 1.15;
}

.artDetail__badges{
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 0.35rem 0 0.25rem;
}

.artDetail__metaLine{
  color: var(--muted);
  font-size: 0.95em;
  margin: 0.15rem 0;
}

.artDetail__desc{
  margin: 0.75rem 0 0.75rem;
  word-break: break-word;
}

.artDetail__section{ margin-top: 1.25rem; }

.artDetail__sectionTitle{
  font-weight: 700;
  margin: 0 0 0.5rem 0;
}

.artDetail__list{
  margin: 0 0 var(--blockGapLg);
  padding-left: 1.2em;
}

.artDetail__html{
  overflow-wrap: anywhere;
  word-break: break-word;
}

.artDetail__mono{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.95em;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.artDetail__desc--spaced{ margin-top: var(--blockGapLg); }
.artCard__desc--spaced{ margin-top: var(--blockGapLg); }

.artAvailability{ font-style: italic; }
.price{ font-style: normal; }
.artMeta__availability{ font-style: normal; }

/* =======================
   ART: MEDIA SCALING (stage-friendly)
======================= */

.artMedia--image,
.artMedia--iframe{
  max-width: 100%;
}

.artMedia__frame{
  width: 100%;
  display: grid;
  place-items: center;
}

.artMedia__img{
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: var(--artStageMaxH);
  object-fit: contain;
  object-position: center;
  image-rendering: auto;
}

.artMedia--fit-contain .artMedia__frame{ max-height: var(--artStageMaxH); }
.artMedia--fit-contain .artMedia__img{ max-height: var(--artStageMaxH); }

.artMedia--fit-natural .artMedia__frame{ max-height: var(--artStageMaxH); }
.artMedia--fit-natural .artMedia__img{ max-height: var(--artStageMaxH); }

.artMedia--iframe{
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: rgba(0,0,0,0.04);
  border-radius: calc(var(--r) - 2px);
  overflow: hidden;
}

.artMedia__iframe{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.artMedia__video{
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: var(--artStageMaxH);
  object-fit: contain;
  object-position: center;
  border-radius: calc(var(--r) - 2px);
}

@media (max-width: 600px){
  .artDetail__media{ padding: 14px; }
}

.artAvailability.badge{
  text-decoration: none;
  color: inherit;
}
.artAvailability.badge:hover{
  text-decoration: underline;
}

/* =======================
   ART: PORTFOLIO PAGE
======================= */

.artPortfolioPage__header{
  margin: 0 0 1.25rem 0;
}

.artPortfolioPage__title{
  margin: 0 0 0.5rem 0;
}

.artPortfolioPage__intro{
  max-width: 70ch;
  font-size: 0.98rem;
  line-height: 1.45;
  color: var(--muted);
}

.artPortfolio{
  display: grid;
  gap: 1.25rem;
}

.artPortfolioRow{
  display: grid;
  grid-template-columns: minmax(220px, 340px) 1fr;
  gap: 1.25rem;
  align-items: start;
  padding: 0;
  border: 0;
  background: transparent;
}

@media (max-width: 760px){
  .artPortfolioRow{
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

.artPortfolioRow__media .artMedia{ margin: 0; }

.artPortfolioRow__media .artMedia__frame{
  background: transparent !important;
  border-radius: 0 !important;
  padding: 0 !important;
}

.artPortfolioRow__media .artMedia__img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0.5rem;
}

.artPortfolioRow__media .artMedia--fit-cover .artMedia__img{
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.artPortfolioRow__title{
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.artPortfolioRow__titleLink{
  text-decoration: none;
}

.artPortfolioRow__titleLink:hover{
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.artPortfolioRow__meta{
  margin-top: 0.35rem;
  font-size: 0.95rem;
  line-height: 1.35;
  color: color-mix(in srgb, var(--muted) 85%, #000);
}

.artPortfolioRow__badges{
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
}

.artPortfolioRow__badges .badge{
  font-size: 0.78rem;
  padding: 0.18rem 0.45rem;
}

.artPortfolioRow__note{
  margin-top: 0.6rem;
  font-size: 0.93rem;
  line-height: 1.4;
  color: color-mix(in srgb, var(--muted) 85%, #000);
}

.artPortfolioRow__note p{
  margin: 0.35rem 0 0 0;
}
.artPortfolioRow__note p:first-child{
  margin-top: 0;
}

.artPortfolio__missing,
.artPortfolio__empty{
  color: color-mix(in srgb, var(--muted) 85%, #000);
  max-width: 70ch;
}

.artPortfolioRow__seriesLink{
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

@media (hover: hover){
  .artPortfolioRow__seriesLink:hover{
    text-decoration: none;
    border-bottom-color: currentColor;
  }
}

.artPortfolioRow__seriesLink:focus-visible{
  outline: 3px solid rgba(153,17,34,0.20);
  outline-offset: 2px;
  border-bottom-color: currentColor;
}

/* =======================
   ART: ALL SERIES INDEX
======================= */

.artSeriesIndex{
  display: grid;
  gap: 1.25rem;
}

.artSeriesRow{
  display: grid;
  grid-template-columns: minmax(220px, 340px) 1fr;
  gap: 1.25rem;
  align-items: start;
  padding: 0;
  background: transparent;
  border: 0;
}

@media (max-width: 760px){
  .artSeriesRow{
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

.artSeriesRow__media .artMedia{ margin: 0; }

.artSeriesRow__media .artMedia__frame{
  background: transparent !important;
  border-radius: 0 !important;
  padding: 0 !important;
}

.artSeriesRow__media .artMedia__img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0.5rem;
}

.artSeriesRow__media .artMedia__video{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0.5rem;
}

.artSeriesRow__title{
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.artSeriesRow__titleLink{
  text-decoration: none;
  color: inherit;
}

.artSeriesRow__titleLink:hover{
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.artSeriesRow__meta{
  margin-top: 0.35rem;
  font-size: 0.95rem;
  line-height: 1.35;
  color: color-mix(in srgb, var(--muted) 85%, #000);
}

.artSeriesRow__note{
  margin-top: 0.6rem;
  font-size: 0.93rem;
  line-height: 1.4;
  color: color-mix(in srgb, var(--muted) 85%, #000);
}

.artSeriesRow__note .prose{
  margin: 0;
  max-width: none;
}

.artSeriesRow__note p{
  margin: 0.35rem 0 0 0;
}
.artSeriesRow__note p:first-child{
  margin-top: 0;
}

.artSeriesRow__mediaLink{
  display: block;
  color: inherit;
  text-decoration: none;
}

@media (hover: hover){
  .artSeriesRow__mediaLink:hover .artMedia__img{
    filter: saturate(1.02) contrast(1.02);
  }
  .artSeriesRow__mediaLink:hover{
    text-decoration: none;
  }
}

/* =======================
   ART: CAUSES PAGE
======================= */

.artCause{
  display: grid;
  grid-template-columns: minmax(240px, 420px) 1fr;
  gap: 1.25rem;
  align-items: start;
  margin-bottom: 1.25rem;
}

@media (max-width: 760px){
  .artCause{
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

.artCause__title{
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.artCause__intro .prose{
  margin: 0;
  max-width: 70ch;
}

.artCause__stats{
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.artCause__statLabel{
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 700;
}

.artCause__statValue{
  font-size: 1.15rem;
  font-weight: 750;
}

.artCause__entities{ margin-top: 0.75rem; }

.artCause__entitiesLabel{
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.artCause__entitiesList{
  margin: 0;
  padding-left: 1.2em;
}

.artCause__works{ margin-top: 0.9rem; }

.artCause__worksLabel{
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.artCause__worksList{
  margin: 0;
  padding-left: 1.2em;
}

.artCause__work{ margin: 0.25rem 0; }

.artCause__workTitle{ font-weight: 650; }

.artCause__workMeta{
  color: var(--muted);
  font-weight: 500;
}

.artCause__collect{
  font-weight: 650;
  text-decoration: none;
  border-bottom: 1px solid rgba(153,17,34,0.35);
}

@media (hover:hover){
  .artCause__collect:hover{
    text-decoration: none;
    border-bottom-color: currentColor;
  }
}

/* =======================
   COLLECTION: HERO GRID (existing cards)
======================= */

.collectionHeroGrid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 900px){
  .collectionHeroGrid{
    grid-template-columns: 1fr 1fr;
  }
}

.collectionHero{
  border: 1px solid var(--hairline);
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel);
}

.collectionHero__body{
  padding: 1rem 1.1rem 1.1rem;
}

.collectionHero__title{
  margin: 0 0 0.5rem;
}

/* =======================
   COLLECTION: GALLERIES INDEX (landing cards)
======================= */

.galleryIndexGrid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

@media (min-width: 900px){
  .galleryIndexGrid{
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}

.galleryIndexCard{
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 26px rgba(0,0,0,0.06);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

@media (hover:hover){
  .galleryIndexCard:hover{
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(0,0,0,0.08);
    border-color: rgba(153,17,34,0.20);
  }
}

.galleryIndexCard__media{
  position: relative;
  background: #f3f3f3;
}

.galleryIndexCard__mediaLink{
  display:block;
  text-decoration:none;
  color: inherit;
}

.galleryIndexCard__media .artMedia__frame{
  padding: 0 !important;
}

.galleryIndexCard__media .artMedia__img{
  width: 100%;
  height: auto;
  display:block;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.galleryIndexCard__badgeRow{
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: flex;
  gap: 8px;
  align-items: center;

  padding: 2px;
  border-radius: 999px;
  background: rgba(0,0,0,0.10);
}

.galleryIndexCard__count{
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #222;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(0,0,0,0.10);
  backdrop-filter: blur(6px);
}

/* Badge treatment when shown on top of images */
.galleryIndexCard__badgeRow .badge{
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #222;
  background: rgba(153,17,34,0.10);
  border: 1px solid rgba(153,17,34,0.18);
  backdrop-filter: blur(6px);
}

.galleryIndexCard__badgeRow .badge--comingSoon{
  background: rgba(153,17,34,0.92);
  border-color: rgba(0,0,0,0.12);
  color: #fff;
  text-shadow: 0 1px 1px rgba(0,0,0,0.25);
}

.galleryIndexCard__body{
  padding: 0.95rem 1.05rem 1.05rem;
}

.galleryIndexCard__title{
  margin: 0 0 0.5rem 0;
  line-height: 1.15;
}

.galleryIndexCard__title a{
  color: inherit;
  text-decoration: none;
}

.galleryIndexCard__title a:hover{
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.galleryIndexCard__intro{
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.galleryIndexCard__intro .prose{
  margin: 0;
  max-width: none;
}

.galleryIndexCard__intro p{
  margin: 0.35rem 0 0 0;
}
.galleryIndexCard__intro p:first-child{
  margin-top: 0;
}

.galleryIndexCard__peek{
  margin-top: 0.75rem;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.galleryIndexCard__peekImg{
  width: 100%;
  max-width: 84px;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(0,0,0,0.10);
  background: #f3f3f3;
}

.galleryIndexCard__peekLink{
  display: inline-block;
  border-radius: 10px;
}

.galleryIndexCard__peekLink:focus-visible{
  outline: 3px solid rgba(153,17,34,0.22);
  outline-offset: 2px;
}

/* “More…” tile: visually minimal, aligned lower */
.galleryIndexCard__peekMore{
  width: 100%;
  max-width: 84px;
  aspect-ratio: 1 / 1;

  background: transparent;
  border: 0;
  box-shadow: none;

  display: flex;
  align-items: flex-end;
  justify-content: left;
  padding-bottom: 14px;

  color: rgba(0,0,0,0.55);
  font-weight: 900;
  font-size: 28px;
  line-height: 1;

  text-decoration: none;
  user-select: none;
  border-radius: 10px; /* for focus ring hitbox */
}

@media (hover:hover){
  .galleryIndexCard__peekMore:hover{
    color: rgba(0,0,0,0.75);
    background: rgba(0,0,0,0.03);
  }
}

.galleryIndexCard__peekMore:focus-visible{
  outline: 3px solid rgba(153,17,34,0.22);
  outline-offset: 2px;
  background: rgba(153,17,34,0.06);
}

.galleryIndexCard__cta{
  margin-top: 0.85rem;
  font-weight: 700;
}

/* =======================
   COLLECTION: WALL LAYOUT + TYPOGRAPHY
======================= */

.collectionWall{
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-top: 1.5rem;
}

@media (min-width: 900px){
  .collectionWall{ gap: 3.25rem; }
}

.collectionWallItem{
  max-width: 60rem;
  margin: 0 auto;
  scroll-margin-top: 90px;
}

.collectionWallItem__caption{
  margin-top: 0.65rem;
  text-align: center;
}

.collectionWallItem__titleLine{ line-height: 1.2; }

.collectionWallItem__title{
  font-size: 1.25rem;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.collectionWallItem__comment{
  margin-top: 0.6rem;
  text-align: left;
}

.collectionWallItem__metaLine{
  margin-top: 0.25rem;
  font-size: 0.95rem;
  opacity: 0.9;
  color: var(--muted);
}

.collectionWallItem__seriesLabel{
  margin-right: 0.35rem;
  opacity: 0.8;
}

.collectionWallItem__by{
  margin-right: 0.35rem;
  opacity: 0.8;
}

.collectionWallItem__links{
  margin-top: 0.45rem;
  font-size: 0.95rem;
}

.collectionWallItem__links--spacer{ line-height: 1; }

/* =======================
   COLLECTION: CLICK-TO-ZOOM LIGHTBOX
======================= */

.collectionZoomBtn{
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
}

.collectionZoomBtn:focus-visible{
  outline: 3px solid rgba(153,17,34,0.22);
  outline-offset: 6px;
  border-radius: var(--r);
}

.zoomOverlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.82);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 18px;
}

.zoomOverlay.is-open{ display: flex; }

.zoomOverlay__panel{
  max-width: min(1200px, 100%);
  max-height: min(92vh, 100%);
  width: 100%;
  display: grid;
  gap: 10px;
}

.zoomOverlay__bar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255,255,255,0.92);
  font-size: 14px;
}

.zoomOverlay__title{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1 1 auto;
}

.zoomOverlay__zoomCtl{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.zoomOverlay__zoomLabel{
  opacity: 0.85;
  font-size: 13px;
}

.zoomOverlay__zoomCtl input[type="range"]{
  width: 150px;
}

@media (max-width: 520px){
  .zoomOverlay__zoomLabel{ display: none; }
  .zoomOverlay__zoomCtl input[type="range"]{ width: 120px; }
}

.zoomOverlay__close{
  appearance: none;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  color: #fff;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  flex: 0 0 auto;
}

.zoomOverlay__stage{
  display: grid;
  place-items: center;
  padding: 10px;
  overflow: auto;
  max-height: 86vh;
  touch-action: none;
  background: rgba(255,255,255,0.02);
  border-radius: 10px;
}

.zoomOverlay__img{
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;

  transform-origin: center center;
  transition: transform 80ms linear;

  user-select: none;
  -webkit-user-drag: none;
}

.zoomOverlay__stage.is-zoomed{ cursor: grab; }
.zoomOverlay__stage.is-dragging{ cursor: grabbing; }

/* =======================
   COLLECTION: GALLERY HEADER
======================= */

.collectionGalleryHeader{
  width: min(var(--pageW), var(--max));
  margin: 0 auto;
  padding-left: var(--pagePad);
  padding-right: var(--pagePad);
  padding-top: 18px;
  padding-bottom: 10px;
  text-align: center;
}

.collectionGalleryHeader__title{
  margin: 0;
  font-size: clamp(2rem, 3.2vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #111;
}

.collectionGalleryHeader__intro{
  margin-top: 0.65rem;
  max-width: 70ch;
  color: var(--muted);
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.collectionGalleryHeader + .collectionWall{
  margin-top: 1.75rem;
}

/* =======================
   ART: INLINE COLLABORATORS (“with …”)
======================= */

.artWithInline{
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-left: 0.55rem;
  font-weight: 400;
  opacity: 0.72;
  white-space: normal;
  flex-wrap: wrap;
}

.artWithInline__label{
  font-style: italic;
  font-weight: 350;
  opacity: 0.95;
}

.artWithInline__list{ display: inline; }

.artWithInline__name{
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(0,0,0,0.18);
  text-underline-offset: 0.15em;
}

@media (hover:hover){
  .artWithInline__name:hover{
    border-bottom-color: rgba(0,0,0,0.45);
    text-decoration: none;
  }
}

.artWithInline__sep{
  margin-left: 0.15rem;
  margin-right: 0.15rem;
}

.artDetail__title .artWithInline,
.artCard__title .artWithInline,
.artSeriesRow__title .artWithInline{
  font-size: 0.72em;
  line-height: 1.2;
  vertical-align: baseline;
}

.artSeriesTitleRow{
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.artSeriesComingSoon{
  margin: 0.75rem 0 1rem;
}

.artSeriesComingSoon__stage{
  gap: 0;
}

/* If older block collaborator styles exist in templates, hide them */
.artCollaborators{
  display: none;
}