/* ==========================================================================
00. SWISS INTERNATIONAL TYPOGRAPHIC DESIGN TOKENS
Zero border-radius, zero box-shadows, zero gradients.
Strict 12-column mathematical grid & archival paper/ink palette.
========================================================================== */
:root {
  color-scheme: light dark;
  --fixed-dark-ink: #e5e7eb;
  --hero-blueprint: url('assets/images/sunfalls-live-blueprint-cap.webp');
  --catalog-header-background: #30363b
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M24 0H0V24' fill='none' stroke='%23e5e7eb' stroke-opacity='0.12'/%3E%3C/svg%3E");
  --catalog-header-accent: 3px solid var(--accent-vermilion);
  --bg-paper: #f5f5f7;
  --bg-paper-alt: #d5d8de;
  --ink-primary: #111111;
  --ink-secondary: rgba(17, 17, 17, 0.68);
  --ink-muted: #565d67;
  --rule-heavy: 1px solid #111111;
  --rule-hairline: 1px solid rgba(17, 17, 17, 0.18);
  --accent-vermilion: #ad251a;
  --playing-bg: var(--accent-vermilion);
  --playing-ink: var(--bg-paper);
  --ink-error: #ac2118;

  --font-sans:
    'Helvetica Neue', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    Arial, sans-serif;
  --font-mono:
    'IBM Plex Mono', 'SFMono-Regular', Menlo, Monaco, Consolas, monospace;

  --deck-width: 300px;
  --header-height: 52px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-paper: #191c20;
    --bg-paper-alt: #252a30;
    --ink-primary: #e5e7eb;
    --ink-secondary: #bbc2ca;
    --ink-muted: #a2aab4;
    --rule-heavy: 1px solid #76808b;
    --rule-hairline: 1px solid rgba(229, 231, 235, 0.22);
    --accent-vermilion: #78a9a5;
    --playing-bg: #244744;
    --playing-ink: var(--ink-primary);
    --dark-art-accent: var(--accent-vermilion);
    --ink-error: #ff9c92;
    --hero-blueprint: url('assets/images/sunfalls-live-blueprint-cap.webp');
  }

  .brand-logo {
    filter: invert(1);
  }

  .track-list .track-trigger.active-track {
    border-inline-start: 3px solid var(--accent-vermilion);
  }
}

/* ==========================================================================
01. RESET & STRICT GEOMETRIC BASE
========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  border-radius: 0 !important;
  box-shadow: none !important;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg-paper);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-paper);
  color: var(--ink-primary);
  line-height: 1.5;
  overflow-x: hidden;
}

::selection {
  background-color: var(--accent-vermilion);
  color: var(--bg-paper);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -2px;
}

.skip-link {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 110;
  padding: 0.75rem 1rem;
  background-color: var(--bg-paper);
  color: var(--ink-primary);
  transform: translateY(-100%);
}

.skip-link:focus {
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Tabular numeral enforcement */
.tabular {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.micro-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.3;
}

.prose-measure {
  max-width: 60ch;
}

/* ==========================================================================
02. TOP INDEX HEADER BAR
========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-height);
  background-color: var(--bg-paper);
  border-bottom: var(--rule-heavy);
  display: grid;
  grid-template-columns: var(--deck-width) 1fr auto;
  align-items: stretch;
}

.brand-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  border-right: var(--rule-heavy);
  font-weight: 500;
  letter-spacing: -0.02em;
  font-size: 0.95rem;
}

.brand-logo {
  display: block;
  width: 200px;
  height: auto;
}

.primary-nav {
  display: flex;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
}

.primary-nav::-webkit-scrollbar {
  display: none;
}

.primary-nav a {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 1.15rem;
  border-right: var(--rule-hairline);
  white-space: nowrap;
}

.primary-nav a:is(:hover, :active, :focus-visible) {
  background-color: var(--ink-primary);
  color: var(--bg-paper);
}

.status-cell {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 1.25rem;
  border-left: var(--rule-heavy);
  white-space: nowrap;
}

.signal-led {
  width: 8px;
  height: 8px;
  background-color: var(--ink-muted);
  display: inline-block;
}

.signal-led.active {
  background-color: var(--accent-vermilion);
  animation: pulse-led 1.2s steps(2, start) infinite;
}

@keyframes pulse-led {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.25;
  }
}

/* ==========================================================================
03. SHELL ARCHITECTURE (LEFT CONTROL DECK + 12-COL ARCHIVE CANVAS)
========================================================================== */
.workspace-shell {
  display: grid;
  grid-template-columns: var(--deck-width) 1fr;
  min-height: calc(100vh - var(--header-height));
}

