/* ==========================================================================
   Sam Yan Institute for Ideas and Civic Life
   A 24-column grid, corner-ticked boxes, monospace meta, cream and deep green.
   ========================================================================== */

:root {
  --paper:      #F2EFE4;
  --paper-2:    #EAE5D5;
  --paper-3:    #E2DCC8;
  --ink:        #1A1A17;   /* body copy */
  --ink-2:      #4A4741;
  --ink-3:      #605C53;
  --accent:     #950606;   /* display type, buttons, CTA bands */
  --gold:       #775713;
  --rule:       #C5BCA3;
  --grid-line:  #E0DAC7;
  --shadow:     rgba(26, 26, 23, .08);

  --cols: 24;
  --col: calc(100vw / var(--cols));
  --row: var(--col);
  --gap: clamp(20px, calc(var(--col) * .34), 26px);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Space Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --t-hero: clamp(2.9rem, 8.2vw, 7.4rem);
  --t-page: clamp(2.3rem, 5.4vw, 4.6rem);
  --t-sect: clamp(1.7rem, 3vw, 2.7rem);
  --t-card: clamp(1.15rem, 1.5vw, 1.5rem);
  --t-body: clamp(1rem, .55vw + .86rem, 1.14rem);
  --t-mono: clamp(.64rem, .2vw + .6rem, .74rem);

  --ease: cubic-bezier(.22, .61, .36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:      #17150F;
    --paper-2:    #211E16;
    --paper-3:    #2A2619;
    --ink:        #EDE7D5;
    --ink-2:      #C3BDAC;
    --ink-3:      #9B9686;
    --accent:     #E0706A;
    --gold:       #D6AE5C;
    --rule:       #3D3829;
    --grid-line:  #241F16;
    --shadow:     rgba(0, 0, 0, .35);
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  align-content: start;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--t-body);
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--paper);
  background-image: repeating-linear-gradient(to right, var(--grid-line) 0 1px, transparent 1px var(--col));
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }

::selection { background: var(--accent); color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 1px;
}

.skiplink {
  position: absolute; left: -9999px; top: 0; z-index: 1000;
  background: var(--ink); color: var(--paper); padding: .7em 1.2em;
  font-family: var(--font-mono); font-size: var(--t-mono); text-transform: uppercase; letter-spacing: .08em;
}
.skiplink:focus { left: 0; }

/* --- shared type -------------------------------------------------------- */
.mono {
  font-family: var(--font-mono);
  font-size: var(--t-mono);
  letter-spacing: .04em;
  font-weight: 400;
}
.label {
  font-family: var(--font-mono); font-size: var(--t-mono);
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--ink-3); font-weight: 500;
}
.eyebrow {
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--accent); margin-bottom: .9em; font-weight: 500;
}
.meta {
  display: flex; flex-wrap: wrap; align-items: baseline;
  text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3);
}
.meta .dot { margin: 0 .7em; font-size: .5em; transform: translateY(-.25em); color: var(--rule); }
.dot { color: var(--rule); }

.tag-sample {
  display: inline-block; vertical-align: middle;
  padding: .15em .5em; border: 1px dashed var(--gold); color: var(--gold);
  text-transform: uppercase; letter-spacing: .1em; font-size: .62rem;
  border-radius: 2px; translate: 0 -.15em;
}

.link { color: var(--ink); text-decoration: underline; text-underline-offset: .22em; text-decoration-thickness: 1px; text-decoration-color: var(--rule); transition: .18s var(--ease); }
.link:hover { color: var(--accent); text-decoration-color: currentColor; }
.link.arrow { display: inline-block; white-space: nowrap; }
.link.arrow::after { content: " \2197"; text-decoration: none; display: inline-block; transition: translate .2s var(--ease); }
.link.arrow:hover::after { translate: 2px -2px; }

