
/* =========================================================================
   Glasgow History — glasgowhistory.co.uk
   Design system v5: "THE COLLECTION"
   Museum-grade editorial. Ivory, ink, one deep Clyde green.
   Display: Fraunces (serif, characterful). Body: Source Sans 3.
   Signature: the line-drawn Glasgow skyline.
   ========================================================================= */

:root {
  --ivory:   #FAF7F0;   /* page ground */
  --ivory-2: #F1ECE0;   /* alt panel */
  --white:   #FFFFFF;   /* cards */
  --ink:     #21241F;   /* warm near-black */
  --ink-2:   #6A6A60;   /* secondary text */
  --green:   #20584A;   /* deep Clyde green — the accent */
  --green-2: #17453A;   /* hover */
  --green-3: #9DBFB4;   /* pale green — on dark grounds */
  --line:    #E6E0D1;   /* hairline */
  --line-2:  #D5CDB9;   /* stronger hairline */
  --dark-line: rgba(250,247,240,.16);

  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:    "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1200px;
  --measure: 41rem;

  --shadow:      0 1px 2px rgba(33,36,31,.04), 0 10px 24px -18px rgba(33,36,31,.22);
  --shadow-lift: 0 2px 5px rgba(33,36,31,.06), 0 22px 40px -22px rgba(33,36,31,.28);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

/* ------------------------------- Reset --------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--sans);
  font-size: 1.12rem; line-height: 1.7;
  color: var(--ink); background: var(--ivory);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }

/* ---------------------------- Typography ------------------------------- */
h1, h2, h3, h4 { font-family: var(--display); font-weight: 400; line-height: 1.08; letter-spacing: -0.01em; color: var(--ink); }

.eyebrow { font-family: var(--sans); font-weight: 700; font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; color: var(--green); display: block; }
.redrule::before { content: ""; display: block; width: 2.8rem; height: 2px; background: var(--green); margin-bottom: 1.1rem; }

.measure { max-width: var(--measure); }
p + p { margin-top: 1.1em; }

.prose a { color: var(--green); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .18s ease; }
@media (hover: hover) and (pointer: fine) { .prose a:hover { color: var(--green-2); } }

/* ------------------------------ Layout --------------------------------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 3rem); }
.section { padding-block: clamp(3.75rem, 8vw, 6.5rem); }
.section--tight { padding-block: clamp(2.75rem, 5.5vw, 4.25rem); }
.section--alt { background: var(--ivory-2); border-block: 1px solid var(--line); }

:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--ivory); padding: .75rem 1.25rem; z-index: 100; font-weight: 700; letter-spacing: .06em; }
.skip-link:focus { left: 1rem; top: 1rem; }

/* --------------------------- Header ------------------------------------ */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(250,247,240,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line-2); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 74px; }
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); }
.brand__mark { width: 40px; height: 40px; flex: none; display: grid; place-items: center; background: var(--green); color: var(--ivory); border-radius: 1px; }
.brand__mark svg { width: 62%; height: 62%; }
.brand__text { font-family: var(--display); font-weight: 600; font-size: 1.28rem; line-height: 1; letter-spacing: 0; display: flex; gap: .34rem; }
.brand__text em { font-style: italic; font-weight: 400; color: var(--green); }

.site-nav { display: flex; align-items: center; }
.nav-menu { list-style: none; display: flex; align-items: center; gap: 1.9rem; padding: 0; }
.nav-menu a { font-weight: 600; font-size: .98rem; text-decoration: none; color: var(--ink-2); padding: .35rem 0; position: relative; transition: color .18s ease; }
.nav-menu a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--green); transform: scaleX(0); transform-origin: left; transition: transform .24s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .nav-menu a:hover { color: var(--ink); } .nav-menu a:hover::after { transform: scaleX(1); } }
.nav-toggle { display: none; font-family: var(--sans); font-weight: 700; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; background: var(--green); color: var(--ivory); border: 0; padding: .6rem 1rem; border-radius: 1px; cursor: pointer; transition: transform .14s var(--ease-out), background-color .2s ease; }
.nav-toggle:active { transform: scale(0.97); }

/* ------------------------------ Buttons -------------------------------- */
.btn { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--sans); font-weight: 700; font-size: .92rem; letter-spacing: .05em; text-transform: uppercase; padding: .85rem 1.55rem; border-radius: 1px; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: transform .14s var(--ease-out), background-color .2s ease, color .2s ease, border-color .2s ease; }
.btn:active { transform: scale(0.98); }
.btn--red, .btn--solid, .btn--brass { background: var(--green); color: var(--ivory); }
.btn--outline, .btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.article-hero .btn--outline, .site-footer .btn--outline { color: var(--ivory); border-color: var(--dark-line); }
@media (hover: hover) and (pointer: fine) {
  .btn--red:hover, .btn--solid:hover, .btn--brass:hover { background: var(--green-2); }
  .btn--outline:hover, .btn--ghost:hover { border-color: var(--ink); }
  .article-hero .btn--outline:hover { background: var(--ivory); color: var(--ink); border-color: var(--ivory); }
}
.btn__arrow { transition: transform .22s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .btn:hover .btn__arrow { transform: translateX(3px); } }

.link-arrow { display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; font-size: .92rem; letter-spacing: .04em; text-transform: uppercase; text-decoration: none; color: var(--green); }
.link-arrow .link-arrow__ic { transition: transform .22s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .link-arrow:hover .link-arrow__ic { transform: translateX(3px); } }

