/* SaferQuito — site styles */

@font-face {
  font-family: "Poppins";
  font-weight: 300;
  font-style: normal;
  font-display: swap;
  src: url("/fonts/poppins-300.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("/fonts/poppins-400.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("/fonts/poppins-500.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("/fonts/poppins-600.woff2") format("woff2");
}

:root {
  --ink: #16262a;
  --forest: #1d3a36;
  --text: #24302f;
  --muted: #56635f;
  --paper: #f6f4ef;
  --sand: #ebe6da;
  --line: #dcd7ca;
  --white: #ffffff;
  --amber: #e9a15b;
  --amber-soft: #f6e3cb;
  --clay: #b84e25;
  --clay-dark: #9a3f1c;

  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --wrap: 1180px;
  --gutter: clamp(20px, 5vw, 48px);
  --section: clamp(64px, 10vw, 128px);
  --radius: 14px;
  --radius-pill: 999px;
}

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

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* An element with the "hidden" attribute stays hidden, also when a class sets "display". */
[hidden] {
  display: none !important;
}

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

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.2;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.35rem, 6.4vw, 4.5rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.9rem);
  letter-spacing: -0.015em;
}

h3 {
  font-size: 1.25rem;
}

h4 {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--clay);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--clay-dark);
}

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

[id] {
  scroll-margin-top: 24px;
}

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

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--ink);
}

.skip:focus {
  top: 16px;
}

/* ---------- Header ---------- */

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 5;
  padding-block: 22px;
  color: var(--white);
}

.site-header__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
}

.brand {
  margin: 0;
  color: var(--white);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand:hover {
  color: var(--white);
}

.brand span {
  color: var(--amber);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 26px;
  font-size: 0.95rem;
}

.nav a {
  padding-block: 6px;
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
}

.nav a:hover {
  color: var(--white);
  text-decoration: underline;
}

.nav .nav__cta {
  padding: 9px 20px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-pill);
  color: var(--white);
}

.nav .nav__cta:hover {
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
}

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

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-block;
  font-family: inherit;
  cursor: pointer;
  padding: 16px 30px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.btn--primary {
  background: var(--clay);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--clay-dark);
  color: var(--white);
}

.btn--ghost {
  border-color: rgba(255, 255, 255, 0.55);
  background: transparent;
  color: var(--white);
}

.btn--ghost:hover {
  background: var(--white);
  color: var(--ink);
}

.btn--dark {
  background: var(--ink);
  color: var(--white);
}

.btn--dark:hover {
  background: var(--forest);
  color: var(--white);
}

.link-action {
  font-weight: 500;
}

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

.hero {
  display: flex;
  align-items: flex-end;
  min-height: min(92vh, 860px);
  padding-block: 170px clamp(56px, 9vw, 110px);
  background:
    linear-gradient(180deg, rgba(22, 38, 42, 0.85) 0%, rgba(22, 38, 42, 0) 32%),
    linear-gradient(90deg, rgba(22, 38, 42, 0.95) 0%, rgba(22, 38, 42, 0.84) 45%, rgba(22, 38, 42, 0.3) 100%),
    var(--ink) url("/img/hero-wide.jpg") center / cover no-repeat;
  color: var(--white);
}

.hero h1 {
  max-width: 20ch;
  color: var(--white);
}