/* Sticky Left Control Deck: 00 / CONTROL DECK */
.control-deck {
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  border-right: var(--rule-heavy);
  background-color: var(--bg-paper);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
}

.deck-block {
  padding: 1.25rem;
  border-bottom: var(--rule-hairline);
}

.deck-error {
  margin: 0.35rem 0 0;
  color: var(--ink-error);
  font-size: 0.85rem;
}
.deck-error:empty {
  display: none;
}

.deck-block-heavy {
  padding: 1.25rem;
  border-bottom: var(--rule-heavy);
}

.deck-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.deck-idle-patch {
  display: block;
  width: 100%;
  height: auto;
}

.deck-empty-state > .micro-label {
  margin: 1rem 0 0.35rem;
}

.deck-select-recording {
  display: block;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 0.3em;
  text-decoration-color: var(--ink-muted);
}

.deck-empty-state[hidden],
.deck-track-meta[hidden] {
  display: none;
}

.deck-track-meta {
  min-height: 5.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.deck-track-title {
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0 0 0.25rem 0;
}

.deck-track-sub {
  font-size: 0.8rem;
  color: var(--ink-secondary);
  margin: 0;
}

/* Transport Buttons */
.transport-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border: var(--rule-heavy);
  margin-top: 1rem;
}

.transport-btn {
  padding: 0.65rem 0.5rem;
  text-align: center;
  border-right: var(--rule-heavy);
  transition:
    background-color 0.12s ease,
    color 0.12s ease;
}

.transport-btn:last-child {
  border-right: none;
}

.transport-btn:hover:not(:disabled) {
  background-color: var(--ink-primary);
  color: var(--bg-paper);
}

.transport-btn.is-playing {
  background-color: var(--playing-bg);
  color: var(--playing-ink);
}

.transport-btn:disabled,
.mobile-play-toggle:disabled,
.track-trigger:disabled,
input.swiss-slider:disabled {
  opacity: 0.35;
  cursor: default;
}

/* Playback scrubber */
.slider-group {
  margin-top: 1rem;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
}

input[type='range'].swiss-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 14px;
  background: transparent;
  cursor: pointer;
  margin: 0;
}

input[type='range'].swiss-slider::-webkit-slider-runnable-track {
  width: 100%;
  height: 2px;
  background: var(--ink-primary);
}

input[type='range'].swiss-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 14px;
  background: var(--accent-vermilion);
  border: 1px solid var(--ink-primary);
  margin-top: -6px;
}

input[type='range'].swiss-slider::-moz-range-track {
  width: 100%;
  height: 2px;
  background: var(--ink-primary);
}

input[type='range'].swiss-slider::-moz-range-thumb {
  width: 10px;
  height: 14px;
  background: var(--accent-vermilion);
  border: 1px solid var(--ink-primary);
}

/* Synth Patch Telemetry Readout in Deck */
.patch-telemetry {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  font-size: 0.72rem;
}

.telemetry-cell {
  border: var(--rule-hairline);
  padding: 0.45rem 0.55rem;
}

.telemetry-cell span {
  display: block;
  color: var(--ink-muted);
  font-size: 0.62rem;
  margin-bottom: 0.15rem;
}

.deck-footer-note {
  padding: 1.25rem;
  font-size: 0.75rem;
  color: var(--ink-secondary);
  line-height: 1.45;
}

/* ==========================================================================
04. MAIN 12-COLUMN MATHEMATICAL GRID CONTAINER
========================================================================== */
.archive-main {
  display: flex;
  flex-direction: column;
}

