/* =========================================================================
   SÉBASTIEN KRIER — APOGEE ZÜRICH UNIGRID 2.0 EDITION
   International Typographic Style (Müller-Brockmann · Ruder)
   Functional Minimalism (Braun / Dieter Rams Instrument Discipline)
   Pitch (Dark) default · Paper (Light) alternate
   Zero glow · Zero blur · Zero gradients · Zero offset shadows · 0px radius
   ========================================================================= */

:root {
  color-scheme: dark;

  /* Zürich Unigrid Palette — Pitch (Dark) Default */
  --paper:          #0B0C0D;
  --plate:          #111214;
  --stone:          #181A1D;
  --stone-deep:     #22252A;
  --hover:          #17191C;

  --ink:            #F2F1EC;
  --ink-2:          #B4B1A8;
  --ink-3:          #83817A;
  --ink-inv:        #0B0C0D;

  --rule:           #222428;
  --rule-strong:    #363940;
  --rule-ink:       #525660;
  --grid-line:      rgba(242, 241, 236, 0.035);

  /* Swiss Signal Palette */
  --swiss-red:      #EE3B30;
  --swiss-red-wash: rgba(238, 59, 48, 0.12);
  --swiss-red-line: rgba(238, 59, 48, 0.48);

  --teal:           #4CA884;
  --teal-wash:      rgba(76, 168, 132, 0.11);
  --teal-line:      rgba(76, 168, 132, 0.42);

  --ochre:          #D89C3C;
  --ochre-wash:     rgba(216, 156, 60, 0.11);
  --ochre-line:     rgba(216, 156, 60, 0.44);

  --slate:          #7B9AB8;
  --slate-wash:     rgba(123, 154, 184, 0.10);
  --slate-line:     rgba(123, 154, 184, 0.36);

  --scrim:          rgba(7, 8, 9, 0.82);

  /* Typography — Neo-Grotesk Swiss Precision */
  --sans:           'Inter', 'Helvetica Neue', 'Neue Haas Grotesk Text Pro', -apple-system, Arial, sans-serif;
  --mono:           'IBM Plex Mono', 'Cascadia Mono', ui-monospace, SFMono-Regular, monospace;
  --ease:           cubic-bezier(.2, .8, .2, 1);
  accent-color:     var(--swiss-red);
}

