.calculator-page {
  padding: 48px 0 72px;
}

.calculator-hero {
  max-width: 820px;
  margin: 0 auto 32px;
  text-align: center;
}

.calculator-kicker {
  margin: 0 0 12px;
  color: var(--gold-deep);
  font-family: "Cormorant SC", Georgia, serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.calculator-title {
  margin: 0;
  color: var(--navy);
  font-family: "Cormorant", Georgia, serif;
  font-size: clamp(38px, 4.4vw, 58px);
  font-weight: 700;
  line-height: 1.04;
}

.calculator-lead,
.calculator-note,
.field,
.result-panel,
.schedule-panel,
.rules-panel {
  font-family: var(--font-sans);
}

.calculator-lead {
  max-width: 760px;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.calculator-tool {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 20px;
  align-items: start;
}

.calculator-panel,
.result-panel,
.schedule-panel,
.rules-panel {
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: linear-gradient(180deg, #1c1a17 0%, #151412 100%);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.calculator-panel,
.result-panel {
  padding: 24px;
}

.calculator-panel {
  display: grid;
  gap: 18px;
}

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

.field-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
}

.field label,
.profile-label {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.field-value,
.field-hint {
  color: var(--gold-deep);
  font-size: 12px;
  font-weight: 800;
}

.field input[type="text"],
.field select {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  border: 1px solid rgba(170, 164, 154, 0.28);
  border-radius: 8px;
  background: #11100f;
  color: var(--text);
  padding: 11px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  outline: none;
}

.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold-deep) 50%), linear-gradient(135deg, var(--gold-deep) 50%, transparent 50%);
  background-position: calc(100% - 18px) 20px, calc(100% - 12px) 20px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.field input:focus,
.field select:focus {
  border-color: var(--gold-deep);
  box-shadow: 0 0 0 3px rgba(228, 191, 113, 0.12);
}

.slider {
  width: 100%;
  accent-color: var(--gold-deep);
}

.profile-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.profile-option {
  min-height: 48px;
  border: 1px solid rgba(228, 191, 113, 0.24);
  border-radius: 8px;
  background: #11100f;
  color: var(--muted);
  padding: 9px 10px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  cursor: pointer;
}

.profile-option.is-active {
  border-color: rgba(246, 216, 151, 0.72);
  background: linear-gradient(135deg, #a67527 0%, #e5c177 52%, #9a6b22 100%);
  color: #11100f;
}

.result-hero {
  border-radius: 8px;
  background: #11100f;
  padding: 22px;
  text-align: center;
}

.result-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.result-value,
.monthly-payment,
.eligibility-status,
.indicative-price {
  margin: 0;
  color: var(--text);
  font-family: "Cormorant", Georgia, serif;
  font-size: clamp(38px, 4.5vw, 56px);
  font-weight: 700;
  line-height: 1;
  overflow-wrap: anywhere;
}

.result-subcopy {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.panel-heading {
  margin: 22px 0 12px;
  color: var(--text);
  font-family: "Cormorant", Georgia, serif;
  font-size: 28px;
  line-height: 1.08;
}

.breakdown {
  display: grid;
  gap: 8px;
  margin: 0;
}

.breakdown div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(228, 191, 113, 0.14);
  padding: 10px 0;
}

.breakdown dt {
  color: var(--muted);
}

.breakdown dd {
  margin: 0;
  color: var(--text);
  font-weight: 800;
  text-align: right;
  overflow-wrap: anywhere;
}

.calculator-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.calculator-actions .button {
  flex: 1 1 180px;
}

.schedule-panel,
.rules-panel {
  grid-column: 1 / -1;
  padding: 24px;
}

.schedule-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  margin-bottom: 14px;
}

.schedule-header .panel-heading,
.rules-panel .panel-heading {
  margin: 0;
}

.schedule-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.schedule-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  color: var(--muted);
  font-size: 14px;
}

.schedule-table th,
.schedule-table td {
  border-bottom: 1px solid rgba(228, 191, 113, 0.14);
  padding: 11px 10px;
  text-align: right;
}

.schedule-table th:first-child,
.schedule-table td:first-child {
  text-align: left;
}

.schedule-table th {
  color: var(--text);
}

.rules-grid,
.checklist {
  display: grid;
  gap: 12px;
}

.rules-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 14px;
}

.rule-card,
.check-item {
  border: 1px solid rgba(228, 191, 113, 0.16);
  border-radius: 8px;
  background: #11100f;
  padding: 16px;
}

.rule-card {
  display: grid;
  gap: 8px;
}

.rule-card strong {
  color: var(--gold-deep);
  font-family: "Cormorant", Georgia, serif;
  font-size: 30px;
  line-height: 1;
}

.rule-card span,
.check-item {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.checklist {
  margin-top: 16px;
}

.check-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: start;
}

.check-item span {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(228, 191, 113, 0.14);
  color: var(--gold-deep);
  font-weight: 900;
}

.check-item.is-fail span {
  background: rgba(190, 71, 71, 0.18);
  color: #ff9a9a;
}

.calculator-note {
  max-width: 900px;
  margin: 20px auto 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  text-align: center;
}

@media (max-width: 920px) {
  .calculator-tool {
    grid-template-columns: 1fr;
    display: block !important;
  }

  .rules-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .calculator-page {
    padding: 38px 0 60px;
  }

  .calculator-panel,
  .result-panel,
  .schedule-panel,
  .rules-panel {
    padding: 18px;
  }

  .profile-options,
  .rules-grid {
    grid-template-columns: 1fr;
  }

  .field-heading,
  .schedule-header,
  .breakdown div {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .breakdown dd,
  .schedule-table th,
  .schedule-table td {
    text-align: left;
  }
}