.mungo-symbol { color: currentColor; }
.mungo-symbol svg { width: 100%; height: 100%; }

/* -------------------------------- Hero --------------------------------- */
.hero { background: var(--ivory); border-bottom: 1px solid var(--line-2); position: relative; overflow: hidden; }
.hero__inner { padding-block: clamp(3.75rem, 9vw, 7rem) 0; position: relative; z-index: 2; }
.hero__panel { max-width: 56rem; }
.hero__eyebrow { color: var(--green); }
.hero__title { font-size: clamp(2.9rem, 8vw, 6rem); font-weight: 300; margin-top: 1.1rem; }
.hero__title em { font-style: italic; font-weight: 400; color: var(--green); }
.hero__lede { margin-top: 1.5rem; font-size: 1.2rem; color: var(--ink-2); max-width: 36rem; }
.hero__cta { margin-top: 2rem; display: flex; gap: .9rem; flex-wrap: wrap; }

/* Skyline — the signature */
.skyline { margin-top: clamp(2.75rem, 6vw, 4.5rem); color: var(--ink); opacity: .88; }
.skyline svg { width: 100%; height: auto; display: block; }
.skyline .sk-orange { color: var(--green); }

/* --------------------------- Section header ---------------------------- */
.sec-head { max-width: 52rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.sec-head__title { font-size: clamp(2rem, 4.6vw, 3.1rem); font-weight: 300; }
.sec-head__lede { margin-top: 1rem; color: var(--ink-2); max-width: 44rem; font-size: 1.1rem; }
.sq-marker { display: none; }

/* ----------------------- Theme index — catalogue ----------------------- */
.tcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.1rem; }
.tcard { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 2.4rem; min-height: 168px;
  padding: 1.2rem 1.3rem 1.25rem; text-decoration: none; color: var(--ink); background: var(--white);
  border: 1px solid var(--line); border-radius: 1px; box-shadow: var(--shadow);
  background-image: var(--img, none); background-size: cover; background-position: center;
  transition: transform .26s var(--ease-out), box-shadow .26s var(--ease-out), border-color .26s ease; }
.tcard::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--green); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease-out); }
.tcard__no { font-family: var(--display); font-style: italic; font-size: .98rem; color: var(--green); }
.tcard__count { font-family: var(--sans); font-weight: 600; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); font-style: normal; }
.tcard__name { font-family: var(--display); font-weight: 400; font-size: 1.62rem; line-height: 1.05; letter-spacing: -0.01em; }
.tcard__name span { display: none; }
@media (hover: hover) and (pointer: fine) {
  .tcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: var(--line-2); }
  .tcard:hover::after { transform: scaleX(1); }
}

/* --------------------------- Feature cards ----------------------------- */
.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 1.3rem; }
.event-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: 1px; text-decoration: none; color: var(--ink); overflow: hidden; box-shadow: var(--shadow); transition: transform .26s var(--ease-out), box-shadow .26s var(--ease-out), border-color .26s ease; }
.event-card__media { aspect-ratio: 16 / 9; background-color: var(--ivory-2); background-image: var(--img, linear-gradient(150deg, #E9E2D2, #DDD4BF)); background-size: cover; background-position: center; border-bottom: 1px solid var(--line); }
.event-card__band { height: 3px; background: var(--green); }
.event-card__band--green { background: var(--ink); }
.event-card__band--rose { background: var(--line-2); }
.event-card__body { padding: 1.35rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: .45rem; flex: 1 1 auto; }
.event-card__date { font-weight: 700; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--green); }
.event-card__title { font-family: var(--display); font-weight: 400; font-size: 1.42rem; line-height: 1.12; }
.event-card__title em { font-style: italic; }
.event-card__desc { font-size: .97rem; color: var(--ink-2); line-height: 1.55; }
.event-card__foot { margin-top: auto; padding-top: .9rem; font-weight: 600; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); border-top: 1px solid var(--line); }
@media (hover: hover) and (pointer: fine) { .event-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: var(--line-2); } }