:root[data-theme="paper"] {
  color-scheme: light;

  --paper:          #F7F6F2;
  --plate:          #FFFFFF;
  --stone:          #ECEAE3;
  --stone-deep:     #DFDDD4;
  --hover:          #F1EFE9;

  --ink:            #0A0A09;
  --ink-2:          #4B4A45;
  --ink-3:          #7E7C74;
  --ink-inv:        #FFFFFF;

  --rule:           #DDDAD1;
  --rule-strong:    #B7B3A8;
  --rule-ink:       #0A0A09;
  --grid-line:      rgba(10, 10, 9, 0.045);

  --swiss-red:      #E1251B;
  --swiss-red-wash: rgba(225, 37, 27, 0.08);
  --swiss-red-line: rgba(225, 37, 27, 0.42);

  --teal:           #1E6E52;
  --teal-wash:      #E2EFEA;
  --teal-line:      rgba(30, 110, 82, 0.38);

  --ochre:          #9C6214;
  --ochre-wash:     #F5EAD6;
  --ochre-line:     rgba(156, 98, 20, 0.42);

  --slate:          #35526B;
  --slate-wash:     #E4EAEF;
  --slate-line:     rgba(53, 82, 107, 0.36);

  --scrim:          rgba(10, 10, 9, 0.56);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 13px/1.5 var(--sans);
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: transparent; border: 0; padding: 0; margin: 0; }
a {
  color: var(--ink);
  text-decoration: underline var(--swiss-red-line) 1px;
  text-underline-offset: 2px;
  text-decoration-skip-ink: auto;
}
a:hover {
  background: var(--swiss-red-wash);
  text-decoration-color: var(--swiss-red);
}
[hidden] { display: none !important; }
::selection { background: var(--swiss-red-wash); color: var(--ink); }
:focus-visible { outline: 1.5px solid var(--swiss-red); outline-offset: 1px; border-radius: 0; }
code, kbd, pre, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.tnum { font-variant-numeric: tabular-nums; }
.grow { flex: 1 1 auto; }
.faint { color: var(--ink-3); }
.truncate { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

* { scrollbar-width: thin; scrollbar-color: var(--rule-strong) transparent; }

/* Swiss Micro Labels & Coordinate Numbers */
.micro-label {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  line-height: 1;
}
.index-num {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.icon {
  width: 14px;
  height: 14px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: square;
  stroke-linejoin: miter;
}
.icon.s { width: 12px; height: 12px; }

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 16px;
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1;
  padding: 1px 4px;
  border-radius: 0;
  background: var(--stone);
  border: 1px solid var(--rule-strong);
  color: var(--ink-2);
  vertical-align: middle;
}

/* ---------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 26px;
  padding: 0 10px;
  border-radius: 0;
  background: var(--plate);
  border: 1px solid var(--rule-strong);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 100ms ease, border-color 100ms ease, color 100ms ease;
}
.btn:hover { background: var(--stone); border-color: var(--ink); text-decoration: none; }
.btn:active { background: var(--stone-deep); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--ink-inv); font-weight: 600; }
.btn.primary:hover { background: var(--swiss-red); border-color: var(--swiss-red); color: #FFFFFF; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--stone); border-color: var(--rule); color: var(--ink); }
.btn.sm { height: 22px; padding: 0 7px; font-size: 11px; }
.btn.icon-only { width: 26px; padding: 0; }
.btn.sm.icon-only { width: 22px; }

/* Dieter Rams Mechanical Segmented Switch */
.rams-switch {
  display: inline-flex;
  align-items: stretch;
  height: 22px;
  border: 1px solid var(--rule-strong);
  background: var(--paper);
  flex-wrap: nowrap;
}
.rams-switch.wrap {
  height: auto;
  flex-wrap: wrap;
}
.rams-switch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 20px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 9px;
  color: var(--ink-2);
  line-height: 1;
  white-space: nowrap;
  transition: background-color 100ms ease, color 100ms ease;
}
.rams-switch-btn + .rams-switch-btn { border-left: 1px solid var(--rule); }
.rams-switch-btn:hover { color: var(--ink); background: var(--stone); }
.rams-switch-btn.is-active { color: var(--ink-inv); background: var(--ink); }
.rams-switch-btn .sw-cnt {
  opacity: 0.65;
  font-weight: 500;
}
.rams-switch-btn.is-active .sw-cnt { opacity: 0.85; }

