/* SKAP page CSS: only what sits inside a visual, plus the few page patterns the kit lacks.
   Tokens, grid, type, buttons, nav and footer come from /assets/system.css. */

/* the client's emblem beside the name */
.nav__logo .logo-mark { width: 40px; height: auto; flex: none; }
.footer .nav__logo .logo-mark { width: 56px; }

/* ---------- hero: a row of project photographs, then the words (hero--strip) ---------- */
/* the row sits inside the .wrap and clips at its lines; every photograph is placed from the middle one:
   --wc its width (a fraction of the row), --ar the photographs' ratio, --r a side photograph's scale and
   --g the gap, both in units of the middle photograph's width (the script reads --r and --g) */
.hero--strip > .wrap > .hero-text { display: flex; flex-direction: column; justify-content: center; gap: var(--s-8); height: 100%; }
.strip { --wc: 0.34; --ar: 1.5; --r: 0.765; --g: 0.044; position: relative; width: 100%; aspect-ratio: calc(var(--ar) / var(--wc)); overflow: clip; flex: none; }
.strip > .strip__item {
  position: absolute; left: 50%; top: 50%; width: calc(var(--wc) * 100%); height: auto; max-width: none; aspect-ratio: var(--ar);
  object-fit: cover; border-radius: var(--r-lg); cursor: pointer;
  transform: translate(-50%, -50%) translateX(var(--x, 0%)) scale(var(--s, 1));
  transition: transform 1200ms cubic-bezier(.65, 0, .35, 1), opacity 900ms cubic-bezier(.65, 0, .35, 1);
  will-change: transform, opacity; backface-visibility: hidden;
}
.strip__item.no-move { transition: none; }
@media (hover: hover) and (pointer: fine) { .strip > .strip__item:not(.is-active):hover { filter: brightness(1.06); } }
.strip__text > .btn-row { margin-top: var(--s-6); }
.hero--strip h1 { max-width: 16ch; }
.hero--strip .hero__lead { margin-top: var(--s-5); max-width: 52ch; }
@media (prefers-reduced-motion: reduce) { .strip > .strip__item { transition: none; } }

/* no visible controls (the client's choice): the pause button stays for keyboard and screen-reader users and
   shows over the row's lower left only when it has the keyboard focus */
.strip__pause { position: absolute; left: var(--s-4); bottom: var(--s-4); z-index: 20; min-height: 44px; padding: 0 var(--s-4);
  border: 1px solid var(--line-strong, var(--line)); border-radius: var(--r-sm); background: var(--bg); color: var(--ink); font: 500 var(--t-small)/1 var(--font-text); cursor: pointer; }
.strip__pause:not(:focus-visible) { clip-path: inset(50%); width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; overflow: hidden; white-space: nowrap; }

/* a short laptop: the row is a little smaller so the words keep their room */
@media (min-width: 1024px) and (max-height: 820px) { .strip { --wc: 0.3; } .hero--strip > .wrap > .hero-text { gap: var(--s-7); } }
/* tablet: a bigger middle photograph, the controls under the words */
@media (min-width: 640px) and (max-width: 1023px) {
  .strip { --wc: 0.5; --r: 0.72; --g: 0.05; }
}
/* phone: the middle photograph nearly the column, 4:3, its neighbours peeking */
@media (max-width: 639px) {
  .strip { --wc: 0.84; --ar: 0.9; --r: 0.7; --g: 0.05; }
  .hero--strip > .wrap > .hero-text { justify-content: flex-start; gap: var(--s-6); }
}
@media (max-width: 359px) { .nav__actions .btn { display: none; } }

/* ---------- the network map ---------- */
/* the frame is the sea; the land pale on it; a faint graticule; the island groups named in the display face */
.netmap { row-gap: var(--s-7); }
.netmap__list { display: grid; gap: var(--s-5); align-content: start; }
.netmap__frame { position: relative; margin: 0; background: var(--surface); border-radius: var(--r-lg); overflow: hidden; display: grid; align-items: center; padding: var(--s-4); }
.netmap__frame svg { width: 100%; height: auto; max-height: min(660px, calc(100svh - 230px)); display: block; overflow: visible; }
.netmap__group .t-label { margin-bottom: var(--s-2); }
.netmap .rows > li { padding-block: 0; }
.netmap__row { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; align-items: center; gap: var(--s-3); min-height: 44px; color: var(--ink); text-decoration: none; }
.netmap__kind { color: var(--muted); font-size: var(--t-small); }
.netmap li.is-on .rows__name { color: var(--accent); }
.netmap__dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px; flex: none; }
.netmap__dot--hub { background: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 25%, transparent); }
.netmap__dot--chapter { background: var(--ink); }
.netmap__dot--club { background: var(--bg); border: 3px solid var(--accent); }
.netmap__dot--prelaunch { background: transparent; border: 2px dashed var(--muted); }

.netmap__grid { fill: none; stroke: color-mix(in oklab, var(--ink) 9%, transparent); stroke-width: 0.8; stroke-dasharray: 2 5; }
.netmap__land { fill: var(--bg); stroke: color-mix(in oklab, var(--ink) 22%, transparent); stroke-width: 0.7; stroke-linejoin: round; }
.netmap__island { font: italic var(--display-weight) 22px/1 var(--font-display); fill: color-mix(in oklab, var(--ink) 42%, var(--surface)); letter-spacing: 0.01em; }

