/*
 * Garmin demo — restyled against Register A (Product-Evidence).
 * No hex codes here. Every color reads through a --pe-* token defined in
 * /register-a/styles/tokens.css. Accent (orange) is used only on .nav-button
 * (primary CTA).
 */

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  min-width: 1240px;
  background: var(--pe-canvas);
  color: var(--pe-text-primary);
  font-family: var(--pe-font-sans);
  font-size: 14px;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
a {
  font: inherit;
}

button {
  border: 0;
}

.app-loading {
  display: grid;
  min-height: 100vh;
  place-items: center;
  color: var(--pe-text-metadata);
  font-family: var(--pe-font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Map background ---------- */

#map-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
}

/* ---------- Shells ---------- */

.list-shell {
  width: min(1140px, calc(100vw - 140px));
  max-width: none;
  min-height: 100vh;
  margin: 0 auto;
  padding: 44px 0 80px;
}

.detail-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 0 20px 20px;
  pointer-events: none;
}

.detail-shell .toolbar,
.detail-shell .left-col,
.detail-shell .right-col {
  pointer-events: auto;
}

/* ---------- Panel surfaces ---------- */

.panel,
.run-tile,
.agent-read-card,
.pipeline-strip,
.table-panel {
  position: relative;
  background-color: var(--pe-panel-raised);
  border: 1px solid var(--pe-border-subtle);
  border-radius: var(--pe-radius-panel);
  box-shadow: var(--pe-shadow-soft);
  overflow: hidden;
}

.panel::before,
.run-tile::before,
.agent-read-card::before,
.pipeline-strip::before,
.table-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: var(--pe-highlight-top);
  pointer-events: none;
  z-index: 1;
}

/* ---------- Toolbar (shared heading row) ---------- */

.toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--pe-text-metadata);
  font-family: var(--pe-font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-title {
  margin: 0;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.012em;
  color: var(--pe-text-primary);
}

.page-subtitle {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--pe-text-metadata);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}

/* ---------- Navigation buttons ---------- */

.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  border-radius: 10px;
  border: 0;
  background-color: var(--pe-accent);
  color: var(--pe-text-on-accent);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  white-space: nowrap;
}

.nav-button:hover {
  background-color: var(--pe-accent-muted-1);
}

.nav-button[href="/runs"] {
  background-color: var(--pe-chip-raised);
  color: var(--pe-text-secondary);
  border: 1px solid var(--pe-border-subtle);
}

.nav-button[href="/runs"]:hover {
  background-color: var(--pe-panel-selected);
  color: var(--pe-text-primary);
}

/* ---------- Page 1: digest header ---------- */

.digest-header {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  margin: 46px -16px 24px;
}

/* ---------- Metric cards ---------- */

.metric-card {
  min-height: 104px;
  padding: 16px 20px 16px 0;
}

.list-shell .toolbar {
  margin-bottom: 0;
}

.list-shell .eyebrow {
  margin: 0 0 9px;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.08em;
}

.list-shell .page-title {
  font-size: 31px;
  line-height: 1.12;
  letter-spacing: 0;
}

.list-shell .page-subtitle {
  max-width: 552px;
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.45;
}

.list-shell .digest-header .metric-card {
  min-height: 82px;
  padding: 4px 34px 0;
  border-left: 1px solid var(--pe-border-subtle);
}

.list-shell .digest-header .metric-card:first-child {
  border-left: 0;
}

.metric-label {
  color: var(--pe-text-metadata);
  font-family: var(--pe-font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.metric-value {
  margin-top: 14px;
  font-size: 26px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.015em;
  color: var(--pe-text-primary);
}

.metric-note {
  margin-top: 8px;
  color: var(--pe-text-dim);
  font-size: 12px;
  font-weight: 400;
}

.list-shell .metric-value {
  margin-top: 12px;
  font-size: 25px;
  letter-spacing: 0;
}

.list-shell .metric-note {
  margin-top: 8px;
  font-size: 13px;
  color: var(--pe-text-metadata);
}

/* ---------- Page 1: run list ---------- */

.run-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: none;
  margin: 0;
}

.run-tile {
  display: grid;
  grid-template-columns: 108px 318px 118px 400px minmax(16px, 1fr);
  align-items: center;
  column-gap: 28px;
  width: 100%;
  height: 78px;
  padding: 0 22px;
  text-align: left;
  cursor: pointer;
  background-color: rgba(20, 21, 22, 0.64);
  color: var(--pe-text-primary);
  border-radius: 10px;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.28);
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.run-tile:hover {
  background-color: var(--pe-panel-selected);
  border-color: var(--pe-border-strong);
  transform: translateY(-1px);
}

.list-agent-read-card {
  min-height: 116px;
  background:
    linear-gradient(135deg, rgba(78, 195, 199, 0.075), rgba(78, 195, 199, 0.025) 42%, rgba(20, 21, 22, 0.64) 76%),
    rgba(20, 21, 22, 0.64);
  border-radius: 10px;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.28);
}

