/* =====================================================================
   edition.css — the monthly edition book.
   Extends styles.css; the only new colours are the three reading
   themes (the agreed exception, as in reader.css).
   ===================================================================== */

.book {
  --paper: #fbf8f1;
  --ink: #1f1d1a;
  --ink-soft: #5d5a55;
  --rule: rgba(31, 29, 26, 0.14);
  --accent: var(--main-2);
  --text-size: 1.25rem;
  --flow-font: var(--font-body);
  --turn: 0.72s cubic-bezier(0.77, 0, 0.18, 1);

  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  overscroll-behavior: none;
  touch-action: pan-y;
}
html:has(.book) { height: 100%; overflow: hidden; background: var(--main-1); }

.book[data-theme="sepia"] { --paper: #f3eadb; --ink: #3a2e22; --ink-soft: #7a6a55; --rule: rgba(58, 46, 34, 0.16); --accent: #8a4b1d; }
.book[data-theme="night"] { --paper: #121418; --ink: #dcd8d0; --ink-soft: #8f8b84; --rule: rgba(220, 216, 208, 0.14); --accent: #8fb4e8; }

.book[data-size="s"]  { --text-size: 1.0625rem; }
.book[data-size="m"]  { --text-size: 1.25rem; }
.book[data-size="l"]  { --text-size: 1.42rem; }
.book[data-size="xl"] { --text-size: 1.66rem; }
@media (max-width: 600px) {
  .book[data-size="s"]  { --text-size: 1rem; }
  .book[data-size="m"]  { --text-size: 1.125rem; }
  .book[data-size="l"]  { --text-size: 1.28rem; }
  .book[data-size="xl"] { --text-size: 1.45rem; }
}
.book[data-font="sans"] { --flow-font: var(--font-ui); }

.book-noscript { padding: 2rem; font-family: var(--font-ui); }

/* ---- stage and track ------------------------------------------------ */
.book-stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  cursor: default;
}
.book-track {
  display: flex;
  height: 100%;
  will-change: transform;
  transition: transform var(--turn);
  opacity: 0;
}
.book.is-ready .book-track { opacity: 1; transition: transform var(--turn), opacity 0.6s ease; }

.page {
  position: relative;
  flex: none;
  width: var(--book-w, 100vw);
  height: 100%;
  overflow: hidden;
  background: var(--paper);
}

/* ---- the cover ------------------------------------------------------- */
.page--cover { background: var(--main-1); color: var(--white); }
.cover-media, .opener-media { position: absolute; inset: 0; overflow: hidden; }
.cover-img, .opener-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.14);
  transition: transform 9s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.is-active .cover-img, .is-active .opener-img { transform: scale(1.02); }

.cover-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(13, 36, 68, 0.78) 0%, rgba(13, 36, 68, 0.18) 38%, rgba(13, 36, 68, 0.25) 55%, rgba(13, 36, 68, 0.92) 100%);
}
.cover-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: max(4.5rem, 9vh) clamp(1.4rem, 6vw, 5rem) max(3.5rem, 7vh);
  max-width: 1400px;
  margin-inline: auto;
}
.cover-edition {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-ui);
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-top: 1px solid rgba(255, 255, 255, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
  padding: 0.55rem 0;
}
.cover-masthead {
  margin-top: clamp(0.8rem, 2.5vh, 1.6rem);
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.02em;
  font-size: clamp(3.2rem, 11.5vw, 10rem);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.22em;
  padding-bottom: 0.2em;
}
.cover-the {
  flex-basis: 100%;
  padding-left: 2.3em;
  margin-bottom: -0.5em;
  font-size: 0.34em;
  font-style: italic;
  font-weight: 600;
  line-height: 1;
}
.cover-word { display: inline-block; }
.cover-strap {
  margin-top: 0.6rem;
  font-family: var(--font-body);
  font-style: italic;
  font-size: var(--fs-subheading);
  opacity: 0.92;
}
.cover-lead { margin-top: auto; max-width: 48rem; }
.cover-lead-kicker, .cover-line-kicker, .opener-kicker, .toc-kicker, .contents-eyebrow {
  font-family: var(--font-ui);
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.cover-lead-kicker { color: var(--sub-2); }
.cover-lead-title {
  margin-top: 0.4rem;
  color: var(--white);
  font-size: var(--fs-display);
  line-height: 1.08;
}
.cover-lead-title a, .cover-lines a { color: inherit; text-decoration: none; }
.cover-lead-title a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.cover-lines {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem 2rem;
  margin: clamp(1rem, 3vh, 2rem) 0 0;
  padding: 1.1rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.4);
  list-style: none;
}
.cover-lines a {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--fs-subheading);
  line-height: 1.25;
  font-weight: 600;
}
.cover-lines a:hover { text-decoration: underline; }
.cover-line-kicker { display: block; margin-bottom: 0.3rem; color: rgba(255, 255, 255, 0.72); font-size: var(--fs-small); }
.cover-begin {
  margin-top: clamp(1rem, 3vh, 2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-family: var(--font-ui);
  font-size: var(--fs-body);
  color: rgba(255, 255, 255, 0.85);
}
.cover-open {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: var(--tap);
  padding: 0.8rem 1.5rem;
  background: var(--white);
  color: var(--main-1);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: var(--fs-body);
  border-radius: var(--radius-pill);
  transition: transform var(--transition), box-shadow var(--transition);
}
.cover-open span { transition: transform var(--transition); }
.cover-open:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35); }
.cover-open:hover span { transform: translateX(4px); }
.cover-demo {
  position: absolute;
  z-index: 2;
  right: clamp(1.4rem, 6vw, 5rem);
  bottom: 0.9rem;
  font-family: var(--font-ui);
  font-size: var(--fs-small);
  color: rgba(255, 255, 255, 0.6);
}

