/* Crossroads Convening — transit-map inspired styles */

:root {
  --asphalt: #15171c;
  --asphalt-2: #1e2128;
  --paper: #f4f1ea;
  --white: #ffffff;
  --ink: #15171c;
  --muted: #555a64;
  --muted-dark: #b6bac3;

  --red: #e4402f;
  --red-text: #c4311f;
  --yellow: #f5b700;
  --green: #1f9d55;
  --green-text: #157a41;
  --blue: #2f6fde;
  --blue-text: #2459b8;

  --display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 14px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }

:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  font-family: var(--display);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}

h2 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 850;
  font-stretch: 80%;
  text-transform: uppercase;
}

h3 { font-size: 1.35rem; font-weight: 750; }

p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--yellow); color: var(--ink); padding: 10px 16px;
  font-weight: 700; border-radius: 8px;
}
.skip:focus { top: 12px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Top bar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(21, 23, 28, 0.94);
  backdrop-filter: blur(8px);
  color: var(--white);
  border-bottom: 4px solid transparent;
  border-image: linear-gradient(90deg, var(--red) 0 25%, var(--yellow) 25% 50%, var(--green) 50% 75%, var(--blue) 75% 100%) 1;
}

.topbar__inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 850; font-stretch: 90%;
  font-size: 1.25rem; text-transform: uppercase; letter-spacing: 0.02em;
  text-decoration: none;
}

.nav { display: flex; align-items: center; gap: 4px; }

.nav a {
  text-decoration: none; font-weight: 600; font-size: 0.95rem;
  padding: 8px 12px; border-radius: 999px;
}
.nav a:hover, .nav a[aria-current="page"] { background: var(--asphalt-2); }

.nav .nav__cta { background: var(--yellow); color: var(--ink); margin-left: 6px; }
.nav .nav__cta:hover { background: #ffc933; }

.menu-toggle {
  display: none;
  font: 600 0.95rem var(--body); color: var(--white);
  background: none; border: 2px solid #3a3f4a; border-radius: 999px;
  padding: 6px 14px; cursor: pointer;
}

@media (max-width: 820px) {
  .menu-toggle { display: inline-block; }
  .nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--asphalt); padding: 8px var(--gutter) 16px;
    border-bottom: 1px solid #2b2f37;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 8px; border-radius: 8px; }
  .nav .nav__cta { margin: 8px 0 0; text-align: center; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 750; font-stretch: 95%;
  font-size: 1rem; letter-spacing: 0.01em;
  padding: 14px 22px; border-radius: 999px;
  text-decoration: none; border: 2px solid transparent;
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--yellow { background: var(--yellow); color: var(--ink); }
.btn--yellow:hover { background: #ffc933; }
.btn--ghost { border-color: rgba(255, 255, 255, 0.5); color: var(--white); }
.btn--ghost:hover { border-color: var(--white); }
.btn--dark { background: var(--ink); color: var(--white); }
.btn--lg { font-size: 1.15rem; padding: 18px 30px; }

/* ---------- Hero ---------- */

.hero {
  position: relative; overflow: hidden;
  background: var(--asphalt); color: var(--white);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: url("../img/hero.jpg") center / cover no-repeat;
  opacity: 0.35; filter: grayscale(1);
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--asphalt) 10%, rgba(21, 23, 28, 0.55) 60%, rgba(21, 23, 28, 0.8));
}

.hero__inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: 40px;
  padding-top: clamp(56px, 9vw, 120px); padding-bottom: clamp(56px, 9vw, 120px);
}

.eyebrow {
  font-family: var(--display); font-weight: 700; font-stretch: 100%;
  text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.85rem;
  color: var(--yellow); margin-bottom: 14px;
}

.hero__text { container-type: inline-size; min-width: 0; }

/* Sized to the column so "Crossroads" always stays on one line */
.hero h1 {
  font-size: min(9rem, 17.5cqi);
  font-weight: 900; font-stretch: 72%;
  text-transform: uppercase; line-height: 0.88; letter-spacing: -0.02em;
  white-space: nowrap;
  margin-bottom: 24px;
}