.button {
  display: inline-block;
  font-family: var(--font-mono); font-size: var(--t-mono);
  text-transform: uppercase; letter-spacing: .1em;
  padding: .95em 1.5em; border: 1px solid var(--accent); color: var(--accent);
  background: transparent; cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.button:hover { background: var(--accent); color: var(--paper); }
.button--primary { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.button--primary:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.button--ghost { border-color: var(--rule); color: var(--ink-2); }
.button--ghost:hover { border-color: var(--ink); background: transparent; color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: .8em 1em; align-items: center; margin-top: 1.8em; }

/* --- corner ticks ------------------------------------------------------- */
.cornerbox { position: relative; --tick: 10px; --tick-out: 5px; }
.cornerbox > .corners { position: absolute; inset: calc(var(--tick-out) * -1); pointer-events: none; }
.cornerbox > .corners::before,
.cornerbox > .corners::after {
  content: ""; position: absolute; width: var(--tick); height: var(--tick);
  border: 1px solid var(--ink-3); opacity: .7;
}
.cornerbox > .corners::before { top: 0; left: 0; border-right: none; border-bottom: none; }
.cornerbox > .corners::after { top: 0; right: 0; border-left: none; border-bottom: none; }
.cornerbox::before, .cornerbox::after {
  content: ""; position: absolute; width: var(--tick); height: var(--tick);
  border: 1px solid var(--ink-3); opacity: .7; pointer-events: none;
}
.cornerbox::before { bottom: calc(var(--tick-out) * -1); left: calc(var(--tick-out) * -1); border-right: none; border-top: none; }
.cornerbox::after { bottom: calc(var(--tick-out) * -1); right: calc(var(--tick-out) * -1); border-left: none; border-top: none; }

/* --- navigation --------------------------------------------------------- */
.menu {
  grid-column: 1 / -1;
  position: sticky; top: 0; z-index: 800;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  min-height: 3.6rem;
  padding: 0 var(--col);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background .25s var(--ease), border-color .25s var(--ease), backdrop-filter .25s var(--ease);
}
body.is-stuck .menu {
  background: var(--paper);
  border-bottom-color: var(--rule);
}
.menu-list { display: flex; flex-wrap: wrap; gap: 0 1.7rem; margin-left: auto; }
.menu-item { position: relative; }
.menu-item a {
  display: block; padding: 1.15rem 0;
  text-transform: uppercase; letter-spacing: .1em; font-weight: 500;
  color: var(--ink-2); transition: color .18s var(--ease);
}
.menu-item a:hover { color: var(--accent); }
.menu-item.is-current a { color: var(--ink); }
.menu-item.is-current::after {
  content: "\25CF"; position: absolute; left: 0; right: 0; bottom: .25rem;
  text-align: center; font-size: .45em; color: var(--accent); pointer-events: none;
}
.menu-toggle { display: none; }

@media (max-width: 900px) {
  .menu { padding: 0 var(--gap); min-height: 3.2rem; flex-wrap: wrap; }
  .menu-toggle {
    display: flex; align-items: center; gap: .6rem; margin-left: auto;
    background: none; border: 1px solid var(--rule); padding: .5em .9em; cursor: pointer;
    font-family: var(--font-mono); font-size: var(--t-mono); text-transform: uppercase; letter-spacing: .1em;
  }
  .menu-toggle-bars { display: grid; gap: 3px; }
  .menu-toggle-bars i { display: block; width: 14px; height: 1px; background: currentColor; transition: .2s var(--ease); }
  .menu-toggle[aria-expanded="true"] .menu-toggle-bars i:first-child { translate: 0 2px; rotate: 45deg; }
  .menu-toggle[aria-expanded="true"] .menu-toggle-bars i:last-child { translate: 0 -2px; rotate: -45deg; }
  /* A wrapped flex item collapses unreliably under a max-height transition,
     so the open state is a plain display toggle with a short fade. */
  .menu-list { display: none; flex-basis: 100%; flex-direction: column; gap: 0; }
  .menu-list.is-open { display: flex; animation: menu-in .22s var(--ease) both; }
  .menu-list.is-open + * { margin-top: 0; }
  .menu:has(.menu-list.is-open) { padding-bottom: .6rem; }
  .menu-item a { padding: .8rem 0; border-top: 1px solid var(--grid-line); }
  .menu-item.is-current::after { left: auto; right: 0; bottom: auto; top: 1rem; text-align: right; }
  body.is-stuck .menu { background: var(--paper); }
}

@keyframes menu-in { from { opacity: 0; translate: 0 -6px; } }

/* --- page scaffolding --------------------------------------------------- */
.main {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  row-gap: clamp(3.5rem, 7vw, 7rem);
  padding-bottom: clamp(4rem, 8vw, 8rem);
}
.main > * { grid-column: 3 / span 20; }

@media (max-width: 1200px) { .main > * { grid-column: 2 / span 22; } }
@media (max-width: 900px) {
  .main { row-gap: clamp(3rem, 9vw, 4.5rem); }
  .main > * { grid-column: 1 / -1; padding-inline: var(--gap); }
}

.pagehead { padding-top: clamp(2.5rem, 6vw, 5.5rem); }
.pagehead-lede {
  margin-top: 1.4rem; max-width: 46ch;
  font-size: clamp(1.1rem, 1.3vw, 1.35rem); line-height: 1.5; color: var(--ink-2);
}
.pagenote { color: var(--ink-3); border-left: 1px solid var(--rule); padding-left: 1em; max-width: 60ch; }

.sectionhead {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem;
  padding-bottom: 1.2rem; margin-bottom: 2.2rem;
  border-bottom: 1px solid var(--rule);
}
.sectionhead-title {
  font-family: var(--font-display); font-weight: 500;
  font-size: var(--t-sect); line-height: 1.06; letter-spacing: -.025em;
}
.sectionhead-note { margin-top: .7rem; max-width: 62ch; color: var(--ink-2); font-size: .95em; }
.sectionhead > a { flex: none; padding-bottom: .3rem; text-transform: uppercase; letter-spacing: .1em; }
@media (max-width: 700px) { .sectionhead { flex-direction: column; align-items: flex-start; gap: 1rem; } }

/* --- prose -------------------------------------------------------------- */
.prose { max-width: 68ch; }
.prose p + p { text-indent: 1.9em; }
.prose p { margin-bottom: .1em; }
.prose--lead p { font-size: clamp(1.08rem, 1.15vw, 1.28rem); line-height: 1.55; color: var(--ink); }
.prose--lead p + p { margin-top: .9em; text-indent: 0; }

.pullquote {
  margin: 2.4rem 0; padding: 1.6rem 0; max-width: 34ch;
  border-top: 1px solid var(--accent); border-bottom: 1px solid var(--accent);
}
.pullquote p {
  font-family: var(--font-display); font-size: clamp(1.4rem, 2.3vw, 2.05rem);
  line-height: 1.22; font-weight: 500; letter-spacing: -.02em; color: var(--accent);
}
.story { display: grid; grid-template-columns: minmax(0, 68ch); }
@media (min-width: 1100px) {
  .story { grid-template-columns: minmax(0, 60ch) minmax(0, 1fr); column-gap: clamp(2rem, 4vw, 4rem); align-items: start; }
  .story .pullquote { grid-column: 2; grid-row: 1 / span 2; margin-top: 3rem; position: sticky; top: 6rem; }
  .story .prose:first-child { grid-column: 1; }
  .story .prose:last-child { grid-column: 1; margin-top: .1em; }
}

.notebanner {
  display: flex; gap: .7em; align-items: baseline;
  padding: .9em 1.1em; border: 1px dashed var(--gold); color: var(--gold);
  text-transform: uppercase; letter-spacing: .08em;
}

.emptystate { padding: 2rem clamp(1.2rem, 3vw, 2.4rem); max-width: 62ch; color: var(--ink-2); }
.emptystate-box { border: 1px solid var(--grid-line); }

/* --- hero --------------------------------------------------------------- */
.hero { position: relative; padding-top: clamp(2rem, 7vw, 6rem); }
.hero-eyebrow { color: var(--ink-3); }
.hero-body { margin-top: clamp(2rem, 4vw, 3.4rem); max-width: 54ch; }
.hero-body > p:first-child { font-size: clamp(1.1rem, 1.35vw, 1.4rem); line-height: 1.48; }

/* --- pillars ------------------------------------------------------------ */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.pillar {
  display: flex; flex-direction: column;
  padding: clamp(1.4rem, 2vw, 2.2rem);
  border: 1px solid var(--rule); background: var(--paper);
  transition: background .25s var(--ease), transform .25s var(--ease), border-color .25s var(--ease);
}
.pillar:hover { background: var(--paper-2); border-color: var(--ink); transform: translateY(-3px); }
.pillar-num { color: var(--accent); letter-spacing: .12em; }
.pillar-title { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.7rem, 2.4vw, 2.4rem); line-height: 1.05; margin-top: 1.6rem; }
.pillar-body { margin-top: 1rem; color: var(--ink-2); font-size: .97em; }
.pillar-items { margin-top: 1.4rem; display: grid; gap: .45em; color: var(--ink); }
.pillar-items li { padding-left: 1.1em; position: relative; }
.pillar-items li::before { content: "\2014"; position: absolute; left: 0; color: var(--rule); }
.pillar-more { margin-top: auto; padding-top: 1.6rem; font-family: var(--font-mono); font-size: var(--t-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--accent); }
@media (max-width: 900px) { .pillars { grid-template-columns: 1fr; } }

/* --- ecosystem map ------------------------------------------------------ */
.eco { display: grid; row-gap: clamp(1.8rem, 3vw, 3rem); }
.eco-head { max-width: 58ch; }
.eco-title { font-family: var(--font-display); font-weight: 500; font-size: var(--t-sect); line-height: 1.06; letter-spacing: -.025em; }
.eco-intro { margin-top: .9rem; color: var(--ink-2); font-size: 1.05em; }

.eco-figure { margin: 0; border: 1px solid var(--rule); background: var(--paper); }
.eco-canvas { padding: clamp(.6rem, 1.6vw, 1.6rem); }
.eco-svg { width: 100%; height: auto; overflow: visible; }
.eco-caption {
  border-top: 1px solid var(--grid-line); padding: .85em 1.2em;
  color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; min-height: 3em;
  display: flex; align-items: center;
}
.eco-readout.is-live { color: var(--accent); }

.eco-link { fill: none; stroke: var(--ink-3); stroke-width: 1; opacity: .75; transition: stroke .25s var(--ease), stroke-width .25s var(--ease), opacity .25s var(--ease); }
.eco-ring { fill: none; stroke: var(--grid-line); stroke-width: 1; stroke-dasharray: 3 5; opacity: .9; transition: opacity .25s var(--ease), stroke .25s var(--ease); }
.eco-box { fill: var(--paper); stroke: var(--rule); stroke-width: 1; transition: stroke .25s var(--ease), fill .25s var(--ease); }
.eco-box--centre { fill: var(--paper-2); stroke: var(--accent); }
.eco-tick { fill: none; stroke: var(--ink-3); stroke-width: 1; opacity: .7; transition: stroke .25s var(--ease); }
.eco-label { font-family: var(--font-sans); font-size: 15px; font-weight: 500; fill: var(--ink); text-anchor: middle; }
.eco-centre-title { font-family: var(--font-display); font-weight: 500; font-size: 25px; fill: var(--accent); text-anchor: middle; }

.eco-node, .eco-centre { cursor: pointer; transition: opacity .25s var(--ease); }
.eco-node:hover .eco-box, .eco-node:focus-visible .eco-box { stroke: var(--accent); fill: var(--paper-2); }
.eco-node:hover .eco-tick, .eco-node:focus-visible .eco-tick { stroke: var(--accent); }
.eco-centre:hover .eco-box--centre, .eco-centre:focus-visible .eco-box--centre { stroke: var(--accent); }
.eco-node:focus-visible, .eco-centre:focus-visible { outline: none; }
.eco-node:focus-visible .eco-box, .eco-centre:focus-visible .eco-box { stroke-width: 2; }

.eco-svg.is-engaged .eco-node:not(.is-active) { opacity: .25; }
.eco-svg.is-engaged .eco-ring { opacity: .15; }
.eco-svg.is-engaged .eco-link:not(.is-active) { opacity: .18; }
.eco-svg.is-engaged .eco-centre:not(.is-active) { opacity: .45; }
.eco-link.is-active { stroke: var(--accent); stroke-width: 2; }
.eco-node.is-active .eco-box { stroke: var(--accent); stroke-width: 2; fill: var(--paper-2); }
.eco-node.is-active .eco-tick { stroke: var(--accent); }
.eco-centre.is-active .eco-box--centre { stroke: var(--accent); stroke-width: 2; }

.eco-cycle { display: grid; row-gap: 1.2rem; }
.eco-cycle-head { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.eco-cycle-title { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.3rem, 1.9vw, 1.75rem); }
.eco-steps { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--gap); counter-reset: step; }
.eco-step {
  border-top: 1px solid var(--rule); padding-top: .85rem;
  display: grid; gap: .5rem; align-content: start;
  transition: border-color .25s var(--ease), color .25s var(--ease);
}
.eco-step-num { color: var(--ink-3); letter-spacing: .12em; }
.eco-step-label { font-size: .95em; color: var(--ink-2); }
.eco-step.is-active { border-top-color: var(--accent); }
.eco-step.is-active .eco-step-num { color: var(--accent); }
.eco-step.is-active .eco-step-label { color: var(--ink); }
@media (max-width: 1100px) { .eco-steps { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .eco-steps { grid-template-columns: 1fr 1fr; } }

.eco-groups { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.eco-group { border-top: 1px solid var(--rule); padding-top: 1rem; }
.eco-group-note { color: var(--ink-3); font-size: .88em; margin-top: .3rem; }
.eco-group ul { margin-top: 1rem; display: grid; gap: .9rem; }
.eco-group li { display: grid; gap: .2rem; transition: opacity .25s var(--ease); }
.eco-group li strong { font-weight: 600; font-size: .97em; }
.eco-group li a:hover strong { color: var(--ink); }
.eco-group li span { color: var(--ink-3); font-size: .85em; line-height: 1.45; }
.eco-group li.is-active strong { color: var(--accent); }
@media (max-width: 1000px) { .eco-groups { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .eco-groups { grid-template-columns: 1fr; } }

/* Below this width the map is unreadable; the list below it carries the same content. */
@media (max-width: 760px) {
  .eco-figure { display: none; }
  .eco-cycle-head .eco-play { display: none; }
}

/* --- cards -------------------------------------------------------------- */
.cardgrid { display: grid; gap: var(--gap); }
.cardgrid--events { grid-template-columns: repeat(3, 1fr); }
.cardgrid--work { grid-template-columns: repeat(3, 1fr); }
.cardgrid--stories { grid-template-columns: repeat(3, 1fr); }
.cardgrid--past { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1000px) { .cardgrid--events, .cardgrid--work, .cardgrid--stories, .cardgrid--past { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) { .cardgrid--events, .cardgrid--work, .cardgrid--stories, .cardgrid--past { grid-template-columns: 1fr; } }

.cardgrid > .cornerbox { border: 1px solid var(--rule); background: var(--paper); transition: border-color .2s var(--ease), background .2s var(--ease); }
.cardgrid > .cornerbox:hover { border-color: var(--ink); background: var(--paper-2); }
.card { padding: clamp(1.1rem, 1.6vw, 1.6rem); height: 100%; display: flex; flex-direction: column; gap: .7rem; }
.card-title { font-family: var(--font-display); font-weight: 500; font-size: var(--t-card); line-height: 1.14; }
.card-title a:hover { color: var(--ink); }
.card-speaker { color: var(--ink-2); font-size: .92em; }
.card-author { color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; }
.card-body { color: var(--ink-2); font-size: .95em; }
.card-foot { margin-top: auto; padding-top: .8rem; color: var(--ink-3); display: flex; flex-wrap: wrap; align-items: baseline; text-transform: uppercase; letter-spacing: .08em; }
.card-foot .dot { margin: 0 .6em; font-size: .5em; }
.card--event { display: grid; grid-template-columns: auto 1fr; gap: 0 1.2rem; }
.card-date { display: grid; text-align: center; align-content: start; border-right: 1px solid var(--grid-line); padding-right: 1.1rem; }
.card-date-day { font-size: 1.9rem; line-height: 1; color: var(--ink); }
.card-date-month { letter-spacing: .14em; color: var(--accent); margin-top: .25rem; }
.card-date-year { color: var(--ink-3); margin-top: .1rem; }
.card-main { display: flex; flex-direction: column; gap: .6rem; min-width: 0; }
.cornerbox.is-past .card-date-day { color: var(--ink-3); }
.cornerbox.is-past { background: transparent; }
.card-links { display: flex; gap: 1rem; flex-wrap: wrap; }

/* --- stats -------------------------------------------------------------- */
.statgrid { display: grid; gap: var(--gap); }
.statgrid--strip { grid-template-columns: repeat(4, 1fr); }
.statgrid--big { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1000px) { .statgrid--strip, .statgrid--big { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .statgrid--strip, .statgrid--big { grid-template-columns: 1fr; } }
.statgrid > .cornerbox { border: 1px solid var(--grid-line); }
.stat { padding: clamp(1.1rem, 1.8vw, 1.8rem); display: grid; gap: .4rem; align-content: start; }
.stat-value {
  font-family: var(--font-display); font-weight: 500; line-height: .92;
  font-size: clamp(2.6rem, 4.5vw, 4rem); letter-spacing: -.04em; color: var(--ink);
}
.stat--big .stat-value { font-size: clamp(3rem, 6vw, 5.2rem); }
.stat-unit { color: var(--accent); }
.stat-label { font-size: .98em; margin-top: .3rem; }
.stat-note { color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; }
.secondary { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; margin-top: 2rem; padding-top: 1.4rem; border-top: 1px solid var(--rule); }
.secondary li { display: flex; align-items: baseline; gap: .7em; }
.secondary-value { font-size: 1.15rem; color: var(--accent); }
.secondary-label { color: var(--ink-2); font-family: var(--font-sans); text-transform: none; letter-spacing: 0; }

/* --- news --------------------------------------------------------------- */
.newslist { display: grid; gap: 0; }
.newsitem { padding: 1.5rem 0; border-top: 1px solid var(--grid-line); display: grid; gap: .5rem; }
.newsitem:last-child { border-bottom: 1px solid var(--grid-line); }
.newsitem-title { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.25rem, 1.8vw, 1.6rem); line-height: 1.16; }
.newsitem-title a:hover { color: var(--ink); }
.newsitem-body { color: var(--ink-2); max-width: 70ch; font-size: .96em; }
@media (min-width: 900px) {
  .newsitem { grid-template-columns: 10rem 1fr; gap: 0 2rem; align-items: baseline; }
  .newsitem .meta { grid-row: 1 / span 2; }
}

/* --- call to action ----------------------------------------------------- */
.cta { background: var(--accent); color: var(--paper); }
.cta-inner { padding: clamp(2.2rem, 5vw, 4.5rem); max-width: 62ch; }
.cta .eyebrow { color: color-mix(in srgb, var(--paper) 78%, transparent); }
.cta-heading { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.6rem, 3vw, 2.6rem); line-height: 1.12; letter-spacing: -.025em; }
.cta-body { margin-top: 1.1rem; color: color-mix(in srgb, var(--paper) 80%, var(--ink)); }
.cta .button { border-color: color-mix(in srgb, var(--paper) 55%, transparent); color: var(--paper); }
.cta .button:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.cta .button--primary { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.cta .button--primary:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.cta .link { color: var(--paper); text-decoration-color: color-mix(in srgb, var(--paper) 55%, transparent); }
.cta .link:hover { color: var(--paper); }

/* --- programs ----------------------------------------------------------- */
.toc { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 1.2rem 0; }
.toc > ul { display: grid; gap: .9rem; margin-top: 1rem; }
.toc li { display: grid; grid-template-columns: 13rem 1fr; gap: 1rem; align-items: baseline; }
.toc li > a { color: var(--accent); text-transform: uppercase; letter-spacing: .1em; }
.toc-items { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0; color: var(--ink-2); font-size: .95em; }
.toc-items a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: .2em; }
.toc-items .dot { margin: 0 .8em; font-size: .45em; }
@media (max-width: 800px) { .toc li { grid-template-columns: 1fr; gap: .3rem; } }

.cyclenote { border: 1px solid var(--rule); padding: clamp(1.4rem, 2.5vw, 2.4rem); background: var(--paper-2); }
.cyclenote-title { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.3rem, 2vw, 1.8rem); }
.cyclenote-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem var(--gap); margin-top: 1.5rem; }
.cyclenote-list li { display: grid; grid-template-columns: 2.4rem 1fr; gap: .4rem; align-items: baseline; color: var(--ink-2); font-size: .95em; }
.cyclenote-list .mono { color: var(--accent); }
.cyclenote-foot { margin-top: 1.5rem; }
@media (max-width: 900px) { .cyclenote-list { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .cyclenote-list { grid-template-columns: 1fr; } }

.progsection { display: grid; row-gap: var(--gap); }
.progsection-head { border-bottom: 1px solid var(--ink); padding-bottom: 1rem; }
.progsection-kicker { display: block; text-transform: uppercase; letter-spacing: .16em; color: var(--accent); font-size: var(--t-mono); }
.progsection-title { font-size: inherit; font-weight: 400; }
.progsection-note { margin-top: .5rem; font-family: var(--font-display); font-weight: 500; font-size: clamp(1.3rem, 2.2vw, 1.9rem); line-height: 1.16; max-width: 40ch; }
.program-box { border: 1px solid var(--rule); background: var(--paper); }
.program { display: grid; grid-template-columns: 17rem 1fr; gap: clamp(1.5rem, 3vw, 3rem); padding: clamp(1.4rem, 2.5vw, 2.4rem); }
.program-side { display: grid; gap: 1.4rem; align-content: start; }
.program-facts { display: grid; gap: .9rem; }
.program-facts > div { display: grid; gap: .15rem; border-top: 1px solid var(--grid-line); padding-top: .55rem; }
.program-facts dt { text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); font-size: .92em; }
.program-facts dd { color: var(--ink); }
.program-title { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.6rem, 2.8vw, 2.4rem); line-height: 1.08; }
.program-summary { margin-top: .9rem; font-size: clamp(1.05rem, 1.2vw, 1.2rem); color: var(--ink-2); max-width: 48ch; line-height: 1.45; }
.program-main > .prose { margin-top: 1.3rem; }
.program-main > p:last-child { margin-top: 1.4rem; }
@media (max-width: 900px) { .program { grid-template-columns: 1fr; } .program-side { order: 2; } }

