:root {
  --font-display: "Newsreader", Georgia, serif;
  --font-body: "Atkinson Hyperlegible", Arial, sans-serif;
  --font-utility: "IBM Plex Mono", Consolas, monospace;

  --ink: #17231d;
  --ink-soft: #3c4b40;
  --paper: #edf0e7;
  --paper-deep: #d9dfd2;
  --surface: #f7f6ef;
  --surface-alt: #cbd4c6;
  --lichen: #617454;
  --lichen-deep: #405b3d;
  --gorse: #c8a23a;
  --gorse-soft: #efd88e;
  --ember: #8b4b41;
  --mist: #c8d3cf;
  --forest: #334a3b;
  --forest-deep: #1d3829;
  --moss: #526648;
  --granite: #77786c;
  --water: #654d32;
  --line: rgba(23, 35, 29, 0.2);
  --shadow: 0 24px 70px rgba(23, 35, 29, 0.14);

  --page-max: 1480px;
  --content-max: 1240px;
  --reading-max: 760px;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --section-space: clamp(5.5rem, 12vw, 10rem);
  --radius-sm: 0.2rem;
  --radius-md: 0.65rem;
  --radius-lg: 1.2rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-direction="lisiere"] {
  --ink: #182321;
  --ink-soft: #465451;
  --paper: #e9ece8;
  --paper-deep: #dce1dd;
  --surface: #f5f6f2;
  --surface-alt: #d2d9d5;
  --lichen: #6c8179;
  --lichen-deep: #435e55;
  --gorse: #c6a447;
  --gorse-soft: #e9d89f;
  --ember: #7a6354;
  --mist: #c3cec9;
  --line: rgba(24, 35, 33, 0.2);
  --shadow: 0 24px 70px rgba(24, 35, 33, 0.12);
}

html[data-direction="cabinet"] {
  --ink: #222324;
  --ink-soft: #55595b;
  --paper: #f4f4f1;
  --paper-deep: #e4e6e5;
  --surface: #ffffff;
  --surface-alt: #dde2e0;
  --lichen: #4f6267;
  --lichen-deep: #2f484e;
  --gorse: #3d5f91;
  --gorse-soft: #bdcbe1;
  --ember: #756440;
  --mist: #cfd8d6;
  --line: rgba(34, 35, 36, 0.25);
  --shadow: 0 18px 50px rgba(34, 35, 36, 0.1);
}

html.is-veillee {
  --ink: #edf0e9;
  --ink-soft: #bec9c3;
  --paper: #111a1b;
  --paper-deep: #172325;
  --surface: #1b2829;
  --surface-alt: #253638;
  --lichen: #90aea1;
  --lichen-deep: #c5d5cd;
  --gorse: #e0b84a;
  --gorse-soft: #66572a;
  --ember: #d7806c;
  --mist: #334546;
  --line: rgba(237, 240, 233, 0.18);
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
}

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

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 12%, color-mix(in srgb, var(--gorse) 8%, transparent), transparent 28rem),
    var(--paper);
  font-family: var(--font-body);
  font-size: 1.075rem;
  line-height: 1.65;
  transition: color 350ms ease, background-color 350ms ease;
}

body::before {
  position: fixed;
  z-index: 100;
  inset: 0;
  border: 0 solid var(--gorse);
  pointer-events: none;
  content: "";
  transition: border-width 300ms var(--ease);
}

html.is-switching body::before {
  border-width: 6px;
}

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

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

::selection {
  color: var(--ink);
  background: var(--gorse-soft);
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  color: var(--paper);
  background: var(--ink);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.lab-bar {
  position: relative;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  min-height: 48px;
  align-items: center;
  gap: 1.2rem;
  padding: 0.45rem clamp(1rem, 3vw, 2.4rem);
  color: #f5f5ed;
  background: #131b1d;
  font-family: var(--font-utility);
  font-size: 0.69rem;
  letter-spacing: 0.04em;
}

.lab-bar__identity,
.direction-switch {
  display: flex;
  align-items: center;
}

.direction-select-label {
  display: none;
}

.lab-bar__identity {
  gap: 0.55rem;
  white-space: nowrap;
}

.lab-bar__identity strong {
  color: #e0b84a;
  font-weight: 500;
}

.lab-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #e0b84a;
  box-shadow: 0 0 0 4px rgba(224, 184, 74, 0.15);
}

