/* Project Loire: one record, as a river of data. The shared piece for the Project Loire page and the custom software page.
   Copied from the creative director's lab proof (v4/lab/loire-river.html, cleared to build 2026-11-13) by scratchpad river/make.py;
   the lab is never linked to. Classes: lr-. The ground is the map's own near-black, so its faded edges meet the band without a line. */
.lrv { --g: #0b0a09; --c: #ede9e1; --soft: rgba(237, 233, 225, .8); --rule: rgba(237, 233, 225, .2); --cu: #C98A4B; --cul: #EDB27A; background: var(--g); color: var(--c); padding: clamp(40px, 6vh, 72px) var(--pad) clamp(48px, 8vh, 96px); display: grid; gap: clamp(18px, 3vh, 32px); }
/* no script: the flat map as a picture, every label on it, and the same words as a list */
.lrv-ns { max-width: 1280px; margin: 0 auto; }
.lrv-ns img { display: block; width: 100%; height: auto; }
/* the map: one canvas for the land's points, one for the river's moving points, and the words as real text and buttons on top */
  .lr-hold { position: relative; width: 100%; max-width: 1280px; margin: 0 auto; }
  .lr-stage { position: sticky; top: var(--lr-top, calc(var(--hd, 64px) + 12px)); }   /* a page with its own bar under the header sets --lr-top */
  .lr { position: relative; width: 100%; }
  .lr, .lr-say { max-width: var(--fitw, none); margin-left: auto; margin-right: auto; }
  /* the opening lines: big, one at a time, each word rising into place; they keep step with the scroll */
  .lr-say { display: grid; align-items: end; min-height: clamp(104px, 9.2vw, 128px); padding-bottom: 12px; }
  .lr-say p { grid-area: 1 / 1; margin: 0; font-family: var(--disp); font-weight: 800; font-size: clamp(1.75rem, 4vw, 3.6rem); line-height: 1.02; letter-spacing: -.022em; text-wrap: balance; pointer-events: none; }
  .lr-say span { display: inline-block; opacity: 0; transform: translateY(.55em); transition: opacity .45s ease, transform .6s var(--ease); transition-delay: calc(var(--i) * 65ms); }
  .lr-say p.is-on span { opacity: 1; transform: none; }
  .lr-say p.is-past span { opacity: 0; transform: translateY(-.45em); transition-delay: 0s; transition-duration: .3s; }
  .lr-say b { color: var(--cul); font-weight: inherit; transition: color .3s ease; } .lr-say b.is-hit { color: #FFF1DC; }
  @media (prefers-reduced-motion: reduce) { .lr-say { display: block; min-height: 0; } .lr-say p { font-size: clamp(1.5rem, 2.6vw, 2.2rem); margin-bottom: 6px; } .lr-say span { opacity: 1; transform: none; transition: none; } }
  .lr canvas { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; }
  .lr-pt { position: absolute; margin: 0; font: inherit; opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility 0s linear .6s; }
  .lr.is-flat .lr-pt { opacity: 1; visibility: visible; transition: opacity .6s ease, visibility 0s; }
  /* the four waters' names, at their springs: large, and they light as the change starts */
  .lr-src { font-family: var(--disp); font-weight: 700; font-size: 20px; line-height: 1; letter-spacing: -.005em; color: rgba(244, 238, 226, .92); white-space: nowrap; transform: translate(-8px, -100%); padding: 0 0 12px; transition: opacity .6s ease, visibility 0s linear .6s, color .35s ease; }   /* above its spring, or below it where the water runs upward */
  .lr-src[data-side="below"] { transform: translate(-8px, 0); padding: 12px 0 0; }
  .lr.is-flat .lr-src { transition: opacity .6s ease, visibility 0s, color .35s ease; }
  .lr-src.is-lit { color: #FFD9A8; }
  .lr.is-tall .lr-src, .lr.is-tall .lr-src[data-side] { font-size: 16px; transform: translate(-50%, -100%); padding: 0 0 12px; }
  .lr.is-leaving .lr-pt { opacity: 0; }
  .lr-gh { color: rgba(237, 233, 225, .66); font-size: 13.5px; font-weight: 600; letter-spacing: .01em; white-space: nowrap; }
  .lr-out { appearance: none; background: transparent; border: 0; color: #ede9e1; display: flex; align-items: center; gap: 16px; min-height: 44px; padding: 6px 8px 6px 0; white-space: nowrap; text-align: left; cursor: pointer; transform: translateY(-50%); font-size: 15.5px; font-weight: 500; line-height: 1.2; border-radius: 2px; }
  .lr-out i { flex: none; width: 11px; height: 11px; margin-left: -5.5px; border-radius: 50%; background: #0b0a09; box-shadow: 0 0 0 1.5px var(--cu); transition: background .25s ease; }   /* an output: a point with a copper rim */
  .lr-out.is-got i { background: #FFE2BC; }   /* reached by the change */
  .lr-out.is-wait i { width: 11px; height: 11px; box-shadow: none; border: 1.5px dashed var(--cu); background: transparent; box-sizing: border-box; }   /* a branch ready to flow: a dashed rim, never lit, since no site is on it today */
  .lr-out.is-wait { color: rgba(237, 233, 225, .78); }
  .lr-out[aria-pressed="true"] { color: #fff; }
  .lr-out[aria-pressed="true"] i { box-shadow: 0 0 0 1.5px var(--cul), 0 0 0 4px rgba(237, 178, 122, .3); }
  .lr-out:focus-visible { outline: 2px solid #ede9e1; outline-offset: 2px; }
  @media (hover: hover) { .lr-out:hover { color: #fff; } }
  /* the record: the Loire mark, set on the river; under it, two words and the button that plays the change again */
  /* the record's mark: on the bank beside the reach, never on the water. Beside it: two words, what just changed, and a quiet pause. */
  .lr-rec { --lg: 132px; width: 0; height: 0; }   /* a point at the mark's centre: the mark and its words are placed from it, the words on whichever side is clear ground */
  .lr-logo { position: absolute; left: calc(var(--lg) / -2); top: calc(var(--lg) / -2); display: block; max-width: none; width: var(--lg); height: var(--lg); border-radius: 50%; background: #0b0a09; box-shadow: 0 0 0 5px #0b0a09; }
  .lr-rec-w { position: absolute; display: grid; gap: 3px; align-content: center; justify-items: start; text-align: left; }
  .lr-rec[data-side="left"] .lr-rec-w { justify-items: end; text-align: right; } .lr-rec[data-side="above"] .lr-rec-w, .lr-rec[data-side="below"] .lr-rec-w { justify-items: center; text-align: center; }
  /* Pause is a drawn button like the two arrows: the same box, size and line */
  .lr-player .lr-pause { appearance: none; width: 56px; height: 56px; padding: 0; display: grid; place-items: center; background: none; border: 1px solid var(--rule); border-radius: 2px; color: #ede9e1; cursor: pointer; }
  .lr-player .lr-pause[hidden] { display: none; }
  @media (hover: hover) { .lr-player .lr-pause:hover { border-color: var(--cul); color: var(--cul); } }
  @media (max-width: 699px) { .lr-stage .lr-player { grid-template-columns: 48px minmax(0, 1fr) 48px; } .lr-stage .lr-player .lr-prev, .lr-stage .lr-player .lr-next, .lr-stage .lr-player .lr-pause { width: 48px; height: 48px; } }
  .lr-pause:focus-visible { outline: 2px solid #ede9e1; outline-offset: 2px; }
  .lr.is-tall .lr-rec-w { max-width: 132px; }
  .lr-rec-h { margin: 0; font-family: var(--disp); font-weight: 600; font-size: 1.15rem; line-height: 1.1; letter-spacing: -.01em; white-space: nowrap; }
  .lr-go { appearance: none; justify-self: start; min-height: 46px; padding: 8px 18px; margin-top: 4px; background: var(--cu); color: #17110b; border: 0; border-radius: 2px; font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; white-space: nowrap; }
  .lr-go:focus-visible { outline: 2px solid #ede9e1; outline-offset: 3px; }
  @media (hover: hover) { .lr-go:hover { background: var(--cul); } }
  .lr-said { margin: 0; min-height: 2.7em; font-size: 14.5px; line-height: 1.35; font-weight: 600; color: var(--cul); }

  /* the player, at the foot of the map: back, the step and what it is, forward. It stays at the foot of the screen while the map is on it. */
  .lr-player { position: sticky; bottom: var(--lr-bottom, 0px); z-index: 3; display: grid; grid-template-columns: 56px minmax(0, 1fr) 56px; align-items: center; gap: clamp(10px, 2vw, 24px); background: #0b0a09; border-top: 1px solid var(--rule); padding: 8px 0; max-width: var(--fitw, none); margin: 0 auto; }
  /* Brian: "the player should enter right after the map fully sets into position". It stays out while the map tilts; the moment the tilt
     reaches nought it rises and fades in, on the piece's own easing. No timer: the class is set in the frame the tilt ends. With reduced motion it is there from the start. */
  .lr-player { opacity: 0; visibility: hidden; transform: translateY(18px); transition: opacity .22s ease, transform .22s ease, visibility 0s linear .22s; }
  .lr-player.is-in { opacity: 1; visibility: visible; transform: none; transition: opacity .45s ease, transform .6s var(--ease), visibility 0s; }
  @media (prefers-reduced-motion: reduce) { .lr-player, .lr-player.is-in { opacity: 1; visibility: visible; transform: none; transition: none; } }
  .lr-player .lr-prev, .lr-player .lr-next { appearance: none; width: 56px; height: 56px; padding: 0; display: grid; place-items: center; background: none; border: 1px solid var(--rule); border-radius: 2px; color: #ede9e1; cursor: pointer; }
  @media (hover: hover) { .lr-player .lr-prev:hover, .lr-player .lr-next:hover { border-color: var(--cul); color: var(--cul); } }
  .lr-player button:focus-visible { outline: 2px solid #ede9e1; outline-offset: 2px; }
  .lr-mid { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 60px; }
  .lr-name { margin: 0; font-family: var(--disp); font-weight: 700; font-size: clamp(1.05rem, 1.5vw, 1.3rem); line-height: 1.15; color: #ede9e1; }
  .lr-exp { margin: 3px 0 0; font-size: 14.5px; line-height: 1.35; color: var(--soft); }
  .lr-view { margin: 0 auto; width: 100%; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(18px, 3vw, 44px); align-items: start; border-top: 1px solid var(--rule); padding-top: clamp(18px, 3vh, 28px); max-width: 1280px; }
  .lr-cap { margin: 0; font-size: clamp(1.02rem, 1.2vw, 1.18rem); line-height: 1.45; color: var(--soft); }
  .lr-cap b { color: var(--c); font-weight: 600; }
  .lr-view { grid-template-columns: minmax(0, 1fr) !important; max-width: 900px !important; }
  .lr-shot { position: relative; background: #0f0e0d; outline: 1px solid rgba(237, 233, 225, .14); outline-offset: -1px; aspect-ratio: 1440 / 900; display: grid; place-items: center; }   /* one fixed shape per width, so the page never moves when the output changes */
  .lr-shot[data-pic="t"] { aspect-ratio: 834 / 1194; } .lr-shot[data-pic="p"] { aspect-ratio: 780 / 1688; }
  .lr-shot img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
  .lr-cap { min-height: 4.4em; }
  .lr-none { margin: 0; padding: 40px 22px; color: var(--soft); font-size: 15px; }
  @media (max-width: 899px) { .lr-view { grid-template-columns: minmax(0, 1fr); } .lr-out { font-size: 15px; gap: 14px; padding-right: 4px; } .lr-rec-h { font-size: 1.02rem; } .lr-go { padding: 8px 12px; font-size: 15px; min-height: 44px; } .lr-said { font-size: 13.5px; line-height: 1.3; } }
  @media (prefers-reduced-motion: reduce) { .lr-pt { transition: none; } }
