/*
 * present.css: the client's presentation (present.html).
 *
 * On a computer it is laid out like the staff site: the map fills the screen and the panel floats on it (a little
 * wider, for the price cards). On a phone (below 47.5rem) the panel is a sheet over the map, as in Apple Maps: it
 * rests low, half way or all the way up, follows the finger (src/bottom-sheet.js), is frosted glass low down and
 * solid when up. Everything on the map is frosted glass too (styles/glass.css). One light theme, like every page.
 * CSS variables can't be used inside @media queries, so the breakpoint is written out below.
 */

.present-page { --sheet-width: var(--sheet-width-present); }

/* The lots, one after another inside "The lots". With several, each is a row (dot, name, area and land use, chevron)
   that opens to its details, one at a time, with a hairline between rows; with one lot there is no row. */
.lot + .lot { border-top: 1px solid var(--line); }
.lot__heading { margin: 0; }
.lot__head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  min-height: 2.75rem; /* a comfortable tap target */
  padding: var(--space-2) 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.lot__head:focus-visible { outline: 2px solid var(--flag); outline-offset: 2px; border-radius: var(--radius-control); }
.lot__dot { flex: none; width: 0.75rem; height: 0.75rem; border-radius: 50%; background: var(--flag); box-shadow: 0 0 0 2px var(--sheet-raised); }
.lot__name { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; }
.lot__title {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: var(--text-base);
}
.lot__summary {
  overflow: hidden;
  color: var(--ink-muted);
  font-size: var(--text-sm);
  font-weight: 400;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.lot__chevron {
  flex: none;
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: var(--ink-muted);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--duration) var(--ease);
}
.lot__head[aria-expanded="true"] .lot__chevron { transform: rotate(180deg); }
.lot.is-open .lot__body { padding-bottom: var(--space-4); }
/* "Show on map": flies the map to the lot. */
.lot__links { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
.lot__map { gap: var(--space-2); }
.present-location { margin-bottom: var(--space-4); }
.lot__map svg { width: 1rem; height: 1rem; fill: currentColor; }
/* "Nearest road: ..., 85 m away" above the lot's buttons (src/present.js fillRoad). */
.lot__road { margin: var(--space-3) 0 0; font-size: var(--text-sm); color: var(--ink-muted); }
@media (prefers-reduced-motion: reduce) { .lot__chevron { transition: none; } }

/* The price range next to the area, at the top. */
.fact--price dd { font-family: var(--font-display); font-weight: 700; font-size: var(--text-lg); letter-spacing: -0.01em; }

/* An iPhone's Safari (iOS 26 on) paints the strip under the status bar and Dynamic Island, and the one under its
   floating address bar, in the page's background colour (it ignores theme-color). Make that the sheet's colour, so the
   top strip runs into the page and the bottom one into the sheet, instead of a band of another colour. */
html:has(> .present-page), .present-page { background: var(--sheet); }

/* The map's credits (one line, styles/map.css) start right of the floating panel on a wide screen. */
@media (min-width: 47.5rem) { .present-page { --credits-left: calc(var(--sheet-width) + 2 * var(--edge)); } }

/* ------------------------------------------------------------------ Phones: a sheet over the map, as in Apple Maps */
.sheet__tint { display: none; }
@media (max-width: 47.5rem) {
  /* A quick second tap (the next chapter, twice) doesn't zoom the page; pinching it still can. The map has its own. */
  .present-page { overscroll-behavior: none; touch-action: manipulation; }
  .app--story { display: block; height: 100dvh; }
  .app--story .stage { position: absolute; inset: 0; }

  /* src/bottom-sheet.js adds .is-bottom-sheet, moves the sheet with transform, and sets --sheet-top (its highest
     position) and the opacity of .sheet__tint (0 low down, frosted, to 1 when it is up, solid). */
  .present-page .sheet.is-bottom-sheet {
    position: fixed;
    top: var(--sheet-top, 0px);
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10; /* over the map's buttons */
    width: auto;
    max-width: none;
    max-height: none;
    padding-bottom: 0;
    border: 0;
    border-radius: var(--radius-bottom-sheet) var(--radius-bottom-sheet) 0 0;
    background: color-mix(in srgb, var(--sheet) var(--glass-opacity), transparent);
    box-shadow: var(--glass-rim), var(--shadow-sheet-up);
    will-change: transform;
  }
  /* Glass to solid as it rises: a layer of the sheet's colour under the contents, its opacity set as the sheet moves.
     Only that layer changes, so the panel's contents aren't restyled or repainted on every frame of a drag. */
  .present-page .sheet.is-bottom-sheet > .sheet__tint {
    display: block;
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: var(--sheet);
    opacity: 0;
    pointer-events: none;
    will-change: opacity;
  }
  /* Fully up it is solid: no blur to work out behind it while the lots scroll. */
  .present-page .sheet.is-bottom-sheet.is-solid { -webkit-backdrop-filter: none; backdrop-filter: none; }

  /* The name bar (logo, language) is the sheet's top: it moves with it, and the lots scroll under it. A finger on it
     always moves the sheet. The handle above it says so. */
  .is-bottom-sheet .sheet__bar {
    position: relative;
    padding-top: calc(var(--space-4) + var(--space-1));
    border-bottom-color: color-mix(in srgb, var(--line) 70%, transparent);
    touch-action: none;
  }
  .is-bottom-sheet .sheet__bar::before {
    content: "";
    position: absolute;
    top: var(--space-2);
    left: 50%;
    width: 2.25rem;
    height: 0.3125rem;
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--ink-muted) 45%, transparent);
    transform: translateX(-50%);
  }
  /* Tucked (src/bottom-sheet.js), only the handle shows: the name bar's logo and language fade out. */
  .is-bottom-sheet .sheet__bar > * { transition: opacity var(--duration) var(--ease); }
  .is-bottom-sheet.is-tucked .sheet__bar > * { opacity: 0; }
  /* The lots scroll only when the sheet is all the way up (below that, a drag moves the sheet). */
  .is-bottom-sheet .sheet__body {
    overflow-y: hidden;
    overscroll-behavior: contain;
    padding: var(--space-5) var(--space-4) calc(var(--space-6) + env(safe-area-inset-bottom, 0px));
  }
  .is-bottom-sheet.is-expanded .sheet__body { overflow-y: auto; }
  .is-bottom-sheet .sheet__foot { display: none; }

  /* The map's credits: one line just above the sheet, left of the map's buttons (styles/map.css .credits--line). */
  .app--story .stage > .credits { --credits-bottom: calc(var(--sheet-cover, 0px) + var(--space-2)); }

  /* 3D / 2D, the compass and the map's messages sit just above the sheet (--sheet-cover, set on each of them as it
     moves: set on the page, every element in the sheet was restyled on every frame of a drag). */
  .app--story .map-dial { bottom: calc(var(--sheet-cover, 0px) + var(--space-3)); }
  .app--story .status { bottom: calc(var(--sheet-cover, 0px) + var(--space-4)); }
  .app--story .status[data-kind="error"] { top: 32%; bottom: auto; }

  .app--story .to-top { bottom: calc(var(--inset-sheet) + env(safe-area-inset-bottom, 0px)); }
  .app--story .lot { scroll-margin-top: var(--space-3); }

  /* Bigger text for reading on a phone. */
  .app--story .pitch__bullets li,
  .app--story .use-card__summary,
  .app--story .checklist li { font-size: var(--text-base); }
}


