/* =========================================================
   POMPEY PUNKS - cut-and-paste zine. One stylesheet, mobile first.
   In the spirit of Safety In Numbers and Sniffin' Glue:
   photocopied paper, ransom-note letters, tape, torn scraps.
   Change the colours here and they change everywhere.
   ========================================================= */

/* Fonts live on our own server - no Google tracking */
@font-face { font-family: "Anton"; src: url(/assets/fonts/anton-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Abril Fatface"; src: url(/assets/fonts/abril-fatface-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Cabin"; src: url(/assets/fonts/cabin-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Caveat"; src: url(/assets/fonts/caveat-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Special Elite"; src: url(/assets/fonts/special-elite-latin-400-normal.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url(/assets/fonts/atkinson-hyperlegible-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url(/assets/fonts/atkinson-hyperlegible-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url(/assets/fonts/atkinson-hyperlegible-latin-400-italic.woff2) format("woff2"); font-style: italic; font-display: swap; }

:root {
  --paper: #ece6d8;        /* photocopier paper */
  --sheet: #fbf8f0;        /* a fresh typed sheet */
  --news: #ddd5c3;         /* newsprint */
  --ink: #141414;          /* toner black */
  --ink-soft: #3a3a3a;
  --pink: #c8006a;         /* accent text - passes contrast on paper */
  --pink-bright: #ff2d95;
  --yellow: #ffe500;       /* highlighter, always with black text */
  --tape: rgba(240, 228, 170, .78);

  --display: "Anton", Impact, "Arial Narrow Bold", sans-serif;
  --news-type: "Abril Fatface", Georgia, "Times New Roman", serif;
  --type: "Special Elite", "Courier New", monospace;
  --hand: "Caveat", "Comic Sans MS", cursive;
  --body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 68rem;
  --gutter: 1rem;

  /* photocopier grain, drawn by the browser (no image to download) */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .08 0 0 0 0 .07 0 0 0 0 .05 .55 0 0 0 -.2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --halftone: radial-gradient(circle, rgba(0,0,0,.2) 1.1px, transparent 1.6px) 0 0 / 6px 6px;
  /* ragged edges for torn paper */
  --torn-bottom: polygon(0 0,100% 0,100% calc(100% - 6px),96% 100%,91% calc(100% - 5px),86% 100%,80% calc(100% - 7px),74% calc(100% - 1px),68% calc(100% - 6px),61% 100%,55% calc(100% - 4px),48% 100%,42% calc(100% - 7px),35% calc(100% - 2px),29% calc(100% - 6px),22% 100%,15% calc(100% - 5px),9% 100%,4% calc(100% - 6px),0 100%);
  --torn-both: polygon(0 4px,5% 0,11% 5px,18% 1px,25% 6px,33% 0,41% 4px,49% 0,57% 5px,64% 1px,72% 6px,80% 0,87% 5px,94% 1px,100% 4px,100% calc(100% - 5px),95% 100%,88% calc(100% - 4px),81% 100%,73% calc(100% - 6px),65% calc(100% - 1px),57% calc(100% - 5px),49% 100%,41% calc(100% - 6px),33% calc(100% - 1px),25% calc(100% - 5px),17% 100%,9% calc(100% - 4px),0 100%);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  font: 1.125rem/1.65 var(--body);
  background: var(--grain), radial-gradient(ellipse at 10% 0%, rgba(0,0,0,.06), transparent 55%), radial-gradient(ellipse at 100% 60%, rgba(0,0,0,.05), transparent 50%), var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--pink); text-underline-offset: .18em; text-decoration-thickness: 2px; }
a:hover { color: var(--ink); background: var(--yellow); }
:focus-visible { outline: 3px dashed var(--pink-bright); outline-offset: 3px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--yellow); color: var(--ink); padding: .75rem 1rem; z-index: 99; font-weight: 700; }
.skip:focus { left: 0; }

/* ---------- Ransom-note letters (cut from different papers) ---------- */
.ransom { display: inline; }
.r-w { display: inline-block; white-space: nowrap; margin: 0 .04em .12em 0; }
.r-sp { display: inline-block; width: .3em; }
.r { display: inline-block; line-height: 1; padding: .06em .1em .02em; margin: 0 .025em; box-shadow: 1px 1.5px 0 rgba(0,0,0,.28); }
.r0 { background: var(--ink); color: var(--paper); font-family: var(--display); }
.r1 { background: #fff; color: var(--ink); font-family: var(--news-type); }
.r2 { background: var(--yellow); color: var(--ink); font-family: var(--type); }
.r3 { background: var(--pink); color: #fff; font-family: var(--display); }
.r4 { background: var(--halftone), var(--news); color: var(--ink); font-family: var(--news-type); font-style: italic; }
.r5 { background: none; box-shadow: none; color: var(--ink); font-family: var(--hand); font-size: 1.2em; padding: 0 .02em; }
.r6 { background: #fff; color: var(--pink); font-family: var(--display); }
.r7 { background: var(--ink); color: var(--yellow); font-family: var(--news-type); }
.t0 { transform: rotate(-4deg); }
.t1 { transform: rotate(3deg) translateY(.04em); }
.t2 { transform: rotate(-1.5deg) translateY(-.03em); }
.t3 { transform: rotate(2deg) scale(1.06); }
.t4 { transform: none; }
.t5 { transform: rotate(-2.5deg) scale(.94); }

/* ---------- Tape & scraps ---------- */
.taped { position: relative; }
.taped::before { content: ""; position: absolute; top: -12px; left: 50%; width: 92px; height: 24px; margin-left: -46px; background: var(--tape); transform: rotate(-3deg); box-shadow: 0 1px 2px rgba(0,0,0,.12); z-index: 2; }

/* ---------- Masthead ---------- */
.masthead { background: var(--grain), var(--ink); color: var(--paper); position: sticky; top: 0; z-index: 10; padding-bottom: 6px; clip-path: var(--torn-bottom); }
.masthead__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.9rem; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--paper); padding: .35rem 0; }
.logo:hover { background: none; }
.logo img { width: 50px; height: auto; }
.logo__word { font-size: 1.25rem; }
.logo__word .r { box-shadow: none; }

.menu-toggle { font: 1rem var(--type); background: var(--yellow); color: var(--ink); border: 0; padding: .5rem .9rem; cursor: pointer; min-height: 44px; transform: rotate(2deg); box-shadow: 2px 2px 0 var(--pink-bright); }
.nav { flex-basis: 100%; display: none; }
.nav.is-open { display: block; max-height: calc(100vh - 5rem); max-height: calc(100dvh - 5rem); overflow-y: auto; }
.no-js .nav { display: block; }
.nav ul { list-style: none; margin: 0; padding: .25rem 0 1.25rem; display: grid; gap: .1rem; }
.nav a { display: block; color: var(--paper); text-decoration: none; padding: .6rem .25rem; font-family: var(--display); font-size: 1.5rem; letter-spacing: .03em; border-bottom: 1px dashed #444; }
.nav a:hover { color: var(--yellow); background: none; }
.nav a[aria-current="page"] { color: var(--ink); background: var(--yellow); display: inline-block; padding: .1rem .5rem; transform: rotate(-2deg); border: 0; margin: .3rem 0; }
@media (min-width: 60rem) {
  .menu-toggle { display: none; }
  .nav { display: block; flex-basis: auto; }
  .nav ul { display: flex; gap: .9rem; padding: 0; align-items: center; }
  .nav a { border: 0; font-size: 1.15rem; padding: .15rem .1rem; }
  .nav a[aria-current="page"] { margin: 0; padding: .05rem .4rem; }
}

/* ---------- Buttons: label-maker strips and stickers ---------- */
.btn { display: inline-block; font: 1.05rem/1.2 var(--type); letter-spacing: .04em; text-decoration: none; color: var(--paper); background: var(--ink); padding: .8rem 1.1rem .7rem; min-height: 44px; cursor: pointer; border: 0; box-shadow: 3px 3px 0 rgba(0,0,0,.3); transform: rotate(-1deg); transition: transform .1s; }
.btn:hover { background: var(--yellow); color: var(--ink); transform: rotate(1deg) scale(1.03); }
.btn--loud { background: var(--pink); color: #fff; }
.btn--loud:hover { background: var(--yellow); color: var(--ink); }
.tag { display: inline-block; font: .85rem var(--type); text-transform: uppercase; padding: .1rem .5rem; background: var(--yellow); color: var(--ink); transform: rotate(-3deg); box-shadow: 1px 1px 0 rgba(0,0,0,.3); }
.tag--tbc, .tag--provisional { background: var(--news); }
.kicker { font-family: var(--type); text-transform: uppercase; letter-spacing: .08em; font-size: .95rem; margin: 0 0 .75rem; color: var(--ink-soft); }
.kicker a { color: inherit; }

/* ---------- Hero ---------- */
.hero { background: var(--grain), var(--halftone), var(--ink); color: var(--paper); position: relative; overflow: hidden; padding-bottom: 14px; clip-path: var(--torn-bottom); }
.faces { height: 72px; background: url(/assets/img/faces-strip.jpg) 0 0 / auto 100% repeat-x; filter: grayscale(.5) contrast(1.15); position: relative; margin: 14px -10px 0; transform: rotate(-1deg); border-top: 5px solid #fff; border-bottom: 5px solid #fff; }
.faces--rev { background-position: -1080px 0; transform: rotate(.8deg); margin: 0 -10px 10px; }
.hero__inner { display: grid; gap: 1.5rem; padding-top: 2.25rem; padding-bottom: 2.25rem; align-items: center; }
.hero__logo { width: min(70vw, 300px); height: auto; margin: 0 auto; }
@media (min-width: 56rem) { .hero__inner { grid-template-columns: 340px 1fr; gap: 3rem; } .hero__logo { width: 100%; } }
.hero__stamp { display: inline-block; font-family: var(--type); border: 2px solid var(--pink-bright); color: var(--pink-bright); padding: .15rem .6rem; transform: rotate(-4deg); margin: 0 0 1.1rem; font-size: .95rem; text-transform: uppercase; letter-spacing: .06em; }
.hero__title { font-weight: 400; font-size: clamp(2.3rem, 9vw, 4.4rem); line-height: 1.15; margin: 0 0 1.1rem; }
.hero__ransom { display: block; }
.hero__title .hand { display: inline-block; font-family: "Cabin", "Gill Sans", "Gill Sans MT", sans-serif; font-weight: 400; color: var(--yellow); font-size: .75em; line-height: 1; transform: rotate(-3deg); margin-top: .15em; }
.hero__strap { display: inline; font-family: var(--type); color: var(--ink); background: var(--paper); font-size: clamp(1.1rem, 3.4vw, 1.35rem); line-height: 1.75; padding: .1rem .4rem; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.hero__strap-wrap { margin: 0 0 1.4rem; max-width: 34rem; transform: rotate(-.6deg); }
.hero__lede { max-width: 38rem; font-size: 1.08rem; margin: 0 0 1.6rem; }
.hero__lede strong { color: var(--yellow); }
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero__signoff blockquote { margin: 0 auto 2rem; max-width: 64rem; }
.hero__signoff blockquote { padding: 2rem 2.6rem; text-align: center; font-size: clamp(.88rem, 2.1vw, 1.12rem); }
.hero__signoff p { overflow-wrap: break-word; text-wrap: balance; }
.hero__more { color: var(--yellow); font-weight: 700; white-space: nowrap; }
.about-ransom { font-size: clamp(1.28rem, 4.8vw, 2.08rem); line-height: 1.2; margin: 0 0 1.2rem; }
.hero .btn:not(.btn--loud) { background: var(--paper); color: var(--ink); }

/* ---------- Latest post from the Facebook page ----------
   Deliberately looks like a Facebook post (blue frame, plain white card, plain type), not like the zine,
   so visitors can see it is copied from Facebook. */
.fbpost { max-width: 26rem; background: #fff; color: #1c1e21; border: 3px solid #1558c0; font-family: system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; font-size: 1rem; line-height: 1.4; }
.fbpost__head { display: flex; align-items: center; gap: .5rem; background: #1558c0; color: #fff; padding: .55rem .8rem; }
.fbpost__head .fb-logo { background: #fff; border-radius: 5px; }
.fbpost__page { font-weight: 700; }
.fbpost__on { opacity: .95; }
.fbpost__body { padding: .7rem .8rem .5rem; }
.fbpost__date { margin: 0 0 .5rem; color: #4b4f56; font-size: .9rem; }
.fbpost__body p { margin: 0 0 .6rem; overflow-wrap: anywhere; }
.fbpost__more summary { cursor: pointer; color: #1558c0; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.fbpost__body:has(details[open]) .fbpost__preview { display: none; }
.fbpost__pics { display: grid; gap: 2px; background: #fff; }
.fbpost__pics img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fbpost__pics--1 img { max-height: 16rem; height: auto; }
.fbpost__pics--2 { grid-template-columns: 1fr 1fr; aspect-ratio: 4 / 3; }
.fbpost__pics--3 { grid-template-columns: 1fr 1fr; grid-template-rows: 1.4fr 1fr; aspect-ratio: 1 / 1; }
.fbpost__pics--3 img:first-child { grid-column: 1 / -1; }
.fbpost__pics--4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 1 / 1; }
.fbpost__foot { padding: .7rem .8rem .8rem; border-top: 1px solid #ced0d4; }
.fbpost__btn { display: flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; background: #1558c0; color: #fff; font-weight: 700; text-decoration: none; padding: .5rem .8rem; border-radius: 6px; }
.fbpost__btn:hover, .fbpost__btn:focus-visible { background: #0e3f8a; color: #fff; }
.fbpost__hint { margin: .4rem 0 0; color: #4b4f56; font-size: .85rem; text-align: center; }

/* ---------- Next event: a flyer stuck to the wall ---------- */
.next-event { margin-top: 2.5rem; }
.next-event__card { background: var(--grain), var(--sheet); border: 3px solid var(--ink); padding: 1.6rem 1.4rem 1.4rem; transform: rotate(-1deg); position: relative; box-shadow: 6px 7px 0 rgba(0,0,0,.18); }
.next-event__card::before, .next-event__card::after { content: ""; position: absolute; width: 80px; height: 22px; background: var(--tape); top: -11px; }
.next-event__card::before { left: 18px; transform: rotate(-8deg); }
.next-event__card::after { right: 18px; transform: rotate(7deg); }
.next-event__card .kicker { display: inline-block; background: var(--pink); color: #fff; padding: .1rem .5rem; transform: rotate(-2deg); }
.next-event__card h2 { font-family: var(--display); font-weight: 400; font-size: clamp(1.8rem, 6vw, 2.7rem); line-height: 1.05; margin: .4rem 0 .6rem; }
.next-event__card h2 a { color: var(--ink); text-decoration: none; }
.next-event__card h2 a:hover { background: var(--yellow); }
.next-event__when { font-family: var(--type); margin: 0 0 .75rem; }
.countdown { display: inline-block; font-family: var(--hand); font-weight: 700; font-size: 1.7rem; color: var(--pink); margin: 0 0 1rem; transform: rotate(-2deg); }
.countdown:empty { display: none; }

/* ---------- Tiles: scraps of different papers ---------- */
.grid-3 { display: grid; gap: 2rem 1.5rem; margin: 3.5rem auto; }
@media (min-width: 48rem) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.tile { display: block; text-decoration: none; color: var(--ink); padding: 1.5rem 1.25rem 1.6rem; position: relative; clip-path: var(--torn-both); }
.tile:nth-child(1) { background: var(--grain), var(--sheet); transform: rotate(-1.2deg); }
.tile:nth-child(2) { background: var(--grain), repeating-linear-gradient(transparent 0 27px, rgba(60,90,160,.25) 27px 28px), #fffef6; transform: rotate(.8deg); }
.tile:nth-child(3) { background: var(--grain), var(--halftone), var(--news); transform: rotate(-.5deg); }
.tile:hover { background: var(--yellow); color: var(--ink); }
.tile__num { font-family: var(--hand); font-weight: 700; color: var(--pink); font-size: 1.6rem; }
.tile h2 { font-family: var(--display); font-weight: 400; font-size: 2.1rem; margin: .1rem 0 .5rem; line-height: 1; }
.tile p { margin: 0; }

/* ---------- Section titles: a strip cut from a headline ---------- */
.section-title { display: inline-block; font-family: var(--display); font-weight: 400; font-size: 1.9rem; line-height: 1.1; margin: 2.75rem 0 1.1rem; padding: .3rem .8rem .2rem; background: var(--ink); color: var(--paper); transform: rotate(-1.5deg); clip-path: var(--torn-both); }

/* ---------- Lists ---------- */
.post-list, .event-list, .archive-list, .memorial-list { list-style: none; margin: 0; padding: 0; }
.post-list__item { background: var(--grain), var(--sheet); padding: 1.1rem 1.2rem; margin: 0 0 1.1rem; box-shadow: 3px 4px 0 rgba(0,0,0,.12); }
.post-list__item:nth-child(even) { transform: rotate(.5deg); }
.post-list__item:nth-child(odd) { transform: rotate(-.4deg); }
.post-list__item time { font-family: var(--type); font-size: .95rem; color: var(--ink-soft); }
.post-list__item { display: flex; gap: 1rem; align-items: flex-start; }
.post-list__body { flex: 1; min-width: 0; }
.post-list__thumb { flex: none; width: 5rem; height: 5rem; object-fit: cover; background: var(--paper); border: 2px solid var(--ink); padding: 0; }
.post-list__thumb--logo { object-fit: contain; padding: .35rem; }
@media (min-width: 40rem) { .post-list__thumb { width: 6rem; height: 6rem; } }
.post-list__item h2, .post-list__item h3 { margin: .2rem 0 .3rem; font-family: var(--news-type); font-weight: 400; font-size: 1.5rem; line-height: 1.2; }
.post-list__item h2 a, .post-list__item h3 a { color: var(--ink); }
.post-list__item p { margin: 0; }
.more { font-family: var(--type); font-weight: 700; }

.event-list__item { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem 1.1rem; margin-bottom: 1rem; background: var(--grain), var(--sheet); border-left: 6px dashed var(--ink); }
.event-list__item h3 { margin: 0 0 .2rem; font-family: var(--news-type); font-weight: 400; font-size: 1.4rem; line-height: 1.2; }
.event-list__item h3 a { color: var(--ink); }
.event-list__item p { margin: 0 0 .4rem; font-family: var(--type); }
.datebox { flex: none; width: 4.4rem; height: 4.4rem; display: grid; place-items: center; background: var(--pink); color: #fff; font-family: var(--display); text-align: center; line-height: 1; font-size: 1.1rem; transform: rotate(-4deg); border-radius: 50%; box-shadow: 2px 2px 0 var(--ink); }
.event-list--past .event-list__item { filter: grayscale(1); }

.archive-list { display: grid; gap: 1.6rem 1.2rem; margin: .5rem 0 2rem; }
@media (min-width: 40rem) { .archive-list { grid-template-columns: 1fr 1fr; } }
.archive-list__item { position: relative; }
.archive-list__item:nth-child(odd) { transform: rotate(-.8deg); }
.archive-list__item:nth-child(even) { transform: rotate(.7deg); }
.archive-list__item::before { content: ""; position: absolute; top: -10px; left: 50%; width: 76px; height: 20px; margin-left: -38px; background: var(--tape); transform: rotate(-4deg); z-index: 2; }
.archive-list__item a { display: grid; gap: .3rem; text-decoration: none; color: var(--ink); background: var(--grain), #fff; padding: 1.2rem 1rem 1rem; height: 100%; box-shadow: 3px 4px 0 rgba(0,0,0,.15); }
.archive-list__item a:hover { background: var(--yellow); }
.archive-list__src { font-family: var(--type); font-size: .9rem; color: var(--pink); }
.archive-list__title { font-family: var(--news-type); font-size: 1.35rem; line-height: 1.2; }
.archive-list__by { font-family: var(--hand); font-weight: 700; font-size: 1.25rem; color: var(--ink-soft); }

/* ---------- Pages ---------- */
.page { padding-top: 2.25rem; padding-bottom: 2rem; }
.page__head { max-width: 48rem; margin-bottom: 1.75rem; }
.page__title { font-weight: 400; font-size: clamp(2.2rem, 8vw, 3.9rem); line-height: 1.15; margin: 0 0 1rem; }
.lede { font-family: var(--type); font-size: 1.2rem; line-height: 1.55; margin: 0; }
.credit { display: inline-block; font-family: var(--hand); font-weight: 700; font-size: 1.5rem; color: var(--pink); margin-top: .6rem; transform: rotate(-1.5deg); }
.credit--mixed { font-family: "Cabin", "Gill Sans", "Gill Sans MT", sans-serif; font-weight: 400; font-size: 1.15rem; line-height: 1.2; }

/* the typed sheet the words sit on */
.prose { max-width: 44rem; background: var(--grain), var(--sheet); padding: 1.6rem 1.3rem 1.4rem; position: relative; box-shadow: 4px 5px 0 rgba(0,0,0,.12); transform: rotate(-.25deg); }
.prose::before { content: ""; position: absolute; top: -12px; left: 1.5rem; width: 90px; height: 24px; background: var(--tape); transform: rotate(-5deg); }
@media (min-width: 40rem) { .prose { padding: 2rem 2.2rem 1.8rem; } }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-family: var(--display); font-weight: 400; font-size: 1.9rem; line-height: 1.05; margin: 2rem 0 .7rem; display: inline-block; background: var(--yellow); padding: .1rem .45rem; transform: rotate(-1deg); }
.prose h3 { font-family: var(--news-type); font-weight: 400; font-size: 1.4rem; margin: 1.5rem 0 .4rem; }
.prose li { margin-bottom: .35rem; }
.prose blockquote { margin: 1.5rem 0; padding: 1rem 1.2rem; background: var(--halftone), var(--news); font-family: var(--type); border-left: 6px solid var(--pink); }
.prose blockquote p { margin: 0 0 .5rem; }
.prose blockquote p:last-child { margin: 0; }
.prose img { background: #fff; padding: 10px 10px 34px; box-shadow: 3px 4px 0 rgba(0,0,0,.18); margin: 1.75rem auto; transform: rotate(-1.5deg); }
.prose p:nth-of-type(even) img { transform: rotate(1.2deg); }
.prose em:only-child { color: var(--ink-soft); }
.hero-img { margin: 0 0 1.75rem; width: fit-content; max-width: min(100%, 52rem); background: #fff; padding: 10px 10px 12px; box-shadow: 3px 4px 0 rgba(0,0,0,.18); transform: rotate(-1deg); }
.hero-img img { display: block; width: auto; height: auto; max-width: 100%; max-height: 80vh; }
.hero-img figcaption, .source-note { font-family: var(--type); font-size: .9rem; color: var(--ink-soft); margin-top: .6rem; }
.source-note { max-width: 44rem; margin-top: 1.5rem; }

/* gig-ticket facts */
.event__facts { display: grid; max-width: 44rem; margin: 0 0 1.75rem; padding: 1rem 1.3rem; background: var(--yellow); position: relative; transform: rotate(.6deg); border: 2px dashed var(--ink); font-family: var(--type); }
.event__facts div { display: grid; grid-template-columns: 5.5rem 1fr; gap: .5rem; padding: .35rem 0; border-bottom: 1px dotted var(--ink); }
.event__facts div:last-child { border: 0; }
.event__facts dt { text-transform: uppercase; font-size: .9rem; padding-top: .1rem; }
.event__facts dd { margin: 0; }

/* post-it with a staple */
.notice { background: #fff47a; padding: 1.4rem 1.3rem 1.2rem; max-width: 44rem; margin: 2.5rem 0; transform: rotate(-.8deg); box-shadow: 3px 5px 0 rgba(0,0,0,.14); position: relative; }
.notice::before { content: ""; position: absolute; top: 10px; left: 50%; width: 34px; height: 4px; margin-left: -17px; background: #888; border-radius: 2px; box-shadow: 0 1px 0 #555; }
.notice h2 { margin: .4rem 0 .5rem; font-family: var(--hand); font-weight: 700; font-size: 1.9rem; }

/* newspaper clipping */
.manifesto blockquote { margin: 3rem auto; max-width: 52rem; padding: 2rem 1.6rem; background: var(--grain), var(--halftone), var(--news); color: var(--ink); font-family: var(--news-type); font-size: clamp(1.35rem, 3.6vw, 1.85rem); line-height: 1.35; transform: rotate(.6deg); clip-path: var(--torn-both); }
.manifesto p { margin: 0; }

/* ---------- Remembered: deliberately quiet - no tilt, no cut-outs ---------- */
.remembered .page__title { font-family: var(--news-type); font-size: clamp(2.2rem, 7vw, 3.2rem); }
.remembered .prose, .remembered .prose::before { transform: none; }
.memorial-list { display: grid; gap: 1rem; margin: 2rem 0; }
@media (min-width: 40rem) { .memorial-list { grid-template-columns: 1fr 1fr; } }
.memorial { background: var(--sheet); border: 1px solid var(--ink); padding: 1.25rem; }
.memorial__name { font-family: var(--news-type); font-weight: 400; font-size: 1.6rem; margin: 0; }
.memorial__name a { color: var(--ink); }
.memorial__aka { font-family: var(--hand); font-weight: 700; font-size: 1.4rem; margin: .2rem 0 0; }
.memorial__years { color: var(--ink-soft); margin: .2rem 0 0; }
.memorial__words { margin: .75rem 0 0; }
.memorial-empty { font-family: var(--type); margin: 2rem 0; }

/* ---------- Map ---------- */
.map-embed { aspect-ratio: 4/5; margin: 0 0 2rem; border: 4px solid var(--ink); }
@media (min-width: 48rem) { .map-embed { aspect-ratio: 16/9; } }
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }
.map-placeholder { aspect-ratio: 16/9; display: grid; place-items: center; margin: 0 0 2.5rem; background: var(--grain), var(--halftone), var(--news); clip-path: var(--torn-both); }
.map-placeholder p { font-family: var(--display); font-size: clamp(1.5rem, 6vw, 2.5rem); background: var(--ink); color: var(--yellow); padding: .3rem .9rem; transform: rotate(-4deg); margin: 0; }
.venue-list { columns: 2 12rem; column-gap: 1.5rem; padding-left: 1.1rem; font-family: var(--type); }
.venue-list li { break-inside: avoid; }

/* ---------- Family-tree name lists ---------- */
.tree p { font-family: var(--type); font-size: 1.05rem; line-height: 1.9; }
.tree h3 { font-family: var(--hand); font-weight: 700; font-size: 1.8rem; color: var(--pink); margin: 1rem 0 0; }

/* ---------- Share bar: badges ---------- */
.share { margin: 3rem 0 1rem; max-width: 46rem; }
.share__label { font-family: var(--hand); font-weight: 700; font-size: 2rem; margin: 0 0 .5rem; transform: rotate(-2deg); display: inline-block; }
.share__buttons { display: flex; flex-wrap: wrap; gap: .6rem; }
.share__link { display: inline-flex; align-items: center; min-height: 44px; padding: .4rem .9rem; border: 2px solid var(--ink); background: var(--sheet); color: var(--ink); text-decoration: none; font: .95rem var(--type); cursor: pointer; border-radius: 999px; }
.share__link:nth-child(odd) { transform: rotate(-2deg); }
.share__link:nth-child(even) { transform: rotate(1.5deg); }
.share__link:hover { background: var(--yellow); }
.share__native { border-radius: 999px; }
.share__status { font-family: var(--type); min-height: 1.5em; margin: .5rem 0 0; }

/* ---------- Footer ---------- */
.footer { background: var(--grain), var(--ink); color: var(--paper); margin-top: 3rem; padding: 3rem 0 2.5rem; clip-path: polygon(0 10px,6% 2px,13% 9px,21% 0,29% 8px,37% 3px,45% 10px,53% 1px,61% 8px,69% 2px,77% 9px,85% 0,92% 8px,100% 3px,100% 100%,0 100%); }
.footer a { color: var(--yellow); }
.footer a:hover { color: var(--ink); }
.footer__line { font-family: var(--type); font-size: 1.1rem; margin: 0 0 1rem; max-width: 36rem; }
.footer__links { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; font-family: var(--type); }
.footer__small { font-size: .9rem; opacity: .85; margin: 0; }

/* ---------- Motion, print ---------- */
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print {
  .masthead, .share, .footer, .hero__actions { display: none; }
  body { background: #fff; }
  .prose { box-shadow: none; transform: none; }
}

/* Cut-out letters on the dark header and hero: swap the black scraps for paper ones */
.hero .r0, .masthead .r0 { background: var(--paper); color: var(--ink); }
.hero .r5, .masthead .r5 { color: var(--yellow); }
.hero .r7, .masthead .r7 { background: #fff; color: var(--pink); }

/* =========================================================
   TIMELINE
   ========================================================= */
.hint { font-family: var(--type); font-size: .95rem; color: var(--ink-soft); margin: 0 0 .75rem; }

/* year bar chart - every bar is a link */
.yearbars { margin: .5rem 0 2rem; padding: .4rem 0 .2rem; max-width: 100%; }
.yearbars ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; align-items: flex-end; }
.yearbars li { flex: 1 1 0; min-width: 0; }
.yearbars a { display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: var(--ink); height: 130px; justify-content: flex-end; }
.yearbars a:hover { background: none; }
.yearbars__bar { display: block; width: 100%; height: calc(var(--h) * 1px + 6px); background: var(--grain), var(--ink); transition: background .1s; }
.yearbars a:hover .yearbars__bar, .yearbars a:focus-visible .yearbars__bar { background: var(--pink); }
.yearbars a[aria-current="page"] .yearbars__bar { background: var(--pink); }
.yearbars a[aria-current="page"] .yearbars__yr { background: var(--yellow); }
.yearbars__yr { font-family: var(--type); font-size: .72rem; padding: 0 1px; white-space: nowrap; }
@media (max-width: 40rem) { .yearbars li:nth-child(even):not(:last-child) .yearbars__yr { visibility: hidden; } .yearbars a[aria-current="page"] .yearbars__yr { visibility: visible !important; } }

/* the spine: a taped-down strip with moments pinned along it */
.spine { list-style: none; margin: 1.5rem 0 2rem; padding: 0 0 0 1.4rem; position: relative; max-width: 50rem; }
.spine::before { content: ""; position: absolute; left: .35rem; top: 0; bottom: 0; width: 4px; background: repeating-linear-gradient(var(--ink) 0 14px, transparent 14px 20px); }
.entry { position: relative; margin: 0 0 1.6rem; }
.entry::before { content: ""; position: absolute; left: -1.45rem; top: 1.1rem; width: 16px; height: 16px; border-radius: 50%; background: var(--paper); border: 3px solid var(--ink); }
.entry--hl::before { background: var(--pink); border-color: var(--pink); width: 20px; height: 20px; left: -1.55rem; }
.entry__meta { display: flex; flex-wrap: wrap; gap: .35rem .7rem; align-items: center; margin-bottom: .35rem; }
.entry__meta time { font-family: var(--type); background: var(--ink); color: var(--paper); padding: .1rem .45rem; font-size: .9rem; transform: rotate(-1.5deg); display: inline-block; }
.entry__cat { font-family: var(--type); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.entry--scene .entry__cat { color: var(--pink); }
.entry__body { background: var(--grain), var(--sheet); padding: 1rem 1.1rem .8rem; box-shadow: 3px 4px 0 rgba(0,0,0,.12); }
.entry:nth-child(odd) .entry__body { transform: rotate(-.3deg); }
.entry:nth-child(even) .entry__body { transform: rotate(.25deg); }
.entry--hl .entry__body { border: 3px solid var(--ink); background: var(--grain), #fff; }
.entry__head { font-family: var(--display); font-weight: 400; font-size: 1.6rem; line-height: 1.1; margin: 0 0 .5rem; }
.entry__text p { margin: 0 0 .6rem; overflow-wrap: anywhere; }
.post-link { font-family: var(--type); font-size: .9rem; }
.entry__pics { list-style: none; margin: .6rem 0 .3rem; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.entry__pics a { display: block; background: #fff; padding: 6px 6px 18px; box-shadow: 2px 3px 0 rgba(0,0,0,.18); transform: rotate(-1.5deg); }
.entry__pics li:nth-child(even) a { transform: rotate(1.5deg); }
.entry__pics a:hover { background: var(--yellow); }
.entry__pics img { width: auto; height: 130px; max-width: 240px; object-fit: cover; }
.entry__src { font-family: var(--type); font-size: .8rem; color: var(--ink-soft); margin: .4rem 0 0; }
.entry__perma { text-decoration: none; }
.entry[hidden] { display: none; }

.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 .5rem; }
.chip { font: .95rem var(--type); min-height: 44px; padding: .35rem .9rem; border: 2px solid var(--ink); background: var(--sheet); color: var(--ink); cursor: pointer; border-radius: 999px; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--yellow); }
.chip:hover { background: var(--yellow); color: var(--ink); }
.filters__status { font-family: var(--type); font-size: .9rem; min-height: 1.4em; margin: 0; }
.yearnav { display: flex; justify-content: space-between; gap: 1rem; margin: 2rem 0; max-width: 50rem; }

.tl-search__form label { display: block; font-family: var(--type); margin-bottom: .4rem; }
.tl-search__row input { width: 100%; max-width: 32rem; font: 1.1rem var(--body); padding: .7rem .9rem; border: 3px solid var(--ink); background: #fff; min-height: 48px; }
.tl-search__row input:focus { outline: 3px dashed var(--pink-bright); outline-offset: 2px; }
.tl-search__status { font-family: var(--type); min-height: 1.4em; }
.tl-search__results { list-style: none; padding: 0; margin: 0 0 1rem; max-width: 46rem; display: grid; gap: .5rem; }
.tl-search__results a { display: flex; gap: .7rem; align-items: center; background: var(--sheet); padding: .5rem .7rem; text-decoration: none; color: var(--ink); box-shadow: 2px 2px 0 rgba(0,0,0,.12); }
.tl-search__results a:hover { background: var(--yellow); }
.tl-search__results img { width: 56px; height: 56px; object-fit: cover; flex: none; }
.tl-search__results time { font-family: var(--type); color: var(--pink); margin-right: .3rem; }

/* =========================================================
   PHOTOS
   ========================================================= */
.albums { list-style: none; margin: 1rem 0 2rem; padding: 0; display: grid; gap: 2rem 1.4rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.albums__item a { display: grid; gap: .25rem; text-decoration: none; color: var(--ink); background: #fff; padding: 10px 10px 14px; box-shadow: 3px 4px 0 rgba(0,0,0,.18); position: relative; }
.albums__item:nth-child(3n+1) a { transform: rotate(-1.4deg); }
.albums__item:nth-child(3n+2) a { transform: rotate(1deg); }
.albums__item:nth-child(3n) a { transform: rotate(-.4deg); }
.albums__item a::before { content: ""; position: absolute; top: -10px; left: 50%; width: 70px; height: 20px; margin-left: -35px; background: var(--tape); transform: rotate(-4deg); z-index: 1; }
.albums__item a:hover { background: var(--yellow); }
.albums__pic { display: block; aspect-ratio: 1; background: var(--halftone), var(--news); overflow: hidden; }
.albums__pic img { width: 100%; height: 100%; object-fit: cover; filter: contrast(1.05); }
.albums__title { font-family: var(--display); font-size: 1.35rem; line-height: 1.1; margin-top: .4rem; }
.albums__meta { font-family: var(--type); font-size: .85rem; color: var(--ink-soft); }
.albums__credit { font-family: var(--hand); font-weight: 700; font-size: 1.15rem; color: var(--pink); line-height: 1.15; }

.gallery { list-style: none; margin: 1rem 0 2rem; padding: 0; display: grid; gap: 1.4rem 1rem; grid-template-columns: repeat(auto-fill, minmax(min(46%, 11rem), 1fr)); }
.gallery__item a { display: block; background: #fff; padding: 8px 8px 22px; box-shadow: 2px 3px 0 rgba(0,0,0,.18); }
.gallery__item:nth-child(4n+1) a { transform: rotate(-1.5deg); }
.gallery__item:nth-child(4n+2) a { transform: rotate(1deg); }
.gallery__item:nth-child(4n+3) a { transform: rotate(-.5deg); }
.gallery__item:nth-child(4n) a { transform: rotate(1.6deg); }
.gallery__item a:hover { background: var(--yellow); transform: rotate(0) scale(1.03); }
.gallery__item img { width: 100%; aspect-ratio: 1; object-fit: cover; height: auto; }
.gallery__cap { font-family: var(--hand); font-weight: 700; font-size: 1.1rem; line-height: 1.15; margin: .4rem .2rem 0; overflow-wrap: anywhere; }

.videos { list-style: none; padding: 0; margin: 1rem 0 2rem; display: grid; gap: 2rem; max-width: 46rem; }
.videos__item { background: #fff; padding: 10px; box-shadow: 3px 4px 0 rgba(0,0,0,.18); }
.videos__item video { width: 100%; display: block; background: var(--ink); aspect-ratio: 16/9; }
.videos__cap { font-family: var(--type); margin: .6rem .2rem 0; }
.videos__cap span { color: var(--ink-soft); font-size: .9rem; }

/* the viewer */
.lightbox { border: 0; padding: 0; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; background: rgba(12,12,12,.94); }
.lightbox::backdrop { background: rgba(10,10,10,.92); }
.lightbox__fig { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3.5rem 1rem 4.5rem; box-sizing: border-box; }
.lightbox__img { max-width: 100%; max-height: calc(100vh - 11rem); object-fit: contain; background: #fff; padding: 8px; box-shadow: 0 6px 30px rgba(0,0,0,.5); }
.lightbox__cap { color: var(--paper); font-family: var(--type); max-width: 44rem; text-align: center; margin-top: .9rem; line-height: 1.45; }
.lightbox__count { position: fixed; top: .9rem; left: 1rem; margin: 0; color: var(--yellow); font-family: var(--type); }
.lightbox__btn { position: fixed; min-width: 48px; min-height: 48px; font-size: 1.4rem; border: 0; cursor: pointer; background: var(--yellow); color: var(--ink); box-shadow: 2px 2px 0 var(--pink-bright); }
.lightbox__btn:hover { background: var(--pink-bright); color: #fff; }
.lightbox__close { top: .6rem; right: .8rem; }
.lightbox__prev { bottom: 1rem; left: 1rem; }
.lightbox__next { bottom: 1rem; right: 1rem; }

/* =========================================================
   HOME: from the timeline
   ========================================================= */
.tl-home { margin: 3rem auto; }
.tl-home__grid { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 1.6rem 1.2rem; }
@media (min-width: 48rem) { .tl-home__grid { grid-template-columns: repeat(3, 1fr); } }
.tl-home__card a { display: grid; gap: .3rem; height: 100%; text-decoration: none; color: var(--ink); background: var(--grain), #fff; padding: 10px 10px 14px; box-shadow: 3px 4px 0 rgba(0,0,0,.15); }
.tl-home__card:nth-child(odd) a { transform: rotate(-1deg); }
.tl-home__card:nth-child(even) a { transform: rotate(.8deg); }
.tl-home__card a:hover { background: var(--yellow); }
.tl-home__card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.tl-home__yr { font-family: var(--hand); font-weight: 700; font-size: 1.6rem; color: var(--pink); line-height: 1; }
.tl-home__head { font-family: var(--display); font-size: 1.35rem; line-height: 1.1; }
.otd { background: var(--yellow); padding: .9rem 1.1rem; max-width: 46rem; transform: rotate(-.6deg); box-shadow: 3px 3px 0 var(--ink); margin: 0 0 1.5rem; font-family: var(--type); }
.otd a { color: var(--ink); }
.otd__label { font-family: var(--hand); font-weight: 700; font-size: 1.4rem; display: block; }

@media (prefers-reduced-motion: reduce) {
  .entry__body, .entry__pics a, .albums__item a, .gallery__item a, .tl-home__card a { transform: none !important; }
}
.memorial__words { margin: .75rem 0 0; padding: 0 0 0 .8rem; border-left: 3px solid var(--ink); font-style: italic; }
.memorial__words p { margin: 0; }

/* ---------- Contact form ---------- */
.contact-form label { display: block; font-weight: 700; margin-bottom: .3rem; }
.contact-form input, .contact-form textarea { width: 100%; min-height: 44px; padding: .6rem .7rem; font: inherit; color: var(--ink); background: var(--sheet); border: 2px solid var(--ink); border-radius: 0; }
.contact-form textarea { min-height: 10rem; }
.contact-form input:focus-visible, .contact-form textarea:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.contact-form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Photos: pick of the past ---------- */
.pick__card { display: grid; gap: 1rem; text-decoration: none; color: var(--ink); background: #fff; padding: 12px; box-shadow: 4px 5px 0 rgba(0,0,0,.2); max-width: 44rem; transform: rotate(-.6deg); }
.pick__card:hover { background: var(--yellow); }
.pick__pic { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--halftone), var(--news); }
.pick__pic img { width: 100%; height: 100%; object-fit: cover; }
.pick__text { display: grid; gap: .25rem; align-content: center; }
.pick__title { font-family: var(--display); font-size: 1.8rem; line-height: 1.1; }
.pick__meta { font-family: var(--type); font-size: .9rem; color: var(--ink-soft); }
.pick__go { font-weight: 700; text-decoration: underline; margin-top: .4rem; }
@media (min-width: 40rem) { .pick__card { grid-template-columns: 1.2fr 1fr; } }

/* ---------- Photos: where an album came from ---------- */
.albums__src { display: flex; align-items: center; gap: .4rem; font-family: var(--type); font-size: .8rem; line-height: 1.2; color: var(--ink-soft); margin-top: .2rem; }
.fb-logo { flex: none; }
.albums__src[hidden] { display: none; }

/* ---------- Where a photo came from: small stamps ---------- */
.stamp { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; margin: .6rem 0 0; padding: .35rem .7rem; font-family: var(--type); font-size: .85rem; line-height: 1.3; color: var(--ink); background: var(--sheet); border: 2px dashed var(--ink); transform: rotate(-.8deg); }
.stamp a { color: var(--ink); font-weight: 700; }
.entry__fb { display: inline-flex; align-items: center; gap: .35rem; }
.lightbox__src { color: var(--paper); font-family: var(--type); font-size: .85rem; margin: .3rem 0 0; text-align: center; }
.lightbox__src a { color: var(--yellow); }
.lightbox__src[hidden] { display: none; }

/* ---------- Year-bar heights (one class per percent, so no inline styles are needed) ---------- */
.yh0{--h:0}.yh1{--h:1}.yh2{--h:2}.yh3{--h:3}.yh4{--h:4}.yh5{--h:5}.yh6{--h:6}.yh7{--h:7}.yh8{--h:8}.yh9{--h:9}.yh10{--h:10}.yh11{--h:11}.yh12{--h:12}.yh13{--h:13}.yh14{--h:14}.yh15{--h:15}.yh16{--h:16}.yh17{--h:17}.yh18{--h:18}.yh19{--h:19}.yh20{--h:20}.yh21{--h:21}.yh22{--h:22}.yh23{--h:23}.yh24{--h:24}.yh25{--h:25}.yh26{--h:26}.yh27{--h:27}.yh28{--h:28}.yh29{--h:29}.yh30{--h:30}.yh31{--h:31}.yh32{--h:32}.yh33{--h:33}.yh34{--h:34}.yh35{--h:35}.yh36{--h:36}.yh37{--h:37}.yh38{--h:38}.yh39{--h:39}.yh40{--h:40}.yh41{--h:41}.yh42{--h:42}.yh43{--h:43}.yh44{--h:44}.yh45{--h:45}.yh46{--h:46}.yh47{--h:47}.yh48{--h:48}.yh49{--h:49}.yh50{--h:50}.yh51{--h:51}.yh52{--h:52}.yh53{--h:53}.yh54{--h:54}.yh55{--h:55}.yh56{--h:56}.yh57{--h:57}.yh58{--h:58}.yh59{--h:59}.yh60{--h:60}.yh61{--h:61}.yh62{--h:62}.yh63{--h:63}.yh64{--h:64}.yh65{--h:65}.yh66{--h:66}.yh67{--h:67}.yh68{--h:68}.yh69{--h:69}.yh70{--h:70}.yh71{--h:71}.yh72{--h:72}.yh73{--h:73}.yh74{--h:74}.yh75{--h:75}.yh76{--h:76}.yh77{--h:77}.yh78{--h:78}.yh79{--h:79}.yh80{--h:80}.yh81{--h:81}.yh82{--h:82}.yh83{--h:83}.yh84{--h:84}.yh85{--h:85}.yh86{--h:86}.yh87{--h:87}.yh88{--h:88}.yh89{--h:89}.yh90{--h:90}.yh91{--h:91}.yh92{--h:92}.yh93{--h:93}.yh94{--h:94}.yh95{--h:95}.yh96{--h:96}.yh97{--h:97}.yh98{--h:98}.yh99{--h:99}.yh100{--h:100}

/* ---------- Footer privacy line ---------- */
.footer__privacy { margin: .8rem 0 0; font-family: var(--type); font-size: .95rem; }
.footer__privacy a { display: inline-block; padding: .55rem 0; color: inherit; font-weight: 700; }

/* =====================================================================
   Accessibility: the button, the panel, and what each choice does.
   Every choice is a class on <html>, set by early.js / a11y.js.
   ===================================================================== */
.a11y-btn { order: 1; font: 1rem var(--type); background: var(--paper); color: var(--ink); border: 2px solid var(--paper); padding: .4rem .8rem; min-height: 44px; cursor: pointer; display: inline-flex; align-items: center; gap: .45rem; }
.a11y-btn:hover { background: var(--yellow); border-color: var(--yellow); }
.a11y-btn__aa { font-family: var(--display); font-size: 1.15rem; letter-spacing: .03em; }
.menu-toggle { order: 1; }
.nav { order: 2; }
@media (min-width: 60rem) { .nav { order: 0; } }

.a11y-panel { position: fixed; top: 4.6rem; right: .75rem; z-index: 30; width: min(25rem, calc(100vw - 1.5rem)); max-height: calc(100vh - 5.5rem); overflow-y: auto; padding: 1rem 1.1rem 1.1rem; background: var(--sheet); color: var(--ink); border: 3px solid var(--ink); box-shadow: 5px 6px 0 rgba(0,0,0,.35); }
.a11y-panel[hidden] { display: none; }
.a11y-panel h2 { margin: 0 0 .6rem; font: 400 1.6rem/1.1 var(--display); }
.a11y-panel fieldset { border: 0; margin: 0 0 .8rem; padding: 0; }
.a11y-panel legend { padding: 0; font: 700 1rem var(--body); margin-bottom: .2rem; }
.a11y-opt { display: flex; align-items: center; gap: .6rem; min-height: 44px; padding: .2rem 0; cursor: pointer; }
.a11y-opt input { width: 1.4rem; height: 1.4rem; flex: none; accent-color: var(--ink); }
.a11y-panel__row { display: flex; flex-wrap: wrap; gap: .6rem; margin: .4rem 0 .8rem; }
.a11y-panel__note { margin: 0; font-size: .9rem; line-height: 1.45; color: var(--ink-soft); }

/* Text size: everything on the site is in rem, so this scales the lot */
html.a11y-size-1 { font-size: 112.5%; }
html.a11y-size-2 { font-size: 125%; }
html.a11y-size-3 { font-size: 150%; }

/* Space between lines, words and letters (WCAG 1.4.12) */
html.a11y-spacing body, html.a11y-spacing body * { line-height: 1.8 !important; letter-spacing: .1em !important; word-spacing: .16em !important; }
html.a11y-spacing p { margin-bottom: 1.6em; }

html.a11y-underline a { text-decoration: underline !important; text-decoration-thickness: 2px !important; }

/* Plain headings: show the real words instead of the cut-out letters */
html.a11y-plain .ransom > [aria-hidden="true"], html.a11y-hc .ransom > [aria-hidden="true"], html.a11y-dark .ransom > [aria-hidden="true"] { display: none !important; }
html.a11y-plain .ransom > .vh, html.a11y-hc .ransom > .vh, html.a11y-dark .ransom > .vh { position: static !important; width: auto !important; height: auto !important; overflow: visible !important; clip: auto !important; clip-path: none !important; white-space: normal !important; }

/* Straight: no tilting or torn edges, nothing moves */
html.a11y-straight *, html.a11y-hc *, html.a11y-dark * { transform: none !important; transition: none !important; animation: none !important; }
html.a11y-straight .masthead, html.a11y-straight .hero, html.a11y-straight .section-title, html.a11y-straight .tile, html.a11y-hc *, html.a11y-dark * { clip-path: none !important; }

/* High contrast: black on white. Plain blocks of colour, no textures, every link underlined. */
html.a11y-hc *:not(img):not(video), html.a11y-hc *::before, html.a11y-hc *::after { background-image: none !important; text-shadow: none !important; box-shadow: none !important; }
html.a11y-hc, html.a11y-hc body, html.a11y-hc :where(*:not(img):not(video):not(svg):not(path):not(rect)) { background-color: #fff !important; color: #000 !important; border-color: #000 !important; }
html.a11y-hc a { color: #00008b !important; text-decoration: underline !important; }
html.a11y-hc a:hover, html.a11y-hc a:hover * { background-color: #ffe500 !important; color: #000 !important; }
html.a11y-hc .btn, html.a11y-hc button, html.a11y-hc input, html.a11y-hc textarea { border: 2px solid #000 !important; }
html.a11y-hc :focus-visible { outline: 4px solid #000 !important; outline-offset: 3px; }

/* High contrast: yellow on black */
html.a11y-dark *:not(img):not(video), html.a11y-dark *::before, html.a11y-dark *::after { background-image: none !important; text-shadow: none !important; box-shadow: none !important; }
html.a11y-dark, html.a11y-dark body, html.a11y-dark :where(*:not(img):not(video):not(svg):not(path):not(rect)) { background-color: #000 !important; color: #fff !important; border-color: #fff !important; }
html.a11y-dark a, html.a11y-dark a * { color: #ffe500 !important; text-decoration: underline !important; }
html.a11y-dark a:hover, html.a11y-dark a:hover * { background-color: #ffe500 !important; color: #000 !important; }
html.a11y-dark .btn, html.a11y-dark button, html.a11y-dark input, html.a11y-dark textarea { border: 2px solid #fff !important; }
html.a11y-dark :focus-visible { outline: 4px solid #ffe500 !important; outline-offset: 3px; }

/* Phones: the Accessibility button shrinks to "Aa" (its name is still read out) so logo, Aa and Menu share one row.
   Bigger text: the header stops sticking, so it can't take over the screen. */
.a11y-btn__label { margin-left: .45rem; }
@media (max-width: 39.99rem) {
  .a11y-btn { padding: .4rem .6rem; }
  .a11y-btn__label { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  .masthead__inner { flex-wrap: wrap; gap: .5rem; }
  .logo { margin-right: auto; }
  .logo__word { font-size: 1.05rem; }
}
html.a11y-size-2 .masthead, html.a11y-size-3 .masthead { position: static; }
@media (max-width: 29.99rem) {
  .logo { gap: .35rem; }
  .logo img { width: 40px; }
  .logo__word { font-size: .9rem; }
  .menu-toggle { padding: .5rem .65rem; }
  .masthead__inner { gap: .4rem; }
}

/* Plain headings also covers the mixed-case lettering: show the real spelling instead */
html.a11y-plain .mixed > [aria-hidden="true"], html.a11y-hc .mixed > [aria-hidden="true"], html.a11y-dark .mixed > [aria-hidden="true"] { display: none !important; }
html.a11y-plain .mixed > .vh, html.a11y-hc .mixed > .vh, html.a11y-dark .mixed > .vh { position: static !important; width: auto !important; height: auto !important; overflow: visible !important; clip: auto !important; clip-path: none !important; white-space: normal !important; }