/* Crisp Swiss Print Buttons */
.btn-editorial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 26px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  padding: 0 10px;
  border: 1px solid var(--rule-strong);
  color: var(--ink);
  background: var(--plate);
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 100ms ease, border-color 100ms ease, color 100ms ease;
}
.btn-editorial:hover { background: var(--stone); border-color: var(--ink); text-decoration: none; }
.btn-editorial.is-primary { border-color: var(--ink); background: var(--ink); color: var(--ink-inv); }
.btn-editorial.is-primary:hover { background: var(--swiss-red); border-color: var(--swiss-red); color: #FFFFFF; }
.btn-editorial.is-teal { border-color: var(--teal); background: var(--teal); color: var(--ink-inv); }
.btn-editorial.is-teal:hover { background: var(--ink); border-color: var(--ink); color: var(--ink-inv); }
.btn-editorial.is-active { border-color: var(--swiss-red); background: var(--swiss-red-wash); color: var(--swiss-red); }
.btn-editorial.is-compact { height: 22px; font-size: 10px; padding: 0 8px; }

/* Fields */
.field {
  height: 26px;
  padding: 0 9px;
  border-radius: 0;
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  color: var(--ink);
  font-size: 12px;
  outline: none;
  transition: border-color 100ms ease;
}
.field:focus { border-color: var(--ink); }
.field::placeholder { color: var(--ink-3); }
select.field { cursor: pointer; font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em; }
select.field option { background: var(--plate); color: var(--ink); }

/* Status Dots & Swiss Signal Badges */
.dot { width: 6px; height: 6px; border-radius: 50%; flex: none; background: var(--ink-3); display: inline-block; }
.dot.idle { background: var(--teal); }
.dot.run { background: var(--swiss-red); animation: swissPulse 1.2s infinite; }
.dot.ask { background: var(--ochre); }
.dot.off { background: transparent; border: 1.5px solid var(--ink-3); }
@keyframes swissPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.sig-tag {
  display: inline-flex;
  align-items: center;
  height: 17px;
  padding: 0 5px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border: 1px solid var(--rule-strong);
  background: var(--paper);
  color: var(--ink-2);
  vertical-align: middle;
  white-space: nowrap;
}
.sig-tag.red { border-color: var(--swiss-red-line); background: var(--swiss-red-wash); color: var(--swiss-red); }
.sig-tag.teal { border-color: var(--teal-line); background: var(--teal-wash); color: var(--teal); }
.sig-tag.ochre { border-color: var(--ochre-line); background: var(--ochre-wash); color: var(--ochre); }
.sig-tag.slate { border-color: var(--slate-line); background: var(--slate-wash); color: var(--slate); }

/* =========================================================================
   3-PANE ZÜRICH UNIGRID APPLICATION FRAME
   ========================================================================= */
.app {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  grid-template-rows: 100vh;
  height: 100vh;
  position: relative;
  background: var(--paper);
}
.app.with-inspector { grid-template-columns: 224px minmax(0, 1fr) 416px; }
.app.no-sidebar { grid-template-columns: 44px minmax(0, 1fr); }
.app.no-sidebar.with-inspector { grid-template-columns: 44px minmax(0, 1fr) 416px; }

/* 2px Top Mineral Datum Line */
.posture-line {
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 20;
  background: var(--rule-ink);
  opacity: 0.55;
  pointer-events: none;
  transition: background-color 140ms ease, opacity 140ms ease;
}
.app[data-posture="live"] .posture-line { background: var(--teal); opacity: 1; }
.app[data-posture="signal"] .posture-line { background: var(--swiss-red); opacity: 1; height: 2.5px; }

/* ---------------------------------------------------------------- Sidebar */
.sidebar {
  background: var(--plate);
  border-right: 1px solid var(--rule-strong);
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  z-index: 15;
}

.side-head {
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border-bottom: 1px solid var(--rule-ink);
  background: var(--plate);
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--ink);
  white-space: nowrap;
  text-decoration: none;
}
.brand-mark:hover { background: transparent; text-decoration: none; }
.unigrid-mark {
  width: 22px;
  height: 22px;
  display: block;
  flex: none;
  color: var(--ink);
}

.rail-new-btn { display: none; }

.side-actions {
  padding: 8px 10px;
  border-bottom: 1px solid var(--rule);
  background: var(--plate);
}
.side-new { width: 100%; justify-content: flex-start; height: 28px; font-size: 11.5px; color: var(--ink-2); }
.side-new kbd { margin-left: auto; background: transparent; border-color: var(--rule-strong); color: var(--ink-3); }

