#cmi-cost {
  --cmi-surface: #ffffff;
  --cmi-text: #0f172a;
  --cmi-muted: #607d8b;
  --cmi-line: #e4e7ed;
  --cmi-track: #f1f5f9;
  --cmi-primary: #1565c0;
  --cmi-primary-soft: #e3f2fd;
  --cmi-china: #1e88e5;
  --cmi-us: #90a4ae;
  --cmi-mono: "IBM Plex Mono", ui-monospace, monospace;
  --cmi-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#cmi-cost,
#cmi-cost * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

#cmi-cost {
  width: calc(100% - 40px);
  max-width: 1200px;
  margin: 48px auto;
  padding: clamp(28px, 4vw, 48px);
  color: var(--cmi-text);
  background: var(--cmi-surface);
  border: 1px solid var(--cmi-line);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  font-family: var(--cmi-body);
}

#cmi-cost ::selection {
  color: var(--cmi-text);
  background: var(--cmi-primary-soft);
}

#cmi-cost .cmi-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

#cmi-cost .cmi-title {
  color: var(--cmi-text);
  font-family: var(--cmi-body);
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
}

#cmi-cost .cmi-title em {
  display: inline;
  color: var(--cmi-primary);
  font-style: normal;
  font-weight: 700;
  white-space: normal;
}

#cmi-cost .cmi-sub {
  max-width: 62ch;
  margin-top: 10px;
  color: var(--cmi-muted);
  font-size: 14px;
  line-height: 1.55;
}

#cmi-cost .cmi-stamp {
  margin-top: 4px;
  padding: 6px 10px;
  color: var(--cmi-primary);
  background: var(--cmi-primary-soft);
  border: 1px solid #bbdefb;
  border-radius: 4px;
  font-family: var(--cmi-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
  white-space: nowrap;
}

#cmi-cost .cmi-tabs {
  display: flex;
  gap: 4px;
  margin: 30px 0 8px;
  border-bottom: 1px solid var(--cmi-line);
  flex-wrap: wrap;
}

#cmi-cost .cmi-tab {
  margin-bottom: -1px;
  padding: 10px 14px 12px;
  color: var(--cmi-muted);
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  cursor: pointer;
  font-family: var(--cmi-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

#cmi-cost .cmi-tab:hover {
  color: var(--cmi-primary);
  background: #f8fbff;
}

#cmi-cost .cmi-tab[aria-selected="true"] {
  color: var(--cmi-primary);
  border-bottom-color: var(--cmi-primary);
}

#cmi-cost .cmi-tab:focus-visible {
  outline: 2px solid var(--cmi-primary);
  outline-offset: -2px;
}

#cmi-cost #cmi-panel {
  min-height: 353px;
}

#cmi-cost .cmi-proc {
  padding: 24px 0 8px;
}

#cmi-cost .cmi-proc + .cmi-proc {
  border-top: 1px solid var(--cmi-line);
}

#cmi-cost .cmi-proc-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

#cmi-cost .cmi-proc-name {
  color: var(--cmi-text);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0;
}

#cmi-cost .cmi-save {
  color: var(--cmi-primary);
  font-family: var(--cmi-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  white-space: nowrap;
}

#cmi-cost .cmi-save b {
  margin-right: 3px;
  font-family: var(--cmi-body);
  font-size: 19px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0;
}

#cmi-cost .cmi-row {
  display: grid;
  grid-template-columns: 58px 1fr 172px;
  gap: 14px;
  align-items: center;
  margin-bottom: 11px;
}

#cmi-cost .cmi-flag {
  color: var(--cmi-muted);
  font-family: var(--cmi-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
}

#cmi-cost .cmi-track {
  position: relative;
  height: 16px;
  overflow: hidden;
  background: var(--cmi-track);
  border: 1px solid #e2e8f0;
  border-radius: 3px;
}

#cmi-cost .cmi-band {
  position: absolute;
  top: 0;
  width: 0;
  height: 100%;
  border-radius: 2px;
  transition: width 0.9s cubic-bezier(0.22, 0.9, 0.28, 1), left 0.9s cubic-bezier(0.22, 0.9, 0.28, 1);
}

#cmi-cost .cmi-band.cn {
  background: var(--cmi-china);
}

#cmi-cost .cmi-band.us {
  background: var(--cmi-us);
}

#cmi-cost .cmi-range {
  color: var(--cmi-text);
  font-family: var(--cmi-mono);
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

#cmi-cost .cmi-row.us .cmi-range {
  color: var(--cmi-muted);
}

#cmi-cost .cmi-scale {
  display: grid;
  grid-template-columns: 58px 1fr 172px;
  gap: 14px;
  align-items: start;
  margin: 2px 0 10px;
}

#cmi-cost .cmi-ruler {
  position: relative;
  height: 14px;
  border-top: 1px solid #cbd5e1;
}

#cmi-cost .cmi-ruler i {
  position: absolute;
  top: 0;
  width: 1px;
  height: 5px;
  background: #cbd5e1;
}

#cmi-cost .cmi-ruler span {
  position: absolute;
  top: 5px;
  color: var(--cmi-muted);
  font-family: var(--cmi-mono);
  font-size: 9px;
  letter-spacing: 0;
  transform: translateX(-50%);
}

#cmi-cost .cmi-ruler span.z {
  transform: none;
}

#cmi-cost .cmi-ruler span.m {
  transform: translateX(-100%);
}

#cmi-cost .cmi-note {
  grid-column: 2 / 4;
  color: var(--cmi-muted);
  font-size: 11.5px;
  line-height: 1.55;
}

#cmi-cost .cmi-foot {
  margin-top: 20px;
  padding-top: 16px;
  color: var(--cmi-muted);
  border-top: 1px solid var(--cmi-line);
  font-size: 11px;
  line-height: 1.65;
}

#cmi-cost .cmi-foot a {
  color: var(--cmi-primary);
  font-weight: 600;
  text-decoration: none;
}

#cmi-cost .cmi-foot a:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  #cmi-cost {
    width: calc(100% - 32px);
    margin: 36px auto;
    padding: 24px;
    border-radius: 10px;
  }

  #cmi-cost #cmi-panel {
    min-height: 641px;
  }

  #cmi-cost .cmi-row {
    grid-template-columns: 46px 1fr;
    grid-template-rows: auto auto;
  }

  #cmi-cost .cmi-range {
    grid-column: 1 / 3;
    padding-left: 60px;
    font-size: 12px;
    text-align: left;
  }

  #cmi-cost .cmi-scale {
    grid-template-columns: 46px 1fr;
  }

  #cmi-cost .cmi-note {
    grid-column: 1 / 3;
    padding-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  #cmi-cost .cmi-band {
    transition: none;
  }
}
