[hidden] {
  display: none !important;
}

main {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
  align-items: start;
  transition: grid-template-columns 0.2s ease;
}

/* Structural map mode — widen sidebar so analysis tables fit */
body.structural-mode main {
  grid-template-columns: min(480px, 44vw) 1fr;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-y: auto;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 8px;
  padding: 12px;
}

.panel-header {
  margin-bottom: 12px;
}

.panel-title {
  font-size: 16px;
  font-weight: 600;
}

.panel-sub {
  font-size: 12px;
  opacity: .75;
}

.panel-section {
  margin-bottom: 12px;
}

.panel-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 10px;
}

.panel-card-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.panel-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0;
}

.panel-row-label {
  opacity: .8;
}

.panel-row-value {
  font-weight: 500;
}

.panel-muted {
  opacity: .6;
}