/* ------------------- Context band (interior pages) --------------------- */
.article-hero {
  position: relative;
  overflow: hidden;
  color: var(--ivory);
  background:
    radial-gradient(circle at calc(100% - 6rem) -8rem, transparent 16.92rem, rgba(157,191,180,.28) 17rem, transparent 17.1rem),
    radial-gradient(circle at calc(100% - 6rem) -8rem, transparent 13.4rem, rgba(157,191,180,.05) 13.5rem, rgba(157,191,180,.05) 16.9rem, transparent 17rem),
    radial-gradient(58rem 30rem at 88% -18%, rgba(157,191,180,.16), transparent 62%),
    linear-gradient(118deg, var(--green-2) 0%, var(--green) 46%, #2A6557 100%);
}
.article-hero::before { /* editorial grain */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.article-hero::after { /* the city, ghosted along the base */
  content: ""; position: absolute; left: 0; right: 0; bottom: 10px; pointer-events: none;
  height: clamp(64px, 11vw, 118px);
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201200%20150%22%20fill%3D%22none%22%20stroke%3D%22%239DBFB4%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20preserveAspectRatio%3D%22none%22%3E%20%3C!--%20tenement%20row%20--%3E%20%3Cpath%20d%3D%22M0%20148V96h26v-8h10v8h30V84h8v-14h6v14h8v64%22%2F%3E%20%3Cpath%20d%3D%22M20%20148v-20h14v20M52%20112h24M52%20124h24%22%2F%3E%20%3C!--%20cathedral%3A%20nave%20%2B%20spire%20--%3E%20%3Cpath%20d%3D%22M118%20148V92h20v-6h6l4-10%204%2010h6v6h20v56%22%2F%3E%20%3Cpath%20d%3D%22M152%2076V56l6-26%206%2026v20M158%2030v-12M152%20148v-26h12v26%22%2F%3E%20%3C!--%20necropolis%20obelisk%20on%20the%20hill%20--%3E%20%3Cpath%20d%3D%22M218%20148c14-6%2030-10%2048-10%2012%200%2022%202%2030%204%22%2F%3E%20%3Cpath%20d%3D%22M256%20138v-40l4-8%204%208v40%22%2F%3E%20%3C!--%20city%20chambers%20tower%20--%3E%20%3Cpath%20d%3D%22M330%20148V88h12v-12h8v-8h6v8h8v12h12v60M340%20100h34M344%20112h26M344%20124h26%22%2F%3E%20%3C!--%20tower%20blocks%20--%3E%20%3Cpath%20d%3D%22M420%20148V64h34v84M428%2076h18M428%2090h18M428%20104h18M428%20118h18%22%2F%3E%20%3Cpath%20d%3D%22M466%20148V84h30v64M474%2096h14M474%20110h14M474%20124h14%22%2F%3E%20%3C!--%20Finnieston%20crane%20%E2%80%94%20in%20subway%20orange%20--%3E%20%3Cg%20class%3D%22sk-orange%22%20stroke%3D%22%239DBFB4%22%3E%20%3Cpath%20d%3D%22M600%20148V52M614%20148V52%22%2F%3E%20%3Cpath%20d%3D%22M596%2052h110M596%2042h84M680%2042l26%2010M596%2042l-24%2010h24%22%2F%3E%20%3Cpath%20d%3D%22M600%2062l14%2012M614%2062l-14%2012M600%2086l14%2012M614%2086l-14%2012M600%20110l14%2012M614%20110l-14%2012%22%2F%3E%20%3Cpath%20d%3D%22M660%2052v18M690%2052v12M588%20148h38%22%2F%3E%20%3C%2Fg%3E%20%3C!--%20squinty%20bridge%20arc%20--%3E%20%3Cpath%20d%3D%22M760%20148c30-52%2096-52%20126%200M772%20130v18M796%20112v36M823%20104v44M850%20112v36M874%20130v18%22%2F%3E%20%3C!--%20SEC%20armadillo%20--%3E%20%3Cpath%20d%3D%22M930%20148c4-30%2024-48%2048-48s44%2018%2048%2048M946%20148c3-20%2015-32%2032-32s29%2012%2032%2032%22%2F%3E%20%3C!--%20university%20tower%20--%3E%20%3Cpath%20d%3D%22M1060%20148V96h14v-14h8v-10h6l3-16%203%2016h6v10h8v14h14v52%22%2F%3E%20%3Cpath%20d%3D%22M1088%2040v16M1076%20148v-22h24v22%22%2F%3E%20%3C!--%20tenement%20row%20out%20--%3E%20%3Cpath%20d%3D%22M1140%20148V104h22v-8h10v8h28v44%22%2F%3E%20%3C!--%20ground%20line%20--%3E%20%3Cpath%20d%3D%22M0%20148h1200%22%20stroke-width%3D%223%22%2F%3E%20%3C%2Fsvg%3E");
  background-size: 100% 100%; background-repeat: no-repeat; background-position: bottom center;
  opacity: .16;
  -webkit-mask-image: linear-gradient(to top, black 72%, transparent 100%);
  mask-image: linear-gradient(to top, black 72%, transparent 100%);
}
.article-hero { box-shadow: inset 0 1px 0 rgba(157,191,180,.28); }
.article-hero__inner { position: relative; z-index: 1; }
.article-hero__inner { padding-block: clamp(2.4rem, 5vw, 3.8rem); max-width: 56rem; }
.article-hero__crumbs { font-size: .84rem; color: rgba(250,247,240,.72); margin-bottom: 1.2rem; }
.article-hero__crumbs a { color: rgba(250,247,240,.85); text-decoration: none; }
.article-hero__crumbs a:hover { color: var(--ivory); text-decoration: underline; }
.article-hero__date { font-weight: 700; font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--green-3); }
.article-hero__title { font-family: var(--display); font-weight: 300; font-size: clamp(2.2rem, 5.6vw, 3.9rem); color: var(--ivory); margin-top: .6rem; }
.article-hero__title em { font-style: italic; color: var(--ivory); }
.article-hero__stand { margin-top: 1.1rem; font-size: 1.16rem; max-width: 44rem; color: rgba(250,247,240,.88); line-height: 1.55; }

/* Sibling-theme sub-nav */
.subnav { background: var(--green-2); }
.subnav__inner { display: flex; flex-wrap: wrap; padding-block: .35rem; }
.subnav a { color: rgba(250,247,240,.75); text-decoration: none; font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: .55rem .85rem; border-bottom: 2px solid transparent; transition: color .18s ease, border-color .18s ease; }
.subnav a:hover { color: var(--ivory); border-bottom-color: rgba(250,247,240,.45); }
.subnav a[aria-current="page"] { color: var(--ivory); border-bottom-color: var(--ivory); }

/* ------------------------------ Article -------------------------------- */
.article-body { padding-block: clamp(3rem, 6vw, 4.75rem); }
.article-body .prose { max-width: var(--measure); margin-inline: auto; }
.prose h2 { font-size: 1.8rem; margin: 2.4rem 0 .8rem; }
.prose h2::after { content: ""; display: block; width: 2.6rem; height: 2px; background: var(--green); margin-top: .55rem; }
.prose h3 { font-size: 1.35rem; margin: 1.8rem 0 .5rem; }
.prose p { font-size: 1.13rem; line-height: 1.72; }
.prose > p:first-of-type::first-letter { font-family: var(--display); font-weight: 600; float: left; font-size: 3.6rem; line-height: .8; padding: .12rem .55rem .05rem 0; color: var(--green); }
.prose blockquote { margin: 1.9rem 0; padding: .3rem 0 .3rem 1.5rem; border-left: 2px solid var(--green); font-family: var(--display); font-style: italic; font-size: 1.32rem; line-height: 1.45; }
.prose blockquote cite { display: block; font-style: normal; font-family: var(--sans); font-weight: 700; font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); margin-top: .6rem; }