/* links: the bundled trunk south and the short Luzon arcs */
.netmap__edge { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; opacity: 0.5; transition: opacity 250ms, stroke-width 250ms; }
.netmap__edge--dash { stroke-dasharray: 5 6; stroke: color-mix(in oklab, var(--ink) 45%, var(--surface)); opacity: 0.9; }
.netmap[data-active] .netmap__edge { opacity: 0.12; }
.netmap[data-active] .netmap__edge.is-on { opacity: 1; stroke-width: 3; }
/* one dot runs the lit link from Lingayen, once, when a node is chosen */
.netmap__pulse { fill: var(--accent); stroke: var(--bg); stroke-width: 2; offset-distance: 0%; offset-rotate: 0deg; opacity: 0; pointer-events: none; }
.netmap__pulse.is-on { animation: netmap-run 1100ms cubic-bezier(.45, 0, .2, 1) forwards; }
@keyframes netmap-run { 0% { offset-distance: 0%; opacity: 1; } 85% { opacity: 1; } 100% { offset-distance: 100%; opacity: 0; } }

/* nodes */
.netmap__node { cursor: pointer; }
.netmap__node circle { fill: var(--bg); stroke: var(--accent); stroke-width: 3; transition: r 200ms, stroke-width 200ms; }
.netmap__node--hub circle { fill: var(--accent); stroke: var(--bg); stroke-width: 3; }
.netmap__node--hub .netmap__halo { fill: color-mix(in oklab, var(--accent) 16%, transparent); stroke: color-mix(in oklab, var(--accent) 35%, transparent); stroke-width: 1; }
.netmap__node--chapter circle { fill: var(--ink); stroke: var(--bg); stroke-width: 2.5; }
.netmap__node--prelaunch circle { fill: var(--bg); stroke: color-mix(in oklab, var(--ink) 45%, var(--surface)); stroke-width: 2.5; stroke-dasharray: 3 3; }
.netmap__node .netmap__hit { fill: transparent; stroke: none; }
.netmap__node text { font: 500 15px/1 var(--font-text); fill: var(--ink); paint-order: stroke; stroke: var(--bg); stroke-width: 5px; stroke-linejoin: round; transition: opacity 200ms; }
.netmap__node--hub text { font-weight: 600; }
.netmap__node.is-on circle:not(.netmap__hit):not(.netmap__halo) { stroke-width: 4.5; }
.netmap__node:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
.netmap[data-active] .netmap__node:not(.is-on):not(.netmap__node--hub) text { opacity: 0.35; }
.netmap .netmap__node.is-on text { fill: var(--accent); }

/* the card in the Pacific east of Luzon (the map hugs the frame's left): the network at rest, the chosen node on hover or focus */
.netmap__card { position: absolute; right: var(--s-5); top: var(--s-5); width: min(236px, 40%); pointer-events: none; }
.netmap__card-body { display: none; gap: var(--s-1); padding: var(--s-4) var(--s-5); background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-md); }
.netmap__card-body.is-on { display: grid; animation: netmap-card 220ms ease-out; }
.netmap__card-body .t-label { display: flex; align-items: center; gap: var(--s-2); margin-bottom: var(--s-1); }
.netmap__card-body .netmap__dot { width: 10px; height: 10px; }
.netmap__card-title { font: var(--display-weight) 24px/1.15 var(--font-display); letter-spacing: var(--display-tracking); }
.netmap__card-place { font-size: var(--t-small); color: var(--muted); }
.netmap__card-place > span { display: block; }
.netmap__card-note { font-size: var(--t-small); color: var(--ink); line-height: 1.45; margin-top: var(--s-1); }
@keyframes netmap-card { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .netmap__pulse.is-on { animation: none; } .netmap__card-body.is-on { animation: none; } }

/* the live map (mapcn, SkapMap.tsx) lies over the static one and fills the frame; the card stays above it */
.netmap__live { position: absolute; inset: 0; z-index: 1; border-radius: inherit; overflow: hidden; }
.netmap__live > div { width: 100%; height: 100%; }
.netmap__card { z-index: 2; }
/* once the live map has drawn, the static one steps aside (it stays for no WebGL, no script, or slow tiles) */
.netmap[data-live] .netmap__canvas > svg { visibility: hidden; }
/* the map's credit toggle is a full tap target */
/* the credit: closed, a round "i" button in the lower right (44px to tap); open, the line of credits beside it */
.netmap__live .maplibregl-ctrl-attrib.maplibregl-compact { min-height: 44px; display: flex; align-items: center; padding: 0 44px 0 0; margin: 0 var(--s-3) var(--s-3) 0; border-radius: 22px !important; box-sizing: border-box; }
.netmap__live .maplibregl-ctrl-attrib.maplibregl-compact:not([open]) { width: 44px; padding: 0; }
.netmap__live .maplibregl-ctrl-attrib.maplibregl-compact[open] .maplibregl-ctrl-attrib-inner { padding: 0 var(--s-2) 0 var(--s-4); font-size: 12px; line-height: 1.3; }
.netmap__live .maplibregl-ctrl-attrib-button { position: absolute; top: 0; right: 0; width: 44px; height: 44px; border-radius: 22px; background-position: center; background-size: 20px; background-repeat: no-repeat; }
.netmap__pin { position: relative; display: grid; place-items: center; width: 22px; height: 22px; }
.netmap__pin .netmap__dot { transition: transform 200ms var(--ease, ease); }
.netmap__pin--hub .netmap__dot { width: 16px; height: 16px; }
.netmap__pin--chapter .netmap__dot { width: 11px; height: 11px; box-shadow: 0 0 0 2px var(--bg); }
.netmap__pin--club .netmap__dot, .netmap__pin--prelaunch .netmap__dot { width: 13px; height: 13px; }
.netmap__pin.is-on .netmap__dot { transform: scale(1.35); }
.netmap__pin-label { position: absolute; top: 50%; transform: translateY(-50%); white-space: nowrap; pointer-events: none;
  font: 500 13px/1 var(--font-text); color: var(--ink);
  text-shadow: 0 0 2px var(--bg), 0 0 2px var(--bg), 0 0 4px var(--bg), 0 0 6px var(--bg); transition: opacity 200ms, color 200ms; }
