/* ==========================================================================
   listen.safiya.app -- the ears
   Character: night. Wide left-aligned rails punctuated by the voice bar.
   Sans-led with monospace stamps. The signature object is the amplitude bar.
   ========================================================================== */

body.on-night { background: var(--night); color: var(--ivory); }
.on-night .band { border-top-color: var(--night-rule); }
.on-night a { text-decoration-color: var(--night-rule); }
.on-night .lede { color: var(--ivory-muted); }
.on-night .micro { color: var(--ivory-faint); }
.on-night hr.rule { border-top-color: var(--night-rule); }
.on-night .legend-note { color: var(--ivory-muted); }

/* States inherit a night palette where the ink tokens would vanish. */
.on-night .m-heard { color: var(--ivory); }
.on-night .m-said { color: var(--ivory); border-left-color: var(--ivory); }
.on-night .m-decided { border-bottom-color: var(--promised-rule); color: var(--ivory); }
.on-night .m-fact { color: var(--ivory); }
.on-night .m-fact::before, .on-night .m-fact::after { color: var(--ivory-faint); }
.on-night .m-withdrawn { color: var(--ivory-faint); }
.on-night .m-withdrawn::after { background: var(--ivory-faint); }

/* ---- 1 · threshold ----------------------------------------------------- */
.threshold { padding-block: clamp(var(--s8), 11vw, 150px) clamp(var(--s8), 8vw, 110px); }
.threshold-rows {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(var(--s6), 6vw, var(--s9));
  align-items: end;
}
.threshold-words h1 { max-width: 12ch; letter-spacing: -0.02em; }
.threshold-words .lede { margin-top: var(--s5); max-width: 44ch; }
.threshold-words .ctl-row { margin-top: var(--s6); }
.threshold-words .avail { margin-top: var(--s5); }

.threshold-bar { padding-bottom: var(--s2); }
.big-bars { height: 96px; gap: 4px; }
.big-bars i { width: 7px; border-radius: 3px; }
.bar-legend {
  display: flex;
  gap: var(--s5);
  margin-top: var(--s5);
  padding-top: var(--s4);
  border-top: var(--hair) solid var(--night-rule);
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ivory-faint);
  flex-wrap: wrap;
}
.bar-legend span { display: inline-flex; align-items: center; gap: var(--s2); }
.bar-legend i { display: block; width: 16px; height: 4px; border-radius: 2px; }
.sw-other { background: var(--promised-rule); }
.sw-me { background: var(--ivory); }
.sw-safiya { background: #8E867C; }

@media (max-width: 900px) {
  .threshold-rows { grid-template-columns: 1fr; gap: var(--s7); align-items: start; }
  .big-bars { height: 64px; }
  .threshold-words h1 { max-width: 16ch; }
}

/* ---- 2 · the passage: the trace ---------------------------------------- */
.play-state { color: var(--ivory-faint); }
.trace { list-style: none; margin: var(--s6) 0 0; padding: 0; max-width: 860px; }
.trace .turn {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s2);
  padding: var(--s5) 0 var(--s5) var(--s5);
  border-left: 2px solid var(--night-rule);
  border-bottom: var(--hair) solid var(--night-rule);
  opacity: 0.46;
  transition: opacity var(--d-control) var(--ease),
              border-left-color var(--d-control) var(--ease),
              background var(--d-control) var(--ease);
}
.trace .turn:last-child { border-bottom: 0; }
.trace .turn.is-on {
  opacity: 1;
  background: linear-gradient(90deg, rgba(242, 237, 228, 0.045), transparent 70%);
}
.trace .turn.v-other.is-on { border-left-color: var(--promised-rule); }
.trace .turn.v-me.is-on { border-left-color: var(--ivory); }
.trace .turn.v-safiya.is-on { border-left-color: #8E867C; }

.turn-top { display: flex; align-items: baseline; gap: var(--s4); }
.turn .who {
  font-family: var(--sans);
  font-size: var(--t-ui);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  min-width: 72px;
}
.turn .at {
  font-family: var(--mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--ivory-faint);
}
.turn .said {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(17px, 1.3vw, 19.5px);
  line-height: 1.55;
  max-width: 56ch;
}
.turn .said .m-said { border-left: 0; padding-left: 0; display: inline; }
.turn .said--safiya {
  font-family: var(--sans);
  font-size: 16.5px;
  color: var(--ivory-muted);
  font-style: normal;
}
.turn .bars { margin-top: var(--s3); }
.turn .uncertain {
  margin: var(--s3) 0 0;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--promised-rule);
  max-width: 46ch;
}
.turn .uncertain .micro {
  color: var(--promised-rule);
  margin-right: var(--s2);
}

