html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.app-shell {
  grid-template-columns: 248px minmax(0, 1fr);
  width: 100%;
  max-width: 100vw;
}

.content,
.panel,
.model-docs-section,
.performance-chart-card {
  min-width: 0;
}

.content {
  overflow: hidden;
}

.performance-methodology {
  display: grid;
  grid-template-columns: minmax(190px, 0.7fr) minmax(0, 2fr);
  gap: 18px;
  padding: 15px 16px;
  border: 1px solid #d7e5df;
  border-left: 4px solid #0b7a55;
  border-radius: 8px;
  background: #f7fbf8;
}

.performance-methodology > div {
  display: grid;
  align-content: start;
  gap: 5px;
}

.performance-methodology strong {
  color: #17362f;
  font-size: 14px;
}

.performance-methodology span,
.performance-methodology li {
  color: #5a6c65;
  font-size: 12px;
  line-height: 1.55;
}

.performance-methodology ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.performance-methodology b {
  margin-right: 5px;
  color: #087f77;
}

.performance-table th:nth-child(8),
.performance-table td:nth-child(8) {
  display: none;
}

.performance-table {
  min-width: 1020px;
}

.engineering-evidence {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
  padding: 18px;
  border: 1px solid #dce4e9;
  border-radius: 8px;
  background: #ffffff;
}

.engineering-evidence > div {
  display: grid;
  gap: 4px;
}

.engineering-evidence span {
  color: #087f77;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.engineering-evidence strong {
  color: #172026;
  font-size: 16px;
}

.engineering-evidence nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.engineering-evidence a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  color: #31544d;
  border: 1px solid #d6e4df;
  border-radius: 7px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 850;
}

.engineering-evidence a:hover {
  color: #07393f;
  background: #eef9f5;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 10px;
    width: 100%;
    height: auto;
    padding: 12px;
    overflow: hidden;
  }

  .brand-row.compact {
    padding: 0;
  }

  .nav-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-flow: row;
    gap: 5px;
    width: 100%;
    overflow: visible;
  }

  .nav-item {
    min-width: 0;
    min-height: 50px;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    padding: 5px 2px;
    font-size: 11px;
    text-align: center;
    white-space: nowrap;
  }

  .nav-item svg {
    width: 16px;
    height: 16px;
  }

  .model-switcher {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-auto-flow: row;
    gap: 5px;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: visible;
  }

  .model-option {
    min-width: 0;
    min-height: 42px;
    padding: 7px 4px;
    text-align: center;
  }

  .model-option em {
    display: none;
  }

  .content {
    padding: 16px;
  }

  .performance-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .performance-methodology {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .engineering-evidence {
    display: grid;
  }

  .engineering-evidence nav {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .content {
    gap: 14px;
    padding: 12px;
  }

  .topbar h1 {
    font-size: 23px;
    line-height: 1.25;
  }

  .performance-summary-card {
    min-height: 96px;
    padding: 12px;
  }

  .performance-summary-card strong {
    font-size: 21px;
  }

  .performance-methodology ul {
    grid-template-columns: 1fr;
  }

  .performance-chart-card {
    padding: 12px;
  }

  .performance-chart-controls {
    min-width: 0;
  }

  .performance-metric-tabs,
  .performance-period-tabs {
    max-width: 100%;
  }

  .engineering-evidence nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .engineering-evidence a {
    justify-content: center;
    text-align: center;
  }
}