.hero__lede { font-size: clamp(1.1rem, 2vw, 1.3rem); max-width: 34em; color: #e3e5ea; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.hero__map { width: 100%; max-width: 460px; justify-self: center; overflow: visible; }
.hero__map .line { stroke-dasharray: 800; stroke-dashoffset: 800; animation: draw 1.4s ease-out forwards; }
.line--red { stroke: var(--red); }
.line--blue { stroke: var(--blue); animation-delay: 0.15s !important; }
.line--yellow { stroke: var(--yellow); animation-delay: 0.3s !important; }
.line--green { stroke: var(--green); animation-delay: 0.45s !important; }
.hero__map .stops circle { fill: var(--white); stroke: var(--asphalt); stroke-width: 6; opacity: 0; animation: pop 0.4s ease-out 1.1s forwards; }
.hero__map .hub { fill: var(--white); stroke: var(--asphalt); stroke-width: 14; }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { to { opacity: 1; } }

@media (max-width: 820px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__map { max-width: 260px; order: -1; justify-self: start; }
}

/* ---------- Sections ---------- */

.section { padding: clamp(64px, 9vw, 112px) 0; }
.section--paper { background: var(--paper); }
.section--white { background: var(--white); }
.section--dark { background: var(--asphalt); color: var(--white); }

.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 750; text-transform: uppercase;
  letter-spacing: 0.12em; font-size: 0.85rem; margin-bottom: 12px;
}
.kicker::before {
  content: ""; width: 34px; height: 8px; border-radius: 999px; background: currentColor;
}
.kicker--red { color: var(--red-text); }
.kicker--yellow { color: var(--yellow); }
.kicker--blue { color: var(--blue-text); }
.kicker--green { color: var(--green-text); }

.lede { font-size: 1.2rem; max-width: 40em; color: var(--muted); }

.grid-2 { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(24px, 5vw, 72px); }
@media (max-width: 820px) { .grid-2 { grid-template-columns: 1fr; } }