/* "Photos for listings" (src/present.js): a row per lot, its tick box and name on the left, its own photo on the right. */
.photos__view { margin-top: var(--space-3); display: flex; }
.photos__view .control { flex: 1 1 0; }
/* The lots and the roads/borders as toggle chips (2026-11-20): a tick box inside, hidden; the chip ink when ticked. */
.photos__chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
.photos__chips[hidden] { display: none; }
.photos__chip { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 40px; padding: 0 var(--space-3);
  border-radius: var(--radius-pill); background: var(--fill); color: var(--ink); font-size: var(--text-sm); font-weight: 600;
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; transition: background 0.15s, color 0.15s; }
.photos__chip[hidden] { display: none; }
.photos__chip input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.photos__chip:has(input:checked) { background: var(--ink); color: var(--sheet); }
.photos__chip:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.photos__chip:not(:has(input:checked)) .lot__dot { opacity: 0.35; }
.photos__chip .lot__dot { box-shadow: 0 0 0 2px var(--sheet); }
.photos__actions { display: grid; gap: var(--space-1); margin-top: var(--space-4); }
.photos__actions[hidden] { display: none; }
.photos__actions .control { width: 100%; }
.photos__actions .text-button { justify-self: center; }
/* The listing photo's frame over the map: the rest of the map dimmed (never the panel: the layer stops at its edge),
   a fine white edge, survey-flag corners, our tag. It follows the camera and fades as the view leaves it. */