.side-list {
  flex: 1;
  overflow-y: auto;
  padding: 2px 0 10px;
}
.side-group {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 10px 4px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.side-row {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 10px;
  border-left: 2px solid transparent;
  color: var(--ink-2);
  text-decoration: none;
  transition: background-color 100ms ease, color 100ms ease, border-color 100ms ease;
}
.side-row:hover { background: var(--hover); color: var(--ink); text-decoration: none; }
.side-row.active {
  background: var(--stone);
  color: var(--ink);
  border-left-color: var(--swiss-red);
  font-weight: 500;
}
.side-coord {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  color: var(--ink-3);
  width: 16px;
  text-align: right;
  flex: none;
}
.side-row.active .side-coord { color: var(--swiss-red); }
.side-title { font-size: 12px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-meta-cnt {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.side-foot {
  border-top: 1px solid var(--rule-ink);
  background: var(--paper);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.side-global-btn {
  position: relative;
  width: 100%;
  min-width: 0;
  height: 28px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px 0 10px;
  border: 1px solid var(--rule-strong);
  background: var(--plate);
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 500;
  text-align: left;
  transition: background-color 100ms ease, border-color 100ms ease;
}
.side-global-btn::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--slate);
}
.side-global-btn.is-playing::before { background: var(--teal); }
.side-global-btn:hover { background: var(--stone); border-color: var(--ink); }
.side-global-btn .icon { color: var(--slate); flex-shrink: 0; }
.side-global-btn.is-playing .icon { color: var(--teal); }
.side-global-label { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-global-ver {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 16px;
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 600;
  color: var(--slate);
  padding: 0 4px;
  border: 1px solid var(--slate-line);
  background: var(--paper);
  flex-shrink: 0;
}
.side-global-btn.is-playing .side-global-ver {
  color: var(--teal);
  border-color: var(--teal-line);
  background: var(--teal-wash);
}
.side-global-go { font-family: var(--mono); font-size: 11px; color: var(--ink-3); flex-shrink: 0; }

.side-foot-edition {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--rule);
}

/* Collapsed 44px Zürich Coordinate Rail */
.app.no-sidebar .side-head { justify-content: center; padding: 0; }
.app.no-sidebar .brand-name,
.app.no-sidebar .side-collapse-btn,
.app.no-sidebar .side-head .grow,
.app.no-sidebar .side-actions,
.app.no-sidebar .side-group,
.app.no-sidebar .side-title,
.app.no-sidebar .side-meta-cnt,
.app.no-sidebar .side-foot-edition,
.app.no-sidebar .side-global-label,
.app.no-sidebar .side-global-go,
.app.no-sidebar .side-global-btn .grow,
.app.no-sidebar .side-global-btn .icon { display: none; }
.app.no-sidebar .rail-new-btn {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: 8px auto 4px;
  border: 1px solid var(--rule-strong);
  background: var(--paper);
  color: var(--ink-2);
}
.app.no-sidebar .rail-new-btn:hover { color: var(--ink); border-color: var(--ink); }
.app.no-sidebar .side-row { justify-content: center; padding: 0; height: 32px; }
.app.no-sidebar .side-coord { width: auto; font-size: 10.5px; }
.app.no-sidebar .side-foot { padding: 6px 4px; align-items: center; }
.app.no-sidebar .side-global-btn { width: 34px; padding: 0; justify-content: center; }
.app.no-sidebar .side-global-btn::before { display: none; }

/* ----------------------------------------------------- Main & 40px Masthead */
.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--paper);
}

.contextbar {
  display: flex;
  align-items: stretch;
  height: 40px;
  min-height: 40px;
  border-bottom: 1px solid var(--rule-ink);
  background: var(--plate);
  flex-shrink: 0;
}
.cb-strip { display: flex; align-items: stretch; flex: 1; min-width: 0; }
.cb-group { display: flex; align-items: stretch; min-width: 0; }
.cb-group.right { margin-left: auto; flex-shrink: 0; }

.cb-badge-sbx {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  padding: 0 9px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--swiss-red);
  border-right: 1px solid var(--rule);
  background: var(--swiss-red-wash);
  flex-shrink: 0;
}
.cb-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0 14px;
}
.cb-title strong {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.cb-title .faint {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10.5px;
}
.cb-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 100%;
  padding: 0 10px;
  border-left: 1px solid var(--rule);
  background: transparent;
  color: var(--ink-2);
  font-size: 10.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 100ms ease, color 100ms ease;
}
.cb-cell:hover { background: var(--stone); color: var(--ink); }
.cb-cell.plain { color: var(--ink); }
.cb-cell.quiet { cursor: default; }
.cb-cell.quiet:hover { background: transparent; color: var(--ink-2); }
.cb-cell.mobile-menu-btn { display: none; border-left: 0; border-right: 1px solid var(--rule); padding: 0 11px; }

.cb-insp-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  flex-shrink: 0;
  border-left: 1px solid var(--rule);
  color: var(--ink-2);
  transition: background-color 100ms ease, color 100ms ease;
}
.cb-insp-toggle:hover { background: var(--stone); color: var(--ink); }
.cb-insp-toggle.on {
  background: var(--stone);
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--swiss-red);
}

/* ----------------------------------------------------------- Scrollable Stage */
.stage {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  outline: none;
}
.stage-inner {
  max-width: 1060px;
  margin: 0 auto;
  padding: 28px 32px 64px;
}

/* Swiss Section Masthead */
.page-mast {
  border-bottom: 1px solid var(--rule-ink);
  padding-bottom: 18px;
  margin-bottom: 22px;
}
.page-mast-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.page-h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--ink);
}
.page-lead {
  margin: 8px 0 0;
  max-width: 68ch;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-2);
}

/* =========================================================================
   00 // OVERVIEW — ZÜRICH UNIGRID DOSSIER
   ========================================================================= */
