:root {
  --bg: #000;
  --fg: #f2f2f2;
  --muted: #9a9a9a;
  --line: #f2f2f2;
  --accent: #ff2a2a;
  --panel: #000;
  --line-soft: rgba(255,255,255,.28);
  --sidebar-w: 315px;
  --font-title: "IBM Plex Sans Condensed", Arial, Helvetica, sans-serif;
  --font-text: "IBM Plex Sans", Arial, Helvetica, sans-serif;
  --font-brand: "Space Grotesk", Arial, Helvetica, sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;
}

html[data-theme="light"] {
  --bg: #fff;
  --fg: #101010;
  --muted: #6f6f6f;
  --line: #101010;
  --accent: #ff2a2a;
  --panel: #fff;
  --line-soft: rgba(0,0,0,.24);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-text);
  font-weight: 300;
  line-height: 1.18;
}
body.menu-open { overflow: hidden; }
button, input { font: inherit; }
a {
  color: inherit;
  text-decoration: none;
  transition: opacity .12s linear, color .12s linear;
}
@media (hover:hover) {
  a:hover { opacity: 0; }
}
img { max-width: 100%; }

.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 1rem;
  border-right: 1px solid var(--line);
  background: var(--bg);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: .85rem;
  z-index: 1000;
}
.brand { min-width: 0; }
.sidebar-cover-link { display: block; }
.sidebar-cover {
  display: block;
  width: 100%;
  height: clamp(150px, 31vh, 315px);
  object-fit: cover;
  object-position: center;
  border: 1px solid var(--line);
  background: #fff;
  margin: 0 0 .9rem;
}
.brand h1 {
  margin: 0;
  font-family: var(--font-brand);
  font-size: clamp(2.5rem, 3.65vw, 4.4rem);
  line-height: .78;
  letter-spacing: -.075em;
  font-weight: 300;
}
.sidebar-project-subtitle {
  margin: .62rem 0 0;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: .69rem;
  line-height: 1.2;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.nav {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: .15rem 0;
}
.nav ol { list-style: none; padding: 0; margin: 0; }
.nav li { margin: 0; }
.nav a {
  display: block;
  padding: .38rem 0;
  font-family: var(--font-mono);
  font-size: clamp(.86rem, 1.55vh, 1.02rem);
  line-height: 1.16;
  white-space: nowrap;
}
.nav a.active { color: var(--accent); }
.nav a.active::before { content: "→ "; }

.sidebar-controls-footer {
  border-top: 1px solid var(--line);
  padding-top: .55rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .6rem;
  align-items: center;
}
.sidebar-controls-row { display: flex; gap: .32rem; flex-wrap: nowrap; }
.sidebar-language-row { justify-content: flex-end; }
.sidebar-controls-footer button {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg);
  padding: .36rem .48rem;
  min-width: 2.2rem;
  font-family: var(--font-mono);
  font-size: .62rem;
  line-height: 1;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
}
.sidebar-controls-footer button.active,
.sidebar-controls-footer button:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
  outline: none;
}

.mobile-menu-toggle { display: none; }

.main {
  min-width: 0;
  padding: 0 clamp(1rem, 2vw, 2rem) 0;
}