/* The second part of the headline: three short sentences. */
.hero__claims {
  display: block;
  margin-top: 0.4em;
  color: var(--amber);
  font-size: clamp(1.3rem, 0.42em, 2rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.hero__claims span {
  white-space: nowrap;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--amber);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow--dark {
  color: var(--clay);
}

.lead {
  font-size: clamp(1.1rem, 1.9vw, 1.35rem);
  font-weight: 300;
  line-height: 1.65;
}

.hero .lead {
  max-width: 56ch;
  margin-block: 26px 34px;
  color: rgba(255, 255, 255, 0.9);
}

.lead--narrow {
  max-width: 62ch;
}

/* ---------- Dates ---------- */

.dates {
  padding-block: clamp(36px, 5vw, 56px);
  background: var(--forest);
  color: var(--white);
}

/* The tiles are wider than the other content, so the titles and the project
   names fit on one line on a desktop. */
.dates .wrap {
  max-width: calc(var(--wrap) + 100px);
}

.dates__title {
  margin-bottom: 22px;
  color: var(--amber);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

.date {
  display: flex;
  gap: 18px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
}

.date--deadline {
  border-color: var(--amber);
}

/* A past event: a dim tile. Its date card goes to the result on the page. */
.date--past {
  border-color: rgba(255, 255, 255, 0.08);
  background: none;
  opacity: 0.7;
}

/* The date card of a past event is dimmer than its tile, so the cards of the
   next events stand out. */
.date--past .date__day {
  opacity: 0.55;
}

/* The two columns. The links are at the bottom edge of each tile. */
.date__side {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
}

.date__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

/* The menu of a date card: the calendars that can take the event. Its top is
   on the top of the tile, with the same date card, title, and project. */
.cal-menu {
  position: absolute;
  z-index: 1001;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05)), var(--forest);
  color: var(--text);
  box-shadow: 0 18px 44px rgba(22, 38, 42, 0.4);
  font-size: 0.95rem;
  line-height: 1.45;
}

/* The menu grows from the date card. */
.cal-menu--open {
  animation: cal-menu-open 0.2s ease-out;
}

@keyframes cal-menu-open {
  from {
    clip-path: inset(var(--clip-top) var(--clip-right) var(--clip-bottom) var(--clip-left) round 10px);
  }

  to {
    clip-path: inset(0 round var(--radius));
  }
}

.cal-menu__head {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: var(--tile-inset) var(--tile-inset) 16px;
}

.cal-menu__head .date__day {
  cursor: pointer;
}

.cal-menu__event {
  margin: 0 0 4px;
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.2;
}

.cal-menu__project {
  margin: 0;
  color: var(--amber);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.55;
}

.cal-menu__body {
  padding: 16px var(--tile-inset) 14px;
  background: var(--white);
}

.cal-menu__title {
  margin: 0 0 8px;
  color: var(--ink);
  font-weight: 600;
}

.cal-menu__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* The icon is in the first column. The name and the note are in the second. */
.cal-menu__list a {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  margin: 0 -10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}

.cal-menu__list a:hover,
.cal-menu__list a:focus-visible {
  background: var(--paper);
  color: var(--clay-dark);
}

.cal-menu__icon {
  grid-row: 1 / span 2;
  align-self: start;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cal-menu__icon-frame {
  fill: var(--icon-body);
  stroke: var(--icon-frame);
}

.cal-menu__icon-band {
  fill: var(--icon-band);
  stroke: var(--icon-band);
}

.cal-menu__icon-rings {
  stroke: var(--icon-rings);
}

.cal-menu__icon-out {
  stroke: var(--icon-arrow);
}

/* The colors suggest each calendar. The shapes are the same for all. */
.cal-menu__icon--google {
  --icon-body: #4285f4;
  --icon-frame: #1a73e8;
  --icon-band: #1a73e8;
  --icon-rings: #ea4335;
  --icon-arrow: #ffffff;
}

.cal-menu__icon--outlook {
  --icon-body: #0f6cbd;
  --icon-frame: #0a4a85;
  --icon-band: #0a4a85;
  --icon-rings: #0a4a85;
  --icon-arrow: #ffffff;
}

.cal-menu__icon--apple {
  --icon-body: #ffffff;
  --icon-frame: #6e6e73;
  --icon-band: #ff3b30;
  --icon-rings: #6e6e73;
  --icon-arrow: #6e6e73;
}

.cal-menu__icon--file {
  --icon-body: #ffffff;
  --icon-frame: #6e6e73;
  --icon-band: #a1a1a6;
  --icon-rings: #6e6e73;
  --icon-arrow: #6e6e73;
}

.cal-menu__note {
  grid-column: 2;
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 400;
}

.cal-menu__close {
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--clay);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* The place of the event: the map or the online meeting. */
.date a.date__place {
  align-self: center;
}

.date__day {
  display: block;
  flex: none;
  width: 75px;
  padding-top: 9px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1.1;
  text-align: center;
}

.date__day span {
  display: block;
  color: var(--clay);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* The time of the event: a band at the bottom of the card. */
.date__day .date__hour {
  margin-top: 6px;
  padding: 5px 0 6px;
  background: var(--line);
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

.date h3 {
  margin-bottom: 4px;
  color: var(--white);
  font-size: 1.1rem;
}

.date p {
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* The date card adds the event to a calendar (site/cal/). A tentative date
   goes to the city project page, where the visitor can confirm it. */
.date a.date__add,
.date a.date__done,
.date a.date__tentative {
  display: block;
  flex: none;
  align-self: flex-start;
  margin-top: 0;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.date a.date__add:hover,
.date a.date__done:hover,
.date a.date__tentative:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 3px var(--amber);
}

/* A check mark before "Done". */
.date__done .date__hour::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 8px;
  margin-right: 6px;
  border: solid var(--forest);
  border-width: 0 2px 2px 0;
  vertical-align: 1px;
  transform: rotate(45deg);
}

/* The project that the date applies to. */
.date .date__project {
  margin-bottom: 10px;
  color: var(--amber);
  font-size: 0.88rem;
  font-weight: 500;
}

.date a {
  margin-top: auto;
  align-self: flex-start;
  color: var(--amber);
  font-size: 0.95rem;
}

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

.section {
  padding-block: var(--section);
}

.section--paper {
  background: var(--paper);
}

.section--accent {
  background: var(--amber-soft);
}

.section--dark {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.84);
}

.section--dark h2,
.section--dark h3 {
  color: var(--white);
}

.section h2 {
  margin-bottom: 24px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(24px, 6vw, 88px);
  align-items: start;
}

.prose {
  max-width: 64ch;
}

.prose > :last-child {
  margin-bottom: 0;
}

.note {
  max-width: 80ch;
  margin-top: 22px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

blockquote {
  margin: 28px 0;
  padding: 4px 0 4px 26px;
  border-left: 3px solid var(--clay);
}

blockquote p {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 300;
  line-height: 1.65;
}

cite {
  color: var(--muted);
  font-size: 0.9rem;
  font-style: normal;
}

/* ---------- Stats ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: clamp(40px, 6vw, 72px) 0 0;
  border-top: 1px solid var(--line);
}

.stats div {
  padding: 28px 24px 0 0;
}

.stats dt {
  color: var(--ink);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.stats dd {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ---------- Projects ---------- */

.project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
  margin-top: clamp(40px, 6vw, 80px);
}

.project + .project {
  padding-top: clamp(40px, 6vw, 80px);
  border-top: 1px solid var(--line);
}

.project--flip .project__media {
  order: 2;
}

.project__media {
  position: sticky;
  top: 24px;
  margin: 0;
}

.project__media img {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.85rem;
}

.tag {
  display: inline-block;
  margin-bottom: 14px;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  background: var(--sand);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 500;
}

.project h3 {
  margin-bottom: 18px;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.015em;
}

.status {
  padding: 16px 20px;
  border-radius: var(--radius);
  background: var(--amber-soft);
  color: var(--ink);
  line-height: 1.6;
}

.facts {
  margin: 26px 0 0;
}

.facts div {
  display: grid;
  grid-template-columns: 11.5rem minmax(0, 1fr);
  gap: 16px;
  padding-block: 13px;
  border-top: 1px solid var(--line);
}

.facts dt {
  color: var(--muted);
  font-size: 0.92rem;
}

.facts dd {
  margin: 0;
  color: var(--ink);
  line-height: 1.6;
}

.can-do {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.can-do h4 {
  margin-bottom: 14px;
}

.ticks {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ticks li {
  position: relative;
  margin-bottom: 10px;
  padding-left: 26px;
  line-height: 1.55;
}

.ticks li:last-child {
  margin-bottom: 0;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--clay);
}

/* ---------- Cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: clamp(32px, 5vw, 56px);
}

.card {
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

/* The number and the title are on one line. */
.card__num {
  float: left;
  margin: 0.35em 12px 0 0;
  color: var(--amber);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1;
}

.card h3 {
  clear: none;
  margin-bottom: 12px;
  font-size: 1.35rem;
}

.card h3 + p {
  clear: both;
}

.card p:last-child {
  margin-bottom: 0;
  font-size: 0.98rem;
}

/* ---------- Steps ---------- */

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  container-type: inline-size;
}

.steps > li {
  position: relative;
  padding: 0 0 30px 68px;
  counter-increment: step;
}

.steps > li + li {
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  font-weight: 500;
  line-height: 44px;
  text-align: center;
}

.steps > li + li::before {
  top: 30px;
}

.steps h3 {
  margin-bottom: 8px;
  padding-top: 8px;
}

.steps p {
  margin-bottom: 8px;
}

.steps .btn {
  margin-top: 10px;
}

/* A button for each letter, with its deadline */

.sign {
  display: grid;
  grid-template-columns: max-content max-content;
  gap: 12px 20px;
  align-items: center;
  margin-top: 18px;
}

.steps .sign .btn {
  margin-top: 0;
}

.steps .sign__due {
  margin: 0;
  font-weight: 500;
}

@container (max-width: 480px) {
  .sign {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 6px;
  }

  .steps .sign .btn {
    padding-inline: 12px;
  }

  .steps .sign__due {
    text-align: center;
  }

  .steps .sign__due:not(:last-child) {
    margin-bottom: 8px;
  }
}

/* ---------- Link list ---------- */

.links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: clamp(28px, 4vw, 48px) 0 0;
  padding: 0;
  list-style: none;
}

.links a {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, background-color 0.15s;
}

.links a:hover {
  border-color: var(--ink);
  background: var(--paper);
}

.links h3 {
  margin-bottom: 10px;
  font-size: 1.15rem;
  line-height: 1.35;
}

.links p {
  font-size: 0.96rem;
  line-height: 1.6;
}

.links p + p {
  margin-top: 10px;
}

.links__host {
  margin-top: auto;
  color: var(--clay);
  font-size: 0.88rem;
  font-weight: 500;
}

/* ---------- Corridor map ---------- */

.map {
  margin: 28px 0 0;
}

.map__frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ink);
}

