.vols-calculator {
  color: #0a1726;
  color-scheme: light;
}

.vols-calculator__tabs {
  display: flex;
  gap: 4px;
  width: fit-content;
  margin-bottom: 28px;
  padding: 4px;
  border: 1px solid #cbd6e1;
  border-radius: 10px;
  background: #e8eef4;
}

.vols-calculator__tab {
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 7px;
  color: #405367;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.vols-calculator__tab[aria-selected="true"] {
  color: #fff;
  background: #0a5fc1;
}

.vols-calculator__tab:focus-visible,
.vols-form input:focus-visible,
.vols-form select:focus-visible,
.vols-form button:focus-visible,
.vols-rates summary:focus-visible {
  outline: 3px solid rgba(20, 120, 212, .25);
  outline-offset: 2px;
}

.vols-calculator__panel[hidden] {
  display: none;
}

.vols-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, .65fr);
  gap: 28px;
  align-items: start;
}

.vols-form,
.vols-result {
  border: 1px solid #cbd6e1;
  border-radius: 12px;
  background: #fff;
}

.vols-form {
  overflow: hidden;
}

.vols-form__section {
  margin: 0;
  padding: 28px;
  border: 0;
  border-bottom: 1px solid #d7e0ea;
}

.vols-form__section:last-child {
  border-bottom: 0;
}

.vols-form__section legend {
  width: 100%;
  margin-bottom: 18px;
  padding: 0;
  color: #0a1726;
  font-size: 17px;
  font-weight: 800;
}

.vols-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.vols-form__grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.vols-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.vols-field--wide {
  grid-column: 1 / -1;
}

.vols-field label {
  color: #30465c;
  font-size: 13px;
  font-weight: 700;
}

.vols-field input,
.vols-field select {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid #aebdcb;
  border-radius: 7px;
  color: #0a1726;
  background: #fff;
  font: inherit;
  font-size: 15px;
}

.vols-field input:invalid {
  border-color: #b74444;
}

.vols-field__hint {
  color: #617286;
  font-size: 12px;
  line-height: 1.4;
}

.vols-rates {
  border-bottom: 1px solid #d7e0ea;
}

.vols-rates summary {
  position: relative;
  padding: 20px 58px 20px 28px;
  color: #0a1726;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.vols-rates summary::-webkit-details-marker {
  display: none;
}

.vols-rates summary::after {
  content: "+";
  position: absolute;
  top: 15px;
  right: 28px;
  color: #0a5fc1;
  font-size: 26px;
  font-weight: 400;
}

.vols-rates[open] summary::after {
  content: "−";
}

.vols-rates__body {
  padding: 0 28px 28px;
}

.vols-rates__notice {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 7px;
  color: #594817;
  background: #fff6d6;
  font-size: 13px;
}

.vols-result {
  position: sticky;
  top: 20px;
  overflow: hidden;
}

.vols-result__head {
  padding: 24px 24px 20px;
  color: #fff;
  background: #0a1726;
}

.vols-result__head h3 {
  margin-bottom: 6px;
  color: #fff;
  font-size: 22px;
}

.vols-result__head p {
  margin-bottom: 0;
  color: #adbed0;
  font-size: 13px;
}

.vols-result__body {
  padding: 22px 24px 24px;
}

.vols-breakdown {
  display: grid;
  gap: 0;
  margin: 0 0 18px;
}

.vols-breakdown__row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 11px 0;
  border-bottom: 1px solid #e0e7ee;
  color: #405367;
  font-size: 14px;
}

.vols-breakdown__row strong {
  flex: 0 0 auto;
  color: #0a1726;
}

.vols-totals {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 17px 0 0;
}

.vols-totals__row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: #405367;
  font-size: 14px;
}

.vols-totals__row strong {
  color: #0a1726;
}

.vols-totals__row--grand {
  margin-top: 6px;
  padding-top: 16px;
  border-top: 2px solid #0a1726;
  color: #0a1726;
  font-size: 18px;
  font-weight: 800;
}

.vols-actions {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.vols-button {
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 7px;
  color: #fff;
  background: #0a5fc1;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.vols-button--secondary {
  border: 1px solid #aebdcb;
  color: #0a1726;
  background: #fff;
}

.vols-result__note {
  margin: 16px 0 0;
  color: #617286;
  font-size: 12px;
  line-height: 1.5;
}

.link-status {
  padding: 22px 24px;
  border-bottom: 1px solid #d7e0ea;
  background: #eef4fa;
}

.link-status__label {
  display: block;
  margin-bottom: 6px;
  color: #526274;
  font-size: 12px;
  font-weight: 700;
}

.link-status strong {
  display: block;
  color: #0a1726;
  font-size: 25px;
  line-height: 1.2;
}

.link-status p {
  margin: 8px 0 0;
  color: #526274;
  font-size: 13px;
}

.link-status[data-state="success"] {
  background: #e7f5ed;
}

.link-status[data-state="success"] strong {
  color: #12633a;
}

.link-status[data-state="warning"] {
  background: #fff6d6;
}

.link-status[data-state="warning"] strong {
  color: #765600;
}

.link-status[data-state="danger"] {
  background: #fdeaea;
}

.link-status[data-state="danger"] strong {
  color: #9b2f2f;
}

.link-budget-meter {
  margin: 20px 0;
}

.link-budget-meter__track {
  position: relative;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe7ef;
}

.link-budget-meter__used {
  width: 0;
  height: 100%;
  background: #0a5fc1;
}

.link-budget-meter__limit {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 2px;
  background: #0a1726;
}

.link-budget-meter__labels {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 7px;
  color: #617286;
  font-size: 11px;
}

.link-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid #d7e0ea;
  border-radius: 8px;
  background: #d7e0ea;
}

.link-metric {
  padding: 15px;
  background: #f5f8fb;
}

.link-metric span {
  display: block;
  margin-bottom: 4px;
  color: #617286;
  font-size: 11px;
}

.link-metric strong {
  color: #0a1726;
  font-size: 18px;
}

.vols-source-note {
  margin: 18px 0 0;
  color: #617286;
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 960px) {
  .vols-workspace {
    grid-template-columns: 1fr;
  }

  .vols-result {
    position: static;
  }
}

@media (max-width: 680px) {
  .vols-calculator__tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .vols-calculator__tab {
    padding: 0 10px;
    font-size: 13px;
  }

  .vols-form__section {
    padding: 22px 18px;
  }

  .vols-form__grid,
  .vols-form__grid--three {
    grid-template-columns: 1fr;
  }

  .vols-rates summary {
    padding-right: 48px;
    padding-left: 18px;
  }

  .vols-rates summary::after {
    right: 18px;
  }

  .vols-rates__body {
    padding: 0 18px 22px;
  }

  .vols-result__head,
  .vols-result__body,
  .link-status {
    padding-right: 18px;
    padding-left: 18px;
  }
}