.factbox { max-width: var(--measure); margin: 0 auto clamp(2rem, 4vw, 2.75rem); background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--green); border-radius: 1px; padding: 1.4rem 1.6rem; box-shadow: var(--shadow); display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1.1rem; }
.factbox__item .k { font-weight: 700; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--green); }
.factbox__item .v { font-size: 1rem; margin-top: .2rem; line-height: 1.4; }

.pull-figure { max-width: 52rem; margin: clamp(2.2rem, 5vw, 3.2rem) auto; }
.pull-figure__frame { background: var(--green); color: var(--ivory); border-radius: 1px; padding: clamp(2rem, 5vw, 3.2rem); text-align: center; }
.pull-figure__frame .mungo-symbol { width: 60px; height: 60px; color: var(--green-3); margin: 0 auto 1.1rem; }
.pull-figure__quote { font-family: var(--display); font-weight: 300; font-style: italic; font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.3; color: var(--ivory); }
.pull-figure figcaption { font-size: .9rem; color: var(--ink-2); margin-top: .8rem; text-align: center; }

.related { border-top: 1px solid var(--line-2); background: var(--ivory-2); }
.related__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.2rem; margin-top: 1.4rem; }
.note { max-width: var(--measure); margin: 1.4rem auto 0; font-size: .95rem; color: var(--ink-2); border-top: 1px solid var(--line); padding-top: 1rem; }
.note a { color: var(--green); }

/* ------------------------------ Timeline ------------------------------- */
.tl { position: relative; max-width: 60rem; margin-inline: auto; }
.tl::before { content: ""; position: absolute; left: 13px; top: 6px; bottom: 6px; width: 2px; background: var(--line-2); }
.tl-era { position: relative; padding-left: 3.2rem; margin-bottom: 2.8rem; }
.tl-era__marker { position: absolute; left: 6px; top: 5px; width: 16px; height: 16px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 4px var(--ivory); }
.tl-era__span { font-weight: 700; font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--green); }
.tl-era__title { font-size: 1.75rem; font-weight: 300; margin: .25rem 0 1rem; }
.tl-list { list-style: none; padding: 0; }
.tl-item { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1.1rem; padding: .85rem 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); align-items: baseline; transition: background-color .18s ease, padding-left .22s var(--ease-out); }
.tl-item:last-child { border-bottom: 1px solid var(--line); }
.tl-item__year { font-family: var(--display); font-style: italic; color: var(--green); font-size: 1.05rem; }
.tl-item__name { font-size: 1.05rem; }
.tl-item__name em { font-style: italic; }
.tl-item__name small { display: block; font-size: .92rem; color: var(--ink-2); margin-top: .1rem; line-height: 1.45; }
@media (hover: hover) and (pointer: fine) { a.tl-item:hover { background: var(--white); padding-left: .5rem; } }

/* ------------------------- Category hub list --------------------------- */
.hub-lead { max-width: var(--measure); margin: 0 auto clamp(1.4rem, 3vw, 2rem); color: var(--ink-2); font-size: 1.1rem; }
.hub-lead em { font-style: italic; color: var(--green); }
.pages-list { list-style: none; padding: 0; margin: 0 auto; max-width: 60rem; border: 1px solid var(--line); border-radius: 1px; background: var(--white); box-shadow: var(--shadow); overflow: hidden; }
.pages-list li + li .page-item { border-top: 1px solid var(--line); }
.page-item { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; padding: 1rem 1.35rem; text-decoration: none; color: var(--ink); border-left: 3px solid transparent; transition: background-color .18s ease, border-color .18s ease, padding-left .22s var(--ease-out); }
.page-item__name { font-size: 1.05rem; }
.page-item__tag { font-weight: 700; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--green); white-space: nowrap; }
.page-item--soon { background: var(--ivory); }
.page-item--soon .page-item__name { color: var(--ink-2); }
.page-item--soon .page-item__tag { color: var(--line-2); }
@media (hover: hover) and (pointer: fine) { a.page-item:hover { background: var(--ivory); border-left-color: var(--green); padding-left: 1.65rem; } }