.netmap__pin--r .netmap__pin-label { left: calc(100% + 2px); }
.netmap__pin--l .netmap__pin-label { right: calc(100% + 2px); }
.netmap__pin--hub .netmap__pin-label { font-weight: 600; }
.netmap__pin.is-on .netmap__pin-label { color: var(--accent); }
.netmap__pin.is-dim .netmap__pin-label { opacity: .4; }

@media (max-width: 1023px) {
  .netmap__list, .netmap__frame { grid-column: 1 / -1; }
  .netmap__frame svg { max-height: none; }
}
/* a phone: the card sits under the map, in the flow */
@media (max-width: 639px) {
  .netmap__frame { display: block; padding: var(--s-3); align-self: start; }
  /* the open sea west of Palawan is cropped away so the islands draw larger on the narrow column */
  .netmap__frame svg { width: 116%; max-width: none; margin-left: -14%; }
  /* the live map covers the static one only, so the card keeps its place under it */
  .netmap__canvas { position: relative; }
  .netmap__card { position: static; width: auto; margin-top: var(--s-3); }
}

/* ---------- picture-develops: the one photograph beside the words ---------- */
.develop { margin: 0; border-radius: var(--r-lg); overflow: hidden; height: min(600px, var(--ly-fit, 600px)); }
.develop > img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 1023px) { .develop { height: auto; aspect-ratio: 4 / 3; margin-top: var(--s-7); } }

/* ---------- the statement (word-highlight) ---------- */
.statement .t-label { color: var(--muted); margin-bottom: var(--s-6); }
.statement .pillars { margin-top: var(--s-8); }
.pillars h3 { font: 500 var(--t-card)/1.3 var(--font-text); margin-bottom: var(--s-2); }

/* ---------- facts as figures in sentences ---------- */
.figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter, 24px); margin-top: var(--s-7); }
.figures p { color: var(--muted); }
.figures strong { display: block; font: var(--display-weight) var(--t-stat, 38px)/1.1 var(--font-display); color: var(--ink); letter-spacing: var(--display-tracking); }
@media (max-width: 639px) { .figures { grid-template-columns: 1fr; gap: var(--s-4); } }

/* ---------- open tiles on photo grids ---------- */
.tile--43 { --tile-ratio: 4 / 3; }
a.tile { text-decoration: none; color: inherit; }
.tile .t-small { color: var(--muted); }

/* ---------- form on a photograph (system.css .frame--photo > .card) ---------- */
.form-photo { min-height: 100%; }

/* ---------- inner pages ---------- */
.page-head p { max-width: 62ch; }
.year-nav { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-6); }
.project-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--gutter, 24px); }
.project-list > li { display: grid; gap: var(--s-2); padding-block: var(--s-5); border-bottom: 1px solid var(--line); align-content: start; }
.project-list h3 { font: 500 var(--t-card)/1.3 var(--font-text); }
.project-list p { color: var(--ink); }
.project-list .links { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-5); }
.project-list ul.days { list-style: none; padding: 0; display: grid; gap: var(--s-1); color: var(--muted); }
@media (max-width: 1023px) { .project-list { grid-template-columns: 1fr; } }


.prose { max-width: 66ch; display: grid; gap: var(--s-4); }
.prose p, .prose li { color: var(--ink); }
.prose h3 { font: 500 var(--t-card)/1.3 var(--font-text); margin-top: var(--s-4); }
.prose ul, .prose ol { padding-left: 1.2em; display: grid; gap: var(--s-2); }
.prose blockquote { margin: 0; padding-left: var(--s-5); border-left: 2px solid var(--accent); font: var(--display-weight) var(--t-h3, 28px)/1.3 var(--font-display); }
.prose figure { margin: 0; }
.prose img { max-width: 100%; height: auto; border-radius: var(--r-md); }
.prose .wp-block-image figcaption, .prose figcaption { font-size: var(--t-small); color: var(--muted); margin-top: var(--s-2); }