.photo-view { position: absolute; z-index: 1; overflow: hidden; pointer-events: none; }
.photo-view[hidden] { display: none; }
.photo-frame {
  position: absolute; transform-origin: 50% 50%;
  border-radius: var(--radius-small);
  box-shadow: 0 0 0 1px var(--photo-frame-line), 0 0 0 100vmax var(--photo-frame-dim);
}
.photo-frame__corner { position: absolute; width: 22px; height: 22px; border: 0 solid var(--flag); }
.photo-frame__corner--tl { left: -3px; top: -3px; border-left-width: 3px; border-top-width: 3px; border-top-left-radius: 6px; }
.photo-frame__corner--tr { right: -3px; top: -3px; border-right-width: 3px; border-top-width: 3px; border-top-right-radius: 6px; }
.photo-frame__corner--bl { left: -3px; bottom: -3px; border-left-width: 3px; border-bottom-width: 3px; border-bottom-left-radius: 6px; }
.photo-frame__corner--br { right: -3px; bottom: -3px; border-right-width: 3px; border-bottom-width: 3px; border-bottom-right-radius: 6px; }
.photo-frame__tag {
  position: absolute; left: var(--space-3); top: var(--space-3);
  display: inline-flex; align-items: center; gap: var(--space-1);
  padding: var(--space-1) var(--space-3) var(--space-1) var(--space-2);
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--sheet) var(--glass-opacity), transparent);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  box-shadow: var(--glass-rim), var(--glass-shadow);
  color: var(--ink); font: 600 var(--text-xs) / 1.2 var(--font-body); white-space: nowrap;
}
#photo-selected-row { margin-top: var(--space-5); } /* the download buttons, clear of the ticks above */


/* "Nearby" (src/present.js renderNearby): a row per sort of place, its symbol in the pin's colour, what it is above
   the place's name, how far on the right. A row with none near is greyed and can't be pressed. */
.nearby__summary { display: flex; align-items: center; justify-content: space-between; list-style: none; cursor: pointer; }
.nearby__summary::-webkit-details-marker { display: none; }
.nearby__summary .block__title { flex: 1; margin-bottom: 0; }
.nearby__summary::after {               /* the chevron: down when open, right when folded */
  content: ""; flex: none; width: 0.5rem; height: 0.5rem; margin: 0 var(--space-2) 0 var(--space-3);
  border-right: 1.8px solid var(--ink-muted); border-bottom: 1.8px solid var(--ink-muted);
  transform: rotate(-45deg); transition: transform var(--duration) var(--ease);
}
.nearby[open] > .nearby__summary::after { transform: rotate(45deg); }
.nearby[open] > .nearby__summary { margin-bottom: var(--space-2); }
.nearby__pins { margin-top: var(--space-2); }
@media (prefers-reduced-motion: reduce) { .nearby__summary::after { transition: none; } }
.nearby__list { list-style: none; margin: var(--space-3) 0 0; padding: 0; border-top: 1px solid var(--line); }
.nearby__row {
  display: flex; align-items: center; gap: var(--space-3);
  width: 100%; min-height: 3rem; padding: var(--space-2) 0;
  border: 0; border-bottom: 1px solid var(--line); background: none;
  color: inherit; font: inherit; text-align: left; cursor: pointer;
}