/* Cover entrance */
.page--cover .cover-edition,
.page--cover .cover-strap,
.page--cover .cover-lead,
.page--cover .cover-lines li,
.page--cover .cover-begin { opacity: 0; transform: translateY(18px); }
.page--cover .cover-word, .page--cover .cover-the { opacity: 0; transform: translateY(0.35em); clip-path: inset(0 -0.3em 100% -0.3em); }
.page--cover.is-active .cover-edition,
.page--cover.is-active .cover-strap,
.page--cover.is-active .cover-lead,
.page--cover.is-active .cover-lines li,
.page--cover.is-active .cover-begin,
.page--cover.is-active .cover-word,
.page--cover.is-active .cover-the {
  opacity: 1;
  transform: none;
  clip-path: inset(-0.2em -0.3em -20% -0.3em);
  transition: opacity 0.9s ease, transform 1s cubic-bezier(0.2, 0.7, 0.2, 1), clip-path 1s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.page--cover.is-active .cover-edition { transition-delay: 0.15s; }
.page--cover.is-active .cover-the { transition-delay: 0.3s; }
.page--cover.is-active .cover-word:nth-of-type(2) { transition-delay: 0.42s; }
.page--cover.is-active .cover-word:nth-of-type(3) { transition-delay: 0.56s; }
.page--cover.is-active .cover-strap { transition-delay: 0.8s; }
.page--cover.is-active .cover-lead { transition-delay: 1s; }
.page--cover.is-active .cover-lines li { transition-delay: calc(1.15s + var(--i) * 0.12s); }
.page--cover.is-active .cover-begin { transition-delay: 1.6s; }

/* ---- contents --------------------------------------------------------- */
.page--contents { background: var(--paper); }
.contents-inner {
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr);
  gap: clamp(2rem, 6vw, 6rem);
  padding: max(5rem, 11vh) clamp(1.4rem, 7vw, 7rem) max(4.5rem, 10vh);
  max-width: 1500px;
  margin-inline: auto;
}
.contents-eyebrow { color: var(--accent); }
.contents-title {
  margin-top: 0.4rem;
  font-size: var(--fs-display);
  color: var(--ink);
  line-height: 1;
}
.contents-note {
  margin-top: 1.4rem;
  font-size: var(--fs-subheading);
  line-height: 1.7;
  max-width: 30rem;
}
.contents-sign { margin-top: 0.8rem; font-style: italic; color: var(--ink-soft); }
.contents-stats {
  display: flex;
  gap: 2.2rem;
  margin: 2.2rem 0 0;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
}
.contents-stats dt { font-family: var(--font-ui); font-size: var(--fs-small); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
.contents-stats dd { margin: 0; font-family: var(--font-heading); font-size: var(--fs-heading); font-weight: 700; line-height: 1.1; }
.toc {
  list-style: none;
  margin: 0;
  padding: 0 0.5rem 0 0;
  overflow-y: auto;
  align-self: start;
  max-height: 100%;
  border-top: 2px solid var(--ink);
  scrollbar-width: thin;
}
.toc li { border-bottom: 1px solid var(--rule); }
.toc-link {
  display: grid;
  grid-template-columns: 2.4rem 1fr auto;
  gap: 0.9rem;
  align-items: baseline;
  padding: 0.85rem 0;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.2s ease, padding 0.25s ease;
}
.toc-link:hover { padding-left: 0.5rem; }
.toc-link:hover .toc-title { color: var(--accent); }
.toc-num { font-family: var(--font-heading); font-size: var(--fs-subheading); color: var(--ink-soft); }
.toc-kicker { display: block; color: var(--ink-soft); font-size: var(--fs-small); margin-bottom: 0.2rem; }
.toc-title { display: block; font-family: var(--font-heading); font-size: var(--fs-subheading); line-height: 1.3; font-weight: 600; transition: color 0.2s ease; }
.toc-meta { font-family: var(--font-ui); font-size: var(--fs-small); color: var(--ink-soft); white-space: nowrap; }
.is-read .toc-num::after { content: " \2713"; color: var(--accent); font-size: 0.8em; }

.page--contents .contents-intro > *, .page--contents .toc li { opacity: 0; transform: translateY(14px); }
.page--contents.is-active .contents-intro > *,
.page--contents.is-active .toc li {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.page--contents.is-active .contents-intro > :nth-child(2) { transition-delay: 0.08s; }
.page--contents.is-active .contents-intro > :nth-child(3) { transition-delay: 0.16s; }
.page--contents.is-active .contents-intro > :nth-child(n+4) { transition-delay: 0.24s; }
.page--contents.is-active .toc li { transition-delay: calc(0.2s + var(--i) * 0.05s); }

/* ---- story opener ------------------------------------------------------ */
.page--opener { background: var(--main-1); color: var(--white); }
.opener-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(13, 36, 68, 0.82) 0%, rgba(13, 36, 68, 0.45) 45%, rgba(13, 36, 68, 0) 75%),
    linear-gradient(0deg, rgba(13, 36, 68, 0.85) 0%, rgba(13, 36, 68, 0) 55%);
}
.opener-inner {
  position: absolute;
  z-index: 2;
  left: clamp(1.4rem, 7vw, 7rem);
  right: clamp(1.4rem, 7vw, 7rem);
  bottom: max(5rem, 12vh);
  max-width: 50rem;
}
.opener-kicker { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; color: var(--sub-2); }
.opener-count {
  display: inline-grid;
  place-items: center;
  width: 2.1rem; height: 2.1rem;
  border: 1px solid rgba(255, 217, 138, 0.7);
  border-radius: 50%;
  font-size: var(--fs-small);
  letter-spacing: 0.02em;
}
.opener-dot { opacity: 0.6; margin-inline: 0.1rem; }
.opener-title {
  margin-top: 0.9rem;
  color: var(--white);
  font-size: var(--fs-display);
  line-height: 1.04;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.opener-standfirst {
  margin-top: 1.1rem;
  font-size: var(--fs-subheading);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.9);
  max-width: 40rem;
  text-wrap: pretty;
}
.opener-byline {
  margin-top: 1.3rem;
  font-family: var(--font-ui);
  font-size: var(--fs-small);
  color: rgba(255, 255, 255, 0.75);
}
.opener-byline strong { color: var(--white); }
.opener-caption {
  position: absolute;
  z-index: 2;
  right: clamp(1.4rem, 4vw, 3rem);
  top: max(4.6rem, 10vh);
  max-width: 18rem;
  font-family: var(--font-ui);
  font-size: var(--fs-small);
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.8);
  text-align: right;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.page--opener .opener-inner > *, .page--opener .opener-caption { opacity: 0; transform: translateY(22px); }