/* ---- 3 · whose voice --------------------------------------------------- */
.voice-rows { border-top: var(--hair) solid var(--night-rule); }
.voice-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: var(--s6);
  align-items: center;
  padding: var(--s6) 0;
  border-bottom: var(--hair) solid var(--night-rule);
}
.row-bars { height: 34px; gap: 3px; }
.row-bars i { width: 5px; }
.voice-copy .micro { display: block; margin-bottom: var(--s2); }
.voice-copy p { margin: 0; font-size: 15.5px; color: var(--ivory-muted); max-width: 54ch; }
.voices-note { margin-top: var(--s6); color: var(--ivory-muted); }
@media (max-width: 760px) {
  .voice-row { grid-template-columns: 1fr; gap: var(--s4); }
  .row-bars { height: 26px; }
}

/* ---- 4 · what is kept -------------------------------------------------- */
.kept-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(var(--s6), 5vw, var(--s8));
  align-items: start;
}
.kept-words .rail-item + .rail-item { margin-top: var(--s6); }
.kept-words .rail-item .rail-rule { border-top-color: var(--night-rule); }
.kept-words .micro { display: block; margin-bottom: var(--s2); }
.kept-words p { font-size: 15.5px; color: var(--ivory-muted); max-width: 44ch; margin: 0; }
.kept-words em { color: var(--ivory); font-style: italic; }

.strike-sheet {
  background: var(--night-sheet);
  border: var(--hair) solid var(--night-rule);
  padding: var(--s5);
}
.strike-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s4);
  padding-bottom: var(--s4);
  margin-bottom: var(--s4);
  border-bottom: var(--hair) solid var(--night-rule);
  flex-wrap: wrap;
}
.strike-head .mono { color: var(--ivory-faint); }
.strike-line { margin: 0; font-family: var(--serif); font-size: 18px; line-height: 1.55; }
.strike-result {
  margin: var(--s4) 0 0;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--promised-rule);
}
.strike-result .micro { color: var(--ivory-faint); margin-right: var(--s2); }
#strike-undo { margin-top: var(--s3); }
@media (max-width: 900px) { .kept-grid { grid-template-columns: 1fr; gap: var(--s7); } }

/* ---- 5 · the handoff --------------------------------------------------- */
.handoff {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: var(--s6) var(--s5);
  border-top: var(--hair) solid var(--night-rule);
  padding-top: var(--s6);
}
.step { margin: 0; padding-right: var(--s5); border-left: var(--hair) solid var(--night-rule); padding-left: var(--s5); }
.step:first-child { border-left: 0; padding-left: 0; }
.step-n { display: block; color: var(--promised-rule); letter-spacing: 0.12em; margin-bottom: var(--s3); }
.step h3 { font-size: 17px; margin-bottom: var(--s2); }
.step p { font-size: 14.5px; color: var(--ivory-muted); margin: 0 0 var(--s3); }
.step-bars { height: 20px; }
.step-sample {
  font-family: var(--serif);
  font-size: 15.5px;
  color: var(--ivory) !important;
  padding-top: var(--s3);
  border-top: var(--hair) solid var(--night-rule);
}
.step-sample--mono {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ivory-faint) !important;
}
.handoff-ctl { margin-top: var(--s7); }
@media (max-width: 760px) {
  .step { border-left: 0; padding-left: 0; }
}

/* ---- 6 · the states ---------------------------------------------------- */
.state-list .status-item { grid-template-columns: 180px minmax(0, 1fr); }
.state-copy {
  display: block;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.5;
  color: var(--ivory);
  margin-bottom: var(--s2);
}
.state-why {
  display: block;
  font-family: var(--sans);
  font-size: 14.5px;
  color: var(--ivory-muted);
  max-width: 56ch;
}

/* ---- 7 · status -------------------------------------------------------- */
.on-night .status-item dd strong { color: var(--promised-rule); font-weight: 600; }
