/* ERHML: public library */

.wrap { width: 100%; max-width: 1360px; margin: 0 auto; padding-inline: clamp(20px, 5vw, 64px); }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--black); color: var(--white); padding: .5em 1em; font-weight: 700; }
.skip:focus { left: 8px; }


/* ---------- Header ---------- */
.masthead { position: sticky; top: 0; z-index: 50; background: transparent; color: var(--white); transition: background-color .45s var(--ease-soft), box-shadow .4s var(--ease-soft); }
.masthead::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(rgba(0, 0, 0, .42), rgba(0, 0, 0, 0)); opacity: 1; transition: opacity .45s var(--ease-soft); pointer-events: none; }
.masthead.scrolled { background: var(--green); box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .35); }
.masthead.scrolled::before { opacity: 0; }
.masthead-inner { display: flex; align-items: center; gap: 24px; height: 84px; transition: height .4s var(--ease); }
.masthead.scrolled .masthead-inner { height: 66px; }
.brand { display: flex; align-items: center; gap: 18px; margin-right: auto; min-width: 0; text-decoration: none; }
.logo-erhml { height: 66px; width: auto; transition: height .4s var(--ease); }
.brand-rule { align-self: stretch; width: 1px; margin-block: 14px; background: rgba(255, 255, 255, .32); }
.logo-efprp { height: 42px; width: auto; }
.logo-eanenp { height: 32px; width: auto; }
/* The two organisations' logos only show on the green header, their approved background:
   over the hero photographs the library's own wordmark stands alone. */
.logo-efprp, .logo-eanenp, .brand-rule { transition: height .4s var(--ease), opacity .45s var(--ease-soft), max-width .55s var(--ease), margin-inline .55s var(--ease); max-width: 240px; }
body:not(.solid-head) .masthead:not(.scrolled) .logo-efprp,
body:not(.solid-head) .masthead:not(.scrolled) .logo-eanenp,
body:not(.solid-head) .masthead:not(.scrolled) .brand-rule { max-width: 0; margin-inline: -9px; opacity: 0; pointer-events: none; }
.masthead.scrolled .logo-erhml { height: 52px; }
.masthead.scrolled .logo-efprp { height: 38px; }
.masthead.scrolled .logo-eanenp { height: 30px; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a:not(.btn) { position: relative; padding: 4px 0; font-size: 1.05rem; font-weight: 700; color: var(--white); text-decoration: none; }
.nav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; border-radius: 2px; background: var(--yellow); transform: scaleX(0); transition: transform .35s var(--ease); }
.nav a:not(.btn):hover::after, .nav a.active::after { transform: scaleX(1); }
.nav-toggle { display: none; min-height: 40px; padding: 0 14px; border: 1.5px solid var(--white); border-radius: 10px; background: transparent; color: var(--white); font-weight: 700; cursor: pointer; }