/* ------------------------------- Footer -------------------------------- */
.site-footer { background: var(--ink); color: rgba(250,247,240,.82); padding-block: clamp(3rem, 5vw, 4rem) 2rem; }
.footer-verse { display: flex; gap: 1.3rem 2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--dark-line); margin-bottom: 2.2rem; flex-wrap: wrap; }
.footer-verse .symbol-card { display: flex; align-items: center; gap: .65rem; }
.footer-verse .symbol-card .mungo-symbol { width: 30px; height: 30px; color: var(--green-3); flex: none; }
.footer-verse .symbol-card__line { font-family: var(--display); font-style: italic; font-size: .92rem; color: rgba(250,247,240,.6); }
.footer-cols { display: flex; flex-wrap: wrap; gap: 2.5rem 4rem; justify-content: space-between; align-items: flex-start; }
.footer-brand__text { font-family: var(--display); font-weight: 600; font-size: 1.3rem; color: var(--ivory); }
.footer-brand__tag { color: rgba(250,247,240,.6); font-size: .95rem; margin-top: .5rem; max-width: 22rem; }
.footer-nav { display: flex; gap: 3rem; flex-wrap: wrap; }
.footer-nav h4 { font-weight: 700; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--green-3); margin-bottom: .8rem; }
.footer-nav ul { list-style: none; padding: 0; display: grid; gap: .5rem; }
.footer-nav a { color: rgba(250,247,240,.78); text-decoration: none; font-size: .95rem; }
.footer-nav a:hover { color: var(--ivory); text-decoration: underline; }
.colophon { margin-top: 2.2rem; padding-top: 1.4rem; border-top: 1px solid var(--dark-line); color: rgba(250,247,240,.5); font-size: .86rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.symbol-card { display: grid; justify-items: center; gap: .5rem; text-align: center; }

/* ---------------------------- Reveal motion ---------------------------- */
/* Progressive enhancement: content is visible by default. The hidden
   starting state applies ONLY when JS has confirmed it can reveal it
   (html.js), so a missing/late/failed observer can never leave text blank. */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity .55s var(--ease-out), transform .55s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }
[data-stagger].is-visible > *:nth-child(1) { transition-delay: 0ms; }
[data-stagger].is-visible > *:nth-child(2) { transition-delay: 45ms; }
[data-stagger].is-visible > *:nth-child(3) { transition-delay: 90ms; }
[data-stagger].is-visible > *:nth-child(4) { transition-delay: 135ms; }
[data-stagger].is-visible > *:nth-child(5) { transition-delay: 180ms; }
[data-stagger].is-visible > *:nth-child(6) { transition-delay: 225ms; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .event-card, .tcard, .tl-item, .page-item, .nav-toggle, .tcard::after, .nav-menu a::after { transition: none; }
}

/* ----------------------------- Responsive ------------------------------ */
@media (max-width: 900px) { .footer-cols { gap: 2rem 3rem; } }
@media (max-width: 720px) {
  body { font-size: 1.06rem; }
  .nav-toggle { display: inline-flex; }
  .nav-menu { position: absolute; top: calc(100% + 6px); right: clamp(1.25rem,4vw,3rem); left: clamp(1.25rem,4vw,3rem);
    flex-direction: column; align-items: stretch; gap: 0; background: var(--white); border: 1px solid var(--line);
    border-radius: 12px; box-shadow: var(--shadow-lift); padding: .35rem; opacity: 0; transform: translateY(-6px) scale(.985); transform-origin: top;
    pointer-events: none; transition: opacity .16s var(--ease-out), transform .16s var(--ease-out); }
  .nav-menu.is-open { opacity: 1; transform: none; pointer-events: auto; transition-duration: .22s; }
  .nav-menu li { border-bottom: 1px solid var(--line); opacity: 0; transform: translateY(7px); transition: opacity .14s var(--ease-out), transform .14s var(--ease-out); }
  .nav-menu li:last-child { border-bottom: 0; }
  .nav-menu.is-open li { opacity: 1; transform: none; transition-duration: .24s; }
  .nav-menu.is-open li:nth-child(1) { transition-delay: .03s; }
  .nav-menu.is-open li:nth-child(2) { transition-delay: .06s; }
  .nav-menu.is-open li:nth-child(3) { transition-delay: .09s; }
  .nav-menu.is-open li:nth-child(4) { transition-delay: .12s; }
  .nav-menu.is-open li:nth-child(5) { transition-delay: .15s; }
  .nav-menu.is-open li:nth-child(n+6) { transition-delay: .18s; }
  .nav-menu a, .nav-menu .mega-toggle, .nav-menu .search-toggle { border-radius: 8px; transition: background-color .13s ease, color .15s ease; -webkit-tap-highlight-color: transparent; }
  .nav-menu a { display: block; padding: .85rem 1rem; }
  .nav-menu a::after { display: none; }
  .nav-menu .mega-toggle, .nav-menu .search-toggle { display: flex; width: 100%; align-items: center; justify-content: space-between; padding: .85rem 1rem; font-size: .98rem; color: var(--ink-2); }
  .nav-menu .mega-caret { font-size: .82em; color: var(--green); transition: transform .2s var(--ease-out); }
  .nav-menu a:active, .nav-menu .mega-toggle:active, .nav-menu .search-toggle:active { background: var(--ivory-2); }
  .prose > p:first-of-type::first-letter { font-size: 3rem; }
  .tl-item { grid-template-columns: 4rem 1fr; gap: .7rem; }
  .footer-cols { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-menu, .nav-menu li { transition-property: opacity; transform: none; }
  .nav-menu.is-open li { transition-delay: 0s; }
}

/* ------------------ Explore mega-menu (topic silos) --------------------- */
.nav-mega { position: relative; }
.mega-toggle { font-family: var(--sans); font-weight: 600; font-size: .98rem; color: var(--ink-2); background: none; border: 0; padding: .35rem 0; cursor: pointer; display: inline-flex; align-items: center; gap: .35rem; transition: color .18s ease; }
.mega-toggle:hover { color: var(--ink); }
.mega-toggle[aria-expanded="true"] { color: var(--ink); }
.mega-caret { font-size: .7em; transition: transform .2s var(--ease-out); }
.mega-toggle[aria-expanded="true"] .mega-caret { transform: rotate(180deg); }
.mega { position: absolute; top: 100%; left: 0; right: 0; background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line-2); box-shadow: var(--shadow-lift); opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .2s var(--ease-out), transform .2s var(--ease-out); }
.mega.is-open { opacity: 1; transform: none; pointer-events: auto; }
.mega__inner { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.6rem 2rem; padding-block: 1.7rem 1.4rem; }
.mega__col h3 { font-family: var(--sans); font-weight: 700; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--green); margin-bottom: .7rem; }
.mega__col ul { list-style: none; padding: 0; display: grid; gap: .4rem; }
.mega__col a { text-decoration: none; color: var(--ink-2); font-size: .95rem; transition: color .15s ease; }
.mega__col a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--green); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.mega__all { grid-column: 1 / -1; font-family: var(--sans); font-weight: 700; font-size: .85rem; letter-spacing: .05em; text-transform: uppercase; color: var(--green); text-decoration: none; border-top: 1px solid var(--line); padding-top: 1rem; width: 100%; }
.mega__all:hover { color: var(--green-2); }