/* --- people ------------------------------------------------------------- */
.peoplegrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
@media (max-width: 1000px) { .peoplegrid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .peoplegrid { grid-template-columns: 1fr; } }
.peoplegrid > .cornerbox { border: 1px solid var(--rule); background: var(--paper); }
.peoplegrid > .cornerbox.is-tba { border-style: dashed; border-color: var(--grid-line); background: transparent; }
.person { padding: clamp(1.2rem, 2vw, 1.8rem); display: grid; gap: .55rem; align-content: start; height: 100%; }
.person-portrait {
  width: 4.6rem; height: 4.6rem; display: grid; place-items: center; margin-bottom: .8rem;
  border: 1px solid var(--rule); border-radius: 50%;
  font-family: var(--font-display); font-weight: 500; font-size: 1.5rem; color: var(--accent); background: var(--paper-2);
}
.person-role { text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); }
.person-name { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.3rem, 1.9vw, 1.7rem); line-height: 1.1; }
.person--tba .person-name { color: var(--ink-3); }
.person-bio { color: var(--ink-2); font-size: .94em; }
.person-links { margin-top: .4rem; display: flex; gap: 1rem; flex-wrap: wrap; }

/* --- ideas -------------------------------------------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.filter {
  background: transparent; border: 1px solid var(--rule); cursor: pointer;
  padding: .6em 1.1em; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2);
  transition: .18s var(--ease);
}
.filter:hover { border-color: var(--ink); color: var(--ink); }
.filter.is-active { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.filter-empty { margin-top: 1.5rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; }
.press-box, .independence-box, .purpose-box, .visit-box, .newsletter-box { border: 1px solid var(--rule); background: var(--paper-2); }
.press, .independence { padding: clamp(1.5rem, 3vw, 2.6rem); max-width: 68ch; display: grid; gap: .9rem; }
.press-heading { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.4rem, 2.2vw, 1.9rem); }
.press-body, .independence p { color: var(--ink-2); }

/* --- impact ------------------------------------------------------------- */
.story-card { padding: clamp(1.2rem, 2vw, 1.8rem); display: grid; gap: .7rem; height: 100%; align-content: start; }
.story-card-title { font-family: var(--font-display); font-weight: 500; font-size: var(--t-card); line-height: 1.15; }
.story-card-body { color: var(--ink-2); font-size: .95em; }
.cardgrid--stories > .cornerbox { border: 1px solid var(--grid-line); }