.page--opener.is-active .opener-inner > *,
.page--opener.is-active .opener-caption {
  opacity: 1;
  transform: none;
  transition: opacity 0.8s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.page--opener.is-active .opener-inner > :nth-child(1) { transition-delay: 0.25s; }
.page--opener.is-active .opener-inner > :nth-child(2) { transition-delay: 0.38s; }
.page--opener.is-active .opener-inner > :nth-child(3) { transition-delay: 0.52s; }
.page--opener.is-active .opener-inner > :nth-child(4) { transition-delay: 0.66s; }
.page--opener.is-active .opener-caption { transition-delay: 0.9s; }

/* ---- text pages ---------------------------------------------------------- */
.page--text { background: var(--paper); }
.flow {
  position: absolute;
  top: var(--book-top, 72px);
  left: var(--book-pad, 24px);
  column-count: var(--book-cols, 1);
  column-gap: var(--book-gap, 48px);
  column-fill: auto;
  font-family: var(--flow-font);
  font-size: var(--text-size);
  line-height: 1.62;
  color: var(--ink);
  hyphens: auto;
  -webkit-hyphens: auto;
  text-align: left;
  user-select: text;
  -webkit-user-select: text;
}
.flow-running {
  font-family: var(--font-ui);
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.2em;
}
.flow-p { margin: 0 0 0.9em; text-wrap: pretty; orphans: 2; widows: 2; }
.flow-p--first::first-letter {
  float: left;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 3.6em;
  line-height: 0.82;
  margin: 0.06em 0.1em 0 0;
  color: var(--accent);
}
.flow-h {
  font-family: var(--font-heading);
  font-size: 1.22em;
  line-height: 1.25;
  color: var(--ink);
  margin: 1.3em 0 0.55em;
  break-after: avoid;
  break-inside: avoid;
  hyphens: manual; /* "female" was splitting as "fe-male" (Mick, 30 Nov 2026) */
  -webkit-hyphens: manual;
}
.flow-pull, .columnist-title { hyphens: manual; -webkit-hyphens: manual; } /* display type, as in reader.css */
.flow-keep { break-inside: avoid; -webkit-column-break-inside: avoid; }
.flow-h--push { break-before: column; -webkit-column-break-before: always; }
.flow-quote {
  margin: 1.1em 0 1.2em;
  padding-left: 1em;
  border-left: 3px solid var(--accent);
  /* A long quote may run on to the next page like any paragraph: kept whole, it left most of a page blank (2 Dec 2026). */
  orphans: 2;
  widows: 2;
}
.flow-quote p { font-style: italic; white-space: pre-line; } /* verse and several-paragraph quotes */
.flow-quote cite {
  display: block;
  margin-top: 0.4em;
  font-family: var(--font-ui);
  font-style: normal;
  font-size: 0.72em;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}
.flow-pull {
  margin: 1em 0 1.1em;
  padding: 0.7em 0;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-heading);
  font-size: 1.32em;
  line-height: 1.28;
  font-weight: 600;
  color: var(--ink);
  break-inside: avoid;
}
.flow-list { margin: 0 0 1em; padding-left: 1.15em; }
.flow-list li { margin-bottom: 0.4em; padding-left: 0.2em; }
.flow-list li::marker { color: var(--accent); }
.flow-end { text-align: center; color: var(--accent); margin: 1.2em 0 0.6em; font-size: 0.9em; }
.flow-next {
  font-family: var(--font-ui);
  font-size: 0.78em;
  color: var(--ink-soft);
  text-align: center;
  break-inside: avoid;
}
.flow-next a { color: var(--accent); font-weight: 600; }
.flow-marker { display: inline-block; width: 1px; height: 1px; }

