/* legacy.css — THE BRIDGE. Delete this file, rule by rule, as phase 2 rebuilds
 * each page on the system in css/README.md.
 *
 * On 2026-09-25 the four retired sheets (style.css, views.css, surfaces.css,
 * header-search.css) were deleted. The group, person, compare, about and
 * feedback views had not been rebuilt yet and still emit their old class names
 * (.leaf, .detail-head, .room-card, .sheet-row, .compare-*, .fb-*, charts…).
 * This file is those sheets' rules for THOSE classes only — machine-extracted:
 * a selector survived only if it names at least one class that a live view
 * still emits and that the new system does not define, so nothing here can
 * restyle a new-system component (.btn, .chip, .table, .avatar, .seg, .fig …).
 *
 * The old sheets spoke a different token vocabulary. Rather than rewrite 1,700
 * lines, the old names are ALIASED onto the new tokens below, so both themes
 * and every colour decision come from tokens.css and nothing here forks the
 * palette. When the last rule that reads an alias is gone, delete the alias.
 *
 * Rule for phase 2: never ADD to this file. Rebuild the view on the system and
 * delete its section here in the same change.
 */

:root {
  /* type */
  --font: var(--font-text);
  --mono: var(--font-mono);
  --t-micro: var(--t-3xs);
  --t-fine: var(--t-xs);
  --t-small: var(--t-sm);
  --t-lead: var(--t-lg);
  --t-h3: var(--t-xl);
  --t-h1: var(--t-3xl);
  --t-figure: var(--t-fig-lg);
  
  /* ink and rules */
  --text: var(--ink);
  --text-dim: var(--ink-2);
  --text-mute: var(--ink-3);
  --line: var(--rule-soft);
  --line-soft: var(--rule-hair);
  --rule-faint: var(--rule-hair);
  --accent-dim: var(--accent-line);
  --shadow: 0 1px 0 var(--rule-hair);
  
  /* rhythm */
  --gap-sm: var(--s-2);
  --gap: 0.875rem;
  --gap-lg: 1.75rem;
  --gap-xl: 3.5rem;
  --radius-sm: var(--r-1);
  --radius: var(--r-2);
  --radius-lg: 6px;
  --radius-pill: var(--r-full);
  --fast: var(--dur-1);
  --ease: var(--ease-out);
  
  /* old layout measures, kept at their old values */
  --rail-w: 148px;
  --row-y: 11px;
  --measure-board: 780px;
}

/* ---- from style.css */

.stat-value {
  font-variant-numeric: tabular-nums;
}

.figure {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--t-figure);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
}

.room-card:active {
  transform: none;
}

.is-stale {
  color: var(--warn);
}

.panel {
  background: none;
  border: none;
  border-radius: 0;
}

.panel-body {
  padding: var(--gap) 0;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: var(--gap);
}

.section-title {
  font-size: 17px;
}

.section-note {
  color: var(--text-mute);
  font-size: 13px;
  max-width: 72ch;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-sm);
  align-items: center;
}

.input,
.select {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  font-size: 14px;
  transition-property: border-color, background-color;
  transition-duration: var(--fast);
}

.input::placeholder {
  color: var(--text-mute);
}

.input:hover,
.select:hover {
  border-color: var(--text-mute);
}

.select {
  width: auto;
  padding-right: 30px;
  cursor: pointer;
}

.badge-muted {
  color: var(--void);
  border-color: var(--line-soft);
}

.badge-gold {
  color: var(--text-dim);
  border-color: transparent;
  background: var(--surface-2);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-dim);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}

.stats {
  display: grid;
  gap: var(--gap-sm);
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-bottom: var(--gap);
}

.stat-value {
  margin-top: 5px;
}

.stat-sub {
  color: var(--text-mute);
  font-size: 12px;
  margin-top: 1px;
}

.sk {
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  animation: sk 1.4s ease-in-out infinite;
}

.w40 {
  width: 40%;
}

.w60 {
  width: 60%;
}

.w80 {
  width: 80%;
}

/* ---- from views.css */

.room-link {
  transition-property: color;
  transition-duration: var(--fast);
}

.room-link:hover {
  color: var(--accent);
}

.gantt {
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
}

.chart-svg .grid {
  stroke: var(--rule-faint);
  stroke-width: 0.5;
}