/* --------------------- Theme groups on the homepage --------------------- */
.tgroup + .tgroup { margin-top: 2.4rem; }
.tgroup__label { font-family: var(--sans); font-weight: 700; font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--green); margin-bottom: .9rem; display: flex; align-items: center; gap: .8rem; }
.tgroup__label::after { content: ""; height: 1px; background: var(--line-2); flex: 1; }

/* -------------------------- Silo sub-nav label -------------------------- */
.subnav__label { color: rgba(250,247,240,.55); font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: .55rem .9rem .55rem 0; }

@media (max-width: 900px) { .mega__inner { grid-template-columns: repeat(2, 1fr); max-height: 70vh; overflow: auto; } }
@media (max-width: 720px) { .mega__inner { grid-template-columns: 1fr; padding-block: 1.2rem; } }
@media (max-width: 720px) {
  .mega, .search-overlay { left: clamp(1.25rem,4vw,3rem); right: clamp(1.25rem,4vw,3rem); top: calc(100% + 6px); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lift); overflow: hidden; transform-origin: top; transform: translateY(-6px) scale(.985); }
  .mega__inner { padding-inline: 1.15rem; max-height: 66vh; overflow: auto; }
  .search-box { padding-inline: 1.15rem; }
  .mega__col a, .search-results a { -webkit-tap-highlight-color: transparent; }
  .mega__col a:active { color: var(--green-2); }
}
@media (prefers-reduced-motion: reduce) { .mega, .mega-caret { transition: none; } }

/* --------------- Hero entrance — orchestrated, load-once ---------------- */
.hero__panel > * { opacity: 0; transform: translateY(12px); animation: heroIn .6s var(--ease-out) forwards; }
.hero__panel > :nth-child(1) { animation-delay: .05s; }
.hero__panel > :nth-child(2) { animation-delay: .12s; }
.hero__panel > :nth-child(3) { animation-delay: .19s; }
.hero__panel > :nth-child(4) { animation-delay: .26s; }
.hero__panel > :nth-child(5) { animation-delay: .33s; }
@keyframes heroIn { to { opacity: 1; transform: none; } }

/* Skyline draws across the page once, after the panel settles */
.skyline svg { clip-path: inset(0 100% 0 0); animation: skylineWipe 1.3s var(--ease-out) .45s forwards; }
@keyframes skylineWipe { to { clip-path: inset(0 0 0 0); } }

/* Hero stat strip */
.hero__meta { display: flex; flex-wrap: wrap; gap: .9rem 1.7rem; margin-top: 2.3rem; padding-top: 1.4rem; border-top: 1px solid var(--line); font-weight: 600; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); max-width: 36rem; }

/* ----------------------- Footer — modern opening ------------------------ */
.footer-cta { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem 2.5rem; flex-wrap: wrap; padding-bottom: 2.2rem; border-bottom: 1px solid var(--dark-line); margin-bottom: 2.2rem; }
.footer-cta__line { font-family: var(--display); font-weight: 300; font-style: italic; font-size: clamp(1.7rem, 4vw, 2.5rem); line-height: 1.12; color: var(--ivory); }
.footer-cta__line em { font-style: italic; color: var(--green-3); }