/* A spread gets a faint spine between its two pages. */
.is-spread .page--text {
  background-image: linear-gradient(90deg, transparent calc(50% - 0.5px), var(--rule) calc(50% - 0.5px), var(--rule) calc(50% + 0.5px), transparent calc(50% + 0.5px));
  background-size: var(--book-w) calc(100% - var(--book-top) - var(--book-bottom));
  background-position: 0 var(--book-top);
  background-repeat: repeat-x;
}

/* ---- full-page advert: edge to edge, the whole screen ------------------------- */
.page--ad { background: var(--white); }
.ad--page {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  background: var(--white);
  color: var(--black);
  border: 0;
  padding: 0;
  text-align: left;
}
.ad--page .ad-label { position: absolute; z-index: 2; top: max(4.2rem, 8vh); right: clamp(1.4rem, 5vw, 4rem); margin: 0; }
.adpage-photo { height: 100%; }
.adpage-inner {
  align-self: center;
  display: grid;
  justify-items: start;
  gap: 1rem;
  padding: max(5rem, 10vh) clamp(1.4rem, 6vw, 5.5rem);
}
.adpage-business { font-family: var(--font-heading); font-size: var(--fs-display); font-weight: 700; color: var(--main-1); line-height: 1.05; }
@media (max-width: 820px) {
  .ad--page { grid-template-columns: 1fr; grid-template-rows: 42% 1fr; }
  .adpage-inner { align-self: start; padding-top: 1.6rem; gap: 0.7rem; }
}

/* ---- small end-of-article advert, after the end mark ------------------------ */
.flow-ad {
  margin: 0.4em 0 1.2em;
  padding: 0.9em 1em;
  border: 1px solid var(--rule);
  background: var(--white);
  color: var(--black);
  font-family: var(--font-ui);
  font-size: 0.8em;
  line-height: 1.45;
  text-align: center;
  break-inside: avoid;
}
.flow-ad .ad-label { margin-bottom: 0.4em; }
.flow-ad-business { font-family: var(--font-heading); font-weight: 700; font-size: 1.3em; color: var(--main-1); }
.flow-ad-offer { margin-top: 0.2em; font-weight: 600; color: var(--main-2); }
.flow-ad-contact { margin-top: 0.2em; color: var(--sub-3); }
.book[data-theme="night"] .flow-ad { filter: brightness(0.88); }

