:root {
  --ink: #193235;
  --ink-soft: #496064;
  --paper: #f5f1e9;
  --paper-deep: #e9e2d5;
  --surface: #fffdf8;
  --teal: #12545a;
  --teal-dark: #0b3a40;
  --terracotta: #bf735b;
  --ochre: #c99a4a;
  --line: #d7d1c6;
  --link: #a55343;
  --measure: 78rem;
  --font-display: 'Source Serif 4', serif;
  --font-body: 'Source Sans 3', sans-serif;
  --font-mono: 'Source Code Pro', ui-monospace, monospace;
  --shadow: 0 1.25rem 3rem rgba(25, 50, 53, .08);
}

html[data-theme="dark"], html.dark {
  --ink: #eef1e9;
  --ink-soft: #b8c9c6;
  --paper: #112a2d;
  --paper-deep: #18383a;
  --surface: #1d4140;
  --teal: #8ac2b9;
  --teal-dark: #d5eee5;
  --terracotta: #e49a7e;
  --ochre: #dfbb72;
  --line: #38595a;
  --link: #f1ad91;
  --shadow: 0 1.25rem 3rem rgba(0, 0, 0, .22);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.6;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: var(--link); text-underline-offset: .18em; }
a:hover { color: var(--teal); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.site-header {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  position: relative;
  z-index: 5;
}
.header-inner, .page-wrap, .footer-inner {
  width: min(calc(100% - 3rem), var(--measure));
  margin-inline: auto;
}
.header-inner {
  min-height: 4.75rem;
  padding-block: .7rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  position: relative;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  color: var(--ink);
  text-decoration: none;
  flex: 0 1 auto;
  min-width: 0;
}
.brand-mark { display: block; width: 2.9rem; height: 2.9rem; flex: 0 0 auto; }
.brand-copy { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: .28rem; line-height: 1.05; min-width: 0; }
.wordmark { font-family: var(--font-display); font-size: 1.55rem; font-weight: 700; letter-spacing: .12em; line-height: 1; }
.brand-subtitle { font-size: .62rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); max-width: 13rem; line-height: 1.25; }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; align-items: center; gap: 1.05rem; list-style: none; padding: 0; margin: 0; }
.site-nav li { flex: 0 0 auto; }
.site-nav a { display: inline-flex; align-items: center; min-height: 2.25rem; color: var(--ink); font-size: .92rem; line-height: 1.2; text-decoration: none; font-weight: 600; white-space: nowrap; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--terracotta); }
.header-actions { display: flex; align-items: center; gap: .35rem; flex: 0 0 auto; }
.header-inner > .button { flex: 0 0 auto; white-space: nowrap; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: .68rem 1.05rem;
  border: 1px solid var(--teal);
  border-radius: 999px;
  background: var(--teal);
  color: #fffdf8;
  font-weight: 600;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease;
}
.button:hover { color: #fffdf8; background: var(--teal-dark); transform: translateY(-2px); }
.button--quiet { background: transparent; color: var(--teal); }
.button--quiet:hover { color: var(--teal-dark); background: var(--paper-deep); }
.theme-toggle, .menu-toggle { border: 0; background: transparent; color: var(--ink); width: 2.5rem; height: 2.5rem; border-radius: 50%; display: inline-grid; place-items: center; padding: 0; line-height: 1; flex: 0 0 auto; }
.theme-toggle:hover, .menu-toggle:hover { background: var(--paper-deep); }
.theme-toggle { font-size: 1.1rem; }
.menu-toggle { display: none; font-size: 1.4rem; }

.eyebrow { color: var(--terracotta); font-family: var(--font-mono); font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.08; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.8rem, 6vw, 5.4rem); letter-spacing: -.035em; }
h2 { font-size: clamp(2rem, 4vw, 3.35rem); letter-spacing: -.025em; }
h3 { font-size: 1.55rem; }
p { margin: 0 0 1.15rem; }
.lead { color: var(--ink-soft); font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.45; max-width: 43rem; }