.grid-section {
  border-bottom: var(--rule-heavy);
}

.grid-section,
#heading-overview {
  scroll-margin-top: var(--header-height);
}

.section-index-bar {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  border-bottom: var(--rule-hairline);
  background-color: var(--bg-paper-alt);
}

.section-index-code {
  grid-column: span 3;
  margin: 0;
  padding: 0.65rem 1.5rem;
  border-right: var(--rule-hairline);
  color: var(--accent-vermilion);
}

.section-index-title {
  grid-column: span 6;
  padding: 0.65rem 1.5rem;
  border-right: var(--rule-hairline);
}

.section-index-meta {
  grid-column: span 3;
  padding: 0.65rem 1.5rem;
  text-align: right;
  color: var(--ink-secondary);
}

.twelve-col-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
}

/* ==========================================================================
05. SECTION 01: SUNFALLS POSTER OVERVIEW
========================================================================== */
.hero-banner {
  aspect-ratio: 2164 / 727;
  padding: clamp(1rem, 3vw, 3rem) 1.5rem;
  border-bottom: var(--rule-heavy);
  background-color: var(--bg-paper);
  background-image: var(--hero-blueprint);
  background-size: 100% auto;
  background-position: center top;
  background-repeat: no-repeat;
}

.hero-left {
  position: relative;
  isolation: isolate;
  grid-column: span 7;
  padding: 2rem 1.5rem;
  gap: 3rem;
  border-right: var(--rule-heavy);
  color: var(--ink-primary);
  background-color: var(--bg-paper);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.synth-poster {
  position: absolute;
  inset: 1.5rem;
  margin: 0;
}

.synth-poster svg {
  display: block;
  width: 100%;
  height: 100%;
}

.poster-kicker {
  color: var(--fixed-dark-ink);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.vermilion-square {
  width: 12px;
  height: 12px;
  background-color: var(--accent-vermilion);
  display: inline-block;
}

.swiss-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.25rem;
  border: var(--rule-heavy);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.swiss-btn:hover {
  background-color: var(--ink-primary);
  color: var(--bg-paper);
}

.overview-about {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: var(--rule-hairline);
}

.overview-about h2 {
  margin: 0 0 0.5rem;
  color: var(--accent-vermilion);
}

.overview-about p {
  margin: 0;
  color: var(--ink-secondary);
  font-size: 0.9rem;
}

.hero-right {
  grid-column: span 5;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: var(--bg-paper);
}

.blueprint-frame {
  border: var(--rule-hairline);
  padding: 1rem;
  background-color: var(--bg-paper);
}

.blueprint-svg {
  width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
06. SECTION 02: RELEASES CATALOG (4-COLUMN SWISS GRID)
========================================================================== */
.releases-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.release-card {
  border-right: var(--rule-heavy);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: var(--bg-paper);
}

.release-card:last-child {
  border-right: none;
}

.release-card-top {
  padding: 1.25rem;
}

.release-cat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: var(--rule-hairline);
}

.release-cat-header > .micro-label:first-child {
  color: var(--accent-vermilion);
}

.release-artwork {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: var(--rule-heavy);
  margin-bottom: 1.25rem;
  overflow: hidden;
  background-color: var(--bg-paper-alt);
}

.release-artwork img {
  width: 100%;
  height: 100%;
  display: block;
}

.release-title {
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem 0;
}

/* Tracklist inside release card */
.track-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
  border-top: var(--rule-hairline);
}

.track-item {
  border-bottom: var(--rule-hairline);
}

.track-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.25rem;
  text-align: left;
  font-size: 0.82rem;
  transition:
    background-color 0.12s ease,
    color 0.12s ease;
}

.track-trigger:hover:not(:disabled) {
  background-color: var(--bg-paper-alt);
}