.activity-agent-read-card {
  background:
    linear-gradient(135deg, rgba(78, 195, 199, 0.075), rgba(78, 195, 199, 0.025) 42%, rgba(20, 21, 22, 0.64) 76%),
    rgba(20, 21, 22, 0.64);
}

.activity-agent-read-card .agent-read-chip-row {
  display: none;
}

.list-agent-read-card .agent-read-toggle {
  padding: 16px 22px 0;
}

.list-agent-read-card .agent-read-closed {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  column-gap: 28px;
  padding: 13px 22px 18px;
}

.list-agent-read-card .agent-read-closed .agent-read-verdict {
  grid-column: 1;
  font-size: 20px;
}

.list-agent-read-card .agent-read-closed p {
  grid-column: 1;
  max-width: 620px;
}

.list-agent-read-card .agent-read-closed .agent-read-meta {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: end;
  justify-self: end;
  max-width: 340px;
  text-align: right;
  white-space: nowrap;
}

.run-list-separator {
  height: 1px;
  margin: 24px 12px;
  background: var(--pe-border-subtle);
}

.run-tile-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--pe-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.run-tile-date {
  color: var(--pe-text-metadata);
  font-family: var(--pe-font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.run-tile-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
}

.run-tile-stat span {
  display: block;
  color: var(--pe-text-metadata);
  font-family: var(--pe-font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.run-tile-stat strong {
  display: block;
  margin-top: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--pe-text-primary);
  letter-spacing: 0;
}

/* ---------- Run type chip ---------- */

.run-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 106px;
  height: 30px;
  padding: 0 14px;
  border: 1px solid var(--pe-border-subtle);
  border-radius: var(--pe-radius-chip);
  color: var(--pe-text-metadata);
  background-color: var(--pe-chip-raised);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  white-space: nowrap;
}

.run-tile-arrow {
  justify-self: end;
  color: var(--pe-text-metadata);
  font-size: 30px;
  font-weight: 300;
  line-height: 1;
}

/* ---------- Export links ---------- */

.export-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}

.export-link {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--pe-border-subtle);
  border-radius: var(--pe-radius-chip-square);
  background-color: var(--pe-chip-raised);
  color: var(--pe-text-secondary);
  text-decoration: none;
  font-family: var(--pe-font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.export-link:hover {
  background-color: var(--pe-panel-selected);
  color: var(--pe-text-primary);
}

/* ---------- Page 2: glass panels ---------- */

.detail-shell .panel,
.detail-shell .agent-read-card,
.detail-shell .table-panel,
.detail-shell .pipeline-strip {
  background-color: rgba(10, 11, 12, 0.38);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 8px;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.4);
}

.detail-shell .metric-card {
  position: relative;
  background-color: rgba(10, 11, 12, 0.38);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--pe-border-subtle);
  border-radius: 8px;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.detail-shell .metric-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: var(--pe-highlight-top);
  pointer-events: none;
  z-index: 1;
}

.detail-shell .toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background-color: rgba(10, 11, 12, 0.38);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--pe-border-subtle);
  border-radius: 0;
  margin: 0 -20px 15px;
  padding: 18px 26px 13px;
  align-items: center;
  gap: 10px;
}

.detail-shell .toolbar .page-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

.toolbar-date {
  margin-left: auto;
  color: var(--pe-text-metadata);
  font-family: var(--pe-font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border: 1px solid var(--pe-border-subtle);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--pe-text-secondary);
  text-decoration: none;
  font-size: 18px;
  line-height: 1;
  transition: background 120ms ease, color 120ms ease;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.11);
  color: var(--pe-text-primary);
}

/* ---------- Page 2: spread layout ---------- */