.direction-switch {
  justify-self: center;
  gap: 0.2rem;
  padding: 0.2rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}

.direction-button,
.veillee-toggle {
  min-height: 36px;
  border: 0;
  color: #c8d0ce;
  background: transparent;
  cursor: pointer;
}

.direction-button {
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
}

.direction-button:hover,
.direction-button.is-active {
  color: #131b1d;
  background: #f2f0e7;
}

.veillee-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.55rem;
}

.veillee-toggle:hover {
  color: #fff;
}

.site-shell {
  position: relative;
  max-width: var(--page-max);
  min-height: 100vh;
  margin: 0 auto;
  overflow: clip;
}

.site-header {
  position: relative;
  z-index: 30;
  display: flex;
  width: calc(100% - clamp(2rem, 4vw, 4rem));
  min-height: 84px;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto -3.95rem;
  padding: 0.85rem var(--gutter);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 95%, transparent);
  box-shadow: 0 18px 42px rgba(20, 38, 29, 0.15);
  backdrop-filter: blur(16px);
}

.wordmark {
  display: inline-flex;
  flex-direction: column;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 650;
  line-height: 0.82;
  text-decoration: none;
}

.wordmark > .wordmark__name:nth-child(2) {
  margin-left: 0.85rem;
  color: var(--lichen-deep);
  font-style: italic;
  font-weight: 300;
}

.primary-navigation {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2.2rem);
}

.primary-navigation a,
.rubriques-toggle,
.search-button {
  position: relative;
  border: 0;
  color: var(--ink-soft);
  background: none;
  font-size: 0.93rem;
  text-decoration: none;
}

.rubriques-menu {
  position: relative;
}

.rubriques-toggle {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 0.4rem;
  padding: 0;
  cursor: pointer;
}

.rubriques-toggle__chevron {
  color: var(--gorse);
  font-size: 1.05rem;
  line-height: 1;
  transition: transform 220ms var(--ease);
}

.rubriques-toggle[aria-expanded="true"] .rubriques-toggle__chevron {
  transform: rotate(180deg);
}

.rubriques-panel {
  position: absolute;
  z-index: 50;
  top: calc(100% + 1rem);
  right: -10rem;
  display: none;
  width: min(43rem, calc(100vw - 3rem));
  padding: 1.25rem;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 97%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.rubriques-panel.is-open {
  display: block;
}

.rubriques-panel__links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 1.5rem;
}

.primary-navigation .rubriques-panel__links a {
  display: flex;
  min-height: 54px;
  align-items: center;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 500;
  line-height: 1.15;
}

.primary-navigation .rubriques-panel__links a:hover {
  color: var(--lichen-deep);
  background: color-mix(in srgb, var(--gorse) 8%, transparent);
}

.primary-navigation .rubriques-panel a::after {
  display: none;
}

.primary-navigation .rubriques-panel__all {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem 0;
  color: var(--lichen-deep);
  font-family: var(--font-utility);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.primary-navigation a::after {
  position: absolute;
  right: 0;
  bottom: -0.45rem;
  left: 0;
  height: 2px;
  background: var(--gorse);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 220ms var(--ease);
}

.primary-navigation a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.search-button {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 0.45rem;
  padding: 0 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}

.menu-toggle {
  display: none;
}

.thread-rail {
  position: absolute;
  z-index: 10;
  top: 220px;
  bottom: 480px;
  left: calc(var(--gutter) / 2);
  width: 2px;
  pointer-events: none;
}

.thread-rail__base,
.thread-rail__progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  border-radius: 2px;
}

.thread-rail__base {
  height: 100%;
  background: var(--line);
}

.thread-rail__progress {
  height: calc(var(--thread-progress, 0) * 100%);
  background: var(--gorse);
  box-shadow: 0 0 20px color-mix(in srgb, var(--gorse) 60%, transparent);
}

.thread-rail__knot {
  position: absolute;
  left: -5px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--gorse);
  border-radius: 50%;
  background: var(--paper);
}

.thread-rail__knot--origin {
  top: 21%;
}

.thread-rail__knot--present {
  top: 55%;
}

.section-frame {
  position: relative;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--section-space) var(--gutter);
}

.section-frame--narrow {
  max-width: 980px;
}