.home {
  min-height: 100vh;
  min-height: 100dvh;
  border-bottom: 1px solid var(--line);
  padding: 1rem 0 3rem;
}
.home-inner { width: 100%; }
.home-header-grid {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  grid-template-areas:
    "kicker kicker"
    "title title"
    "intro image"
    "notes notes";
  column-gap: clamp(2rem, 4vw, 5.5rem);
  align-items: start;
}
.home-kicker {
  grid-area: kicker;
  margin: 0 0 .55rem;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: .72rem;
  line-height: 1.2;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.home-title {
  grid-area: title;
  font-family: var(--font-brand);
  margin: 0 0 clamp(1.5rem, 3vw, 3rem);
  font-size: clamp(6rem, 14.2vw, 18rem);
  line-height: .72;
  letter-spacing: -.085em;
  font-weight: 300;
  white-space: nowrap;
}
.home-intro-block { grid-area: intro; min-width: 0; }
html.fonts-pending .home-intro-block { visibility: hidden; }
.home-intro-block p {
  margin: 0;
  font-size: clamp(1.05rem, 1.45vw, 1.55rem);
  line-height: 1.22;
}
.home-intro-block a,
.home-notes a,
.colofon a {
  color: var(--accent);
  border-bottom: 1px solid currentColor;
}
.home-image-panel {
  grid-area: image;
  margin: 0;
}
.home-image-panel img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 68vh;
  object-fit: contain;
  object-position: center top;
  border: 1px solid var(--line);
  background: #fff;
}
.home-notes {
  grid-area: notes;
  margin-top: clamp(2.5rem, 6vh, 5rem);
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: clamp(.82rem, .95vw, 1rem);
  line-height: 1.42;
}
.home-notes p { margin: 0; }
.home-notes strong { color: var(--accent); font-weight: 400; }

@media (min-width: 901px) {
  .home {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
    padding: clamp(.75rem, 1.55vh, 1.05rem) 0 clamp(.8rem, 1.55vh, 1.05rem);
  }
  .home-inner,
  .home-header-grid { height: 100%; }
  .home-header-grid {
    grid-template-columns: minmax(0,.94fr) minmax(0,1.06fr);
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    column-gap: clamp(2.4rem, 4.5vw, 5.6rem);
    align-items: start;
  }
  .home-kicker {
    margin-bottom: clamp(1.15rem, 2.2vh, 1.65rem);
  }
  .home-title {
    font-size: clamp(5.6rem, min(12.95vw, 18.7vh), 14rem);
    line-height: .74;
    margin-bottom: clamp(.72rem, 1.35vh, 1rem);
    transform: translateY(clamp(.15rem, .42vh, .32rem));
  }
  .home-intro-block,
  .home-image-panel {
    align-self: stretch;
    padding-top: clamp(2.4rem, 6.4vh, 3.9rem);
  }
  .home-intro-block {
    min-height: 0;
    display: flex;
    align-items: flex-start;
  }
  .home-image-panel {
    height: 100%;
    min-height: 0;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
  }
  .home-image-panel img {
    width: 100%;
    max-height: min(54vh, 100%);
    object-position: center top;
  }
  .home-intro-block p {
    font-size: clamp(1.28rem, min(1.92vw, 2.85vh), 2.18rem);
    line-height: 1.28;
    max-width: none;
    text-wrap: pretty;
  }
  .home-notes {
    align-self: end;
    margin-top: 0;
    padding-top: clamp(.72rem, 1.25vh, 1rem);
    padding-bottom: clamp(.14rem, .4vh, .3rem);
    font-size: clamp(.95rem, 1.03vw, 1.1rem);
    line-height: 1.4;
  }
}

