/* ---------- Fonts, served from this site ---------- */
/*
 * Fraunces and Inter used to be fetched from Google on every page load,
 * which meant every visitor's browser announced itself to Google before
 * reading a word. These are the same files, downloaded once and kept here,
 * so nothing leaves the band's own server.
 *
 * Both are variable fonts, so one file covers every weight we use.
 * Only the latin and latin-ext subsets are kept - the Greek, Cyrillic and
 * Vietnamese ones Google also offers are no use to us.
 *
 * Both are licensed under the SIL Open Font License, which is kept beside
 * them in assets/fonts/. To re-download them, run refresh_fonts.py.
 */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url(../fonts/fraunces-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 600 700;
  font-display: swap;
  src: url(../fonts/fraunces-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(../fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(../fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Shanklin Town Brass Band — prototype stylesheet
   Colours are taken from the band uniform and crest: scarlet, black and gold. */

:root {
  --scarlet: #b3121b;
  --qavs-purple: #6c3275;
  --yc-blue: #1b4f9c;        /* Youth & Community Band */
  --yc-blue-dark: #153c77;
  --scarlet-dark: #8a0d14;
  --gold: #c9a227;
  --gold-soft: #f3e6b8;
  --ink: #1b1714;
  --ink-soft: #4a433d;
  --cream: #fbf7ef;
  --paper: #ffffff;
  --line: #e6dccb;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 72rem;
  --radius: 10px;
  --shadow: 0 1px 2px rgb(0 0 0 / .06), 0 8px 24px rgb(0 0 0 / .08);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font: 17px/1.6 var(--sans);
  color: var(--ink);
  background: var(--cream);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--scarlet); }
a:hover { color: var(--scarlet-dark); }

h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 1.25rem; }

.eyebrow {
  font: 600 .8rem/1 var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--scarlet);
  margin-bottom: .75rem;
}

/* ---------- Prototype banner & draft notes ---------- */

.proto-bar {
  background: var(--ink);
  color: #f5efe3;
  font-size: .85rem;
  padding: .45rem 0;
}
.proto-bar .wrap { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.proto-swatch {
  background: #fff3a8; color: var(--ink);
  padding: 0 .35em; border-radius: 3px; font-weight: 600;
}

/* Anything marked .todo is a note for the committee: text to confirm or supply. */
.todo {
  background: #fff3a8;
  outline: 2px dashed #d4a800;
  outline-offset: 2px;
  border-radius: 3px;
  padding: 0 .2em;
}
.todo::before { content: "✎ "; font-size: .85em; }

/* ---------- Header ---------- */

.site-header {
  background: var(--paper);
  border-bottom: 4px solid var(--scarlet);
  position: sticky; top: 0; z-index: 20;
}
.site-header .wrap { display: flex; align-items: center; gap: 1rem; min-height: 76px; }

.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand img { width: 60px; height: 60px; object-fit: contain; }
.brand strong { font-family: var(--serif); font-size: 1.2rem; line-height: 1.1; display: block; }
.brand small { color: var(--ink-soft); font-size: .8rem; }

.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; flex-wrap: wrap; }
.nav a {
  display: block; padding: .5rem .7rem; border-radius: 6px;
  text-decoration: none; color: var(--ink); font-weight: 500; font-size: .95rem;
}
.nav a:hover { background: var(--cream); }
.nav a[aria-current="page"] { color: var(--scarlet); box-shadow: inset 0 -2px 0 var(--scarlet); border-radius: 0; }

.menu-toggle {
  display: none; font: inherit; background: none; border: 2px solid var(--ink);
  border-radius: 6px; padding: .35rem .7rem; cursor: pointer;
}

@media (max-width: 960px) {
  .menu-toggle { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 4px solid var(--scarlet); }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; padding: .5rem 1.25rem 1rem; }
  .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--scarlet); }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block; font-weight: 600; text-decoration: none;
  padding: .75rem 1.3rem; border-radius: 999px; border: 2px solid transparent;
  transition: transform .1s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--scarlet); color: #fff; }