.detail-spread {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.left-col {
  width: 268px;
  flex-shrink: 0;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.right-col {
  width: 278px;
  min-height: calc(100vh - 96px);
  flex-shrink: 0;
}

.left-col .metric-card {
  min-height: 74px;
  padding: 12px;
}

.left-col .metric-value {
  margin-top: 8px;
  font-size: 18px;
  white-space: nowrap;
}

.left-col .metric-note {
  margin-top: 3px;
}

/* ---------- Collapsible panels ---------- */

.collapsible.is-collapsed > *:not(.panel-title) {
  display: none;
}

.collapsible .panel-title h2::after {
  content: " −";
  color: var(--pe-text-dim);
  font-family: var(--pe-font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
}

.collapsible.is-collapsed .panel-title h2::after {
  content: " +";
}

.collapsible.is-collapsed .panel-title {
  padding-bottom: 16px;
}

.detail-shell .collapsible.is-collapsed .panel-title {
  padding-bottom: 14px;
}

/* ---------- Panel internals ---------- */

.panel,
.table-panel {
  padding: 0;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 12px;
}

.panel-title h2,
.panel-title h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--pe-text-primary);
}

.panel-title span {
  color: var(--pe-text-metadata);
  font-family: var(--pe-font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.detail-shell .panel-title {
  padding: 14px 14px 12px;
}

.detail-shell .panel-title h2,
.detail-shell .panel-title h3 {
  font-size: 14px;
  white-space: nowrap;
}

.right-col .panel-title {
  min-height: 44px;
}

.detail-shell .panel-title span {
  white-space: nowrap;
}

.agent-read-card {
  --agent-accent: var(--pe-status-teal);
  cursor: pointer;
}

.agent-read-card::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background-color: var(--agent-accent);
  opacity: 0.85;
  pointer-events: none;
}

.agent-read-toggle {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 13px 14px 0 16px;
  background: transparent;
  color: var(--pe-text-primary);
  text-align: left;
  cursor: pointer;
}

.agent-read-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.agent-read-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background-color: var(--agent-accent);
  box-shadow: 0 0 14px rgba(78, 195, 199, 0.42);
  flex-shrink: 0;
}

.agent-read-title {
  color: var(--pe-text-primary);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.agent-read-chip,
.agent-boundary-list span {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border: 1px solid rgba(78, 195, 199, 0.38);
  border-radius: 6px;
  color: var(--pe-text-secondary);
  background-color: rgba(78, 195, 199, 0.07);
  font-family: var(--pe-font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.agent-read-toggle .agent-read-chip {
  margin-left: 2px;
}

.agent-read-toggle-icon {
  color: var(--agent-accent);
  font-family: var(--pe-font-mono);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  flex-shrink: 0;
}

.agent-read-closed {
  padding: 12px 14px 14px 16px;
}

.agent-read-verdict {
  color: var(--pe-text-primary);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.005em;
}

.agent-read-closed p,
.agent-read-summary,
.agent-read-section p {
  margin: 8px 0 0;
  color: var(--pe-text-secondary);
  font-size: 12px;
  line-height: 1.42;
}

.agent-read-meta {
  margin-top: 9px;
  color: var(--pe-text-metadata);
  font-family: var(--pe-font-mono);
  font-size: 10px;
  line-height: 1.35;
}

.agent-read-expanded {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 180ms ease, opacity 140ms ease;
}

.agent-read-card.is-open .agent-read-expanded {
  max-height: 1800px;
  opacity: 1;
}

.agent-read-card.is-open .agent-read-closed {
  display: none;
}

.agent-read-expanded-inner {
  padding: 12px 14px 14px 16px;
}

.list-agent-read-card .agent-read-expanded-inner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 28px;
  padding: 14px 22px 18px;
}

.list-agent-read-card .agent-read-chip-row,
.list-agent-read-card .agent-read-expanded-inner > .agent-read-verdict,
.list-agent-read-card .agent-read-summary {
  grid-column: 1 / -1;
}

.list-agent-read-card .agent-read-expanded-inner > .agent-read-verdict {
  font-size: 20px;
}

.agent-read-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.agent-read-section {
  position: relative;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--pe-border-subtle);
}

.agent-read-section h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  color: var(--pe-text-metadata);
  font-family: var(--pe-font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
}

.agent-read-section h3::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background-color: var(--agent-accent);
  opacity: 0.85;
}

.agent-read-section ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.agent-read-section li {
  position: relative;
  padding-left: 12px;
  color: var(--pe-text-secondary);
  font-size: 12px;
  line-height: 1.35;
}

.agent-read-section li::before {
  content: "";
  position: absolute;
  top: 0.58em;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background-color: var(--agent-accent);
  opacity: 0.72;
}

.agent-read-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.agent-read-metric {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--pe-border-subtle);
  border-radius: 7px;
  background-color: rgba(255, 255, 255, 0.025);
}