/* ---------- Hero: the photographs are the background ---------- */
.hero {
  position: relative; display: grid; align-items: center; overflow: hidden;
  min-height: 100svh;
  padding-block: clamp(110px, 16vh, 190px) clamp(80px, 12vh, 140px);
  margin-top: calc(-1 * var(--masthead-h, 84px));
  background: var(--green-deep); color: var(--white);
}
.hero-bg { position: absolute; inset: -6% 0; z-index: 0; will-change: transform; }
.hero-layer { position: absolute; inset: 0; opacity: 0; transition: opacity 1.8s var(--ease-soft); }
.hero-layer.on { opacity: 1; }
.hero-layer img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.16); transition: transform 11s linear; }
.hero-layer.on img { transform: scale(1.02); }
.hero-veil {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .52) 0%, rgba(0, 0, 0, .28) 38%, rgba(0, 0, 0, .58) 82%, rgba(0, 0, 0, .78) 100%),
    radial-gradient(120% 90% at 50% 45%, rgba(4, 38, 24, .16) 0%, rgba(4, 38, 24, .5) 100%);
}
.hero > .wrap, .hero-credit, .hero-cue { position: relative; z-index: 2; }
/* --out runs from 0 to 1 as the hero leaves: the words lift away with it */
.hero > .wrap, .hero-credit { opacity: calc(1 - var(--out, 0) * 1.15); transform: translateY(calc(var(--out, 0) * -64px)); }
.hero-inner { display: grid; justify-items: center; text-align: center; }
[data-in] { animation: rise-in 1s var(--ease) both; animation-delay: var(--d, 0s); }
.hero-title {
  font-family: var(--display-strong); font-weight: 800; font-size: clamp(2.7rem, 7.2vw, 6.9rem);
  line-height: .96; letter-spacing: -.035em; text-shadow: 0 14px 40px rgba(0, 0, 0, .45);
}
.hero-title .word { display: inline-block; animation: rise-in 1.1s var(--ease) both; animation-delay: var(--d, 0s); }
.hero-title em { font-family: var(--display); font-weight: 400; font-size: 1.12em; letter-spacing: -.02em; color: var(--yellow); padding-right: .04em; }
.hero-lede { max-width: 34em; margin-top: 26px; font-size: clamp(1.1rem, 1.5vw, 1.28rem); color: rgba(255, 255, 255, .92); text-shadow: 0 6px 20px rgba(0, 0, 0, .45); }
.hero-search {
  display: flex; align-items: center; gap: 10px; width: min(640px, 100%); margin-top: 34px; padding: 7px 7px 7px 18px;
  background: var(--white); color: var(--ink); border-radius: 16px;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .6);
  transition: box-shadow .35s var(--ease-soft), transform .35s var(--ease);
}
.hero-search:focus-within { transform: translateY(-3px); box-shadow: 0 0 0 4px rgba(255, 215, 0, .6), 0 30px 70px -20px rgba(0, 0, 0, .6); }
.hero-search > .icon { color: var(--muted); }
.hero-search input { flex: 1; min-width: 0; padding: 10px 2px; border: 0; outline: none; background: transparent; font-size: 1.08rem; }
.hero-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 26px; margin-top: 18px; }
.hero-link { display: inline-flex; align-items: center; gap: 8px; padding: 6px 2px; border: 0; background: none; color: var(--white); font-weight: 700; text-decoration: none; cursor: pointer; text-shadow: 0 4px 18px rgba(0, 0, 0, .5); }
.hero-link:hover { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.hero-link:hover .icon-nudge { transform: translateX(4px); }
[data-surprise] .icon { transition: transform .5s var(--ease); }
[data-surprise]:hover .icon { transform: rotate(180deg); }

/* The photograph currently in the background, named and clickable */
.hero-credit {
  position: absolute; left: clamp(20px, 5vw, 64px); bottom: clamp(20px, 4vh, 38px); z-index: 2;
  display: grid; gap: 1px; max-width: min(420px, calc(100% - 40px)); padding: 10px 16px 10px 18px;
  border: 0; border-left: 2px solid var(--yellow); background: none; color: var(--white); text-align: left; cursor: pointer;
  animation: fade-in .9s var(--ease-soft) both;
}
.hero-credit .c-kicker { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--yellow); }
.hero-credit .c-title { font-family: var(--display); font-size: 1.32rem; line-height: 1.14; }
.hero-credit .c-place { font-size: .92rem; color: rgba(255, 255, 255, .82); }
.hero-credit > * { animation: rise-in .8s var(--ease) both; }
.hero-credit > :nth-child(2) { animation-delay: .06s; }
.hero-credit > :nth-child(3) { animation-delay: .12s; }
.hero-credit:hover .c-title { text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* Scroll cue */
.hero-cue {
  position: absolute; left: 50%; bottom: clamp(18px, 3.5vh, 34px); z-index: 2;
  display: grid; place-items: end center; width: 46px; height: clamp(46px, 8vh, 74px);
  padding: 0; border: 0; background: none; cursor: pointer; transform: translateX(-50%);
  opacity: calc(1 - var(--out, 0) * 2.2);
}
.hero-cue span { position: relative; display: block; width: 1px; height: 100%; background: linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, .75)); }
.hero-cue span::after { content: ""; position: absolute; left: -2px; bottom: 0; width: 5px; height: 5px; border-radius: 50%; background: var(--white); animation: cue 2.6s var(--ease-soft) infinite; }
.hero-cue:hover span::after { animation-duration: 1.4s; }
@keyframes cue { 0% { transform: translateY(-100%); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(0); opacity: 0; } }

/* ---------- Motion tied to the scroll ---------- */
/* Headings come up from behind a mask, word by word. */
.js [data-split] .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .06em; margin-bottom: -.06em; }
.js [data-split] .w > i { display: inline-block; font-style: inherit; transform: translateY(115%); transition: transform 1s var(--ease); transition-delay: calc(var(--wi, 0) * 65ms); }
.js [data-split].in .w > i, .js [data-split].shown .w > i { transform: none; }

