/* The programme titles beside the paintings (QW Life, QW Hub, QW Elite) are set in Fraunces, a soft serif with a hand-cut feel
   that belongs with the paper-cut art; everything else keeps the system font. The file holds only Latin letters, figures and
   common punctuation (cut by Google Fonts). */
@font-face { font-family: "QW Titles"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/fraunces-titles.woff2") format("woff2");
  unicode-range: U+20-21, U+26-29, U+2C-2E, U+30-3B, U+3F, U+41-5A, U+61-7A, U+2013, U+2019; }

/* Quantum Wings: clean-web-design house style, adapted to the QW brand.
   One hue family (QW navy) on a cream page with warm-white flat tiles.
   Marigold appears only where it means light (the polariser demo) and in the logo.
   Shadows only on floating layers. Sentence case throughout. */
:root {
  --bg: #f5f0e6; --panel: #fffdf9; --panel-2: #f5f0e6; --line: rgba(26,39,68,.10); --line-2: #d8d2c4;
  --ink: #1a2744; --muted: #555d70; --faint: #7a8091;
  --accent: #1a2744; --accent-ink: #24407a; --accent-300: #7f93bd; --accent-200: #b8c4dc; --accent-soft: rgba(26,39,68,.06);
  --light: #d9a441;            /* marigold: light in the demo, nothing else */
  --deep: #1a2744; --deep-ink: #f5f0e6; --deep-muted: #b8c0d4;   /* the one dark tile */
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Inter, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r-lg: 18px; --r-md: 12px; --r-sm: 6px; --pill: 980px;
  --float: 0 30px 80px rgba(0,0,0,.22);
  --ease: cubic-bezier(.25,.1,.25,1);
  --max: 1160px;
  --nav-bg: rgba(245,240,230,.78);
  color-scheme: only light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
html { scroll-padding-top: 84px; }
body { background: var(--bg); color: var(--ink); font: 17px/1.55 var(--sans); letter-spacing: -.011em; -webkit-font-smoothing: antialiased;
  padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); overflow-x: hidden; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em; }
::selection { background: rgba(217,164,65,.32); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; height: auto; }
p { margin: 0; }

h1 { font-size: clamp(40px, 6.4vw, 76px); font-weight: 700; line-height: 1.04; letter-spacing: -.04em; margin: 0; }
h2 { font-size: clamp(28px, 3.8vw, 46px); font-weight: 700; line-height: 1.1; letter-spacing: -.032em; margin: 0; }
h3 { font-size: 21px; font-weight: 600; line-height: 1.25; letter-spacing: -.02em; margin: 0; }
.lede { font-size: clamp(18px, 1.7vw, 21px); color: var(--muted); max-width: 40em; }
.label { font-size: 14px; font-weight: 600; color: var(--faint); letter-spacing: -.005em; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.num { font-variant-numeric: tabular-nums; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--panel); padding: 8px 14px; border-radius: var(--pill); }
.skip:focus { left: 16px; }

/* Nav */
nav.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 6px; height: 64px;
  margin: 0 -16px; padding: 0 max(16px, calc((100vw - var(--max)) / 2));
  background: var(--nav-bg); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 18px; letter-spacing: -.02em; padding-right: 14px; color: var(--ink); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand img { height: 32px; width: auto; }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.tabs::-webkit-scrollbar { display: none; }