.recording {
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(1.15rem, 2.4vh, 1.8rem) 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 0;
}
@media (min-width: 901px) {
  .recording {
    height: 100vh;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
  }
  .recording-header h2 {
    font-size: clamp(2.7rem, 4.78vw, 5.45rem);
  }
}
.recording-header {
  display: grid;
  grid-template-columns: 4.25rem minmax(0, 1fr);
  gap: 1rem;
  align-items: baseline;
  margin-bottom: clamp(.8rem, 1.6vh, 1.15rem);
}
.recording-header .counter {
  margin: 0;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 1rem;
}
.recording-header h2 {
  margin: 0;
  font-family: var(--font-title);
  font-size: clamp(3.2rem, 6vw, 7rem);
  line-height: .84;
  letter-spacing: -.065em;
  font-weight: 300;
}
.recording-grid {
  display: grid;
  grid-template-columns: minmax(280px, 34%) minmax(0, 1fr);
  gap: clamp(.7rem, 1vw, 1rem);
  align-items: stretch;
  min-height: 0;
  height: 100%;
}
.media, .data { display: grid; gap: clamp(.65rem, 1.05vh, .9rem); min-width: 0; min-height: 0; height: 100%; }
.box {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--panel);
}
.audio-box { padding: clamp(.65rem, 1.2vh, .9rem); }
.minimal-audio-player {
  min-height: 0;
  display: grid;
  grid-template-columns: 2.9rem minmax(0,1fr) auto;
  gap: 1rem;
  align-items: center;
  width: 100%;
}
.minimal-play {
  appearance: none;
  width: 2.85rem;
  height: 2.85rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  position: relative;
}
.minimal-play::before {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-40%, -50%);
  width: 0; height: 0;
  border-top: .62rem solid transparent;
  border-bottom: .62rem solid transparent;
  border-left: .95rem solid currentColor;
}
.minimal-play.is-playing::before,
.minimal-play.is-playing::after {
  content: "";
  position: absolute;
  top: 50%;
  width: .22rem;
  height: 1.18rem;
  background: currentColor;
  border: 0;
}
.minimal-play.is-playing::before { left: 39%; transform: translate(-50%,-50%); }
.minimal-play.is-playing::after { left: 61%; transform: translate(-50%,-50%); }
.minimal-play:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }
.minimal-bar {
  position: relative;
  height: 1px;
  background: var(--line);
  cursor: pointer;
  touch-action: manipulation;
}
.minimal-bar:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }
.minimal-bar::before {
  content: "";
  position: absolute;
  inset: -12px 0;
}
.minimal-fill {
  position: absolute;
  inset: -1px auto auto 0;
  height: 3px;
  width: 0;
  background: var(--accent);
}
.minimal-time {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .8rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.audio-box audio { display: none; }

.technical { padding: clamp(.6rem, 1.1vh, .85rem) .9rem; overflow: hidden; }
.technical ul { list-style: none; margin: 0; padding: 0; }
.technical li {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 1rem;
  padding: clamp(.27rem, .55vh, .42rem) 0;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: clamp(.74rem, .78vw, .9rem);
  line-height: 1.25;
}
.technical li:last-child { border-bottom: 0; }
.technical span { color: var(--muted); }
.technical strong { font-weight: 300; text-align: right; }

.waveform-original {
  margin: 0;
  height: auto;
  min-height: 0;
  padding: .55rem .85rem;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.waveform-original img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.spectrogram-box { padding: .45rem; min-height: 0; overflow: hidden; }
.spectrogram-trigger {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  display: block;
  width: 100%;
  height: 100%;
  background: transparent;
  cursor: zoom-in;
}
.spectrogram-trigger img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
}

.media { grid-template-rows: 12fr 30fr 17fr minmax(0, 41fr); }
.data { grid-template-rows: 15fr 15fr 15fr minmax(0, 55fr); }
.media > *, .data > * { min-height: 0; }
.synthetic, .phrases, .morse-transcription {
  height: auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  position: relative;
}
.synthetic-marquee, .morse-marquee { width: 100%; overflow: hidden; white-space: nowrap; }
.synthetic-track {
  display: inline-flex;
  width: max-content;
  gap: 4rem;
  padding-left: 100%;
  animation: horizontal-left 62s linear infinite;
  will-change: transform;
}
.synthetic-track span {
  display: inline-block;
  font-size: clamp(1.2rem, 1.85vw, 2.25rem);
  line-height: 1.04;
  letter-spacing: -.035em;
}
.synthetic:hover .synthetic-track,
.phrases:hover .phrases-vertical-track,
.morse-transcription:hover .morse-marquee-track { animation-play-state: paused; }
@keyframes horizontal-left { from { transform: translateX(0); } to { transform: translateX(calc(-100% - 4rem)); } }

.phrases > ul {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.phrases-vertical-marquee { position: absolute; inset: 0; overflow: hidden; }
.phrases-vertical-track {
  position: absolute;
  left: .85rem;
  right: .85rem;
  top: 100%;
  color: var(--accent);
  font-size: clamp(1.05rem, 1.55vw, 1.9rem);
  line-height: 1.08;
  letter-spacing: -.03em;
  animation: vertical-up var(--phrases-duration, 34s) linear infinite;
  will-change: transform;
}
.phrases-vertical-track p { margin: 0 0 .65rem; }
@keyframes vertical-up { from { transform: translateY(0); } to { transform: translateY(calc(-100% - 7rem)); } }

.morse-transcription h3 { display: none; }
.morse-marquee { display: flex; align-items: center; }
.morse-marquee-track {
  display: inline-block;
  width: max-content;
  white-space: nowrap;
  animation: morse-right var(--morse-duration, 75s) linear infinite;
  will-change: transform;
}
.morse-marquee pre {
  display: inline;
  margin: 0;
  padding: 0;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: .8rem;
  line-height: 1;
  color: var(--fg);
}
@keyframes morse-right { from { transform: translateX(-100%); } to { transform: translateX(100vw); } }

.modes { min-height: 0; height: auto; padding: clamp(.65rem, 1.1vh, .9rem); overflow: hidden; }
.mode-layout {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(0, 1fr);
  height: 100%;
  min-height: 0;
}
.mode-list {
  padding-right: 1rem;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: .2rem;
}
.mode-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--fg);
  padding: .18rem 1.4rem .18rem 0;
  margin: 0;
  text-align: left;
  font-family: var(--font-mono);
  font-size: clamp(.72rem, .88vw, .96rem);
  line-height: 1.15;
  font-weight: 300;
  cursor: pointer;
  position: relative;
}
.mode-tab.active { color: var(--accent); }
.mode-tab.active::after { content: "→"; position: absolute; right: 0; }
.mode-tab:focus-visible { outline: 1px solid var(--accent); outline-offset: -1px; }
.spectrogram-trigger:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
.mode-display {
  min-width: 0;
  padding-left: 1rem;
  max-height: 100%;
  overflow-y: auto;
}
.mode-panel[hidden] { display: none; }
.mode-question,
.mode-answer,
.mode-answer p {
  font-family: var(--font-mono);
  font-size: clamp(.7rem, .79vw, .87rem);
  line-height: 1.35;
}
.mode-question { margin: 0 0 .65rem; color: var(--accent); }
.mode-answer p { margin: 0; }