.cycle { counter-reset: step; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--gutter, 24px); }
.cycle li { counter-increment: step; display: grid; gap: var(--s-2); align-content: start; border-top: 2px solid var(--accent); padding-top: var(--s-4); }
.cycle li::before { content: counter(step); font: var(--display-weight) var(--t-stat, 38px)/1 var(--font-display); color: var(--accent); }
.cycle h3 { font: 500 var(--t-card)/1.3 var(--font-text); }
@media (max-width: 1023px) { .cycle { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .cycle { grid-template-columns: 1fr; } }


.contact-lines { display: grid; gap: var(--s-3); font-size: var(--t-lead); }
.contact-lines a { color: var(--ink); }
[data-role-intro][hidden] { display: none; }

.dl-table { width: 100%; border-collapse: collapse; }
.dl-table th, .dl-table td { text-align: left; padding: var(--s-3) var(--s-4) var(--s-3) 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.dl-table th { font-weight: 500; }
@media (min-width: 640px) { .dl-table th { white-space: nowrap; } }
.dl-table { table-layout: fixed; overflow-wrap: anywhere; }
.dl-table td { color: var(--ink); }

/* figures as rows on the left line: the number large, its label beside it */
.figure-rows > li { grid-template-columns: 96px minmax(0, 1fr); align-items: baseline; }
.figure-rows .rows__name { font: var(--display-weight) var(--t-stat, 38px)/1 var(--font-display); letter-spacing: var(--display-tracking); grid-row: 1; }
.figure-rows > li > p { grid-column: 2; grid-row: 1; color: var(--muted); }

/* tablet (640 to 1023): the screens re-planned (layout-v4.md section 2) */
@media (min-width: 640px) and (max-width: 1023px) {
  #network { --h: 2; }
  #impact .develop { aspect-ratio: 16 / 9; margin-top: var(--s-5); }
  #stories .grid > .tile.span-4, #stories .grid > .tile.span-4:nth-child(odd of .tile):nth-last-child(1 of .tile) { grid-column: auto / span 4; }
  #stories .tile { --tile-ratio: 2 / 3; }
}

/* 1024 to 1279: the five project rows and the nine-node list each need two screens on a short laptop screen */
@media (min-width: 1024px) and (max-width: 1279px) {
  /* the network keeps one screen: the map already names the island groups, so the list drops its group labels and intro */
  #network .netmap__group .t-label, #network .section-head p { display: none; }
  #network .netmap__list { gap: var(--s-2); }
}

/* phone: the network is two screens (.g2m): the heading and list, then the map; the map names the island groups */
@media (max-width: 639px) {
  #network .netmap__group .t-label, #network .section-head p { display: none; }
  #network .netmap__list { gap: var(--s-3); }
}
/* the join section's photograph pair stays two-up below 1024 */
@media (max-width: 1023px) {
  #join .frame.span-3 { grid-column: auto / span 6; }
  #join .frame.span-3.start-7 { grid-column: 1 / span 6; }
}

/* a row's name that is a link is a full 44px tap target */
.rows a.rows__name { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- the WikiClub pages (/wikiclubs/<id>/) ---------- */
/* their sections hold as much as the club has done, so they take their content's height, not a screen's */
main > section.section.section--auto { height: auto; min-height: 0; }
.club-facts { margin-top: var(--s-6); list-style: none; padding: 0; }
.club-credit { margin-top: var(--s-4); font-size: var(--t-small); color: var(--muted); }
.club-credit a, .club-shot__credit a { color: inherit; }
.club-back { margin-bottom: var(--s-6); }
.link--back::after { content: none; }
.link--back::before { content: "\2190"; display: inline-block; transition: transform var(--dur) var(--ease); }
.link--back:hover::before { transform: translateX(-3px); }
.club-table th { width: 34%; color: var(--muted); font-weight: 500; }
.club-table a { color: var(--ink); }

.club-focus-wrap { margin-top: var(--s-8); }
.club-focus-wrap > h3 { margin-bottom: var(--s-4); }
.club-focus { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--gutter, 24px); }
.club-focus > li { display: grid; gap: var(--s-2); align-content: start; border-top: 2px solid var(--accent); padding-top: var(--s-4); }
.club-focus__name { font: 500 var(--t-card)/1.3 var(--font-text); color: var(--ink); }
.club-focus p { font-size: var(--t-small); color: var(--muted); }
@media (max-width: 1023px) { .club-focus { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 479px) { .club-focus { grid-template-columns: 1fr; } }

/* a year, then its projects: the words on the left, the photographs (one large, the rest in a row) on the right */
.club-year { margin-top: var(--s-8); }
.club-year__label { font: var(--display-weight) var(--t-stat, 38px)/1 var(--font-display); letter-spacing: var(--display-tracking); color: var(--accent); padding-bottom: var(--s-3); border-bottom: 1px solid var(--line-strong, var(--line)); }
.club-project { padding-block: var(--s-7); border-bottom: 1px solid var(--line); row-gap: var(--s-6); }
.club-project > div:first-child { display: grid; gap: var(--s-3); align-content: start; }
.club-project__when { font-size: var(--t-small); color: var(--muted); font-weight: 500; }
.club-project__title { font: var(--display-weight) var(--t-h3, 28px)/1.15 var(--font-display); letter-spacing: var(--display-tracking); }
.club-project p { max-width: 60ch; }
.club-project__points { list-style: disc; padding-left: 1.1em; display: grid; gap: var(--s-2); max-width: 60ch; }
.club-project__links { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-5); margin-top: var(--s-2); }
.club-project__media { display: grid; gap: var(--s-4); }

.club-shot { margin: 0; display: grid; gap: var(--s-2); align-content: start; min-width: 0; }
.club-shot__media { position: relative; overflow: clip; aspect-ratio: 4 / 3; border-radius: var(--r-md); background: var(--surface); }
.club-shot__media--lead { aspect-ratio: 16 / 10; border-radius: var(--r-lg); }
.club-shot__media > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.club-shot__media--contain { aspect-ratio: auto; background: transparent; }
.club-shot__media--contain > img { height: auto; object-fit: contain; }
.club-shot figcaption { display: grid; gap: 2px; font-size: var(--t-small); line-height: 1.4; color: var(--ink); }
.club-shot__credit { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.club-shots { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: var(--s-4); }
@media (max-width: 639px) {
  .club-shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .club-project__title { font-size: 26px; }
}

/* ======================================================================== the image-led showcase
   Projects as photo cards, the home rail, the sticky year bar, the bigger hero row and taller story tiles.
   The reveal, drift, hover and photo viewer live in /assets/showcase (they apply to every photo box). */

/* ---------- projects: photo cards (projects.astro) ---------- */
.pcards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s-8) var(--gutter, 24px); }
.pcard { display: grid; gap: var(--s-3); align-content: start; min-width: 0; }
.pcard--third { grid-column: span 2; }
.pcard--half { grid-column: span 3; }
.pcard__fig { margin: 0 0 var(--s-2); display: grid; gap: var(--s-2); }
.pcard__media { position: relative; overflow: clip; border-radius: var(--r-lg); background: var(--surface); aspect-ratio: 4 / 3; }
.pcard--half .pcard__media { aspect-ratio: 16 / 10; }
.pcard__media > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pcard__credit { font-size: var(--t-label); color: var(--muted); }
.pcard__credit a { color: inherit; }
.pcard > h3 { font: var(--display-weight) var(--t-h3)/1.2 var(--font-display); letter-spacing: var(--display-tracking); text-wrap: balance; }
.pcard > p { color: var(--ink); max-width: 60ch; }
.pcard .links { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-5); }
.pcard ul.days { list-style: none; padding: 0; display: grid; gap: var(--s-1); color: var(--muted); }
.project-list__head { margin-top: var(--s-9); padding-bottom: var(--s-3); border-bottom: 1px solid var(--line); color: var(--muted); }
.pcards + .project-list__head + .project-list > li:first-child,
.pcards + .project-list__head + .project-list > li:nth-child(2) { padding-top: var(--s-5); }
@media (max-width: 1023px) { .pcard--third, .pcard--half { grid-column: span 3; } .pcard--half .pcard__media { aspect-ratio: 4 / 3; } }
@media (max-width: 639px) { .pcards { row-gap: var(--s-7); } .pcard--third, .pcard--half { grid-column: 1 / -1; } }