/* The collections run sideways while the section is held in place. */
.run { position: relative; }
.run-sticky { position: sticky; top: 0; min-height: 100svh; display: grid; align-content: center; gap: clamp(20px, 3vh, 34px); padding-block: clamp(70px, 10vh, 120px); }
.run-viewport { overflow: hidden; }
.run-track { display: flex; gap: clamp(14px, 1.6vw, 24px); padding-inline: clamp(20px, 5vw, 64px); will-change: transform; }
.run-track .collection { flex: 0 0 clamp(230px, 24vw, 340px); }
.run-progress { }
.run-progress span { display: block; height: 2px; border-radius: 2px; background: var(--green); transform: scaleX(0); transform-origin: left; }
.run-progress::before { content: ""; display: block; height: 2px; border-radius: 2px; background: var(--line-2); margin-bottom: -2px; }

/* The hero photograph draws back into a card as the page takes over. */
.hero-bg { border-radius: calc(var(--k, 0) * 26px); overflow: hidden; }

/* Sections arrive from below, their parts one after the other. */
.js [data-reveal] { will-change: opacity, transform; }
.js [data-rise] { opacity: 0; transform: translateY(46px); filter: blur(6px); transition: opacity .9s var(--ease), transform 1s var(--ease), filter .9s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.js [data-rise].in { opacity: 1; transform: none; filter: none; }
/* Photographs settle as they cross the window */
.js .collection-media { transform: translate3d(var(--px, 0px), var(--py, 0px), 0); }
.js .invite-strip img { transform: translate3d(0, var(--py, 0px), 0); }
.js .collection { transition: transform .8s var(--ease); }

/* The header steps out of the way when you read down, and comes back when you scroll up */
.masthead { transform: translateY(var(--head-y, 0)); transition: transform .45s var(--ease), background-color .45s var(--ease-soft), box-shadow .4s var(--ease-soft); }
.masthead.away { --head-y: -110%; }

/* ---------- Reading progress, section dots, back to top ---------- */
.progress { position: fixed; inset: 0 0 auto 0; z-index: 61; height: 4px; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--yellow); transform: scaleX(0); transform-origin: left; }

.dots { position: fixed; right: clamp(12px, 2vw, 24px); top: 50%; z-index: 45; display: grid; gap: 14px; transform: translateY(-50%); }
.dots a { position: relative; display: block; width: 10px; height: 10px; border-radius: 50%; background: rgba(0, 0, 0, .22); transition: background-color .35s var(--ease-soft), transform .45s var(--ease); }
.dots a::before { content: ""; position: absolute; inset: -8px; }
.dots a span {
  position: absolute; right: 20px; top: 50%; padding: 4px 10px; border-radius: 999px;
  background: var(--black); color: var(--white); font-size: .78rem; font-weight: 700; white-space: nowrap;
  opacity: 0; transform: translate(6px, -50%); transition: opacity .3s var(--ease-soft), transform .35s var(--ease); pointer-events: none;
}
.dots a:hover span, .dots a:focus-visible span { opacity: 1; transform: translate(0, -50%); }
.dots a:hover { background: var(--black); }
.dots a.active { background: var(--green); transform: scale(1.5); }
/* over the photographs at the top of the page the dots are light */
.dots.on-photo a { background: rgba(255, 255, 255, .45); }
.dots.on-photo a.active { background: var(--yellow); }

.to-top {
  position: fixed; right: clamp(16px, 3vw, 34px); bottom: clamp(16px, 3vw, 34px); z-index: 45;
  display: grid; place-items: center; width: 46px; height: 46px; padding: 0;
  border: 1px solid var(--line-2); border-radius: 50%; background: var(--white); color: var(--ink); cursor: pointer;
  box-shadow: 0 18px 34px -18px rgba(0, 0, 0, .5);
  animation: rise-in .5s var(--ease) both;
  transition: transform .35s var(--ease), background-color .3s, color .3s;
}
.to-top:hover { transform: translateY(-4px); background: var(--green); border-color: var(--green); color: var(--white); }
.to-top[hidden] { display: none; }