.colofon {
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(1.4rem, 2.8vh, 2.2rem) 0 clamp(1rem, 2vh, 1.5rem);
}
.colofon-inner { width: 100%; }
.colofon h2 {
  margin: 0 0 clamp(1rem, 2vh, 1.5rem);
  font-family: var(--font-title);
  font-size: clamp(4rem, 6.3vw, 7.2rem);
  line-height: .8;
  letter-spacing: -.07em;
  font-weight: 300;
}
.colofon-text-grid {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  grid-template-rows: auto auto;
  column-gap: clamp(1.8rem, 3.2vw, 4rem);
  row-gap: clamp(.8rem, 1.8vh, 1.35rem);
}
.colofon-text-grid p {
  margin: 0;
  font-size: clamp(.98rem, 1.18vw, 1.35rem);
  line-height: 1.12;
  letter-spacing: -.02em;
}
.institutional-footer {
  margin-top: clamp(1.2rem, 2.6vh, 2rem);
  padding-top: clamp(.75rem, 1.4vh, 1rem);
  border-top: 1px solid var(--line);
}
.logo-theme-pair {
  width: 100%;
  background: var(--bg);
}
.institutional-footer img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 1;
  visibility: visible;
  transition: none;
  background: var(--bg);
}
html[data-theme="dark"] .theme-logo-light,
html[data-theme="light"] .theme-logo-dark { display: none; }
.institutional-footer .logos-cat {
  max-height: clamp(3.1rem, 6.4vh, 4.15rem);
  object-fit: contain;
}
.logos-cat-pair { margin-bottom: clamp(.55rem, 1.05vh, .8rem); }
.event-context,
.funding-text {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: clamp(.68rem, .76vw, .82rem);
  line-height: 1.34;
  font-weight: 300;
  letter-spacing: 0;
}
.event-context { margin: 0 0 clamp(.7rem, 1.35vh, 1rem); }
.institutional-footer .logos-bn {
  max-height: clamp(4.4rem, 10.2vh, 6.25rem);
  object-fit: contain;
}
.logos-bn-pair { margin-bottom: clamp(.5rem, .9vh, .7rem); }
.funding-text { margin: 0; }

