/* Chabad Houses directory — Institutions playbook: one big image, type does the work, clean.
   Palette sampled off award winners: #2779A7 #ECD06F #F1EADA #181818 #DF4359 #DAE2E8 #BCBFB0 */
:root {
  --paper: #F1EADA; --paper-2: #E9E0CB; --ink: #181818; --ink-2: #4A4640;
  --blue: #2779A7; --blue-text: #1B5B80; --gold: #ECD06F; --red: #C8364B;
  --mist: #DAE2E8; --stone: #BCBFB0; --line: rgba(24,24,24,.14);
  --display: "Fraunces", "Frank Ruhl Libre", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --tech: "Space Grotesk", "Inter", system-ui, sans-serif;   /* masthead voice */
  --body: "Fraunces", "Frank Ruhl Libre", Georgia, serif;
  --max: 1240px; --gutter: clamp(16px, 4vw, 48px);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #181818; --paper-2: #222; --ink: #F1EADA; --ink-2: #BCB8AE; --blue-text: #7FBEE3; --line: rgba(241,234,218,.16); --stone: #6E7168; }
}
html[dir=rtl] { --display: "Frank Ruhl Libre", "Fraunces", serif; --body: "Frank Ruhl Libre", "Fraunces", serif; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.5; font-optical-sizing: auto; }
a { color: var(--blue-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.02; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 7vw, 6.5rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.25rem; }
.mono { font-family: var(--mono); font-size: .74rem; letter-spacing: .02em; text-transform: uppercase; color: var(--ink-2); }
html[dir=rtl] .mono { text-transform: none; letter-spacing: 0; font-size: .8rem; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* header */
.top { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 24px; min-height: 58px; }
.brand { font-family: var(--tech); font-size: 1.2rem; font-weight: 700; text-decoration: none; color: var(--ink); }
.brand { letter-spacing: -0.02em; }
.brand b { color: var(--gold); font-weight: 600; }
html[dir=rtl] .brand { direction: ltr; }
.nav { display: flex; gap: 18px; margin-inline-start: auto; align-items: center; }
.nav a { text-decoration: none; font-family: var(--tech); font-size: .78rem; font-weight: 500; text-transform: uppercase; letter-spacing: .10em; color: var(--ink-2); }
html[dir=rtl] .nav a { text-transform: none; font-size: .85rem; }
.nav a:hover { color: var(--ink); }
.lang { position: relative; }
.lang summary { list-style: none; cursor: pointer; font-family: var(--tech); font-size: .78rem; font-weight: 500; text-transform: uppercase; letter-spacing: .10em; color: var(--ink-2); }
.lang summary::-webkit-details-marker { display: none; }
.lang ul { position: absolute; inset-inline-end: 0; top: 130%; margin: 0; padding: 8px 0; list-style: none; background: var(--paper); border: 1px solid var(--line); min-width: 150px; box-shadow: 0 12px 30px rgba(0,0,0,.12); }
.lang li a { display: block; padding: 6px 14px; text-transform: none; font-family: var(--body); font-size: .95rem; letter-spacing: 0; }
.lang li a[aria-current] { color: var(--blue); }

/* hero — home */
.hero { padding: clamp(48px, 9vw, 120px) 0 clamp(28px, 4vw, 48px); }
.hero .kicker { margin-bottom: 18px; }
.hero h1 { max-width: 14ch; }
.hero .lede { max-width: 42ch; font-size: clamp(1.05rem, 1.6vw, 1.35rem); color: var(--ink-2); margin: 24px 0 0; }
.search { margin-top: 36px; position: relative; max-width: 720px; }
.search input { width: 100%; font: inherit; font-size: 1.15rem; padding: 18px 20px; border: 1px solid var(--ink); border-radius: 0; background: var(--paper); color: var(--ink); }
.search input:focus { outline: 2px solid var(--blue); outline-offset: 2px; }
.search .near { position: absolute; inset-inline-end: 10px; top: 50%; transform: translateY(-50%); border: 0; background: var(--ink); color: var(--paper); font-family: var(--mono); font-size: .72rem; text-transform: uppercase; padding: 10px 14px; cursor: pointer; }
.search .near:hover { background: var(--blue); }
.results { list-style: none; margin: 8px 0 0; padding: 0; border: 1px solid var(--line); background: var(--paper); display: none; max-height: 420px; overflow: auto; }
.results[data-open] { display: block; }
.results li a { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 12px 18px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
.results li a:hover { background: var(--paper-2); }
.results .m { font-family: var(--mono); font-size: .72rem; color: var(--ink-2); white-space: nowrap; }
.results .empty { padding: 14px 18px; color: var(--ink-2); }

/* stats strip */
.stats { display: flex; gap: clamp(24px, 5vw, 72px); flex-wrap: wrap; padding: 10px 0 36px; border-bottom: 1px solid var(--line); }
.stat b { font-family: var(--display); font-size: clamp(1.8rem, 3.6vw, 3rem); font-weight: 500; display: block; line-height: 1; }

.hero-art { margin: 8px 0 0; }
.hero-art img { width: 100%; aspect-ratio: 16/7; object-fit: cover; }
.hero-art figcaption { margin-top: 6px; }

/* map */
.map { height: min(68vh, 640px); background: var(--mist); margin: 32px 0 0; }
.map.small { height: 260px; margin: 0; }
.leaflet-container { font-family: var(--body); background: var(--mist); }
.leaflet-popup-content-wrapper { border-radius: 0; background: var(--paper); color: var(--ink); box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.leaflet-popup-content { margin: 12px 16px; font-size: .95rem; }
.leaflet-popup-content a { font-family: var(--display); font-size: 1.05rem; }
.leaflet-popup-tip { background: var(--paper); }
.marker-cluster { background: rgba(39,121,167,.35); border-radius: 50%; }
.marker-cluster div { background: var(--blue); color: #fff; border-radius: 50%; width: 32px; height: 32px; margin: 4px; display: grid; place-items: center; font-family: var(--mono); font-size: .75rem; }
.pin { width: 12px; height: 12px; background: var(--blue); border: 2px solid var(--paper); border-radius: 50%; box-shadow: 0 0 0 1px var(--blue); }
.pin.me { background: var(--red); box-shadow: 0 0 0 1px var(--red); }

/* state grid */
.section { padding: clamp(40px, 7vw, 96px) 0; }
.section > .wrap > h2 { margin-bottom: 28px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0; border-top: 1px solid var(--line); border-inline-start: 1px solid var(--line); }
.grid a { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 18px 16px; border-bottom: 1px solid var(--line); border-inline-end: 1px solid var(--line); text-decoration: none; color: var(--ink); font-family: var(--display); font-size: 1.2rem; transition: background .18s; }
.grid a:hover { background: var(--paper-2); }
.grid a .n { font-family: var(--mono); font-size: .72rem; color: var(--ink-2); }

/* state page */
.state-hero { padding: clamp(40px, 7vw, 96px) 0 24px; border-bottom: 1px solid var(--line); }
.crumbs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.crumbs a { text-decoration: none; }
.crumbs span::before { content: "/"; margin-inline-end: 10px; color: var(--stone); }
.cities { position: sticky; top: 58px; background: var(--paper); z-index: 5; border-bottom: 1px solid var(--line); overflow-x: auto; white-space: nowrap; padding: 10px 0; scrollbar-width: none; }
.cities a { display: inline-block; margin-inline-end: 18px; text-decoration: none; }
.city { padding: 40px 0 8px; }
.city h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin-bottom: 12px; display: flex; gap: 14px; align-items: baseline; }
.list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.list li { border-bottom: 1px solid var(--line); }
.list a { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 16px; align-items: baseline; padding: 16px 0; text-decoration: none; color: var(--ink); }
.list a:hover .nm { color: var(--blue-text); }
.list .nm { font-family: var(--display); font-size: 1.2rem; }
.list .ad { color: var(--ink-2); font-size: .95rem; }
@media (max-width: 720px) { .list a { grid-template-columns: 1fr; gap: 4px; } }

/* center page */
/* a hero with no photograph of its own must not reserve half a screen of nothing */
.c-hero:not(.has-img) { min-height: 0 !important; }
.c-hero:not(.has-img) .wrap { padding-top: clamp(26px, 4vw, 56px); padding-bottom: clamp(18px, 2.5vw, 32px); }
.c-hero { position: relative; min-height: 46vh; display: grid; align-items: end; background: var(--paper-2); overflow: hidden; }
.c-hero.has-img { min-height: min(72vh, 720px); color: #F1EADA; }
.c-hero.has-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.c-hero.has-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,10,10,.82) 0%, rgba(10,10,10,.35) 45%, rgba(10,10,10,.05) 100%); }
.c-hero .wrap { position: relative; z-index: 1; width: 100%; padding-top: clamp(48px, 8vw, 96px); padding-bottom: clamp(28px, 4vw, 48px); }
.c-hero.has-img .mono, .c-hero.has-img .crumbs a { color: rgba(241,234,218,.8); }
.c-hero h1 { font-size: clamp(2.2rem, 6vw, 5.4rem); max-width: 16ch; }
.c-hero .type { display: inline-block; margin-top: 18px; padding: 6px 12px; border: 1px solid currentColor; font-family: var(--mono); font-size: .72rem; text-transform: uppercase; }
html[dir=rtl] .c-hero .type { text-transform: none; }
.banner { margin: 0; background: var(--paper-2); border-bottom: 1px solid var(--line); }
.banner img { width: 100%; max-height: 46vh; object-fit: contain; display: block; }
.banner figcaption { max-width: var(--max); margin: 0 auto; padding: 6px var(--gutter) 10px; }
.c-hero.flat { min-height: 0; max-height: 62vh; }
.c-hero.flat img { object-fit: contain; background: var(--paper-2); }
.c-hero.flat::after { background: linear-gradient(to top, rgba(10,10,10,.78) 0%, rgba(10,10,10,.28) 34%, rgba(10,10,10,0) 62%); }
.c-hero .credit { position: absolute; bottom: 10px; inset-inline-end: 12px; z-index: 1; font-family: var(--mono); font-size: .62rem; color: rgba(241,234,218,.55); }

.c-body { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: clamp(32px, 6vw, 96px); padding: clamp(40px, 6vw, 80px) 0; }
@media (max-width: 860px) { .c-body { grid-template-columns: 1fr; } }
.c-main > * + * { margin-top: 44px; }
.c-main .desc { font-size: clamp(1.1rem, 1.7vw, 1.35rem); line-height: 1.45; max-width: 48ch; }
.c-main h2 { font-size: 1.55rem; margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips li { padding: 6px 12px; border: 1px solid var(--line); font-size: .92rem; background: color-mix(in srgb, var(--paper) 70%, var(--mist)); }
.group + .group { margin-top: 18px; }
.group h3 { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); margin-bottom: 8px; font-weight: 400; }
html[dir=rtl] .group h3 { text-transform: none; font-size: .82rem; }
.people { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.people li { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.people .nm { font-family: var(--display); font-size: 1.15rem; }
.people .nm.lead { color: var(--blue-text); }
.people .ps { color: var(--ink-2); font-size: .92rem; text-align: end; }
.depts { list-style: none; margin: 0; padding: 0; }
.depts li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; }

/* mined from the center's own site */
.about p { font-size: 1.08rem; line-height: 1.55; max-width: 60ch; margin: 0 0 14px; }
.credit { margin-top: 8px !important; }
.credit a { text-decoration: none; }
.times { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); max-width: 60ch; font-family: var(--mono); font-size: .86rem; }
.times li { padding: 9px 0; border-bottom: 1px solid var(--line); }
.gallery .strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.gallery figure { margin: 0; aspect-ratio: 4/3; overflow: hidden; background: var(--paper-2); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
@media (prefers-reduced-motion: no-preference) { .gallery figure:hover img { transform: scale(1.04); } }

.card { border: 1px solid var(--ink); padding: 22px 24px; position: sticky; top: 80px; }
.card h2 { font-size: 1.05rem; font-family: var(--mono); text-transform: uppercase; letter-spacing: .04em; font-weight: 400; color: var(--ink-2); margin-bottom: 16px; }
html[dir=rtl] .card h2 { text-transform: none; }
.card dl { margin: 0; }
.card dt { font-family: var(--mono); font-size: .68rem; text-transform: uppercase; color: var(--ink-2); margin-top: 14px; }
html[dir=rtl] .card dt { text-transform: none; font-size: .78rem; }
.card dd { margin: 2px 0 0; font-size: 1.02rem; }
.card .phone { font-family: var(--mono); font-size: 1.05rem; letter-spacing: .02em; }
.card .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.btn { display: inline-block; padding: 11px 16px; text-decoration: none; font-family: var(--mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; border: 1px solid var(--ink); color: var(--ink); background: transparent; transition: background .18s, color .18s; }
html[dir=rtl] .btn { text-transform: none; font-size: .85rem; }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.primary:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #181818; }
.btn.gold:hover { background: #181818; border-color: #181818; color: var(--gold); }
.socials { display: flex; gap: 14px; margin-top: 18px; flex-wrap: wrap; }
.socials a { font-family: var(--mono); font-size: .72rem; text-transform: uppercase; }
.card .map.small { margin-top: 20px; }

.nearby { padding: clamp(40px, 6vw, 72px) 0; border-top: 1px solid var(--line); }
.nearby h2 { margin-bottom: 20px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.cards a { display: block; padding: 18px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: border-color .18s; }
.cards a:hover { border-color: var(--ink); }
.cards .nm { font-family: var(--display); font-size: 1.15rem; display: block; margin-bottom: 6px; }
.cards .m { display: block; }

/* claim block — the product */
.claim { background: #181818; color: #F1EADA; padding: clamp(56px, 9vw, 120px) 0; }
.claim .wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: end; }
@media (max-width: 860px) { .claim .wrap { grid-template-columns: 1fr; } }
.claim .mono { color: var(--gold); }
.claim h2 { font-size: clamp(2rem, 5vw, 4rem); margin-top: 12px; }
.claim p { font-size: 1.1rem; color: rgba(241,234,218,.78); max-width: 46ch; margin: 0 0 22px; }

.claim-form { display: grid; gap: 12px; max-width: 460px; }
.claim-form label { display: grid; gap: 4px; }
.claim-form .mono { color: rgba(241,234,218,.7); }
.claim-form input, .claim-form textarea { font: inherit; font-size: 1rem; padding: 10px 12px; background: #222; color: #F1EADA; border: 1px solid rgba(241,234,218,.3); border-radius: 0; }
.claim-form input:focus, .claim-form textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
.claim-form button { justify-self: start; cursor: pointer; font: inherit; }
.claim-form .hp { position: absolute; left: -9999px; }

.alt-name { font-family: var(--body); font-size: clamp(1.1rem, 2vw, 1.5rem); margin-top: 8px; opacity: .8; }

.people li.has-head { grid-template-columns: auto 1fr auto; align-items: center; }
.head { width: 56px; height: 56px; object-fit: cover; border-radius: 50%; border: 2px solid var(--gold); }
.gallery figure.tall { aspect-ratio: 3/4; grid-row: span 1; }
.gallery .more { margin-top: 12px; }
.gallery .more summary { list-style: none; display: inline-block; cursor: pointer; }
.gallery .more summary::-webkit-details-marker { display: none; }
.gallery .more[open] summary { margin-bottom: 12px; }

.linklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.linklist li { border-bottom: 1px solid var(--line); }
.linklist a { display: block; padding: 11px 0; text-decoration: none; color: var(--ink); font-size: .98rem; }
.linklist a:hover { color: var(--blue-text); box-shadow: inset 3px 0 0 var(--gold); padding-inline-start: 10px; }
.linklist a { transition: padding .15s, box-shadow .15s; }


/* list rows with a thumbnail */
.list a.row { grid-template-columns: 92px minmax(0, 1.3fr) minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 10px 0; }
.list .thumb { width: 92px; height: 62px; object-fit: cover; background: var(--paper-2); }
.list .thumb.blank { display: block; background: linear-gradient(135deg, var(--paper-2), var(--mist)); }
.list a.row:hover .thumb { filter: saturate(1.1) contrast(1.03); }
@media (max-width: 720px) {
  .list a.row { grid-template-columns: 64px 1fr; grid-template-areas: "t n" "t a"; gap: 4px 14px; }
  .list a.row .thumb { grid-area: t; width: 64px; height: 64px; align-self: start; }
  .list a.row .nm { grid-area: n; }
  .list a.row .ad { grid-area: a; }
  .list a.row .mono { display: none; }
}

/* nearby cards */
.cards a { padding: 0; overflow: hidden; }
.cards .cardimg { width: 100%; height: 120px; object-fit: cover; }
.cards .nm, .cards .m { padding-inline: 16px; }
.cards .nm { margin-top: 12px; }
.cards .m { padding-bottom: 14px; display: block; }

/* home: a moving wall of their own photographs */
/* The feed is one ruled band: the gold shows THROUGH the gaps, so every tile
   carries the same hairline and the strip reads as a single object rather than
   a row of loose pictures. */
.wall { overflow: hidden; margin-top: 36px; background: var(--gold); border-block: 3px solid var(--gold); }
.wall .track { display: flex; gap: 2px; width: max-content; }
.wall a { position: relative; flex: 0 0 auto; text-decoration: none; display: block; background: var(--paper-2); }
.wall img { width: 232px; height: 155px; object-fit: cover; display: block;
  filter: saturate(.92) contrast(1.02); transition: filter .4s, transform .6s; }
.wall a::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 0 var(--gold); transition: box-shadow .25s; }
.wall a:hover img { filter: saturate(1.06) contrast(1.02); transform: scale(1.04); }
.wall a:hover::after { box-shadow: inset 0 0 0 3px var(--gold); }
.wall .cap { position: absolute; inset-inline-start: 10px; bottom: 8px; color: var(--gold);
  text-shadow: 0 1px 8px rgba(10,10,10,.95); font-size: .62rem; letter-spacing: .08em; }
@media (prefers-reduced-motion: no-preference) {
  /* an unhurried drift: a tile takes about four seconds to cross its own width,
     slow enough to read a city name without following it */
  .wall .track { animation: drift 340s linear infinite; }
  .wall:hover .track { animation-play-state: paused; }
  .wall .track { will-change: transform; }
  @keyframes drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }
}
html[dir=rtl] .wall .track { animation-direction: reverse; }

.shabbat { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.shabbat h3 { font-family: var(--mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); font-weight: 400; display: flex; gap: 8px; align-items: baseline; }
html[dir=rtl] .shabbat h3 { text-transform: none; font-size: .8rem; }
.times2 { margin: 10px 0 0; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: baseline; }
.times2 dt { font-family: var(--mono); font-size: .7rem; color: var(--ink-2); margin: 0; text-transform: none; }
.times2 dd { margin: 0; text-align: end; }
.times2 dd.big { font-family: var(--display); font-size: 1.35rem; line-height: 1.1; }
.shabbat p { margin: 10px 0 0; font-size: .62rem; color: var(--ink-2); }

.people .mail { font-family: var(--mono); font-size: .7rem; }


/* home: the feed leads, the words follow */
.wall.top { margin-top: 0; border-top: 0; }
/* the strip runs full width; fade its ends so a cut tile does not read as broken */
.wall.top { -webkit-mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent); }
.wall .track.back { animation-direction: reverse; animation-duration: 430s; }
html[dir=rtl] .wall .track.back { animation-direction: normal; }
.wall .track + .track { margin-top: 2px; }
.wall img { width: 268px; height: 178px; }
@media (max-width: 720px) { .wall img { width: 190px; height: 128px; } .wall .track.back { display: none; } }

.hero.compact { padding: clamp(28px, 4vw, 52px) 0 clamp(20px, 3vw, 34px); }
.hero.compact h1 { font-size: clamp(1.9rem, 4.2vw, 3.4rem); max-width: 22ch; }
.hero.compact .lede { margin-top: 14px; font-size: clamp(1rem, 1.3vw, 1.15rem); max-width: 52ch; }
.hero.compact .search { margin-top: 22px; }
.hero.compact .kicker { margin-bottom: 12px; }

/* their site, rebuilt */
.mp .wrap > .crumbs { grid-column: 1 / -1; }   /* the trail spans the grid; only body + nav are columns */
.mp .wrap { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: clamp(28px, 5vw, 72px); padding-top: clamp(28px, 4vw, 56px); padding-bottom: clamp(40px, 6vw, 80px); }
@media (max-width: 860px) { .mp .wrap { grid-template-columns: 1fr; } .mp-nav { order: 2; } }
.mp-body h1 { font-size: clamp(1.9rem, 4vw, 3.2rem); margin-bottom: 24px; }
.mp-body h2 { font-size: clamp(1.35rem, 2.2vw, 1.9rem); margin: 34px 0 10px; padding-top: 12px; position: relative; }
.mp-body h2::before { content: ""; position: absolute; top: 0; inset-inline-start: 0; width: 28px; height: 3px; background: var(--gold); }
.mp-body h3 { font-size: 1.15rem; margin: 22px 0 6px; }
.mp-body p { max-width: 66ch; margin: 0 0 14px; line-height: 1.55; }
.mp-body blockquote { margin: 18px 0; padding-inline-start: 18px; border-inline-start: 3px solid var(--gold); font-size: 1.1rem; }
.mp-list { max-width: 66ch; margin: 0 0 16px; padding-inline-start: 20px; }
.mp-list li { margin-bottom: 6px; }
.mp-img { margin: 22px 0; }
.mp-img img { width: 100%; max-height: 60vh; object-fit: cover; }
.mp-nav { position: sticky; top: 80px; align-self: start; border-top: 1px solid var(--line); }
.mp-nav h2 { font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); font-weight: 400; padding: 12px 0; }
html[dir=rtl] .mp-nav h2 { text-transform: none; }
.mp-nav a { display: block; padding: 8px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: .92rem; }
.mp-nav a:hover { color: var(--blue-text); box-shadow: inset 3px 0 0 var(--gold); padding-inline-start: 8px; }
.mp-nav a[aria-current] { color: var(--blue-text); font-weight: 600; }
.mp-cards img { width: 100%; height: 110px; object-fit: cover; }
.rebuilt p { max-width: 52ch; margin-bottom: 16px; }

/* four ways to carry their content, chosen by what they have */
.mp-body p, .mp-list { max-width: var(--measure, 66ch); }
.mp-body h2::before { height: var(--rule, 3px); }
.mp-img img, .mp-cards img { border-radius: var(--radius, 0); }

/* editorial — long prose: one column, generous, the first paragraph set larger */
.lay-editorial .wrap { grid-template-columns: minmax(0, 1fr) 220px; }
.lay-editorial .mp-body { font-size: calc(1.06rem * var(--scale, 1)); }
.lay-editorial .mp-body > p:first-of-type { font-size: 1.22em; line-height: 1.45; }
.lay-editorial .mp-body h1 { letter-spacing: -0.02em; }
.lay-editorial .mp-img { margin-inline: calc(-1 * clamp(8px, 3vw, 40px)); }

/* journal — a few substantial pages: narrow measure, ruled sections */
.lay-journal .mp-body { font-size: calc(1rem * var(--scale, 1)); }
.lay-journal .mp-body h2 { border-top: var(--rule, 2px) solid var(--line); padding-top: 18px; }
.lay-journal .mp-body h2::before { display: none; }
.lay-journal .mp-nav { border-top-width: var(--rule, 2px); }

/* gallery — picture-led: the first image runs full width, text sits in two columns */
.lay-gallery .wrap { grid-template-columns: minmax(0, 1fr); }
.lay-gallery .mp-nav { position: static; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 20px; }
.lay-gallery .mp-nav h2 { grid-column: 1 / -1; }
.lay-gallery .mp-img:first-of-type { margin-inline: calc(-1 * var(--gutter)); }
.lay-gallery .mp-img:first-of-type img { max-height: 70vh; }
@media (min-width: 900px) { .lay-gallery .mp-body > p { columns: 2; column-gap: 40px; max-width: none; } }

/* civic — many short pages: compact, boxed, everything findable */
.lay-civic .mp-body { font-size: calc(.98rem * var(--scale, 1)); }
.lay-civic .mp-body h2 { background: var(--paper-2); padding: 10px 14px; margin-inline: -14px; font-size: 1.2rem; }
.lay-civic .mp-body h2::before { display: none; }
.lay-civic .mp-list { border-inline-start: var(--rule, 2px) solid var(--gold); padding-inline-start: 16px; list-style: none; }
.lay-civic .mp-nav a { padding: 6px 0; font-size: .86rem; }

.mp-home .cards a { border-color: var(--line); }

/* a list of places, classes or programmes: a grid, not a ribbon */
.mp-grid { list-style: none; margin: 0 0 26px; padding: 0; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.mp-grid li { background: var(--paper); padding: 16px 18px; display: grid; gap: 6px; align-content: start; }
.mp-grid .c-t { font-family: var(--display); font-size: 1.12rem; line-height: 1.15; }
.mp-grid .c-b { color: var(--ink-2); font-size: .94rem; line-height: 1.45; }
.mp-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin: 28px 0; }
.mp-strip figure { margin: 0; aspect-ratio: 4/3; overflow: hidden; }
.mp-strip img { width: 100%; height: 100%; object-fit: cover; }

/* a short page is composed, not abandoned: bigger type, the picture doing work */
.kind-brief .wrap { grid-template-columns: minmax(0, 1fr); max-width: 900px; }
.kind-brief .mp-body { text-align: start; }
.kind-brief .mp-body h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); }
.kind-brief .mp-body p { font-size: 1.25rem; line-height: 1.5; max-width: 46ch; }
.kind-brief .mp-img { margin: 30px 0; }
.kind-brief .mp-img img { max-height: 56vh; }
.kind-brief .mp-nav { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0 20px; margin-top: 40px; position: static; }
.kind-brief .mp-nav h2 { grid-column: 1 / -1; }

/* an index page: the grid does the work, the column stays out of the way */
.kind-index .mp-body p { max-width: var(--measure, 66ch); }
.kind-index .mp-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* a picture page: images first and large */
.kind-gallery .wrap { grid-template-columns: minmax(0, 1fr); }
.kind-gallery .mp-strip { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.kind-gallery .mp-nav { position: static; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 20px; }
.kind-gallery .mp-nav h2 { grid-column: 1 / -1; }

.mp-img figcaption, .mp-strip figcaption { margin-top: 6px; color: var(--ink-2); line-height: 1.35; }
.mp-strip figure { display: grid; gap: 0; aspect-ratio: auto; }
.mp-strip figure img { aspect-ratio: 4/3; }
.gallery figure { position: relative; }
.gallery figcaption { position: absolute; inset-inline: 0; bottom: 0; padding: 16px 10px 8px; color: #F1EADA;
  background: linear-gradient(to top, rgba(10,10,10,.85), rgba(10,10,10,0)); font-size: .66rem; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.lang-tabs { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; }
.lang-tabs button { font: inherit; font-family: var(--mono); font-size: .72rem; text-transform: uppercase;
  letter-spacing: .04em; padding: 8px 14px; background: transparent; color: var(--ink-2);
  border: 1px solid var(--line); cursor: pointer; }
html[dir=rtl] .lang-tabs button { text-transform: none; font-size: .84rem; }
.lang-tabs button:hover { color: var(--ink); border-color: var(--ink); }
.lang-tabs button[aria-pressed] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.mp-nav a > bdi { display: block; }

.mp-img.tall { max-width: 420px; margin-inline: 0; }
.mp-img.tall img { max-height: 68vh; width: 100%; object-fit: contain; background: var(--paper-2); }
.mp-strip figure.tall img { aspect-ratio: 3/4; }

.offer p { max-width: 62ch; margin: 0 0 12px; line-height: 1.55; }
.offer p:first-of-type { font-size: 1.1rem; }
.offer .group { margin-top: 20px; }

.mp-img.graphic img, .mp-strip figure.graphic img { object-fit: contain; background: var(--paper-2); max-height: 52vh; }
.gallery figure.graphic img { object-fit: contain; background: var(--paper-2); }

/* footer */
.foot { padding: 40px 0 56px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: .9rem; }
.foot .wrap { display: grid; gap: 8px; }
.foot .brand { font-size: 1rem; }

/* accent — thin, gold, sparingly. Small in area, loud in colour. */
.top::before { content: ""; display: block; height: 4px; background: var(--gold); }
.hero .kicker, .state-hero .crumbs, .c-hero .crumbs { position: relative; padding-top: 14px; }
.hero .kicker::before, .state-hero .crumbs::before, .c-hero .crumbs::before { content: ""; position: absolute; top: 0; inset-inline-start: 0; width: 44px; height: 3px; background: var(--gold); }
.c-main h2, .section > .wrap > h2, .nearby h2 { position: relative; padding-top: 12px; }
.c-main h2::before, .section > .wrap > h2::before, .nearby h2::before { content: ""; position: absolute; top: 0; inset-inline-start: 0; width: 28px; height: 3px; background: var(--gold); }
.stat b { display: inline-block; border-bottom: 3px solid var(--gold); padding-bottom: 4px; }
.c-hero .type { border-color: var(--gold); color: inherit; }
.c-hero.has-img .type { background: var(--gold); color: #181818; border-color: var(--gold); }
.card { border-top: 4px solid var(--gold); }
.claim { border-top: 4px solid var(--gold); }
.list a:hover, .cards a:hover, .grid a:hover { box-shadow: inset 4px 0 0 var(--gold); }
html[dir=rtl] .list a:hover, html[dir=rtl] .cards a:hover, html[dir=rtl] .grid a:hover { box-shadow: inset -4px 0 0 var(--gold); }
.list a:hover { padding-inline-start: 12px; }
.list a { transition: padding .18s, box-shadow .18s; }
a:hover { text-decoration-color: var(--gold); text-decoration-thickness: 2px; }
::selection { background: var(--gold); color: #181818; }

/* motion — scroll-driven reveal, cut entirely under reduced motion */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal { animation: rise both linear; animation-timeline: view(); animation-range: entry 0% entry 40%; }
    @keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
  }
  .c-hero.has-img img { animation: settle 1.6s cubic-bezier(.2,.7,.2,1) both; }
  @keyframes settle { from { transform: scale(1.05); } to { transform: none; } }
}