/* --- funders ------------------------------------------------------------ */
.fund-stats { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; margin-top: 2.2rem; padding-top: 1.6rem; border-top: 1px solid var(--rule); }
.fund-stats li { display: grid; gap: .1rem; }
.fund-stat-value { font-family: var(--font-display); font-weight: 500; font-size: clamp(2rem, 3.2vw, 2.8rem); line-height: 1; color: var(--accent); }
.fund-stat-label { font-family: var(--font-mono); font-size: var(--t-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }

.strengthgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--gap); }
@media (max-width: 1100px) { .strengthgrid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .strengthgrid { grid-template-columns: 1fr; } }
.strength { border-top: 1px solid var(--ink); padding-top: .9rem; display: grid; gap: .5rem; align-content: start; }
.strength-title { text-transform: uppercase; letter-spacing: .1em; color: var(--accent); font-weight: 500; }
.strength-body { color: var(--ink-2); font-size: .92em; }

.oppgrid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
@media (max-width: 950px) { .oppgrid { grid-template-columns: 1fr; } }
.opp-box { border: 1px solid var(--rule); background: var(--paper); }
.opp { padding: clamp(1.3rem, 2.2vw, 2rem); display: grid; gap: 1.2rem; height: 100%; align-content: start; }
.opp-head { display: grid; gap: .6rem; }
.opp-title { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.35rem, 2vw, 1.75rem); line-height: 1.1; }
.opp-what { color: var(--ink-2); font-size: .96em; }
.opp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
@media (max-width: 620px) { .opp-cols { grid-template-columns: 1fr; } }
.opp-cols h4 { margin-bottom: .6rem; }
.ticklist { display: grid; gap: .4rem; }
.ticklist li { padding-left: 1.3em; position: relative; font-size: .93em; color: var(--ink-2); }
.ticklist li::before { content: "\2014"; position: absolute; left: 0; color: var(--accent); }
.opp-partner { font-size: .93em; color: var(--ink-2); }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); counter-reset: s; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.steps li { border-top: 1px solid var(--rule); padding-top: .9rem; display: grid; gap: .5rem; align-content: start; }
.step-title { text-transform: uppercase; letter-spacing: .08em; color: var(--accent); font-weight: 500; }
.step-body { color: var(--ink-2); font-size: .93em; }