.hero-grid-plate {
  position: relative;
  border: 1px solid var(--rule-ink);
  background-color: var(--plate);
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 28px 28px;
  padding: 28px 28px 24px;
  margin-bottom: 20px;
}
.hero-kicker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--rule);
}
.hero-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(240px, 1fr);
  gap: 28px;
  align-items: end;
}
.hero-name {
  margin: 0;
  font-size: clamp(32px, 4.4vw, 48px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.98;
  color: var(--ink);
}
.hero-name .red-bar {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--swiss-red);
  margin-left: 6px;
  vertical-align: baseline;
}
.hero-bio {
  margin: 14px 0 0;
  font-size: 13.5px;
  line-height: 1.58;
  color: var(--ink-2);
  max-width: 56ch;
}
.hero-kv {
  border-left: 2px solid var(--swiss-red);
  padding-left: 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.hero-kv-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11.5px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 5px;
}
.hero-kv-row:last-child { border-bottom: 0; padding-bottom: 0; }
.hero-kv-k { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.hero-kv-v { font-weight: 500; color: var(--ink); text-align: right; }

/* 3-Column Metric Register */
.kpi-matrix {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--rule-strong);
  background: var(--plate);
  margin-bottom: 24px;
}
.kpi-cell {
  display: flex;
  flex-direction: column;
  padding: 14px 16px;
  border-right: 1px solid var(--rule);
  text-decoration: none;
  color: var(--ink);
  transition: background-color 100ms ease;
}
.kpi-cell:last-child { border-right: 0; }
.kpi-cell:hover { background: var(--stone); text-decoration: none; }
.kpi-num {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 6px 0 4px;
  font-variant-numeric: tabular-nums;
}
.kpi-sub { font-size: 11.5px; color: var(--ink-2); }

/* Swiss Section Header Bar */
.sec-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0 7px;
  margin: 24px 0 12px;
  border-bottom: 1px solid var(--rule-ink);
}
.sec-bar-left { display: flex; align-items: center; gap: 10px; }
.sec-title {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}

/* Two-column Overview Split */
.overview-split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}
.unigrid-panel {
  border: 1px solid var(--rule-strong);
  background: var(--plate);
  display: flex;
  flex-direction: column;
}
.unigrid-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--rule-strong);
  background: var(--paper);
}
.dispatch-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: var(--ink);
  transition: background-color 100ms ease;
}
.dispatch-row:last-child { border-bottom: 0; }
.dispatch-row:hover { background: var(--hover); text-decoration: none; }
.dispatch-title { font-size: 12.5px; font-weight: 500; line-height: 1.35; }
.dispatch-meta { font-family: var(--mono); font-size: 10px; color: var(--ink-3); margin-top: 2px; }

/* Featured 2026 Visual Strip */
.art-strip-6 {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border: 1px solid var(--rule-strong);
  background: var(--rule);
  gap: 1px;
}
.art-strip-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--paper);
  cursor: pointer;
}
.art-strip-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 160ms var(--ease);
}
.art-strip-tile:hover img { transform: scale(1.04); }
.art-strip-cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 3px 6px;
  background: var(--plate);
  border-top: 1px solid var(--rule-strong);
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-2);
  opacity: 0;
  transition: opacity 120ms ease;
}
.art-strip-tile:hover .art-strip-cap { opacity: 1; }

/* =========================================================================
   FILTER BAR & SWISS TABULAR REGISTER (PUBLICATIONS / HOT TAKES / LINKS)
   ========================================================================= */
.filter-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--rule-strong);
  background: var(--plate);
  margin-bottom: 14px;
}
.filter-strip .field.search-grow { flex: 1 1 220px; min-width: 180px; }

.reg-table-wrap {
  border: 1px solid var(--rule-strong);
  background: var(--plate);
  margin-bottom: 20px;
}
.reg-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.reg-table th {
  text-align: left;
  padding: 7px 12px;
  background: var(--paper);
  border-bottom: 1px solid var(--rule-strong);
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}
.reg-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.reg-table tr:last-child td { border-bottom: 0; }
.reg-table tbody tr:hover td { background: var(--hover); }
.reg-idx-cell {
  width: 52px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-3);
  white-space: nowrap;
  border-right: 1px solid var(--rule);
}
.reg-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.reg-meta {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.48;
  color: var(--ink-2);
}
.reg-meta b { color: var(--ink); font-weight: 500; }
.reg-actions {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

/* Inline Code Specimen Plate (BibTeX) */
.bib-plate {
  margin-top: 10px;
  border: 1px solid var(--rule-strong);
  background: var(--paper);
  display: none;
}
.bib-plate.open { display: block; }
.bib-plate-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
  border-bottom: 1px solid var(--rule);
  background: var(--stone);
}
.bib-plate pre {
  margin: 0;
  padding: 9px 11px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-2);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Hot Takes Linked Art Thumb — Archival Monochrome Plate (Full Color in Lightbox) */