.hero {
  min-height: 39rem;
  display: grid;
  align-items: end;
  position: relative;
  isolation: isolate;
  color: #fffdf8;
  background: var(--teal-dark);
}
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7, 32, 35, .95) 0%, rgba(7, 32, 35, .62) 47%, rgba(7, 32, 35, .16) 100%); z-index: -1; }
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: .9; }
.hero-content { width: min(calc(100% - 3rem), var(--measure)); margin: 0 auto; padding: 7rem 0 5rem; }
.hero h1 { max-width: 11ch; margin: .7rem 0 1.3rem; }
.hero .lead { color: #e7eee9; max-width: 37rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.hero .button--quiet { color: #fffdf8; border-color: rgba(255,255,255,.55); }
.hero .button--quiet:hover { background: rgba(255,255,255,.15); }

.section { padding: 6rem 0; }
.section--tight { padding: 4rem 0; }
.section--tint { background: var(--paper-deep); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin-bottom: 2.4rem; }
.section-heading h2 { max-width: 14ch; }
.section-heading p { max-width: 31rem; color: var(--ink-soft); margin: 0; }
.congress-feature { background: var(--teal); color: #f9f5ec; position: relative; overflow: hidden; }
.congress-feature::after { content: ""; position: absolute; width: 22rem; height: 22rem; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; right: -5rem; top: -9rem; box-shadow: 0 0 0 2.5rem rgba(255,255,255,.04), 0 0 0 5rem rgba(255,255,255,.035); }
.congress-inner { width: min(calc(100% - 3rem), var(--measure)); margin: auto; padding: 3.5rem 0; display: grid; grid-template-columns: 1.3fr .7fr; gap: 4rem; align-items: center; }
.congress-feature h2 { max-width: 11ch; }
.congress-feature p { color: #d8e8df; max-width: 37rem; }
.event-details { display: grid; gap: .9rem; border-left: 1px solid rgba(255,255,255,.35); padding-left: 2rem; }
.event-detail { display: grid; gap: .12rem; }
.event-detail strong { font-family: var(--font-display); font-size: 1.35rem; }
.event-detail span { color: #c1d8d1; font-size: .9rem; }

.pillar-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; max-width: 68rem; }
.pillar { padding: 1.7rem 1.5rem 1.4rem; border-top: 3px solid var(--terracotta); background: var(--surface); box-shadow: var(--shadow); }
.pillar:nth-child(2) { border-top-color: var(--ochre); }
.pillar:nth-child(3) { border-top-color: var(--teal); }
.pillar-number { font-family: var(--font-mono); color: var(--ink-soft); font-size: .75rem; }
.pillar h3 { margin: 1.8rem 0 .6rem; }
.pillar p { color: var(--ink-soft); font-size: .98rem; }
.text-link { font-weight: 700; text-decoration-thickness: 1px; }

.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: 1.5rem; align-items: start; }
.story-card { background: var(--surface); min-width: 0; }
.story-image { display: block; position: relative; aspect-ratio: 1.45 / 1; overflow: hidden; background: var(--paper-deep); }
.story-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.story-card-body { padding: 1.25rem 1.25rem 1.4rem; }
.story-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .75rem; color: var(--ink-soft); font-family: var(--font-mono); font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; }
.category-label { color: var(--terracotta); }
.story-card h3 { margin: .75rem 0 .45rem; font-size: 1.45rem; }
.story-card p { color: var(--ink-soft); font-size: .95rem; }
.empty-state { padding: 1.25rem; color: var(--ink-soft); border: 1px dashed var(--line); }

.quote-band { padding: 5.5rem 0; background: var(--teal-dark); color: #f5f1e9; }
.quote-inner { width: min(calc(100% - 3rem), 60rem); margin: auto; text-align: center; }
.quote-mark { color: var(--ochre); font-family: var(--font-display); font-size: 4rem; line-height: .5; }
.quote-inner blockquote { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.15; margin: 1.2rem 0 1.2rem; }
.quote-inner cite { color: #c5d6d1; font-style: normal; font-size: .9rem; }

.newsletter { display: grid; grid-template-columns: .9fr 1.1fr; gap: 3rem; align-items: center; }
.newsletter-copy p { color: var(--ink-soft); }
.form-row { display: flex; gap: .7rem; }
.field { width: 100%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: .3rem; padding: .75rem .85rem; }
.field:focus { outline: 2px solid var(--ochre); outline-offset: 2px; }
.form-note { color: var(--ink-soft); font-size: .85rem; margin-top: .75rem; }
.form-success { color: var(--teal); font-weight: 600; }

.page-intro { padding: 5.5rem 0 3.5rem; border-bottom: 1px solid var(--line); }
.page-intro h1 { max-width: 14ch; margin: .7rem 0 1rem; }
.page-intro .lead { max-width: 42rem; }
.rail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 12rem; gap: 3rem; align-items: start; }
.rail-layout:has([data-side-links][hidden]) { grid-template-columns: minmax(0, 1fr); }
.side-links { border-left: 2px solid var(--ochre); padding-left: 1rem; position: sticky; top: 1.5rem; }
.side-links h2 { font-family: var(--font-body); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.side-links ol { list-style: none; padding: 0; margin: .7rem 0 0; }
.side-links li { border-top: 1px solid var(--line); padding: .65rem 0; font-size: .86rem; }
.side-links a { color: var(--ink); text-decoration: none; }
[data-side-links][hidden] { display: none; }
.content-measure { max-width: 64rem; }
.content-measure h2 { margin: 3.6rem 0 1rem; font-size: 2.25rem; }
.content-measure h3 { margin: 2rem 0 .6rem; }
.content-measure p, .content-measure li { max-width: 47rem; }
.content-measure ul { padding-left: 1.25rem; }
.callout { margin: 2.5rem 0; padding: 1.6rem 1.8rem; border-left: 4px solid var(--terracotta); background: var(--surface); }
.callout p:last-child { margin-bottom: 0; }

.congress-hero { display: grid; grid-template-columns: minmax(0, 1fr) 22rem; gap: 3rem; align-items: end; }
.congress-hero-image { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.timeline { border-top: 1px solid var(--line); }
.timeline-item { display: grid; grid-template-columns: 9rem 1fr; gap: 2rem; padding: 1.3rem 0; border-bottom: 1px solid var(--line); }
.timeline-time { font-family: var(--font-mono); color: var(--terracotta); font-size: .78rem; }
.timeline h3 { font-size: 1.3rem; margin-bottom: .3rem; }
.timeline p { color: var(--ink-soft); margin: 0; }
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.info-card { padding: 1.4rem; border: 1px solid var(--line); background: var(--surface); }
.info-card h3 { margin-bottom: .5rem; }
.info-card p { color: var(--ink-soft); margin: 0; }

.archive-toolbar { display: flex; gap: .8rem; align-items: end; flex-wrap: wrap; margin-bottom: 2.2rem; }
.archive-toolbar label { display: grid; gap: .35rem; flex: 1 1 18rem; color: var(--ink-soft); font-size: .85rem; font-weight: 600; }
.filter-list { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 2rem; }
.filter-list a { border: 1px solid var(--line); border-radius: 999px; padding: .4rem .75rem; color: var(--ink-soft); text-decoration: none; font-size: .85rem; }
.filter-list a:hover { border-color: var(--terracotta); color: var(--terracotta); }
.archive-results { display: grid; gap: 1rem; }
.archive-results .story-card { display: grid; grid-template-columns: 12rem 1fr; }
.archive-results .story-image { height: 100%; min-height: 10rem; aspect-ratio: auto; }

.byline { display: flex; gap: 1rem; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--line); margin-bottom: 2rem; }
.byline img { width: 3rem; height: 3rem; border-radius: 50%; object-fit: cover; }
.byline p { color: var(--ink-soft); font-size: .9rem; margin: .2rem 0 0; }
.article-shell { max-width: 67rem; }
.article-header { max-width: 50rem; margin-bottom: 2rem; }
.article-header h1 { font-size: clamp(2.5rem, 5vw, 4.7rem); margin: .7rem 0 1rem; }
.article-deck { color: var(--ink-soft); font-size: 1.25rem; }
.article-cover { width: 100%; max-height: 34rem; object-fit: cover; margin: 1.5rem 0 2.5rem; }
.prose { max-width: 47rem; }
.prose p { font-family: var(--font-body); font-size: 1.14rem; line-height: 1.75; margin-bottom: 1.5rem; }
.prose h2 { font-size: 2.2rem; margin: 3rem 0 1rem; }
.prose h3 { margin: 2rem 0 .7rem; }
.prose a { color: var(--link); font-weight: 600; }
.prose li { margin: .45rem 0; }

.site-footer { margin-top: 5rem; padding: 3rem 0 1.5rem; background: var(--teal-dark); color: #d9e8df; }
.footer-inner { display: grid; grid-template-columns: 1.3fr .7fr .7fr; gap: 3rem; }
.footer-brand { color: #f5f1e9; }
.footer-brand p { max-width: 22rem; font-size: .9rem; }
.site-footer h2 { font-family: var(--font-body); color: #f5f1e9; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: .7rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: .35rem 0; font-size: .9rem; }
.site-footer a { color: #d9e8df; }
.footer-bottom { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.2); padding-top: 1.2rem; font-size: .78rem; color: #9ebbb3; }

@media (max-width: 74rem) {
  .header-inner { gap: 1rem; }
  .site-nav ul { gap: .8rem; }
  .site-nav a { font-size: .86rem; }
  .header-inner > .button { display: none; }
}
@media (max-width: 64rem) {
  .brand-subtitle { display: none; }
  .menu-toggle { display: inline-grid; }
  .site-nav { position: absolute; top: calc(100% + .35rem); left: 0; right: 0; margin: 0; background: var(--surface); border: 1px solid var(--line); padding: .35rem .75rem; box-shadow: var(--shadow); display: none; z-index: 6; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav li { border-bottom: 1px solid var(--line); }
  .site-nav li:last-child { border-bottom: 0; }
  .site-nav a { display: flex; padding: .75rem .15rem; white-space: normal; font-size: 1rem; }
  .header-actions { margin-left: auto; }
}
@media (max-width: 62rem) {
  .congress-inner, .newsletter { grid-template-columns: 1fr; gap: 2rem; }
  .event-details { border-left: 0; border-top: 1px solid rgba(255,255,255,.35); padding: 1.5rem 0 0; grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 48rem) {
  .header-inner, .page-wrap, .footer-inner, .hero-content, .congress-inner { width: min(calc(100% - 2rem), var(--measure)); }
  .header-inner { min-height: 4.25rem; }
  .brand-mark { width: 2.5rem; height: 2.5rem; }
  .wordmark { font-size: 1.3rem; }
  .section { padding: 4rem 0; }
  .hero { min-height: 35rem; }
  .hero-content { padding: 5rem 0 3.5rem; }
  .hero h1 { font-size: clamp(2.8rem, 13vw, 4.3rem); }
  .section-heading { display: block; }
  .section-heading p { margin-top: 1rem; }
  .pillar-grid, .info-grid { grid-template-columns: 1fr; }
  .event-details { grid-template-columns: 1fr; }
  .rail-layout { display: block; }
  .side-links { position: static; margin-top: 3rem; }
  .congress-hero { grid-template-columns: 1fr; gap: 2rem; }
  .timeline-item { grid-template-columns: 1fr; gap: .35rem; }
  .form-row { display: grid; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { grid-column: 1 / -1; }
  .archive-results .story-card { grid-template-columns: 1fr; }
  .archive-results .story-image { min-height: 12rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
