/* Waconia Heritage Association: page CSS on top of the Taste Skill system (assets/kit).
   Only what the kit lacks: the compare slider, the game, the fact deck, the archive preview,
   the roadmap slides, the map viewer and the long gallery pages. Tokens come from the kit. */

/* ---------------------------------------------------------------- shared */
.skip { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { clip-path: none; width: auto; height: auto; padding: var(--s-2) var(--s-3); background: var(--bg); z-index: 20; }
.nav__logo img { height: 34px; width: auto; }
.nav__logo span { white-space: nowrap; }
.footer .nav__logo img { height: 48px; }
.footer .nav__logo { font-size: 28px; }
.footer__visit li { color: var(--muted); }
.credit-line { margin-top: var(--s-5); max-width: 60ch; }
.card > p.price, .price { font: var(--display-weight) 56px/1 var(--font-display); letter-spacing: -0.02em; margin: var(--s-2) 0; }
.card > p.price span, .price span { font: 400 var(--t-body)/1.4 var(--font-text); color: var(--muted); letter-spacing: 0; }
.join__more { display: grid; gap: var(--s-3); margin: 0 0 var(--s-6); padding: 0; list-style: none; }
.card--plan { display: flex; flex-direction: column; align-self: start; }
.card--plan .checks { flex: 1; }
.card--plan > .btn { margin-top: var(--s-4); }

/* the gallery pages run as long as their photographs: sections there take their content height */
main.flow > section:not(.hero) { height: auto; min-height: 0; }
main.flow > section:not(.hero) > .wrap { height: auto; }

/* ---------------------------------------------------------------- compare slider */
.cmp { position: relative; margin: 0; aspect-ratio: 3 / 2; overflow: hidden; background: var(--surface); user-select: none; touch-action: pan-y; }
.cmp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.cmp__then { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.cmp__then img { filter: sepia(.08); }
.cmp__tag { position: absolute; top: var(--s-3); z-index: 2; padding: 4px 10px; font: 500 var(--t-label)/1.4 var(--font-text); background: var(--p-bg); color: var(--p-ink); pointer-events: none; }
.cmp__tag--then { left: var(--s-3); }
.cmp__tag--now { right: var(--s-3); }
.cmp__handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; z-index: 2; pointer-events: none; box-shadow: 0 0 0 1px rgb(0 0 0 / .15); }
.cmp__handle span { position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 6px rgb(0 0 0 / .25);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231c2230' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 7l-5 5 5 5M15 7l5 5-5 5'/%3E%3C/svg%3E"); background-size: 24px; background-position: center; background-repeat: no-repeat; transition: transform .15s var(--ease, ease); }
.cmp:hover .cmp__handle span { transform: scale(1.06); }
.cmp__range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; z-index: 3; -webkit-appearance: none; appearance: none; }
.cmp__range:focus-visible + * , .cmp:has(.cmp__range:focus-visible) { outline: 2px solid var(--action); outline-offset: 3px; }

/* the picker on the home page */
.picker { align-items: start; }
.picker__frame .cmp { aspect-ratio: 16 / 9; }
.picker__now { margin: 0 0 var(--s-4); min-height: 7.5em; }
.picker__now b { display: block; font: 500 var(--t-lead)/1.4 var(--font-text); margin-bottom: var(--s-1); }
.picker__list { list-style: none; margin: 0 0 var(--s-4); padding: 0; display: grid; gap: var(--s-1); }
.picker__list button, .mv__list button { display: grid; grid-template-columns: 64px 1fr; gap: var(--s-3); align-items: center; width: 100%; padding: var(--s-1); border: 1px solid transparent; background: none; text-align: left; cursor: pointer; color: inherit; font: inherit; transition: background-color .15s, border-color .15s; }
.picker__list img, .mv__list img { width: 64px; height: 44px; object-fit: cover; display: block; filter: grayscale(.2); }
.picker__list b, .mv__list b { display: block; font-weight: 500; font-size: var(--t-body); line-height: 1.3; }
.picker__list small, .mv__list small { color: var(--muted); font-size: var(--t-small); }
.picker__list button:hover, .mv__list button:hover { background: var(--surface); }
.picker__list button[aria-pressed="true"], .mv__list button[aria-pressed="true"] { border-color: var(--ink); background: var(--surface); }

/* pair cards on the gallery pages */
.pairs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-8) var(--gutter); }
.pair { display: grid; gap: var(--s-4); align-content: start; scroll-margin-top: calc(var(--nav) + var(--s-5)); }
.pair__text { display: grid; gap: var(--s-2); max-width: 60ch; }
.pair__place { font: 500 var(--t-card)/1.35 var(--font-text); letter-spacing: 0; margin: 0; }
.pair__dates { color: var(--muted); font-size: var(--t-small); margin: 0; }
.pair__text p { margin: 0; }
.eras { display: flex; gap: var(--s-2); margin-top: var(--s-2); }
.eras button, .ax__presets button { font: 500 var(--t-small)/1 var(--font-text); padding: 10px 14px; border: 1px solid var(--line-strong); background: none; color: inherit; cursor: pointer; border-radius: var(--r-sm); }
.eras button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
@media (max-width: 1023px) { .pairs { grid-template-columns: minmax(0, 1fr); gap: var(--s-7); } }

/* then-and-now hero */
.tn-hero > .wrap > .hero-text { align-content: start; }
.tn-hero__text { display: grid; gap: var(--s-5); align-content: start; }
.tn-hero__text h1 { font-size: var(--t-h1); }
.tn-hero__jump { list-style: none; padding: 0; margin: var(--s-3) 0 0; display: grid; gap: var(--s-2); }
.cmp--hero { aspect-ratio: 16 / 10; }
.tn-hero__cap { margin: var(--s-4) 0 0; color: var(--muted); max-width: 72ch; }
.tn-hero__cap b { color: var(--ink); font-weight: 500; }
@media (max-width: 1023px) { .tn-hero { height: auto !important; min-height: 0; } .tn-hero__text { margin-bottom: var(--s-6); } }

/* ---------------------------------------------------------------- home: history */
.rows.years > li { grid-template-columns: 72px minmax(0, 1fr); gap: var(--s-4); padding-block: var(--s-3); align-items: baseline; }
.rows.years > li:first-child { padding-top: 0; }
.rows.years .rows__value { grid-column: 1; grid-row: 1; text-align: left; white-space: normal; font: var(--display-weight) 22px/1.2 var(--font-display); color: var(--ink); }
.rows.years .rows__name { grid-column: 2; grid-row: 1; font-weight: 400; }
#story .rows.years > li { grid-template-columns: 96px minmax(0, 1fr); }
#story .rows.years .rows__value { font-size: 18px; }
.history__text .rows { margin-bottom: var(--s-5); }
.history__photos { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); align-content: start; }
.ph { display: block; overflow: hidden; aspect-ratio: 4 / 3; background: var(--surface); }
.ph--wide { grid-column: 1 / -1; aspect-ratio: 16 / 7.5; }
.ph img, .ph-frame img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s var(--ease, ease); }
.ph:hover img { transform: scale(1.03); }
.ph-frame { aspect-ratio: 3 / 2; overflow: hidden; }

