/* Gate baseline page — long-scroll OK for 50" TV */

body.gate-baseline-page {
  overflow: auto;
  height: auto;
  min-height: 100%;
}

body.gate-baseline-page .tv-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-bottom: 1rem;
}

body.gate-baseline-page .tv-shell.hidden {
  display: none;
}

.back-link {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.85rem;
  opacity: 0.9;
  margin-left: 0.75rem;
}

.gb-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 1rem;
}

.gb-tab {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.55rem 0.9rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  cursor: pointer;
}

.gb-tab.active {
  color: var(--text-primary);
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.gb-tab .tot {
  display: block;
  font-size: 0.75rem;
  opacity: 0.75;
  margin-top: 0.15rem;
}

.gb-main {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 0.75rem;
  padding: 0 1rem;
  flex: 1;
  min-height: 420px;
}

.gb-chart-panel,
.gb-card,
.gb-table-full {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
}

.gb-chart-panel h2,
.gb-table-full h2,
.gb-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.gb-side {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.gb-bars {
  display: grid;
  grid-template-columns: repeat(18, 1fr);
  gap: 0.35rem;
  align-items: end;
  height: 280px;
  padding: 0.25rem 0 1.75rem;
  position: relative;
}

.gb-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  gap: 0.2rem;
  position: relative;
}

.gb-bar-col.now .gb-bar {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

.gb-bar-stack {
  width: 100%;
  display: flex;
  flex-direction: column-reverse;
  align-items: stretch;
  gap: 2px;
  height: 100%;
  justify-content: flex-end;
}

.gb-bar {
  width: 100%;
  border-radius: 3px 3px 0 0;
  min-height: 2px;
  transition: height 0.2s ease;
}

.gb-bar.expected {
  background: linear-gradient(180deg, #00d4ff 0%, #007a99 100%);
}

.gb-bar.y24 {
  background: rgba(160, 170, 192, 0.45);
  border-radius: 2px;
}

.gb-bar.y25 {
  background: rgba(255, 0, 110, 0.45);
  border-radius: 2px;
}

.gb-bar-label {
  position: absolute;
  bottom: -1.5rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.gb-bar-val {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-primary);
  opacity: 0.85;
  margin-bottom: 0.15rem;
}

.gb-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

.gb-legend .sw {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 0.35rem;
  vertical-align: middle;
}

.gb-legend .sw.expected {
  background: #00d4ff;
}
.gb-legend .sw.y24 {
  background: rgba(160, 170, 192, 0.7);
}
.gb-legend .sw.y25 {
  background: rgba(255, 0, 110, 0.7);
}

.gb-kv {
  display: grid;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.gb-kv div {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.25rem;
}

.gb-table-wrap {
  overflow-x: auto;
}

.gb-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.gb-table-wrap th,
.gb-table-wrap td {
  text-align: right;
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid var(--border);
}

.gb-table-wrap th:first-child,
.gb-table-wrap td:first-child {
  text-align: left;
}

.gb-table-wrap tr.now td {
  color: var(--primary);
  font-weight: 600;
}

.gb-table-full {
  margin: 0 1rem;
}

.gb-card.note p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.gb-card.note .muted {
  opacity: 0.7;
  font-size: 0.75rem;
}

@media (max-width: 1100px) {
  .gb-main {
    grid-template-columns: 1fr;
  }
  .gb-bars {
    grid-template-columns: repeat(18, minmax(28px, 1fr));
    overflow-x: auto;
  }
}