/* ---------- Library page head ---------- */
.page-head { padding-block: clamp(44px, 7vw, 86px) clamp(26px, 3vw, 40px); }
.page-kicker { font-size: .95rem; font-weight: 700; color: var(--muted); }
.page-title { margin-top: 10px; font-family: var(--display-strong); font-weight: 800; font-size: clamp(2.7rem, 6.6vw, 5.6rem); line-height: .98; letter-spacing: -.035em; }
.page-title .word { display: inline-block; animation: rise-in 1.1s var(--ease) both; animation-delay: var(--d, 0s); }
.page-title em { font-family: var(--display); font-weight: 400; font-size: 1.12em; font-style: italic; letter-spacing: -.02em; color: var(--green); }
.page-lede { max-width: 38em; margin-top: 18px; font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--ink-2); }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 22px; }
.library.section { padding-top: clamp(20px, 3vw, 34px); }
/* the 404 page: one message, centred in the window */
.page-head.lost { min-height: calc(100svh - 84px - 90px); display: grid; align-content: center; }

/* ---------- Reporting ---------- */
.report-section { padding-top: clamp(24px, 4vw, 52px); }
.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 3vw, 34px); }
.report-card { padding: clamp(24px, 3.5vw, 48px); border-top: 4px solid var(--green); background: var(--surface); }
.report-card:nth-child(2) { border-top-color: var(--yellow); }
.report-label { margin-bottom: 14px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--green); }
.report-card:nth-child(2) .report-label { color: var(--ink); }
.report-card h2 { max-width: 15em; font-family: var(--display); font-size: clamp(1.9rem, 3vw, 2.8rem); font-weight: 400; line-height: 1.08; }
.report-card h3 { margin-top: 30px; font-size: 1.25rem; color: var(--green); }
.report-card p { max-width: 42em; margin-top: 18px; color: var(--ink-2); }
.report-card a { color: var(--green-deep); font-weight: 700; text-underline-offset: 3px; }
.report-card ul { display: grid; gap: 10px; margin: 16px 0 0 1.2em; color: var(--ink-2); }
.report-card li::marker { color: var(--yellow); }

/* the library page never starts on a photograph, so its header is green at once */
.solid-head .masthead { background: var(--green); }
.solid-head .masthead::before { opacity: 0; }

/* ---------- The way into the library ---------- */
.invite { background: var(--surface); }
.invite-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.invite-copy h2 { font-size: clamp(2.4rem, 5vw, 4.4rem); }
.invite-copy h2 em { color: var(--green); }
.invite-lede { max-width: 30em; margin-top: 16px; font-size: 1.12rem; color: var(--ink-2); }
.invite-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.invite-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; align-items: center; text-decoration: none; }
.invite-strip img {
  width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: var(--r-s);
  transform: translate3d(0, var(--py, 0px), 0); transition: filter .5s var(--ease-soft);
  filter: saturate(.92);
}
.invite-strip:hover img { filter: none; }
.invite-strip img:nth-child(even) { aspect-ratio: 3 / 5; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(72px, 9vw, 120px); }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 400; }
.section-head h2 em { color: var(--green); }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--black); text-decoration: none; }
.text-link:hover { color: var(--green); }
.text-link:hover .icon-nudge { transform: translateX(4px); }


/* ---------- Collections ---------- */
.collections { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 22px; }
.collection { display: grid; gap: 4px; align-content: start; padding: 0; border: 0; background: none; color: var(--ink); text-align: left; cursor: pointer; }
.collection-media { position: relative; aspect-ratio: 4 / 5; margin-bottom: 14px; overflow: hidden; border-radius: var(--r); background: var(--surface); transition: transform .6s var(--ease), box-shadow .6s var(--ease); }
.collection-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.08); transition: opacity .9s var(--ease-soft), transform 1.4s var(--ease); }
.collection-media img.on { opacity: 1; transform: scale(1); }
.collection:hover .collection-media { transform: translateY(-6px); box-shadow: 0 26px 44px -22px rgba(0, 0, 0, .45); }
.collection:hover .collection-media img.on { transform: scale(1.06); }
.collection-count { position: absolute; top: 12px; left: 12px; z-index: 1; padding: 3px 11px; border-radius: 999px; background: rgba(255, 255, 255, .94); font-size: .84rem; font-weight: 700; color: var(--ink); }
.collection .c-name { font-family: var(--display); font-size: 1.6rem; line-height: 1.08; }
.collection .c-go { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 700; transition: color .3s; }
.collection:hover .c-go { color: var(--green); }
.collection:hover .c-go .icon-nudge { transform: translateX(4px); }