@media (min-width: 901px) {
  .colofon {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
    padding: clamp(1rem, 1.9vh, 1.35rem) 0 clamp(.72rem, 1.35vh, .95rem);
  }
  .colofon-inner {
    height: 100%;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }
  .colofon h2 {
    margin-bottom: clamp(1.2rem, 2.35vh, 1.6rem);
    font-size: clamp(5.35rem, 7.6vw, 8.4rem);
  }
  .colofon-text-grid {
    min-height: 0;
    height: 100%;
    grid-template-columns: minmax(0,1fr) minmax(0,1fr);
    grid-template-rows: auto minmax(0, 1fr) 1px auto;
    column-gap: clamp(2rem, 4vw, 5rem);
    row-gap: 0;
    align-content: stretch;
  }
  .colofon-text-grid::before {
    content: "";
    grid-column: 1 / -1;
    grid-row: 3;
    border-top: 1px solid var(--line);
    align-self: center;
  }
  .colofon-text-grid p:nth-child(1),
  .colofon-text-grid p:nth-child(2) { grid-row: 1; }
  .colofon-text-grid p:nth-child(3),
  .colofon-text-grid p:nth-child(4) { grid-row: 4; }
  .colofon-text-grid p:nth-child(1),
  .colofon-text-grid p:nth-child(2) {
    padding-top: clamp(.45rem, .9vh, .7rem);
    font-size: clamp(1.18rem, 1.46vw, 1.64rem);
    line-height: 1.13;
  }
  .colofon-text-grid p:nth-child(3),
  .colofon-text-grid p:nth-child(4) {
    padding-top: clamp(1.7rem, 3vh, 2.15rem);
    padding-bottom: clamp(1.65rem, 2.9vh, 2.1rem);
    font-size: clamp(1.03rem, 1.25vw, 1.4rem);
    line-height: 1.13;
  }
  .institutional-footer {
    align-self: end;
    margin-top: 0;
    padding-top: clamp(.9rem, 1.55vh, 1.15rem);
    padding-bottom: clamp(.15rem, .45vh, .35rem);
    background: var(--bg);
  }
  .institutional-footer .logos-cat-pair {
    margin-bottom: clamp(.75rem, 1.35vh, 1rem);
  }
  .institutional-footer .event-context {
    margin-bottom: clamp(.9rem, 1.55vh, 1.15rem);
  }
  .institutional-footer .logos-bn-pair {
    margin-bottom: clamp(.72rem, 1.25vh, .95rem);
  }
  .event-context,
  .funding-text {
    font-size: clamp(.72rem, .82vw, .9rem);
    line-height: 1.3;
  }
}