.take-row-flex {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.take-art-thumb {
  width: 68px;
  height: 68px;
  object-fit: cover;
  border: 1px solid var(--rule-strong);
  flex: none;
  cursor: pointer;
  background: var(--paper);
  filter: grayscale(100%) contrast(1.16) brightness(0.84);
  transition: border-color 100ms ease, filter 120ms ease;
}
:root[data-theme="paper"] .take-art-thumb {
  filter: grayscale(100%) contrast(1.12) brightness(0.98);
}
.take-art-thumb:hover {
  border-color: var(--swiss-red);
  filter: grayscale(100%) contrast(1.22) brightness(0.96);
}
:root[data-theme="paper"] .take-art-thumb:hover {
  filter: grayscale(100%) contrast(1.2) brightness(1.02);
}
.insp-mono-preview {
  filter: grayscale(100%) contrast(1.14) brightness(0.86);
  transition: border-color 100ms ease, filter 120ms ease;
}
:root[data-theme="paper"] .insp-mono-preview {
  filter: grayscale(100%) contrast(1.1) brightness(0.98);
}
.insp-mono-preview:hover {
  border-color: var(--swiss-red) !important;
  filter: grayscale(100%) contrast(1.2) brightness(0.96);
}

/* =========================================================================
   03 // CURRICULUM VITAE DOSSIER
   ========================================================================= */
.cv-timeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--rule-strong);
  background: var(--plate);
  margin-bottom: 22px;
}
.cv-tl-step {
  padding: 11px 12px;
  border-right: 1px solid var(--rule);
}
.cv-tl-step:last-child { border-right: 0; border-top: 2px solid var(--swiss-red); }
.cv-tl-year { font-family: var(--mono); font-size: 10px; font-weight: 600; color: var(--swiss-red); }
.cv-tl-role { font-size: 12px; font-weight: 600; color: var(--ink); margin-top: 3px; }
.cv-tl-org { font-size: 11px; color: var(--ink-2); margin-top: 2px; }

/* =========================================================================
   04 // AUDIO & RELEASES — BRAUN / DIETER RAMS TP-24 INSTRUMENT DECK
   ========================================================================= */
.rams-deck {
  border: 1px solid var(--rule-ink);
  background: var(--plate);
  margin-bottom: 26px;
}
.rams-deck-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--rule-strong);
  background: var(--paper);
}
.rams-deck-body {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  border-bottom: 1px solid var(--rule-strong);
}
.rams-meter-bay {
  padding: 12px;
  border-right: 1px solid var(--rule-strong);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}
#deck-canvas {
  width: 100%;
  height: 86px;
  display: block;
  background: var(--plate);
  border: 1px solid var(--rule);
}
.rams-control-bay {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rams-lcd {
  border: 1px solid var(--rule-strong);
  background: var(--paper);
  padding: 10px 12px;
}
.rams-track-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.rams-track-status {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--teal);
  margin-top: 3px;
}
.rams-seek-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 9px;
}
.rams-seek-track {
  flex: 1;
  height: 8px;
  background: var(--stone-deep);
  border: 1px solid var(--rule-strong);
  cursor: pointer;
  position: relative;
}
.rams-seek-fill {
  height: 100%;
  width: 0%;
  background: var(--swiss-red);
}
.rams-time {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-2);
  min-width: 82px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.rams-transport {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.rams-vol {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--ink-3);
}
.rams-vol input[type="range"] { width: 76px; accent-color: var(--swiss-red); cursor: pointer; }