.btn-primary:hover { background: var(--scarlet-dark); color: #fff; }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: #b38e1c; color: var(--ink); }
.btn-ghost { border-color: currentColor; color: #fff; }
.btn-ghost:hover { background: rgb(255 255 255 / .12); color: #fff; }
.btn-outline { border-color: var(--scarlet); color: var(--scarlet); }
.btn-row { display: flex; gap: .75rem; flex-wrap: wrap; }

/* ---------- Hero ---------- */

.hero {
  position: relative; color: #fff;
  min-height: min(78vh, 640px);
  display: flex; align-items: flex-end;
  background: var(--ink) center 35% / cover no-repeat;
}
/* Readability over a photograph, done in two halves.

   The layers: a faint wash over the whole picture, just enough to keep the
   gold eyebrow off a bright sky, and then a scrim that starts at nothing
   and darkens towards the bottom. The band's faces in the upper half of the
   photograph keep their own light; only the strip the words sit on is
   darkened.

   The shadows: each letter also carries its own contrast, which catches
   whatever the scrim does not - a white shirt directly behind a thin
   stroke. Two shadows, because one soft one looks blurry and one hard one
   looks like 1998.

   Together these let the scrim stay lighter than it would have to be on its
   own, so less of the photograph is lost. */
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgb(20 14 10 / .06) 0%, rgb(20 14 10 / .16) 100%);
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0;
  height: min(64%, 430px);
  background: linear-gradient(180deg,
      rgb(20 14 10 / 0) 0%,
      rgb(20 14 10 / .46) 45%,
      rgb(20 14 10 / .84) 100%);
}
/* above both layers: a pseudo-element would otherwise paint over the text */
.hero .wrap { position: relative; z-index: 1; padding-block: 4rem 3rem; width: 100%; }
.hero h1, .hero p.lead, .hero .eyebrow {
  text-shadow: 0 1px 2px rgb(10 7 4 / .55), 0 2px 10px rgb(10 7 4 / .45);
}
.hero p.lead { font-size: 1.2rem; max-width: 40rem; }
.hero .eyebrow { color: var(--gold); }

.page-hero { min-height: 340px; }

/* A page hero is 340px against the home page's 640, so it keeps a much
   narrower slice of the same photograph. On the 2026 band picture the
   default 35% showed heads and little else, and simply moving the window
   down traded the back row away for the bodies - the band spans about
   63% of the picture's height and the slice was narrower than that.

   So the slice is widened as well as moved: a little more height, and the
   window centred on the band rather than its top. Affects about.html and
   instruments.html, which share the photograph. */
.page-hero.hero-band-2026 {
  min-height: 420px;
  background-position-y: 50%;
}

/* ---------- Sections ---------- */

.section { padding-block: 4rem; }
.section-alt { background: var(--paper); }
.section-dark { background: var(--ink); color: #f5efe3; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark a:not(.btn) { color: var(--gold); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.section-head h2 { margin: 0; }

.prose { max-width: 44rem; }
.prose h2 { margin-top: 2rem; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; gap: 1.5rem; } }

/* ---------- Cards / tiles ---------- */

.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.card p:last-of-type { flex: 1; }
.card .icon { font-size: 1.75rem; line-height: 1; margin-bottom: .75rem; }
.card a.more { font-weight: 600; text-decoration: none; }
.card a.more::after { content: " →"; }

.photo-card { padding: 0; overflow: hidden; }
.photo-card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.photo-card .body { padding: 1.25rem 1.5rem 1.5rem; display: flex; flex-direction: column; flex: 1; }

/* ---------- Events ---------- */

.events { display: grid; gap: 1rem; }
.event {
  display: grid; grid-template-columns: 5.6rem 1fr auto; gap: 1.25rem; align-items: center;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.25rem; box-shadow: var(--shadow);
}
.event .date {
  text-align: center; background: var(--scarlet); color: #fff; border-radius: 8px;
  padding: .5rem .25rem .45rem; font-family: var(--serif); line-height: 1.05;
}
.event .date.band-senior { background: var(--scarlet); }
.event .date.band-yc     { background: var(--yc-blue); }
.event .date.band-all    { background: var(--gold); color: var(--ink); }
.event .date.band-all .b { border-top-color: rgb(0 0 0 / .25); }
.event .date .d { font-size: 1.9rem; font-weight: 700; display: block; }
.event .date .m { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; display: block; }
.event .date .b {
  display: block; margin-top: .35rem; padding-top: .3rem;
  border-top: 1px solid rgb(255 255 255 / .35);
  font: 600 .55rem/1.2 var(--sans); letter-spacing: .07em;
  text-transform: uppercase; opacity: .95;
}
.event h3 { margin: 0 0 .2rem; font-size: 1.15rem; }
.event .meta { color: var(--ink-soft); font-size: .95rem; margin: 0; }
.event .tag { font-size: .75rem; font-weight: 600; background: var(--gold-soft); color: var(--ink); border-radius: 999px; padding: .15rem .6rem; margin-left: .4rem; vertical-align: middle; }
.event.past { opacity: .7; box-shadow: none; }
.event.past { opacity: .85; }
@media (max-width: 600px) {
  .event { grid-template-columns: 4.6rem 1fr; }
  .event .actions { grid-column: 1 / -1; }
}
.empty { background: var(--paper); border: 1px dashed var(--line); border-radius: var(--radius); padding: 1.5rem; }

/* ---------- Stats / badges ---------- */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1rem; margin-top: 2rem; }
.stat { border-left: 3px solid var(--gold); padding-left: 1rem; }
.stat b { font-family: var(--serif); font-size: 2rem; display: block; color: #fff; }

/* ---------- Timeline ---------- */

.timeline { list-style: none; padding: 0; margin: 0; border-left: 3px solid var(--gold); }
.timeline li { position: relative; padding: 0 0 1.5rem 1.5rem; }
.timeline li::before {
  content: ""; position: absolute; left: -9px; top: .35rem; width: 15px; height: 15px;
  border-radius: 50%; background: var(--scarlet); border: 3px solid var(--cream);
}
.timeline b { font-family: var(--serif); color: var(--scarlet); font-size: 1.1rem; display: block; }

/* ---------- Forms ---------- */

form.form { display: grid; gap: 1rem; max-width: 40rem; }
.form label { font-weight: 600; font-size: .95rem; display: grid; gap: .35rem; }
.form input, .form select, .form textarea {
  font: inherit; padding: .7rem .8rem; border: 1px solid #cfc4b1; border-radius: 8px; background: #fff; width: 100%;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 3px solid var(--gold-soft); border-color: var(--gold); }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .form .row { grid-template-columns: 1fr; } }
.form-note { font-size: .9rem; color: var(--ink-soft); }

/* "Or just email us" above the enquiry form, for people who would rather
   not fill a form in. The envelope is drawn rather than an emoji because
   there is no red envelope emoji that means email - the red one is a
   lunar new year money packet. */
.mailto-line { margin: -.4rem 0 1.4rem; }
.mailto-line a {
  display: inline-flex; align-items: center; gap: .45rem;
  font-weight: 600; text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.mailto-line a:hover { border-bottom-color: var(--scarlet); }
.mailto-line svg { flex: none; }
@media (max-width: 420px) {
  .mailto-line a { font-size: .92rem; }
}

/* ---------- Misc ---------- */

.callout {
  background: var(--scarlet); color: #fff; border-radius: var(--radius);
  padding: 2rem; display: flex; gap: 1.5rem; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.callout h2 { color: #fff; margin: 0 0 .25rem; }
.callout p { margin: 0; opacity: .95; }

.gallery { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); }
.gallery img { aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; width: 100%; }

/* A denser gallery for a run of small, dated photographs — Malcolm's page.
   Smaller than .gallery so about fifteen read as one sequence rather than
   fifteen separate pictures. Two up on a phone, four or five on a desktop. */
.gallery-dated { display: grid; gap: 1rem .9rem; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); }
.gallery-dated figure { margin: 0; }
.gallery-dated img { aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; width: 100%; display: block; }
.gallery-dated figcaption { font-size: .8rem; line-height: 1.35; color: var(--ink-soft); margin-top: .4rem; }
.gallery-dated figcaption b { display: block; color: var(--scarlet); font-family: var(--serif); font-size: .9rem; font-weight: 700; }
@media (max-width: 420px) { .gallery-dated { grid-template-columns: repeat(2, 1fr); } }

.sponsors { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.sponsor-slot {
  width: 150px; height: 80px; border: 2px dashed #cfc4b1; border-radius: 8px;
  display: grid; place-items: center; color: var(--ink-soft); font-size: .8rem; text-align: center; background: #fff;
}

/* The committee page's summary of what has changed. Row headings on the
   left, because the eye scans for the page name first. */
table.changes { width: 100%; border-collapse: collapse; margin-top: 1.25rem; }
table.changes th, table.changes td {
  text-align: left; vertical-align: top;
  padding: .75rem .9rem .75rem 0;
  border-top: 1px solid var(--line);
}
table.changes th { width: 11rem; font-weight: 600; white-space: nowrap; }
table.changes td { color: var(--ink-soft); }
@media (max-width: 600px) {
  table.changes, table.changes tbody, table.changes tr,
  table.changes th, table.changes td { display: block; width: auto; }
  table.changes th { border-top: 1px solid var(--line); padding-bottom: .15rem; white-space: normal; }
  table.changes td { border-top: 0; padding-top: 0; }
}

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.25rem; margin: 0; }
dl.facts dt { font-weight: 600; }
dl.facts dd { margin: 0; }

/* ---------- Footer ---------- */

.site-footer { background: var(--ink); color: #d9d0c1; padding-block: 3rem 1.5rem; font-size: .95rem; }
.site-footer a { color: #f5efe3; }
.site-footer h3 { color: #fff; font-size: 1.05rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.footer-grid {
  display: grid; gap: 2rem;
  /* the first column carries the crest, the band name, a three-line
     address and the award, so it needs a floor as well as a share —
     without the minmax it is squeezed and "Brass Band" drops a line */
  grid-template-columns: minmax(20rem, 1.8fr) 1fr 1fr 1fr;
}
/* below this the four columns cannot all be comfortable at once:
   drop to two rather than squeeze the first one again */
@media (max-width: 980px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand { display: flex; gap: 1rem; align-items: flex-start; }
.footer-brand h3 { text-wrap: balance; margin-bottom: .35rem; }
.footer-brand img { width: 64px; background: #fff; border-radius: 50%; padding: 2px; }
.footer-award { display: flex; gap: .75rem; align-items: center; margin-top: 1rem; }
.footer-award img { width: 64px; background: #fff; border-radius: 6px; padding: 4px; }
/* The caption wraps in the narrow footer column. Holding each half together
   makes it break after "Award" rather than mid-phrase, while still sitting on
   one line where there is room. */
.footer-award .nw { white-space: nowrap; }
.footer-bottom { border-top: 1px solid #3a332d; margin-top: 2rem; padding-top: 1.25rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: .85rem; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Two people sharing one photo ---------- */

.duo-card { padding: 0; overflow: hidden; }
.duo-card > img { width: 100%; display: block; object-fit: cover; }
.duo-card figcaption { padding: .75rem 1.5rem 0; }
.duo {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1.75rem; padding: 1.5rem;
}
.duo > div + div { border-left: 1px solid var(--line); padding-left: 1.75rem; }
.duo h3 { margin-bottom: .25rem; }
@media (max-width: 700px) {
  .duo { grid-template-columns: 1fr; gap: 1.25rem; }
  .duo > div + div {
    border-left: 0; padding-left: 0;
    border-top: 1px solid var(--line); padding-top: 1.25rem;
  }
}

/* Musical Directors: one row — a single portrait beside a shared-photo panel */
.md-row { display: grid; grid-template-columns: 1fr 1.9fr; gap: 1.25rem; align-items: start; }
.md-photo { width: 100%; height: 230px; object-fit: cover; display: block; }
@media (max-width: 900px) {
  .md-row { grid-template-columns: 1fr; }
  .md-photo { height: 260px; }
}

/* ---------- Long read: Our story so far ---------- */

.read { max-width: 42rem; margin-inline: auto; }
.read p { font-size: 1.06rem; line-height: 1.75; }
.read > img, .read figure { margin-block: 2rem; }

.era {
  max-width: 42rem; margin: 4rem auto 1.5rem;
  padding-top: 2rem; border-top: 3px solid var(--gold);
}
.era .years {
  font: 600 .8rem/1 var(--sans); letter-spacing: .14em;
  text-transform: uppercase; color: var(--scarlet); margin: 0 0 .5rem;
}
.era h2 { margin: 0; font-size: clamp(1.5rem, 3.4vw, 2.1rem); }

.pull {
  max-width: 42rem; margin: 2.25rem auto; padding: 0 0 0 1.4rem;
  border-left: 4px solid var(--gold);
  font-family: var(--serif); font-size: 1.22rem; line-height: 1.5;
}
.pull cite {
  display: block; margin-top: .6rem;
  font: 500 .9rem/1.4 var(--sans); font-style: normal; color: var(--ink-soft);
}

figure.shot { margin: 2.25rem auto; max-width: 52rem; }
figure.shot img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
figure.shot figcaption {
  font-size: .88rem; color: var(--ink-soft);
  margin-top: .6rem; text-align: center;
}
figure.shot.narrow { max-width: 32rem; }

.read .aside {
  background: var(--paper); border: 1px solid var(--line);
  border-left: 4px solid var(--scarlet); border-radius: var(--radius);
  padding: 1.25rem 1.4rem; margin: 2rem auto; box-shadow: var(--shadow);
}
.read .aside h3 { margin-bottom: .4rem; font-size: 1.05rem; }
.read .aside p:last-child { margin-bottom: 0; }
.read .aside ul { margin: .4rem 0 0; padding-left: 1.1rem; font-size: .95rem; }

.chapters {
  max-width: 42rem; margin: 2rem auto 0; padding: 1.25rem 1.4rem;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
}
.chapters ol { margin: .5rem 0 0; padding-left: 1.2rem; columns: 2; column-gap: 2rem; font-size: .95rem; }
.chapters a { text-decoration: none; }
.chapters a:hover { text-decoration: underline; }
@media (max-width: 620px) { .chapters ol { columns: 1; } }

/* ---------- Section sub-navigation ---------- */

.subnav {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 76px; z-index: 15;
}
.subnav .wrap {
  display: flex; align-items: baseline; gap: .9rem;
  flex-wrap: wrap; padding-block: .6rem;
}
.subnav-label {
  font: 600 .72rem/1 var(--sans); letter-spacing: .13em;
  text-transform: uppercase; color: var(--ink-soft);
  padding-right: .3rem; border-right: 1px solid var(--line);
}
.subnav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: .2rem .4rem;
}
.subnav a {
  display: block; padding: .3rem .65rem; border-radius: 999px;
  text-decoration: none; color: var(--ink);
  font-size: .9rem; font-weight: 500; white-space: nowrap;
}
.subnav a:hover { background: var(--cream); color: var(--scarlet); }
.subnav a[aria-current="page"] {
  background: var(--scarlet); color: #fff;
}

/* parent menu item, when you are on one of its sub-pages */
.nav a.in-section { color: var(--scarlet); box-shadow: inset 0 -2px 0 var(--gold); border-radius: 0; }

@media (max-width: 960px) {
  .subnav { position: static; }
  .subnav .wrap { gap: .5rem; padding-block: .55rem; }
  .subnav-label { width: 100%; border-right: 0; padding-right: 0; }
  .nav a.in-section { box-shadow: inset 3px 0 0 var(--gold); }
}
@media (max-width: 420px) {
  .subnav a { font-size: .85rem; padding: .28rem .55rem; }
}

.btn-blue { background: var(--yc-blue); color: #fff; }
.btn-blue:hover { background: var(--yc-blue-dark); color: #fff; }

/* Small marks beside an event's date, and a charity credit */
.ev-icon {
  display: inline-flex; vertical-align: -.22em;
  margin-right: .4rem; color: var(--scarlet);
}
.event .date.band-yc ~ div .ev-icon { color: var(--yc-blue); }
/* these two carry their own meaning, so they keep their own colour */
.ev-icon-tree,
.event .date.band-yc ~ div .ev-icon-tree { color: #1f7a3d; }
.ev-icon-trophy,
.event .date.band-yc ~ div .ev-icon-trophy { color: #8d9199; }
.charity-line { font-weight: 500; }
.charity-line a { text-decoration: none; border-bottom: 1px solid currentColor; }

/* ---------- Click a photograph to see it properly ---------- */

.zoomable { cursor: zoom-in; }
.zoomable:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgb(12 9 7 / .94);
  display: flex; align-items: center; justify-content: center;
  padding: clamp(.75rem, 3vw, 2.5rem);
  padding-top: max(clamp(.75rem, 3vw, 2.5rem), env(safe-area-inset-top, 0px));
  padding-bottom: max(clamp(.75rem, 3vw, 2.5rem), env(safe-area-inset-bottom, 0px));
  overscroll-behavior: contain;
  animation: lb-in .14s ease-out;
}
@keyframes lb-in { from { opacity: 0 } to { opacity: 1 } }

.lightbox figure {
  margin: 0; max-width: 100%; max-height: 100%;
  display: flex; flex-direction: column; align-items: center; gap: .9rem;
}
.lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 9rem);
  width: auto; height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgb(0 0 0 / .6);
}
.lightbox figcaption {
  color: #e8e0d2; font-size: .92rem; line-height: 1.45;
  text-align: center; max-width: 42rem;
}
.lightbox figcaption .todo { background: none; outline: 0; color: #c9a227; }
.lightbox figcaption .todo::before { content: none; }

.lightbox-close {
  position: absolute; top: max(.5rem, env(safe-area-inset-top, 0px)); right: .75rem;
  width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%;
  background: rgb(255 255 255 / .14); color: #fff;
  font-size: 1.9rem; line-height: 1; cursor: pointer;
}
.lightbox-close:hover { background: rgb(255 255 255 / .26); }
.lightbox-close:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

@media (max-width: 700px) {
  .lightbox img { max-height: calc(100vh - 11rem); }
  .lightbox figcaption { font-size: .85rem; }
}

/* A whole card that is a link: keep the button looking like a button */
.card .btn { align-self: flex-start; margin-top: .9rem; }
a.card:hover .btn-primary { background: var(--scarlet-dark); }

/* The timeline when it doubles as the story's contents */
.chapters .timeline { columns: 1; margin: 0; padding-left: 0; border-left: 3px solid var(--gold); }
.tl-nav li { padding-bottom: 1.1rem; font-size: .95rem; }
.tl-nav b { font-size: 1rem; }
.tl-nav a {
  display: inline-block; margin-left: .35rem; white-space: nowrap;
  font-size: .82rem; font-weight: 600; text-decoration: none;
  border-bottom: 1px solid currentColor;
}
@media (max-width: 620px) { .tl-nav li { font-size: .9rem; } }

/* The committee link in the draft bar — deliberately not a site colour,
   so it reads as part of the draft apparatus rather than the website. */
.proto-actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.proto-link {
  background: var(--yc-blue); color: #fff; text-decoration: none;
  font-weight: 600; font-size: .82rem;
  padding: .25rem .8rem; border-radius: 999px; white-space: nowrap;
}
.proto-link:hover { background: #2a66bd; color: #fff; }

/* Named supporters, where we have a name but not yet a logo */
.supporters { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.supporters li {
  background: var(--paper); border: 1px solid var(--line);
  border-left: 4px solid var(--gold); border-radius: var(--radius);
  padding: .9rem 1.1rem;
  display: flex; align-items: center; gap: 1rem;
}
/* Each supporter's logo sits in its own box beside its name rather than in
   a separate strip above the list. A fixed box with object-fit keeps a wide
   logo and a tall one the same visual weight. */
.supporters li > img {
  flex: none; width: 92px; height: 64px;
  object-fit: contain; object-position: center;
}
.supporters .supporter-logo-slot {
  flex: none; width: 92px; height: 64px;
  border: 2px dashed #cfc4b1; border-radius: 6px;
  display: grid; place-items: center; text-align: center;
  color: var(--ink-soft); font-size: .72rem; line-height: 1.2;
}
@media (max-width: 420px) {
  .supporters li { gap: .75rem; }
  .supporters li > img, .supporters .supporter-logo-slot { width: 68px; height: 50px; }
}
.supporters a { font-weight: 600; text-decoration: none; font-size: 1.05rem; }
.supporters a:hover { text-decoration: underline; }
.supporters span { display: block; color: var(--ink-soft); font-size: .9rem; margin-top: .15rem; }

/* A sponsor's own logo */
.sponsor {
  display: grid; place-items: center;
  width: 200px; min-height: 80px; padding: .5rem .75rem;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
}
.sponsor img { max-width: 100%; height: auto; }
.sponsor:hover { border-color: var(--gold); }
.sponsor-tall { width: 120px; min-height: 110px; }
.sponsor-tall img { max-height: 100px; width: auto; }

/* Music notation example */
.score {
  max-width: 42rem; margin: 2rem auto; padding: 1.5rem 1.25rem 1rem;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  color: var(--ink);
}
.score svg { width: 100%; height: auto; display: block; }
.score figcaption {
  text-align: center; font-size: .88rem; color: var(--ink-soft); margin-top: .75rem;
}
.read h3 { margin-top: 2rem; font-size: 1.1rem; color: var(--scarlet); }
.read ul { margin: .5rem 0 0; padding-left: 1.2rem; }
.read ul li { margin-bottom: .45rem; line-height: 1.6; }

/* A hero photograph can be opened full size too */
.hero-zoomable { cursor: zoom-in; }
.hero-zoomable .wrap { cursor: auto; }

/* Note shapes drawn beside their description */
.notelist { list-style: none; padding-left: 0; margin-top: 1rem; }
.notelist li {
  display: flex; align-items: center; gap: 1rem;
  padding: .7rem 0; border-bottom: 1px solid var(--line);
}
.notelist li:last-child { border-bottom: 0; }
.notelist .glyph { flex: 0 0 46px; height: 58px; color: var(--ink); }
.notelist span { flex: 1; }

/* Percussion instrument drawings */
.perc-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 1rem; max-width: 42rem; margin: 1.75rem auto;
}
.perc-grid figure {
  margin: 0; padding: 1rem .5rem .75rem; text-align: center;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--scarlet);
}
.perc-grid svg { width: 100%; max-width: 90px; height: auto; display: block; margin: 0 auto; }
.perc-grid figcaption {
  margin-top: .6rem; font-size: .82rem; font-weight: 600; color: var(--ink);
}


/* ---- small chronological photo gallery (Malcolm's page) ---- */
.yearshots {
  display: grid; gap: 1.1rem;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  margin: 2rem 0 0;
}
.yearshots figure { margin: 0; }
.yearshots img {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: var(--radius); display: block; background: #e8e1d4;
}
.yearshots figcaption {
  margin-top: .45rem; font-size: .82rem; line-height: 1.35; color: var(--muted);
}
.yearshots .yr {
  display: block; font-weight: 600; color: var(--scarlet);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 700px) {
  .yearshots { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .9rem; }
}

/* ---- the animated stave ---- */
.karaoke svg { width: 100%; height: auto; color: var(--ink); }
.karaoke .note ellipse,
.karaoke .note line,
.karaoke .note rect,
.karaoke .note circle { transition: fill .18s ease, stroke .18s ease; }
.karaoke .note.lit ellipse[fill="none"] { stroke: var(--scarlet); }
.karaoke .note.lit ellipse:not([fill="none"]),
.karaoke .note.lit rect,
.karaoke .note.lit circle { fill: var(--scarlet); }
.karaoke .note.lit line { stroke: var(--scarlet); }
.karaoke .lyric { transition: fill .18s ease; }
.karaoke .lyric.lit { fill: var(--scarlet); font-weight: 700; }
.karaoke .playhead { fill: var(--scarlet); opacity: 0; transition: opacity .25s ease; }
.karaoke.playing .playhead { opacity: .9; }
.karaoke .glow { fill: var(--scarlet); opacity: 0; transition: opacity .18s ease; }
.kbar { display: flex; justify-content: center; gap: .6rem; margin-top: 1rem; }
.kbtn {
  font: inherit; font-weight: 600; cursor: pointer;
  border: 0; border-radius: 999px; padding: .55rem 1.5rem;
  background: var(--scarlet); color: #fff;
}
.kbtn:hover { filter: brightness(1.08); }
@media (prefers-reduced-motion: reduce) {
  .karaoke .note ellipse, .karaoke .note line, .karaoke .note rect,
  .karaoke .note circle, .karaoke .lyric, .karaoke .playhead, .karaoke .glow { transition: none; }
}

/* ---- Queen's Award mark in the header ---- */

/* ---- site search (site map page) ---- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.searchbox { margin: 1.75rem 0 .5rem; }
.searchbox input {
  width: 100%; font: inherit; font-size: 1.05rem;
  padding: .85rem 1.1rem; border-radius: 999px;
  border: 2px solid #ddd3c2; background: #fff; color: var(--ink);
}
.searchbox input:focus { outline: 0; border-color: var(--scarlet); }
.searchbox .form-note { margin-top: .5rem; }
#results { margin-top: 1.25rem; }
#results .hit {
  border-top: 1px solid #e7dfd0; padding: .9rem 0;
}
#results .hit:first-child { border-top: 0; }
#results .hit a { text-decoration: none; font-weight: 600; font-size: 1.02rem; }
#results .hit a:hover { text-decoration: underline; }
#results .hit .where { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
#results .hit p { margin: .3rem 0 0; font-size: .92rem; color: #4a423a; line-height: 1.5; }
#results mark { background: #fff3a8; color: inherit; padding: 0 .1em; border-radius: 2px; }
#results .none { color: var(--muted); padding: 1rem 0; }

/* ---- search: header button and panel ---- */
.search-toggle {
  margin-left: auto; flex: 0 0 auto;
  width: 40px; height: 40px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid #ddd3c2; border-radius: 50%;
  color: var(--ink); cursor: pointer;
}
.search-toggle:hover { border-color: var(--scarlet); color: var(--scarlet); }
.search-toggle svg {
  width: 19px; height: 19px;
  fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round;
}
.site-header .nav { margin-left: 0; }

.search-panel {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(27, 23, 20, .45);
  backdrop-filter: blur(2px);
  display: flex; justify-content: center;
  padding: 0 1rem;
}
.search-panel[hidden] { display: none; }
.search-panel-inner {
  background: var(--cream); width: 100%; max-width: 44rem;
  align-self: flex-start; margin-top: 8vh;
  border-radius: var(--radius); padding: 1.4rem 1.5rem 1.6rem;
  box-shadow: 0 24px 60px rgba(0,0,0,.3);
  max-height: 80vh; overflow-y: auto;
}
.search-row { display: flex; gap: .6rem; align-items: center; }
.search-row input {
  flex: 1; font: inherit; font-size: 1.05rem;
  padding: .75rem 1.05rem; border-radius: 999px;
  border: 2px solid #ddd3c2; background: #fff; color: var(--ink);
}
.search-row input:focus { outline: 0; border-color: var(--scarlet); }
.search-row button {
  flex: 0 0 auto; width: 38px; height: 38px; font-size: 1.6rem; line-height: 1;
  background: transparent; border: 0; color: var(--muted); cursor: pointer;
}
.search-row button:hover { color: var(--scarlet); }
#sp-note { margin: .6rem 0 0; }
#sp-results { margin-top: .9rem; }
body.search-open { overflow: hidden; }

@media (max-width: 560px) {
  .search-panel-inner { margin-top: 4vh; padding: 1.1rem 1.1rem 1.3rem; max-height: 88vh; }
}

/* ---- header on a phone ----
   The band name was being squeezed into about 94px and breaking a word to a
   line. These free roughly 70px and remove two lines of height. Desktop is
   untouched. */
.menu-toggle svg { display: none; }
.menu-toggle .menu-word { display: inline; }

@media (max-width: 700px) {
  .site-header .wrap { min-height: 54px; gap: .5rem; padding-inline: .9rem;
                       padding-block: .3rem; }

  .brand { gap: .5rem; }
  .brand img { width: 44px; height: 44px; }
  .brand strong { font-size: 1rem; line-height: 1.05; }
  .brand small {
    display: block; font-size: .62rem; line-height: 1.1;
    margin-top: .1rem; letter-spacing: .01em;
  }
  .brand span { display: block; padding: 0; }


  .search-toggle { width: 36px; height: 36px; }
  .search-toggle svg { width: 17px; height: 17px; }

  .menu-toggle {
    width: 38px; height: 36px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .menu-toggle svg {
    display: block; width: 21px; height: 21px;
    fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round;
  }
  .menu-toggle .menu-word {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
  }
}

/* ---- Queen's Award: button in the header, and its overlay ---- */
.qavs-btn {
  background: none; border: 0; padding: 0; margin: 0 .85rem 0 0;
  cursor: pointer; flex: 0 0 auto; line-height: 0;
  border-radius: 4px;
}
.qavs-btn:hover { opacity: .78; }
.qavs-btn:focus-visible { outline: 2px solid var(--scarlet); outline-offset: 3px; }
.site-header .wrap > .qavs-btn > .qavs { height: 52px; width: auto; display: block; }

.qavs-inner { position: relative; max-width: 46rem; text-align: left; }

.qavs-inner p { font-size: .98rem; line-height: 1.65; margin-bottom: .9rem; }
.qavs-head {
  display: flex; align-items: center; gap: 1.1rem;
  margin: .3rem 0 1.1rem; padding-right: 2.2rem;
}
.qavs-head > div { min-width: 0; }
.qavs-head h2 { margin: 0 0 .1rem; font-size: 1.28rem; line-height: 1.15; text-wrap: balance;
                color: var(--qavs-purple); }
.qavs-sub {
  margin: 0 0 .25rem; font-family: var(--serif); font-style: italic;
  font-size: 1rem; color: var(--qavs-purple);
}
.qavs-head .form-note { margin: 0; }
.qavs-mark { height: 104px; width: auto; display: block; flex: 0 0 auto; }
.qavs-close {
  position: absolute; top: .4rem; right: .5rem;
  width: 38px; height: 38px; font-size: 1.7rem; line-height: 1;
  background: transparent; border: 0; color: var(--muted); cursor: pointer;
}
.qavs-close:hover { color: var(--scarlet); }
.qavs-shots {
  display: grid; grid-template-columns: 1fr 1fr; gap: .9rem;
  margin: 1.2rem 0;
}
.qavs-shots figure { margin: 0; }
.qavs-shots img { width: 100%; border-radius: var(--radius); display: block; }
.qavs-shots figcaption {
  font-size: .78rem; color: var(--muted); margin-top: .35rem; line-height: 1.35;
}

@media (max-width: 700px) {
  .qavs-btn { margin-right: .5rem; }
  .site-header .wrap > .qavs-btn > .qavs { height: 34px; }
  .qavs-shots { grid-template-columns: 1fr; gap: 1rem; }
  .qavs-head { gap: .8rem; padding-right: 1.8rem; }
  .qavs-head h2 { font-size: 1.05rem; }
  .qavs-sub { font-size: .88rem; }
  .qavs-mark { height: 76px; }
}

/* ---- anchor targets clear the sticky header ----
   Without this, jumping to #e5 puts the heading underneath the header bar and
   it looks as though you have landed in the section above. */
:target,
.era[id],
section[id],
h2[id], h3[id] {
  scroll-margin-top: 92px;
}
@media (max-width: 700px) {
  :target, .era[id], section[id], h2[id], h3[id] { scroll-margin-top: 66px; }
}

/* ---- sound toggle on the animated stave ---- */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
#k-mute {
  width: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--ink); border: 1px solid #cdc3b2;
}
#k-mute:hover { border-color: var(--scarlet); color: var(--scarlet); }
#k-mute svg {
  width: 20px; height: 20px;
  fill: none; stroke: currentColor; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round;
}
#k-mute svg path:first-child { fill: currentColor; stroke-width: 1.2; }