.prose { color: #dfe1e6; }
.prose h3 { color: var(--white); margin-top: 1.6em; }
.prose a { color: var(--yellow); }

.lede--strong { color: var(--ink); font-size: clamp(1.3rem, 2.4vw, 1.65rem); line-height: 1.4; font-weight: 500; max-width: 34em; }

/* ---------- Goals ---------- */

/* Each theme is a transit line; its goals are the stops */
.goal-lines { display: grid; gap: 36px; margin-top: 28px; }
.goal-line {
  --line: var(--red);
  --dot: 28px;
  display: grid; grid-template-columns: 250px minmax(0, 1fr); align-items: start;
}
.goal-line--yellow { --line: var(--yellow); }
.goal-line--green { --line: var(--green); }
.goal-line--blue { --line: var(--blue); }

.goal-line__name {
  display: flex; align-items: center; gap: 12px; margin: 0; padding-top: 2px;
  font-family: var(--display); font-weight: 850; font-stretch: 85%;
  font-size: 1.35rem; line-height: 1.05; text-transform: uppercase; letter-spacing: 0.01em;
}
.goal-line__name::before {
  content: ""; flex: none; width: 24px; height: 24px; border-radius: 7px; background: var(--line);
}

.goal-line ul {
  list-style: none; margin: 0; padding: calc(var(--dot) + 18px) 0 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px;
  position: relative;
}
.goal-line ul::before {
  content: ""; position: absolute; left: 0; right: 0; top: calc((var(--dot) - 10px) / 2);
  height: 10px; border-radius: 999px; background: var(--line);
}
.goal-line li { position: relative; font-size: 1.05rem; line-height: 1.5; max-width: 34em; }
.goal-line li::before {
  content: ""; position: absolute; left: 0; top: calc(-1 * (var(--dot) + 18px));
  width: var(--dot); height: var(--dot); border-radius: 50%;
  background: var(--white); border: 6px solid var(--ink); box-sizing: border-box;
}

@media (max-width: 760px) {
  .goal-lines { gap: 28px; }
  .goal-line { grid-template-columns: 1fr; gap: 14px; }
  .goal-line ul { grid-template-columns: 1fr; gap: 20px; padding: 0 0 0 calc(var(--dot) + 18px); }
  .goal-line ul::before {
    left: calc((var(--dot) - 10px) / 2); right: auto; top: 4px; bottom: 4px; width: 10px; height: auto;
  }
  .goal-line li::before { left: calc(-1 * (var(--dot) + 18px)); top: 0; }
}

/* ---------- People ---------- */

.people { list-style: none; padding: 0; margin: 0 0 1.4em; }
.people li { padding: 7px 0; border-bottom: 1px solid #2f333c; font-weight: 600; color: var(--white); }
.people span { font-weight: 400; color: var(--muted-dark); }

/* ---------- Link cards ---------- */

.link-cards {
  list-style: none; margin: 32px 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px;
}
.link-card {
  display: flex; flex-direction: column; gap: 6px; height: 100%;
  padding: 22px 24px; border-radius: var(--radius); background: var(--white);
  border: 2px solid var(--ink); border-left-width: 10px;
  text-decoration: none; color: var(--muted); transition: transform 0.15s ease;
}
.link-card:hover { transform: translateY(-3px); }
.link-card__title { font-family: var(--display); font-weight: 800; font-size: 1.3rem; color: var(--ink); }
.link-card__title::after { content: " \2192"; }
.link-card--yellow { border-left-color: var(--yellow); }
.link-card--red { border-left-color: var(--red); }
.link-card--green { border-left-color: var(--green); }

/* ---------- 2026 page ---------- */

.subnav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.subnav a {
  text-decoration: none; font-weight: 600; font-size: 0.95rem;
  padding: 8px 16px; border-radius: 999px; border: 2px solid #3a3f4a;
}
.subnav a:hover { border-color: var(--white); }
.doc-hero .kicker a { color: inherit; }

.grid-2--top { align-items: start; }
.overview-text p { font-size: 1.1rem; }

.stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stats li {
  background: var(--asphalt); color: var(--muted-dark); border-radius: var(--radius);
  padding: 20px 22px; font-size: 0.95rem;
}
.stats__num {
  display: block; font-family: var(--display); font-weight: 900; font-stretch: 80%;
  font-size: clamp(2.2rem, 4vw, 3rem); line-height: 1; color: var(--white); margin-bottom: 6px;
}
.stats li:nth-child(1) .stats__num { color: var(--yellow); }
.stats li:nth-child(3) .stats__num { color: #5fd18f; }

/* ---------- Timeline (route) ---------- */

.route {
  --line: 10px;
  --dot: 30px;
  list-style: none; margin: 56px 0 0; padding: 0;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0;
  position: relative;
}

.stop { position: relative; padding: calc(var(--dot) + 26px) 16px 0 0; }

/* the track */
.stop::before {
  content: ""; position: absolute; top: calc((var(--dot) - var(--line)) / 2);
  left: 0; right: 0; height: var(--line); background: var(--red);
}
.stop:first-child::before { left: calc(var(--dot) / 2); }
.stop--terminal::before { right: auto; width: calc(var(--dot) / 2); }
.stop--now::before,
.stop--now ~ .stop::before {
  background: repeating-linear-gradient(90deg, var(--red) 0 18px, transparent 18px 28px);
}

/* the station dot */
.stop::after {
  content: ""; position: absolute; top: 0; left: 0;
  width: var(--dot); height: var(--dot); border-radius: 50%;
  background: var(--white); border: 6px solid var(--ink); box-sizing: border-box;
}
.stop--done::after { background: var(--ink); }
.stop--now::after { background: var(--yellow); box-shadow: 0 0 0 0 rgba(245, 183, 0, 0.6); animation: pulse 2s infinite; }
.stop--terminal::after { width: calc(var(--dot) + 8px); height: calc(var(--dot) + 8px); top: -4px; left: -4px; border-width: 8px; }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(245, 183, 0, 0.6); }
  70% { box-shadow: 0 0 0 16px rgba(245, 183, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 183, 0, 0); }
}

.stop__when {
  display: inline-block; font-family: var(--display); font-weight: 750;
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em;
  background: var(--ink); color: var(--white); padding: 3px 10px; border-radius: 6px; margin-bottom: 10px;
}
.stop--now .stop__when { background: var(--yellow); color: var(--ink); }
.stop__title { font-size: 1.2rem; margin-bottom: 6px; }
.stop p { font-size: 0.95rem; color: var(--muted); margin: 0; }
.stop a { color: var(--ink); font-weight: 600; }

@media (max-width: 980px) {
  .route { grid-auto-flow: row; grid-template-columns: 1fr; margin-top: 40px; }
  .stop { padding: 0 0 36px calc(var(--dot) + 24px); }
  .stop::before {
    top: 0; bottom: 0; left: calc((var(--dot) - var(--line)) / 2); right: auto;
    width: var(--line); height: auto;
  }
  .stop:first-child::before { left: calc((var(--dot) - var(--line)) / 2); top: calc(var(--dot) / 2); }
  .stop--terminal::before { width: var(--line); bottom: auto; height: calc(var(--dot) / 2); }
  .stop--now::before,
  .stop--now ~ .stop::before {
    background: repeating-linear-gradient(180deg, var(--red) 0 18px, transparent 18px 28px);
  }
  .stop--terminal { padding-bottom: 0; }
}

/* ---------- Archive ---------- */

.videos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; margin-top: 40px; }
@media (max-width: 760px) { .videos { grid-template-columns: 1fr; } }

