/* Fun AI Camp: the site (based on design A 「海報」, with more colour).
   Colour comes only from the camp's own material:
   - the FunAI logo yellow and navy: the hero band, headings, links, the contact band;
   - each year's poster colour: a soft band behind that year, its numeral and its programme tab marker.
   Two widths only: the reading measure (36em) and the full 1200px plate width. */

:root {
  --bg: #ffffff;
  --ink: #1b1b1b;
  --ink-2: #555555;          /* secondary text: 7.5:1 on white, 5.2:1 on the logo yellow, over 6:1 on every year tint */
  --navy: #2c4080;           /* FunAI logo navy: headings, links, the primary button (9.8:1 on white, 6.8:1 on yellow) */
  --navy-deep: #1e2d5c;
  --visited: #7a2e8e;         /* visited links: a clear plum, 8:1 on white, for readers working through the archive */
  --yellow: #ecd864;         /* FunAI logo yellow: the hero band, the timeline dots, links on navy */
  --sky: #edf0fa;            /* a soft navy tint for the 營隊流程 band */
  --on-navy: #e6eaf5;        /* body text on the navy band (8.3:1) */
  --rule: #d9d9d9;
  --wash: #f3f4f7;           /* behind photos while they load */
  --yc: var(--navy);         /* per-year colour, set on each edition */
  --tint: var(--sky);        /* per-year soft band colour, set on each edition */

  --gutter: 40px;
  --pad: 128px;              /* space above a section; chapters get more, closing sections less */
  --block: 88px;
  --measure: 36em;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Heiti TC", sans-serif;
}

/* Noto Sans TC draws curly quotes full-width (CJK style). Inside English text, borrow proportional
   quotes from the system sans so "AMD’s" does not open a gap. */