/* A row that opens something: a soft wash under the pointer, reaching past the text like a list row on iOS. */
.nearby__row { border-radius: var(--radius-control); transition: background-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease); }
.nearby__row:hover:not(:disabled) { background-color: var(--hover); box-shadow: -0.5rem 0 0 var(--hover), 0.5rem 0 0 var(--hover); }
.nearby__row:disabled { cursor: default; color: var(--ink-muted); }
.nearby__icon { flex: none; display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; }
.nearby__icon svg, .place-card__icon svg { width: 1rem; height: 1rem; fill: var(--place-symbol); }
.nearby__row:disabled .nearby__icon { opacity: 0.4; }
.nearby__text { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.nearby__what { font-size: var(--text-xs); color: var(--ink-muted); }
.nearby__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nearby__row:disabled .nearby__name { font-weight: 400; }
.nearby__distance { flex: none; font-weight: 650; font-variant-numeric: tabular-nums; }
.nearby__chevron { flex: none; width: 1rem; height: 1rem; fill: none; stroke: var(--ink-muted); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.nearby__row:disabled .nearby__chevron { visibility: hidden; }

/* A place's card on the map (src/present.js showPlaceCard): under the toolbar on a computer, just above the sheet on
   a phone, left of the map's round buttons. Frosted like everything on the map (styles/glass.css). */
.place-card {
  position: absolute;
  top: calc(var(--edge) + 3.25rem);
  right: var(--edge);
  width: min(22rem, calc(100% - var(--sheet-width) - 3 * var(--edge)));
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: var(--space-2) var(--space-3);
  padding: var(--space-3);
  background: var(--sheet);
  border: 1px solid var(--line);
  border-radius: var(--radius-sheet);
  box-shadow: var(--shadow-control);
}
.place-card[hidden] { display: none; }
.place-card__icon { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; }
.place-card__icon svg { width: 1.15rem; height: 1.15rem; }
.place-card__text { min-width: 0; }
.place-card__name { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.place-card__meta { margin: var(--space-1) 0 0; font-size: var(--text-sm); color: var(--ink-muted); }
.place-card__close {
  display: grid; place-items: center; width: 1.75rem; height: 1.75rem; padding: 0;
  border: 0; border-radius: 50%; background: var(--sheet-sunk); color: var(--ink-muted); cursor: pointer;
}
.place-card__close svg { width: 0.9rem; height: 0.9rem; }
.place-card__google { grid-column: 1 / -1; justify-self: start; }
@media (max-width: 47.5rem) {
  .app--story .place-card {
    top: auto;
    bottom: calc(var(--sheet-cover, 0px) + var(--space-3));
    left: var(--edge);
    right: calc(var(--edge) + 3.5rem + var(--space-2));
    width: auto;
  }
}

/* "Make a 12-second film" in "Photos for listings" (src/listing-film.js). */
.photos__film { display: grid; gap: var(--space-2); margin-top: var(--space-4); padding-top: var(--space-4); border-top: 1px solid var(--line); }
.photos__film .control { width: 100%; }
.photos__film .fine-print, #photo-status { margin: 0; padding: 0; border: 0; text-align: center; } /* a note under its button, no rule above */
#photo-status { margin-top: var(--space-2); }
.photos__film[hidden] { display: none; }

/* "Walk to the corners" (src/present.js startWalk): a place card with a big arrow turning to the corner. */
.walk-start { display: grid; gap: var(--space-2); justify-items: start; margin: var(--space-3) 0; }
.walk-start[hidden] { display: none; }
.walk-card { grid-template-columns: auto 1fr auto; align-items: center; }
.walk-card__arrow { width: 3rem; height: 3rem; fill: var(--parcel-stroke); transition: transform 0.25s ease-out; }
.walk-card__arrow[hidden] { display: none; }
.walk-card__distance { margin: var(--space-1) 0 0; font-size: var(--text-lg, 1.25rem); font-weight: 700; font-variant-numeric: tabular-nums; }
.walk-card__steps { grid-column: 1 / -1; display: flex; gap: var(--space-2); flex-wrap: wrap; }
.walk-card.is-there .walk-card__distance { color: var(--parcel-stroke); }
@media (prefers-reduced-motion: reduce) { .walk-card__arrow { transition: none; } }

/* ---------------------------------------------------------------- the chapters (2026-11)
   One chapter shows at a time (src/present.js renderChapters). The card at the top stays in view while the panel
   scrolls: a pink number badge, the chapter's kind and title (a button: it opens the list of every chapter), "4 of 9",
   previous and next, and a thin progress line. Frosted like the panel, inset like the map's buttons. */
.chapter-nav {
  position: sticky;
  top: 0;
  z-index: 3;
  margin: var(--space-4) calc(-1 * var(--space-2)) 0;
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-3);
  border-radius: var(--radius-card);
  background: color-mix(in srgb, var(--sheet-raised) 88%, transparent);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  box-shadow: var(--shadow-control);
}
.chapter-nav__row { display: flex; align-items: center; gap: var(--space-3); }
.chapter-nav__badge {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-control);
  background: var(--chapter-badge);
  color: var(--chapter-badge-text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-base);
  font-variant-numeric: tabular-nums;
}
.chapter-nav__name {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  min-height: 2.75rem;
  justify-content: center;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.chapter-nav__kicker { color: var(--ink-muted); font-size: var(--text-xs); }
.chapter-nav__title {
  overflow: hidden;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-base);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.chapter-nav__title::after {           /* a small chevron: the list of every chapter */
  content: "";
  display: inline-block;
  width: 0.4rem;
  height: 0.4rem;
  margin: 0 0 0.2rem 0.45rem;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg);
  transition: transform var(--duration) var(--ease);
}
.chapter-nav__name[aria-expanded="true"] .chapter-nav__title::after { transform: translateY(0.2rem) rotate(-135deg); }
.chapter-nav__count { flex: none; color: var(--ink-muted); font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.chapter-nav__step {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--fill);
  color: var(--ink);
  cursor: pointer;
  transition: background-color var(--duration) var(--ease);
}
.chapter-nav__step:hover:not(:disabled) { background: var(--fill-hover); }
.chapter-nav__step--next { background: var(--ink); color: var(--sheet); }
.chapter-nav__step--next:hover:not(:disabled) { background: var(--ink-hover); }
.chapter-nav__step:disabled { opacity: 0.35; cursor: default; }
.chapter-nav__step svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chapter-nav__step:focus-visible, .chapter-nav__name:focus-visible { outline: 2px solid var(--flag); outline-offset: 2px; }
.chapter-nav__progress { height: 3px; margin-top: var(--space-2); border-radius: var(--radius-pill); background: var(--line); overflow: hidden; }
.chapter-nav__done { display: block; height: 100%; width: 0; background: var(--chapter-badge); transition: width var(--duration) var(--ease); }

/* The list of every chapter, under the card. */
.chapter-list { list-style: none; margin: var(--space-2) 0 0; padding: 0; max-height: 50vh; overflow-y: auto; }
.chapter-list__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  min-height: 2.75rem;
  padding: var(--space-1) var(--space-2);
  border: 0;
  border-radius: var(--radius-control);
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.chapter-list__item:hover { background: var(--sheet-sunk); }
.chapter-list__item[aria-current="step"] { background: color-mix(in srgb, var(--chapter-badge) 12%, transparent); }
.chapter-list__number { flex: none; width: 1.75rem; color: var(--flag-text); font-family: var(--font-display); font-weight: 700; font-variant-numeric: tabular-nums; }
.chapter-list__text { display: flex; flex-direction: column; min-width: 0; }
.chapter-list__kicker { color: var(--ink-muted); font-size: var(--text-xs); }
.chapter-list__title { font-weight: 600; }

/* A chapter: only the open one shows (`hidden` says whether the project has it at all). */
.chapter:not(.is-current) { display: none; }
.chapter { padding-top: var(--space-4); animation: chapter-in var(--duration) var(--ease); }
@keyframes chapter-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .chapter { animation: none; } .chapter-nav__done, .chapter-nav__title::after { transition: none; } }
.chapter__head { margin-bottom: var(--space-4); }
.chapter__kicker { margin: 0; color: var(--flag-text); font-size: var(--text-sm); font-weight: 600; }
.chapter__title { margin: var(--space-1) 0 0; font-family: var(--font-display); font-weight: 700; font-size: var(--text-title); line-height: 1.1; letter-spacing: -0.01em; }
.chapter__lead { margin: 0; color: var(--ink-muted); }
/* Said once (usability check, 2026-11-02): the chapter card at the top already shows the number and the title, so the
   chapter's own heading shows only its lead, and the small labels above titles ("Surroundings") are left out. */