/* the years stay in reach under the fixed nav */
.year-bar { position: sticky; top: var(--nav); z-index: 30; background: color-mix(in oklab, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.year-bar > .wrap { display: flex; gap: var(--s-2); padding-block: var(--s-3); overflow-x: auto; scrollbar-width: none; }
.year-bar .pill { height: 36px; flex: none; text-decoration: none; transition: background-color var(--dur, 150ms) var(--ease), color var(--dur, 150ms) var(--ease); }
.year-bar .pill:hover { border-color: var(--line-strong, var(--line)); }
.year-bar .pill[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.year-bar .pill[aria-current="true"] .muted { color: color-mix(in oklab, var(--bg) 70%, transparent); }
.section--projects { scroll-margin-top: calc(var(--nav) + 60px); }

/* ---------- home: the latest projects on a rail (index.astro) ---------- */
/* the track starts on the page's left line and runs to the window's right edge */
.rail { --rail-in: calc((100% - min(100% - 2 * var(--gut), var(--container))) / 2); }  /* the heading above already keeps --head-gap */
.rail__track { list-style: none; margin: 0; display: flex; gap: var(--gutter, 24px); overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--rail-in); padding: 0 var(--rail-in) var(--s-4); scrollbar-width: none; }
.rail__track::-webkit-scrollbar { display: none; }
/* a card is at most 400px wide, and short enough that the heading and a whole card fit one laptop screen
   (the screen less the nav, the section's padding and the heading: about 330px) */
.rail__track > li { flex: none; width: min(clamp(280px, 27vw, 400px), max(240px, (100svh - 330px) * 0.8)); scroll-snap-align: start; }
.rcard { position: relative; display: block; border-radius: var(--r-lg); overflow: clip; color: #fff; text-decoration: none; aspect-ratio: 4 / 5; background: #222; isolation: isolate; }
.rcard__media { position: absolute; inset: 0; z-index: -1; overflow: clip; }
.rcard__media > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rcard__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgb(0 0 0 / .78) 0%, rgb(0 0 0 / .45) 38%, rgb(0 0 0 / 0) 62%); }
.rcard__body { position: absolute; inset: auto 0 0 0; display: grid; gap: var(--s-2); padding: var(--s-6); }
.rcard__body h3 { font: var(--display-weight) var(--t-h3)/1.15 var(--font-display); letter-spacing: var(--display-tracking); color: #fff; text-wrap: balance; }
.rcard__body p { color: rgb(255 255 255 / .9); font-size: var(--t-small); max-width: 34ch; }
.rcard__value { justify-self: start; padding: 4px 10px; border-radius: 999px; font: 500 var(--t-label)/1.2 var(--font-text); background: rgb(255 255 255 / .18); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
/* beside the heading (system.css makes a .section-head--row's divs a one-column grid); its one button, the pause,
   shows only while it has the keyboard focus */
.section-head--row > .rail-ctrl { display: flex; gap: var(--s-2); align-self: end; }
.rail-ctrl > .rail-btn:not(:focus-visible) { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.section-head--row > .rail-ctrl[hidden] { display: none; }
.rail-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 999px; border: 1px solid var(--line-strong, var(--line)); background: var(--bg); color: var(--ink); cursor: pointer; transition: background-color 150ms var(--ease), opacity 150ms; }
.rail-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.rail-btn:hover:not(:disabled) { background: var(--surface); }
.rail-btn:disabled { opacity: .4; cursor: default; }
.rail-btn[hidden] { display: none; }
.rail-btn .i-play, .rail-btn.is-paused .i-pause { display: none; }
.rail-btn.is-paused .i-play { display: block; }
/* the desktop loop (showcase.js): the row moves by a transform inside a window the width of the page, never snapping */
.rail.is-auto { overflow: hidden; }
.rail.is-auto > .rail__track { overflow: visible; scroll-snap-type: none; will-change: transform; }
@media (max-width: 639px) { .rail__track > li { width: 82vw; } .rcard__body { padding: var(--s-5); } }

/* ---------- home hero: a bigger photo row; on a laptop the words sit in two columns under it ---------- */
@media (min-width: 1024px) {
  .strip { --wc: 0.44; --ar: 1.5; --r: 0.8; --g: 0.03; }
  .hero--strip > .wrap > .hero-text { gap: var(--s-7); }
  .strip__text { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: var(--gutter, 24px); align-items: end; }
  .strip__text > h1 { grid-row: 1 / span 2; max-width: 14ch; }
  .strip__text > .hero__lead { margin-top: 0; }
  .strip__text > .btn-row { margin-top: var(--s-5); }
}
@media (min-width: 1024px) and (max-height: 820px) { .strip { --wc: 0.38; } .hero--strip > .wrap > .hero-text { gap: var(--s-6); } }

/* ---------- home stories: taller 4:5 tiles on a laptop, so the photographs lead ---------- */
@media (min-width: 1024px) { #stories .tile { --tile-ratio: 4 / 5; } }
/* the rail runs outside the .wrap (to the window's edge), so the .wrap holds only the heading, not the screen */
main > #latest > .wrap { height: auto; flex: none; }
/* the photo-led sections grow with their photographs instead of keeping one fixed screen (system.css fixes a
   section's height from 1280; a taller rail, taller story tiles or a year of project cards would lie over the next) */
main > :is(#latest, #stories) { height: auto; min-height: 100vh; min-height: 100svh; }
main > :is(.section--projects, .section--grow) { height: auto; min-height: 0; }
main > :is(#latest, #stories, .section--projects, .section--grow) > .wrap { height: auto; }
main > #latest { display: block; }
/* from 1280 every section does what system.css already has it do from 640 to 1279: at least its screens,
   and taller when its content needs it, so a long FAQ, a third row of cards or a short laptop screen never
   lays the last rows over the next section (the About engagements, the SALIN FAQ, the PKCI pilot) */
@media (min-width: 1280px) {
  main > :is(section, .section):not(.hero, .section--hero), footer.closing {
    height: auto; min-height: calc(var(--h, 1) * 100vh); min-height: calc(var(--h, 1) * 100svh);
  }
  :where(main > :is(section, .section):not(.hero, .section--hero), footer.closing) { display: flex; flex-direction: column; }
  main > :is(section, .section):not(.hero, .section--hero) > :is(.wrap, .container), footer.closing > .wrap { flex: 1 0 auto; height: auto; min-height: 0; }
  main > :is(.section--projects, .section--grow) { min-height: 0; }
}

/* ---------- stories: the field stories, one per Diff post (stories/index.astro, data/stories.ts) ---------- */
/* photograph on one side, the story on the other, alternating; one column below 1024px */
section[data-year] { scroll-margin-top: calc(var(--nav) + 60px); }
.fstory { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: var(--s-5);
  align-items: start; padding-block: var(--s-8); border-top: 1px solid var(--line); scroll-margin-top: calc(var(--nav) + 60px); }
.fstory:first-of-type { border-top: 0; padding-top: 0; }
.fstory:last-child { padding-bottom: 0; }
.fstory > * { grid-column: 1 / -1; min-width: 0; }
.fstory__media { margin: 0; }
.fstory__media .frame { aspect-ratio: 4 / 3; border-radius: var(--r-lg, 16px); overflow: hidden; }
.fstory__media figcaption { margin-top: var(--s-2); font-size: var(--t-small); line-height: 1.5; color: var(--muted); }
.fstory__media figcaption a { color: inherit; }
.fstory__figure { display: grid; align-content: end; gap: var(--s-3); aspect-ratio: 4 / 3; padding: var(--s-6);
  border-radius: var(--r-lg, 16px); background: color-mix(in oklab, var(--ink) 4%, var(--bg)); box-shadow: inset 0 0 0 1px var(--line); }
.fstory__figure .stat__num { --knock-size: clamp(56px, 4vw + 24px, 96px); white-space: normal; }
.fstory__figure .stat__label { max-width: 30ch; margin: 0; }
.fstory__text { display: grid; gap: var(--s-4); }
.fstory__meta { font-size: var(--t-small); color: var(--muted); }
.fstory__title { font: var(--display-weight, 500) var(--t-h3)/1.2 var(--font-display, var(--font-text)); letter-spacing: -0.02em; color: var(--ink); text-wrap: balance; }
.fstory__lede { font-size: var(--t-lead); line-height: 1.5; color: var(--ink); text-wrap: pretty; }
.fstory__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--s-4) var(--s-5); margin: var(--s-2) 0 0;
  padding-top: var(--s-4); border-top: 1px solid var(--line); }
.fstory__facts dt { font: 600 clamp(24px, 1vw + 16px, 32px)/1.05 var(--font-display, var(--font-text)); letter-spacing: -0.03em; color: var(--ink); }
.fstory__facts dd { margin: var(--s-1) 0 0; font-size: var(--t-small); line-height: 1.45; color: var(--muted); }
.fstory__links { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-6); margin-top: var(--s-2); }
.fstory__by { font-size: var(--t-small); color: var(--muted); }
@media (min-width: 1024px) {
  .fstory__media { grid-column: 1 / span 5; position: sticky; top: calc(var(--nav) + 76px); }
  .fstory__text { grid-column: 7 / span 6; }
  .fstory--flip .fstory__media { grid-column: 8 / span 5; grid-row: 1; }
  .fstory--flip .fstory__text { grid-column: 1 / span 6; grid-row: 1; }
}
.fstory-blog { display: grid; gap: var(--s-5); padding-top: var(--s-8); margin-top: var(--s-8); border-top: 1px solid var(--line); }

/* ---------- 2027: the home page's last section ---------- */
.look-2027 .t-label { color: var(--accent); }
.cycle--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: var(--s-7); }
.cycle h3 a { color: inherit; text-decoration: none; }
.cycle h3 a:hover { color: var(--accent); }
@media (max-width: 1023px) { .cycle--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .cycle--3 { grid-template-columns: 1fr; } }

/* ---------- the /2027/ page: answer first, detail after, always know where you are ---------- */
.y27-kicker { color: var(--accent); margin-bottom: var(--s-4); }

/* chapter bar (reuses .year-bar) with a reading line along its foot */
.y27-bar { position: sticky; }
.y27-bar .pill { gap: var(--s-2); }
.y27-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: left center; }
.y27-focus, #together, #end-of-2027, #next, #direction { scroll-margin-top: calc(var(--nav) + 60px); }

/* the big statements, in the display face */
.y27-big { font: var(--display-weight) clamp(28px, 1.9vw + 14px, 44px)/1.15 var(--font-display); letter-spacing: var(--display-tracking); max-width: 34ch; text-wrap: balance; hyphens: manual; }
.y27-big em { font-style: italic; color: var(--accent); }
.y27-intro__grid { align-items: center; }
.y27-intro__text { margin-top: var(--s-7); }

/* reading column: a comfortable measure and rhythm, the first paragraph a step larger */
.y27-read { display: grid; gap: var(--s-4); max-width: 62ch; }
.y27-read p { line-height: 1.65; }
.y27-lead { font-size: var(--t-lead); line-height: 1.55 !important; color: var(--ink); }

/* the numbers at a glance */
.y27-glance { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6) var(--gutter, 24px); align-content: start; }
.y27-glance li { display: grid; gap: var(--s-1); border-top: 2px solid var(--accent); padding-top: var(--s-4); }
.y27-glance strong { font: var(--display-weight) clamp(44px, 3vw + 24px, 72px)/1 var(--font-display); letter-spacing: var(--display-tracking); color: var(--ink); }
.y27-glance span { color: var(--muted); }