/* ---------- Featured story ---------- */
/* The featured story is told over its own photograph, not over a flat colour */
.feature { position: relative; overflow: hidden; background: var(--ink); color: var(--white); }
.feature-inner { position: relative; display: grid; align-items: center; min-height: min(84vh, 640px); }
.feature-media { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.feature-media img { position: absolute; left: 0; top: -10%; width: 100%; height: 120%; object-fit: cover; transform: translate3d(0, var(--py, 0px), 0); will-change: transform; }
.feature-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, .82) 0%, rgba(0, 0, 0, .62) 40%, rgba(0, 0, 0, .18) 74%, rgba(0, 0, 0, .05) 100%); }
.feature-copy { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; gap: 18px; width: min(660px, 100%); padding: clamp(40px, 6vw, 96px); }
.feature-copy .label { color: var(--yellow); }
.feature-copy h2 { font-size: clamp(2.2rem, 4vw, 3.4rem); font-weight: 400; }
.feature-meta { color: rgba(255, 255, 255, .8); }
.feature-story { max-width: 34em; font-size: 1.1rem; color: rgba(255, 255, 255, .94); }
.feature-copy .btn { align-self: flex-start; margin-top: 8px; }

/* ---------- Library ---------- */


.timeline { margin-top: 18px; padding: 14px 18px 10px; border: 1px solid var(--line); border-radius: var(--r); }
.timeline-head { display: flex; align-items: center; justify-content: space-between; min-height: 26px; margin-bottom: 8px; }
.timeline-reset { padding: 0; border: 0; background: none; color: var(--green); font-weight: 700; cursor: pointer; animation: rise-in .4s var(--ease) both; }
.timeline-bars { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(30px, 1fr); gap: 6px; height: 104px; overflow-x: auto; overflow-y: visible; padding-top: 22px; scrollbar-width: none; }
.tl-bar { position: relative; display: grid; grid-template-rows: 1fr auto; gap: 6px; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.tl-col { display: flex; align-items: flex-end; justify-content: center; height: 100%; }
.tl-fill { width: 100%; max-width: 46px; height: var(--h, 0%); min-height: 3px; border-radius: 6px 6px 3px 3px; background: #cfe4d7; transition: height .8s var(--ease), background-color .3s var(--ease-soft); transition-delay: calc(var(--i, 0) * 30ms), 0s; }
.tl-bar:hover .tl-fill { background: #a9d1b9; }
.tl-bar[aria-pressed="true"] .tl-fill { background: var(--green); }
.tl-bar.zero .tl-fill { background: var(--surface); }
.tl-year { font-size: .76rem; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-bar[aria-pressed="true"] .tl-year { font-weight: 700; color: var(--black); }
.tl-tip { position: absolute; left: 50%; bottom: calc(100% - 14px); z-index: 2; padding: 2px 8px; border-radius: 6px; background: var(--black); color: var(--white); font-size: .76rem; white-space: nowrap; pointer-events: none; opacity: 0; transform: translate(-50%, 4px); transition: opacity .2s var(--ease-soft), transform .2s var(--ease-soft); }
.tl-bar:hover .tl-tip, .tl-bar:focus-visible .tl-tip { opacity: 1; transform: translate(-50%, 0); }

.toolbar { position: sticky; top: 66px; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 14px; padding-block: 12px; background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: box-shadow .3s var(--ease-soft); }
.toolbar.stuck { box-shadow: 0 14px 24px -22px rgba(0, 0, 0, .5); }
.toolbar-right { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.small-select { width: auto; min-height: 36px; padding-block: 0; border-radius: 8px; font-size: .95rem; }
#filtersToggle .count:not(:empty) { min-width: 20px; height: 20px; margin-left: 2px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--green); color: var(--white); font-size: .78rem; }


.filters-more:not([hidden]) { animation: rise-in .5s var(--ease) both; }
.filters-more-inner { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 6px; padding: 18px; border-radius: var(--r); background: var(--surface); }

.grid { margin-top: 24px; }
.grid[data-view="grid"] { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 46px 26px; }
.list-col { display: none; }

.grid[data-view="list"] { display: grid; border-top: 1px solid var(--line); }
.grid[data-view="list"] .card { grid-template-columns: 120px minmax(0, 1fr) minmax(0, 220px) 160px; gap: 22px; align-items: center; padding: 12px 10px; border-bottom: 1px solid var(--line); border-radius: 12px; transition: background-color .3s var(--ease-soft); }
.grid[data-view="list"] .card:hover { background: var(--surface); }
.grid[data-view="list"] .card-media { margin: 0; border-radius: 10px; }
.grid[data-view="list"] .card:hover .card-media { transform: none; box-shadow: none; }
.grid[data-view="list"] .card-excerpt, .grid[data-view="list"] .card-cat { display: none; }
.grid[data-view="list"] .card-title { font-size: 1.3rem; }
.grid[data-view="list"] .list-col { display: block; color: var(--ink-2); }
.grid[data-view="list"] .list-col.date { text-align: right; color: var(--muted); }

.map-view { margin-top: 24px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-l); animation: rise-in .7s var(--ease) both; }
.map { height: min(72vh, 660px); background: var(--surface); }
/* Quiet, grey base map so the green pins carry the colour */
.map .leaflet-tile-pane { filter: grayscale(1) contrast(.92) brightness(1.06); }
.map-marker { background: none; border: 0; }
.map-pin { position: relative; display: block; width: 20px; height: 20px; margin: 3px; border: 3px solid var(--white); border-radius: 50%; background: var(--green); box-shadow: 0 3px 10px rgba(0, 0, 0, .35); transition: transform .3s var(--ease); animation: pin-drop .7s var(--ease) both; animation-delay: var(--delay, 0s); }
.map-pin::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 2px solid var(--green); opacity: 0; animation: pin-pulse 2.8s var(--ease-soft) infinite; animation-delay: var(--delay, 0s); }
.map-marker:hover .map-pin { transform: scale(1.35); }
@keyframes pin-drop { from { opacity: 0; transform: translateY(-18px) scale(.6); } to { opacity: 1; transform: none; } }
@keyframes pin-pulse { 0% { opacity: .6; transform: scale(.5); } 70%, 100% { opacity: 0; transform: scale(1.4); } }
.leaflet-popup-content-wrapper { padding: 0; overflow: hidden; border-radius: 14px; }
.leaflet-popup-content { width: 240px !important; margin: 0; font-family: var(--sans); }
.map-popup img { width: 100%; height: 140px; object-fit: cover; }
.map-popup div { display: grid; gap: 2px; padding: 12px 14px 14px; }
.map-popup strong { font-family: var(--display); font-size: 1.2rem; font-weight: 500; line-height: 1.15; }
.map-popup span { color: var(--muted); }
.map-popup .btn { justify-self: start; margin-top: 8px; }

.empty { display: grid; justify-items: start; gap: 16px; padding: 48px 0; animation: rise-in .6s var(--ease) both; }
.empty-title { font-family: var(--display); font-size: 2rem; }
.sentinel { height: 1px; }
.more { display: flex; justify-content: center; margin-top: 48px; }
mark { background: var(--yellow); color: var(--black); border-radius: 3px; padding: 0 2px; }

/* ---------- About ---------- */
.about { border-top: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 32px 64px; }
.about h2 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 400; }
.about-copy { display: grid; gap: 16px; max-width: 42em; font-size: 1.08rem; color: var(--ink-2); }
.about-intro { font-family: var(--display); font-size: clamp(1.5rem, 2.2vw, 1.9rem); line-height: 1.3; color: var(--ink); }
.about-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* ---------- Footer ---------- */
.footer { background: var(--black); color: rgba(255, 255, 255, .68); }
.footer-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 16px 40px; padding-block: 56px 36px; }
.footer-title { font-family: var(--display); font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--white); }
.footer-title em { color: var(--yellow); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.footer-nav a { position: relative; font-weight: 700; color: var(--white); text-decoration: none; }
.footer-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 2px; background: var(--yellow); transform: scaleX(0); transition: transform .35s var(--ease); }
.footer-nav a:hover::after { transform: scaleX(1); }
.footer-bottom { position: relative; display: grid; gap: 4px; padding-block: 22px 36px; font-size: .9rem; }
.footer-bottom::before { content: ""; position: absolute; top: 0; left: clamp(20px, 5vw, 64px); right: clamp(20px, 5vw, 64px); height: 1px; background: rgba(255, 255, 255, .2); }
.footer-legal-links { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 12px; }
.footer-legal-links a, .footer-bottom a { color: var(--white); text-underline-offset: 3px; }
.footer-legal-links a { font-weight: 700; }