.axis-label {
  fill: var(--text-mute);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

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

.series-a {
  color: var(--accent);
}

.chart-svg .line {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.chart-svg .area {
  fill: currentColor;
  opacity: 0.14;
  stroke: none;
}

.chart-svg .dot,
.chart-svg .cursor-dot {
  fill: currentColor;
}

.chart-svg .cursor {
  stroke: none;
}

.chart-svg .chart-overlay {
  fill: transparent;
}

.chart-legend {
  display: flex;
  gap: var(--gap);
  font-size: 11.5px;
  color: var(--text-mute);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.split {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.rank {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-mute);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.hint {
  color: var(--text-mute);
  font-size: 12.5px;
}

.hint:empty {
  display: none;
}

.card {
  display: block;
  padding: var(--gap);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
}

.card + .card {
  margin-top: var(--gap);
}

.leaf {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  gap: 0 var(--gap-lg);
  padding-block: var(--gap-lg);
  border-top: 1px solid var(--rule);
}

.leaf:first-of-type {
  border-top: none;
  padding-top: var(--gap);
}

.leaf-rail {
  grid-column: 1;
}

.leaf-body {
  grid-column: 2;
  min-width: 0;
}

.leaf-label {
  margin-bottom: 6px;
  text-wrap: balance;
}

.leaf-note {
  font-size: var(--t-fine);
  color: var(--text-mute);
  text-wrap: pretty;
}

@media (max-width: 900px) {
  .leaf {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .leaf-rail,
  .leaf-body {
    grid-column: auto;
  }

  .leaf-rail {
    margin-bottom: var(--gap);
  }
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.chips .chip {
  cursor: default;
}

.chips .chip:active {
  transform: none;
}

.chip-lang {
  color: var(--text);
}

.chip-lock {
  color: var(--warn);
}

.mono,
.infinity {
  font-family: var(--mono);
  font-size: 12.5px;
}

.infinity {
  font-size: 15px;
}

.occ-empty {
  color: var(--text-mute);
}

.occ-full {
  color: var(--warn);
}

.presence {
  display: flex;
  align-items: center;
  gap: var(--gap);
  flex-wrap: wrap;
  padding-block: var(--gap);
  margin-bottom: var(--gap);
  border: none;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  background: none;
}

.presence.is-online {
  border-top-color: var(--live);
}

.presence.is-unknown {
  border-top-color: var(--warn);
}

.partner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px minmax(140px, auto);
  align-items: center;
  gap: var(--gap);
}

@media (max-width: 620px) {
  .partner {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

.grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.stat-strip {
  display: grid;
  gap: var(--gap-sm);
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-bottom: var(--gap);
}

.room-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.skeleton-card {
  padding: 14px var(--gap);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--gap);
  flex-wrap: wrap;
}

.chart-caption {
  color: var(--text-mute);
  font-size: 12px;
  margin-top: var(--gap-sm);
}

.chart-plot {
  position: relative;
}

.chart-readout {
  position: absolute;
  top: 0;
  padding: 6px 9px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 12px;
  white-space: nowrap;
  box-shadow: var(--shadow);
}

.cursor-line {
  stroke: var(--text-mute);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.fb-message {
  min-height: 180px;
  padding: 10px 12px;
  line-height: 1.55;
  resize: vertical;
}

.tabs {
  margin-top: var(--gap-lg);
}

.tab {
  position: relative;
  flex: none;
  min-height: 44px;
  padding: 0 18px;
  background: transparent;
  border: none;
  color: var(--text-mute);
  font: inherit;
  font-size: var(--t-small);
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  transition-property: color, background-color;
  transition-duration: var(--fast);
}

.tab:first-child {
  padding-left: 0;
}

.tab:hover {
  color: var(--text);
  background: var(--ink-wash);
}

.tab.is-active {
  background: transparent;
  color: var(--text);
  font-weight: 650;
}

.tab.is-active:hover {
  background: var(--ink-wash);
}

.tab.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--text);
}

.tabpanel {
  padding-top: var(--gap-lg);
}

.room-card {
  display: flex;
  flex-direction: column;
  background: none;
  border: none;
  border-bottom: 1px solid var(--rule-faint);
  border-radius: 0;
  transition-property: background-color;
  transition-duration: var(--fast);
}

.room-card:hover {
  background: var(--ink-wash);
}

.room-card.is-live {
  box-shadow: inset 2px 0 0 var(--live);
}

.room-card-title {
  min-width: 0;
  flex: 1;
}

.face {
  display: inline-flex;
  border-radius: 50%;
}

.face.is-here .avatar {
  box-shadow: 0 0 0 2px var(--live);
}

.room-card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 10px;
  border-top: none;
  background: none;
  color: var(--text-dim);
  font-size: var(--t-fine);
  font-variant-numeric: tabular-nums;
}

.sheet {
  --sheet-who: minmax(0, 1.5fr);
  --sheet-track: minmax(0, 3fr);
  --sheet-times: minmax(0, 1.4fr);
  --sheet-dur: 6rem;
}