.place-threshold {
  position: relative;
  padding-bottom: 0;
  color: #f5f4ec;
  background: transparent;
}

.place-threshold__media {
  position: relative;
  height: auto;
  aspect-ratio: 750 / 319;
  margin: 0;
  overflow: hidden;
  background: var(--forest);
}

.place-threshold__media::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 20, 14, 0.26), transparent 44%, rgba(10, 20, 14, 0.08)),
    linear-gradient(0deg, rgba(12, 22, 16, 0.42), transparent 42%);
  pointer-events: none;
  content: "";
}

.place-threshold__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  filter: saturate(0.9) contrast(1.04);
  transform: none;
}

.place-threshold__media picture {
  display: block;
  width: 100%;
  height: 100%;
}

.place-threshold__media figcaption {
  position: absolute;
  z-index: 2;
  right: var(--gutter);
  bottom: 1.1rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-family: var(--font-utility);
  font-size: 0.66rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.place-threshold__bridge-line {
  position: absolute;
  z-index: 3;
  right: 12%;
  bottom: 0;
  width: 1px;
  height: 43%;
  background: var(--gorse);
}

.place-threshold__bridge-line::before {
  position: absolute;
  top: -6px;
  left: -5px;
  width: 11px;
  height: 11px;
  border: 2px solid var(--gorse);
  border-radius: 50%;
  background: rgba(20, 37, 28, 0.6);
  content: "";
}

.place-threshold__identity {
  position: relative;
  z-index: 4;
  display: grid;
  width: min(880px, calc(100% - (2 * var(--gutter))));
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 2rem;
  margin: clamp(-11.25rem, -9.4vw, -8.5rem) var(--gutter) 0 auto;
  padding: 1.75rem 3rem 2rem;
  background: color-mix(in srgb, var(--forest-deep) 95%, transparent);
  box-shadow: -18px 18px 0 color-mix(in srgb, var(--granite) 35%, transparent);
  backdrop-filter: blur(10px);
}

@media (min-width: 1600px) {
  .place-threshold__bridge-line {
    height: 50%;
  }
}

.place-threshold__identity .section-label {
  grid-column: 1 / -1;
  margin: 0;
  color: #d7dfd2;
}

.place-threshold__identity h1 {
  grid-column: 1 / -1;
  margin: 0.55rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(3.9rem, 6.5vw, 6.4rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.place-threshold__signature {
  grid-row: 3;
  grid-column: 1;
  align-self: center;
  margin: 0.75rem 0 0;
  color: #dce2d9;
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
}

.place-threshold__signature em {
  color: var(--gorse-soft);
  font-family: var(--font-display);
  font-size: 1.15em;
}

.place-threshold__identity > a {
  display: inline-flex;
  grid-row: 3;
  grid-column: 2;
  min-height: 44px;
  align-items: center;
  align-self: center;
  gap: 0.65rem;
  margin-top: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.38);
  color: #fff;
  font-size: 0.9rem;
  text-decoration: none;
}

.place-threshold__identity > a span {
  color: var(--gorse);
}

.hero {
  z-index: 6;
  display: grid;
  min-height: min(720px, calc(100vh - 158px));
  grid-template-columns: minmax(0, 1.3fr) minmax(310px, 0.7fr);
  align-items: center;
  gap: clamp(3rem, 8vw, 8rem);
  margin-top: -1rem;
  padding-top: clamp(4.5rem, 8vw, 7rem);
  padding-bottom: clamp(5rem, 9vw, 8rem);
  border-top: 1px solid color-mix(in srgb, var(--granite) 42%, transparent);
  background: var(--paper);
  box-shadow: 0 -24px 70px rgba(20, 38, 29, 0.12);
}

.hero::before {
  position: absolute;
  top: 7%;
  right: -5%;
  width: 46%;
  height: 86%;
  border: 1px solid var(--line);
  border-radius: 50% 50% 12% 12% / 25% 25% 8% 8%;
  content: "";
  opacity: 0.65;
}

.section-label,
.story-card__meta,
.time-card__marker,
.time-card__date,
.entry-card__type,
.correspondence-card__voice,
.hypothesis-note,
.origin-portrait figcaption {
  color: var(--lichen-deep);
  font-family: var(--font-utility);
  font-size: 0.71rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  line-height: 1.5;
  text-transform: uppercase;
}

.section-label::before {
  display: inline-block;
  width: 1.8rem;
  height: 1px;
  margin-right: 0.7rem;
  background: var(--gorse);
  content: "";
  vertical-align: middle;
}

.hero h2 {
  max-width: 880px;
  margin: 1.4rem 0 1.8rem;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 3.7vw, 4.25rem);
  font-weight: 300;
  letter-spacing: -0.012em;
  line-height: 0.98;
}

.hero h2 em {
  color: var(--lichen-deep);
  font-weight: 500;
}

.hero__lead {
  max-width: 650px;
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  line-height: 1.55;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.2rem;
  margin-top: 2.4rem;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: 0;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 700;
  text-decoration: none;
}

.button--primary {
  padding: 0.75rem 1.25rem;
  color: var(--paper);
  background: var(--ink);
  border-radius: var(--radius-sm);
  box-shadow: 5px 5px 0 var(--gorse);
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease);
}