/* one goal: the aim pinned on the left while the detail scrolls */
.y27-focus { border-top: 1px solid var(--line); }
.y27-focus--alt { background: color-mix(in oklab, var(--surface) 45%, var(--bg)); }
.y27-aside { display: grid; gap: var(--s-5); align-content: start; }
@media (min-width: 1024px) { .y27-aside { position: sticky; top: calc(var(--nav) + 92px); } }
.y27-num { font: var(--display-weight) clamp(56px, 6vw, 88px)/0.9 var(--font-display); color: var(--accent); letter-spacing: var(--display-tracking); }
.y27-goal { display: grid; gap: var(--s-2); padding: var(--s-5); border-radius: var(--r-md, 12px); background: var(--bg); border: 1px solid var(--line);
  font: var(--display-weight) var(--t-h3, 28px)/1.3 var(--font-display); }
.y27-focus--alt .y27-goal { background: color-mix(in oklab, var(--bg) 70%, white); }
.y27-goal .t-label { font-family: var(--font-text); color: var(--accent); }
.y27-list-h { color: var(--muted); margin: var(--s-5) 0 0; }

/* programs as small cards instead of a long list */
.y27-chips { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
.y27-chips li { display: grid; gap: var(--s-1); align-content: start; padding: var(--s-4); border-radius: var(--r-md, 12px); background: var(--bg); border: 1px solid var(--line); }
.y27-focus--alt .y27-chips li { background: color-mix(in oklab, var(--bg) 70%, white); }
.y27-chips strong { font-weight: 600; }
.y27-chips span { color: var(--muted); font-size: var(--t-small); line-height: 1.45; }

/* how it fits together: five links of one chain */
.y27-chain { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-3); }
.y27-chain li { position: relative; display: grid; gap: var(--s-2); align-content: start; padding: var(--s-5); border-radius: var(--r-md, 12px); background: var(--accent); color: var(--accent-ink, #f5f4f0); min-height: 150px; }
.y27-chain li:nth-child(even) { background: var(--ink); color: var(--bg); }
.y27-chain strong { font: var(--display-weight) clamp(24px, 1vw + 18px, 32px)/1.1 var(--font-display); }
.y27-chain span { opacity: .85; }
.y27-flow { position: relative; }
.y27-flow__lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.y27-flow__line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; }
.y27-flow__head { fill: var(--accent); }
.y27-kc { position: relative; z-index: 1; display: grid; place-items: center; width: min(100%, 640px); margin: 128px auto 0; padding: var(--s-6) var(--s-5);
  border: 2px solid var(--accent); border-radius: var(--r-lg, 16px); background: color-mix(in oklab, var(--accent) 7%, var(--bg));
  box-shadow: 0 18px 40px -24px color-mix(in oklab, var(--accent) 55%, transparent); }
.y27-kc strong { font: var(--display-weight) clamp(32px, 2.4vw + 16px, 56px)/1.05 var(--font-display); letter-spacing: var(--display-tracking); color: var(--accent); text-align: center; }
.y27-kc__line { margin-top: var(--s-5); text-align: center; font: var(--display-weight) clamp(22px, 1vw + 16px, 30px)/1.3 var(--font-display); color: var(--ink); }
/* the lines draw in once, then the arrowheads and the box arrive (no motion when the visitor asks for less) */
@media (prefers-reduced-motion: no-preference) {
  .y27-flow .y27-flow__line { stroke-dashoffset: var(--len, 0); transition: stroke-dashoffset 800ms var(--ease, ease) calc(var(--i, 0) * 80ms); }
  .y27-flow .y27-flow__head { opacity: 0; transition: opacity 250ms var(--ease, ease) calc(700ms + var(--i, 0) * 80ms); }
  .y27-flow.is-in .y27-flow__line { stroke-dashoffset: 0; }
  .y27-flow.is-in .y27-flow__head { opacity: 1; }
  .y27-flow .y27-kc { opacity: .35; transition: opacity 600ms var(--ease, ease) 700ms; }
  .y27-flow.is-in .y27-kc { opacity: 1; }
}

/* building a stronger SKAP: who does what */
.y27-roles { list-style: none; padding: 0; margin: var(--s-8) 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter, 24px); }
.y27-roles li { display: grid; gap: var(--s-2); align-content: start; padding-top: var(--s-4); border-top: 2px solid var(--accent); }
.y27-roles .t-label { color: var(--muted); }
.y27-roles strong { font: var(--display-weight) var(--t-h3, 28px)/1.2 var(--font-display); }
.y27-roles p { color: var(--muted); }