.track-trigger.active-track {
  background-color: var(--playing-bg);
  color: var(--playing-ink);
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.track-trigger-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Expandable Swiss Details */
details.swiss-details {
  border-top: var(--rule-hairline);
  font-size: 0.82rem;
}

details.swiss-details summary {
  list-style: none;
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background-color: var(--bg-paper);
}

details.swiss-details summary::-webkit-details-marker {
  display: none;
}

details.swiss-details summary:hover {
  background-color: var(--bg-paper-alt);
}

details.swiss-details[open] summary {
  border-bottom: var(--rule-hairline);
  color: var(--accent-vermilion);
}

.details-body {
  padding: 1rem 1.25rem;
  background-color: var(--bg-paper-alt);
  color: var(--ink-secondary);
  line-height: 1.55;
}

.details-body p {
  margin: 0 0 0.75rem 0;
}

.details-body p:last-child {
  margin-bottom: 0;
}

.release-credit a,
.session-card .details-body a {
  text-decoration: underline;
}

.bandcamp-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  border-top: var(--rule-heavy);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bandcamp-link:is(:hover, :active, :focus-visible) {
  background-color: var(--ink-primary);
  color: var(--bg-paper);
}

/* ==========================================================================
07. SECTION 03: LISTEN & OBSERVE (INTERACTIVE CANVAS VISUAL FIELD)
========================================================================== */
.visualizer-layout {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
}

.visualizer-controls-col {
  grid-column: span 4;
  padding: 2rem 1.5rem;
  border-right: var(--rule-heavy);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.visualizer-title {
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: -0.025em;
  margin: 0 0 1rem 0;
  line-height: 1.1;
}

.mode-selector-group {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: var(--rule-heavy);
  margin: 1.5rem 0;
}

.mode-btn {
  padding: 0.75rem 0.5rem;
  border-right: var(--rule-heavy);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  transition:
    background-color 0.12s ease,
    color 0.12s ease;
}

.mode-btn:last-child {
  border-right: none;
}

.mode-btn:hover {
  background-color: var(--bg-paper-alt);
}

.mode-btn[aria-pressed="true"] {
  background-color: var(--ink-primary);
  color: var(--bg-paper);
}

.visualizer-stage-col {
  grid-column: span 8;
  position: relative;
  background-color: var(--bg-paper);
  min-height: 380px;
  display: flex;
  flex-direction: column;
}

.canvas-wrapper {
  position: relative;
  flex: 1;
  width: 100%;
  min-height: 340px;
}

canvas#swiss-oscilloscope {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.canvas-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  border-top: var(--rule-hairline);
  background-color: var(--bg-paper-alt);
  font-size: 0.7rem;
}

/* Focus Mode Overlay State */
body.focus-visual-mode .visualizer-stage-col {
  min-height: 0;
  position: fixed;
  inset: 0;
  z-index: 100;
  background-color: var(--bg-paper);
  border: var(--rule-heavy);
}

body.focus-visual-mode .canvas-wrapper {
  min-height: 0;
}

/* ==========================================================================
08. SECTION 04: SESSIONS & EXPLORATIONS
========================================================================== */
.sessions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.session-group {
  display: grid;
  grid-template-rows: auto 1fr;
}

@supports (grid-template-rows: subgrid) {
  .session-group {
    grid-row: 1 / span 2;
    grid-template-rows: subgrid;
  }
}

.session-group + .session-group {
  border-inline-start: var(--rule-hairline);
}

.session-group-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.75rem;
  padding: 0.65rem 1.25rem;
  border-bottom: var(--rule-hairline);
  background-color: var(--bg-paper-alt);
}

.session-group-header h2,
.session-group-header h3 {
  margin: 0;
  font: inherit;
}

.session-section-title {
  color: var(--accent-vermilion);
}

#studio-date,
.session-group-header--experiments {
  color: var(--fixed-dark-ink);
  background: var(--catalog-header-background);
  border-top: var(--catalog-header-accent);
  border-bottom: var(--rule-heavy);
}

.session-group-header--experiments {
  padding-block-start: calc(0.65rem - 3px);
}

.session-group-recordings {
  display: flex;
  flex-direction: column;
}

.experiment-field {
  position: relative;
  flex: 1;
  min-height: 0;
  container: experiment-field / size;
}

.experiment-diagram {
  display: none;
}

