.prc-calculator {
  --prc-line: rgba(137, 151, 183, 0.22);
  --prc-line-strong: rgba(144, 158, 190, 0.3);
  --prc-text: #f6f7fb;
  --prc-muted: #a7adbd;
  --prc-blue: #5b96ff;
  --prc-blue-soft: rgba(91, 150, 255, 0.22);
  --prc-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  --prc-radius: 14px;
  --prc-field-height: 34px;

  width: min(100%, 1200px);
  margin: 12px auto;
  color: var(--prc-text);
  font-family: inherit;
}

.prc-calculator,
.prc-calculator * {
  box-sizing: border-box;
}

.prc-calculator input {
  font: inherit;
}

.prc-calculator button {
  font: inherit;
}

.prc-period-panel {
  margin-bottom: 16px;
  padding: clamp(18px, 2.2vw, 26px);
  border: 1px solid rgba(214, 220, 235, 0.82);
  border-radius: 14px;
  color: #111827;
  background: #fff;
  box-shadow: 0 20px 55px rgba(15, 23, 42, 0.12);
}

.prc-period-tabs {
  display: grid;
  grid-template-columns: repeat(12, minmax(66px, 1fr));
  gap: clamp(10px, 1.3vw, 18px);
  padding: 4px 4px 18px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.prc-period-tab {
  min-width: 66px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #d9deea;
  border-radius: 8px;
  color: #111827;
  background: #f8fafc;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  cursor: pointer;
  font-size: 16px;
  font-weight: 780;
  line-height: 1;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, color 160ms ease;
}

.prc-period-tab:hover,
.prc-period-tab:focus-visible {
  border-color: rgba(37, 99, 235, 0.48);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
  outline: 0;
}

.prc-period-tab.is-active {
  border-color: #1256e8;
  color: #fff;
  background: #1155ee;
  box-shadow: 0 10px 22px rgba(17, 85, 238, 0.26);
}

.prc-period-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 104px;
  padding: clamp(18px, 2.1vw, 24px);
  border: 1px solid #d8e6ff;
  border-radius: 10px;
  background: #f3f8ff;
}

.prc-period-copy {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 20px;
}

.prc-period-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  color: #1155ee;
  background: #dfeaff;
  font-size: 34px;
}

.prc-period-title {
  margin: 0;
  color: #111827;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 820;
}

.prc-period-description {
  max-width: 760px;
  margin: 10px 0 0;
  color: #52607a;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 520;
  white-space: pre-line;
}

.prc-active-period-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 18px;
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  color: #1155ee;
  background: #dfeaff;
  font-size: 15px;
  font-weight: 780;
}

.prc-active-period-badge span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #1155ee;
}

.prc-calculator-table,
.prc-total-card {
  overflow: hidden;
  border: 1px solid var(--prc-line-strong);
  border-radius: var(--prc-radius);
  background: linear-gradient(180deg, rgba(18, 25, 48, 0.78), rgba(8, 12, 27, 0.86));
  box-shadow: var(--prc-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.prc-calculator-header,
.prc-model-row {
  display: grid;
  grid-template-columns: 1.05fr 0.9fr 0.82fr 0.82fr 1.35fr 0.62fr;
  column-gap: clamp(10px, 1.45vw, 20px);
  align-items: center;
}

.prc-calculator-header {
  min-height: 58px;
  padding: 0 clamp(18px, 2vw, 28px);
  border-bottom: 1px solid var(--prc-line-strong);
  color: var(--prc-text);
  font-size: clamp(17px, 1.25vw, 22px);
  font-weight: 780;
  letter-spacing: 0;
}

.prc-money-heading,
.prc-row-revenue,
.prc-total-card strong {
  color: var(--prc-blue);
}

.prc-model-row {
  min-height: 76px;
  padding: 10px clamp(18px, 2vw, 28px);
  border-bottom: 1px solid var(--prc-line);
}

.prc-model-row:last-child {
  border-bottom: 0;
}

.prc-model-name {
  margin: 0;
  color: var(--prc-text);
  font-size: clamp(19px, 1.45vw, 26px);
  line-height: 1;
  font-weight: 760;
}

.prc-field {
  display: grid;
  gap: 5px;
}

.prc-field-label {
  display: none;
  color: var(--prc-muted);
  font-size: 13px;
  font-weight: 720;
}

.prc-number-input {
  width: min(100%, 148px);
  min-width: 0;
  height: var(--prc-field-height);
  padding: 0 12px;
  border: 1px solid var(--prc-line-strong);
  border-radius: 8px;
  outline: 0;
  color: var(--prc-text);
  background: rgba(4, 8, 21, 0.7);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  font-size: clamp(16px, 1.15vw, 20px);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.prc-number-input:focus {
  border-color: rgba(91, 150, 255, 0.82);
  box-shadow: 0 0 0 4px var(--prc-blue-soft);
}

.prc-range-field {
  display: grid;
  grid-template-columns: auto minmax(112px, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.prc-range-label {
  color: #d7dae3;
  font-size: clamp(14px, 0.95vw, 17px);
  font-weight: 720;
  white-space: nowrap;
}

.prc-range-input {
  --prc-percent: 50%;
  width: 100%;
  height: 28px;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  background: transparent;
  touch-action: pan-y;
}

.prc-range-input::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--prc-blue) 0 var(--prc-percent), rgba(72, 88, 121, 0.55) var(--prc-percent) 100%);
}

.prc-range-input::-webkit-slider-thumb {
  width: 20px;
  height: 20px;
  margin-top: -8px;
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  border-radius: 50%;
  background: #f4f5f8;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.48);
}

.prc-range-input::-moz-range-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(72, 88, 121, 0.55);
}

.prc-range-input::-moz-range-progress {
  height: 5px;
  border-radius: 999px;
  background: var(--prc-blue);
}

.prc-range-input::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: #f4f5f8;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.48);
}