.video-card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  border: 2px solid var(--ink); display: flex; flex-direction: column;
}
.video-card__body { padding: 22px 24px 26px; }
.video-card__body p { color: var(--muted); }

.yt { position: relative; aspect-ratio: 16 / 9; background: var(--asphalt); }
.yt__link, .yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt img { width: 100%; height: 100%; object-fit: cover; }
.yt__play {
  position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px;
  border-radius: 50%; background: var(--red); transition: transform 0.15s ease;
}
.yt__play::after {
  content: ""; position: absolute; left: 30px; top: 22px;
  border-style: solid; border-width: 16px 0 16px 26px; border-color: transparent transparent transparent var(--white);
}
.yt__link:hover .yt__play { transform: scale(1.08); }

.text-link { font-weight: 700; color: var(--blue-text); }

.callout {
  margin-top: 28px; padding: 28px; border-radius: var(--radius);
  background: var(--asphalt); color: var(--white);
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  border-left: 10px solid var(--blue);
}
.callout p { color: var(--muted-dark); margin: 0; max-width: 40em; }
.callout .btn--dark { background: var(--white); color: var(--ink); }

/* ---------- Sponsors ---------- */

.sponsor-foundational {
  display: grid; grid-template-columns: minmax(200px, 360px) 1fr; align-items: center; gap: 32px;
  margin-top: 36px; padding: 28px; border: 2px solid var(--ink); border-radius: var(--radius);
}
.sponsor-foundational p { font-size: 1.15rem; margin: 10px 0 0; }
@media (max-width: 680px) { .sponsor-foundational { grid-template-columns: 1fr; } }

.tag {
  display: inline-block; font-family: var(--display); font-weight: 750; text-transform: uppercase;
  letter-spacing: 0.08em; font-size: 0.8rem; background: var(--green); color: var(--white);
  padding: 4px 10px; border-radius: 6px;
}

.subhead { margin-top: 48px; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.08em; }

.sponsor-grid {
  list-style: none; margin: 16px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px;
}