@container experiment-field (min-height: 8rem) {
  .experiment-diagram {
    display: block;
    position: absolute;
    inset: 0;
    border-top: var(--rule-hairline);
    color: var(--ink-muted);
    --grid-line: color-mix(in srgb, currentColor 15%, transparent);
    background:
      linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
      linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
    background-size: 1.75rem 1.75rem;
  }

  .experiment-caption {
    position: absolute;
    inset-inline-end: 1.25rem;
    inset-block-end: 0.75rem;
    max-inline-size: calc(100% - 2.5rem);
    margin: 0;
    padding: 0.2rem 0.35rem;
    background-color: var(--bg-paper);
    color: var(--ink-secondary);
    text-transform: none;
  }

  .experiment-route {
    position: absolute;
    border: 0 solid currentColor;
  }

  .experiment-route::before,
  .experiment-route::after {
    content: '';
    position: absolute;
    width: 0.55rem;
    height: 0.55rem;
    border: 2px solid currentColor;
    background-color: var(--bg-paper);
    transform: translate(-50%, -50%);
  }

  .experiment-route-red {
    inset: 24% 47% 43% 14%;
    color: #e12b1d;
    border-width: 2px 2px 0 0;
  }

  .experiment-route-red::before,
  .experiment-route-ochre::before {
    top: 0;
    left: 0;
  }

  .experiment-route-red::after,
  .experiment-route-ochre::after {
    top: 100%;
    left: 100%;
  }

  .experiment-route-teal {
    inset: 34% 16% 43% 53%;
    color: #267b87;
    border-width: 0 2px 2px 0;
  }

  .experiment-route-teal::before {
    top: 0;
    left: 100%;
  }

  .experiment-route-teal::after {
    top: 100%;
    left: 0;
    background-color: currentColor;
  }

  .experiment-route-ochre {
    inset: 72% 32% 15% 22%;
    color: #a7791e;
    border-width: 2px 2px 0 0;
  }
}

.session-card + .session-card {
  border-top: var(--rule-hairline);
}

.session-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 5rem;
  padding: 0.75rem 1.25rem;
}

.session-cover {
  flex: none;
  width: 3.5rem;
  height: auto;
  aspect-ratio: 1;
}

.session-cover-lodge {
  display: grid;
  grid-auto-flow: column;
  justify-content: center;
  align-items: end;
  gap: 0.2rem;
  padding-bottom: 0.9rem;
  border: var(--rule-hairline);
  background-color: var(--bg-paper-alt);
  color: var(--accent-vermilion);
}

.session-cover-lodge::before,
.session-cover-lodge span,
.session-cover-lodge::after {
  content: '';
  width: 0.25rem;
  height: 1.5rem;
  background-color: currentColor;
}

.session-cover-lodge::before {
  height: 0.8rem;
}

.session-cover-lodge::after {
  height: 1.15rem;
}

.session-heading {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.session-index {
  color: var(--accent-vermilion);
}

.session-station {
  margin-inline-start: 0.35rem;
  color: var(--ink-secondary);
}

.session-heading h4 {
  margin: 0.25rem 0 0;
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.session-play.track-trigger {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  font-size: 1.25rem;
}

.session-play.track-trigger:hover:not(:disabled) {
  background-color: transparent;
  color: var(--accent-vermilion);
}

.session-play.track-trigger.active-track {
  padding: 0;
  background-color: transparent;
  color: var(--accent-vermilion);
}

/* ==========================================================================
09. SECTION 05: FROM THE STUDIO (ARCHIVAL LOG)
========================================================================== */
.studio-log-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
}

.log-entry {
  grid-column: span 6;
  padding: 2.5rem 2rem;
  border-right: var(--rule-heavy);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.log-entry:last-child {
  border-right: none;
}

.log-date-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
  border-bottom: var(--rule-hairline);
}

.log-entry h3 {
  font-size: 1.75rem;
  font-weight: 300;
  letter-spacing: -0.025em;
  margin: 0 0 1.25rem 0;
  line-height: 1.15;
}

.log-schematic-box {
  border: var(--rule-heavy);
  margin-bottom: 1.5rem;
  padding: 1rem;
  background-color: var(--bg-paper-alt);
}

.log-entry p {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--ink-secondary);
  margin: 0 0 1rem 0;
}