/* ---------------------------------------------------------------- home: guess the year */
.guess { align-items: stretch; min-height: 0; }
.guess__panel { display: flex; flex-direction: column; gap: var(--s-4); }
.guess__year { font: var(--display-weight) clamp(64px, 7vw, 104px)/1 var(--font-display); letter-spacing: -0.03em; margin: 0; font-variant-numeric: tabular-nums; }
.guess__slider { display: grid; gap: var(--s-2); }
.guess__slider input { width: 100%; accent-color: var(--action); height: 32px; }
.guess__ends { display: flex; justify-content: space-between; font-size: var(--t-label); color: var(--muted); }
.guess__actions { display: flex; gap: var(--s-3); }
.guess__result { padding: var(--s-4) 0 0; border-top: 1px solid var(--line); }
.guess__result p { margin: 0 0 var(--s-2); }
.guess__answer b { font: var(--display-weight) 28px/1.2 var(--font-display); margin-right: var(--s-2); }
.guess__photo { overflow: hidden; background: var(--surface); min-height: 320px; }
.guess__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.guess__score { margin-top: auto; }

/* ---------------------------------------------------------------- home: books */
.book { display: grid; gap: var(--s-2); align-content: start; color: inherit; text-decoration: none; }
.book__img { overflow: hidden; aspect-ratio: 4 / 4.2; background: var(--surface); margin-bottom: var(--s-3); }
.book__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s var(--ease, ease); }
.book:hover .book__img img { transform: scale(1.03); }
.book .t-card { margin: 0; font-family: var(--font-display); font-size: 24px; font-weight: var(--display-weight); }
.book p { margin: 0; }
.book__buy { display: flex; justify-content: space-between; align-items: baseline; padding-top: var(--s-3); border-top: 1px solid var(--line); margin-top: var(--s-2) !important; }
.book__buy b { font: var(--display-weight) 24px/1 var(--font-display); }
.books__head p { max-width: 36ch; }

/* ---------------------------------------------------------------- one-at-a-time decks */
.facts__deck { display: flex; flex-direction: column; }
.facts__slides { flex: 1; }
.fact__n { font: var(--display-weight) clamp(56px, 6.4vw, 96px)/1 var(--font-display); letter-spacing: -0.03em; margin: 0 0 var(--s-5); }
.fact__n span { font-size: .32em; letter-spacing: 0; color: var(--muted); }
.fact__text { font-size: 22px; line-height: 1.5; max-width: 30ch; margin: 0 0 var(--s-4); font-family: var(--font-display); }
.fact__src { color: var(--muted); font-size: var(--t-small); }
.deck__controls { display: flex; align-items: center; gap: var(--s-3); margin-top: var(--s-6); flex-wrap: wrap; }
.deck__icon { width: 44px; height: 44px; border: 1px solid var(--line-strong); background: none; color: inherit; font-size: 18px; cursor: pointer; border-radius: var(--r-sm); transition: background-color .15s; }
.deck__icon:hover { background: var(--surface); }
.deck__dots { display: flex; gap: 6px; margin-left: auto; }
.deck__dots button { width: 10px; height: 10px; padding: 0; border-radius: 50%; border: 1px solid var(--ink); background: none; cursor: pointer; }
.deck__dots button[aria-current="true"] { background: var(--ink); }
.facts__photo { overflow: hidden; aspect-ratio: 4 / 3; align-self: start; background: var(--surface); }
.facts__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
[data-deck]:not(.is-deck) [data-slide][hidden] { display: block; }
[data-deck]:not(.is-deck) .deck__controls { display: none; }
.deck__controls--top { display: none; }

/* the roadmap slides */
.deck { display: flex; flex-direction: column; outline: none; }
.slide { flex: 1; min-height: 0; align-items: start; }
.slide__text { display: grid; gap: var(--s-4); align-content: start; }
.slide__text h3 { font: var(--display-weight) var(--t-h3)/1.25 var(--font-display); margin: 0; font-size: 32px; }
.slide__text p { margin: 0; }
.slide__visual { min-height: 0; max-height: 520px; display: flex; align-items: flex-start; }
.slide__visual > .mock { flex: 1; }