/* --- values / purpose --------------------------------------------------- */
.valuegrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--gap); }
@media (max-width: 1100px) { .valuegrid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .valuegrid { grid-template-columns: 1fr; } }
.valuegrid > .cornerbox { border: 1px solid var(--grid-line); }
.value { padding: clamp(1.1rem, 1.8vw, 1.6rem); display: grid; gap: .5rem; align-content: start; height: 100%; }
.value-num { color: var(--accent); letter-spacing: .12em; }
.value-title { font-family: var(--font-display); font-weight: 500; font-size: 1.35rem; line-height: 1.1; }
.value-body { color: var(--ink-2); font-size: .92em; }
.purpose { padding: clamp(2rem, 4vw, 3.6rem); max-width: 48ch; display: grid; gap: 1rem; }
.purpose-heading { font-family: var(--font-mono); font-size: var(--t-mono); text-transform: uppercase; letter-spacing: .14em; color: var(--accent); font-weight: 500; }
.purpose-body { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.5rem, 2.8vw, 2.3rem); line-height: 1.22; }

/* --- partners ----------------------------------------------------------- */
.partnergrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
@media (max-width: 900px) { .partnergrid { grid-template-columns: 1fr 1fr; } }
.partnergrid > .cornerbox { border: 1px solid var(--grid-line); }
.partner { padding: 1.4rem; display: grid; gap: .3rem; }
.partner-name { font-family: var(--font-display); font-weight: 500; font-size: 1.2rem; }
.partner-note { color: var(--ink-3); }