.spectrogram-modal[hidden] { display: none; }
.spectrogram-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2vw;
  background: rgba(0,0,0,.92);
}
.spectrogram-modal-img {
  display: block;
  max-width: 96vw;
  max-height: 92vh;
  object-fit: contain;
}
.spectrogram-close {
  position: fixed;
  top: max(1rem, env(safe-area-inset-top));
  right: max(1rem, env(safe-area-inset-right));
  width: 3rem;
  height: 3rem;
  border: 1px solid #fff;
  background: #000;
  color: var(--accent);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 900px) {
  :root { --sidebar-w: 100%; }
  .layout { display: block; }
  .main { padding: .8rem 1.15rem 0; }

  .mobile-menu-toggle {
    display: block;
    position: fixed;
    top: max(.42rem, env(safe-area-inset-top));
    right: max(.38rem, env(safe-area-inset-right));
    z-index: 1200;
    width: 3.25rem;
    height: 3.25rem;
    border: 0;
    background: transparent;
    color: var(--accent);
    padding: 0;
    cursor: pointer;
  }
  .burger-icon,
  .burger-icon::before,
  .burger-icon::after {
    position: absolute;
    left: 50%;
    width: 1.5rem;
    height: 2px;
    background: currentColor;
    content: "";
    transform: translateX(-50%);
    transition: transform .16s ease, top .16s ease, opacity .16s ease;
  }
  .burger-icon { top: 50%; }
  .burger-icon::before { top: -.46rem; }
  .burger-icon::after { top: .46rem; }
  .mobile-menu-toggle[aria-expanded="true"] .burger-icon { background: transparent; }
  .mobile-menu-toggle[aria-expanded="true"] .burger-icon::before { top: 0; transform: translateX(-50%) rotate(45deg); }
  .mobile-menu-toggle[aria-expanded="true"] .burger-icon::after { top: 0; transform: translateX(-50%) rotate(-45deg); }

  .sidebar {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    padding:
      max(1rem, env(safe-area-inset-top))
      max(1.15rem, env(safe-area-inset-right))
      max(1.15rem, env(safe-area-inset-bottom))
      max(1.15rem, env(safe-area-inset-left));
    border-right: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transform: translateX(102%);
    visibility: hidden;
    transition: transform .2s ease, visibility 0s linear .2s;
  }
  body.menu-open .sidebar {
    transform: translateX(0);
    visibility: visible;
    transition: transform .2s ease;
  }
  .brand { padding-right: 4.2rem; }
  .sidebar-cover {
    height: auto;
    max-height: none;
    object-fit: contain;
    margin-bottom: 1rem;
  }
  .brand h1 {
    font-size: clamp(3.7rem, 17vw, 6.2rem);
    line-height: .78;
  }
  .sidebar-project-subtitle {
    font-size: clamp(.65rem, 3vw, .9rem);
    margin-top: .6rem;
  }
  .nav {
    overflow: visible;
    flex: 0 0 auto;
    padding-top: .3rem;
    border-top: 1px solid var(--line);
  }
  .nav a {
    padding: .48rem 0;
    font-size: clamp(.92rem, 4.1vw, 1.2rem);
    line-height: 1.15;
  }
  .sidebar-controls-footer {
    margin-top: auto;
    padding-top: .8rem;
    grid-template-columns: 1fr auto;
    position: static;
    flex: 0 0 auto;
  }
  .sidebar-controls-footer button {
    padding: .48rem .6rem;
    font-size: .7rem;
  }

  .home { min-height: 100vh; min-height: 100dvh; padding-top: .25rem; }
  .home-header-grid {
    display: flex;
    flex-direction: column;
  }
  .home-kicker { order: 1; margin-right: 4rem; }
  .home-title {
    order: 2;
    white-space: normal;
    font-size: clamp(4.4rem, 23vw, 8.2rem);
    margin: .4rem 0 1.7rem;
  }
  .home-intro-block { order: 3; }
  .home-intro-block p {
    font-size: clamp(1.1rem, 5.15vw, 1.48rem);
    line-height: 1.16;
  }
  .home-image-panel { order: 4; margin: 2.1rem 0; }
  .home-image-panel img { max-height: none; }
  .home-notes { order: 5; margin: 0; font-size: clamp(.85rem, 3.8vw, 1.05rem); }

  .recording {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 3.3rem 0;
  }
  .recording-header {
    grid-template-columns: 2.8rem minmax(0,1fr);
    gap: .75rem;
    margin-bottom: 1.25rem;
  }
  .recording-header h2 {
    font-size: clamp(2.5rem, 12vw, 4.2rem);
    line-height: .86;
    white-space: nowrap;
  }
  .recording-grid { grid-template-columns: 1fr; gap: 1rem; height: auto; }
  .media, .data { gap: 1rem; height: auto; }
  .media { grid-template-rows: none; }
  .minimal-audio-player {
    min-height: 4.25rem;
    grid-template-columns: 2.75rem minmax(0,1fr) auto;
    gap: .85rem;
  }
  .minimal-play { width: 2.75rem; height: 2.75rem; }
  .technical { padding: .9rem 1rem; }
  .technical li {
    grid-template-columns: minmax(0,1fr) minmax(8.5rem, auto);
    font-size: clamp(.77rem, 3.8vw, .95rem);
    gap: .75rem;
  }
  .waveform-original { height: 7.4rem; }
  .spectrogram-trigger img { max-height: none; }
  .data { grid-template-rows: none; }
  .synthetic, .phrases, .morse-transcription { height: 104px; }
  .synthetic-track span { font-size: clamp(1.1rem, 5vw, 1.45rem); }
  .phrases-vertical-track { font-size: clamp(1.05rem, 4.9vw, 1.4rem); }
  .modes { min-height: 0; padding: .9rem; }
  .mode-layout { grid-template-columns: 1fr; min-height: 0; }
  .mode-list {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 0 0 .75rem;
    gap: .18rem;
  }
  .mode-tab { font-size: clamp(.78rem, 3.4vw, .98rem); padding: .22rem 1.35rem .22rem 0; }
  .mode-display {
    max-height: none;
    overflow: visible;
    padding: .85rem 0 0;
  }
  .mode-question, .mode-answer, .mode-answer p { font-size: clamp(.8rem, 3.4vw, .98rem); }

  .colofon { min-height: 100vh; min-height: 100dvh; padding-top: 4rem; overflow: visible; }
  .colofon h2 { font-size: clamp(4.5rem, 22vw, 8rem); }
  .colofon-text-grid { grid-template-columns: 1fr; grid-template-rows: none; gap: 0; }
  .colofon-text-grid::before { display: none; }
  .colofon-text-grid p {
    margin: 0 0 1.5rem;
    font-size: clamp(1.15rem, 5.2vw, 1.48rem);
    line-height: 1.16;
  }
  .colofon-text-grid p:nth-child(3) {
    border-top: 1px solid var(--line);
    padding-top: 1.25rem;
  }
  .institutional-footer { margin-top: 2rem; }
  .institutional-footer .logos-cat, .institutional-footer .logos-bn { max-height: none; }
  .event-context, .funding-text { font-size: clamp(.72rem, 3.2vw, .88rem); }
}