/* ---------- Photo viewer ---------- */
.viewer { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--white); color: var(--ink); }
.viewer::backdrop { background: rgba(0, 0, 0, .85); }
.viewer[open] { animation: fade-in .35s var(--ease-soft); }
.viewer-inner { display: grid; grid-template-columns: minmax(0, 1fr) min(460px, 36vw); height: 100%; }
.viewer-media { position: relative; overflow: hidden; background: #0b0b0b; }
.viewer-stage { position: absolute; inset: 0 0 104px; display: grid; place-items: center; padding: 20px; }
.viewer-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.viewer[open] .viewer-stage img { animation: photo-in .8s var(--ease) both; }
@keyframes photo-in { from { opacity: 0; transform: scale(.94); filter: blur(10px); } to { opacity: 1; transform: none; filter: none; } }
.viewer-nav { position: absolute; top: calc(50% - 52px); transform: translateY(-50%); width: 50px; height: 50px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .45); border-radius: 50%; background: rgba(0, 0, 0, .35); color: var(--white); cursor: pointer; transition: background-color .3s, color .3s, transform .3s var(--ease); }
.viewer-nav .icon { width: 22px; height: 22px; stroke-width: 2; }
.viewer-nav:hover { background: var(--white); color: var(--black); }
.viewer-nav.prev { left: 16px; }
.viewer-nav.next { right: 16px; }
.viewer-nav.prev:hover { transform: translateY(-50%) translateX(-3px); }
.viewer-nav.next:hover { transform: translateY(-50%) translateX(3px); }
.filmstrip { position: absolute; left: 0; right: 0; bottom: 0; height: 104px; display: flex; align-items: center; gap: 8px; padding: 14px 16px; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; }
.filmstrip::-webkit-scrollbar { display: none; }
.filmstrip button { flex: none; width: 104px; height: 70px; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 10px; background: #222; opacity: .5; cursor: pointer; transition: opacity .3s var(--ease-soft), transform .35s var(--ease), border-color .3s; }
.filmstrip button:hover { opacity: .9; transform: translateY(-4px); }
.filmstrip button[aria-current="true"] { opacity: 1; border-color: var(--yellow); }
.filmstrip img { width: 100%; height: 100%; object-fit: cover; }
.viewer-panel { display: flex; flex-direction: column; gap: 22px; padding: 22px clamp(20px, 3vw, 40px) 28px; overflow-y: auto; }
.viewer-panel.swap > * { animation: panel-in .6s var(--ease) both; }
.viewer-panel.swap > :nth-child(2) { animation-delay: .04s; }
.viewer-panel.swap > :nth-child(3) { animation-delay: .08s; }
.viewer-panel.swap > :nth-child(4) { animation-delay: .12s; }
.viewer-panel.swap > :nth-child(5) { animation-delay: .16s; }
@keyframes panel-in { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }
.viewer-top { display: flex; align-items: center; gap: 14px; }
.viewer-top .label { margin-right: auto; color: var(--green); }
.viewer-pos { color: var(--muted); font-variant-numeric: tabular-nums; }
.viewer-close { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 50%; background: var(--white); color: var(--black); cursor: pointer; transition: background-color .3s, color .3s, transform .4s var(--ease); }
.viewer-close .icon { width: 20px; height: 20px; stroke-width: 2; }
.viewer-close:hover { background: var(--black); color: var(--white); transform: rotate(90deg); }
.viewer-panel h2 { font-size: clamp(1.9rem, 2.8vw, 2.6rem); font-weight: 400; }
.meta { display: grid; margin: 0; border-top: 1px solid var(--line); }
.meta div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.meta dt { padding-top: 2px; font-size: .8rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.meta dd { margin: 0; font-weight: 700; }
.meta dd small { display: block; font-size: .96rem; font-weight: 400; color: var(--muted); }
.meta dd button { padding: 0; border: 0; background: none; color: var(--black); font-weight: 700; text-decoration: underline; text-decoration-color: var(--green); text-decoration-thickness: 2px; text-underline-offset: 3px; cursor: pointer; }
.meta dd button:hover { color: var(--green); }
.story { display: grid; gap: 8px; }
.story h3 { font-size: 1.3rem; color: var(--green); }
.story p { font-size: 1.1rem; line-height: 1.65; color: var(--ink-2); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags button { padding: 3px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--white); color: var(--ink-2); font-size: .92rem; font-weight: 700; cursor: pointer; transition: border-color .25s, color .25s, background-color .25s; }
.tags button:hover { border-color: var(--green); background: var(--green-tint); color: var(--green-deep); }
.viewer-foot { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
.license { font-size: .9rem; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .collections { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid[data-view="grid"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters-more-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-inner { min-height: 76vh; }
  .feature-media::after { background: linear-gradient(180deg, rgba(0, 0, 0, .35) 0%, rgba(0, 0, 0, .55) 45%, rgba(0, 0, 0, .85) 100%); }
  .feature-copy { width: 100%; justify-content: flex-end; }
  .viewer { overflow-y: auto; }
  .viewer-inner { grid-template-columns: 1fr; grid-template-rows: 62vh auto; height: auto; min-height: 100%; }
  .viewer-panel { overflow: visible; }
}
@media (max-width: 860px) {
  .masthead-inner, .masthead.scrolled .masthead-inner { height: 66px; gap: 12px; }
  .logo-erhml, .masthead.scrolled .logo-erhml { height: 44px; }
  .logo-efprp, .masthead.scrolled .logo-efprp { height: 34px; }
  .logo-eanenp, .masthead.scrolled .logo-eanenp { height: 28px; }
  .brand { gap: 12px; }
  .nav-toggle { display: block; }
  .nav { position: absolute; top: 66px; left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 4px clamp(20px, 5vw, 64px) 20px; background: var(--green); border-top: 1px solid rgba(255, 255, 255, .25); }
  .nav.open { display: flex; animation: rise-in .45s var(--ease) both; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, .25); font-size: 1.1rem; }
  .nav a:not(.btn)::after { display: none; }
  .nav .btn { margin-top: 16px; min-height: 46px; }
  .brand-rule, .logo-eanenp { display: none; }
  .hero { min-height: 100svh; margin-top: -66px; padding-block: clamp(110px, 16vh, 150px) 84px; }
  .dots { display: none; }
  .invite-inner { grid-template-columns: 1fr; }
  /* no pinning on small screens: the collections simply swipe */
  .run { height: auto !important; }
  .run-sticky { position: static; min-height: 0; padding-block: clamp(56px, 9vw, 90px); }
  .run-viewport { overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
  .run-viewport::-webkit-scrollbar { display: none; }
  .run-track { transform: none !important; }
  .run-track .collection { flex: 0 0 62vw; scroll-snap-align: start; }
  .run-progress { display: none; }
  .invite-strip { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .about-grid { grid-template-columns: 1fr; }
  .report-grid { grid-template-columns: 1fr; }
  .toolbar { top: 66px; }
  .grid[data-view="list"] .card { grid-template-columns: 96px minmax(0, 1fr); gap: 14px; }
  .grid[data-view="list"] .list-col { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero-title { font-size: 13.5vw; }
  /* on a phone the credit sits under the hero copy instead of over it */
  .hero { min-height: 100svh; padding-block: clamp(96px, 15vh, 130px) 76px; }
  .page-title { font-size: 15vw; }
  .invite-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .invite-strip img:nth-child(n+4) { display: none; }
  .hero-credit { position: static; justify-self: center; max-width: none; margin-top: 30px; padding-block: 6px; }
  .hero-cue { display: none; }
  .hero-search { padding-left: 14px; }
  .hero-search .btn { padding-inline: .9em; }
  .collections { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 14px; }
  .collection .c-name { font-size: 1.25rem; }
  .grid[data-view="grid"] { grid-template-columns: 1fr; }
  .filters-more-inner { grid-template-columns: 1fr; }
  .toolbar-right { margin-left: 0; }
  .lib-count { display: none; }
  .viewer-stage { bottom: 88px; }
  .filmstrip { height: 88px; }
  .filmstrip button { width: 84px; height: 58px; }
  .meta div { grid-template-columns: 100px minmax(0, 1fr); }
}
@media (max-width: 380px) {
  .logo-efprp { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .js [data-rise] { opacity: 1; transform: none; filter: none; }
  .js [data-split] .w > i { transform: none; }
  .run { height: auto !important; }
  .run-sticky { position: static; min-height: 0; }
  .run-viewport { overflow-x: auto; }
  .run-track { transform: none !important; }
  .masthead.away { --head-y: 0; }
  .js .collection-media, .js .invite-strip img { transform: none; }
  .hero-bg { border-radius: 0; }
  .hero-layer img, .hero-layer.on img { transform: none; }
  .hero > .wrap, .hero-credit { opacity: 1; transform: none; }
  .hero-cue { opacity: 1; }
  .invite-strip img { transform: none; }
  .hero-cue::after { animation: none; }
  .map-pin::after { display: none; }
}