.log-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: var(--rule-hairline);
}

.swiss-tag {
  border: var(--rule-hairline);
  padding: 0.25rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ==========================================================================
10. FOOTER & COLOPHON
========================================================================== */
.site-footer {
  padding: 0.75rem 1.5rem;
  color: var(--fixed-dark-ink);
  background: var(--catalog-header-background);
  border-top: var(--catalog-header-accent);
}

.footer-label {
  display: block;
  margin-bottom: 0.35rem;
}

.footer-credits {
  margin: 0;
  font-size: 0.85rem;
}

.footer-credits a {
  text-decoration: underline;
}

.footer-links-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
}

.footer-links-list a {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}

.footer-links-list a:hover {
  border-bottom-color: currentColor;
}

.mobile-menu-toggle,
.mobile-player-bar {
  display: none;
}

/* ==========================================================================
11. RESPONSIVE BREAKPOINTS (TABLET & MOBILE COLLAPSE)
 ========================================================================== */
@media (max-width: 1280px) {
  .mode-selector-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mode-btn:nth-child(2) {
    border-right: none;
  }
  .mode-btn:nth-child(-n + 2) {
    border-bottom: var(--rule-heavy);
  }
}

@media (max-width: 1180px) {
  .releases-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .release-card:nth-child(2) {
    border-right: none;
  }
  .release-card:nth-child(1),
  .release-card:nth-child(2) {
    border-bottom: var(--rule-heavy);
  }
}