.button--primary:hover {
  box-shadow: 2px 2px 0 var(--gorse);
  transform: translate(3px, 3px);
}

.button--text {
  padding: 0.65rem 0.1rem;
  border-bottom: 1px solid var(--lichen);
  color: var(--ink);
  background: transparent;
}

.button--text span {
  transition: transform 180ms var(--ease);
}

.button--text:hover span {
  transform: translateX(0.3rem);
}

.hero__time-map {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1rem;
}

.time-card {
  position: relative;
  min-height: 190px;
  padding: 1.6rem;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(12px);
}

.time-card--origin {
  margin-right: 14%;
}

.time-card--living {
  margin-left: 14%;
  border-color: color-mix(in srgb, var(--gorse) 55%, var(--line));
}

.time-card__marker,
.time-card__role,
.time-card__name,
.time-card__date {
  margin: 0;
}

.time-card__name {
  margin-top: 1.4rem;
  font-family: var(--font-display);
  font-size: 2.15rem;
  line-height: 1;
}

.time-card__role {
  margin-top: 0.45rem;
  color: var(--ink-soft);
}

.time-card__date {
  position: absolute;
  right: 1.4rem;
  bottom: 1.2rem;
}

.time-map__link {
  position: absolute;
  z-index: 2;
  top: 41%;
  left: 50%;
  width: 1px;
  height: 22%;
  background: var(--gorse);
}

.time-map__link i {
  position: absolute;
  bottom: -5px;
  left: -5px;
  width: 11px;
  height: 11px;
  border: 2px solid var(--gorse);
  border-radius: 50%;
  background: var(--paper);
}

.direction-note {
  position: absolute;
  right: var(--gutter);
  bottom: 2rem;
  left: var(--gutter);
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.direction-note strong {
  color: var(--ink);
}

.opening-note {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 2rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.opening-note__index {
  margin: 0;
  color: var(--gorse);
  font-family: var(--font-utility);
  font-size: 0.75rem;
}

.opening-note > p:last-child {
  max-width: 760px;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2vw, 2.05rem);
  font-weight: 300;
  line-height: 1.34;
}

.section-heading {
  max-width: 900px;
  margin-bottom: clamp(3rem, 7vw, 5.5rem);
}

.section-heading--split {
  display: grid;
  max-width: none;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  align-items: end;
  gap: clamp(2rem, 7vw, 7rem);
}

.section-heading h2,
.about h2,
.search-dialog h2 {
  margin: 1rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 3.45vw, 3.75rem);
  font-weight: 300;
  letter-spacing: -0.018em;
  line-height: 1.04;
}

.section-heading > p:last-child,
.section-heading--split > p,
.about > p:not(.section-label) {
  color: var(--ink-soft);
  font-size: 1.1rem;
}

.origin {
  max-width: var(--page-max);
  background: var(--paper-deep);
}

.origin-stage {
  display: grid;
  grid-template-columns: minmax(220px, 0.62fr) minmax(320px, 1fr) minmax(280px, 0.78fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 5rem);
}

.origin-portrait {
  margin: 0;
}

.origin-portrait__frame {
  position: relative;
  padding: 0.55rem;
  border: 1px solid var(--line);
  background: var(--surface);
}

.origin-portrait__frame::after {
  position: absolute;
  right: -0.6rem;
  bottom: -0.6rem;
  width: 44%;
  height: 52%;
  border-right: 2px solid var(--gorse);
  border-bottom: 2px solid var(--gorse);
  content: "";
}