.agent-read-metric strong {
  display: block;
  overflow: hidden;
  color: var(--pe-text-primary);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-read-metric span {
  display: block;
  margin-top: 5px;
  color: var(--pe-text-metadata);
  font-family: var(--pe-font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
}

.agent-read-next {
  padding: 10px;
  border: 1px solid rgba(78, 195, 199, 0.26);
  border-radius: 7px;
  background-color: rgba(78, 195, 199, 0.06);
}

.agent-boundary-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.panel > .chart,
.panel > .empty-state,
.panel > dl,
.table-panel > .table-wrap {
  margin: 0 16px 16px;
}

/* ---------- Charts ---------- */

.chart { width: 100%; }
.route-chart { height: 500px; }
.telemetry-chart { height: 318px; }
.laps-chart { height: 292px; }
.zones-chart { height: 270px; }

.zones-panel {
  height: 176px;
}

.zones-list {
  display: grid;
  gap: 10px;
  margin: 6px 14px 14px;
}

.zone-row {
  display: grid;
  grid-template-columns: 24px 1fr 34px;
  align-items: center;
  gap: 6px;
  min-height: 14px;
}

.zone-label,
.zone-percent {
  color: var(--pe-text-metadata);
  font-family: var(--pe-font-mono);
  font-size: 10px;
  line-height: 1;
}

.zone-percent {
  text-align: right;
}

.zone-track {
  display: block;
  height: 11px;
  border-left: 1px solid var(--pe-border-subtle);
}

.zone-track span {
  display: block;
  width: var(--zone-width);
  max-width: 100%;
  height: 8px;
  margin-top: 1px;
  background-color: var(--zone-color);
  border-radius: 2px;
  opacity: 0.92;
}

/* ---------- Pipeline / provenance strip ---------- */

.pipeline-strip {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(380px, 1fr) auto 58px;
  align-items: center;
  gap: 18px;
  height: 61px;
  min-height: 61px;
  width: auto;
  max-width: none;
  margin-top: auto;
  padding: 0 26px;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 0;
  color: var(--pe-text-metadata);
  line-height: 1;
  white-space: nowrap;
}

.pipeline-strip.without-map-controls {
  grid-template-columns: minmax(380px, 1fr) auto;
}

.pipeline-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.pipeline-flow {
  color: var(--pe-text-secondary);
  font-size: 11px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pipeline-detail {
  overflow: hidden;
  color: var(--pe-text-muted);
  font-size: 11px;
  text-overflow: ellipsis;
}

.pipeline-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}

.pipeline-metric {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  background-color: rgba(255, 255, 255, 0.025);
}

.pipeline-metric span {
  color: var(--pe-text-metadata);
  font-family: var(--pe-font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pipeline-metric strong {
  color: var(--pe-text-primary);
  font-size: 13px;
  font-weight: 650;
}

.pipeline-map-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.pipeline-map-controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 24px;
  border: 1px solid rgba(255, 113, 51, 0.32);
  border-radius: 6px;
  background-color: rgba(255, 113, 51, 0.08);
  color: var(--pe-accent);
  font-family: var(--pe-font-mono);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.pipeline-map-controls button:hover {
  border-color: rgba(255, 113, 51, 0.58);
  background-color: rgba(255, 113, 51, 0.14);
  color: var(--pe-text-on-accent);
}

/* ---------- Definition lists ---------- */

.context-list {
  display: grid;
  gap: 0;
  margin: 0 16px 16px;
  padding: 0;
}

.context-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 10px 0;
  border-bottom: 1px solid var(--pe-border-subtle);
}

.context-row:last-child {
  border-bottom: 0;
}

.context-row dt {
  color: var(--pe-text-metadata);
  font-family: var(--pe-font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.context-row dd {
  margin: 0;
  max-width: 180px;
  overflow-wrap: anywhere;
  text-align: right;
  color: var(--pe-text-primary);
  font-size: 13px;
  font-weight: 500;
}

.context-row dd a {
  color: var(--pe-text-secondary);
  text-decoration: none;
  border-bottom: 1px solid var(--pe-border-strong);
}

/* ---------- Tables ---------- */

.table-panel > .panel-title {
  padding: 16px 20px 12px;
}

.table-wrap {
  max-height: 286px;
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--pe-border-subtle);
  text-align: left;
}

th {
  color: var(--pe-text-metadata);
  font-family: var(--pe-font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background-color: var(--pe-panel-deep);
  position: sticky;
  top: 0;
}

td {
  color: var(--pe-text-secondary);
  font-weight: 400;
}

tr:last-child td {
  border-bottom: 0;
}

/* ---------- Empty / error ---------- */

.empty-state {
  display: grid;
  min-height: 220px;
  place-items: center;
  border: 1px dashed var(--pe-border-strong);
  border-radius: 12px;
  color: var(--pe-text-metadata);
  font-family: var(--pe-font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.error-state {
  max-width: 920px;
  margin: 60px auto;
  padding: 24px;
  border: 1px solid var(--pe-status-red);
  border-radius: var(--pe-radius-panel);
  background-color: var(--pe-panel-raised);
  color: var(--pe-text-primary);
}

.error-state h1 {
  margin: 0 0 12px;
  color: var(--pe-status-red);
  font-size: 18px;
  font-weight: 600;
}

.error-state pre {
  margin: 0;
  color: var(--pe-text-secondary);
  font-family: var(--pe-font-mono);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
}