/* --- support ------------------------------------------------------------ */
.channelgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
@media (max-width: 1000px) { .channelgrid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .channelgrid { grid-template-columns: 1fr; } }
.channelgrid > .cornerbox { border: 1px solid var(--rule); background: var(--paper); transition: border-color .2s var(--ease); }
.channelgrid > .cornerbox:hover { border-color: var(--ink); }
.channel { padding: clamp(1.2rem, 2vw, 1.8rem); display: grid; gap: .6rem; align-content: start; height: 100%; }
.channel-who { text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); }
.channel-label { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.3rem, 1.9vw, 1.7rem); line-height: 1.1; }
.channel-body { color: var(--ink-2); font-size: .94em; }
.channel-email { margin-top: .2rem; }
.givegrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
@media (max-width: 900px) { .givegrid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .givegrid { grid-template-columns: 1fr; } }
.give { border-top: 1px solid var(--rule); padding-top: .9rem; display: grid; gap: .5rem; align-content: start; }
.give-title { text-transform: uppercase; letter-spacing: .08em; color: var(--accent); font-weight: 500; }
.give-body { color: var(--ink-2); font-size: .93em; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.visit, .newsletter { padding: clamp(1.5rem, 3vw, 2.4rem); display: grid; gap: .9rem; align-content: start; height: 100%; }
.visit-heading, .newsletter-heading { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.4rem, 2.2vw, 1.8rem); }
.visit address, .footer address { font-style: normal; display: grid; gap: .2rem; color: var(--ink-2); }
.visit-note, .newsletter-note { color: var(--ink-3); font-size: .9em; }
.newsletter-form { margin-top: .4rem; display: grid; gap: .5rem; }
.newsletter-form label { text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); }
.newsletter-row { display: flex; gap: .6rem; flex-wrap: wrap; }
.newsletter-row input {
  flex: 1 1 12rem; min-width: 0; background: var(--paper);
  border: 1px solid var(--rule); padding: .85em 1em; color: var(--ink);
}
.newsletter-row input::placeholder { color: var(--ink-3); }
.newsletter-row input:focus-visible { border-color: var(--accent); }