.origin-portrait img {
  width: 100%;
  aspect-ratio: 0.55;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(100%) contrast(1.03);
}

.origin-portrait figcaption {
  margin-top: 1rem;
}

.origin-manifesto {
  padding-top: 1rem;
}

.origin-manifesto__status {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--lichen-deep);
  font-family: var(--font-utility);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.origin-manifesto__status span {
  width: 0.7rem;
  height: 0.7rem;
  border: 2px solid var(--lichen);
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--paper-deep);
  background: var(--lichen);
}

.origin-manifesto blockquote {
  margin: 2rem 0;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 2.4vw, 2.8rem);
  font-weight: 300;
  line-height: 1.24;
}

.origin-manifesto blockquote.origin-manifesto__testimony {
  max-width: 760px;
  padding-left: clamp(1rem, 2.5vw, 2rem);
  border-left: 2px solid var(--gorse);
  font-size: clamp(1.45rem, 1.85vw, 2.15rem);
  line-height: 1.3;
}

.origin-manifesto__testimony em {
  color: var(--lichen-deep);
}

.origin-manifesto__testimony strong {
  font-weight: 500;
}

.origin-manifesto .origin-manifesto__source {
  margin-top: -1rem;
  color: var(--lichen-deep);
  font-family: var(--font-utility);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
}

.origin-manifesto > p:not(.origin-manifesto__status) {
  max-width: 620px;
  color: var(--ink-soft);
}

.origin-entries {
  border-top: 1px solid var(--line);
}

.entry-card {
  position: relative;
  display: block;
  padding: 1.4rem 2.4rem 1.4rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.entry-card strong {
  display: block;
  margin-top: 0.45rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1.15;
}

.entry-card__arrow {
  position: absolute;
  top: 50%;
  right: 0.2rem;
  color: var(--gorse);
  transform: translateY(-50%);
  transition: transform 180ms var(--ease);
}

.entry-card:hover .entry-card__arrow {
  transform: translate(0.25rem, -0.25rem);
}

.living-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3.4rem);
}

.story-card {
  display: grid;
  grid-template-columns: minmax(130px, 0.75fr) minmax(0, 1.25fr);
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.story-card--lead {
  grid-row: span 2;
  grid-template-columns: 1fr;
}

.story-card__image {
  min-height: 190px;
  overflow: hidden;
}

.story-card--lead .story-card__image {
  min-height: 340px;
}

.story-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.78) contrast(1.02);
  transition: filter 320ms ease, transform 500ms var(--ease);
}

.story-card:hover .story-card__image img {
  filter: saturate(1);
  transform: scale(1.025);
}

.story-card__content {
  padding: clamp(1.25rem, 3vw, 2.1rem);
}

.story-card h3 {
  margin: 0.8rem 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 1.9vw, 2.05rem);
  font-weight: 500;
  line-height: 1.12;
}

.story-card h3 a {
  text-decoration: none;
}

.story-card p:last-child {
  margin-bottom: 0;
  color: var(--ink-soft);
}

.correspondence {
  max-width: var(--page-max);
  background: var(--ink);
  color: var(--paper);
}

.correspondence .section-label,
.correspondence .correspondence-card__voice,
.correspondence .hypothesis-note {
  color: var(--gorse-soft);
}

.correspondence .section-heading > p,
.correspondence .correspondence-card p {
  color: color-mix(in srgb, var(--paper) 74%, transparent);
}

.correspondence-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.52fr) minmax(0, 1fr);
  align-items: stretch;
  gap: clamp(1rem, 3vw, 2.5rem);
}

.correspondence-card {
  min-height: 470px;
  padding: clamp(1.4rem, 3vw, 2.3rem);
  border: 1px solid color-mix(in srgb, var(--paper) 20%, transparent);
}

.correspondence-card__image {
  height: 190px;
  margin: 1.8rem 0;
  overflow: hidden;
}

.correspondence-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.1);
}

.correspondence-card__glyph {
  display: grid;
  height: 190px;
  margin: 1.8rem 0;
  place-items: center;
  color: var(--gorse);
  background:
    repeating-radial-gradient(circle at center, transparent 0 18px, color-mix(in srgb, var(--gorse) 13%, transparent) 19px 20px);
  font-family: var(--font-display);
  font-size: 8rem;
  font-weight: 300;
}