.chapter__kicker, .chapter__title, .chapter-nav__kicker, .chapter-list__kicker { display: none; }
.chapter__head:has(.chapter__lead[hidden]) { display: none; }
.chapter .block:first-of-type { margin-top: var(--space-4); }

/* "Next: The lie of the land" at the end of a chapter. */
.chapter-next {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0 var(--space-3);
  width: 100%;
  margin-top: var(--space-5);
  padding: var(--space-3) var(--space-4);
  border: 0;
  border-radius: var(--radius-sheet);
  background: var(--ink);
  color: var(--sheet);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.chapter-next__label { grid-column: 1; font-size: var(--text-xs); opacity: 0.75; }
.chapter-next__title { grid-column: 1; font-family: var(--font-display); font-weight: 700; font-size: var(--text-lg); }
.chapter-next svg { grid-column: 2; grid-row: 1 / span 2; width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* "Lot 1 | Lot 2" on the one-lot chapters. */
.lot-pick { margin-bottom: var(--space-4); }

/* Cards inside a chapter: the land-cover bar, the figures. Lighter than the panel, like Apple's grouped lists. */
.cover-card, .stat-card, .profile, .rule {
  border-radius: var(--radius-card);
  background: color-mix(in srgb, var(--sheet-raised) 92%, transparent);
}
.cover-card { margin-top: var(--space-3); padding: var(--space-4); }
.cover-bar { display: flex; gap: 2px; height: 0.875rem; border-radius: var(--radius-pill); overflow: hidden; }
.cover-bar > span { min-width: 3px; }
.cover-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2) var(--space-4); list-style: none; margin: var(--space-3) 0 0; padding: 0; font-size: var(--text-sm); }
.cover-legend li { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
.cover-legend__swatch { flex: none; width: 0.75rem; height: 0.75rem; border-radius: var(--radius-small); }
.cover-legend__pct { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.cover-legend__zone { display: flex; align-items: center; gap: var(--space-2); margin: var(--space-3) 0 0; color: var(--ink-muted); font-size: var(--text-xs); }
.cover-legend__line { flex: none; width: 1rem; border-top: 2px dashed var(--flag); }

.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: var(--space-2); margin: var(--space-3) 0 0; }
.stat-card { margin: 0; padding: var(--space-3); }
.stat-card--wide { grid-column: 1 / -1; }
.stat-card dt { color: var(--ink-muted); font-size: var(--text-xs); }
.stat-card dd { margin: var(--space-1) 0 0; font-family: var(--font-display); font-weight: 700; font-size: var(--text-lg); font-variant-numeric: tabular-nums; }
.stat-card--wide dd { font-family: var(--font-body); font-weight: 600; font-size: var(--text-base); }

/* The profile across the lot (src/present.js drawProfile). */
.profile { margin: var(--space-3) 0 0; padding: var(--space-3) var(--space-3) var(--space-2); }
.profile__title { color: var(--ink-muted); font-size: var(--text-xs); }
.profile__chart { display: block; width: 100%; height: auto; margin-top: var(--space-1); }
.profile__area { fill: color-mix(in srgb, var(--cover-grass) 35%, transparent); }
.profile__line { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; }
.profile__lot { fill: color-mix(in srgb, var(--flag) 16%, transparent); }
.profile__label { fill: var(--flag-text); font: 600 10px var(--font-body); }
.profile__height { fill: var(--ink-muted); font: 10px var(--font-body); }
.profile__note { margin: var(--space-1) 0 0; color: var(--ink-muted); font-size: var(--text-xs); }

/* "Rules and risks": a row each, those that limit building marked in pink. */
.rule-list { display: grid; gap: var(--space-2); list-style: none; margin: 0 0 var(--space-3); padding: 0; }
.rule { display: flex; flex-direction: column; gap: 0.15rem; padding: var(--space-3) var(--space-3) var(--space-3) calc(var(--space-3) + 0.75rem); position: relative; }
.rule::before { content: ""; position: absolute; left: var(--space-3); top: calc(var(--space-3) + 0.35rem); width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--ink-muted); }
.rule--warn::before { background: var(--flag); box-shadow: 0 0 0 3px color-mix(in srgb, var(--flag) 20%, transparent); }
.rule__label { font-weight: 600; font-size: var(--text-sm); }
.rule__text { color: var(--ink-muted); font-size: var(--text-sm); }
.rule--warn .rule__text { color: var(--ink); }