.rams-pl-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.rams-playlist {
  max-height: 270px;
  overflow-y: auto;
}
.rams-pl-row {
  display: grid;
  grid-template-columns: 36px 128px minmax(0, 1fr) 72px 54px;
  gap: 10px;
  align-items: center;
  padding: 7px 14px;
  border-bottom: 1px solid var(--rule);
  border-left: 2px solid transparent;
  cursor: pointer;
  font-size: 12px;
  transition: background-color 80ms ease;
}
.rams-pl-row:last-child { border-bottom: 0; }
.rams-pl-row:hover { background: var(--hover); }
.rams-pl-row.active {
  background: var(--stone);
  border-left-color: var(--swiss-red);
  font-weight: 500;
}
.rams-pl-row.active .pl-idx { color: var(--swiss-red); }
.pl-idx { font-family: var(--mono); font-size: 10px; color: var(--ink-3); }
.pl-grp { font-family: var(--mono); font-size: 11px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-ttl { color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-dur { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); text-align: right; }

/* Vinyl Spec Plate */
.vinyl-plate {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
  border: 1px solid var(--rule-strong);
  background: var(--plate);
  margin-bottom: 18px;
  align-items: center;
}
.vinyl-diagram {
  width: 124px;
  height: 124px;
  border-radius: 50%;
  border: 1px solid var(--rule-ink);
  background: repeating-radial-gradient(circle at center, var(--paper) 0 4px, var(--rule) 4px 5px);
  display: grid;
  place-items: center;
  position: relative;
}
.vinyl-diagram.spinning { animation: spinDisc 5s linear infinite; }
@keyframes spinDisc { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.vinyl-center {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--swiss-red);
  color: #FFFFFF;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 600;
  display: grid;
  place-items: center;
  letter-spacing: 0.06em;
}

/* =========================================================================
   05 // VISUAL ARCHIVE — CONTACT SHEET & LIGHTBOX
   ========================================================================= */
.gal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
  gap: 1px;
  border: 1px solid var(--rule-strong);
  background: var(--rule);
  margin-bottom: 16px;
}
.gal-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--paper);
  cursor: pointer;
}
.gal-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 160ms var(--ease);
}
.gal-cell:hover img { transform: scale(1.03); }
.gal-cell-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  background: var(--swiss-red);
}
.gal-cell-foot {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 4px 6px;
  background: var(--plate);
  border-top: 1px solid var(--rule-strong);
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-2);
  display: flex;
  justify-content: space-between;
  opacity: 0;
  transition: opacity 110ms ease;
}
.gal-cell:hover .gal-cell-foot { opacity: 1; }

.gal-batch {
  border: 1px solid var(--rule-strong);
  background: var(--plate);
  margin-bottom: 14px;
}
.gal-batch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  font-family: var(--mono);
  font-size: 10.5px;
}
.gal-batch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 1px;
  background: var(--rule);
}

/* =========================================================================
   RIGHT INSPECTOR PANE (416px)
   ========================================================================= */
.inspector {
  background: var(--plate);
  border-left: 1px solid var(--rule-strong);
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  z-index: 14;
}
.insp-head {
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 10px 0 12px;
  border-bottom: 1px solid var(--rule-ink);
  background: var(--plate);
}
.insp-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px;
}
.insp-sec {
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}
.insp-sec:last-child { border-bottom: 0; margin-bottom: 0; }
.insp-kv {
  display: grid;
  grid-template-columns: 106px minmax(0, 1fr);
  gap: 8px;
  font-size: 11.5px;
  padding: 4px 0;
  border-bottom: 1px solid var(--rule);
}
.insp-kv:last-child { border-bottom: 0; }
.insp-kv .k { font-family: var(--mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); }
.insp-kv .v { color: var(--ink); word-break: break-word; }

#insp-canvas {
  width: 100%;
  height: 60px;
  display: block;
  background: var(--paper);
  border: 1px solid var(--rule);
  margin: 8px 0;
}

/* =========================================================================
   NATIVE <dialog> ARCHIVAL MODALS (COMMAND PALETTE & LIGHTBOX)
   ========================================================================= */
dialog.modal {
  width: min(560px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 36px);
  margin: auto;
  padding: 0;
  background: var(--plate);
  color: var(--ink);
  border: 1px solid var(--rule-ink);
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}
dialog.modal[open] { display: flex; flex-direction: column; }
dialog.modal::backdrop { background: var(--scrim); }
dialog.modal.wide { width: min(880px, calc(100vw - 32px)); }
dialog.modal.palette-modal { margin-block-start: 11dvh; margin-block-end: auto; width: min(640px, calc(100vw - 32px)); }

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--rule-strong);
  background: var(--paper);
  flex: none;
}
.modal-head h2 { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.modal-kicker { display: block; margin-bottom: 3px; }
.modal-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--rule-strong);
  background: var(--paper);
  flex: none;
}