.correspondence-card h3 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 2.2vw, 2.6rem);
  font-weight: 300;
  line-height: 1.08;
}

.correspondence-link {
  position: relative;
  display: grid;
  place-items: center;
}

.correspondence-link__line {
  position: absolute;
  top: 14%;
  bottom: 14%;
  left: 50%;
  width: 1px;
  background: var(--gorse);
}

.correspondence-link__line::before,
.correspondence-link__line::after {
  position: absolute;
  left: -5px;
  width: 11px;
  height: 11px;
  border: 2px solid var(--gorse);
  border-radius: 50%;
  background: var(--ink);
  content: "";
}

.correspondence-link__line::before {
  top: 0;
}

.correspondence-link__line::after {
  bottom: 0;
}

.correspondence-link p {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 1.5rem 0.8rem;
  background: var(--ink);
  font-family: var(--font-display);
  font-size: 1.7rem;
  line-height: 1.2;
  text-align: center;
}

.correspondence-link p span {
  display: block;
  margin-bottom: 0.8rem;
  color: var(--gorse);
  font-family: var(--font-utility);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hypothesis-note {
  margin-top: 1.5rem;
  text-align: center;
}

.path-list {
  border-top: 1px solid var(--line);
}

.path-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 44px;
  min-height: 92px;
  align-items: center;
  gap: 1.2rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.path-list__identity {
  display: grid;
  gap: 0.55rem;
}

.path-list__identity strong {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.35vw, 2.65rem);
  font-weight: 300;
  line-height: 1.08;
  transition: transform 240ms var(--ease);
}

.path-list__identity em {
  width: fit-content;
  padding-bottom: 0.18rem;
  border-bottom: 1px solid var(--line-strong);
  color: var(--ink-soft);
  font-family: var(--font-utility);
  font-size: 0.66rem;
  font-style: normal;
  letter-spacing: 0.075em;
  line-height: 1.4;
  text-transform: uppercase;
}

.path-list__identity--living em {
  border-color: var(--gorse);
  color: var(--lichen-deep);
}

.path-list a small {
  color: var(--lichen-deep);
  font-family: var(--font-utility);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.path-list a i {
  color: var(--gorse);
  font-size: 1.4rem;
  font-style: normal;
  text-align: right;
}

.path-list a:hover .path-list__identity strong {
  transform: translateX(0.8rem);
}

.about {
  text-align: center;
}

.about h2 {
  margin-bottom: 2rem;
}

.about > p:not(.section-label) {
  max-width: var(--reading-max);
  margin-right: auto;
  margin-left: auto;
}

.about .button {
  margin-top: 1.5rem;
}

.arbitration {
  max-width: var(--page-max);
  background: var(--surface-alt);
}

.decision-list {
  border-top: 1px solid var(--line);
}

.decision-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}

.decision-card > div:first-child {
  display: grid;
  grid-template-columns: 54px minmax(0, 0.8fr) minmax(260px, 1.2fr);
  align-items: center;
  gap: 1.2rem;
}

.decision-card > div:first-child > span {
  color: var(--gorse);
  font-family: var(--font-utility);
  font-size: 0.72rem;
}

.decision-card h3,
.decision-card p {
  margin: 0;
}

.decision-card h3 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 500;
  line-height: 1.1;
}

.decision-card p {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.decision-actions {
  display: flex;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.decision-actions button {
  min-height: 40px;
  padding: 0.45rem 0.75rem;
  border: 0;
  border-radius: 999px;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
  font-size: 0.8rem;
}

.decision-actions button:hover,
.decision-actions button.is-selected {
  color: var(--paper);
  background: var(--ink);
}

.decision-actions button[data-choice="retain"].is-selected {
  color: #172428;
  background: var(--gorse);
}

.arbitration-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-top: 2rem;
}

.arbitration-note {
  flex: 1 0 100%;
}

.arbitration-note span {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--lichen-deep);
  font-family: var(--font-utility);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.arbitration-note textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  padding: 1rem;
  border: 1px solid var(--line);
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  font: inherit;
  line-height: 1.5;
}

.arbitration-footer > div {
  display: flex;
  gap: 1.5rem;
}

.decision-status {
  color: var(--ink-soft);
  font-family: var(--font-utility);
  font-size: 0.75rem;
}