/* mock screens inside the slides */
.mock { --m-line: color-mix(in oklab, var(--ink) 14%, transparent); background: var(--bg); border: 1px solid var(--m-line); border-radius: 12px; overflow: hidden; font-size: var(--t-small); box-shadow: 0 1px 2px rgb(0 0 0 / .04), 0 12px 32px -18px rgb(0 0 0 / .25); }
.mock__bar { margin: 0; padding: 12px 16px; border-bottom: 1px solid var(--m-line); font-weight: 500; display: flex; gap: 8px; align-items: center; }
.mock__bar::before { content: ""; width: 34px; height: 8px; background: radial-gradient(circle, var(--m-line) 3.5px, transparent 4px) 0 0 / 12px 8px repeat-x; }
.mock__body { padding: var(--s-5); display: grid; gap: var(--s-4); }
.mock__field { display: grid; gap: 6px; }
.mock__field span { font-size: var(--t-label); color: var(--muted); }
.mock__field b { font-weight: 400; padding: 12px; border: 1px solid var(--m-line); background: var(--p-bg); font-size: var(--t-body); }
.mock__row { display: flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; }
.mock__btn { background: var(--action); color: var(--action-ink); padding: 10px 16px; font-weight: 500; border-radius: var(--r-btn, 4px); }
.mock__chip { padding: 9px 14px; border: 1px solid var(--m-line); border-radius: var(--r-btn, 4px); }
.mock__stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--m-line); padding-top: var(--s-4); }
.mock__stats b { display: block; font: var(--display-weight) 32px/1 var(--font-display); }
.mock__stats span { color: var(--muted); }
.mock__files { list-style: none; margin: 0; padding: 0; }
.mock__files li { display: grid; grid-template-columns: 1.2fr 1.2fr .7fr 1fr; gap: var(--s-3); padding: 12px 0; border-bottom: 1px solid var(--m-line); font-variant-numeric: tabular-nums; }
.mock__st { color: var(--muted); }
.mock__st.is-ok { color: #2f6b3f; font-weight: 500; }
.mock__st.is-ok::before { content: "✓ "; }
.mock--sheet { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; padding: 2px; background: var(--ink); border: 0; }
.mock--sheet div { aspect-ratio: 4 / 3; overflow: hidden; }
.mock--sheet img { width: 100%; height: 100%; object-fit: cover; display: block; filter: grayscale(.5) sepia(.15); }
.mock--propose, .mock--contrib { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--s-5); padding: var(--s-5); align-items: start; }
.mock__scan { position: relative; overflow: hidden; }
.mock__scan img { width: 100%; display: block; }
.mock__box { position: absolute; border: 2px solid #c9861a; background: rgb(201 134 26 / .12); }
.mock__pin { position: absolute; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%; background: var(--p-bg); color: var(--p-ink); display: grid; place-items: center; font-weight: 600; box-shadow: 0 0 0 3px var(--action); }
.mock__card { display: grid; gap: var(--s-3); padding: var(--s-4); border: 1px solid var(--m-line); background: var(--p-bg); }
.mock__card p { margin: 0; }
.mock__input { padding: 12px; border: 1px solid var(--m-line); background: #fff; }
.mock--profile { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); padding: var(--s-5); align-items: start; }
.mock--profile p { margin: 0 0 var(--s-2); }
.mock__pimg img { width: 100%; display: block; }
.mock__h { font: var(--display-weight) 28px/1.2 var(--font-display); }
.mock__ev { border-left: 2px solid var(--action); padding-left: var(--s-3); font-style: italic; }
.mock__ev span { display: block; font-style: normal; color: var(--muted); font-size: var(--t-label); margin-top: 4px; }
.mock--views { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); padding: var(--s-4); }
.mock__v { border: 1px solid var(--m-line); display: grid; grid-template-rows: auto 1fr; min-height: 220px; overflow: hidden; }
.mock__v > p { margin: 0; padding: 8px 12px; border-bottom: 1px solid var(--m-line); font-weight: 500; }
.mock__v > svg { width: 100%; height: 100%; display: block; }
.mock__v .m-land { fill: #ece5d7; } .mock__v .m-water { fill: #bccbd8; } .mock__v .m-island { fill: #d9dfcf; }
.mock__v .m-road { fill: none; stroke: #fff; stroke-linecap: round; } .mock__v .m-road--minor { stroke-width: 3; } .mock__v .m-road--major { stroke-width: 5; }
.mock__bars { position: relative; padding: var(--s-4) var(--s-3); display: grid; gap: 14px; align-content: center; }
.mock__bars i { display: block; height: 10px; margin-left: var(--l); width: var(--w); background: var(--action); opacity: .8; border-radius: 2px; }
.mock__bars i:nth-child(2n) { background: #8a3a2b; }
.mock__graph line { stroke: var(--line-strong); stroke-width: 1.5; }
.mock__graph circle { fill: var(--action); }
.mock__graph circle:first-of-type { fill: #8a3a2b; }
.mock--budget { padding: var(--s-5) var(--s-6); align-self: start; }
.mock--budget .rows li { display: flex; justify-content: space-between; gap: var(--s-4); padding: var(--s-4) 0; border-bottom: 1px solid var(--m-line); font-size: var(--t-body); }
.mock--budget .rows__value { color: var(--muted); text-align: right; }

/* evidence rules */
.rules { row-gap: var(--gutter); }
.rule { display: grid; gap: var(--s-3); align-content: start; padding: var(--s-6); color: inherit; text-decoration: none; }
.rule h3 { margin: 0; font-family: var(--font-display); font-weight: var(--display-weight); font-size: 26px; }
.rule p { margin: 0; }

/* ---------------------------------------------------------------- the archive preview */
.ax-frame { min-height: 0; }
.ax { --ax-line: color-mix(in oklab, var(--p-ink) 13%, transparent); --ax-bg: #fbf8f2; display: grid; grid-template-rows: auto auto minmax(0, 1fr); background: var(--ax-bg); color: var(--p-ink); border: 1px solid var(--ax-line); border-radius: 14px; overflow: hidden; font-size: var(--t-small); box-shadow: 0 1px 2px rgb(0 0 0 / .05), 0 24px 48px -32px rgb(28 34 48 / .45); height: 100%; min-height: 520px; }
.ax button { font: inherit; color: inherit; }
.ax__bar { display: flex; align-items: center; gap: var(--s-4); padding: 10px 14px; border-bottom: 1px solid var(--ax-line); }
.ax__brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; }
.ax__brand img { width: 20px; height: auto; }
.ax__search { position: relative; flex: 1; max-width: 420px; display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 36px; border: 1px solid var(--ax-line); border-radius: 8px; background: #fff; }
.ax__search svg { width: 16px; height: 16px; fill: none; stroke: var(--p-muted); stroke-width: 1.6; flex: none; }
.ax__search input { border: 0; outline: 0; background: none; flex: 1; font: inherit; font-size: var(--t-small); color: inherit; min-width: 0; height: 100%; }
.ax__search:focus-within { border-color: var(--p-action); box-shadow: 0 0 0 2px color-mix(in oklab, var(--p-action) 25%, transparent); }
.ax__results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 5; list-style: none; margin: 0; padding: 6px; background: #fff; border: 1px solid var(--ax-line); border-radius: 10px; box-shadow: 0 12px 32px -12px rgb(0 0 0 / .3); }
.ax__results li { display: grid; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.ax__results li:hover, .ax__results li[aria-selected="true"] { background: var(--p-surface); }
.ax__results li span { color: var(--p-muted); font-size: var(--t-label); }
.ax__results .is-none { color: var(--p-muted); cursor: default; }
.ax__tabs { display: flex; gap: 2px; margin-left: auto; padding: 3px; background: var(--p-surface); border-radius: 9px; }
.ax__tabs button { border: 0; background: none; padding: 7px 12px; border-radius: 7px; cursor: pointer; font-weight: 500; color: var(--p-muted); }
.ax__tabs button[aria-selected="true"] { background: #fff; color: var(--p-ink); box-shadow: 0 1px 2px rgb(0 0 0 / .08); }
.ax__tabs button:hover { color: var(--p-ink); }
.ax__range { display: flex; align-items: center; gap: var(--s-4); padding: 8px 14px; border-bottom: 1px solid var(--ax-line); }
.ax__years { white-space: nowrap; color: var(--p-muted); min-width: 120px; }
.ax__years b { color: var(--p-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.ax__slider { position: relative; flex: 1; height: 28px; min-width: 120px; }
.ax__track { position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px; background: var(--ax-line); border-radius: 2px; }
.ax__track i { position: absolute; top: 0; bottom: 0; background: var(--p-action); border-radius: 2px; }
.ax__slider input { position: absolute; inset: 0; width: 100%; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; height: 28px; }
.ax__slider input::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--p-action); cursor: grab; }
.ax__slider input::-moz-range-thumb { pointer-events: auto; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--p-action); cursor: grab; }
.ax__slider input::-webkit-slider-runnable-track { background: none; }
.ax__slider input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px color-mix(in oklab, var(--p-action) 35%, transparent); }
.ax__presets { display: flex; gap: 6px; }
.ax__presets button { padding: 6px 10px; font-size: var(--t-label); border-color: var(--ax-line); }
.ax__presets button:hover { background: var(--p-surface); }
.ax__body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; min-height: 0; }
.ax__view { position: relative; min-height: 0; overflow: hidden; }
.ax__profile { border-left: 1px solid var(--ax-line); padding: 16px 18px 24px; overflow: auto; min-height: 0; background: #fff; }
.ax-empty { color: var(--p-muted); padding: var(--s-5); }

/* map */
.ax-map { position: absolute; inset: 0; background: #efe9dd; }
.ax-map__svg { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.ax-map__svg:active { cursor: grabbing; }
.ax .m-land { fill: #efe9dd; } .ax .m-water { fill: #b9cbd9; } .ax .m-island { fill: #d6ddca; }
.ax .m-road { fill: none; stroke: #fff; stroke-linecap: round; stroke-linejoin: round; }
.ax .m-road--minor { stroke-width: 2.4; } .ax .m-road--major { stroke-width: 4.5; stroke: #fdfbf6; }
.ax-street { font: 500 calc(11px * var(--k, 1)) var(--font-text); fill: #8a8273; letter-spacing: .02em; }
.ax-water { font: italic 400 calc(22px * var(--k, 1)) var(--font-display); fill: #6f8aa0; }
.ax-water--sm { font-size: calc(13px * var(--k, 1)); }
.ax-link { vector-effect: non-scaling-stroke; stroke: var(--p-ink); stroke-width: 1.2; stroke-dasharray: 3 3; opacity: .55; }
.ax-pin { cursor: pointer; }
.ax-pin__dot { fill: var(--pin, var(--p-action)); stroke: #fff; stroke-width: 1.5; transition: r .15s; }
.ax-pin__halo { fill: none; stroke: var(--pin, var(--p-action)); stroke-dasharray: 2 2; opacity: .7; }
.ax-pin--building { --pin: #1f4a7a; } .ax-pin--business { --pin: #8a3a2b; } .ax-pin--event { --pin: #b2741c; } .ax-pin--organisation, .ax-pin--place { --pin: #3f6b46; }
.ax-pin.is-off { opacity: .14; pointer-events: none; }
.ax-pin.is-sel .ax-pin__dot { stroke: var(--p-ink); stroke-width: 2.5; }
.ax-pin:hover .ax-pin__dot, .ax-pin:focus-visible .ax-pin__dot { r: 7; }
.ax-pin:focus { outline: none; }
.ax-pin__label { font: 600 12px var(--font-text); fill: var(--p-ink); paint-order: stroke; stroke: #fbf8f2; stroke-width: 3px; pointer-events: none; }
.ax-pin.is-rel:not(.is-sel) .ax-pin__dot { stroke: var(--p-ink); stroke-width: 1.5; }
.ax-map__zoom { position: absolute; top: 12px; right: 12px; display: grid; background: #fff; border: 1px solid var(--ax-line); border-radius: 8px; overflow: hidden; }
.ax-map__zoom button { width: 32px; height: 32px; border: 0; background: none; font-size: 18px; cursor: pointer; }
.ax-map__zoom button + button { border-top: 1px solid var(--ax-line); }
.ax-map__count { position: absolute; left: 12px; bottom: 10px; margin: 0; padding: 4px 8px; background: rgb(255 255 255 / .9); border-radius: 6px; font-size: var(--t-label); }
.ax-map__key { position: absolute; right: 12px; bottom: 10px; display: flex; gap: 10px; padding: 4px 10px; background: rgb(255 255 255 / .9); border-radius: 6px; font-size: var(--t-label); }
.ax-map__key .k::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; background: var(--c); }
.k--building { --c: #1f4a7a; } .k--business { --c: #8a3a2b; } .k--event { --c: #b2741c; }
.k--approx::before { background: none !important; border: 1px dashed var(--p-ink); }

/* timeline */
.ax-tl { position: absolute; inset: 0; overflow: auto; padding: 12px 18px 16px; }
.ax-tl__axis { position: sticky; top: -12px; height: 28px; margin: -12px -18px 8px; padding: 0 18px; background: var(--ax-bg); border-bottom: 1px solid var(--ax-line); z-index: 2; }
.ax-tl__axis span { position: absolute; left: calc(18px + (100% - 36px) * var(--l) / 100%); top: 8px; transform: translateX(-50%); font-size: var(--t-label); color: var(--p-muted); font-variant-numeric: tabular-nums; }
.ax-tl__axis span { left: calc(18px + var(--l) * (1 - 36px / 100%)); }
.ax-tl__row { margin-bottom: 10px; }
.ax-tl__group { margin: 0 0 4px; font-size: var(--t-label); font-weight: 600; color: var(--p-muted); }
.ax-tl__lanes { position: relative; height: calc(var(--lanes) * 24px); }
.ax-tl__item { position: absolute; left: var(--l); top: calc(var(--lane) * 24px); height: 20px; min-width: 8px; width: var(--w); padding: 0; border: 0; background: none; cursor: pointer; display: flex; align-items: center; white-space: nowrap; }
.ax-tl__mark { position: absolute; inset: 4px 0; background: var(--c, var(--p-action)); border-radius: 3px; opacity: .85; }
.ax-tl__item.is-open .ax-tl__mark { -webkit-mask: linear-gradient(90deg, #000 70%, transparent); mask: linear-gradient(90deg, #000 70%, transparent); }
.ax-tl__item.is-fuzzy .ax-tl__mark { opacity: .55; }
.ax-tl__item--event .ax-tl__mark { inset: 3px auto 3px -6px; width: 12px; transform: rotate(45deg) scale(.75); border-radius: 2px; }
.ax-tl__name { position: absolute; left: calc(100% + 6px); font-size: 12px; color: var(--p-ink); }
.ax-tl__item--event .ax-tl__name { left: 10px; }
.ax-tl__item.is-before .ax-tl__name { position: absolute; left: auto; right: calc(100% + 6px); }
.ax-tl__item--event.is-before .ax-tl__name { right: 12px; }
.ax-tl__item.is-inside .ax-tl__name { position: absolute; left: 6px; color: #fff; overflow: hidden; text-overflow: ellipsis; max-width: calc(100% - 8px); }
.ax-tl__item:hover .ax-tl__mark, .ax-tl__item.is-sel .ax-tl__mark { opacity: 1; box-shadow: 0 0 0 2px var(--p-ink); }
.ax-tl__item.is-sel .ax-tl__name { font-weight: 600; }
.ax-tl__item--building { --c: #1f4a7a; } .ax-tl__item--business { --c: #8a3a2b; } .ax-tl__item--event { --c: #b2741c; } .ax-tl__item--person { --c: #6a6f7c; } .ax-tl__item--organisation, .ax-tl__item--place { --c: #3f6b46; }
.ax-tl__note { color: var(--p-muted); font-size: var(--t-label); margin: 8px 0 0; }

/* connections */
.ax-g { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.ax-g__svg { width: 100%; height: 100%; display: block; }
.ax-g__edge line { stroke: color-mix(in oklab, var(--p-ink) 30%, transparent); stroke-width: 1.2; }
.ax-g__edge.lvl-2 line { stroke-dasharray: 3 3; opacity: .6; }
.ax-g__edge text { font: 500 9px var(--font-text); fill: var(--p-muted); text-anchor: middle; paint-order: stroke; stroke: var(--ax-bg); stroke-width: 3px; }
.ax-g__node { cursor: pointer; }
.ax-g__node circle { fill: var(--c, var(--p-action)); stroke: #fff; stroke-width: 2; }
.ax-g__node text { font: 500 10px var(--font-text); text-anchor: middle; fill: var(--p-ink); paint-order: stroke; stroke: var(--ax-bg); stroke-width: 3px; }
.ax-g__node.lvl-0 text { font-size: 12px; font-weight: 600; }
.ax-g__node.lvl-2 text { fill: var(--p-muted); font-size: 9px; }
.ax-g__node:hover circle, .ax-g__node:focus-visible circle { stroke: var(--p-ink); }
.ax-g__node:focus { outline: none; }
.ax-g__node--building { --c: #1f4a7a; } .ax-g__node--business { --c: #8a3a2b; } .ax-g__node--event { --c: #b2741c; } .ax-g__node--person { --c: #6a6f7c; } .ax-g__node--organisation, .ax-g__node--place { --c: #3f6b46; }
.ax-g__side { border-left: 1px solid var(--ax-line); overflow: auto; padding: 12px 14px; }
.ax-g__head { margin: 0 0 8px; font-weight: 600; }
.ax-g__list { list-style: none; margin: 0; padding: 0; }
.ax-g__list li { padding: 8px 0; border-bottom: 1px solid var(--ax-line); display: grid; gap: 2px; }
.ax-g__list button { border: 0; background: none; padding: 0; text-align: left; cursor: pointer; }
.ax-g__list button:hover { text-decoration: underline; }
.ax-g__list em { font-style: normal; color: var(--p-muted); }
.ax-g__list span { color: var(--p-muted); font-size: var(--t-label); }
.ax-src { font-style: italic; }

/* list */
.ax-list { position: absolute; inset: 0; overflow: auto; }
.ax-list table { width: 100%; border-collapse: collapse; }
.ax-list th { position: sticky; top: 0; background: var(--ax-bg); text-align: left; font-weight: 600; color: var(--p-muted); font-size: var(--t-label); padding: 10px 14px; border-bottom: 1px solid var(--ax-line); }
.ax-list td { padding: 8px 14px; border-bottom: 1px solid var(--ax-line); vertical-align: top; }
.ax-list td button { border: 0; background: none; padding: 0; text-align: left; cursor: pointer; font-weight: 500; }
.ax-list td button:hover { text-decoration: underline; }
.ax-list tr.is-sel td { background: color-mix(in oklab, var(--p-action) 8%, transparent); }
.ax-flag { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 4px; background: #f3e4c8; color: #6b4a12; margin-left: 4px; }

/* profile */
.ax-p__type { margin: 0 0 4px; font-size: var(--t-label); font-weight: 600; color: var(--c, var(--p-muted)); }
.ax-p__type--building { --c: #1f4a7a; } .ax-p__type--business { --c: #8a3a2b; } .ax-p__type--event { --c: #9a6215; } .ax-p__type--organisation, .ax-p__type--place { --c: #3f6b46; }
.ax-p__name { font: var(--display-weight) 24px/1.2 var(--font-display); margin: 0 0 4px; letter-spacing: -0.01em; }
.ax-p__dates { margin: 0 0 12px; color: var(--p-muted); }
.ax-p__photo { margin: 0 0 12px; aspect-ratio: 3 / 2; overflow: hidden; background: var(--p-surface); }
.ax-p__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ax-p__summary { margin: 0 0 12px; font-size: 15px; line-height: 1.55; }
.ax-p__dispute { margin: 0 0 12px; padding: 10px 12px; background: #f6ecd8; border-left: 3px solid #b2741c; }
.ax-p__dispute b { font-weight: 600; }
.ax-p__dispute p { margin: 4px 0 0; }
.ax-p__note { margin: 0 0 12px; color: var(--p-muted); font-style: italic; }
.ax__profile h4 { margin: 16px 0 6px; font: 600 var(--t-label)/1.4 var(--font-text); color: var(--p-muted); letter-spacing: 0; }
.ax-p__links { list-style: none; margin: 0; padding: 0; }
.ax-p__links li { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--ax-line); }
.ax-p__links button { border: 0; background: none; padding: 0; text-align: left; cursor: pointer; font-weight: 500; }
.ax-p__links button span { display: block; font-weight: 400; color: var(--p-muted); font-size: var(--t-label); }
.ax-p__links button:hover { text-decoration: underline; }
.ax-p__links small { color: var(--p-muted); white-space: nowrap; font-size: var(--t-label); }
.ax-p__ev { margin: 0; padding: 0 0 0 18px; }
.ax-p__ev li { margin-bottom: 10px; }
.ax-p__ev p { margin: 0 0 2px; }
.ax-p__ev a { font-size: var(--t-label); color: var(--p-action); }
.ax-p__where { color: var(--p-muted); font-size: var(--t-label); margin: 12px 0; }
.ax-p__fix { display: inline-block; margin-top: 4px; padding: 9px 14px; border: 1px solid var(--p-ink); border-radius: var(--r-btn, 4px); font-weight: 500; color: var(--p-ink); text-decoration: none; }
.ax-p__fix:hover { background: var(--p-ink); color: #fff; }

/* compact (home page): map and profile only */
.ax[data-compact] .ax__presets { display: none; }
@media (max-width: 1279px) { .ax__presets { display: none; } .ax__body { grid-template-columns: minmax(0, 1fr) 300px; } }
@media (max-width: 1023px) {
  .ax__bar { flex-wrap: wrap; }
  .ax__search { order: 3; flex-basis: 100%; max-width: none; }
  .ax__body { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(300px, 1fr) auto; }
  .ax__profile { border-left: 0; border-top: 1px solid var(--ax-line); max-height: 320px; }
  .ax-g { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) 140px; }
  .ax-g__side { border-left: 0; border-top: 1px solid var(--ax-line); }
}
@media (max-width: 639px) {
  .ax { min-height: 640px; }
  .ax__brand { display: none; }
  .ax__tabs { margin-left: 0; width: 100%; }
  .ax__tabs button { flex: 1; padding: 7px 4px; }
  .ax__range { flex-wrap: wrap; gap: 6px; }
  .ax__years { min-width: 0; }
  .ax-map__key { display: none; }
}

/* archive hero: the product fills the first screen */
.ax-hero > .wrap > .hero-text { display: flex; flex-direction: column; gap: var(--s-6); height: 100%; min-height: 0; }
.ax-hero__head { align-items: end; }
.ax-hero__head h1 { font-size: clamp(38px, 3.6vw, 56px); margin: 0; max-width: 16ch; }
.ax-hero__side { display: grid; gap: var(--s-4); }
.ax-hero__side .hero__lead { margin: 0; font-size: var(--t-body); max-width: none; }
.ax-hero .ax-frame { flex: 1; min-height: 0; }
.ax-hero .btn-row { margin: 0; }
@media (max-width: 1023px) { .ax-hero { height: auto !important; } .ax-hero .ax-frame { height: 720px; flex: none; } }

/* ---------------------------------------------------------------- map viewer */
.mv-hero > .wrap > .hero-text { height: 100%; align-items: stretch; }
.mv__side { display: grid; gap: var(--s-5); align-content: start; }
.mv__side h1 { font-size: var(--t-h1); margin: 0; }
.mv__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mv__main { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: var(--s-3); min-height: 0; }
.mv__stage { position: relative; overflow: hidden; background: #e6dfd1; cursor: grab; touch-action: none; min-height: 0; }
.mv__stage.is-drag { cursor: grabbing; }
.mv__stage img { width: 100%; height: 100%; object-fit: contain; display: block; transform-origin: 0 0; user-select: none; -webkit-user-drag: none; }
.mv__bar { display: flex; justify-content: space-between; gap: var(--s-5); align-items: start; }
.mv__bar p { margin: 0; max-width: 70ch; }
.mv__bar b { font-weight: 500; }
.mv__zoom { display: flex; gap: var(--s-2); flex: none; }
.mv__zoom button { min-width: 44px; height: 44px; border: 1px solid var(--line-strong); background: none; cursor: pointer; font: 500 var(--t-body) var(--font-text); color: inherit; border-radius: var(--r-sm); padding: 0 12px; }
.mv__zoom button:hover { background: var(--surface); }
@media (max-width: 1023px) { .mv-hero { height: auto !important; } .mv__stage { height: 70svh; } .mv__list { grid-template-columns: 1fr 1fr; } }

/* ---------------------------------------------------------------- parade wall, text pages */
.wall { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gutter); }
.wall__item { margin: 0; }
.wall__item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.wall__item figcaption { margin-top: var(--s-3); color: var(--muted); }
@media (max-width: 639px) { .wall { grid-template-columns: 1fr; } }
.text-page { padding-top: calc(var(--nav) + var(--s-9)) !important; }
.measure-wrap { max-width: 720px; }
.text-page h1 { font-size: var(--t-h1); margin: 0 0 var(--s-6); }
.text-page h2 { font-size: 28px; margin: var(--s-7) 0 var(--s-3); }
.text-page p, .credit-list { max-width: 64ch; }
.credit-list { padding-left: 20px; display: grid; gap: var(--s-2); }

/* ---------------------------------------------------------------- tablet and phone */
@media (max-width: 1023px) {
  .picker__side { margin-top: var(--s-5); }
  .picker__list { grid-template-columns: 1fr 1fr; }
  .picker__now { min-height: 0; }
  .history__photos { margin-top: var(--s-6); }
  .guess__photo { order: -1; aspect-ratio: 3 / 2; min-height: 0; }
  .facts__photo { margin-top: var(--s-6); }
  .slide__visual { max-height: none; margin-top: var(--s-5); }
}
@media (max-width: 639px) {
  .picker__list { grid-template-columns: 1fr; }
  .mock--propose, .mock--contrib, .mock--profile { grid-template-columns: 1fr; }
  .mock--views { grid-template-columns: 1fr; }
  .mock__v { min-height: 140px; }
  .mock__files li { grid-template-columns: 1fr 1fr; }
  .mock--sheet { grid-template-columns: repeat(3, 1fr); }
  .rows.years > li { grid-template-columns: 56px minmax(0, 1fr); }
  .rule { padding: var(--s-5); }
  .mv__list { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .ph img, .book__img img, .cmp__handle span { transition: none; } }

.ax-head { align-items: end; }
.ax-head__side { max-width: 52ch; margin: 0; }
.ax-head__side .link { white-space: nowrap; }

/* ---------------------------------------------------------------- below 1024: sections take their content height
   (the kit's fixed screen heights hold at desktop; stacked content on a tablet or phone runs longer) */
@media (max-width: 1023px) {
  main > :is(section, .section):not(.hero), footer.closing { height: auto !important; min-height: 0; }
  main > :is(section, .section):not(.hero) > .wrap, footer.closing > .wrap { height: auto !important; }
  main > :is(section, .section) > .wrap > .fill { flex: none; }
  .ax-frame.fill { height: 680px; }
  .deck.fill { flex: none; }
  .guess.fill { flex: none; }
  .slide { flex: none; }
}
@media (max-width: 639px) {
  header.nav:not(.is-open) .nav__bar > .nav__actions > .btn { display: none !important; }
  .footer .nav__logo { font-size: 22px; }
  .footer .nav__logo span { white-space: normal; }
  .footer .nav__logo img { height: 40px; }
  .ax-frame.fill { height: 720px; }
  .fact__text { font-size: 19px; }
  .cmp__handle span { width: 38px; height: 38px; margin: -19px 0 0 -19px; }
}
.ax-map__osm { position: absolute; left: 12px; top: 10px; padding: 2px 6px; background: rgb(255 255 255 / .85); border-radius: 4px; font-size: 11px; color: var(--p-muted); text-decoration: none; }
.ax-map__osm:hover { text-decoration: underline; }

/* ---------------------------------------------------------------- book shop */
.shop__add { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 48px; padding: 0 20px; border: 1px solid var(--ink); border-radius: var(--r-btn, 4px); background: var(--ink); color: var(--bg); font: 500 var(--t-body)/1 var(--font-text); cursor: pointer; transition: transform .12s, background-color .15s, color .15s; position: relative; overflow: hidden; }
.shop__add:hover { background: color-mix(in oklab, var(--ink) 86%, var(--action)); transform: translateY(-1px); }
.shop__add:active { transform: translateY(0) scale(.99); }
.shop__add--ghost { background: none; color: var(--ink); width: auto; height: 44px; }
.shop__add--ghost:hover { background: var(--ink); color: var(--bg); }
.shop__add-done { display: none; }
.shop__add.is-added .shop__add-label { display: none; }
.shop__add.is-added .shop__add-done { display: inline; }
.shop__add.is-added .shop__add-done::before { content: "✓ "; }

.shop__intro { display: flex; flex-direction: column; gap: var(--s-5); }
.shop__intro .section-head { margin-bottom: 0; }
.shop__set { display: grid; grid-template-columns: auto 1fr auto; gap: var(--s-4); align-items: center; padding: var(--s-4); border: 1px solid var(--line); background: color-mix(in oklab, var(--bg) 60%, #fff); }
.shop__set-covers { display: flex; }
.shop__set-covers img { width: 40px; height: auto; filter: drop-shadow(0 2px 3px rgb(0 0 0 / .25)); }
.shop__set-covers img + img { margin-left: -14px; transform: rotate(4deg); }
.shop__set-text p { margin: 0; }
.shop__set-price { font: var(--display-weight) 28px/1.1 var(--font-display); }
.shop__perks { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.shop__perks li { display: grid; grid-template-columns: 20px 1fr; gap: var(--s-3); align-items: start; font-size: var(--t-small); line-height: 1.5; }
.shop__perks b { font-weight: 500; }
.shop__perks svg { width: 20px; height: 20px; fill: none; stroke: var(--action); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; margin-top: 1px; }

.product { display: flex; flex-direction: column; background: color-mix(in oklab, var(--bg) 55%, #fff); border: 1px solid var(--line); transition: transform .2s, box-shadow .2s; }
.product:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -28px rgb(28 34 48 / .45); }
.product__stage { position: relative; display: flex; align-items: center; justify-content: center; height: 300px; overflow: hidden; }
.product__stage--blue { background: radial-gradient(120% 90% at 50% 100%, #d8dee6 0%, #e9ecef 60%, #eef0f1 100%); }
.product__stage--red { background: radial-gradient(120% 90% at 50% 100%, #e6d6d0 0%, #efe5e0 60%, #f2ebe7 100%); }
.product__stage img { height: 236px; width: auto; max-width: 80%; object-fit: contain; filter: drop-shadow(0 18px 18px rgb(28 34 48 / .28)) drop-shadow(0 2px 3px rgb(0 0 0 / .2)); transform: rotate(-2deg); transition: transform .4s var(--ease, ease); }
.product:hover .product__stage img { transform: rotate(0deg) translateY(-4px) scale(1.02); }
.product__badge { position: absolute; top: var(--s-3); right: var(--s-3); padding: 4px 10px; border-radius: 999px; background: var(--ink); color: var(--bg); font: 500 var(--t-label)/1.4 var(--font-text); }
.product__body { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-5); flex: 1; }
.product__vol { margin: 0; display: flex; gap: var(--s-2); align-items: center; font-size: var(--t-label); font-weight: 500; color: var(--muted); }
.product__vol span { padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--ink); }
.product__name { margin: 0; font: var(--display-weight) 26px/1.2 var(--font-display); letter-spacing: -0.01em; }
.product__blurb { margin: 0; color: var(--muted); font-size: var(--t-small); line-height: 1.55; }
.product__buy { display: flex; justify-content: space-between; align-items: center; margin: auto 0 var(--s-2); padding-top: var(--s-3); }
.product__price { margin: 0; font: var(--display-weight) 32px/1 var(--font-display); }

.qty { display: inline-grid; grid-template-columns: 36px 32px 36px; align-items: center; height: 40px; border: 1px solid var(--line-strong); border-radius: var(--r-btn, 4px); background: var(--bg); }
.qty button { height: 100%; border: 0; background: none; color: inherit; font: 400 18px/1 var(--font-text); cursor: pointer; display: grid; place-items: center; }
.qty button:hover { background: var(--surface); }
.qty button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
.qty output { text-align: center; font-weight: 500; font-variant-numeric: tabular-nums; }

/* header cart button */
.nav__actions { display: flex; align-items: center; gap: var(--s-3); }
.nav__cart { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--r-btn, 4px); background: none; color: var(--ink); cursor: pointer; transition: background-color .15s; }
.nav__cart:hover { background: var(--surface); }
.nav__cart svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.nav__count { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--action); color: var(--action-ink); font: 600 11px/20px var(--font-text); text-align: center; }

/* the cart panel */
html.cart-is-open { overflow: hidden; }
.cart { position: fixed; inset: 0; z-index: 50; --c-line: color-mix(in oklab, var(--p-ink) 12%, transparent); }
.cart__scrim { position: absolute; inset: 0; background: rgb(20 24 34 / .45); opacity: 0; transition: opacity .2s; }
.cart__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--p-bg); color: var(--p-ink); box-shadow: -24px 0 48px -24px rgb(0 0 0 / .4); transform: translateX(100%); transition: transform .22s cubic-bezier(.2, .8, .2, 1); outline: none; }
.cart.is-open .cart__scrim { opacity: 1; }
.cart.is-open .cart__panel { transform: none; }
.cart__inner { display: flex; flex-direction: column; height: 100%; }
.cart__head { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--c-line); }
.cart__head h2 { margin: 0; font: var(--display-weight) 26px/1.2 var(--font-display); }
.cart__head h2 span { font: 400 var(--t-small)/1 var(--font-text); color: var(--p-muted); margin-left: 6px; }
.cart__x { width: 40px; height: 40px; border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: inherit; border-radius: 4px; }
.cart__x:hover { background: var(--p-surface); }
.cart__body { flex: 1; overflow: auto; padding: 8px 24px 24px; }
.cart__lines { list-style: none; margin: 0; padding: 0; }
.cart__line { display: grid; grid-template-columns: 72px 1fr auto; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--c-line); align-items: start; }
.cart__line img { width: 72px; height: auto; filter: drop-shadow(0 4px 6px rgb(0 0 0 / .2)); }
.cart__info { display: grid; gap: 4px; justify-items: start; }
.cart__info p { margin: 0; }
.cart__name { font-weight: 500; }
.cart__meta { font-size: var(--t-small); color: var(--p-muted); }
.cart__info .qty { margin-top: 6px; height: 36px; grid-template-columns: 34px 30px 34px; }
.cart__price { margin: 0; font: var(--display-weight) 20px/1.2 var(--font-display); }
.cart__upsell { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; margin-top: 16px; padding: 12px; background: var(--p-surface); }
.cart__upsell img { width: 40px; height: auto; }
.cart__upsell p { margin: 0; font-size: var(--t-small); }
.cart__upsell b { display: block; font-weight: 500; }
.cart__upsell button { height: 36px; padding: 0 14px; border: 1px solid var(--p-ink); background: none; border-radius: 4px; font: 500 var(--t-small) var(--font-text); cursor: pointer; color: inherit; }
.cart__upsell button:hover { background: var(--p-ink); color: var(--p-bg); }
.cart__group { border: 0; margin: 24px 0 0; padding: 0; display: grid; gap: 8px; }
.cart__group legend { font: 500 var(--t-label)/1.4 var(--font-text); color: var(--p-muted); margin-bottom: 8px; padding: 0; }
.cart__opt { display: grid; grid-template-columns: 20px 1fr auto; gap: 12px; align-items: start; padding: 14px; border: 1px solid var(--c-line); border-radius: 6px; cursor: pointer; background: #fff; }
.cart__opt:has(input:checked) { border-color: var(--p-ink); box-shadow: inset 0 0 0 1px var(--p-ink); }
.cart__opt input { margin: 3px 0 0; accent-color: var(--p-ink); width: 16px; height: 16px; }
.cart__opt b { display: block; font-weight: 500; }
.cart__opt small { display: block; color: var(--p-muted); font-size: var(--t-small); line-height: 1.4; margin-top: 2px; }
.cart__opt em { font-style: normal; font-weight: 500; font-size: var(--t-small); white-space: nowrap; }
.cart__contact .field { display: grid; gap: 6px; }
.cart__contact .field span { font-size: var(--t-label); color: var(--p-muted); }
.cart__contact input, .cart__contact textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--c-line); border-radius: 6px; background: #fff; font: 400 16px/1.4 var(--font-text); color: inherit; }
.cart__contact input:focus, .cart__contact textarea:focus { outline: 2px solid var(--p-action); outline-offset: 0; border-color: transparent; }
.cart__error { margin: 4px 0 0; padding: 10px 12px; background: #f8e6e1; color: #7a2a1a; font-size: var(--t-small); border-radius: 4px; }
.cart__foot { padding: 16px 24px 24px; border-top: 1px solid var(--c-line); background: color-mix(in oklab, var(--p-bg) 70%, #fff); display: grid; gap: 12px; }
.cart__sum { margin: 0; display: grid; gap: 6px; }
.cart__sum div { display: flex; justify-content: space-between; font-size: var(--t-small); }
.cart__sum dt { color: var(--p-muted); }
.cart__sum dd { margin: 0; font-variant-numeric: tabular-nums; }
.cart__total { padding-top: 8px; border-top: 1px solid var(--c-line); font-size: var(--t-body) !important; }
.cart__total dt { color: var(--p-ink) !important; font-weight: 500; }
.cart__total dd { font: var(--display-weight) 22px/1 var(--font-display); }
.cart__btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 52px; border: 0; border-radius: 6px; background: var(--p-action); color: var(--p-action-ink); font: 500 var(--t-body)/1 var(--font-text); cursor: pointer; text-decoration: none; transition: filter .15s, transform .12s; }
.cart__btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.cart__btn:disabled { opacity: .6; cursor: wait; }
.cart__btn svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cart__link { border: 0; background: none; color: var(--p-ink); text-decoration: underline; cursor: pointer; font: inherit; font-size: var(--t-small); justify-self: center; }
.cart__small { margin: 0; font-size: var(--t-label); color: var(--p-muted); text-align: center; line-height: 1.5; }
.cart__small svg { display: inline-block; width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.4; vertical-align: -1px; }
.cart__empty, .cart__sent { display: grid; gap: 12px; align-content: start; padding-top: 32px; }
.cart__empty p, .cart__sent p { margin: 0; }
.cart__big { font: var(--display-weight) 24px/1.3 var(--font-display); }
.cart__copy { white-space: pre-wrap; font: 400 13px/1.5 var(--font-mono); background: var(--p-surface); padding: 12px; border-radius: 4px; margin: 4px 0 0; }
@media (max-width: 639px) {
  .cart__panel { width: 100%; }
  .cart__head, .cart__body, .cart__foot { padding-left: 16px; padding-right: 16px; }
  .product__stage { height: 260px; }
  .product__stage img { height: 200px; }
  .shop__set { grid-template-columns: auto 1fr; }
  .shop__set .shop__add { grid-column: 1 / -1; width: 100%; }
}
@media (min-width: 640px) and (max-width: 1023px) { .product { grid-column: span 6; } .shop__intro { grid-column: 1 / -1; } }
@media (prefers-reduced-motion: reduce) { .cart__panel, .cart__scrim, .product, .product__stage img { transition: none; } }
@media (max-width: 639px) {
  header.nav .nav__bar > .nav__actions { display: flex !important; margin-left: auto; margin-right: var(--s-2); }
  header.nav .nav__bar > .nav__actions .nav__cart { width: 44px; height: 44px; }
}
/* the kit hides every header action but the main button on small screens; the cart stays */
header.nav .nav__actions > .nav__cart { display: grid !important; }
header.nav.is-open .nav__actions > .nav__cart { display: none !important; }

/* ================================================================ phone and tablet pass
   Below 1024 nothing is held to a screen height: every block takes the height of its content, so
   short phone screens (browser bars showing) and larger system text never make blocks overlap. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.ink-btn { display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 22px; border: 1px solid var(--ink); border-radius: var(--r-btn, 4px); background: var(--ink); color: var(--bg); font: 500 var(--t-body)/1 var(--font-text); cursor: pointer; transition: transform .12s, background-color .15s; }
.ink-btn:hover { background: color-mix(in oklab, var(--ink) 86%, var(--action)); transform: translateY(-1px); }
.ink-btn:active { transform: none; }
.deck__dots button { width: 24px; height: 24px; padding: 7px; background-clip: content-box; border: 0; box-shadow: inset 0 0 0 1px var(--ink); }
.deck__dots button[aria-current="true"] { background-color: var(--ink); }
.actionbar { transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
.actionbar.is-away { transform: translateY(110%); }

@media (max-width: 1023px) {
  main > :is(.hero, .section--hero) { height: auto !important; min-height: 0; }
  .hero--photo > .wrap > .hero-text { justify-content: flex-start; }
  /* the then-and-now picks become a swipeable strip under the photograph */
  .picker__side { margin-top: var(--s-4); }
  .picker__list { display: flex; grid-template-columns: none; gap: var(--s-2); overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(-1 * var(--gut)) var(--s-4); padding: 2px var(--gut) var(--s-2); scrollbar-width: none; }
  .picker__list::-webkit-scrollbar { display: none; }
  .picker__list li { flex: 0 0 auto; scroll-snap-align: start; scroll-margin-left: var(--gut); }
  .picker__list button { grid-template-columns: 1fr; width: 144px; gap: 6px; padding: 4px 4px 8px; align-items: start; }
  .picker__list img { width: 100%; height: 92px; }
  .picker__list b { font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .picker__list small { font-size: 12px; }
  .picker__now { margin-bottom: var(--s-4); }
}
@media (max-width: 639px) {
  :root { --padt: 64px; --padb: 48px; }
  /* hero: a 4:3 photograph under the header, then the words and full-width buttons */
  .hero--photo { --photo: 72vw; }
  .hero--photo h1 { font-size: clamp(34px, 9.6vw, 42px); max-width: none; }
  .hero .hero__lead { font-size: 17px; line-height: 1.55; }
  .hero .btn-row { display: grid; gap: var(--s-3); }
  .hero .btn-row .btn { width: 100%; justify-content: center; }
  .hero .btn-row .btn--secondary { height: 44px; }
  /* section headings: the grey run-on drops to the body size on a phone */
  h2 .muted { display: block; font-size: .72em; margin-top: 6px; line-height: 1.3; }
  .cmp__tag { top: 8px; padding: 3px 8px; font-size: 12px; }
  .cmp__tag--then { left: 8px; } .cmp__tag--now { right: 8px; }
  .picker__frame .cmp, .cmp--hero { aspect-ratio: 4 / 3; }
  .ink-btn { width: 100%; }
  .guess__actions { display: grid; }
  .guess__year { font-size: 64px; }
  .deck__controls { display: grid; grid-template-columns: auto auto 1fr; }
  .deck__controls .ink-btn { grid-column: 1 / -1; }
  .facts__deck .deck__controls { grid-template-columns: 44px 44px 1fr; }
  .fact__n { font-size: 56px; }
  .history__photos { gap: var(--s-3); }
  .rows.years > li { padding-block: var(--s-3); }
  .join__more { margin-bottom: var(--s-4); }
  .shop__intro { gap: var(--s-4); }
  .product__body { padding: var(--s-4); }
  .tn-hero__text h1, .mv__side h1 { font-size: clamp(34px, 9.6vw, 42px); }
  .pairs { gap: var(--s-7); }
  .footer .closing__cta .section-head--split { gap: var(--s-4); }
  .footer .closing__cta .btn { width: 100%; justify-content: center; }
}
@media (max-width: 639px) {
  /* only the page's last block needs room for the bottom bar */
  main > :is(section, .section):not(.hero) { padding-bottom: var(--padb) !important; }
  main > .hero { padding-bottom: var(--s-7) !important; }
  nav.actionbar { transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
  nav.actionbar.is-away { transform: translateY(calc(100% + 8px)) !important; }
}
@media (max-width: 1023px) {
  /* maps: the list becomes a swipeable strip so the map comes sooner */
  .mv__side { gap: var(--s-4); }
  .mv__list { display: flex; gap: var(--s-2); overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(-1 * var(--gut)); padding: 2px var(--gut) var(--s-2); scrollbar-width: none; }
  .mv__list::-webkit-scrollbar { display: none; }
  .mv__list li { flex: 0 0 auto; scroll-snap-align: start; scroll-margin-left: var(--gut); }
  .mv__list button { grid-template-columns: 1fr; width: 132px; gap: 6px; padding: 4px 4px 8px; align-items: start; }
  .mv__list img { width: 100%; height: 84px; }
  .mv__list b { font-size: 13px; line-height: 1.3; }
  .mv__main { margin-top: var(--s-4); }
  .mv__stage { height: 62svh; }
  .mv__bar { flex-direction: column; gap: var(--s-3); }
}

/* ---------------------------------------------------------------- building stories (here/) */
/* The pages a plaque's QR code opens. Most visitors arrive on a phone, standing in the building. */
.here__where { display: flex; align-items: center; gap: var(--s-2); margin: 0; font: 500 var(--t-small)/1.4 var(--font-text); color: var(--muted); }
.here__where svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--action); stroke-width: 1.6; }
.here-hero h1 { font-size: var(--t-h1); text-wrap: balance; }
/* the kit's hero fills the screen; these heroes take their content height */
main > .here-hero { height: auto !important; min-height: 0; padding-bottom: var(--s-7); }
.here-hero > .wrap { height: auto; }
.here__today { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 2px var(--s-3); margin: var(--s-2) 0 0; padding: var(--s-3) var(--s-4); border-left: 3px solid var(--action); background: var(--surface); }
.here__today .t-label { grid-row: span 2; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }
.here__today b { font: var(--display-weight) 22px/1.2 var(--font-display); }
.here-years .rows__value { font-size: 18px !important; }
#story .here-years > li { grid-template-columns: 112px minmax(0, 1fr); }
.here-story { display: grid; gap: var(--s-4); align-content: start; }
.here-story > p { margin: 0; max-width: 62ch; font-size: var(--t-lead); line-height: 1.6; }
main > .section .here-story .section-head { margin-bottom: var(--s-2); }
main > .section .here-story + * .section-head, #story .span-5 .section-head { margin-bottom: var(--s-4); }
.here-dispute { padding: var(--s-4); border: 1px solid var(--line-strong); }
.here-dispute p { margin: 0; } .here-dispute p + p { margin-top: var(--s-1); }
.here-extra { margin: var(--s-3) 0 0; }
.here-extra img { width: 100%; height: auto; display: block; filter: sepia(.06); }
.here-extra figcaption { margin-top: var(--s-2); color: var(--muted); font-size: var(--t-small); }
.here-extra figcaption b { color: var(--ink); font-weight: 500; }
.here-ask .t-lead { font: var(--display-weight) clamp(22px, 1.2vw + 16px, 30px)/1.3 var(--font-display); color: var(--ink); max-width: 30ch; }
.here-sources { display: grid; gap: var(--s-3); align-content: start; }
.here-sources > p { margin: 0; }
.here-chips, .here-src { list-style: none; margin: 0 0 var(--s-3); padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.here-src { display: grid; gap: var(--s-1); }
.here-chips a { display: inline-block; padding: 8px 12px; border: 1px solid var(--line-strong); background: var(--bg); color: inherit; text-decoration: none; font-size: var(--t-small); line-height: 1.2; transition: border-color .15s; }
.here-chips a:hover { border-color: var(--ink); }
.here-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-6) var(--gutter); }
.here-card { display: grid; gap: var(--s-1); align-content: start; color: inherit; text-decoration: none; }
.here-card__img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface); margin-bottom: var(--s-2); }
.here-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; filter: sepia(.08); transition: transform .4s var(--ease, ease); }
.here-card:hover .here-card__img img { transform: scale(1.03); }
.here-card .t-label { color: var(--muted); }
.here-card__name { font: var(--display-weight) 22px/1.2 var(--font-display); }
#buildings .here-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1023px) { .here-grid, #buildings .here-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .here-ask { margin-bottom: var(--s-6); } }
@media (max-width: 639px) {
  .here-grid, #buildings .here-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-5); }
  .here-hero .tn-hero__text { margin-bottom: var(--s-5); }
  #story .here-years > li { grid-template-columns: 92px minmax(0, 1fr); }
  #story .wrap.grid > .span-5 { margin-bottom: var(--s-6); }
  .here-card { grid-template-columns: 112px minmax(0, 1fr); column-gap: var(--s-3); }
  .here-card__img { grid-row: span 3; margin: 0; }
}