/* --- footer ------------------------------------------------------------- */
.footer {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: repeat(var(--cols), 1fr);
  row-gap: clamp(2rem, 4vw, 3rem);
  padding: clamp(2.5rem, 5vw, 4.5rem) 0 clamp(2rem, 3vw, 3rem);
  border-top: 1px solid var(--ink);
  background: var(--paper-2);
}
.footer-brand { grid-column: 3 / span 7; }
.footer-cols { grid-column: 11 / span 8; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.footer-contact { grid-column: 19 / span 4; display: grid; gap: .6rem; align-content: start; }
.footer-legal { grid-column: 3 / span 20; display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; border-top: 1px solid var(--rule); padding-top: 1.2rem; color: var(--ink-3); }
.footer-name { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.3rem, 2vw, 1.7rem); line-height: 1.15; max-width: 18ch; }
.footer-blurb { margin-top: 1rem; color: var(--ink-2); font-size: .93em; max-width: 42ch; }
.footer-col ul { margin-top: .9rem; display: grid; gap: .45rem; }
.footer-col a, .footer-social a { color: var(--ink-2); font-size: .94em; transition: color .18s var(--ease); }
.footer-col a:hover, .footer-social a:hover { color: var(--accent); }
.footer-contact address { margin-top: .9rem; font-size: .93em; }
.footer-social { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin-top: .8rem; text-transform: uppercase; letter-spacing: .08em; }
@media (max-width: 1100px) {
  .footer-brand { grid-column: 2 / span 10; }
  .footer-cols { grid-column: 13 / span 10; }
  .footer-contact { grid-column: 2 / span 10; }
  .footer-legal { grid-column: 2 / span 22; }
}
@media (max-width: 760px) {
  .footer > * { grid-column: 1 / -1 !important; padding-inline: var(--gap); }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-legal { flex-direction: column; gap: .6rem; }
}

/* --- 404 ---------------------------------------------------------------- */
.band--404 { padding-top: clamp(3rem, 10vw, 8rem); }

/* --- brand colour on display type ---------------------------------------
   Display faces carry #950606; body copy stays near-black so long passages
   (the funders page especially) remain comfortable to read. */
.menu-wordmark, .sectionhead-title, .pillar-title, .eco-title, .eco-cycle-title, .cyclenote-title,
.progsection-note, .program-title, .opp-title, .card-title, .newsitem-title,
.stat-value, .person-name, .press-heading, .story-card-title, .value-title,
.purpose-body, .partner-name, .channel-label, .visit-heading,
.newsletter-heading, .footer-name {
  color: var(--accent);
}
.person--tba .person-name { color: var(--ink-3); }

/* --- print -------------------------------------------------------------- */
@media print {
  body { background: #fff; color: #000; display: block; }
  .menu, .cta, .eco-play, .filters, .skiplink, .newsletter-form { display: none !important; }
  .main { display: block; }
  .main > * { break-inside: avoid; margin-bottom: 2rem; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; }
}

/* --- display titles ------------------------------------------------------
   Each line is a flex row that spreads its letters across the full content
   width. The font-size is estimated from the character count so the gaps the
   spread has to close stay small; letters carry a small deterministic offset
   and tilt so the line never sits perfectly straight. */
.kt {
  container-type: inline-size;
  margin: 0;
  font-weight: 500;
  color: var(--accent);
}
.kt-sr {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.kt-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, calc(100cqw / var(--w)), min(40vh, 22rem));
  line-height: 1.0;
  letter-spacing: 0;
}
.kt-l {
  display: inline-block;
  transform: translateY(var(--dy, 0)) rotate(var(--rot, 0deg));
  transform-origin: 50% 65%;
}
.kt-sp { flex: 0 0 .18em; }
.kt-l.is-outline {
  -webkit-text-stroke: .018em var(--accent);
  color: transparent;
}
/* No container-query support: fall back to a viewport estimate. */
@supports not (container-type: inline-size) {
  .kt-line { font-size: clamp(2.25rem, calc(83vw / var(--w)), min(40vh, 22rem)); }
}

/* --- featured annual lecture --------------------------------------------- */
.featured {
  display: grid;
  grid-template-columns: 17rem 1fr;
  gap: clamp(1.5rem, 3vw, 3rem);
  padding: clamp(1.6rem, 3vw, 2.8rem);
  background: var(--paper-2);
  border-top: 3px solid var(--accent);
  border-bottom: 1px solid var(--rule);
}
.featured-side { display: grid; gap: 1.4rem; align-content: start; }
.featured-series { font-size: .95em; color: var(--ink-2); max-width: 22ch; }
.featured-facts { display: grid; gap: .9rem; }
.featured-facts > div { display: grid; gap: .15rem; border-top: 1px solid var(--rule); padding-top: .55rem; }
.featured-facts dt { text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); }
.featured-facts dd { color: var(--ink); }
.featured-main { display: grid; gap: .9rem; align-content: start; min-width: 0; }
.featured-title {
  font-family: var(--font-display); font-weight: 500; color: var(--accent);
  font-size: clamp(1.5rem, 3vw, 2.5rem); line-height: 1.08; letter-spacing: -.025em;
  max-width: 24ch;
}
.featured-speaker { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.1rem, 1.5vw, 1.35rem); }
.featured-affiliation { color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; margin-top: -.6rem; }
.featured-body { color: var(--ink-2); max-width: 62ch; }
.featured-intro { color: var(--ink-3); }
.featured-respondents { margin-top: .4rem; }
.featured-respondents ul { margin-top: .7rem; display: grid; gap: .35rem; }
.featured-respondents li { padding-left: 1.1em; position: relative; font-size: .93em; color: var(--ink-2); }
.featured-respondents li::before { content: "\2014"; position: absolute; left: 0; color: var(--accent); }
@media (max-width: 900px) { .featured { grid-template-columns: 1fr; } }

/* --- highlights ---------------------------------------------------------- */
.highlights { display: grid; row-gap: var(--gap); }
.featured--secondary { background: transparent; border-top-color: var(--rule); }
.featured--primary { grid-template-areas: "side main" "figure figure"; }
.featured--primary .featured-side { grid-area: side; }
.featured--primary .featured-main { grid-area: main; }
.featured-figure { grid-area: figure; margin: .6rem 0 0; }
.featured-figure img {
  width: 100%; height: auto; display: block;
  border: 1px solid var(--rule);
  aspect-ratio: 4 / 3; object-fit: cover;
}
@media (max-width: 900px) {
  .featured--primary { grid-template-areas: "side" "main" "figure"; }
}