.map__frame img {
  width: 100%;
}

.map__overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.map__site {
  fill: rgba(233, 161, 91, 0.4);
  stroke: #ffd9a8;
  stroke-width: 3px;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.map__road {
  fill: var(--white);
  font-family: var(--font);
  font-weight: 500;
  paint-order: stroke;
  stroke: rgba(15, 27, 30, 0.88);
  stroke-linejoin: round;
}

.map__labels--wide .map__road {
  font-size: 28px;
  stroke-width: 7px;
}

.map__labels--narrow .map__road {
  font-size: 52px;
  stroke-width: 13px;
}

.map__pin circle {
  stroke: var(--white);
}

.map__pin--site circle {
  fill: var(--clay);
}

.map__pin--school circle {
  fill: var(--ink);
}

.map__pin text {
  fill: var(--white);
  font-family: var(--font);
  font-weight: 600;
  text-anchor: middle;
}

.map__scale path {
  fill: none;
  stroke: var(--white);
}

.map__north path {
  fill: var(--white);
  stroke: rgba(15, 27, 30, 0.88);
  stroke-width: 3px;
  stroke-linejoin: round;
}

.map__labels--narrow {
  display: none;
}

.map-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 32px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.map-legend li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  line-height: 1.5;
}

.map-legend__num {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 28px;
  text-align: center;
}

