.amd-filter-grid {
  grid-template-columns: repeat(auto-fit, minmax(142px, 1fr));
}

.amd-listing, .amd-view-options, .amd-family-choices {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.amd-listing {
  justify-content: space-between;
  padding: 12px 0 10px;
}

.amd-listing .amd-summary { padding: 0; }
.amd-view-options[hidden], .amd-family-choices[hidden] { display: none; }
.amd-view-options button, .amd-family-choices button {
  padding: 6px 10px;
  border: 1px solid var(--amd-border);
  font-size: 12px;
}

.amd-view-options button[aria-pressed="true"],
.amd-family-choices button[aria-pressed="true"] {
  color: #f3efff;
  background: #373358;
  border-color: #8379cc;
}

.amd-family-list { display: grid; gap: 10px; }
.amd-family {
  min-width: 0;
  border: 1px solid var(--amd-border);
  border-radius: 10px;
  background: #181f2b;
}

.amd-family[open] { border-color: #64618e; }
.amd-family-summary {
  display: grid;
  grid-template-columns: minmax(144px, 1.1fr) minmax(215px, 1.6fr) minmax(156px, 1fr) 14px;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 13px 16px;
  cursor: pointer;
  list-style: none;
}

.amd-family-summary::-webkit-details-marker { display: none; }
.amd-family-summary:hover { background: #202839; border-radius: inherit; }
.amd-family-summary:focus-visible { outline: 2px solid #a095f4; outline-offset: -2px; }
.amd-family-name, .amd-family-specs, .amd-family-status { display: grid; gap: 5px; min-width: 0; }
.amd-family-name strong { font-size: 15px; color: #edf3fc; overflow-wrap: anywhere; }
.amd-family-name small, .amd-family-status, .amd-family-tags small { font-size: 11px; color: #aebdd1; }
.amd-family-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.amd-family-tags span { font-size: 11px; line-height: 1.35; }
.amd-resolution, .amd-billing { border: 1px solid #3b4961; border-radius: 4px; padding: 2px 6px; }
.amd-resolution { color: #c5d9fc; background: #25334a; }
.amd-billing--per_request {
  --billing-text: #ffe0a5;
  --billing-surface: #352b20;
  --billing-border: #675438;
  --billing-accent: #e7b566;
}
.amd-billing--per_second {
  --billing-text: #9fe8df;
  --billing-surface: #173431;
  --billing-border: #365d58;
  --billing-accent: #64c8ba;
}
.amd-billing--per_token {
  --billing-text: #dfd0ff;
  --billing-surface: #302840;
  --billing-border: #4f446b;
  --billing-accent: #aa91ef;
}
.amd-billing {
  color: var(--billing-text);
  background: var(--billing-surface);
  border-color: var(--billing-border);
}
.amd-price .amd-billing {
  align-self: flex-start;
  font-size: 11px;
  line-height: 1.3;
  white-space: nowrap;
}
.amd-billing-groups { display: grid; gap: 14px; min-width: 0; }
.amd-billing-section {
  min-width: 0;
  border: 1px solid var(--billing-border);
  border-radius: 8px;
}
.amd-billing-section-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 12px;
  border-inline-start: 3px solid var(--billing-accent);
  border-radius: 7px 7px 0 0;
  color: var(--billing-text);
  background: var(--billing-surface);
}
.amd-billing-section-header h4 { margin: 0; font-size: 13px; }
.amd-billing-section-header span { font-size: 11px; }
.amd-results .amd-billing-section > .table-wrap { border-radius: 0 0 7px 7px; }
.amd-results .amd-model-table > table { min-width: 1030px; }
.amd-results .amd-model-table > table > thead th:nth-child(1) { width: 18%; }
.amd-results .amd-model-table > table > thead th:nth-child(2) { width: 11%; }
.amd-results .amd-model-table > table > thead th:nth-child(3) { width: 19%; }
.amd-results .amd-model-table > table > thead th:nth-child(4) { width: 10%; }
.amd-results .amd-model-table > table > thead th:nth-child(5) { width: 12%; }
.amd-results .amd-model-table > table > thead th:nth-child(6) { width: 13%; }
.amd-results .amd-model-table > table > thead th:nth-child(7) { width: 7%; }
.amd-results .amd-model-table > table > thead th:nth-child(8) { width: 108px; }
.amd-model-table th small, .amd-model-time small {
  display: block;
  margin-top: 4px;
  color: #aebdd1;
  font-size: 10px;
  font-weight: 400;
}
.amd-model-time { font-variant-numeric: tabular-nums; }
.amd-model-time strong { color: #e9f1fc; font-size: 13px; }
.amd-family-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid #aebdd1;
  border-bottom: 2px solid #aebdd1;
  transform: rotate(45deg);
}

.amd-family[open] > summary .amd-family-chevron { transform: rotate(225deg); }
.amd-family-content { min-width: 0; padding: 10px; border-top: 1px solid var(--amd-border); }
.amd-family-choices { margin-bottom: 10px; }
.amd-results tr.amd-family-row > td { padding: 6px 8px; }

@media (max-width: 850px) {
  .amd-family-list .amd-family-summary {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px 10px;
  }
  .amd-family-list .amd-family-name { grid-area: 1 / 1; }
  .amd-family-list .amd-family-chevron { grid-area: 1 / 2; }
  .amd-family-list .amd-family-specs, .amd-family-list .amd-family-status { grid-column: 1 / -1; }
}