/* ---- a second photograph inside the story ----------------------------------- */
.flow-figure { margin: 0.3em 0 1.1em; break-inside: avoid; }
.flow-figure img {
  width: 100%;
  height: calc(var(--flow-h, 600px) * 0.42);
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--rule);
}
.flow-figure--whole img { height: auto; max-height: calc(var(--flow-h, 600px) * 0.66); object-fit: contain; background: none; }
.flow-figure figcaption { margin-top: 0.45em; font-family: var(--font-ui); font-size: 0.7em; line-height: 1.4; color: var(--ink-soft); }
.flow-credit { opacity: 0.8; }

/* ---- classifieds screen --------------------------------------------------------- */
.flow--classifieds .classifieds-title { font-family: var(--font-heading); font-size: 2em; line-height: 1; color: var(--ink); margin-bottom: 0.3em; }
.flow--classifieds .classifieds-intro { font-size: 0.8em; color: var(--ink-soft); margin-bottom: 1.1em; }
.flow--classifieds .classified { font-size: 0.8em; margin-bottom: 0.9em; color: var(--black); }
.flow--classifieds .classified-title { font-size: 1.15em; }
.flow--classifieds .classified-text,
.flow--classifieds .classified-contact { font-size: 0.92em; }
.book[data-theme="night"] .flow--classifieds .classified { filter: brightness(0.88); }
/* Local ads: a heading per section, then its adverts two to a line. */
.flow--classifieds .local-section { margin: 0.6em 0 0.5em; font-size: 0.7em; break-after: avoid; }
.flow--classifieds .local-display { display: inline-block; width: calc(50% - 0.4em); margin: 0 0.4em 0.8em 0; vertical-align: top; break-inside: avoid; font-size: 0.8em; }
.flow--classifieds .local-display .ad-label { font-size: 0.6em; letter-spacing: 0.1em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.book[data-theme="night"] .flow--classifieds .local-display { filter: brightness(0.88); }
.adpage-tagline { font-size: var(--fs-subheading); font-style: italic; }
.adpage-offer {
  margin-top: 0.4rem;
  padding: 0.7rem 1.4rem;
  border: 2px dashed var(--main-2);
  font-family: var(--font-ui);
  font-weight: 700;
  color: var(--main-2);
}
.adpage-contact { font-family: var(--font-ui); font-size: var(--fs-body); color: var(--sub-3); display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center; }
.book[data-theme="night"] .ad--page { filter: brightness(0.86); }
.page--ad .ad--page { opacity: 0; transform: scale(0.96); }
.page--ad.is-active .ad--page { opacity: 1; transform: none; transition: opacity 0.7s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }

/* ---- back page ---------------------------------------------------------------- */
.page--end {
  display: grid;
  place-items: center;
  background: var(--main-1);
  color: var(--white);
  text-align: center;
  padding: 4rem 1.4rem;
}
.end-inner { max-width: 44rem; }
.end-mark { color: var(--sub-2); font-size: var(--fs-subheading); }
.end-title { color: var(--white); margin-top: 0.8rem; font-size: var(--fs-display); line-height: 1.08; }
.end-thanks { margin-top: 0.8rem; opacity: 0.85; font-size: var(--fs-subheading); }
.end-next { margin-top: 2.4rem; }
.end-next-label { font-family: var(--font-ui); font-size: var(--fs-small); letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.75; }
.end-next-date { margin-top: 0.3rem; font-family: var(--font-heading); font-size: var(--fs-heading); }
.end-countdown { display: flex; justify-content: center; gap: clamp(0.6rem, 2.5vw, 1.4rem); margin-top: 1.4rem; }
.end-countdown div {
  min-width: clamp(4rem, 13vw, 6.2rem);
  padding: 0.8rem 0.4rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
}
.end-countdown span { display: block; font-family: var(--font-heading); font-size: var(--fs-display); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.end-countdown small { display: block; margin-top: 0.4rem; font-family: var(--font-ui); font-size: var(--fs-small); letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.7; }
.end-countdown .flip { animation: flip 0.5s cubic-bezier(0.2, 0.7, 0.2, 1); }
@keyframes flip {
  from { transform: translateY(-40%); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.end-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8rem; margin-top: 2.4rem; }
.end-btn {
  display: inline-flex; align-items: center;
  min-height: var(--tap);
  padding: 0.7rem 1.3rem;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-pill);
  color: var(--white);
  text-decoration: none;
  font-family: var(--font-ui);
  font-weight: 600;
  transition: background var(--transition), color var(--transition);
}
.end-btn:hover { background: var(--white); color: var(--main-1); }
.end-btn--primary { background: var(--white); color: var(--main-1); }
.end-tip { margin-top: 2.2rem; font-size: var(--fs-body); opacity: 0.7; }
.page--end .end-inner > * { opacity: 0; transform: translateY(16px); }
.page--end.is-active .end-inner > * { opacity: 1; transform: none; transition: opacity 0.7s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.page--end.is-active .end-inner > :nth-child(2) { transition-delay: 0.1s; }
.page--end.is-active .end-inner > :nth-child(3) { transition-delay: 0.2s; }
.page--end.is-active .end-inner > :nth-child(4) { transition-delay: 0.35s; }
.page--end.is-active .end-inner > :nth-child(n+5) { transition-delay: 0.5s; }

/* ---- chrome ------------------------------------------------------------------ */
.book-chrome {
  position: fixed;
  left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem max(1rem, env(safe-area-inset-left)) 0.6rem max(1rem, env(safe-area-inset-right));
  font-family: var(--font-ui);
  color: var(--ink);
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.35s ease, color 0.4s ease, background 0.4s ease;
}
.book-chrome--top {
  top: 0;
  justify-content: space-between;
  background: linear-gradient(180deg, var(--paper) 55%, transparent);
}
.book-chrome--bottom {
  bottom: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  padding-top: 1.2rem;
  padding-bottom: max(0.7rem, env(safe-area-inset-bottom));
  background: linear-gradient(0deg, var(--paper) 55%, transparent);
}
/* Over photographs the furniture goes light. */
.book[data-kind="cover"] .book-chrome,
.book[data-kind="opener"] .book-chrome,
.book[data-kind="end"] .book-chrome { color: var(--white); background: transparent; }
.book[data-kind="cover"] .book-chrome--top,
.book[data-kind="opener"] .book-chrome--top { background: linear-gradient(180deg, rgba(13, 36, 68, 0.55), transparent); }

.chrome-hidden .book-chrome--top { transform: translateY(-110%); opacity: 0; }
.chrome-hidden .book-chrome--bottom { transform: translateY(70%); opacity: 0.001; }
.chrome-hidden .book-chrome--bottom .book-progress { opacity: 1; }

.book-chrome-title { display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.2; min-width: 0; }
.book-chrome-masthead { font-family: var(--font-heading); font-weight: 700; font-size: 1.05rem; }
.book-chrome-edition { font-size: var(--fs-small); letter-spacing: 0.06em; opacity: 0.7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70vw; }
.book-chrome-actions { display: flex; gap: 0.25rem; }
.book-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.7rem;
  border-radius: var(--radius-pill);
  color: inherit;
  text-decoration: none;
  font-size: var(--fs-small);
  font-weight: 600;
  transition: background 0.2s ease;
}
.book-btn:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.book-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.book-aa { font-family: var(--font-heading); font-size: var(--fs-subheading); }
.book-close { min-width: auto; }
[data-fullscreen] .icon-exit { display: none; }
.is-fullscreen [data-fullscreen] .icon-enter { display: none; }
.is-fullscreen [data-fullscreen] .icon-exit { display: block; }
@media (max-width: 700px) {
  .book-btn-label { display: none; }
  .book-chrome-masthead { font-size: 0.95rem; }
}

.book-progress { position: relative; height: 3px; background: color-mix(in srgb, currentColor 16%, transparent); border-radius: 3px; }
.book-progress-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent); border-radius: 3px; transition: width var(--turn); }
.book[data-kind="cover"] .book-progress-fill,
.book[data-kind="opener"] .book-progress-fill,
.book[data-kind="end"] .book-progress-fill { background: var(--sub-2); }
.book-progress-marks span { position: absolute; top: -2px; width: 1px; height: 7px; background: currentColor; opacity: 0.35; }
.book-status { display: flex; justify-content: space-between; gap: 1rem; font-size: var(--fs-small); opacity: 0.75; }
.book-status-where { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.book-status-page { white-space: nowrap; }

/* Edge arrows, desktop only, fade in on hover. */
.book-edge {
  position: fixed;
  top: 50%;
  z-index: 15;
  width: 52px; height: 52px;
  margin-top: -26px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: color-mix(in srgb, var(--paper) 80%, transparent);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.book-edge svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.book-edge--prev { left: 14px; }
.book-edge--next { right: 14px; }
.book-edge:disabled { visibility: hidden; }
@media (hover: hover) and (pointer: fine) {
  .book-stage:hover ~ .book-edge, .book-edge:hover, .book-edge:focus-visible { opacity: 0.9; }
  .book-edge--next:hover { transform: translateX(3px); }
  .book-edge--prev:hover { transform: translateX(-3px); }
}
@media (hover: none), (pointer: coarse) { .book-edge { display: none; } }

.book-hint {
  position: fixed;
  z-index: 25;
  left: 50%;
  bottom: 4.6rem;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-pill);
  background: rgba(13, 36, 68, 0.82);
  color: var(--white);
  font-family: var(--font-ui);
  font-size: var(--fs-small);
  white-space: nowrap;
  pointer-events: none;
  animation: hint-in 0.8s 2.2s both cubic-bezier(0.2, 0.7, 0.2, 1);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
/* animation: none, or the entrance keyframes' fill would keep it visible. */
.book-hint.is-gone { animation: none; opacity: 0; transform: translate(-50%, 10px); visibility: hidden; }
.book-hint kbd { display: inline-block; min-width: 1.6rem; padding: 0.1rem 0.35rem; border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 4px; font-family: inherit; text-align: center; margin-right: 0.15rem; }
@keyframes hint-in { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (max-width: 600px) { .book-hint-keys { display: none; } .book-hint { white-space: normal; width: max-content; max-width: calc(100vw - 2rem); } }

/* ---- sheets -------------------------------------------------------------------- */
.book-sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  justify-content: flex-end;
  background: rgba(13, 36, 68, 0);
  transition: background 0.3s ease;
  font-family: var(--font-ui);
}
.book-sheet[hidden] { display: none; }   /* or the closed sheet swallows every tap */
.book-sheet.is-open { background: rgba(13, 36, 68, 0.45); }
.book-sheet-inner {
  width: min(460px, 100%);
  height: 100%;
  overflow-y: auto;
  background: var(--paper);
  color: var(--ink);
  padding: 1rem 1.3rem 2rem;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.2);
}
.book-sheet.is-open .book-sheet-inner { transform: none; }
.book-sheet--small .book-sheet-inner { width: min(380px, 100%); }
.book-sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.8rem; }
.book-sheet-head h2 { font-size: var(--fs-heading); color: var(--ink); }
.sheet-contents { list-style: none; margin: 0; padding: 0; }
.sheet-contents a {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 0.8rem;
  align-items: center;
  padding: 0.55rem 0.4rem;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
}
.sheet-contents a:hover, .sheet-contents a.is-here { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.sheet-contents img, .sheet-noimg { width: 76px; height: 52px; object-fit: cover; border-radius: 3px; background: var(--rule); }
.sheet-title { display: block; font-family: var(--font-heading); font-weight: 600; font-size: var(--fs-body); line-height: 1.25; }
.sheet-contents a.is-read .toc-kicker::after { content: " · read \2713"; color: var(--accent); }
.sheet-shelf { margin-top: 1.6rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.sheet-shelf h3 { font-family: var(--font-ui); font-size: var(--fs-small); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 0.8rem; }
.sheet-shelf-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; }
.mini-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 3px;
  background: var(--main-1);
  color: var(--white);
  text-decoration: none;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0.45rem;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  transition: transform 0.3s ease;
}
.mini-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.75; }
.mini-cover::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(13, 36, 68, 0.9), transparent 60%); z-index: 1; }
.mini-cover span { position: relative; z-index: 2; }
.mini-cover-no { font-family: var(--font-heading); font-weight: 700; font-size: var(--fs-small); }
.mini-cover-date { font-size: var(--fs-small); opacity: 0.85; }
.mini-cover:hover { transform: translateY(-3px); }
.mini-cover.is-current { outline: 2px solid var(--accent); outline-offset: 2px; }