@media (max-width: 430px) {
  .main { padding-left: 1rem; padding-right: 1rem; }
  .recording-header h2 { font-size: clamp(2.15rem, 11.1vw, 3.4rem); }
  .technical li { grid-template-columns: minmax(0,1fr) minmax(7.3rem, auto); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .synthetic-track, .phrases-vertical-track, .morse-marquee-track { animation-play-state: paused !important; }
  .sidebar, .burger-icon, .burger-icon::before, .burger-icon::after { transition: none !important; }
}

/* ============================================================
   NOTA + LOGO DE FINANCIACIÓN — LOGOS A ANCHO COMPLETO
   Orden: texto → logos (cat) → logos (bn) → texto "Plan de…".
   Los logotipos ocupan todo el ancho de la página (sin recorte
   ni caja de altura fija que los empequeñezca).
   ============================================================ */
.institutional-footer .logo-theme-pair { width: 100%; }
.institutional-footer .logos-cat,
.institutional-footer .logos-bn {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: left center;
}
@media (min-width: 901px) {
  .institutional-footer .logos-cat,
  .institutional-footer .logos-bn { max-height: none; }
}

/* ============================================================
   COLOFÓN — TEXTO MÁS PEQUEÑO
   Los dos párrafos superiores (análisis y mediación) igualan el
   tamaño del resto del colofón, más discreto.
   ============================================================ */
.colofon-text-grid p { font-size: clamp(1rem, 1.12vw, 1.26rem) !important; }
@media (min-width: 901px) {
  .colofon-text-grid p:nth-child(1),
  .colofon-text-grid p:nth-child(2),
  .colofon-text-grid p:nth-child(3),
  .colofon-text-grid p:nth-child(4) {
    font-size: clamp(1rem, 1.14vw, 1.3rem) !important;
    line-height: 1.34 !important;
  }
}