.map-legend__num--site {
  background: var(--clay);
}

.map-legend__num--school {
  background: var(--ink);
}

/* ---------- Mailing list options ---------- */

.options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: clamp(28px, 4vw, 44px);
}

/* The second group of options, "Write to the organizers". */
.connect__subtitle {
  margin-top: clamp(40px, 6vw, 64px);
  margin-bottom: 12px;
  font-size: 1.5rem;
}

.option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 30px;
  border-radius: var(--radius);
  background: var(--white);
}

.option__label {
  margin: 0 0 10px;
  color: var(--clay);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.option h3 {
  margin-bottom: 16px;
  font-size: 1.35rem;
}

.option__steps {
  margin: 0 0 16px;
  padding-left: 1.3em;
}

.option__steps li {
  margin-bottom: 6px;
  padding-left: 4px;
  line-height: 1.55;
}

.option__note {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.option .btn {
  margin-top: auto;
}

/* Mailing list, option 2: the block below the button. */
.reveal {
  width: 100%;
  margin-top: 20px;
}

.reveal .address {
  margin-bottom: 0;
}

.address {
  width: 100%;
  margin: 0 0 20px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  overflow-wrap: break-word;
}

/* ---------- Enlarged image ---------- */

.lightbox-link {
  display: block;
  cursor: zoom-in;
}

/* The page behind the dialog does not scroll. */
html:has(.lightbox[open]) {
  overflow: hidden;
}

.lightbox {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: transparent;
}

.lightbox::backdrop {
  background: rgba(22, 38, 42, 0.95);
}

/* The image is in the center of the area below the button. */
.lightbox__image {
  position: absolute;
  inset: 68px 16px 16px;
  max-width: calc(100% - 32px);
  max-height: calc(100% - 84px);
  margin: auto;
  border-radius: var(--radius);
  background: var(--white);
}

.lightbox .lightbox__close {
  position: absolute;
  top: 12px;
  right: 16px;
  width: auto;
  padding: 10px 22px;
}

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

.site-footer {
  padding-block: 56px;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
  line-height: 1.65;
}

.site-footer__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 32px clamp(24px, 6vw, 88px);
}

.site-footer p {
  margin-bottom: 8px;
}

.site-footer strong {
  color: var(--white);
  font-weight: 500;
}

.brand--footer {
  font-size: 1.35rem;
}

/* ---------- Small screens ---------- */

@media (max-width: 900px) {
  .split,
  .project,
  .site-footer__row {
    grid-template-columns: minmax(0, 1fr);
  }

  .project--flip .project__media {
    order: 0;
  }

  .project__media {
    position: static;
  }

  .cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .options {
    grid-template-columns: minmax(0, 1fr);
  }

  .option {
    padding: 24px;
  }

  .address {
    font-size: 0.8rem;
  }
}

@media (max-width: 800px) {
  .map__labels--wide {
    display: none;
  }

  .map__labels--narrow {
    display: inline;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 1rem;
  }

  .site-header {
    padding-block: 16px;
  }

  .nav {
    gap: 2px 18px;
    font-size: 0.9rem;
  }

  .nav .nav__cta {
    display: none;
  }

  .hero {
    min-height: 0;
    padding-top: 150px;
    background:
      linear-gradient(180deg, rgba(22, 38, 42, 0.88) 0%, rgba(22, 38, 42, 0.8) 100%),
      var(--ink) url("/img/hero-tall.jpg") center / cover no-repeat;
  }

  .map {
    margin-inline: calc(var(--gutter) * -1);
  }

  .map__frame {
    border-radius: 0;
  }

  .map figcaption {
    padding-inline: var(--gutter);
  }

  .map-legend {
    grid-template-columns: minmax(0, 1fr);
  }

  .btn {
    width: 100%;
  }

  .facts div {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .steps > li {
    padding-left: 58px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .links a,
  .date a.date__add,
  .date a.date__done,
  .date a.date__tentative {
    transition: none;
  }

  .date a.date__add:hover,
  .date a.date__done:hover,
  .date a.date__tentative:hover {
    transform: none;
  }

  .cal-menu--open {
    animation: none;
  }
}

@media print {
  .site-header,
  .hero .actions {
    display: none;
  }

  .hero,
  .dates,
  .section--dark,
  .site-footer {
    background: none;
    color: #000;
  }
}

/* ---------- Terms ---------- */

/* A term with an explanation. The script shows the explanation in a popup.
   Without the script, the link goes to the glossary. */
a.term {
  color: inherit;
  text-decoration: underline dotted;
  text-decoration-color: var(--clay);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  white-space: nowrap;
}

a.term:hover {
  color: inherit;
  text-decoration-color: currentColor;
}

/* On a dark section, the dotted line is amber. */
.dates a.term,
.section--dark a.term {
  text-decoration-color: var(--amber);
}

.term-popup {
  position: absolute;
  z-index: 1001;
  padding: 16px 18px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text);
  box-shadow: 0 14px 36px rgba(22, 38, 42, 0.28);
  font-size: 0.95rem;
  line-height: 1.55;
}

.term-popup:focus {
  outline: none;
}

.term-popup__title {
  margin-bottom: 6px;
  color: var(--ink);
  font-weight: 600;
}

.term-popup p {
  margin: 0;
}

.term-popup__close {
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--clay);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.terms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px 40px;
  margin: clamp(24px, 4vw, 40px) 0 0;
}

.terms__item {
  padding: 4px 8px;
  margin: -4px -8px;
  border-radius: 8px;
  scroll-margin-top: 24px;
}

/* The entry that a link without the script opened. */
.terms__item:target {
  background: var(--amber-soft);
}

.terms dt {
  margin-bottom: 4px;
  color: var(--ink);
  font-weight: 600;
}

.terms dd {
  margin: 0;
  color: var(--text);
  font-size: 0.96rem;
  line-height: 1.6;
}