.sponsor-logo {
  display: flex; align-items: center; justify-content: center;
  height: 130px; padding: 20px; border-radius: var(--radius);
  background: var(--paper); text-decoration: none;
  transition: transform 0.15s ease;
}
a.sponsor-logo:hover { transform: translateY(-3px); }
.sponsor-logo img { max-height: 100%; width: auto; object-fit: contain; }
.sponsor-logo--lg { height: auto; background: none; padding: 0; }
.sponsor-logo--name { font-family: var(--display); font-weight: 750; font-size: 1.2rem; text-align: center; }

.sponsor-ask { margin-top: 32px; color: var(--muted); }
.sponsor-ask a { color: var(--ink); font-weight: 600; }

/* ---------- CTA ---------- */

.cta {
  background: var(--yellow); color: var(--ink);
  padding: clamp(64px, 9vw, 104px) 0; position: relative; overflow: hidden;
}
.cta::before {
  /* crosswalk stripes */
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, rgba(21, 23, 28, 0.06) 0 48px, transparent 48px 96px);
}
.cta__inner { position: relative; text-align: center; max-width: 820px; }
.cta p { font-size: 1.2rem; margin: 0 auto 28px; max-width: 34em; }
.cta .btn--yellow { background: var(--ink); color: var(--white); }
.cta .btn--yellow:hover { background: #000; }

/* ---------- Footer ---------- */

.footer { background: var(--asphalt); color: var(--muted-dark); padding: 40px 0; font-size: 0.95rem; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.footer p { margin: 0; }
.footer a { color: var(--white); }
.brand--footer { color: var(--white); font-size: 1rem; }

/* ---------- Proceedings page ---------- */

.doc-hero {
  background: var(--asphalt); color: var(--white);
  padding: clamp(48px, 7vw, 88px) 0 clamp(40px, 6vw, 72px);
  border-bottom: 10px solid var(--red);
}
.doc-hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  font-weight: 900; font-stretch: 75%;
  text-transform: uppercase; line-height: 0.95;
  max-width: 14em;
}
.doc-hero__meta { color: #d4d7de; font-size: 1.1rem; margin: 0; }
.doc-hero .btn--ghost { background: none; font: inherit; font-family: var(--display); font-weight: 750; font-stretch: 95%; cursor: pointer; }

.doc-layout {
  display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px);
  padding-top: 56px; padding-bottom: 96px;
}

/* Contents, drawn as a transit line */
.toc { position: sticky; top: 92px; align-self: start; max-height: calc(100vh - 110px); overflow-y: auto; padding-right: 4px; }
.toc summary {
  font-family: var(--display); font-weight: 750; text-transform: uppercase;
  letter-spacing: 0.12em; font-size: 0.85rem; color: var(--red-text);
  cursor: pointer; list-style: none; margin-bottom: 16px;
}
.toc summary::-webkit-details-marker { display: none; }
.toc__list, .toc__list ol { list-style: none; margin: 0; padding: 0; }
.toc__list { position: relative; }
.toc__list::before {
  content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 6px;
  border-radius: 3px; background: var(--red);
}
.toc__stop { position: relative; padding-left: 30px; }
.toc__stop a {
  display: block; text-decoration: none; color: var(--muted);
  font-size: 0.9rem; line-height: 1.3; padding: 5px 0;
}
.toc__stop a:hover { color: var(--ink); text-decoration: underline; }
.toc__stop--major { margin-top: 10px; }
.toc__stop--major:first-child { margin-top: 0; }
.toc__stop--major > a { font-family: var(--display); font-weight: 750; font-size: 1rem; color: var(--ink); }
.toc__stop--major::before {
  content: ""; position: absolute; left: 0; top: 5px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--white); border: 5px solid var(--ink); box-sizing: border-box;
}
.toc__stop:not(.toc__stop--major)::before {
  content: ""; position: absolute; left: 6px; top: 11px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--white);
}
.toc__stop.is-active > a { color: var(--ink); font-weight: 700; }
.toc__stop--major.is-active::before { background: var(--yellow); }
.toc__stop:not(.toc__stop--major).is-active::before { background: var(--yellow); box-shadow: 0 0 0 2px var(--ink); }