.commune__name { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: var(--text-lg); }
.nearby__straight { display: block; color: var(--ink-muted); font-size: var(--text-xs); font-weight: 400; }

/* The map's and data's sources: folded under one line (usability check, 2026-11-02). */
.sources-fold > summary { display: flex; align-items: center; gap: var(--space-2); width: fit-content; cursor: pointer; list-style: none; }
.sources-fold > summary::-webkit-details-marker { display: none; }
.sources-fold > summary::after {          /* the same chevron as every fold (controls.css) */
  content: ""; flex: none; width: 0.35rem; height: 0.35rem; margin-top: -0.15rem;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg);
  transition: transform var(--duration) var(--ease);
}
.sources-fold[open] > summary::after { margin-top: 0.15rem; transform: rotate(-135deg); }

/* ------------------------------------------------------------------ The map menu (usability check, 2026-11-02)
   One round button at the top of the map's buttons opens every map choice in a small card beside it, like Apple
   Maps' map button: the style, what is drawn, Rotate, "Lots | One plot". The map itself stays clear. */
.map-menu { position: relative; }
.map-menu > summary { list-style: none; }
.map-menu > summary::-webkit-details-marker { display: none; }
.map-menu[open] > .map-menu__button { background: var(--ink); color: var(--sheet); border-color: var(--ink); }
.map-menu__panel {
  position: absolute;
  right: calc(100% + var(--space-2));
  bottom: 0;
  z-index: 3;
  width: max-content;
  max-width: min(20rem, calc(100vw - 6rem));
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sheet);
  background: var(--sheet);
  box-shadow: var(--shadow-control);
  animation: map-menu-in var(--duration) var(--ease);
  transform-origin: bottom right;
}
@keyframes map-menu-in { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .map-menu__panel { animation: none; } }
.map-menu__label { margin: var(--space-1) 0 0; color: var(--ink-muted); font-size: var(--text-xs); font-weight: 600; }
.map-menu__label:first-child { margin-top: 0; }
.map-menu__row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.map-menu__panel .segmented[hidden], .map-menu__panel .control[hidden] { display: none; }
/* On a phone the map's buttons sit just above the sheet: the card opens upwards from the button, over the map, never
   under the sheet (the owner, 2026-11-08); a very short screen scrolls it. */
@media (max-width: 47.5rem) {
  .map-menu__panel { max-height: calc(100svh - 12rem); overflow-y: auto; }
}
/* The small print's two lines sit together: "About this presentation ›", then who runs Privim and the legal links. */
.sources-fold { margin-top: var(--space-6); }
.sources-fold .fine-print { margin: var(--space-2) 0 0; padding: 0; border: 0; }
.sources-fold > summary.fine-print { margin: 0; padding-top: var(--space-4); border-top: 1px solid var(--line); }
.sources-fold .legal-foot__line { display: flex; flex-wrap: wrap; gap: 0 0.35em; }
.sources-fold + .legal-foot--sheet { margin-top: var(--space-2); padding-top: 0; border-top: 0; }

/* "Getting around" (src/transit-panel.js): the facts as cards, then how you travel and for how long. */
.transit .stat-card dd.transit__value { font-size: var(--text-base); line-height: 1.35; }
.transit__controls { display: grid; gap: var(--space-2); margin: var(--space-4) 0 var(--space-3); }