/* the finish line: eight outcomes as cards */
.y27-outcomes { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-3); counter-reset: out; }
.y27-outcomes li { counter-increment: out; display: grid; gap: var(--s-4); align-content: space-between; min-height: 150px; padding: var(--s-5);
  border-radius: var(--r-md, 12px); border: 1px solid var(--line); font-size: var(--t-lead); line-height: 1.35; }
.y27-outcomes li::before { content: counter(out, decimal-leading-zero); font: var(--display-weight) 28px/1 var(--font-display); color: var(--accent); order: -1; }

/* the closing call, one line per sentence */
.y27-closer { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 .35em; margin-top: var(--s-9); padding-top: var(--s-7); border-top: 1px solid var(--line);
  text-align: center; font: var(--display-weight) clamp(26px, 1.5vw + 14px, 40px)/1.2 var(--font-display); letter-spacing: var(--display-tracking); }
.y27-closer__btns { justify-content: center; margin-top: var(--s-6); }
.y27-closer span:last-child { color: var(--accent); }

@media (max-width: 1023px) {
  .y27-focus .start-7 { margin-top: var(--s-7); }
  .y27-glance { margin-top: var(--s-8); }
  .y27-chain { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .y27-flow__lines { display: none; }
  /* stacked: one arrow down from the blocks into the box */
  .y27-kc { position: relative; margin-top: var(--s-8); }
  .y27-kc::before { content: ""; position: absolute; left: 50%; bottom: 100%; width: 2px; height: calc(var(--s-8) - 8px); margin-bottom: 4px; background: var(--accent); transform: translateX(-50%); }
  .y27-kc::after { content: ""; position: absolute; left: 50%; bottom: 100%; margin-bottom: 2px; border: 7px solid transparent; border-top-color: var(--accent); border-bottom: 0; transform: translateX(-50%); }
  .y27-outcomes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .y27-roles { grid-template-columns: 1fr; }
}
@media (max-width: 639px) {
  .y27-chips, .y27-chain, .y27-outcomes { grid-template-columns: 1fr; }
  .y27-chain li, .y27-outcomes li { min-height: 0; }
}

/* ---------- footer: the closing button never squashes ----------
   system.css fixes the footer at one screen; on a short laptop window its call and links do not fit, and
   the big button (a flex child) shrank to its text (26px). The footer now grows past one screen when it
   must (as it already does from 640 to 1279px), and the button keeps its full height. */
@media (min-width: 1280px) {
  footer.closing { height: auto; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
  footer.closing > .wrap { flex: 1 0 auto; height: auto; }
}
.closing__cta > .btn { flex-shrink: 0; }