/* Report text */
.doc { max-width: 70ch; font-size: 1.075rem; }
.doc p, .doc li { line-height: 1.72; }
.doc a { color: var(--blue-text); }
.chapter { padding-bottom: 24px; }
.chapter + .chapter, .footnotes, .credits { border-top: 2px solid #d9d4c8; padding-top: 40px; margin-top: 24px; }
.doc h2 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  display: flex; align-items: center; gap: 14px;
}
.doc h2::before { content: ""; flex: none; width: 40px; height: 10px; border-radius: 999px; background: var(--red); }
.chapter:nth-of-type(4n+2) h2::before { background: var(--yellow); }
.chapter:nth-of-type(4n+3) h2::before { background: var(--green); }
.chapter:nth-of-type(4n) h2::before { background: var(--blue); }
.doc h3 { font-size: 1.5rem; margin-top: 2em; line-height: 1.15; }
.doc h4 {
  font-family: var(--display); font-size: 0.85rem; font-weight: 750;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted);
  margin: 1.8em 0 0.8em;
}
.doc ul, .doc ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.doc li { margin-bottom: 0.5em; }
.doc ul li::marker { color: var(--red); }
.doc ol li::marker { font-family: var(--display); font-weight: 750; color: var(--red-text); }
.doc h2, .doc h3 { scroll-margin-top: 92px; }

.fnref a { text-decoration: none; font-weight: 700; padding: 0 2px; }
.footnotes { font-size: 0.95rem; color: var(--muted); }
.footnotes h2 { font-size: 1.4rem; }
.fnback { text-decoration: none; }

.credits h2 { font-size: 1.6rem; }
.credits__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 40px; }
.credits__group--wide { grid-column: 1 / -1; order: -1; }
.credits h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.08em; margin: 1.2em 0 0.6em; }
.credits ul { list-style: none; padding: 0; }
.credits li { margin: 0 0 0.35em; font-size: 0.97rem; line-height: 1.45; }
.credits p { color: var(--muted); }

@media (max-width: 900px) {
  .doc-layout { grid-template-columns: 1fr; padding-top: 32px; }
  .toc { position: static; max-height: none; overflow: visible; border: 2px solid var(--ink); border-radius: var(--radius); padding: 16px 18px; background: var(--white); }
  .toc summary { margin: 0; display: flex; justify-content: space-between; }
  .toc summary::after { content: "Show"; color: var(--muted); letter-spacing: 0.04em; }
  .toc details[open] summary { margin-bottom: 16px; }
  .toc details[open] summary::after { content: "Hide"; }
}
@media (max-width: 560px) { .credits__grid { grid-template-columns: 1fr; } }

/* Feature link to the proceedings on the home page */
.callout--feature { border-left-color: var(--yellow); margin: 40px 0 0; }
.callout--feature .btn--yellow { flex: none; }

@media print {
  .topbar, .toc, .footer, .hero__actions, .skip { display: none !important; }
  body, .page-doc { background: #fff; color: #000; font-size: 11pt; }
  .doc-hero { background: none; color: #000; padding: 0 0 12pt; border-bottom: 3pt solid #000; }
  .doc-hero .kicker, .doc-hero__meta { color: #000; }
  .doc-layout { display: block; padding: 12pt 0 0; }
  .doc { max-width: none; }
  .doc a { color: #000; }
  .chapter { break-inside: auto; }
  .doc h2, .doc h3, .doc h4 { break-after: avoid; }
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__map .line { animation: none; stroke-dashoffset: 0; }
  .hero__map .stops circle { animation: none; opacity: 1; }
  .stop--now::after { animation: none; }
  .btn, .sponsor-logo, .yt__play, .link-card { transition: none; }
}
