/* Home page. The first screen ("stage") is one complete picture; scrolling
   reveals the timeline and the latest result. Full width, no content box. */

/* --- Stage --------------------------------------------------------------------- */

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 0.5rem 0;
  /* Room above the illustration: it must not touch the top bar. */
  padding: clamp(1.75rem, 4.5vh, 3rem) var(--gutter) 2rem;
  /* Dawn: a pale sky turning to warm light. The light of the drawing comes
     from the participants themselves, not from behind the Assembly. */
  background:
    linear-gradient(180deg, var(--sky) 0%, var(--dawn) 60%, var(--bg) 100%);
}
.stage[hidden] { display: none; }
/* Mobile: the hemicycle comes right after the title. */
.stage-text { display: contents; }
.stage-kicker { order: 1; margin-bottom: 0.4rem; }
.stage-kicker .illustration { margin-right: 0.25rem; }
.stage-kicker .illustration.ill-xl { width: clamp(4.5rem, 11vh, 7rem); height: clamp(4.5rem, 11vh, 7rem); }
.stage-title { order: 2; }
.stage-context { order: 2; margin: 0; color: var(--muted); max-width: 34rem; }
.stage-figure { order: 3; }
.path { order: 4; }
.countdown { order: 5; }
.actions { order: 6; }
.stage-also { order: 8; }
.scroll-cue { order: 9; }

@media (min-width: 60rem) {
  .stage {
    min-height: calc(100svh - 4.5rem);
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    grid-template-rows: 1fr auto;
    gap: 1rem 3rem;
    align-items: center;
    background:
      linear-gradient(180deg, var(--sky) 0%, var(--dawn) 65%, var(--bg) 100%);
  }
  .stage-text { display: block; }
  .stage-figure { grid-column: 2; grid-row: 1; }
  .stage-also { grid-column: 1; grid-row: 2; }
  .scroll-cue { grid-column: 2; grid-row: 2; justify-self: end; }
}

.stage-title {
  margin: 0.6rem 0 0.75rem;
  /* Sized on both width and height: the stage must fit in one screen. */
  font-size: clamp(1.6rem, min(2.8vw, 4.6vh), 2.9rem);
  text-wrap: balance;
}
.stage-title a { color: var(--ink); text-decoration: none; }
.stage-title a:hover { text-decoration: underline; text-decoration-thickness: 3px; }

/* Path of the phases: a line with three stops. */
.path {
  --p1: 0;
  --p2: 0;
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: clamp(1.5rem, 4.5vh, 3rem) 0 clamp(1.25rem, 4vh, 2.5rem);
  padding: 1.4rem 0 0;
  list-style: none;
  max-width: 34rem;
  font-size: 0.9375rem;
}
.path::before, .path::after {
  content: "";
  position: absolute;
  top: 0.4rem;
  left: 0.45rem;
  height: 3px;
  border-radius: 2px;
}
.path::before { right: 0.45rem; background: var(--line); }
.path::after { width: calc((100% - 0.9rem) * (var(--p1) + var(--p2)) / 2); background: var(--aqua); }
.path-step { position: relative; }
.path-step::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: -1.4rem;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  border: 3px solid var(--line);
  background: var(--bg);
}
.path-step:nth-child(1)::before { left: 0; }
.path-step:nth-child(2) { text-align: center; }
.path-step:nth-child(2)::before { left: 50%; translate: -50% 0; }
.path-step:nth-child(3) { text-align: right; }
.path-step:nth-child(3)::before { right: 0; }
.path-step.is-done::before { border-color: var(--aqua); background: var(--aqua); }
.path-step.is-current::before { border-color: var(--aqua); background: var(--sun); }
.path-name { display: block; font-weight: 700; }
.path-date { color: var(--muted); }

/* Countdown: large display digits, no boxes. */
.countdown { margin-block: 0 clamp(1.5rem, 4.5vh, 3rem); }
.countdown-label { margin: 0; font-weight: 700; }
.countdown-clock { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; margin: 0; }
.cd { display: inline-flex; align-items: baseline; gap: 0.2rem; }
.cd-num {
  font-family: var(--display);
  font-size: clamp(2.2rem, min(4.2vw, 6.5vh), 4rem);
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums lining-nums;
}
.cd-unit { color: var(--muted); font-weight: 700; }
.cd-s .cd-num { color: var(--aqua); }
.countdown-note { margin: 0.5rem 0 0; color: var(--muted); font-size: 0.9375rem; max-width: 34rem; }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.stage-figure { margin: 0.5rem 0; }
/* Sized on the screen height too, so that the stage fits in one screen. */
.stage-hemicycle { width: min(100%, 56rem); margin-inline: auto; }
[data-ring="circle"] .stage-hemicycle { width: min(100%, 46svh, 40rem); }
.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1.5rem;
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.875rem;
}
.legend-item { display: inline-flex; align-items: center; gap: 0.45rem; }
.legend-item strong { color: var(--ink); }
.legend-item .glyph { width: 1.2rem; height: 1.2rem; color: var(--ink); }
.legend-note { flex-basis: 100%; text-align: center; font-size: 0.8125rem; }

.stage-also { margin: 1rem 0 0; color: var(--muted); font-size: 0.9375rem; }
.stage-also a { color: var(--ink); font-weight: 700; }

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  justify-self: center;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.875rem;
  text-decoration: none;
}
.scroll-cue::after {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  rotate: 45deg;
  translate: 0 -0.15rem;
}

