:root {
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: #172033;
  background: #f6f7f9;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
}

button,
input {
  font: inherit;
}
.app {
  min-height: 100vh;
  background: #f6f7f9;
  color: #172033;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 0 32px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #dde3ec;
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #172033;
  text-decoration: none;
}

.brand:hover,
.brand:focus-visible {
  color: #0b5cad;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  background: #164f86;
  border-radius: 8px;
}

.brand-name,
.brand-subtitle {
  display: block;
}

.brand-name {
  font-size: 18px;
  font-weight: 760;
}

.brand-subtitle {
  color: #68758a;
  font-size: 13px;
}

.source-link,
.back-link {
  color: #0b5cad;
  font-weight: 700;
  text-decoration: none;
}

.source-link:hover,
.back-link:hover {
  text-decoration: underline;
}

.app-main {
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(320px, 560px);
  align-items: end;
  gap: 24px;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 6px;
  color: #607084;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  color: #121a29;
}

h1 {
  font-size: 34px;
  line-height: 1.15;
}

h2 {
  font-size: 18px;
}

.search-field input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  color: #172033;
  background: #ffffff;
  border: 1px solid #c8d2df;
  border-radius: 8px;
  outline: none;
}

.search-field input:focus {
  border-color: #0b5cad;
  box-shadow: 0 0 0 3px rgba(11, 92, 173, 0.16);
}

.summary-grid,
.detail-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.summary-metric {
  min-height: 76px;
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid #dde3ec;
  border-radius: 8px;
}

.summary-metric span,
.table-heading span,
.muted {
  color: #68758a;
}

.summary-metric span {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
}

.summary-metric strong {
  display: block;
  font-size: 26px;
  line-height: 1.1;
}

.summary-metric--muted strong {
  color: #8b5d00;
}

.table-section,
.detail-page,
.not-found {
  background: #ffffff;
  border: 1px solid #dde3ec;
  border-radius: 8px;
}

.table-section {
  overflow: hidden;
}

.table-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid #dde3ec;
}

.table-scroll {
  overflow-x: auto;
}

.model-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
  font-size: 14px;
}

.model-table th,
.model-table td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #e8edf3;
}

.model-table thead th {
  color: #607084;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  background: #f9fafc;
}

.model-table tbody tr:hover {
  background: #f7fbff;
}

.model-table tbody tr:last-child th,
.model-table tbody tr:last-child td {
  border-bottom: 0;
}

.model-table a {
  color: #0b5cad;
  font-weight: 800;
  text-decoration: none;
}

.model-table a:hover {
  text-decoration: underline;
}

.model-id,
.detail-id {
  display: block;
  margin-top: 4px;
  color: #68758a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 280px;
}

.badge,
.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  color: #17405f;
  font-size: 12px;
  font-weight: 750;
  background: #e7f2fb;
  border: 1px solid #c8e0f1;
  border-radius: 999px;
  white-space: nowrap;
}

.badge--muted {
  color: #5b6573;
  background: #eef1f5;
  border-color: #d8dee7;
}

.status-badge {
  color: #14532d;
  background: #e8f7ee;
  border-color: #b8e1c8;
  text-transform: capitalize;
}

.status-badge--deprecated {
  color: #8a1f1f;
  background: #fdebea;
  border-color: #f4c6c3;
}

.status-badge--alpha,
.status-badge--beta,
.status-badge--experimental {
  color: #774a00;
  background: #fff4db;
  border-color: #f4d18b;
}

.status-message {
  padding: 28px;
  text-align: center;
  background: #ffffff;
  border: 1px solid #dde3ec;
  border-radius: 8px;
}

.status-message--error {
  color: #8a1f1f;
  background: #fff7f7;
  border-color: #f4c6c3;
}

.detail-page,
.not-found {
  padding: 28px;
}

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin: 20px 0 24px;
}

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

.detail-section {
  border-top: 1px solid #dde3ec;
  padding-top: 16px;
}

.detail-section h2 {
  margin-bottom: 12px;
}

.detail-section dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.detail-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
}

.detail-row dt {
  color: #68758a;
  font-weight: 700;
}

.detail-row dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.detail-row a {
  color: #0b5cad;
  text-decoration: none;
}

.detail-row a:hover {
  text-decoration: underline;
}

.not-found h1 {
  margin-top: 20px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .app-header {
    min-height: 64px;
    padding: 0 18px;
  }

  .app-main {
    width: min(100% - 28px, 1440px);
    padding-top: 20px;
  }

  .catalog-toolbar,
  .detail-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .source-link {
    display: none;
  }

  h1 {
    font-size: 28px;
  }

  .summary-grid,
  .detail-metrics {
    grid-template-columns: 1fr;
  }

  .detail-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