.setting { border: 0; margin: 0 0 1.4rem; padding: 0; }
.setting legend { font-size: var(--fs-small); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 0.6rem; }
.setting-row { display: flex; gap: 0.5rem; }
.setting-row button {
  flex: 1;
  min-height: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  border: 1px solid var(--rule);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 600;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.setting-row button[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.swatch { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.2); }
.swatch--paper { background: #fbf8f1; }
.swatch--sepia { background: #f3eadb; }
.swatch--night { background: #121418; }

/* ---- small screens ------------------------------------------------------------ */
@media (max-width: 820px) {
  .contents-inner { grid-template-columns: 1fr; gap: 1.4rem; grid-template-rows: auto minmax(0, 1fr); padding-top: 4.6rem; }
  .contents-note { font-size: var(--fs-body); margin-top: 0.8rem; }
  .contents-sign, .contents-stats { display: none; }
  .cover-lines { grid-template-columns: 1fr; gap: 0.7rem; }
  .cover-lines li:nth-child(n+3) { display: none; }
  .opener-caption { display: none; }
  .opener-shade { background: linear-gradient(0deg, rgba(13, 36, 68, 0.92) 0%, rgba(13, 36, 68, 0.55) 50%, rgba(13, 36, 68, 0.1) 80%); }
}
@media (max-width: 600px) {
  /* Phone cover: masthead, lead headline and the button. The furniture
     already names the edition, and the contents page lists the rest. */
  .cover-inner { padding-top: 5.2rem; padding-bottom: 3rem; }
  .cover-edition, .cover-lines, .cover-begin > span { display: none; }
  .cover-masthead { font-size: clamp(3rem, 17vw, 4.4rem); }
  .cover-lead-title { font-size: var(--fs-heading); }
  .cover-demo { left: clamp(1.4rem, 6vw, 5rem); right: auto; }
  .book-chrome-edition { display: none; }
  .book-chrome-masthead { white-space: nowrap; }
  .book-chrome-actions .book-btn { min-width: 40px; padding: 0 0.4rem; }
}
@media (max-height: 640px) and (min-width: 821px) {
  .cover-lines { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .book { --turn: 0.001ms; }
  .cover-img, .opener-img { transform: none !important; transition: none !important; }
}

.page--ad .ad--image { display: flex; flex-direction: column; justify-content: center; padding: 0; }
.page--ad .ad--image > img { min-height: 0; flex: 0 1 auto; max-height: calc(100% - 3rem); object-fit: contain; }

/* Image creatives occupy a complete, unbroken block in the magazine columns. */
.flow-ad.flow-ad--image { padding: 0; break-inside: avoid; }
.flow-ad--image > img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: contain; }

/* Villages dropdown on the contents page and in the Contents sheet: follows
   the reading theme (paper, sepia, night). Base styles are in styles.css. */
.book .village-filter { margin: 1rem 0 1.25rem; }
.book .village-dd-button, .book .village-dd-panel { background: var(--paper); color: var(--ink); border-color: var(--rule); }
.book .village-dd-label, .book .village-option-count, .book .village-filter-status { color: var(--ink-soft); }
.book .village-option { color: var(--ink); }
.book .village-option:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.book .village-option--all { border-bottom-color: var(--rule); }
.book .village-option input { accent-color: var(--accent); }
.book .village-dd-button:hover, .book .village-dd[open] .village-dd-button { border-color: var(--accent); }
.book .village-dd.is-filtered .village-dd-button { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--paper)); }
.book .village-dd-done { background: var(--ink); color: var(--paper); }
.book .village-dd-done:hover { background: var(--accent); }
/* Monthly columnists open the same way every month (Mick, 30 Nov 2026): picture and
   column name, then the columnist's logo and a line about them. */
.flow-columnist { margin: 0.2em 0 1.1em; break-inside: avoid; border-bottom: 1px solid var(--rule); }
.columnist-head { display: flex; align-items: center; gap: 0.9em; padding-bottom: 0.7em; border-bottom: 2px solid var(--ink); }
.columnist-photo { flex: none; width: 4.2em; height: 4.2em; border-radius: 50%; object-fit: cover; background: var(--rule); }
.columnist-photo--logo { object-fit: contain; background: #fff; }
.columnist-title { margin: 0; font-family: var(--font-heading); font-size: 1.35em; line-height: 1.15; }
.columnist-by { display: block; margin-top: 0.25em; font-family: var(--font-ui); font-size: 0.58em; letter-spacing: 0.04em; color: var(--ink-soft); }
.columnist-bio { display: flex; align-items: center; gap: 0.9em; padding: 0.6em 0 0.7em; }
/* A fixed box: pages are measured before a lazy logo loads, so its size can't depend on the file. */
.columnist-logo { flex: none; width: 7em; height: 2.8em; object-fit: contain; object-position: left center; }
.columnist-bio p { margin: 0; font-family: var(--font-ui); font-size: 0.78em; line-height: 1.4; color: var(--ink-soft); }

/* Booked adverts: the artwork links to the advertiser, with their phone, email and web
   links under it. The link box steps aside so the image keeps the layouts above. */
.ad-img-link { display: contents; }
.page--ad .ad--image img { min-height: 0; flex: 0 1 auto; max-height: calc(100% - 5rem); object-fit: contain; }
.flow-ad--image img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: contain; max-height: calc(var(--flow-h, 600px) * 0.7); }
.ad-links { margin: 0.5rem 0 0.2rem; font-family: var(--font-ui); font-size: 0.85rem; text-align: center; }
.ad-links a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
/* A contributor's panel ("box" on a list block), e.g. a club's fixtures: black, with their logo. */
.flow-box { display: flex; align-items: center; gap: 1em; margin: 1.2em 0 1em; padding: 1em 1.1em; background: #111; color: #f4f1ea; break-inside: avoid; }
.flow-box-logo { flex: none; width: 4.6em; height: 4.6em; padding: 0.25em; border-radius: 50%; background: #fff; object-fit: contain; }
.flow-box-title { margin: 0 0 0.5em; font-family: var(--font-ui); font-size: 0.78em; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.flow-box .flow-list { margin: 0; padding: 0; list-style: none; }
.flow-box .flow-list li { margin-bottom: 0.25em; padding: 0; }