@media (max-width: 960px) {
  .experiment-field {
    display: none;
  }
  :root {
    --mobile-player-height: clamp(36px, 8dvh, 44px);
  }
  body {
    padding-bottom: calc(
      var(--mobile-player-height) + env(safe-area-inset-bottom)
    );
  }
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }
  .brand-cell {
    min-width: 0;
    gap: 0.75rem;
    padding: 0 1rem;
    border-right: none;
  }
  .brand-cell a {
    min-width: 0;
  }
  .brand-logo {
    width: clamp(120px, 35vw, 200px);
    max-width: 100%;
  }
  .status-cell {
    padding: 0 0.75rem;
  }
  .status-cell .status-text {
    display: none;
  }
  .mobile-menu-toggle {
    display: block;
    grid-column: 3;
    grid-row: 1;
    min-height: 44px;
    padding: 0 1rem;
    border-left: var(--rule-heavy);
  }
  .mobile-menu-toggle[aria-expanded='true'] {
    color: var(--accent-vermilion);
  }
  .primary-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(
      100dvh - var(--header-height) - var(--mobile-player-height) -
        env(safe-area-inset-bottom)
    );
    overflow-y: auto;
    background-color: var(--bg-paper);
    border-bottom: var(--rule-heavy);
  }
  .primary-nav.is-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  .primary-nav a {
    flex-shrink: 0;
    min-height: 52px;
    padding: 1rem;
    border-right: none;
    border-top: var(--rule-hairline);
  }
  .workspace-shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .archive-main,
  .grid-section,
  .twelve-col-grid > *,
  .section-index-bar > *,
  .release-card,
  .studio-log-grid > * {
    min-width: 0;
  }
  .control-deck {
    position: fixed;
    inset: auto 0 0;
    height: auto;
    z-index: 45;
    border-right: none;
    border-top: 2px solid var(--accent-vermilion);
    background-color: var(--bg-paper-alt);
    overflow: visible;
  }
  .mobile-player-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 64px 100px;
    order: 2;
    height: calc(var(--mobile-player-height) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background-color: #30363b;
    color: var(--fixed-dark-ink);
  }
  .mobile-track-name {
    align-self: stretch;
    min-height: 0;
    text-align: left;
    text-decoration: underline;
    text-decoration-color: rgba(229, 231, 235, 0.4);
    text-underline-offset: 0.25em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 0.75rem;
    font-size: 0.9rem;
  }
  .mobile-play-toggle,
  .mobile-controls-toggle {
    border-left: 1px solid rgba(229, 231, 235, 0.3);
    font-size: 0.62rem;
    letter-spacing: 0.06em;
  }
  .mobile-play-toggle.is-playing {
    background-color: var(--playing-bg);
    color: var(--playing-ink);
  }
  .mobile-track-name.is-error,
  .mobile-play-toggle.is-error {
    color: #ff9c92;
  }
  .mobile-controls-toggle[aria-expanded='true'] {
    background-color: var(--bg-paper-alt);
    color: var(--ink-primary);
  }
  .control-deck .deck-panel {
    display: none;
    max-height: min(
      60dvh,
      calc(
        100dvh - var(--header-height) - var(--mobile-player-height) -
          env(safe-area-inset-bottom) - 1rem
      )
    );
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .control-deck.is-open .deck-panel {
    display: block;
  }
  .control-deck .deck-track-meta {
    min-height: 0;
  }
  .control-deck .transport-btn {
    min-height: 44px;
  }
  .control-deck input[type='range'].swiss-slider {
    display: block;
    height: 48px;
    touch-action: none;
    /* The whole track accepts a touch; only the center rule is painted. */
    --slider-rule: linear-gradient(var(--ink-primary), var(--ink-primary))
      center / 100% 2px no-repeat;
  }
  .control-deck input.swiss-slider::-webkit-slider-runnable-track {
    height: 48px;
    background: var(--slider-rule);
  }
  .control-deck input.swiss-slider::-moz-range-track {
    height: 48px;
    background: var(--slider-rule);
  }
  .control-deck input.swiss-slider::-webkit-slider-thumb {
    width: 24px;
    height: 32px;
    margin-top: 8px;
  }
  .control-deck input.swiss-slider::-moz-range-thumb {
    box-sizing: border-box;
    width: 24px;
    height: 32px;
  }
  .deck-footer-note,
  .deck-telemetry {
    display: none;
  }
  .release-cat-header,
  .session-group-header {
    min-height: 50px;
    padding: 0.65rem 1.25rem;
    color: var(--fixed-dark-ink);
    background: var(--catalog-header-background);
    border-top: var(--catalog-header-accent);
    border-bottom: var(--rule-heavy);
  }
  .release-cat-header {
    margin: -1.25rem -1.25rem 1.25rem;
  }
  .release-cat-header > .micro-label:first-child {
    color: var(--fixed-dark-ink);
    font-size: 0.9rem;
  }
  .session-group-header h2,
  .session-group-header h3 {
    color: inherit;
    font-size: 0.8rem;
  }
  .hero-banner {
    background-size: cover;
    background-position: 60% center;
  }
  .hero-left {
    display: none;
  }
  .hero-left,
  .hero-right,
  .visualizer-controls-col,
  .visualizer-stage-col,
  .log-entry {
    grid-column: span 12;
    border-right: none;
  }
  .hero-left,
  .visualizer-controls-col,
  .log-entry:first-child {
    border-bottom: var(--rule-heavy);
  }
}

@media (max-width: 640px) {
  .sessions-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .session-group {
    grid-row: auto;
    grid-template-rows: auto 1fr;
  }
  .session-group + .session-group {
    border-inline-start: none;
    border-top: var(--rule-heavy);
  }
  .releases-grid {
    grid-template-columns: 1fr;
  }
  .release-card {
    border-right: none;
    border-bottom: var(--rule-heavy);
  }
  .release-card:last-child {
    border-bottom: none;
  }
  .section-index-code {
    grid-column: span 4;
    padding: 0.6rem 0.75rem;
  }
  .section-index-title {
    grid-column: span 8;
    padding: 0.6rem 0.75rem;
    border-right: none;
  }
  .section-index-meta {
    grid-column: span 12;
    padding: 0.5rem 0.75rem;
    border-top: var(--rule-hairline);
    text-align: left;
    overflow-wrap: anywhere;
  }
  .blueprint-frame .deck-header-row {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .canvas-hud {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}