/* --- Bands ------------------------------------------------------------------------ */

.band { padding: clamp(3.5rem, 9vh, 6rem) var(--gutter); }
.band-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 1.5rem;
}
.band-head h2 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.3rem); }

.timeline-controls { display: flex; gap: 0.5rem; }

/* --- Timeline: one line from the past to the future -------------------------------- */

.band-timeline { background: linear-gradient(180deg, var(--bg) 0%, var(--sky) 100%); }
.timeline-wrap { position: relative; margin: 0 calc(-1 * var(--gutter)); --fig-w: 5.5rem; --fig-h: 4.2rem; }
.timeline {
  position: relative;
  display: flex;
  padding: 0 var(--gutter) 1rem;
  list-style: none;
  overflow-x: auto;
  scroll-padding-inline: var(--gutter);
  scroll-behavior: smooth;
  /* No scroll bar (v25): the arrows on the edges and the swipe do it. */
  scrollbar-width: none;
  /* The line fades out at both ends: there is more beyond. */
  mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent 100%);
}
.timeline::-webkit-scrollbar { display: none; }
/* The arrows, on the edges of the line, at the height of the drawings. */
.tl-edge {
  position: absolute;
  z-index: 2;
  top: calc(var(--fig-h) / 2 + 0.6rem);
  translate: 0 -50%;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  font: inherit;
  font-size: 1.25rem;
  font-weight: 700;
  box-shadow: 0 8px 18px -8px rgb(0 0 0 / 0.5);
  cursor: pointer;
}
.tl-edge[hidden] { display: none; }
.tl-edge-prev { left: max(0.5rem, calc(var(--gutter) - 3.5rem)); }
.tl-edge-next { right: max(0.5rem, calc(var(--gutter) - 3.5rem)); }
.ms, .ms-today {
  position: relative;
  flex: none;
  scroll-snap-align: start;
}
/* The line runs along the base of the drawings. */
.ms::before, .ms-today::before {
  content: "";
  position: absolute;
  top: calc(var(--fig-h) + 0.6rem);
  left: 0;
  right: 0;
  height: 2px;
  background: var(--line);
}
/* More room per milestone, and between the text and the result (v25). */
.ms { width: 17.5rem; padding: 0.6rem 2.5rem 0 0; }
.ms-link {
  display: grid;
  gap: 0.2rem;
  color: var(--ink);
  text-decoration: none;
}
.ms-link:hover .ms-title { text-decoration: underline; }
.ms-figure { position: relative; display: block; width: var(--fig-w); height: var(--fig-h); margin-bottom: 1rem; }
.ms-figure .hemicycle { position: absolute; bottom: 0; left: 0; width: 100%; }
.ms-date { font-size: 1.35rem; font-weight: 600; line-height: 1.1; }
.ms-kind { color: var(--muted); font-size: 0.875rem; font-weight: 700; }
.ms-assembly .ms-kind, .ms-closed .ms-kind { color: var(--ink); }
.ms-title {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-top: 0.35rem;
  font-weight: 700;
  line-height: 1.3;
}
.ms-title .illustration { width: 2.2rem; height: 2.2rem; }
.ms-extra { margin-top: 0.75rem; color: var(--muted); font-size: 0.875rem; }
.ms-undated .ms-date { color: var(--muted); }

/* Today: a narrow column; its words above the line, a sun on the line, a
   thin mark down the column. Nothing of it overlaps a milestone. */
.ms-today {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 7.5rem;
  margin-right: 1.5rem;
  padding-top: 0.6rem;
  color: var(--ink);
  text-align: center;
  background: linear-gradient(var(--sun), var(--sun)) 50% calc(var(--fig-h) + 1.4rem) / 2px 3.5rem no-repeat;
}
.ms-today-name { font-family: var(--display); font-size: 1rem; font-weight: 650; line-height: 1.1; }
.ms-today-date { color: var(--muted); font-size: 0.8125rem; }
.ms-today::after {
  content: "";
  position: absolute;
  top: calc(var(--fig-h) + 0.6rem);
  left: 50%;
  translate: -50% -50%;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 6px var(--glow);
}

/* Latest result: illustration and title, then the shared results block. */
.latest-head { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 1.5rem; }
.latest-head .result-title { margin-bottom: 0; }

/* Where the text stands (first or final vote, can it still change), under the title. */
.stage-context { margin: 0 0 0.5rem; max-width: 36rem; color: var(--muted); }

/* --- Trust: real people, not robots ------------------------------------------- */

/* Discreet: at the bottom of the page, smaller than the other bands. */
.band-trust { padding-block: 2rem; border-top: 1px solid var(--line); font-size: 0.9375rem; }
.band-trust h2 { max-width: 40rem; margin: 0 0 1rem; font-size: 1.15rem; text-wrap: balance; }
.trust { display: grid; gap: 1.25rem 2.5rem; margin: 0; padding: 0; list-style: none; }
@media (min-width: 60rem) { .trust { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.trust li { display: grid; grid-template-columns: 2.4rem 1fr; gap: 0 1rem; align-items: start; color: var(--muted); }
.trust p { margin: 0; }
.trust strong { display: block; color: var(--ink); }
.trust-icon { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--sun-soft); color: var(--ink); }
.trust-icon .glyph { width: 1.25rem; height: 1.25rem; }
.trust-more { display: inline-block; margin-top: 1rem; font-weight: 700; }