/* phones: an edge of the scrolling tab row fades out while more tabs wait past it (site.js sets .back and .more) */
.tabs:is(.back, .more) { -webkit-mask-image: linear-gradient(90deg, var(--fade-l, #000), #000 32px, #000 calc(100% - 32px), var(--fade-r, #000));
  mask-image: linear-gradient(90deg, var(--fade-l, #000), #000 32px, #000 calc(100% - 32px), var(--fade-r, #000)); }
.tabs.back { --fade-l: transparent; }
.tabs.more { --fade-r: transparent; }
.tabs a { font-size: 15px; color: var(--muted); border-radius: var(--pill); padding: 8px 15px; white-space: nowrap; transition: color .2s var(--ease), background .2s var(--ease); }
.tabs a:hover { background: var(--accent-soft); text-decoration: none; color: var(--ink); }
.tabs a[aria-current=page] { color: var(--ink); background: var(--accent-soft); font-weight: 500; }
.tabs a:active { color: var(--ink); background: var(--accent-soft); transition: none; }   /* a tap shows at once, before the page swaps */
/* Below the first screen a section is laid out only as it comes near, so a tab switch on a phone lays out one screen
   rather than the whole page; "auto" keeps a section's real height once it has been seen. The router sets .cv-all
   while it jumps to an anchor or a remembered position. */
main > :not(:first-child) { content-visibility: auto; contain-intrinsic-size: auto 900px; }
.cv-all main > * { content-visibility: visible; }
nav.top .spacer { flex: 1; }
nav.top a.lang { font-size: 14px; color: var(--muted); border: 1px solid var(--line-2); border-radius: var(--pill); padding: 6px 13px; margin: 0 8px 0 6px; white-space: nowrap; }
nav.top a.lang:hover { color: var(--ink); text-decoration: none; }
/* CJK reads better without negative tracking and with a little more leading */
:lang(zh) h1, :lang(zh) h2, :lang(zh) h3, :lang(zh) blockquote { letter-spacing: 0; }
:lang(zh) body { line-height: 1.7; letter-spacing: .01em; }
:lang(zh) .map-hero h1 { font-size: clamp(30px, 4.2vw, 50px); line-height: 1.2; }
:lang(zh) h1 { line-height: 1.2; }
nav.top .btn { padding: 10px 18px; font-size: 14.5px; white-space: nowrap; }
@media (max-width: 900px) { nav.top .btn { display: none; } }
.logo-dark { display: none; }

main { max-width: var(--max); margin: 0 auto; padding: 20px 0 0; display: flex; flex-direction: column; gap: 16px; }

/* Tiles */
.tile { background: var(--panel); border-radius: var(--r-lg); padding: clamp(24px, 4.5vw, 56px); display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.tile.deep { background: var(--deep); color: var(--deep-ink); }
.tile.deep .muted, .tile.deep .lede, .tile.deep .label { color: var(--deep-muted); }
.tile.plain { background: transparent; padding-left: clamp(24px, 4.5vw, 56px); padding-right: clamp(24px, 4.5vw, 56px); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.card { background: var(--panel); border-radius: var(--r-lg); padding: 26px 28px; display: flex; flex-direction: column; gap: 10px; min-width: 0; color: var(--ink); }
a.card:hover { text-decoration: none; background: color-mix(in srgb, var(--panel) 92%, var(--accent-300)); }
a.card .more { margin-top: auto; padding-top: 8px; color: var(--accent-ink); font-size: 15px; }
.inner { background: var(--panel-2); border-radius: var(--r-md); padding: 18px 20px; }
.tile.deep .inner { background: rgba(255,255,255,.06); }
.tile.deep .eyebrow, .tile.deep a:not(.btn) { color: var(--accent-200); }
.tile.deep .btn:not(.primary) { background: rgba(245,240,230,.14); color: var(--deep-ink); }
.tile.deep .btn.primary { background: var(--deep-ink); color: var(--deep); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.measure { max-width: 40em; }
.measure p + p { margin-top: 14px; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.hero .copy { display: flex; flex-direction: column; gap: 20px; }
.actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 6px; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } }

/* Painted backgrounds: the image sits in ::before under a navy wash so cream text stays readable */
.painted { position: relative; overflow: hidden; isolation: isolate; }
.painted::before { content: ""; position: absolute; inset: 0; z-index: -1; }
.img-city { --img: url("img/art-city.jpg"); }
.img-life { --img: url("img/art-life.jpg"); }
.img-tpss { --img: url("img/art-tpss.jpg"); }
.img-elite { --img: url("img/art-elite.jpg"); }
/* one painting per place: the three programmes on one path (Programmes), five doves (Team), the open hall (Programmes, end),
   doves folded at a desk (Team, end), the town across the water (About, story), the door just opened (About, 0 to 1);
   --pos keeps each subject in view where the band crops it */
.img-programmes { --img: url("img/art-programmes.jpg"); }
.img-team { --img: url("img/art-team.jpg"); }
.img-invite { --img: url("img/art-invite.jpg"); --pos: center 75%; }
.img-join { --img: url("img/art-join.jpg"); --pos: center 65%; }
.img-story { --img: url("img/art-story.jpg"); }
.img-first-step { --img: url("img/art-first-step.jpg"); }

.hero-banner { min-height: min(640px, 78vh); justify-content: center; }
.hero-banner .hero { grid-template-columns: 1.15fr .85fr; }
.hero-banner .mark { width: 100%; max-width: 440px; justify-self: end; }
@media (max-width: 860px) { .hero-banner .hero { grid-template-columns: 1fr; } .hero-banner .mark { max-width: 260px; justify-self: start; order: -1; } }

/* Footprint map hero: places light up one by one, once */
.map-hero { position: relative; overflow: hidden; background: #111a2e; color: #f5f0e6; padding: 0; min-height: min(calc(100vh - 88px), 780px); justify-content: flex-end; }
.map-hero .footprint { position: absolute; inset: 0; width: 100%; height: 100%; -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 98%); mask-image: linear-gradient(180deg, #000 70%, transparent 98%); }
.map-hero .copy { position: relative; z-index: 1; padding: clamp(24px, 4vw, 48px); max-width: 760px; pointer-events: none; display: flex; flex-direction: column; gap: 16px; }
.map-hero h1 { font-size: clamp(40px, 6.2vw, 84px); letter-spacing: -.045em; }
.map-hero .lede { font-size: 18px; }
.map-hero .copy .lede, .map-hero .label { color: rgba(245,240,230,.8); }
.map-hero a:not(.btn) { color: #f5f0e6; }
.map-hero .btn.primary { background: #f5f0e6; color: #1a2744; }
/* the delays in the markup play at 35%: arcs follow each other faster and each place lights as its arc lands */
.footprint .arc { fill: none; stroke: #f5f0e6; stroke-opacity: .45; stroke-width: 1.2; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .7s var(--ease) forwards; animation-delay: calc(var(--d) * .35); }
.footprint .dot { fill: #d9a441; opacity: .2; animation: lit .5s var(--ease) forwards; animation-delay: calc((var(--t) - 1.1s) * .35 + .7s); }
.footprint .ring { pointer-events: none; fill: none; stroke: #d9a441; stroke-width: 1.5; opacity: 0; transform-box: fill-box; transform-origin: center; animation: ring 1.4s var(--ease) forwards; animation-delay: calc((var(--t) - 1.1s) * .35 + .7s); }
.footprint text { font: 500 15px var(--sans); fill: #f5f0e6; opacity: 0; letter-spacing: -.01em; animation: lit .6s var(--ease) forwards; animation-delay: calc((var(--t) - 1.1s) * .35 + .7s); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes lit { to { opacity: 1; } }
@keyframes ring { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(4); } }
.map-legend { position: absolute; z-index: 1; right: clamp(16px, 3vw, 32px); bottom: clamp(16px, 3vw, 28px); font-size: 13px; color: rgba(245,240,230,.7); display: flex; align-items: center; gap: 8px; }
.map-legend i { width: 9px; height: 9px; border-radius: 50%; background: #d9a441; display: inline-block; }
@media (max-width: 1040px) {
  .map-hero { aspect-ratio: auto; min-height: 0; }
  .map-hero .footprint { position: relative; height: auto; aspect-ratio: 2 / 1; }
  .map-legend { position: static; padding: 0 24px 24px; }
  .footprint text { font-size: 30px; }
  .footprint .dot { r: 9px; }
  .footprint .arc { stroke-width: 2; }
}
@media (prefers-reduced-motion: reduce) {
  .footprint .arc { stroke-dashoffset: 0; } .footprint .dot, .footprint text { opacity: 1; } .footprint .ring { display: none; }
}

/* Reach + gallery row */
.reach { display: grid; grid-template-columns: 1fr 1.25fr; gap: 16px; }
.reach .proof { grid-template-columns: repeat(2, 1fr); }
.gallery { position: relative; border-radius: var(--r-lg); overflow: hidden; background: #111a2e; min-height: 340px; }
.gallery img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 1.2s var(--ease); }
/* every photo is shown whole; where it does not fill the frame, the same photo, blurred and dimmed, fills the sides */
.gallery .fill { position: absolute; inset: -40px; background: center / cover no-repeat; filter: blur(28px) brightness(.5); opacity: 0;
  transition: opacity 1.2s var(--ease); cursor: zoom-in; }
.gallery .fill.on { opacity: 1; }
.gallery img.on { opacity: 1; }
.gallery .bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; padding: 48px 20px 16px;
  background: linear-gradient(180deg, transparent, rgba(13,20,38,.85)); color: #f5f0e6; font-size: 14px; }
.gallery .bar a { color: #f5f0e6; white-space: nowrap; }
.gallery .pause { position: absolute; z-index: 2; top: 12px; right: 12px; border: 0; border-radius: var(--pill); padding: 4px 12px; font-size: 12.5px; cursor: pointer; background: rgba(13,20,38,.55); color: #f5f0e6; }
@media (max-width: 860px) { .reach { grid-template-columns: 1fr; } .gallery { min-height: 0; aspect-ratio: 4 / 3; } }

.photo { width: 100%; border-radius: var(--r-md); aspect-ratio: 16 / 9; object-fit: cover; }

/* Programme cards with painted backgrounds */
.photo-card { min-height: 380px; justify-content: flex-end; padding: 28px; }
a.photo-card:hover { background: #111a2e; }
a.photo-card:hover::before { transform: scale(1.07); }
.photo-card h3 { font-size: 28px; letter-spacing: -.03em; }
.photo-card > :first-child { margin-top: auto; }
.photo-card .more { color: #f5f0e6 !important; margin-top: 0; }
.photo-card .muted { color: rgba(245,240,230,.86); }

/* Team */
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.member { background: var(--panel); border-radius: var(--r-lg); padding: 24px; display: flex; flex-direction: column; gap: 6px; }
.avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; margin-bottom: 10px; background: var(--accent-soft); color: var(--ink);
  display: grid; place-items: center; font-weight: 600; font-size: 22px; letter-spacing: -.02em; }
.member .role { font-size: 15px; color: var(--muted); }
.lead-member { display: grid; grid-template-columns: 280px 1fr; gap: clamp(20px, 4vw, 48px); align-items: center; }
.lead-member img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-lg); }
@media (max-width: 700px) { .lead-member { grid-template-columns: 1fr; } .lead-member img { max-width: 240px; } }

/* Proof strip */
.proof { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.proof .card { padding: 22px 24px; gap: 4px; }
.proof b { font-size: clamp(30px, 3.4vw, 40px); font-weight: 700; letter-spacing: -.035em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.proof span { font-size: 14px; color: var(--muted); line-height: 1.4; }
@media (max-width: 860px) { .proof { grid-template-columns: repeat(2, 1fr); } }

/* Controls */
.btn { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-soft); border: 0; border-radius: var(--pill); padding: 11px 22px; font-size: 16px; font-weight: 500; cursor: pointer; color: var(--ink); transition: background .2s var(--ease), scale .15s var(--ease); }
.btn:hover { text-decoration: none; background: rgba(26,39,68,.1); }
.btn.primary { background: var(--accent); color: var(--bg); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--bg)); }
.btn:active, .seg button:active { scale: .97; }   /* pressed: felt on touch screens too, where there is no hover */
/* the arrow leans toward where the link goes */
.link-arrow::after { content: "›"; display: inline-block; margin-left: .3em; transition: translate .25s var(--ease); }
:is(.link-arrow:hover, .row:hover .link-arrow)::after { translate: .22em 0; }
.seg { display: inline-flex; background: var(--accent-soft); border-radius: 10px; padding: 2px; gap: 2px; }
.seg button { background: none; border: 0; border-radius: 8px; padding: 6px 14px; font-size: 14px; cursor: pointer; color: var(--muted); transition: background .2s var(--ease), color .2s var(--ease), scale .15s var(--ease); }
.seg button:not([aria-selected=true], [aria-pressed=true]):hover { color: var(--ink); background: var(--accent-soft); }
.seg button[aria-pressed=true] { background: var(--panel); color: var(--ink); font-weight: 500; box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 0 0 .5px rgba(0,0,0,.04); }
input[type=range] { width: 100%; accent-color: var(--accent-ink); }
.tag { display: inline-block; font-size: 13px; padding: 2px 9px; border-radius: var(--pill); background: var(--accent-soft); color: var(--muted); white-space: nowrap; }
.tag.next { background: rgba(217,164,65,.16); color: #6b4a0e; font-weight: 500; padding: 2px 10px 2px 8px; }   /* a soft gold pill with a dot, so a live date reads at a glance */
.tag.next::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #d9a441; margin-right: 6px; vertical-align: .12em; }
/* On now or 3 days or less to go: a light sweeps across the pill, under the words */
.tag.soon { position: relative; overflow: hidden; isolation: isolate; }
.tag.soon::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; translate: -120% 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.8) 50%, transparent 70%); animation: sweep 3.2s cubic-bezier(.4,0,.2,1) infinite; }
@keyframes sweep { 0% { translate: -120% 0; } 35%, 100% { translate: 120% 0; } }

/* Section heads */
.head { display: flex; flex-direction: column; gap: 12px; max-width: 46em; }

/* Walls */
.walls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.walls .inner { display: flex; flex-direction: column; gap: 8px; }
.walls .n { font-size: 14px; font-variant-numeric: tabular-nums; opacity: .7; }
@media (max-width: 860px) { .walls { grid-template-columns: 1fr; } }

/* Lists of events */
.events { display: flex; flex-direction: column; }
.event { display: grid; grid-template-columns: 150px 1fr auto; gap: 20px; padding: 18px 0; border-top: 1px solid var(--line); align-items: baseline; color: var(--ink); }
.event:first-child { border-top: 0; }
a.event:hover { text-decoration: none; }
a.event:hover h3 { color: var(--accent-ink); }
.event time { white-space: nowrap; font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }
.event > .tag { justify-self: start; }   /* a phone's single column would stretch the pill across the row */
@media (max-width: 640px) { .event { grid-template-columns: 1fr; gap: 4px; } }

/* Disclosure */
details.more-info { border-top: 1px solid var(--line); padding-top: 14px; }
details.more-info summary { cursor: pointer; color: var(--accent-ink); font-size: 15px; list-style: none; transition: color .2s var(--ease); }
details.more-info summary:hover { color: var(--ink); }
details.more-info summary::-webkit-details-marker { display: none; }
/* a drawn plus whose upright bar folds away as it turns, leaving the minus */
details.more-info summary::before { content: ""; display: inline-block; width: .62em; height: .62em; margin-right: .5em; vertical-align: .04em;
  background: linear-gradient(currentColor 0 0) center / 100% 1.5px no-repeat, linear-gradient(currentColor 0 0) center / 1.5px 100% no-repeat;
  transition: background-size .35s var(--ease), rotate .35s var(--ease); }
details.more-info[open] summary::before { background-size: 100% 1.5px, 1.5px 0; rotate: 180deg; }
details.more-info > div { padding-top: 14px; display: flex; flex-direction: column; gap: 12px; }
ul.plain { margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 6px; }
ul.plain li::marker { color: var(--faint); }

/* Ladder (TPSS) */
.ladder { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ladder div { border-radius: var(--r-md); padding: 14px 16px; background: var(--panel-2); font-size: 15px; display: flex; flex-direction: column; gap: 2px; }
.ladder div span { font-size: 13px; color: var(--faint); font-variant-numeric: tabular-nums; }
.ladder div.q { background: var(--accent); color: var(--bg); }
.ladder div.q span { color: inherit; opacity: .7; }
@media (max-width: 640px) { .ladder { grid-template-columns: repeat(2, 1fr); } }

/* Table */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 16px; }
th { text-align: left; font-size: 14px; font-weight: 500; color: var(--faint); padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); }
td { padding: 13px 14px 13px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
/* Phones: five columns would wrap word by word, so each row becomes two lines: the school and its number, then
   date · city · session. The headers stay for screen readers; the reading order is unchanged. */
@media (max-width: 640px) {
  .tablewrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .tablewrap tr { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; row-gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .tablewrap tr:last-child { border-bottom: 0; }
  .tablewrap td { padding: 0; border: 0; font-size: 14px; color: var(--muted); }
  .tablewrap td:nth-child(2) { order: -3; flex: 1 0 60%; font-size: 16px; color: var(--ink); }
  .tablewrap td.r { order: -2; margin-left: auto; font-size: 16px; color: var(--ink); }
  .tablewrap tr::before { content: ""; order: -1; flex-basis: 100%; }   /* the line break before date · city · session */
  .tablewrap td.r.muted { color: var(--muted); }
  .tablewrap td:is(:nth-child(3), :nth-child(4))::before { content: "· "; }
}

/* Pull quote */
blockquote { margin: 0; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.3; letter-spacing: -.025em; font-weight: 600; max-width: 30em; padding-left: 22px; border-left: 3px solid var(--light); }
/* centred, the rule moves above the quote as a short gold line instead of standing beside text it no longer lines up with */
.center blockquote { padding-left: 0; border-left: 0; }
.center blockquote::before { content: ""; display: block; width: 44px; height: 3px; margin: 0 auto 26px; border-radius: 2px; background: var(--light); }

/* People */
.person { display: flex; flex-direction: column; gap: 6px; }
.person .role { font-size: 15px; color: var(--muted); }

/* Footer */
.cta { text-align: left; }
.follow { position: relative; overflow: hidden; isolation: isolate; margin: clamp(48px, 7vw, 88px) -16px 0; padding: clamp(52px, 6.5vw, 84px) max(16px, calc((100vw - var(--max)) / 2)); background: var(--panel); border-block: 1px solid var(--line); }
.follow-inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 32px 48px; padding: 0 clamp(24px, 4.5vw, 56px); }
/* the art: a halftone "QW" behind the line, a dot field fading in at the right edge, and a few gold sparkles */
.follow-art { position: absolute; inset: 0; z-index: -1; pointer-events: none; --dots: radial-gradient(circle, rgba(26,39,68,.3) 1.6px, transparent 2.1px); }
.follow-art::before { content: "QW"; position: absolute; left: max(-12px, calc((100vw - var(--max)) / 2 - 40px)); top: 50%; translate: 0 -52%; font-size: clamp(170px, 24vw, 330px); font-weight: 800; letter-spacing: -.05em; line-height: .8; color: transparent; background: var(--dots) 0 0 / 8px 8px; -webkit-background-clip: text; background-clip: text; }
.follow-art::after { content: ""; position: absolute; top: 0; bottom: 0; right: 0; width: 34%; background: var(--dots) 0 0 / 9px 9px; opacity: .55; -webkit-mask-image: linear-gradient(90deg, transparent, #000 75%); mask-image: linear-gradient(90deg, transparent, #000 75%); }
.follow-art i { position: absolute; left: var(--x); top: var(--y); width: calc(16px * var(--s, 1)); height: calc(16px * var(--s, 1)); background: #d9a441; clip-path: polygon(50% 0, 58% 42%, 100% 50%, 58% 58%, 50% 100%, 42% 58%, 0 50%, 42% 42%); opacity: .75; animation: twinkle 3.6s ease-in-out infinite; animation-delay: calc(var(--s, 1) * -2.4s); }
@keyframes twinkle { 50% { opacity: .2; scale: .7; } }
.follow-line { margin: 0 0 0 clamp(0px, 9vw, 130px); font-size: clamp(30px, 4vw, 48px); font-weight: 700; font-style: italic; letter-spacing: -.03em; line-height: 1.1; text-wrap: balance; max-width: 12em; }
.follow-links { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.follow-links .small { font-size: 15px; }
.follow-links p { margin: 0; }
.follow .icons { display: flex; gap: 14px; }
.follow .icons a { width: 64px; height: 64px; border-radius: 20px; background: var(--ink); color: var(--bg); display: grid; place-items: center; box-shadow: 0 8px 20px -10px rgba(26,39,68,.5); transition: transform .25s var(--out, ease), background .25s; }
.follow .icons a:hover, .follow .icons a:focus-visible { transform: translateY(-3px); background: var(--accent-ink); }
.follow .icons svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.follow + footer { margin-top: 0; border-top: 0; }
:lang(zh) .follow-line { font-style: normal; }
@media (max-width: 640px) { .follow-inner { flex-direction: column; align-items: flex-start; } .follow-line { margin-left: 0; } .follow-links { align-items: flex-start; } .follow .icons a { width: 60px; height: 60px; } .follow-art::before { font-size: 150px; left: -10px; top: 30%; } .follow-art::after { width: 60%; } }
footer { max-width: var(--max); margin: clamp(40px, 6vw, 72px) auto 0; padding: 26px 0 36px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--faint); font-size: 13.5px; border-top: 1px solid var(--line); }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
footer a { color: var(--muted); }

/* Draft review flags: shown while DRAFT is true in site.js */
body.draft [data-verify], body.draft [data-todo] { text-decoration: underline dashed var(--light) 2px; text-underline-offset: 4px; cursor: help; }
body.draft [data-todo] { text-decoration-color: #c0392b; }
.draft-bar { display: none; }
body.draft .draft-bar { display: flex; position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 40; gap: 12px; align-items: center; white-space: nowrap;
  background: rgba(26,39,68,.92); color: #f5f0e6; font-size: 13px; padding: 8px 8px 8px 16px; border-radius: var(--pill); box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.draft-bar button { background: rgba(255,255,255,.14); border: 0; color: inherit; border-radius: var(--pill); padding: 4px 12px; cursor: pointer; font-size: 13px; }
.draft-bar i { font-style: normal; text-decoration: underline dashed #d9a441 2px; text-underline-offset: 3px; }
.draft-bar i.t { text-decoration-color: #e0675a; }
@media (max-width: 520px) { .draft-bar .why { display: none; } }

@media (prefers-reduced-motion: reduce) { *, ::before, ::after { transition: none !important; animation: none !important; } }
@media (max-width: 640px) {
  body { font-size: 16px; }
  .brand span { display: none; }
  .brand { padding-right: 6px; }
  .tabs a { padding: 8px 10px; font-size: 14.5px; }
  nav.top { height: 58px; }
  nav.top .btn { display: none; }
  .card { padding: 22px; }
}

/* ---------- Editorial layout: type and space instead of card grids ---------- */
.section { padding: clamp(56px, 9vw, 120px) clamp(24px, 4.5vw, 56px); display: flex; flex-direction: column; gap: 22px; }
.section.center { align-items: center; text-align: center; }
/* the kicker above a section title: small, tracked capitals (the map card's "In collaboration with" speaks the same way) */
.eyebrow, .row .text .tagline { font-size: 15px; font-weight: 600; letter-spacing: -.005em; text-transform: none; color: var(--accent-ink); line-height: 1.4; }
:lang(zh) :is(.eyebrow, .row .text .tagline) { font-size: 15px; letter-spacing: 0; }
.display { font-size: clamp(44px, 7vw, 88px); font-weight: 700; letter-spacing: -.045em; line-height: 1.02; margin: 0; }
.rule-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 4vw, 56px); width: 100%; }
.rule-list > div { border-top: 1px solid var(--line-2); padding-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.tile.deep .rule-list > div { border-top-color: rgba(245,240,230,.18); }
.rule-list h3 { font-size: 24px; }
.rule-list.four { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
@media (max-width: 1040px) { .rule-list.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .rule-list { grid-template-columns: 1fr; } .rule-list.four { grid-template-columns: 1fr; } }

/* 500+: every lit window is a student */
.lights { position: relative; overflow: hidden; background: #0f1729; color: #f5f0e6; padding: 0; min-height: 760px; display: flex; flex-direction: column; }
.lights canvas { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 56%; }
.lights .top { position: relative; z-index: 1; text-align: center; padding: clamp(48px, 7vw, 88px) 24px 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lights .big { font-size: clamp(96px, 17vw, 200px); font-weight: 700; letter-spacing: -.06em; line-height: .9; font-variant-numeric: tabular-nums; }
.lights .big sup { font-size: .45em; vertical-align: .9em; letter-spacing: 0; color: #d9a441; }
.lights .sub { font-size: clamp(18px, 2vw, 22px); color: rgba(245,240,230,.82); max-width: 30em; }
.lights .hint { font-size: 14px; color: rgba(245,240,230,.55); }
.lights .facts { position: relative; z-index: 1; margin-top: auto; display: grid; grid-template-columns: repeat(3, 1fr); background: linear-gradient(180deg, transparent, rgba(15,23,41,.82) 55%); padding: 56px clamp(20px, 4vw, 48px) 32px; gap: 16px; }
.lights .facts div { display: flex; flex-direction: column; gap: 2px; text-align: center; }
.lights .facts b { font-size: clamp(28px, 3.4vw, 40px); font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.lights .facts span { font-size: 14px; color: rgba(245,240,230,.7); line-height: 1.4; }
@media (max-width: 640px) {
  .lights { min-height: 0; }
  .lights canvas { position: relative; height: 230px; order: 2; margin-top: 8px; }
  .lights .facts { order: 3; margin-top: 0; grid-template-columns: repeat(3, 1fr); background: none; padding: 16px 12px 28px; gap: 8px; }
  .lights .facts span { font-size: 12px; }
  .lights .facts b { font-size: 26px; }
}

/* Full-width gallery */
.gallery.wide { aspect-ratio: 16 / 9; min-height: 0; }   /* the shape most of the photos already have */
@media (max-width: 860px) { .gallery.wide { aspect-ratio: 4 / 3; } }   /* on phones a taller frame leaves room for the caption and arrows */
/* a counter between two arrows, bottom right, in place of a row of dots; swipe sideways on touch screens */
.gallery { touch-action: pan-y; }
.gallery img { cursor: zoom-in; user-select: none; -webkit-user-drag: none; }
.gallery .bar { padding: 48px 150px 18px 20px; }
.gallery .pager { position: absolute; z-index: 2; right: 12px; bottom: 12px; display: flex; align-items: center; padding: 3px; border-radius: var(--pill);
  background: rgba(13,20,38,.55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #f5f0e6; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.gallery .pager span { min-width: 4.6em; text-align: center; }
.gallery .pager button { width: 30px; height: 30px; border: 0; border-radius: 50%; background: none; color: inherit; font-size: 18px; line-height: 1; cursor: pointer;
  transition: background .2s var(--ease), scale .15s var(--ease); }
.gallery .pager button:hover { background: rgba(245,240,230,.18); }
.gallery .pager button:active { scale: .9; }

/* About on home */
.founder { display: flex; align-items: center; gap: 18px; text-align: left; }
.founder img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.founder b { display: block; font-size: 17px; }
.founder span { font-size: 15px; color: var(--muted); }
.creds { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 28px; font-size: 15px; color: var(--muted); max-width: 52em; }
.creds span::before { content: none; }

/* Programmes as alternating rows */
.rows { display: flex; flex-direction: column; gap: clamp(40px, 6vw, 80px); padding: clamp(24px, 4vw, 48px) 0; }
.row { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(24px, 5vw, 72px); align-items: center; }
.row.flip { grid-template-columns: 6fr 5fr; }
.row.flip .art { order: 2; }
.row .art { aspect-ratio: 1; max-height: 520px; width: 100%; border-radius: var(--r-lg); object-fit: cover; }
.row .text { display: flex; flex-direction: column; gap: 14px; max-width: 30em; }
.row .text h3 { font-size: clamp(35px, 4.4vw, 53px); letter-spacing: -.01em; font-family: "QW Titles", var(--sans); }   /* a serif reads smaller, so a size up */
@media (max-width: 760px) { .row, .row.flip { grid-template-columns: 1fr; } .row.flip .art { order: 0; } .row .art { aspect-ratio: 16 / 10; } }

/* Names row */
.names { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 24px 36px; margin-top: 8px; }
.names a { display: inline-flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; letter-spacing: -.015em; color: var(--muted); text-decoration: none; }
.names img { height: 40px; width: auto; filter: grayscale(1) contrast(1.1); opacity: .62; transition: filter .3s, opacity .3s; }
.names img.wordmark { height: 36px; }
.names img.big { height: 48px; }
.names a:hover img, .names a:focus-visible img { filter: none; opacity: 1; }
.names a:hover span { color: var(--ink); }
@media (max-width: 640px) { .names { gap: 22px 32px; } .names a { font-size: 15px; } .names img { height: 32px; } .names img.wordmark { height: 28px; } }

/* Centered quote */
.quote-big { font-size: clamp(28px, 3.6vw, 44px); font-weight: 600; line-height: 1.22; letter-spacing: -.03em; max-width: 24em; margin: 0; }

/* Stepper (TPSS) */
.stepper { display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.stepper::before { content: ""; position: absolute; left: 12.5%; right: 12.5%; top: 9px; height: 2px; background: var(--line-2); }
.stepper div { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; font-size: 16px; }
.stepper i { width: 20px; height: 20px; border-radius: 50%; background: var(--panel); border: 2px solid var(--accent-300); }
.stepper .q i { background: #d9a441; border-color: #d9a441; }
.stepper .q { font-weight: 600; }
.stepper small { margin-top: -6px; font-size: 13px; font-weight: 400; color: var(--faint); }   /* the month under each subject */

/* People without cards */
.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: clamp(28px, 4vw, 56px); }
.people > div { display: flex; flex-direction: column; gap: 6px; }
.portrait { width: 100%; max-width: 280px; aspect-ratio: 1; border-radius: var(--r-lg); object-fit: cover; background: var(--accent-soft); display: grid; place-items: center; color: var(--faint); font-size: 14px; margin-bottom: 10px; }

/* Plain two-column notes */
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 4vw, 56px); }
.cols > :only-child { grid-column: 1 / -1; }
.cols > div { border-top: 1px solid var(--line-2); padding-top: 16px; display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 760px) { .cols { grid-template-columns: 1fr; } }

/* map places are interactive: hover, focus or tap for what happened there */
.map-hero .copy a { pointer-events: auto; }
.footprint .place { cursor: pointer; outline: none; }
.footprint .place .hit { fill: transparent; }
.footprint .place:hover .dot, .footprint .place:focus-visible .dot, .footprint .place.on .dot { r: 8px; fill: #f5f0e6; }
.footprint .place:focus-visible text, .footprint .place.on text { font-weight: 700; }
.footprint .dot { transition: r .2s var(--ease), fill .2s var(--ease); }
@media (max-width: 1040px) { .map-hero { min-height: 0; } }
.lights .top, .lights .facts { pointer-events: none; }

/* Programme pages: reading column with a sticky illustration */
.prog { gap: 40px; }
.prog-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.prog-text { display: flex; flex-direction: column; gap: 28px; }
.prog-text h2 { font-size: clamp(44px, 5.9vw, 70px); letter-spacing: -.01em; font-family: "QW Titles", var(--sans); }
.prog-text .intro { font-size: clamp(19px, 1.8vw, 22px); line-height: 1.5; }
.prog-text .intro p + p { margin-top: 14px; }
.prog-art { position: sticky; top: 96px; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-lg); }
.facts-list { display: flex; flex-direction: column; }
.facts-list > div { border-top: 1px solid var(--line-2); padding: 16px 0; display: grid; grid-template-columns: 180px 1fr; gap: 16px; }
.facts-list .label { padding-top: 2px; }
.photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
#eaqh .photos img { aspect-ratio: 16 / 9; }
#schools .tablewrap { margin-bottom: 8px; }
@media (min-width: 761px) { #schools td:first-child, #schools td:nth-child(3), #schools td:nth-child(4), #schools td.r { white-space: nowrap; } }
.clip { margin: 0; }
.clip video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: var(--r-md); background: var(--deep); }
.clip figcaption { margin-top: 10px; }
.photos img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--r-md); }
@media (max-width: 860px) {
  .prog-grid { grid-template-columns: 1fr; }
  .prog-art { position: static; order: -1; aspect-ratio: 16 / 10; }
  .facts-list > div { grid-template-columns: 1fr; gap: 4px; }
}

/* Full-bleed bands: break out of the 1160px column and drop the tile frame */
.bleed { width: 100vw; margin-left: calc(50% - 50vw); border-radius: 0; }
.map-hero.bleed { margin-top: -20px; }
.map-hero.bleed .copy { padding-left: max(24px, calc((100vw - var(--max)) / 2));
  /* past 1440px the growing left padding used to eat the 760px box, down to one word per line; keep the 1440px text width */
  max-width: max(760px, calc(max(24px, (100vw - var(--max)) / 2) + 620px)); }
.map-hero.bleed .map-legend { right: max(24px, calc((100vw - var(--max)) / 2)); }
.lights.bleed { margin-top: -16px; }
.lights.bleed .facts { padding-left: max(24px, calc((100vw - var(--max)) / 2)); padding-right: max(24px, calc((100vw - var(--max)) / 2)); }

/* Landmark panel: a 3D model of the place you tapped */
.landmark { position: absolute; z-index: 4; right: max(24px, calc((100vw - var(--max)) / 2)); top: 32px; width: 340px; padding: 18px 20px 20px;
  background: rgba(15,23,41,.82); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border: 1px solid rgba(245,240,230,.14);
  border-radius: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.4); color: #f5f0e6; display: flex; flex-direction: column; gap: 4px; animation: pop-in .3s var(--ease); }
@keyframes pop-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.landmark .lm-name { font-size: 13px; color: #d9a441; font-weight: 600; }
.landmark .lm-hint { font-size: 12px; color: rgba(245,240,230,.45); margin-top: 6px; }
.landmark .lm-close { position: absolute; top: 12px; right: 12px; z-index: 1; width: 32px; height: 32px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(245,240,230,.12); color: #f5f0e6; font-size: 20px; line-height: 1; }
.landmark .lm-close:hover { background: rgba(245,240,230,.22); }
@media (max-width: 1040px) {
  .landmark { position: fixed; left: 12px; right: 12px; bottom: 12px; top: auto; width: auto; max-height: 82vh; overflow: auto; z-index: 45; background: #121b31; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: 0 0 0 100vmax rgba(8,12,24,.55), 0 30px 80px rgba(0,0,0,.4); }
}

/* QW Hub session selector */
.sessions { align-self: flex-start; flex-wrap: wrap; }
.sessions button[aria-selected=true] { background: var(--panel); color: var(--ink); font-weight: 500; box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 0 0 .5px rgba(0,0,0,.04); }
.session { display: flex; flex-direction: column; gap: 24px; }
.session-title { font-size: 26px; letter-spacing: -.02em; }
.strip { width: 100%; border-radius: var(--r-md); display: block; }

/* ---------- Map hero: light ---------- */

.map-hero { background: var(--bg); color: var(--ink); }
.map-hero .copy .lede, .map-hero .label { color: var(--muted); }
.map-hero a:not(.btn) { color: var(--accent-ink); }
.map-hero .btn.primary { background: var(--accent); color: var(--bg); }
.map-legend { color: var(--muted); }
.footprint .arc { stroke: #1a2744; stroke-opacity: .32; }
.footprint .dot { fill: #d9a441; stroke: #1a2744; stroke-width: 1.2; }
.footprint .ring { stroke: #d9a441; }
.footprint text { fill: #1a2744; font-weight: 500; }
.footprint .place:hover .dot, .footprint .place:focus-visible .dot, .footprint .place.on .dot { fill: #1a2744; }
.map-hero .footprint { -webkit-mask-image: none; mask-image: none; }

.lights { background: transparent; color: var(--ink); }
.lights .sub { color: var(--muted); }
.lights .hint { color: var(--faint); }
.lights .big sup { color: #b07d1f; }
.lights .facts { background: none; }
.lights .facts span { color: var(--muted); }

.landmark { background: rgba(255,253,249,.94); color: var(--ink); border-color: var(--line); box-shadow: 0 30px 80px rgba(26,39,68,.22); }
.landmark .lm-name { color: #8a5e0b; }
.landmark .lm-close { background: var(--accent-soft); color: var(--ink); }
.landmark .lm-close:hover { background: rgba(26,39,68,.12); }
.lm-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; margin-bottom: 10px; background: var(--accent-soft); display: block; }
.lm-credit { font-size: 12px; color: var(--faint); margin-top: 6px; }
.lm-credit a { color: var(--faint); text-decoration: underline; }
@media (max-width: 1040px) {
  .landmark { background: var(--panel); box-shadow: 0 0 0 100vmax rgba(26,39,68,.35), 0 30px 80px rgba(0,0,0,.25); }
}

/* Illustrated bands on off-white: the painting sits as a framed image on the light panel */
.painted { background: var(--panel); color: var(--ink); }
.painted::before { background: var(--img) var(--pos, center 62%) / cover; border-radius: var(--r-md); transform: none; -webkit-mask-image: none; mask-image: none; }
.painted.wash-side::before { inset: clamp(12px,1.6vw,20px) clamp(12px,1.6vw,20px) clamp(12px,1.6vw,20px) 55%; }
.painted.wash-side > * { max-width: 50%; }
.painted.wash-even { padding-bottom: calc(clamp(180px,20vw,260px) + clamp(12px,1.6vw,20px) + 36px); }
.painted.wash-even::before { inset: auto clamp(12px,1.6vw,20px) clamp(12px,1.6vw,20px); height: clamp(180px,20vw,260px); }
@media (max-width:760px){
  .painted.wash-side > * { max-width: none; }
  .painted.wash-side { padding-bottom: 268px; }
  .painted.wash-side::before { inset: auto 12px 12px 12px; height: 220px; }
}
.painted.cta { min-height: 340px; justify-content: center; }
.painted.story { padding: clamp(32px, 6vw, 80px); }
.painted.story::before { inset: auto clamp(24px,4.5vw,56px) auto 56%; top: 50%; translate: 0 -50%; aspect-ratio: 4 / 5; max-height: calc(100% - 40px); }
@media (max-width:760px){ .painted.story::before { inset: auto 12px 12px 12px; top: auto; translate: none; aspect-ratio: auto; max-height: none; height: 220px; } .painted.story { padding-bottom: 268px; } }   /* About's founding story: roomier, the phone rule below still clears the painting */
.painted .muted, .painted .lede, .painted .label { color: var(--muted); }
.painted a:not(.btn) { color: var(--accent-ink); }
.painted .btn { background: var(--accent-soft); color: var(--ink); }
.painted .btn.primary { background: var(--accent); color: var(--bg); }
/* the light theme's button colours above would otherwise also cancel their hover */
.map-hero .btn.primary:hover, .painted .btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--bg)); }
.painted .btn:not(.primary):hover { background: rgba(26,39,68,.1); }
.painted .quote-big, .painted h1, .painted h2 { color: var(--ink); }
/* team: four across, plain text under each portrait */
.people { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }
.people article { display: flex; flex-direction: column; gap: 6px; }
.people .portrait { max-width: none; border-radius: var(--r-lg); }
.people .more-info { margin-top: 6px; padding-top: 10px; }
.people .more-info > div { gap: 10px; }
.people a.link-arrow { margin-top: 6px; }

.poster { display: block; width: min(440px, 100%); border-radius: var(--r-md); }

/* ---------- Scroll motion, after huntier.ai ----------
   A script in <head> adds .motion before first paint (never under reduced motion); site.js adds .m-enter and .in.
   Only opacity, transform, filter and clip-path move, so the layout never shifts. */
.motion { --out: cubic-bezier(.16, 1, .3, 1); }   /* expo.out */
/* On load: the nav drops in, the page title rises line by line, the rest of the hero follows */
.motion :is(nav.top, .map-hero .copy > :not(h1), main > :first-child:not(.map-hero) > :not(h1)) { transition: opacity 1.1s var(--out), transform 1.1s var(--out); }
.motion nav.top { transition-delay: .05s; }
.motion:not(.m-enter, .m-from-site) nav.top { opacity: 0; transform: translateY(-14px); }   /* only on arrival from outside the site */
.motion:not(.m-enter) :is(.map-hero .copy, main > :first-child:not(.map-hero)) > :not(h1) { opacity: 0; transform: translateY(14px); }
.motion main h1:not(.m-split) { visibility: hidden; }
.m-line { display: block; clip-path: inset(-.3em -.5em -.25em -.5em); }
.m-line > span { display: block; transition: transform 1.3s var(--out); }
.motion:not(.m-enter) .m-line > span { transform: translateY(118%); }
/* On scroll: list items rise in turn, headings sharpen out of a blur, paintings unveil from the bottom */
.motion :is(:is(.events, .rule-list, .cols, .people, .facts-list, .photos, .stepper, .grid-2, .names):not(details *, .scene *) > *, .row > .text, .poster, .other-poster) { transition: opacity 1.1s var(--out), transform 1.1s var(--out); }
.motion :is(:is(.events, .rule-list, .cols, .people, .facts-list, .photos, .stepper, .grid-2, .names):not(details *, .scene *) > *, .row > .text, .poster, .other-poster):not(.in) { opacity: 0; transform: translateY(26px); }
/* ...and whatever stands on its own between them (paragraphs, the founder, buttons, the table, collapsibles), outside
   the page's opening section and outside anything that already rises as a whole */
.motion main > :not(:first-child) :is(p, h3, a.btn, a.link-arrow, details, .founder, .actions, .tablewrap, .seg):not(.scene *, .quote-big, .display, :is(.events, .rule-list, .cols, .people, .facts-list, .photos, .stepper, .grid-2, .names, .row, details, .actions, p) *) {
  transition: opacity 1.1s var(--out), transform 1.1s var(--out), background-color .2s var(--ease), color .2s var(--ease), scale .15s var(--ease); }
.motion main > :not(:first-child) :is(p, h3, a.btn, a.link-arrow, details, .founder, .actions, .tablewrap, .seg):not(.scene *, .quote-big, .display, :is(.events, .rule-list, .cols, .people, .facts-list, .photos, .stepper, .grid-2, .names, .row, details, .actions, p) *):not(.in) { opacity: 0; transform: translateY(26px); }
.motion :is(main h2:not(.lights *, .cols *, .scene *), main p.display:not(.cols *, .scene *)) { transition: opacity 1.2s var(--out), transform 1.2s var(--out), filter 1.2s var(--out); }
.motion :is(main h2:not(.lights *, .cols *, .scene *), main p.display:not(.cols *, .scene *)):not(.in) { opacity: 0; transform: translateY(26px); filter: blur(14px); }
.motion :is(.row > .art, .prog-art) { clip-path: inset(0); transition: clip-path 1.6s var(--out), filter 1.6s var(--out); }
.motion :is(.row > .art, .prog-art):not(.in) { clip-path: inset(100% 0 0 0); filter: blur(10px); }
/* Home hero on wide screens: the map slides right as the copy comes in (site.js sets where to) */
.map-hero .footprint { transform-origin: 0 0; }
.map-hero .footprint.aside { --edge: linear-gradient(180deg, transparent, #000 var(--fade), #000 calc(var(--land) - var(--fade)), transparent var(--land));
  -webkit-mask-image: var(--edge); mask-image: var(--edge); }   /* moved aside, the land's flat top and bottom edges would show */
.motion .map-hero .footprint { transition: transform 1.2s var(--out); }

/* Moving between pages: the nav holds still, the current-tab pill slides to the new tab, and only the page cross-fades.
   The router in site.js swaps pages inside a view transition; full page loads use the same names when the browser can. */
.tabs a[aria-current=page], .tabs a[aria-current=page]:hover { background: none; position: relative; z-index: 0; }
.tabs .pill { position: absolute; inset: 0; z-index: -1; border-radius: var(--pill); background: var(--accent-soft); view-transition-name: tab-pill; }
nav.top { view-transition-name: site-nav; }
main[tabindex="-1"]:focus { outline: none; }   /* the router moves focus here after a page change */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-group(tab-pill), ::view-transition-group(seg-pill) { animation-duration: .5s; animation-timing-function: cubic-bezier(.16, 1, .3, 1); }
  ::view-transition-old(tab-pill), ::view-transition-new(tab-pill), ::view-transition-old(seg-pill), ::view-transition-new(seg-pill) { height: 100%; }   /* stretch with the tab instead of keeping the old aspect */
  ::view-transition-old(root) { animation-duration: .25s; }
  ::view-transition-new(root) { animation-duration: .4s; }
}

/* 700+: one complete campus under a compact number, both on one screen (site.js sets the canvas height);
   a dove flies over it all and lands on the clock tower. */
.lights canvas:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: -5px; }
#reach { min-height: 0; }
#reach .top { padding-top: 28px; gap: 6px; }
#reach .big { font-size: clamp(84px, 9vw, 132px); }
#reach .sub { max-width: none; }
#reach canvas { position: relative; bottom: auto; margin: 0; order: 2; }
#reach .facts { order: 3; background: none; margin-top: 0; padding-top: 8px; }
#reach .doves { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
/* wide screens: the campus on the left, the three facts stacked beside it on the right */
@media (min-width: 1041px) {
  /* the campus and the facts sit side by side as one group, centred between equal page margins
     (site.js makes the canvas just as wide as the campus it draws) */
  #reach { display: grid; grid-template-columns: auto clamp(230px, 19vw, 290px); justify-content: center; column-gap: clamp(32px, 4vw, 72px);
    padding: 0 clamp(24px, 5vw, 96px); row-gap: 0; align-content: start; }
  #reach .top { grid-column: 1 / -1; }
  #reach canvas:not(.doves) { grid-column: 1; grid-row: 2; }
  #reach .facts { grid-column: 2; grid-row: 2; align-self: center; grid-template-columns: 1fr; gap: 0; padding: 0; }
  #reach .facts div { text-align: left; gap: 4px; padding: 20px 0; border-top: 1px solid var(--line-2); }
  #reach .facts div:first-child { border-top: 0; padding-top: 0; }
  #reach .facts b { font-size: clamp(36px, 3.2vw, 46px); line-height: 1; }
  #reach .facts span { font-size: 15px; }
}

/* Map place card, on hover and in the landmark panel, after a printed map label: a pin and the place's name, what
   it is to us, then what happened there and who with. Only the rows a place has are shown. */
.place-card { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 10px; color: var(--ink); text-align: left; }
.place-card .pin { width: 22px; height: 22px; }
.place-card .pin path { fill: #c9962e; }
.place-card .pin circle { fill: var(--panel); }
.place-card .pc-name { font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.place-card .pc-tag, .place-card .pc-what, .place-card .pc-with { grid-column: 1 / -1; }
.place-card .pc-tag { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 16px; color: var(--muted); }
.place-card .pc-tag::before { content: ''; flex: none; width: 12px; height: 12px; border-radius: 50%; background: #d9a441; }
.place-card .pc-what { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-2); font-size: 19px; font-weight: 600; line-height: 1.3; }
.place-card .pc-with { margin-top: 14px; display: flex; flex-direction: column; gap: 4px; font-size: 16px; color: var(--muted); line-height: 1.4; }
.place-card .pc-with small { font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--faint); }
.place-card [hidden] { display: none; }
.map-tip { position: absolute; z-index: 3; width: min(380px, calc(100% - 24px)); padding: 22px 26px 24px; pointer-events: none;
  background: var(--panel); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 22px 60px rgba(26,39,68,.18);
  transform: translate(-50%, calc(-100% - 22px)); animation: tip .2s var(--ease); }
/* the tail, turned to point at the dot even when the card is pushed sideways to stay on the map */
.map-tip::after { content: ''; position: absolute; left: calc(50% + var(--tail, 0px)); top: 100%; width: 18px; height: 18px;
  background: var(--panel); border: solid var(--line); border-width: 0 1px 1px 0; transform: translate(-50%, -50%) rotate(45deg); }
.map-tip.below { transform: translate(-50%, 22px); }
.map-tip.below::after { top: 0; transform: translate(-50%, -50%) rotate(225deg); }
@keyframes tip { from { opacity: 0; } }
.landmark { width: 380px; }
.landmark .place-card { margin-top: 6px; }
@media (max-width: 1040px) { .landmark { width: auto; } }

/* 700+: the three facts rise in turn as the dove crosses them, and their counts run up like the 700 (site.js adds .in) */
.motion #reach .facts > div { transition: opacity 1.1s var(--out), transform 1.1s var(--out); }
.motion #reach .facts > div:not(.in) { opacity: 0; transform: translateY(26px); }

/* QW Hub sessions: one pill slides to the chosen session while the panel cross-fades (a view transition in site.js) */
.seg button { position: relative; z-index: 0; }
.seg .pill { position: absolute; inset: 0; z-index: -1; border-radius: 8px; background: var(--panel);   /* its transition name is set in site.js while it moves */
  box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 0 0 .5px rgba(0,0,0,.04); }
.sessions.slides button[aria-selected=true] { background: none; box-shadow: none; }

@media (prefers-reduced-motion: no-preference) {
  /* collapsibles open and close by height instead of jumping (browsers without this just open at once) */
  details.more-info { interpolate-size: allow-keywords; }
  details.more-info::details-content { block-size: 0; overflow: clip; opacity: 0;
    transition: block-size .5s cubic-bezier(.16, 1, .3, 1), opacity .4s var(--ease), content-visibility .5s allow-discrete; }
  details.more-info[open]::details-content { block-size: auto; opacity: 1; }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  /* home programme rows: the painting leans in inside its own frame (the clip shrinks as much as the image grows) */
  .motion .row > .art { transition: clip-path 1.6s var(--out), filter 1.6s var(--out), scale 1.6s var(--out); }
  .motion .row:hover > .art.in { scale: 1.04; clip-path: inset(1.923% round calc(var(--r-lg) / 1.04)); }
}

/* Lightbox: a photo opened large over a dimmed page */
.lightbox { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: clamp(12px, 4vw, 48px) clamp(12px, 5.5vw, 76px); border: 0;
  background: transparent; color: #f5f0e6; overflow: hidden; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox:focus { outline: none; }   /* the dialog itself takes focus on opening, so no button wears a ring it was not given */
.lightbox::backdrop { background: rgba(10,14,26,.9); }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 100%; touch-action: pan-y; }
.lightbox img { max-width: min(1400px, 100%); max-height: calc(100dvh - 2 * clamp(12px, 4vw, 48px) - 44px); object-fit: contain; border-radius: var(--r-md);
  user-select: none; -webkit-user-drag: none; }
.lightbox figcaption { display: flex; gap: 16px; font-size: 14px; color: rgba(245,240,230,.82); text-align: center; }
.lightbox .lb-count { font-variant-numeric: tabular-nums; color: rgba(245,240,230,.5); }
.lightbox button { position: absolute; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(245,240,230,.12); color: #f5f0e6;
  font-size: 24px; line-height: 1; cursor: pointer; transition: background .2s var(--ease), scale .15s var(--ease); }
.lightbox button:hover { background: rgba(245,240,230,.24); }
.lightbox button:active { scale: .92; }
.lightbox .lb-close { top: 16px; right: 16px; }
.lightbox :is(.lb-prev, .lb-next) { top: 50%; translate: 0 -50%; }
.lightbox .lb-prev { left: 16px; }
.lightbox .lb-next { right: 16px; }
.lightbox.one :is(.lb-prev, .lb-next) { display: none; }
@media (max-width: 640px) { .lightbox :is(.lb-prev, .lb-next) { top: auto; bottom: 16px; translate: none; } }
:root:has(.lightbox[open]) { overflow: hidden; }
:is(.photos img, img.poster) { cursor: zoom-in; }
@media (prefers-reduced-motion: no-preference) {
  .lightbox[open] { animation: lb-in .35s cubic-bezier(.16, 1, .3, 1); }
  .lightbox[open]::backdrop { animation: lb-fade .3s var(--ease); }
}
@keyframes lb-in { from { opacity: 0; scale: .97; } }
@keyframes lb-fade { from { opacity: 0; } }

/* Recent work: the whole row is the link, so the whole row answers the pointer, and an arrow follows the title */
a.event { position: relative; isolation: isolate; }
a.event::before { content: ""; position: absolute; inset: 0 -14px; z-index: -1; border-radius: var(--r-md); background: var(--bg); opacity: 0;
  transition: opacity .2s var(--ease); }
a.event:hover::before { opacity: 1; }
a.event h3::after { content: "›"; display: inline-block; margin-left: .35em; opacity: 0; translate: -4px 0; transition: opacity .2s var(--ease), translate .25s var(--ease); }
a.event:is(:hover, :focus-visible) h3::after { opacity: 1; translate: 0 0; }

/* a faint grain over the whole page, so the cream reads as paper, the same stuff the paintings are cut from */
body::after { content: ""; position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .1 0 0 0 0 .08 0 0 0 0 .05 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* Other engagements: poster beside the list */
.other { display: grid; grid-template-columns: minmax(0, 300px) 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.other-poster img { width: 100%; border-radius: var(--r-md); display: block; }
.other .event { grid-template-columns: 110px 1fr auto; }
@media (max-width: 860px) { .other { grid-template-columns: 1fr; } .other-poster { max-width: 320px; } .other .event { grid-template-columns: 1fr; } }

/* ---------- Design polish, round 1 ---------- */
/* headlines */
h1 { letter-spacing: -.032em; text-wrap: balance; }
.map-hero h1, .display { letter-spacing: -.035em; }
h2 { letter-spacing: -.026em; text-wrap: balance; }
.quote-big, blockquote, .lede, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
.section.center .display { max-width: 15em; }

/* programme schedules */
.prog .event { grid-template-columns: 180px 1fr; gap: 16px; padding: 16px 0; border-top-color: var(--line-2); }
.prog .event h3 { font-size: 17px; letter-spacing: -.015em; }
.prog .event .small { font-size: 15px; margin-top: 4px; }
@media (max-width: 640px) { .prog .event { grid-template-columns: 1fr; gap: 4px; } }

/* work */
.page-work .tile > .head h2 { font-size: clamp(28px, 3vw, 38px); }
.label:has(> .tag) { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.other .cols { grid-template-columns: 1fr; }
.other .poster { width: 100%; }
@media (max-width: 860px) { .other .poster, .other-poster { max-width: 280px; } }

/* contact: a hidden twin of the nav button keeps the nav from shifting between pages */
nav.top .btn[aria-hidden="true"] { visibility: hidden; }

/* about: three school stages */
.stepper.three { grid-template-columns: repeat(3, 1fr); margin-top: 20px; width: min(100%, 860px); align-self: center; }
.stepper.three::before { left: 16.67%; right: 16.67%; }
.stepper.three small { display: block; max-width: 18em; margin-top: 2px; line-height: 1.45; font-size: 15px; color: var(--muted); }
@media (max-width: 640px) {
  .stepper.three { grid-template-columns: 1fr; gap: 28px; }
  .stepper.three::before { display: none; }
}

@media (max-width: 640px) {
  .creds { flex-direction: column; gap: 4px; }
  #reach .facts { grid-template-columns: 1fr; padding: 8px 24px 28px; gap: 0; }
  #reach .facts div { text-align: left; padding: 14px 0; border-top: 1px solid var(--line-2); }
  #reach .facts div:first-child { border-top: 0; }
  #reach .facts b { font-size: 30px; }
  #reach .facts span { font-size: 14px; }
}

@media (min-width: 641px) { :lang(zh) .event:not(.prog .event, .other .event) { grid-template-columns: 170px 1fr auto; } }

/* homepage film */
.film { max-width: 880px; margin: clamp(24px, 4vw, 40px) auto 0; }
.film video { box-shadow: 0 18px 50px -24px rgba(26,39,68,.35); border: 1px solid var(--line); }
.film figcaption { max-width: 56ch; margin-inline: auto; }

/* TPSS detail page */
.actions.center { justify-content: center; }
.faint { color: var(--faint); }
.link-arrow.back { font-size: 15px; font-weight: 500; }
.link-arrow.back::before { content: "‹"; display: inline-block; margin-right: .35em; }
.link-arrow.back::after { content: none; }
.painted.wash-side > .hero-dove { position: absolute; z-index: 1; pointer-events: none; display: block; top: clamp(12px,1.6vw,20px); left: 55%; right: auto; bottom: auto; width: calc(45% - clamp(12px,1.6vw,20px)); height: calc(100% - 2 * clamp(12px,1.6vw,20px)); max-width: none; }
@media (max-width: 760px) { .painted.wash-side > .hero-dove { top: auto; left: 12px; bottom: 12px; width: calc(100% - 24px); height: 220px; } }

/* Programmes dropdown. The chevron button sits inside the Programmes tab; the panel is outside .tabs (which scrolls
   sideways on phones and would clip it), placed under the tab by site.js. */
.tab-dd { position: relative; display: flex; }
.tab-dd > a { padding-right: 30px; }
.tab-dd:hover > a:not([aria-current=page]) { background: var(--accent-soft); color: var(--ink); }
.dd-btn { position: absolute; right: 5px; top: 50%; translate: 0 -50%; width: 24px; height: 24px; padding: 0; display: grid; place-items: center;
  border: 0; border-radius: var(--pill); background: none; color: var(--muted); cursor: pointer; }
.dd-btn:hover, .dd-btn[aria-expanded=true] { color: var(--ink); }
.dd-btn:focus-visible { outline-offset: -2px; border-radius: var(--pill); }
.dd-btn svg { display: block; }
.dd-panel { position: absolute; top: 100%; left: 0; z-index: 30; width: min(340px, calc(100vw - 16px)); padding: 6px; display: flex; flex-direction: column; gap: 2px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: 0 12px 32px rgba(26,39,68,.14);
  visibility: hidden; opacity: 0; }
.dd-panel.open { visibility: visible; opacity: 1; }
.dd-panel a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 8px; color: var(--ink); }
.dd-panel a:hover, .dd-panel a:focus-visible { background: var(--accent-soft); text-decoration: none; }
.dd-panel a:focus-visible { outline-offset: -2px; }
.dd-panel .n { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.dd-panel .d { font-size: 14px; line-height: 1.4; color: var(--muted); }
@media (max-width: 640px) { .tab-dd > a { padding-right: 28px; } .dd-btn { right: 3px; } }
@media (prefers-reduced-motion: no-preference) {
  .dd-panel { translate: 0 -4px; transition: opacity .18s var(--ease), translate .18s var(--ease), visibility 0s .18s; }
  .dd-panel.open { translate: 0 0; transition-delay: 0s; }
  .dd-btn svg { transition: rotate .18s var(--ease); }
  .dd-btn[aria-expanded=true] svg { rotate: 180deg; }
}

/* programme pages (life, hub, elite): the page title sits where the overview tiles have an h2; four photos in a row */
.prog-text h1 { font-size: clamp(44px, 5.9vw, 70px); letter-spacing: -.01em; font-family: "QW Titles", var(--sans); }
.photos.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .photos.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.prog .other .facts-list > div { grid-template-columns: 1fr; gap: 4px; }
.photos.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .photos.three { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .photos.four, .photos.three { grid-template-columns: 1fr; } }

/* hub: the TPSS block is centred; the research details and the facts list stay left-aligned */
.tile.prog.tpss-center > .head { align-items: center; text-align: center; max-width: none; }
.tile.prog.tpss-center > .stepper { width: 100%; max-width: 760px; margin-inline: auto; }
.tile.prog.tpss-center > .actions { justify-content: center; }

/* team: a labelled second group under the core team; same column width as the grid above */
.people.fill { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.people-sub { display: flex; flex-direction: column; gap: 6px; margin-top: clamp(28px, 5vw, 56px); padding-top: clamp(24px, 4vw, 40px); border-top: 1px solid var(--line-2); }
.people-sub h3 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -.02em; }

/* seasonal TPSS prompt: strip above the nav and a small card; both injected by site.js */
.promo-strip { margin: 0 -16px; min-height: 38px; padding: 8px 16px; display: flex; align-items: center; justify-content: center; text-align: center;
  background: var(--accent); color: var(--bg); font-size: 14px; line-height: 1.3; }
.promo-strip[hidden], .promo-card[hidden] { display: none; }
.promo-strip, .promo-strip:hover { color: var(--bg); text-decoration: none; }
.promo-strip .go { text-decoration: underline; text-underline-offset: 3px; margin-left: .3em; font-weight: 600; }
.promo-strip .short { display: none; }
.promo-card { position: fixed; right: 20px; bottom: 20px; z-index: 30; width: min(340px, calc(100vw - 32px)); padding: 18px 44px 18px 20px; box-sizing: border-box;
  background: var(--panel); color: var(--ink); border: 1px solid var(--line-2); border-radius: var(--r-md); box-shadow: 0 18px 50px rgba(26,39,68,.18);
  display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.promo-card b { font-size: 15.5px; line-height: 1.3; letter-spacing: -.01em; }
.promo-card p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.promo-card .btn { margin-top: 8px; padding: 9px 16px; font-size: 14px; }
.promo-card .x { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.promo-card .x:hover { background: var(--accent-soft); color: var(--ink); }
@media (prefers-reduced-motion: no-preference) {
  .promo-card { transition: opacity .5s var(--ease), translate .5s var(--ease); }
  .promo-card:not(.on) { opacity: 0; translate: 0 16px; pointer-events: none; }
}
@media (prefers-reduced-motion: reduce) { .promo-card:not(.on) { display: none; } }
@media (max-width: 600px) {
  .promo-strip .long { display: none; }
  .promo-strip .short { display: inline; }
  .promo-card { left: 0; right: 0; bottom: 0; width: auto; border-radius: var(--r-md) var(--r-md) 0 0; border-width: 1px 0 0; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
}

/* ---------- Named classes that replace one-off inline styles ---------- */
.hero-short { min-height: 360px; justify-content: flex-end; }
.hero-tall { min-height: min(calc(100vh - 120px), 640px); justify-content: center; }
.head-tight { padding-top: 40px; padding-bottom: 16px; }
.head-row { flex-direction: row; justify-content: space-between; align-items: baseline; max-width: none; flex-wrap: wrap; }
.lede-wide { max-width: 36em; }
.actions-center { justify-content: center; }
.pt-0 { padding-top: 0; }
.pb-0 { padding-bottom: 0; }
.display-md { font-size: clamp(36px, 5vw, 56px); }
.display-sm { font-size: clamp(32px, 4.4vw, 52px); }
.h-28 { font-size: 28px; }

/* ---------- Programme page top (Life, Hub, Elite): copy on the left, the painting in an arch on the right ---------- */
.p-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); column-gap: clamp(24px, 5vw, 72px); align-items: center;
  padding: clamp(12px, 3vw, 36px) clamp(8px, 3vw, 40px) clamp(28px, 4vw, 48px); }
.p-copy { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.p-copy h1 { font-size: clamp(38px, 5vw, 62px); }
.p-copy .lede { max-width: 30em; }
.p-arch { position: relative; margin: 0; width: min(100%, 430px); aspect-ratio: 4 / 5; height: auto; justify-self: end; overflow: hidden; isolation: isolate; background: #f3ead6; border-radius: 999px 999px var(--r-lg) var(--r-lg); box-shadow: 0 0 0 1px var(--line-2); }
.p-arch img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: center top; transform: scale(1.09); transform-origin: center; }
@media (min-width: 861px) { .p-hero { min-height: 600px; align-items: start; } .p-arch { align-self: center; } .p-copy { padding-top: 140px; } }
.p-intro .prog-text p { text-wrap: pretty; }
.p-intro .prog-text { display: flex; flex-direction: column; gap: 24px; max-width: 46em; }
@media (max-width: 860px) {
  .p-hero { grid-template-columns: minmax(0, 1fr); row-gap: 24px; }
  .p-arch { justify-self: center; width: min(86%, 340px); }
  .p-copy h1 { font-size: clamp(36px, 10vw, 52px); }
}

/* ---------- Programmes: an irregular bento ---------- */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(220px, auto)) auto; grid-auto-rows: minmax(220px, auto); gap: 16px; }
.b-card { position: relative; overflow: hidden; padding: 0; gap: 0; justify-content: flex-end; }
.b-art { display: block; width: 100%; object-fit: cover; }
.b-text { display: flex; flex-direction: column; gap: 14px; padding: clamp(20px, 3vw, 36px); }
.b-life { grid-column: span 7; grid-row: span 2; }
.b-life .b-art { position: absolute; inset: 0; height: 100%; }
.b-life .b-text { position: relative; margin: clamp(12px, 1.6vw, 20px); margin-top: clamp(280px, 38vw, 420px); background: var(--panel); border-radius: var(--r-md); }
.b-hub, .b-elite { grid-column: span 5; }
.b-hub .b-art, .b-elite .b-art { height: 200px; object-position: center 60%; }
.b-strip { grid-column: span 12; flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; padding-top: 22px; padding-bottom: 22px; }
.b-strip p { font-size: clamp(18px, 2vw, 22px); font-weight: 600; letter-spacing: -.02em; color: var(--ink); }
@media (max-width: 760px) {
  .bento { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-rows: auto; }
  .b-life, .b-hub, .b-elite, .b-strip { grid-column: auto; grid-row: auto; }
  .b-life .b-art { position: static; height: 220px; }
  .b-life .b-text { margin: 0; background: transparent; }
}