.prc-row-revenue {
  justify-self: end;
  font-size: clamp(19px, 1.45vw, 26px);
  font-weight: 620;
  white-space: nowrap;
}

.prc-total-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  margin-top: 16px;
  padding: 0 clamp(18px, 2vw, 28px);
  color: #c3c8d5;
  font-size: clamp(16px, 1.15vw, 21px);
  font-weight: 740;
  text-transform: uppercase;
}

.prc-total-card strong {
  font-size: clamp(34px, 2.7vw, 48px);
  line-height: 1;
  font-weight: 720;
}

.prc-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 760px) {
  .prc-calculator {
    width: min(100%, 430px);
    margin: 8px auto;
  }

  .prc-period-panel {
    padding: 14px;
  }

  .prc-period-tabs {
    display: flex;
    gap: 10px;
    margin: 0 -4px;
    padding-bottom: 14px;
  }

  .prc-period-tab {
    flex: 0 0 70px;
    min-height: 40px;
    font-size: 14px;
  }

  .prc-period-summary {
    align-items: flex-start;
    flex-direction: column;
    min-height: 0;
    padding: 16px;
  }

  .prc-period-copy {
    gap: 14px;
  }

  .prc-period-icon {
    width: 52px;
    height: 52px;
    font-size: 28px;
  }

  .prc-period-title {
    font-size: 20px;
  }

  .prc-period-description {
    font-size: 14px;
  }

  .prc-active-period-badge {
    min-height: 34px;
    padding: 0 14px;
    font-size: 14px;
  }

  .prc-calculator-header {
    display: none;
  }

  .prc-model-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 14px;
    min-height: 0;
    padding: 13px 16px;
  }

  .prc-model-name {
    grid-column: 1 / -1;
    font-size: 20px;
  }

  .prc-field-label {
    display: block;
  }

  .prc-number-input {
    height: 34px;
    font-size: 17px;
    padding-inline: 12px;
  }

  .prc-revenue-control {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
    align-items: end;
  }

  .prc-revenue-control .prc-field-label {
    grid-column: 1 / -1;
  }

  .prc-range-field {
    grid-template-columns: 38px minmax(180px, 1fr) 42px;
    gap: 8px;
  }

  .prc-range-input {
    min-width: 0;
    height: 44px;
  }

  .prc-range-label {
    font-size: 13px;
  }

  .prc-range-input::-webkit-slider-runnable-track,
  .prc-range-input::-moz-range-track,
  .prc-range-input::-moz-range-progress {
    height: 6px;
  }

  .prc-range-input::-webkit-slider-thumb {
    width: 30px;
    height: 30px;
    margin-top: -12px;
  }

  .prc-range-input::-moz-range-thumb {
    width: 30px;
    height: 30px;
  }

  .prc-row-revenue {
    align-self: end;
    font-size: 23px;
  }

  .prc-total-card {
    min-height: 58px;
    margin-top: 12px;
    padding: 0 22px;
    border-radius: 14px;
    font-size: 15px;
  }

  .prc-total-card strong {
    font-size: 34px;
  }
}

@media (max-width: 360px) {
  .prc-model-row {
    gap: 8px 12px;
    padding: 12px;
  }

  .prc-field-label,
  .prc-range-label {
    font-size: 12px;
  }

  .prc-range-field {
    grid-template-columns: 34px minmax(0, 1fr) 38px;
    gap: 6px;
  }

  .prc-row-revenue {
    font-size: 21px;
  }
}
