.bandwidth-tool { max-width: 1120px; padding-block: clamp(32px, 5vw, 72px) 80px; }
.bw-intro { margin-bottom: 32px; }
.bw-intro h1 { max-width: 860px; margin: 0 0 12px; color: #14213d; font-size: clamp(34px, 4.6vw, 57px); }
.bw-term { white-space: nowrap; }
.bw-intro p { max-width: 750px; margin: 0; color: #44536c; font-size: clamp(15px, 1.4vw, 18px); }
.bw-workspace { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; gap: 22px; }
.bw-settings, .bw-estimate { min-width: 0; padding: clamp(20px, 3vw, 34px); border: 1px solid #d3dbed; border-radius: 18px; }
.bw-settings h2, .bw-estimate h2 { margin: 0 0 6px; color: #1b2847; font-size: clamp(22px, 2vw, 28px); }
.bw-settings .bw-hint { margin: 0; color: #526078; font-size: 14px; line-height: 1.65; }
.bw-group { min-width: 0; margin: 22px 0 0; padding: 12px 16px 17px; border: 1px solid #d9e0ee; border-radius: 10px; }
.bw-group legend { padding: 0 6px; color: #273964; font-size: 15px; font-weight: 650; }
.bw-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.bw-field { display: flex; min-width: 0; flex-direction: column; gap: 6px; color: #293551; font-size: 14px; font-weight: 600; line-height: 1.5; }
.bw-field small { color: #526078; font-size: .9em; white-space: nowrap; }
.bw-field input { width: 100%; min-width: 0; min-height: 44px; padding: 8px 10px; border: 1px solid #aebbd7; border-radius: 7px; background: #fff; color: #192643; font: inherit; font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; }
.bw-field input[aria-invalid="true"] { border-color: #a53235; }
.bw-secondary, .bw-quiet { min-height: 44px; font: inherit; font-size: 14px; font-weight: 600; }
.bw-secondary { margin-top: 14px; padding: 6px 12px; border: 1px solid #bcc8e4; border-radius: 8px; background: #f5f7ff; color: #2b4087; }
.bw-secondary:hover { background: #e9edfc; }
.bw-quiet { padding: 4px 2px; border: 0; background: transparent; color: #405386; text-decoration: underline; text-underline-offset: 3px; }
.bw-group .bw-quiet { margin-top: 6px; }
.bw-group .bw-quiet:disabled { display: none; }
.bw-secondary:disabled { cursor: default; opacity: .55; }
.bw-reserve { display: grid; grid-template-columns: minmax(100px, .7fr) minmax(0, 1.7fr); align-items: end; gap: 18px; margin-top: 24px; padding-top: 19px; border-top: 1px solid #e0e5ee; }
.bw-reserve .bw-hint { padding-bottom: 5px; }
.bw-form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 14px; }
.bw-mobile-result { display: none; }
.bw-settings .bw-error { margin: 14px 0 0; color: #922f31; font-size: 14px; }
.bw-error:empty, .bw-share-status:empty { margin: 0; }
.bw-estimate { background: #f2f5ff; border-color: #c9d5ef; }
.bw-estimate .bw-total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 9px; margin: 10px 0 21px; color: #273f99; line-height: 1.12; }
.bw-total strong { max-width: 100%; overflow-wrap: anywhere; font-size: clamp(32px, 4.4vw, 58px); font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.045em; }
.bw-total > span { font-size: 17px; font-weight: 600; }
.bw-breakdown { margin: 0; color: #253554; font-size: 14px; }
.bw-breakdown > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 14px; padding: 9px 0; border-top: 1px solid #d6deef; }
.bw-breakdown dt { color: #485673; }
.bw-breakdown dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; }
.bw-sharing { margin-top: 18px; }
.bw-sharing .button { min-height: 44px; }
.bw-sharing .bw-share-status, .bw-static { margin: 12px 0 0; color: #404e6c; font-size: 14px; }
.bw-sharing .bw-field { margin-top: 12px; }
.bw-guide { max-width: 850px; margin-top: clamp(40px, 5vw, 68px); }
.bw-guide h2 { margin-bottom: 14px; color: #1b2847; font-size: clamp(26px, 3vw, 36px); }
.bw-guide h3 { margin: 30px 0 8px; color: #27334f; font-size: 21px; }
.bw-guide p { margin-bottom: 14px; color: #46546d; }
.bw-formulas { margin: 18px 0; padding: 16px 20px; border-left: 3px solid #6576c5; background: #f3f6fb; }
.bw-formulas p { margin: 0; color: #253554; }
.bw-formulas p + p { margin-top: 8px; }

@media (max-width: 820px) {
  .bw-workspace { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .bw-form-actions { justify-content: space-between; }
  .bw-mobile-result { display: inline-flex; align-items: center; min-height: 44px; color: #344998; font-size: 14px; font-weight: 600; }
}
@media (max-width: 540px) {
  .bandwidth-tool { width: calc(100% - 32px); }
  .bw-intro { margin-bottom: 20px; }
  .bw-settings, .bw-estimate { padding: 17px; }
  .bw-group { padding: 8px 12px 14px; }
  .bw-fields { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .bw-fields .bw-field { flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; }
  .bw-fields .bw-field input { width: 34%; flex-shrink: 0; }
  .bw-reserve { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .bw-reserve input { max-width: 140px; }
  .bw-formulas { padding: 13px 15px; }
}
@media (scripting: none) {
  .bw-settings, .bw-sharing { display: none; }
  .bw-workspace { grid-template-columns: minmax(0, 650px); }
}