/* Command Palette */
.palette-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--rule-strong);
  background: var(--paper);
}
.palette-input {
  flex: 1;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 13.5px;
  color: var(--ink);
}
.palette-input::placeholder { color: var(--ink-3); }
.palette-results {
  flex: 1;
  overflow-y: auto;
  max-height: 52dvh;
}
.pal-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 9px 14px;
  text-align: left;
  border-bottom: 1px solid var(--rule);
  border-left: 2px solid transparent;
  color: var(--ink);
}
.pal-row:hover, .pal-row.is-sel {
  background: var(--stone);
  border-left-color: var(--swiss-red);
}
.pal-sec { font-family: var(--mono); font-size: 9px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.pal-title { font-size: 12.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-sub { font-size: 11px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Lightbox */
.lb-stage-wrap {
  flex: 1;
  min-height: 220px;
  background: var(--paper);
  display: grid;
  place-items: center;
  padding: 14px;
  overflow: hidden;
}
.lb-img {
  max-width: 100%;
  max-height: 62dvh;
  object-fit: contain;
  display: block;
  border: 1px solid var(--rule-strong);
}
.lb-meta-bar {
  padding: 9px 14px;
  border-top: 1px solid var(--rule);
  background: var(--plate);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-2);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* Toasts */
.toasts-wrap {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  padding: 9px 13px;
  background: var(--plate);
  border: 1px solid var(--rule-ink);
  border-left: 3px solid var(--teal);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink);
  max-width: 380px;
}

/* =========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================= */
.mobile-scrim {
  position: fixed;
  inset: 0;
  background: var(--scrim);
  z-index: 25;
}

@media (max-width: 1180px) {
  .app.with-inspector { grid-template-columns: 210px minmax(0, 1fr) 360px; }
  .overview-split { grid-template-columns: 1fr; }
  .cv-timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cv-tl-step { border-bottom: 1px solid var(--rule); }
}

@media (max-width: 860px) {
  .app,
  .app.no-sidebar,
  .app.with-inspector,
  .app.no-sidebar.with-inspector {
    grid-template-columns: minmax(0, 1fr);
  }
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 248px;
    transform: translateX(-100%);
    transition: transform 150ms var(--ease);
    z-index: 30;
  }
  .app.mobile-nav-open .sidebar { transform: translateX(0); }
  .inspector {
    position: fixed;
    top: 40px; right: 0; bottom: 0;
    width: min(380px, 100vw);
    z-index: 28;
  }
  .cb-cell.mobile-menu-btn { display: inline-flex; }
  .side-collapse-btn { display: none; }
  .hide-sm { display: none !important; }
  .stage-inner { padding: 18px 16px 48px; }
  .hero-main-grid { grid-template-columns: 1fr; }
  .rams-deck-body { grid-template-columns: 1fr; }
  .rams-meter-bay { border-right: 0; border-bottom: 1px solid var(--rule-strong); }
  .rams-pl-row { grid-template-columns: 30px minmax(0, 1fr) 48px; }
  .rams-pl-row .pl-grp, .rams-pl-row .sig-tag { display: none; }
  .art-strip-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vinyl-plate { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
  .hide-xs { display: none !important; }
  .cb-title .faint { display: none; }
  .kpi-matrix { grid-template-columns: 1fr; }
  .kpi-cell { border-right: 0; border-bottom: 1px solid var(--rule); }
  .kpi-cell:last-child { border-bottom: 0; }
}

/* Archival Print Stylesheet */
@media print {
  :root, :root[data-theme="pitch"], :root[data-theme="paper"] {
    --paper: #FFFFFF; --plate: #FFFFFF; --stone: #F4F4F4;
    --ink: #000000; --ink-2: #222222; --ink-3: #555555;
    --rule: #CCCCCC; --rule-strong: #888888; --rule-ink: #000000;
  }
  body { overflow: visible; height: auto; }
  .app { display: block; height: auto; }
  .sidebar, .contextbar, .inspector, .posture-line, .filter-strip, .toasts-wrap { display: none !important; }
  .stage { overflow: visible; }
  .stage-inner { padding: 0; max-width: none; }
}