@font-face {
  font-family: "Latin Quotes";
  src: local("Segoe UI"), local("Helvetica Neue"), local("Helvetica"), local("Arial"), local("Roboto");
  unicode-range: U+2018-201F;
}
:lang(en) { font-family: "Latin Quotes", var(--sans); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 18px/1.8 var(--sans);
  font-kerning: normal;
  overflow-wrap: break-word;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, h5, h6, p, ul, ol, figure, table { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.35; }
/* no lone character (「束。」) on a last line */
h1, h2, h3, h4, h5, h6, p, li, td, th, dd, dt, figcaption, caption,
.year__facts, .year__sumline, .edition__facts, .hero__facts { text-wrap: pretty; }
/* a bare URL in running text may break anywhere, so the closing 。 never sits alone on a line */
.fold__body a[href^="http"], .prose a[href^="http"], .tt__note a[href^="http"] { word-break: break-all; }
/* short labels and names never split mid-word; long paragraphs are left alone */
.nowrap, .yt__link, .more, .dlg__close { white-space: nowrap; }
.keep, .spk__name, .ta__zh, .ta__org, .mentor__zh, .mentor__role, .org__name, .adm__n,
.awards td, .logos__names, .group-label { word-break: keep-all; }
::selection { background: var(--yellow); color: var(--ink); }

a { color: var(--navy); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:visited { color: var(--visited); }
a:hover { color: var(--navy-deep); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }
button { font: inherit; color: inherit; }

.wrap { width: 100%; max-width: calc(1200px + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.measure { max-width: var(--measure); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -80px; z-index: 50; background: var(--navy); color: #fff; padding: 12px 20px; }
.skip:focus { top: 12px; color: #fff; }

/* ---------------------------------------------------------------- header */
.site-head { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--rule); }
.site-head__in { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 18px; white-space: nowrap; }
.brand:visited { color: var(--ink); }
.brand:hover { color: var(--navy); }
.brand__mark { width: 34px; height: auto; }
.nav ul { display: flex; flex-wrap: wrap; gap: 0 4px; }
.nav a { display: flex; align-items: center; min-height: 48px; padding: 0 12px; font-size: 16px; color: var(--ink); text-decoration: none; }
.nav a:visited { color: var(--ink); }
.nav a:hover { color: var(--navy); text-decoration: underline; text-underline-offset: .3em; }
.menu-btn { display: none; }

/* ---------------------------------------------------------------- sections and shared type */
.section { padding-top: var(--pad); scroll-margin-top: calc(32px - var(--pad)); }
.section--chapter { --pad: 168px; }
.section--near { --pad: 96px; }
.section--closing { --pad: 104px; }

h2 { font-size: 36px; line-height: 1.3; margin-bottom: 40px; color: var(--navy); }
.edition h2 { color: var(--yc); }
.section__intro { max-width: var(--measure); margin: -24px 0 56px; font-size: 20px; }
.stats .num { color: var(--navy); font-weight: 700; }
.section--chapter h2 { font-size: 48px; line-height: 1.25; margin-bottom: 24px; }
.section--closing h2 { font-size: 32px; margin-bottom: 36px; }
#editions h2 { margin-bottom: 56px; }

.lead { font-size: 20px; line-height: 1.8; }
.quiet { color: var(--ink-2); }
.sub { font-size: 26px; line-height: 1.35; margin-bottom: 28px; }
.minor { font-size: 20px; line-height: 1.45; margin-bottom: 14px; }
.block { margin-top: var(--block); }
.block__note { margin: -12px 0 20px; color: var(--ink-2); }
.group-label { font-weight: 700; margin-bottom: 16px; }
p + p { margin-top: 1em; }

.list li { position: relative; padding-left: 1.2em; }
.list li + li { margin-top: 10px; }
.list li::before { content: ""; position: absolute; left: 2px; top: .8em; width: 6px; height: 6px; background: var(--ink); border-radius: 50%; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px; border-radius: 4px;
  background: var(--navy); color: #fff; font-weight: 500; text-decoration: none;
}
.btn:visited { color: #fff; }
.btn:hover { background: var(--navy-deep); color: #fff; }

.more {
  display: inline-flex; align-items: center; min-height: 44px; margin-top: 12px; padding: 0;
  background: none; border: 0; color: var(--navy); font-size: 17px; font-weight: 500; cursor: pointer;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .25em;
}
.more:hover { color: var(--navy-deep); text-decoration-thickness: 2px; }

/* plus / minus, drawn with two ink bars; the vertical bar goes away when open */
.pm { position: relative; flex: 0 0 auto; width: 18px; height: 18px; color: var(--ink); }
.pm::before, .pm::after { content: ""; position: absolute; left: 0; top: 8px; width: 18px; height: 2px; background: currentColor; }
.pm::after { transform: rotate(90deg); }
details[open] > summary .pm::after { display: none; }

/* posters and images: printed plates with a museum label */
.plate img { width: 100%; background: var(--wash); }
.plate figcaption { margin-top: 12px; font-size: 16px; line-height: 1.6; color: var(--ink-2); }

/* ---------------------------------------------------------------- hero: the camp's own yellow title card */
.hero { padding: 80px 0 88px; background: var(--yellow); }
.hero__in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7.5fr); gap: 64px; align-items: center; }
.hero__title { margin: 0; line-height: 1; }
.hero__logo { width: min(100%, 420px); height: auto; }
.hero__zh { margin-top: 20px; font-size: 26px; font-weight: 700; line-height: 1.5; color: var(--navy); }
.hero a:not(.btn) { color: var(--navy); }
.hero a:not(.btn):visited { color: var(--navy); }
/* the 2026 poster, mounted on a white mat like a print on the yellow wall */
.plate--mounted img { padding: 12px; background: #fff; }
.hero .plate figcaption { color: var(--ink); }
.hero__status { margin-top: 32px; font-size: 20px; }
.hero__facts { margin-top: 12px; font-size: 20px; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; margin-top: 32px; }
.hero__link { display: inline-flex; align-items: center; min-height: 48px; font-weight: 500; }

/* ---------------------------------------------------------------- about + format */
.about { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 72px; align-items: start; }
.about__text { max-width: var(--measure); }

.format { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 88px; align-items: start; }
.steps { max-width: var(--measure); }
/* each stage: its date on top in navy, then the title and text; a dot and line mark the sequence */
.step { position: relative; padding-left: 44px; }
.step + .step { margin-top: 44px; }
.step__when { line-height: 1.6; margin-bottom: 4px; }
.step__title { font-size: 24px; line-height: 1.45; margin-bottom: 8px; }
.terms__col + .terms__col { margin-top: 56px; }

/* coloured bands: a whole section on the soft navy tint or on navy */
.section--band { margin-top: var(--band-gap, 112px); padding: 96px 0 104px; }
.band--sky { background: var(--sky); }
.band--navy { background: var(--navy); color: var(--on-navy); }
.band--navy h2 { color: #fff; }
.band--navy a, .band--navy a:visited { color: var(--yellow); }
.band--navy a:hover { color: #fff; }
:where(.band--navy) :focus-visible { outline-color: var(--yellow); }

/* the three stages as a timeline: yellow dots on a navy line (the dates stay in the left column) */
.step::before {
  content: ""; position: absolute; left: 0; top: 5px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--yellow); border: 3px solid var(--navy);
}
.step:not(:last-child)::after {
  content: ""; position: absolute; left: 10px; top: 30px; bottom: -44px; width: 2px; margin-left: -1px; background: var(--navy);
}
.step__when { font-weight: 700; color: var(--navy); }

/* prizes: small gold, silver and bronze discs before 第一名, 第二名, 第三名 */
.medal { display: inline-block; width: 14px; height: 14px; margin-right: 10px; border-radius: 50%; vertical-align: -1px; }
.medal--gold { background: #d9a21b; }
.medal--silver { background: #a9b3bf; }
.medal--bronze { background: #c27a3d; }
.band--sky .table tr { border-bottom-color: #cfd5e6; }

.table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.table th, .table td { text-align: left; padding: 12px 16px 12px 0; vertical-align: top; }
.table tr { border-bottom: 1px solid var(--rule); }
.table thead th { font-weight: 500; color: var(--ink-2); padding-top: 0; }
.table tbody th { font-weight: 500; white-space: nowrap; width: 7em; }
.table caption { text-align: left; font-weight: 700; margin-bottom: 8px; }
.prizes { margin-top: 24px; max-width: 420px; }

/* ---------------------------------------------------------------- 2026 edition */
.section.edition { --pad: 112px; }
/* the chapter opens on a soft band in the 2026 poster's own colour; the programme and people follow on white */
.opener { background: var(--tint); padding: 80px 0 88px; }
.opener .edition__plate { margin-bottom: 0; }
.edition .opener + .wrap > .block:first-child, .edition .opener + .wrap > .intro:first-child { margin-top: 88px; }
.edition .opener + .wrap > .intro { margin-top: 88px; }
.edition__facts { font-size: 20px; margin-bottom: 48px; }
.edition__plate { margin-bottom: 80px; }
.intro .lead { margin-bottom: 32px; }
.intro p[lang="en"] { max-width: 34em; }
.point + .point { margin-top: 28px; }
.point__t { font-weight: 700; font-size: 20px; margin-bottom: 6px; }
.point__t + p { margin-top: 0; }
.ph { display: inline-block; }

.orgs__group + .orgs__group { margin-top: 48px; }
.logos { display: flex; flex-wrap: wrap; align-items: center; gap: 32px 28px; }
.logos img { max-height: 80px; object-fit: contain; }
.logos__names { max-width: var(--measure); margin-top: 20px; font-size: 17px; color: var(--ink-2); }

/* timetable: tab bar and rows share the full width; the text stays at the reading measure */
.tabs { display: flex; flex-wrap: wrap; gap: 0 8px; border-bottom: 1px solid var(--rule); margin-bottom: 8px; }
.tab {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  position: relative; min-height: 64px; padding: 10px 20px 12px; margin-bottom: -1px;
  background: none; border: 0; cursor: pointer; text-align: left;
  color: var(--ink); line-height: 1.4;
}
.tab__day { font-weight: 700; font-size: 18px; color: var(--ink-2); }
.tab__date { font-size: 16px; color: var(--ink-2); }
.tab__date--short { display: none; }
.tab:hover .tab__day { color: var(--navy); }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--yc); }
.tab[aria-selected="true"] .tab__day { color: var(--ink); }
.tabs--track { margin-bottom: 28px; }
.tabs--track .tab { min-height: 52px; }
.day:focus-visible { outline-offset: 6px; }
.day__title { margin: 20px 0 4px; font-weight: 500; color: var(--ink-2); }
.tt__row { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 24px; padding: 16px 0; }
.tt__row + .tt__row { border-top: 1px solid var(--rule); }
.tt__time { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tt__what { max-width: var(--measure); }
.tt__title { font-weight: 500; }
.tt__note { margin-top: 2px; font-size: 17px; color: var(--ink-2); }
.tt__row--break .tt__title, .tt__row--break .tt__time { color: var(--ink-2); font-weight: 400; }

/* speakers: the second visual layer */
.speakers { display: grid; gap: 64px 48px; }
.speakers--grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.speakers--list { grid-template-columns: minmax(0, 1fr); gap: 48px; max-width: calc(192px + var(--measure)); }
.speakers--list .spk:not(.spk--plain) { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 32px; align-items: start; }
.speakers--list .spk__photo { margin-bottom: 0; }
.speakers--list .spk--plain { padding-left: 192px; }
.speakers--plain { grid-template-columns: minmax(0, 1fr); gap: 32px; max-width: var(--measure); }
.speakers + .minor { margin-top: 72px; }
.minor + .speakers { margin-top: 20px; }
/* the source portraits are small (some only 164px wide): never show them larger than 280px */
.spk__photo { aspect-ratio: 4 / 5; max-width: 240px; overflow: hidden; background: var(--wash); border-radius: 4px; margin-bottom: 20px; }
.spk__photo img { width: 100%; height: 100%; object-fit: cover; }
/* a small source is shown smaller rather than blurred; photos in a row share a bottom line so the talk titles line up */
@media (min-width: 721px) {
  .speakers--grid { align-items: end; }
  .speakers--grid .spk { display: grid; grid-template-rows: subgrid; grid-row: span 2; row-gap: 20px; }
  .speakers--grid .spk__photo { margin-bottom: 0; align-self: start; width: 100%; }
  .speakers--grid .spk__text { align-self: start; }
}
.spk__talk { font-size: 20px; line-height: 1.5; font-weight: 700; margin-bottom: 10px; }
.spk__name { font-weight: 500; }
.spk__zh { margin-left: .5em; }
.spk__aff, .spk__meta { color: var(--ink-2); font-size: 17px; line-height: 1.65; }
.spk__name + .spk__aff, .spk__aff + .spk__meta, .spk__meta + .spk__meta { margin-top: 2px; }

/* TAs */
.tas { display: grid; grid-template-columns: repeat(var(--cols, 6), minmax(0, 1fr)); gap: 40px 24px; }
.ta__photo { aspect-ratio: 1; overflow: hidden; border-radius: 6px; background: var(--wash); margin-bottom: 12px; }
.ta__photo img { width: 100%; height: 100%; object-fit: cover; }
.ta__zh { font-weight: 500; line-height: 1.5; }
.ta__name, .ta__org { font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.ta p + p { margin-top: 2px; }

/* awards, videos, news */
.awards-wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 88px; }
.videos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; }
.news { max-width: var(--measure); }
.news__item { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 24px; }
.news__item + .news__item { margin-top: 20px; }
.news__date { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.news__text { margin-top: 0; }
/* the link gets its own line, so the item text never ends on a lone character before it */
.news__link { display: block; margin-top: 2px; }
.nowrap { white-space: nowrap; }

/* collapsed registration and admission list */
.folds { max-width: var(--measure); }
.fold { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.fold + .fold { border-top: 0; }
.fold > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 64px; padding: 12px 0; cursor: pointer; list-style: none;
}
.fold > summary::-webkit-details-marker { display: none; }
.fold__t { font-size: 20px; font-weight: 700; }
.fold > summary:hover .fold__t { color: var(--navy); }
.fold__body { padding: 8px 0 40px; }
.reg__h { font-size: 18px; margin: 28px 0 10px; }
.adm { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 32px; }
.adm li { display: flex; gap: 16px; }
.adm__n { flex: 0 0 4.5em; font-weight: 500; }
.adm__s { min-width: 0; }

/* lite YouTube */
.yt__frame { position: relative; aspect-ratio: 16 / 9; background: var(--wash); overflow: hidden; }
.yt__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* one thumbnail still carries a thin black frame from the video (1.25% at the sides); trim just that one */
.yt__frame--trim img { top: -1.5%; left: -1.5%; width: 103%; height: 103%; max-width: none; }
/* a compact control tucked into the bottom-left corner, so it hides as little of the frame as possible */
.yt__play {
  position: absolute; left: 0; bottom: 0; display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; min-width: 44px; padding: 0 14px 0 12px; border: 0; border-radius: 0 4px 0 0; cursor: pointer;
  background: #fff; color: var(--ink); font-size: 16px; font-weight: 500; line-height: 1;
}
/* where the bottom-left corner holds a logo or watermark, the control moves to a plain top-left corner */
.yt__frame--top .yt__play { top: 0; bottom: auto; border-radius: 0 0 4px 0; }
.yt__play:focus-visible { outline-offset: -4px; }
.yt__play:hover { color: var(--navy); text-decoration: underline; text-underline-offset: .25em; }
.yt__icon { width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent currentColor; }
.yt figcaption { margin-top: 12px; font-size: 17px; line-height: 1.7; }
.yt__title { display: block; }
.yt__link { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------------------------------------------------------------- archive
   A 16:9 poster has its label (numeral, 屆, facts, toggle) in the column beside it.
   A wide banner has the same label directly under it, starting at the left edge like a museum caption. */
/* every past year sits on a soft band in its own poster colour; the bands stack like shelves */
.year { background: var(--tint); padding: 88px 0 96px; }
.year + .year { margin-top: 0; }
.year__head { display: block; cursor: pointer; list-style: none; }
.year__head::-webkit-details-marker { display: none; }
.year__poster, .year__label, .year__meta, .year__facts, .year__sumline, .bleed { display: block; }
.year--tall .year__head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 56px; align-items: start; }
.year--wide .year__poster { margin-bottom: 32px; }
.year--wide .year__label { display: grid; grid-template-columns: max-content minmax(0, 36em); column-gap: 64px; align-items: start; }
.year--wide .year__title { margin-bottom: 0; }

.year__title { display: flex; flex-direction: column; margin-bottom: 20px; }
.year__num { font-size: 64px; line-height: 1; font-weight: 700; color: var(--yc); }
.year__ord { margin-top: 10px; font-size: 26px; line-height: 1.4; font-weight: 700; }
.year__sumline { margin-top: 16px; color: var(--ink-2); }
.year__toggle {
  display: inline-flex; align-items: center; gap: 14px; min-height: 52px; margin-top: 16px;
  color: var(--navy); font-size: 18px; font-weight: 500;
}
.t-open, .t-close { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .25em; }
.year__head:hover .t-open, .year__head:hover .t-close { text-decoration-thickness: 2px; color: var(--navy-deep); }
.year__more[open] .t-open, .year__more:not([open]) .t-close { display: none; }

/* an opened year starts under one thin neutral rule; space does the rest */
.year__body { margin-top: 48px; padding-top: 56px; border-top: 1px solid rgba(27, 27, 27, .14); }
.year__body .sub { font-size: 24px; }
.year__end { margin-top: 48px; }
html:not(.js) .year__end { display: none; }

.prologue { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; margin-top: 136px; }
.prologue__img img { outline: 1px solid rgba(0, 0, 0, .1); outline-offset: -1px; }
.prologue__t { font-weight: 700; font-size: 20px; }
.prologue figcaption p + p { margin-top: 4px; color: var(--ink-2); max-width: var(--measure); }

/* ---------------------------------------------------------------- mentors, partners, contact */
.mentors { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 48px 32px; }
.mentor__photo { aspect-ratio: 4 / 5; overflow: hidden; border-radius: 4px; background: var(--wash); margin-bottom: 16px; }
.mentor__photo img { width: 100%; height: 100%; object-fit: cover; }
.mentor__zh { font-size: 20px; font-weight: 700; line-height: 1.5; }
.mentor__name { margin-top: 0; font-weight: 500; line-height: 1.5; }
.mentor__role, .mentor__years { font-size: 16px; line-height: 1.65; color: var(--ink-2); }
.mentor p + p { margin-top: 4px; }

/* partners: a quiet two-column list, logo beside name */
.orgs-all { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 72px; }
/* rows are top-aligned so names in both columns start at the same height; wide marks get up to 240px */
.org { display: grid; grid-template-columns: 240px minmax(0, 1fr); align-items: start; gap: 28px; padding: 14px 0; }
.org__logo { display: flex; align-items: flex-start; min-height: 48px; }
.org__logo img { max-width: 240px; max-height: 64px; object-fit: contain; object-position: left top; }
.org__name { font-weight: 500; line-height: 1.5; }
.org__en, .org__years { font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.org p + p { margin-top: 0; }

.contact .lead { max-width: var(--measure); }
.contact__email { margin-top: 20px; font-size: 32px; font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
.contact__email a { display: inline-flex; min-height: 48px; align-items: center; }
.contact__lines { margin-top: 20px; color: var(--on-navy); }

.site-foot { padding: 32px 0 40px; background: var(--navy-deep); color: var(--on-navy); }
.site-foot a, .site-foot a:visited { color: var(--yellow); }
.site-foot__in { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 40px; font-size: 16px; color: var(--on-navy); }
.site-foot__in p + p { margin-top: 0; }
.site-foot__brand { display: flex; align-items: center; gap: 12px; color: #fff; margin-right: auto; }
.site-foot__brand .brand__mark { width: 28px; }
.site-foot a { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------------------------------------------------------------- dialog */
.dlg { width: min(760px, calc(100% - 32px)); max-height: calc(100% - 48px); padding: 0; border: 0; border-radius: 6px; background: var(--bg); color: var(--ink); overflow: auto; }
.dlg::backdrop { background: rgba(15, 18, 30, .6); }
.dlg__in { padding: 0 40px 32px; }
/* the close control stays in view while a long bio scrolls */
.dlg__bar {
  position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 0; background: var(--bg); color: var(--ink-2); font-size: 16px;
}
.dlg__close {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; border: 0; cursor: pointer;
  background: none; color: var(--navy); font-size: 17px; font-weight: 500;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .25em;
}
.dlg__close:hover { color: var(--navy-deep); text-decoration-thickness: 2px; }
.dlg__end { margin-top: 40px; }
.dlg__close--end { min-height: 48px; padding-left: 0; }
.dlg__head { display: flex; align-items: center; gap: 20px; margin-top: 12px; }
.dlg__photo { flex: 0 0 96px; width: 96px; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 4px; }
.dlg__photo img { width: 100%; height: 100%; object-fit: cover; }
.dlg__title { font-size: 26px; line-height: 1.4; margin: 28px 0 0; }
.dlg__h { font-size: 20px; margin: 32px 0 8px; }
.prose p + p { margin-top: .9em; }
.prose[lang="en"] { line-height: 1.7; max-width: 34em; }

/* ---------------------------------------------------------------- tablet */
@media (max-width: 1100px) {
  .nav a { padding: 0 9px; }
  .speakers--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tas { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .mentors { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  :root { --pad: 104px; --block: 72px; }
  .section--chapter { --pad: 120px; }
  .section--near { --pad: 80px; }
  .section--closing { --pad: 88px; }
  .js .menu-btn {
    display: inline-flex; align-items: center; min-height: 48px; padding: 0 16px; margin-right: -8px;
    background: none; border: 0; color: var(--navy); font-weight: 500; font-size: 17px; cursor: pointer;
    text-decoration: underline; text-underline-offset: .25em;
  }
  .site-head__in { flex-wrap: wrap; min-height: 64px; }
  .js .nav { display: none; flex-basis: 100%; padding-bottom: 12px; }
  .js.menu-open .nav { display: block; }
  .nav ul { flex-direction: column; }
  .nav a { padding: 0; font-size: 18px; min-height: 52px; }
  .nav li + li { border-top: 1px solid var(--rule); }
  html:not(.js) .nav ul { flex-direction: row; flex-wrap: wrap; gap: 0 20px; }
  html:not(.js) .nav li + li { border: 0; }

  .hero { padding: 56px 0 72px; }
  .hero__in { grid-template-columns: 1fr; gap: 48px; }
  .hero__logo { width: min(100%, 360px); }
  .about { grid-template-columns: 1fr; gap: 48px; }
  .about__media { max-width: 720px; }
  .format { grid-template-columns: 1fr; gap: 72px; }
  .orgs-all { grid-template-columns: 1fr; }

  .year--tall .year__head { display: block; }
  .year--wide .year__label { display: block; }
  .year--tall .year__poster, .year--wide .year__poster { margin-bottom: 28px; }
  .year__title, .year--wide .year__title { flex-direction: row; align-items: baseline; gap: 16px; margin-bottom: 12px; }
  .year__ord { margin-top: 0; }
  .prologue { grid-template-columns: 1fr; gap: 20px; }
}

/* ---------------------------------------------------------------- phone */
@media (max-width: 720px) {
  :root { --gutter: 20px; --pad: 72px; --block: 64px; }
  .section--chapter { --pad: 88px; }
  .section--near { --pad: 56px; }
  .section--closing { --pad: 64px; }
  html { scroll-padding-top: 76px; }
  .brand { font-size: 17px; gap: 10px; }
  .brand__mark { width: 30px; }
  h2, .section--closing h2 { font-size: 30px; margin-bottom: 28px; }
  .section--chapter h2 { font-size: 36px; margin-bottom: 20px; }
  #editions h2 { margin-bottom: 36px; }
  .sub { font-size: 24px; margin-bottom: 20px; }
  .year__body .sub { font-size: 22px; }

  .hero__status { margin-top: 24px; font-size: 18px; }
  .hero__facts { font-size: 18px; }
  .hero__actions { margin-top: 28px; gap: 8px 28px; }

  .step { padding-left: 38px; }
  .step + .step { margin-top: 36px; }
  .step:not(:last-child)::after { bottom: -36px; }
  .step__title { font-size: 22px; }

  /* wide banners run edge to edge on phones, trimmed at the sides so the wordmark stays large */
  .edition__plate .bleed img, .year--wide .year__poster .bleed img {
    width: calc(100% + 2 * var(--gutter)); max-width: none; margin-left: calc(-1 * var(--gutter));
    aspect-ratio: 2.4 / 1; object-fit: cover;
  }
  .edition__facts { font-size: 18px; margin-bottom: 32px; }
  .edition__plate { margin-bottom: 56px; }
  .logos { gap: 24px 20px; }
  .logos li { flex: 0 0 calc(50% - 10px); }
  .logos img { max-width: 100%; max-height: 56px; }

  .tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; }
  .tab { padding: 10px 4px 12px; }
  .tab__date--long { display: none; }
  .tab__date--short { display: block; white-space: nowrap; }
  .tt__row { grid-template-columns: 1fr; gap: 0; padding: 14px 0; }
  .tt__time { font-size: 17px; color: var(--ink-2); }

  .speakers--grid, .speakers--list { grid-template-columns: 1fr; gap: 40px; }
  .spk:not(.spk--plain), .speakers--list .spk:not(.spk--plain) { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; align-items: start; }
  .speakers--list .spk--plain { padding-left: 0; }
  .spk__photo { margin-bottom: 0; }
  .spk__talk { font-size: 19px; margin-bottom: 6px; }
  .more { margin-top: 6px; }

  .tas { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 14px; }
  .ta__photo { margin-bottom: 8px; }
  .ta__zh { font-size: 17px; }

  .awards-wrap, .videos { grid-template-columns: 1fr; }
  .awards tbody th { width: 5em; }
  .awards th, .awards td { padding-right: 12px; }
  .news__item { grid-template-columns: 1fr; gap: 0; }
  .news__item + .news__item { margin-top: 24px; }
  .adm { grid-template-columns: 1fr; }
  .fold__t { font-size: 18px; }

  .year { padding: 56px 0 64px; }
  .year__num { font-size: 48px; }
  .year__ord { font-size: 22px; }
  .year__toggle { margin-top: 8px; }
  .year__body { margin-top: 36px; padding-top: 40px; }
  .prologue { margin-top: 96px; }

  .mentors { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 16px; }
  .mentor__zh { font-size: 19px; }
  .mentor__name { font-size: 16px; }
  .contact__email { font-size: clamp(18px, 6vw, 24px); }
  .section--band { --band-gap: 72px; padding: 64px 0 72px; }
  .opener { padding: 48px 0 56px; }
  .edition .opener + .wrap > .block:first-child, .edition .opener + .wrap > .intro { margin-top: 56px; }
  .hero { padding: 40px 0 56px; }
  .hero__logo { width: min(100%, 300px); }
  .hero__zh { font-size: 22px; margin-top: 14px; }
  .site-foot__in { flex-direction: column; align-items: flex-start; gap: 4px; }
  .site-foot__brand { margin-right: 0; }

  .dlg__in { padding: 0 20px 28px; }
  .dlg__title { font-size: 24px; }
}

/* partners between tablet and wide desktop: two columns are too narrow for logo beside name,
   so the logo sits above its name and each name gets the whole column */
@media (min-width: 961px) and (max-width: 1279px) {
  .org { grid-template-columns: 1fr; gap: 10px; padding: 16px 0; }
  .org__logo { min-height: 0; }
  .org__logo img { max-height: 56px; }
}

/* the school line needs the room: two TAs across on small phones where a school is shown */
@media (max-width: 480px) {
  .tas--org { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 20px; }
}

/* partners on phones: the logo sits above its name, so a wide mark keeps its full 240px */
@media (max-width: 600px) {
  .org { grid-template-columns: 1fr; gap: 10px; padding: 16px 0; }
  .org__logo { min-height: 0; }
  .org__logo img { max-width: min(240px, 100%); max-height: 56px; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
