.ms-root {
  --ms-muted: #465b77;
  --ms-soft: #f6f9fe;
  --ms-active: #e7f0ff;
  --ms-green: #087655;
  min-width: 0;
  font-size: 14px;
}

.ms-toolbar, .ms-card, .ms-section {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.ms-toolbar { padding: 16px; background: linear-gradient(145deg, #fff 58%, #edf4ff); box-shadow: 0 4px 16px #192e5910; }
.ms-search { width: 100%; min-height: 44px; padding-inline: 14px; background: #fff; }
.ms-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ms-toolbar > .ms-tools { margin-top: 12px; }
.ms-options { justify-content: space-between; border-top: 1px solid var(--line); padding-top: 11px; }
.ms-options > .ms-tools:last-child, .ms-count { margin-inline-start: auto; }
.ms-count, .ms-muted { color: var(--ms-muted); }
.ms-count { font-size: 13px; white-space: nowrap; }
.ms-segment { display: flex; flex-wrap: wrap; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: var(--ms-soft); }
.ms-segment button, .ms-detail-tabs button { border-color: transparent; background: transparent; color: var(--ms-muted); white-space: nowrap; }
.ms-segment button { padding: 5px 10px; font-size: 13px; }
.ms-segment button[aria-pressed="true"], .ms-detail-tabs button[aria-pressed="true"], .ms-resolution button[aria-pressed="true"] {
  background: var(--ms-active);
  color: #164eb9;
  font-weight: 700;
}
.ms-segment button:hover, .ms-detail-tabs button:hover, .ms-resolution button:hover { color: var(--blue); }
.ms-tools select { font-size: 13px; }
.ms-empty { margin: 16px 0; padding: 18px; border: 1px dashed var(--line); border-radius: 10px; color: var(--ms-muted); }
.ms-empty button { margin-inline-start: 8px; }

.ms-results { margin-top: 16px; }
.ms-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.ms-card { display: flex; min-width: 0; flex-direction: column; gap: 12px; padding: 16px; }
.ms-card:hover, .ms-card:focus-within { border-color: #b9cdef; box-shadow: 0 4px 14px #192e590d; }
.ms-identity { display: grid; align-items: center; grid-template-columns: auto minmax(0, 1fr) 32px; gap: 10px; min-width: 0; }
.ms-identity .ms-model-name { display: block; margin: 0; font-size: 16px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.ms-model-kind { display: block; margin-top: 4px; color: var(--ms-muted); font-size: 12px; }
.ms-symbol { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 11px; background: #e5eeff; color: #2058cf; }
.ms-symbol i { display: block; position: relative; width: 17px; height: 15px; border: 1.4px solid currentColor; border-radius: 3px; }
.ms-video i::after { content: ''; position: absolute; top: 3px; left: 5px; border: 3.5px solid transparent; border-left: 5px solid currentColor; }
.ms-image { background: #e0f4f1; color: #08796f; }
.ms-image i { overflow: hidden; }
.ms-image i::before { content: ''; position: absolute; left: 2px; top: 7px; width: 12px; height: 12px; border: 1.4px solid currentColor; transform: rotate(45deg); }
.ms-image i::after { content: ''; position: absolute; top: 2px; right: 3px; width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.ms-text { background: #eee9ff; color: #6541b5; }
.ms-text i { width: 14px; height: 17px; }
.ms-text i::after { content: ''; position: absolute; inset: 4px 2px auto; height: 1px; background: currentColor; box-shadow: 0 3px currentColor, 0 6px currentColor; }
.ms-copy, .ms-close { flex: none; width: 32px; height: 32px; padding: 0; font-size: 20px; line-height: 1; }
.ms-copy { position: relative; }
.ms-copy::before, .ms-copy::after { content: ''; position: absolute; width: 10px; height: 10px; top: 9px; left: 9px; border: 1px solid currentColor; border-radius: 2px; }
.ms-copy::after { transform: translate(4px, 4px); background: #fff; }
.ms-copy:hover, .ms-close:hover { background: var(--ms-active); }
.ms-specifications { display: grid; gap: 5px; }
.ms-resolution { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.ms-resolution button { padding: 3px 7px; font-size: 11px; }
.ms-capabilities, .ms-reference-rate, .ms-rate-unit { margin: 0; color: var(--ms-muted); font-size: 12px; }
.ms-card .ms-price-slot { flex: 1; display: flex; align-items: flex-end; }
.ms-card-price { width: 100%; font-variant-numeric: tabular-nums; }
.ms-rate { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 7px; }
.ms-rate strong { font-size: 28px; letter-spacing: -.035em; line-height: 1.15; }
.ms-reference-rate { margin-top: 4px; }
.ms-prices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px 14px; margin: 5px 0 0; font-size: 12px; }
.ms-prices div { display: flex; justify-content: space-between; align-items: baseline; gap: 5px; }
.ms-prices dt { color: var(--ms-muted); }
.ms-prices dd { margin: 0; text-align: right; overflow-wrap: anywhere; font-weight: 650; }
.ms-card-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 41px; padding-top: 9px; border-top: 1px solid var(--line); }
.ms-performance { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; min-width: 0; }
.ms-performance:empty { display: none; }
.ms-metric-label { display: block; color: var(--ms-muted); font-size: 11px; }
.ms-hourly { display: grid; gap: 4px; min-width: 95px; }
.ms-status-strip { display: grid; grid-template-columns: repeat(24, 1fr); gap: 1px; height: 12px; }
.ms-status-cell { border-radius: 1px; background: #dce5f1; }
.ms-status-cell[data-state="success"] { background: #08a475; }
.ms-status-cell[data-state="mixed"] { background: #cf8519; }
.ms-status-cell[data-state="failed"] { background: #dd5260; }
.ms-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; font-variant-numeric: tabular-nums; }
.ms-metrics span { display: block; color: var(--ms-muted); font-size: 12px; }
.ms-metrics strong { display: block; margin-top: 3px; }
.ms-metrics .ms-success strong { color: var(--ms-green); }
.ms-performance .ms-metrics { grid-auto-flow: column; grid-template-columns: none; gap: 10px; }
.ms-performance .ms-metrics span { font-size: 11px; }
.ms-performance .ms-metrics strong { font-size: 13px; }
.ms-detail-button { padding: 5px 7px; border-color: transparent; background: transparent; color: var(--blue); white-space: nowrap; margin-inline-start: auto; font-weight: 650; font-size: 13px; }
.ms-detail-button:hover { background: var(--ms-active); }
.ms-list { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.ms-list:focus-visible { outline-offset: -2px; }
.ms-list table { min-width: 850px; table-layout: fixed; }
.ms-list th { background: #eaf1fc; font-size: 12px; }
.ms-list td { padding-block: 11px; vertical-align: middle; }
.ms-list tbody tr:nth-child(even) { background: #f8fafd; }
.ms-list tbody tr:hover { background: #eff5ff; }
.ms-list th:nth-child(1) { width: 25%; }
.ms-list th:nth-child(2), .ms-list th:nth-child(4) { width: 22%; }
.ms-list th:nth-child(3) { width: 22%; }
.ms-list th:last-child, .ms-list td:last-child { text-align: right; }
.ms-list .ms-symbol { width: 32px; height: 32px; border-radius: 8px; }
.ms-list .ms-model-name { font-size: 14px; }
.ms-list .ms-rate strong { font-size: 19px; }
.ms-list .ms-performance > .ms-muted { font-size: 12px; }

.ms-drawer {
  --ms-muted: #465b77;
  --ms-soft: #f6f9fe;
  --ms-active: #e7f0ff;
  --ms-green: #087655;
  position: fixed;
  inset: 0 0 0 auto;
  width: min(970px, 100vw);
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--line);
  color: inherit;
  background: #f4f7fc;
  box-shadow: -10px 0 35px #16274126;
  font-size: 14px;
}
.ms-drawer[open] { display: flex; flex-direction: column; }
.ms-drawer::backdrop { background: #16274166; }
.ms-drawer-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex: none; padding: 19px clamp(15px, 3vw, 30px); border-bottom: 1px solid var(--line); background: #fff; }
.ms-drawer-header .ms-identity { grid-template-columns: auto minmax(0, max-content) 32px; }
.ms-drawer-header .ms-model-name { font-size: clamp(16px, 2.7vw, 22px); }
.ms-drawer-header .ms-model-kind { display: none; }
.ms-drawer-body { min-height: 0; overflow-y: auto; padding: 16px clamp(15px, 3vw, 30px) 28px; }
.ms-detail-meta { margin: 0 0 13px; color: var(--ms-muted); }
.ms-detail-tabs { display: flex; gap: 5px; padding: 4px; margin: 0 0 14px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.ms-detail-tabs button { flex: 1; }
.ms-drawer-body > .ms-metrics > div { padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.ms-drawer-body > .ms-metrics strong { font-size: 19px; }
.ms-section { margin-top: 15px; padding: 15px; }
.ms-section h3 { margin: 0 0 12px; font-size: 16px; }
.ms-section th, .ms-section td { padding: 9px 10px; }
.ms-chart canvas { display: block; width: 100%; height: auto; }
.ms-chart summary { width: fit-content; color: var(--blue); cursor: pointer; }
.ms-chart details table { margin-top: 8px; }
.ms-readout { margin: 0 0 7px; color: var(--ms-muted); text-align: center; font-variant-numeric: tabular-nums; }

@media (max-width: 1300px) { .ms-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .ms-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) {
  .ms-options > .ms-tools:last-child { margin-inline-start: 0; }
  .ms-section { padding: 10px; }
  .ms-section th, .ms-section td { padding: 7px 5px; font-size: 12px; }
}
