.bp-instrument,
.bp-tariff {
  --bp-line-width: var(--bp-hairline-w, 1px);
  padding: clamp(96px, 13vw, 188px) 0;
  color: var(--bp-ink);
  background: var(--bp-surface);
  scroll-margin-top: var(--bp-nav-h, 52px);
}
.bp-instrument {
  --bp-surface: var(--bp-void-bg, #000);
  --bp-panel: var(--bp-void-elevated, #0a0a0c);
  --bp-ink: var(--bp-void-ink-1, #f5f5f7);
  --bp-muted: #a3a3aa;
  --bp-line: rgba(255, 255, 255, .16);
  --bp-switch-edge: #303035;
  --bp-switch-fill: #16161a;
  --bp-switch-selected: #e5e5e8;
  --bp-switch-ink: #141416;
}
.bp-tariff {
  --bp-surface: var(--bp-paper-bg, #fff);
  --bp-ink: var(--bp-paper-ink-1, #0b0b0d);
  --bp-muted: var(--bp-paper-ink-2, #52525b);
  --bp-line: rgba(0, 0, 0, .2);
  --bp-switch-edge: #d8d8db;
  --bp-switch-fill: #f5f5f7;
  --bp-switch-selected: #0b0b0d;
  --bp-switch-ink: #fff;
}
.bp-instrument-wrap {
  width: min(var(--bp-max-stage, 1120px), calc(100% - 64px));
  margin-inline: auto;
}
.bp-section-intro > h2 {
  margin: 0;
  font: 600 clamp(29px, 4vw, 49px)/1.14 var(--bp-font-display, sans-serif);
  letter-spacing: -.038em;
}
.bp-section-intro > p {
  margin: 16px 0 0;
  color: var(--bp-muted);
  font-size: 15px;
  line-height: 1.65;
}
.bp-device {
  position: relative;
  margin-top: 45px;
  border: var(--bp-line-width) solid var(--bp-line);
  border-radius: var(--bp-radius-hardware, 14px);
  background: var(--bp-panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 42px 90px rgba(0, 0, 0, .4);
}
.bp-device-dials {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  padding: 16px 22px;
  border-bottom: var(--bp-line-width) solid var(--bp-line);
}
.bp-device-dials > :first-child { margin-inline-end: auto; }
.bp-choice {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 2px;
  width: max-content;
  min-width: 0;
  margin: 0;
  padding: 3px;
  border: var(--bp-line-width) solid var(--bp-switch-edge);
  border-radius: 99px;
  background: var(--bp-switch-fill);
}
.bp-choice label { position: relative; white-space: nowrap; }
.bp-choice input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  inset: 50%;
  opacity: 0;
}
.bp-choice label span {
  display: block;
  padding: 7px 11px;
  border-radius: 99px;
  color: var(--bp-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 17px;
  cursor: pointer;
  user-select: none;
  transition: background-color 280ms cubic-bezier(.22, 1, .36, 1), color 180ms;
}
.bp-choice label:hover span { color: var(--bp-ink); }
.bp-choice input:checked + span { color: var(--bp-switch-ink); background: var(--bp-switch-selected); }
.bp-choice input:focus-visible + span { outline: 2px solid var(--bp-ink); outline-offset: 2px; }
.bp-choice input:disabled + span { opacity: .45; cursor: default; }
.bp-instrument [hidden],
.bp-tariff [hidden] { display: none; }
.bp-device-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.15fr) minmax(0, 1fr);
}
.bp-device-code { min-width: 0; padding: 24px 30px 22px; }
.bp-code-header {
  display: flex;
  min-height: 28px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--bp-muted);
  font: 12px/1.4 var(--bp-font-mono, monospace);
}
.bp-plain-button {
  padding: 3px 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.bp-plain-button:hover { color: var(--bp-ink); }
.bp-plain-button:disabled { opacity: .5; cursor: default; }
.bp-copy.is-copied { color: #178451; }
.bp-instrument .bp-copy.is-copied { color: #68d6a3; }
.bp-copy.is-copied span { color: transparent; position: relative; }
.bp-copy.is-copied span::after {
  position: absolute;
  inset: 0;
  color: var(--bp-copy-ack, #178451);
  content: '已复制';
  white-space: nowrap;
}
.bp-instrument .bp-copy { --bp-copy-ack: #68d6a3; }
.bp-device-code pre {
  min-height: 174px;
  margin: 13px 0 16px;
  overflow: auto;
  padding: 21px 16px;
  border: var(--bp-line-width) solid rgba(255, 255, 255, .085);
  border-radius: 8px;
  background: #060608;
  color: var(--bp-code-base, #e4e4e7);
  font: clamp(11px, 1.2vw, 13px)/1.8 var(--bp-font-mono, monospace);
  tab-size: 2;
  scrollbar-width: thin;
}
.bp-device-code pre code {
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
}
.bp-code-key { color: var(--bp-code-key, #a3b8d8); }
.bp-code-value { color: var(--bp-code-str, #e8a88a); }
.bp-code-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  color: var(--bp-muted);
  font-size: 12px;
  line-height: 1.55;
}
.bp-code-footer p { margin: 0; }
.bp-code-footer a,
.bp-instrument-link { color: var(--bp-ink); white-space: nowrap; text-decoration: none; }
.bp-code-footer a:hover,
.bp-instrument-link:hover { text-decoration: underline; }
.bp-meter {
  min-width: 0;
  padding: 24px 28px;
  border-inline-start: var(--bp-line-width) solid var(--bp-line);
}
.bp-meter h3 { margin: 3px 0 7px; font-size: 15px; font-weight: 600; }
.bp-meter p {
  margin: 0;
  color: var(--bp-muted);
  font-size: 12px;
  line-height: 1.65;
}
.bp-meter [data-bp-meter-meta] {
  min-height: 20px;
  font-family: var(--bp-font-mono, monospace);
  font-size: 11px;
}
.bp-meter-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 25px;
  font-size: 12px;
}
.bp-meter-label output,
.bp-range-ends,
.bp-meter-cost > output { font-family: var(--bp-font-mono, monospace); font-variant-numeric: tabular-nums; }
.bp-meter-range {
  --bp-range-p: 10.5%;
  appearance: none;
  display: block;
  width: 100%;
  height: 24px;
  margin: 5px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.bp-meter-range::-webkit-slider-runnable-track {
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #d6d6db var(--bp-range-p), #303035 var(--bp-range-p));
}
.bp-meter-range::-webkit-slider-thumb {
  appearance: none;
  width: 11px;
  height: 11px;
  margin-top: -4.5px;
  border: 1px solid #fff;
  border-radius: 50%;
  background: #f5f5f7;
}
.bp-meter-range::-moz-range-track { height: 2px; background: #303035; }
.bp-meter-range::-moz-range-progress { height: 2px; background: #d6d6db; }
.bp-meter-range::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border: 1px solid #fff;
  border-radius: 50%;
  background: #f5f5f7;
}
.bp-range-ends {
  display: flex;
  justify-content: space-between;
  color: var(--bp-muted);
  font-size: 10px;
}
.bp-meter-check {
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  margin-top: 16px;
  font-size: 12px;
  cursor: pointer;
}
.bp-meter-check input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #dddde2;
}
.bp-meter-cost { margin: 20px 0 10px; }
.bp-meter-cost > output {
  display: block;
  color: var(--bp-ink);
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -.065em;
}
.bp-meter-cost p { min-height: 20px; margin-top: 6px; }
.bp-meter .bp-meter-basis { font-size: 11px; }
.bp-instrument-link { display: inline-block; margin-top: 24px; font-size: 13px; }
.bp-tariff-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}
.bp-tariff-head > .bp-choice { margin-top: 7px; }
.bp-tariff-head .bp-choice label span { padding-inline: 16px; }
.bp-tariff-description {
  margin: 34px 0 12px;
  color: var(--bp-muted);
  font-size: 13px;
}
.bp-rates { border-top: var(--bp-line-width) solid var(--bp-line); }
.bp-tariff-row {
  display: grid;
  grid-template-columns: 34px minmax(180px, 1.5fr) minmax(112px, 1fr) minmax(72px, .7fr) minmax(90px, .8fr) max-content;
  align-items: center;
  gap: 14px;
  min-height: 126px;
  padding: 23px 0;
  border-bottom: var(--bp-line-width) solid var(--bp-line);
}
.bp-rate-number {
  align-self: start;
  padding-top: 5px;
  color: var(--bp-muted);
  font: 11px/1 var(--bp-font-mono, monospace);
  font-variant-numeric: tabular-nums;
}
.bp-rate-model { min-width: 0; }
.bp-rate-model h3 {
  margin: 0 0 9px;
  font-size: clamp(25px, 3.4vw, 37px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.055em;
}
.bp-rate-id { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 9px; }
.bp-rate-id code,
.bp-rate-id button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--bp-muted);
  font-size: 11px;
  line-height: 1.4;
}
.bp-rate-id code { overflow-wrap: anywhere; }
.bp-rate-id button { text-decoration: underline; text-underline-offset: 3px; }
.bp-rate-large {
  white-space: nowrap;
  color: var(--bp-ink);
  font-size: clamp(34px, 5vw, 64px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.07em;
}
.bp-rate-large .bp-price-symbol,
.bp-rate-large .bp-price-fraction { font-size: .58em; letter-spacing: -.04em; }
.bp-rate-input,
.bp-rate-detail { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; }
.bp-rate-input > :last-child,
.bp-rate-detail > :first-child { color: var(--bp-muted); font-size: 11px; }
.bp-rate-detail > :nth-child(2) { font-size: 16px; font-weight: 600; white-space: nowrap; }
.bp-rate-detail > :nth-child(2),
.bp-rate-large { font-variant-numeric: tabular-nums; }
.bp-tariff [data-bp-exact] { position: relative; }
.bp-tariff [data-bp-exact]::after {
  position: absolute;
  z-index: 3;
  left: 0;
  bottom: calc(100% + 6px);
  padding: 8px 10px;
  border-radius: 5px;
  background: #111113;
  color: #f5f5f7;
  font: 500 11px/1.4 var(--bp-font-text, sans-serif);
  letter-spacing: 0;
  white-space: nowrap;
  content: attr(data-bp-exact);
  opacity: 0;
  pointer-events: none;
}
.bp-tariff [data-bp-exact]:is(:focus-visible, :hover)::after { opacity: 1; }
.bp-rate-savings { color: #197150; font-family: var(--bp-font-mono, monospace); font-size: 10px; }
.bp-rate-savings:empty { display: none; }
.bp-rate-config,
.bp-tariff-index > a {
  color: var(--bp-ink);
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.bp-rate-config:hover,
.bp-tariff-index > a:hover { text-decoration: underline; text-underline-offset: 4px; }
.bp-rate-config[aria-disabled="true"] { color: var(--bp-muted); pointer-events: none; }
.bp-tariff-source { min-height: 18px; margin: 12px 0; color: var(--bp-muted); font-size: 11px; }
.bp-tariff-index {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 21px;
}
.bp-tariff-index ul { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 0; list-style: none; }
.bp-tariff-index ul a { color: var(--bp-muted); font-size: 12px; text-decoration: none; }
.bp-tariff-index ul a:hover { color: var(--bp-ink); text-decoration: underline; }

@media (max-width: 840px) {
  .bp-instrument-wrap { width: min(var(--bp-max-stage, 1120px), calc(100% - 40px)); }
  .bp-device-code { padding-inline: 20px; }
  .bp-meter { padding-inline: 20px; }
  .bp-tariff-row { grid-template-columns: 22px minmax(146px, 1.5fr) minmax(98px, 1fr) minmax(54px, .7fr) minmax(65px, .75fr) max-content; gap: 8px; }
}
@media (max-width: 650px) {
  .bp-instrument,
  .bp-tariff { padding: 80px 0; }
  .bp-instrument-wrap { width: calc(100% - 36px); }
  .bp-device { margin-top: 29px; }
  .bp-device-dials {
    display: grid;
    justify-items: start;
    gap: 10px;
    padding: 12px;
  }
  .bp-device-dials > :first-child {
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    margin-inline-end: 0;
  }
  .bp-device-grid { grid-template-columns: minmax(0, 1fr); }
  .bp-device-code { padding: 12px 12px 16px; }
  .bp-device-code pre {
    min-height: 140px;
    overscroll-behavior-inline: contain;
    background: linear-gradient(90deg, #060608 90%, #0d0d10);
    padding-inline: 12px;
  }
  .bp-meter {
    padding: 18px 16px;
    border-inline-start: 0;
    border-top: var(--bp-line-width) solid var(--bp-line);
  }
  .bp-tariff-head { display: contents; }
  .bp-tariff-head > .bp-choice {
    position: sticky;
    z-index: 2;
    top: calc(var(--bp-nav-h, 52px) + 6px);
    margin-top: 18px;
    backdrop-filter: blur(12px);
  }
  .bp-tariff-description { margin-top: 17px; }
  .bp-tariff-row {
    grid-template-columns: minmax(65px, 1fr) minmax(75px, 1fr) max-content;
    align-items: start;
    padding: 22px 0 20px;
    row-gap: 15px;
  }
  .bp-rate-number { display: none; }
  .bp-rate-model { grid-column: 1 / 3; }
  .bp-rate-input { grid-column: 3; grid-row: 1; align-items: flex-end; }
  .bp-rate-input [data-bp-exact]::after { left: auto; right: 0; }
  .bp-rate-config { align-self: center; justify-self: end; }
  .bp-rate-large { font-size: clamp(35px, 9vw, 52px); }
}
@media (max-width: 389px) {
  .bp-choice label span { padding-inline: 8px; }
  .bp-rate-model h3 { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .bp-choice label span { transition: none; }
}