.footer-verse .symbol-card { transition: transform .2s var(--ease-out); }
.footer-verse .symbol-card .mungo-symbol { transition: color .2s ease; }
@media (hover: hover) and (pointer: fine) {
  .footer-verse .symbol-card:hover { transform: translateY(-3px); }
  .footer-verse .symbol-card:hover .mungo-symbol { color: var(--ivory); }
}

.to-top { color: rgba(250,247,240,.7); text-decoration: none; font-weight: 600; }
.to-top:hover { color: var(--ivory); text-decoration: underline; text-decoration-color: var(--green-3); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  .hero__panel > * { animation: none; opacity: 1; transform: none; }
  .skyline svg { animation: none; clip-path: none; }
  .footer-verse .symbol-card, .footer-verse .symbol-card .mungo-symbol { transition: none; }
}

/* ------------------------------ Site search ----------------------------- */
.search-toggle { font-family: var(--sans); font-weight: 600; font-size: .98rem; color: var(--ink-2); background: none; border: 0; padding: .35rem 0; cursor: pointer; transition: color .18s ease; }
.search-toggle:hover, .search-toggle[aria-expanded="true"] { color: var(--ink); }
.search-overlay { position: absolute; top: 100%; left: 0; right: 0; background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line-2); box-shadow: var(--shadow-lift); opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity .18s var(--ease-out), transform .18s var(--ease-out); }
.search-overlay.is-open { opacity: 1; transform: none; pointer-events: auto; }
.search-box { padding-block: 1.2rem 1.4rem; }
.search-input { width: 100%; font-family: var(--serif); font-size: 1.15rem; padding: .85rem 1rem; border: 1px solid var(--line-2); border-radius: 1px; background: var(--ivory); color: var(--ink); }
.search-input:focus { outline: 2px solid var(--green); outline-offset: 2px; }
.search-results { list-style: none; padding: 0; margin-top: .6rem; max-height: 55vh; overflow: auto; }
.search-results li + li a { border-top: 1px solid var(--line); }
.search-results a { display: grid; grid-template-columns: 1fr auto; gap: .1rem .8rem; padding: .7rem .4rem; text-decoration: none; color: var(--ink); transition: background-color .15s ease; }
.search-results a:hover { background: var(--ivory); }
.search-hit__title { font-family: var(--display); font-size: 1.08rem; }
.search-hit__meta { grid-column: 2; grid-row: 1; font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--green); align-self: center; white-space: nowrap; }
.search-hit__desc { grid-column: 1 / -1; font-size: .88rem; color: var(--ink-2); line-height: 1.4; }
.search-empty { padding: .8rem .4rem; color: var(--ink-2); font-style: italic; }