.site-footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 3rem;
  padding: 3rem var(--gutter);
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0;
  color: var(--ink-soft);
}

.site-footer nav {
  display: flex;
  gap: 1.4rem;
}

.site-footer nav a {
  font-size: 0.9rem;
}

.site-footer__prototype {
  grid-column: 1 / -1;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-utility);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.search-dialog {
  width: min(760px, calc(100% - 2rem));
  padding: clamp(2rem, 6vw, 5rem);
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.search-dialog::backdrop {
  background: rgba(10, 18, 18, 0.74);
  backdrop-filter: blur(5px);
}

.search-dialog__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.search-dialog label {
  display: block;
  margin: 2rem 0 0.5rem;
  font-weight: 700;
}

.search-dialog__field {
  display: grid;
  grid-template-columns: 1fr auto;
}

.search-dialog input {
  min-height: 54px;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--paper);
}

.search-dialog__field button {
  min-height: 54px;
  padding: 0.8rem 1.2rem;
  border: 0;
  color: var(--paper);
  background: var(--ink);
}

.search-dialog__hint {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 800ms var(--ease), transform 800ms var(--ease);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

html[data-direction="lisiere"] .hero::before {
  border-radius: 48% 52% 44% 56% / 60% 34% 66% 40%;
  background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--lichen) 10%, transparent), transparent 68%);
}

html[data-direction="lisiere"] .story-card__image img,
html[data-direction="lisiere"] .origin-portrait img,
html[data-direction="lisiere"] .place-threshold__media img {
  filter: saturate(0.55) contrast(1.08) sepia(0.1);
}

html[data-direction="cabinet"] .hero::before {
  border-radius: 0;
  background: repeating-linear-gradient(90deg, transparent 0 39px, var(--line) 40px);
}

html[data-direction="cabinet"] .time-card,
html[data-direction="cabinet"] .story-card,
html[data-direction="cabinet"] .origin-portrait__frame {
  border-radius: 0;
}

html[data-direction="cabinet"] .wordmark,
html[data-direction="cabinet"] .section-heading h2 {
  letter-spacing: -0.025em;
}