/* --- photographs in event cards ------------------------------------------ */
.card--event { position: relative; }
.card-figure { grid-column: 1 / -1; margin: 0 0 .4rem; }
.card-figure img {
  width: 100%; height: auto; display: block;
  aspect-ratio: 4 / 3; object-fit: cover;
  border-bottom: 1px solid var(--rule);
}

/* --- open call ------------------------------------------------------------ */
.opencall-box { border: 1px solid var(--accent); background: var(--paper-2); }
.opencall { padding: clamp(1.5rem, 3vw, 2.6rem); display: grid; gap: .9rem; max-width: 66ch; }
.opencall-heading {
  font-family: var(--font-display); font-weight: 500; color: var(--accent);
  font-size: clamp(1.5rem, 2.6vw, 2.2rem); line-height: 1.08; letter-spacing: -.025em;
}
.opencall-standfirst { font-family: var(--font-display); font-size: clamp(1.1rem, 1.5vw, 1.35rem); color: var(--ink); }
.opencall-body { color: var(--ink-2); }
.opencall-prize { margin-top: .3rem; }
.opencall-prize .ticklist { margin-top: .6rem; }

/* A lone upcoming card should not sit in a narrow column by itself. */
.cardgrid--events > .cornerbox:only-child { grid-column: span 2; }
@media (max-width: 700px) { .cardgrid--events > .cornerbox:only-child { grid-column: auto; } }

/* --- figures that hold documents as well as photographs ------------------ */
.featured--secondary { grid-template-areas: "side main" "figure figure"; }
.featured--secondary .featured-side { grid-area: side; }
.featured--secondary .featured-main { grid-area: main; }
@media (max-width: 900px) { .featured--secondary { grid-template-areas: "side" "main" "figure"; } }

.featured-figure img {
  aspect-ratio: var(--ratio, 4 / 3);
  object-fit: var(--fit, cover);
  object-position: var(--pos, center);
}
/* A document cover is never cropped; it sits on paper instead. */
.featured-figure img[style*="contain"] { background: var(--paper-3); }
.featured-figure--pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  max-width: 34rem;
}
@media (max-width: 560px) { .featured-figure--pair { grid-template-columns: 1fr; max-width: none; } }
.card-figure img { object-fit: var(--fit, cover); }
.card-figure img[style*="contain"] { background: var(--paper-3); }

/* --- the mark ------------------------------------------------------------
   Inline SVG filled with currentColor, so it recolours with the theme rather
   than needing a second asset for dark mode. */
.mark { display: block; width: auto; color: inherit; }

/* The brand is the way home, so it is present from the first pixel rather
   than fading in once the nav sticks. */
.menu-brand {
  display: flex; align-items: center; gap: .62em; margin-right: auto;
  color: var(--accent);
  transition: opacity .2s var(--ease);
}
.menu-brand:hover { opacity: .68; }
.menu-brand .mark { height: 1.15em; flex: none; }
.menu-brand.is-home { cursor: default; }
.menu-brand.is-home:hover { opacity: 1; }
.menu-wordmark {
  font-family: var(--font-display); font-weight: 500;
  font-size: 1.05rem; letter-spacing: -.02em; color: var(--accent);
  white-space: nowrap;
}
/* The dot that marks the current section also marks home. */
.menu-brand.is-home .mark { position: relative; }
.menu-brand.is-home::after {
  content: "\25CF"; font-size: .45em; color: var(--accent);
  align-self: flex-end; margin: 0 0 .5em -.3em;
}
/* Keep the wordmark on phones: a bare three-bar mark opposite a hamburger
   reads as a second menu button. Shrink it instead of hiding it. */
@media (max-width: 620px) {
  .menu-wordmark { font-size: .92rem; }
  .menu-brand { gap: .5em; }
}

.footer-lockup { display: flex; align-items: flex-start; gap: .7em; }
.footer-lockup .mark { height: 2.6em; flex: none; margin-top: .14em; color: var(--accent); }

/* --- the record ---------------------------------------------------------- */
.record { display: grid; row-gap: clamp(2rem, 4vw, 3.2rem); }
.strand { display: grid; grid-template-columns: 17rem 1fr; gap: clamp(1.5rem, 3vw, 3rem); }
.strand-head { align-content: start; display: grid; gap: .5rem; }
.strand-label {
  font-family: var(--font-display); font-weight: 500; color: var(--accent);
  font-size: clamp(1.2rem, 1.7vw, 1.5rem); line-height: 1.1; letter-spacing: -.02em;
}
.strand-period { color: var(--ink-3); letter-spacing: .1em; }
.strand-note { color: var(--ink-2); font-size: .9em; }
.strand-list { display: grid; }
.strand-list li {
  display: grid; grid-template-columns: 7.5rem 1fr; gap: .2rem 1.2rem;
  padding: .85rem 0; border-top: 1px solid var(--grid-line);
}
.strand-list li:last-child { border-bottom: 1px solid var(--grid-line); }
.strand-date { color: var(--ink-3); letter-spacing: .06em; padding-top: .15em; }
.strand-title { font-size: .98em; }
.strand-who { grid-column: 2; color: var(--ink-3); font-size: .88em; }
@media (max-width: 900px) {
  .strand { grid-template-columns: 1fr; }
  .strand-list li { grid-template-columns: 1fr; gap: .25rem; }
  .strand-who { grid-column: 1; }
}

/* An event whose date is not settled yet says so rather than showing a number. */
.card-date.is-tbd .card-date-day { font-size: 1rem; letter-spacing: .08em; color: var(--ink-3); }

/* One image leads at full width; the rest sit under it as squares. */
.featured-figure--hero {
  display: grid;
  grid-template-columns: repeat(var(--thumbs, 3), 1fr);
  gap: var(--gap);
}
.featured-figure--hero img:first-child { grid-column: 1 / -1; }
@media (max-width: 620px) {
  .featured-figure--hero { grid-template-columns: 1fr 1fr; }
  .featured-figure--hero img:first-child { grid-column: 1 / -1; }
}