/* --------------------- Previous / next article pager --------------------- */
.pager-wrap { padding-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.pager { max-width: var(--measure); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; border-top: 1px solid var(--line-2); padding-top: 1.5rem; }
.pager__link { display: grid; gap: .3rem; text-decoration: none; color: var(--ink); align-content: start; }
.pager__link--next { text-align: right; }
.pager__dir { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--green); }
.pager__title { font-family: var(--display); font-size: 1.18rem; line-height: 1.25; }
@media (hover: hover) and (pointer: fine) {
  .pager__link:hover .pager__title { text-decoration: underline; text-decoration-color: var(--green); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
}
@media (prefers-reduced-motion: reduce) { .search-overlay { transition: none; } }

/* --------------------- Article figures --------------------- */
.figure { margin: 2.2rem 0; }
.figure img { width: 100%; height: auto; display: block; border-radius: 6px; border: 1px solid var(--line-2); background: var(--paper-2, #f4f0e6); }
.figure figcaption { margin-top: .6rem; font-size: .82rem; line-height: 1.5; color: var(--ink-3, #6b675e); }
.figure figcaption .credit { opacity: .75; }
/* Graceful fallback when a figure image fails to load (e.g. an external host
   is unreachable): the broken <img> is hidden by its onerror handler and the
   figure shows its caption alone, framed, instead of a broken-image icon. */
.figure--noimg { margin: 2.2rem 0; padding: 1rem 1.15rem; background: rgba(32,88,74,.05); border-left: 3px solid var(--green); border-radius: 2px; }
.figure--noimg figcaption { margin-top: 0; font-style: italic; }

/* --------------------- Article hero entrance (quiet: seen on every page) --------------------- */
.article-hero__inner > * { opacity: 0; transform: translateY(6px); animation: heroQuiet .32s var(--ease-out) forwards; }
.article-hero__inner > :nth-child(1) { animation-delay: 0ms; }
.article-hero__inner > :nth-child(2) { animation-delay: 25ms; }
.article-hero__inner > :nth-child(3) { animation-delay: 50ms; }
.article-hero__inner > :nth-child(4) { animation-delay: 75ms; }
@keyframes heroQuiet { to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .hero__panel > *, .article-hero__inner > * { transform: none; animation: fadeOnly .2s ease forwards; }
}
@keyframes fadeOnly { to { opacity: 1; } }

/* --------------------- Footer polish --------------------- */
.footer-nav a { transition: color .15s ease; }
.footer-cta__line em {
  background: linear-gradient(currentColor, currentColor) 0 94% / 0% 1px no-repeat;
  padding-bottom: 2px;
  transition: background-size .5s var(--ease-out) .25s;
}
.footer-cta__line.fx-in em { background-size: 100% 1px; }
.mungo-symbol svg { transition: transform .2s var(--ease-out), color .2s ease; }
@media (hover: hover) and (pointer: fine) {
  .footer-verse .symbol-card:hover .mungo-symbol svg { transform: translateY(-2px) scale(1.06); color: var(--ivory); }
  .footer-verse .symbol-card:hover .symbol-card__line { color: rgba(250,247,240,.85); }
}
.footer-verse .symbol-card__line { transition: color .2s ease; }

/* Scroll-in stagger (classes applied by JS only, so no-JS never hides content) */
.fx-pre { opacity: 0; transform: translateY(8px); transition: opacity .45s var(--ease-out), transform .45s var(--ease-out); }
.fx-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .fx-pre { opacity: 1; transform: none; transition: none; } }

/* ---- Pub location map (OpenStreetMap embed at foot of pub pages) ---- */
.pub-map { margin: 3rem auto 0; padding-top: 2.25rem; border-top: 1px solid var(--line); max-width: var(--measure); }
.pub-map h2 { font-family: var(--display); font-weight: 600; font-size: 1.5rem; line-height: 1.15; color: var(--ink); margin: 0 0 .35rem; }
.pub-map__addr { font-family: var(--sans); font-size: .95rem; color: var(--ink-2); margin: 0 0 1rem; }
.pub-map__frame { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; border: 1px solid var(--line-2); box-shadow: var(--shadow); background: var(--ivory-2); }
.pub-map__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; display: block; filter: saturate(.92); }
.pub-map__link { margin: .85rem 0 0; font-family: var(--sans); font-size: .9rem; font-weight: 600; }
.pub-map__link a { color: var(--green); text-decoration: none; border-bottom: 1px solid var(--green-3); padding-bottom: 1px; }
.pub-map__link a:hover { color: var(--green-2); border-color: var(--green); }
@media (max-width: 640px) { .pub-map__frame { aspect-ratio: 4 / 3; } }

/* ---- People also ask (FAQ accordion on biography pages) ---- */
.bio-faq { margin: 3rem auto 0; padding-top: 2.25rem; border-top: 1px solid var(--line); max-width: var(--measure); }
.bio-faq h2 { font-family: var(--display); font-weight: 600; font-size: 1.5rem; line-height: 1.15; color: var(--ink); margin: 0 0 1rem; }
.bio-faq__item { border: 1px solid var(--line-2); border-radius: 12px; background: var(--white); box-shadow: var(--shadow); margin-bottom: .65rem; overflow: hidden; }
.bio-faq__item summary { list-style: none; cursor: pointer; padding: .9rem 2.6rem .9rem 1.1rem; font-family: var(--sans); font-weight: 600; font-size: 1rem; line-height: 1.4; color: var(--ink); position: relative; }
.bio-faq__item summary::-webkit-details-marker { display: none; }
.bio-faq__item summary::after { content: ""; position: absolute; right: 1.05rem; top: 50%; width: .55rem; height: .55rem; border-right: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: translateY(-70%) rotate(45deg); transition: transform .25s var(--ease-out); }
.bio-faq__item[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.bio-faq__item summary:hover { color: var(--green-2); }
.bio-faq__item[open] { border-color: var(--green-3); }
.bio-faq__a { padding: 0 1.1rem 1rem; }
.bio-faq__a p { margin: 0; font-family: var(--sans); font-size: .97rem; line-height: 1.65; color: var(--ink); }

/* ------------------- Data tables + TOC (long reference pages) ------------------- */
.of-toc { max-width: var(--measure); margin: 1.9rem auto 2.4rem; padding: 1.3rem 1.55rem 1.4rem; background: var(--white); border: 1px solid var(--line); border-left: 3px solid var(--green); border-radius: 2px; box-shadow: var(--shadow); }
.of-toc h2 { font-family: var(--sans); font-weight: 700; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--green); margin: 0 0 .85rem; border: 0; padding: 0; }
.of-toc ul { columns: 2; column-gap: 2.2rem; list-style: none; margin: 0; padding: 0; }
.of-toc li { margin: 0 0 .5rem; break-inside: avoid; font-size: .95rem; line-height: 1.3; }
.of-toc a { color: var(--ink-2); text-decoration: none; }
.of-toc a:hover { color: var(--green-2); text-decoration: underline; text-decoration-color: var(--green-3); text-underline-offset: 2px; }
@media (max-width: 560px) { .of-toc ul { columns: 1; } }

.of-table-wrap { margin: 1.7rem 0 2rem; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.of-table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: .93rem; line-height: 1.4; }
.of-table caption { caption-side: top; text-align: left; font-family: var(--sans); font-weight: 700; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--green); padding: 0 0 .7rem; }
.of-table th { text-align: left; font-weight: 700; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); background: var(--ivory-2); padding: .6rem .75rem; border-bottom: 2px solid var(--green-3); white-space: nowrap; }
.of-table td { padding: .58rem .75rem; border-bottom: 1px solid var(--line); color: var(--ink); vertical-align: top; }
.of-table tbody tr:nth-child(even) td { background: var(--ivory); }
.of-table tbody tr:last-child td { border-bottom: 1px solid var(--line-2); }
.of-table td:first-child, .of-table th:first-child { font-weight: 600; }
.of-table td.num, .of-table th.num { text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
.of-table tfoot td { font-weight: 700; background: var(--ivory-2); border-top: 2px solid var(--green-3); }

  