@media (max-width: 1080px) {
  .lab-bar {
    grid-template-columns: 1fr auto;
  }

  .direction-switch {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: stretch;
    overflow-x: auto;
    border-radius: 0;
  }

  .direction-button {
    flex: 1 0 max-content;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero::before {
    top: 48%;
    right: 5%;
    width: 70%;
    height: 45%;
  }

  .hero__time-map {
    max-width: 660px;
  }

  .origin-stage {
    grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
  }

  .origin-entries {
    grid-column: 1 / -1;
  }

  .decision-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .site-header {
    width: calc(100% - 1rem);
    min-height: 72px;
    margin: 0 0.5rem -3.4rem;
  }

  .menu-toggle {
    display: flex;
    min-width: 70px;
    min-height: 44px;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    border: 0;
    color: var(--ink);
    background: transparent;
  }

  .menu-toggle__lines,
  .menu-toggle__lines::before,
  .menu-toggle__lines::after {
    display: block;
    width: 22px;
    height: 1px;
    background: currentColor;
    content: "";
  }

  .menu-toggle__lines {
    position: relative;
  }

  .menu-toggle__lines::before,
  .menu-toggle__lines::after {
    position: absolute;
    left: 0;
  }

  .menu-toggle__lines::before {
    top: -6px;
  }

  .menu-toggle__lines::after {
    top: 6px;
  }

  .primary-navigation {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    align-items: stretch;
    padding: 1rem var(--gutter) 1.5rem;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    box-shadow: var(--shadow);
  }

  .primary-navigation.is-open {
    display: grid;
  }

  .primary-navigation a,
  .rubriques-toggle,
  .search-button {
    min-height: 48px;
    justify-content: flex-start;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--line);
  }

  .rubriques-menu {
    width: 100%;
  }

  .rubriques-toggle {
    width: 100%;
    justify-content: space-between;
  }

  .rubriques-panel {
    position: static;
    width: 100%;
    padding: 0.25rem 0 0.8rem;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .rubriques-panel__links {
    grid-template-columns: 1fr;
  }

  .primary-navigation .rubriques-panel__links a {
    min-height: 44px;
    padding: 0.55rem 1rem;
    font-size: 1.04rem;
  }

  .primary-navigation .rubriques-panel__all {
    min-height: 44px;
    margin-top: 0.25rem;
    padding: 0.65rem 1rem 0;
    border-bottom: 0;
  }

  .search-button {
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }

  .section-heading--split {
    grid-template-columns: 1fr;
  }

  .living-grid {
    grid-template-columns: 1fr;
  }

  .story-card--lead {
    grid-row: auto;
  }

  .correspondence-stage {
    grid-template-columns: 1fr;
  }

  .correspondence-link {
    min-height: 170px;
  }

  .correspondence-link__line {
    top: 50%;
    right: 12%;
    bottom: auto;
    left: 12%;
    width: auto;
    height: 1px;
  }

  .correspondence-link__line::before,
  .correspondence-link__line::after {
    top: -5px;
  }

  .correspondence-link__line::before {
    left: 0;
  }

  .correspondence-link__line::after {
    right: 0;
    bottom: auto;
    left: auto;
  }

  .decision-card > div:first-child {
    grid-template-columns: 42px 1fr;
  }

  .decision-card > div:first-child p {
    grid-column: 2;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 1.3rem;
  }
}

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

  .lab-bar {
    position: relative;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.5rem;
    padding: 0.45rem 0.75rem;
  }

  .lab-bar__identity span:not(.lab-dot),
  .lab-bar__identity strong {
    display: none;
  }

  .veillee-toggle span:last-child {
    display: none;
  }

  .direction-switch {
    display: none;
  }

  .direction-select-label {
    display: block;
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    padding: 0;
    border: 0;
  }

  .direction-select {
    width: 100%;
    min-height: 42px;
    padding: 0.45rem 2.4rem 0.45rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: #f5f5ed;
    background: #1d292b;
    font-family: var(--font-utility);
    font-size: 0.72rem;
  }

  .veillee-toggle {
    grid-column: 3;
    grid-row: 1;
    min-width: 42px;
    min-height: 42px;
    justify-content: center;
  }

  .thread-rail {
    left: 0.55rem;
  }

  .place-threshold {
    padding-bottom: 3rem;
  }

  .place-threshold__media {
    height: 300px;
    aspect-ratio: auto;
  }

  .place-threshold__media img {
    object-position: 54% center;
    transform: scale(1.002);
    transform-origin: center;
  }

  .place-threshold__media figcaption {
    right: 1rem;
    bottom: 0.7rem;
  }

  .place-threshold__bridge-line {
    right: 1.5rem;
    height: 25%;
  }

  .place-threshold__identity {
    display: block;
    width: calc(100% - 2rem);
    margin: -2rem 1rem 0;
    padding: 1.5rem;
    box-shadow: -8px 8px 0 color-mix(in srgb, var(--granite) 42%, transparent);
  }

  .place-threshold__identity h1 {
    font-size: clamp(3.65rem, 18vw, 5.1rem);
  }

  .hero {
    min-height: auto;
    margin-top: -3rem;
    padding-top: 5rem;
  }

  .hero h2 {
    font-size: clamp(2.55rem, 11vw, 3.25rem);
  }

  .hero::before {
    top: 54%;
    right: -10%;
    width: 100%;
    height: 40%;
  }

  .hero__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button--primary {
    width: 100%;
  }

  .time-card--origin,
  .time-card--living {
    margin: 0;
  }

  .direction-note {
    position: static;
    grid-column: 1;
    margin-top: 2rem;
  }

  .opening-note {
    grid-template-columns: 1fr;
  }

  .origin-stage {
    grid-template-columns: 1fr;
  }

  .origin-portrait {
    max-width: 300px;
  }

  .origin-entries {
    grid-column: auto;
  }

  .story-card {
    grid-template-columns: 1fr;
  }

  .story-card__image,
  .story-card--lead .story-card__image {
    min-height: 220px;
  }

  .correspondence-card {
    min-height: 0;
  }

  .path-list a {
    grid-template-columns: minmax(0, 1fr) 36px;
  }

  .path-list a small {
    display: none;
  }

  .path-list a span {
    font-size: 2rem;
  }

  .decision-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .decision-actions button {
    min-height: 44px;
  }

  .arbitration-footer,
  .arbitration-footer > div {
    align-items: stretch;
    flex-direction: column;
  }

  .arbitration-footer .button {
    width: 100%;
  }

  .search-dialog__field {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
