.calculator-page,.calculator-page *,.calculator-page *::before,.calculator-page *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
.calculator-page {
  --bg-dark: #1d2228;
  --bg-light: #ffffff;
  --bg-gray: #f0f0f0;
  --surface: #23292f;
  --surface2: #2a3038;
  --orange: #e38440;
  --orange-hover: #d66a2a;
  --white: #ffffff;
  --gray: #b0b0b0;
  --dark-text: #1a1a1a;
  --border: #e38440;
  --font: 'Inter', 'Roboto', system-ui, sans-serif;

  font-family: var(--font);
  line-height: normal;
  min-height: 100vh;
  padding: 0;
}

/* HEADER */
.header {
  background: url('/assets/calculator-house.jpg') center center / cover no-repeat;
  position: relative;
  padding: 40px 0 32px;
  text-align: center;
  border-bottom: 1px solid rgba(227, 132, 64, 0.2);
}
.header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(29, 34, 40, 0.75);
  z-index: 0;
}
.header .container {
  position: relative;
  z-index: 1;
}
.header .header-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 16px;
}
.header h1 {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--white);
}
.header .orange-line {
  width: 60px;
  height: 2px;
  background: var(--orange);
  margin: 20px auto 16px;
}
.header .header-sub {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 300;
  letter-spacing: 0.5px;
}

/* LAYOUT */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}
.calc-wrapper {
  padding: 48px 0;
}

/* SECTIONS - alternating backgrounds */
.section {
  width: 100%;
}
.section--dark {
  background: var(--bg-dark);
  color: var(--white);
}
.section--light {
  background: var(--bg-light);
  color: var(--dark-text);
}
.section--cta-dark {
  background: var(--bg-dark);
  color: var(--white);
}
.section-title {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 28px;
}

/* GRID */
.inputs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
}
@media (max-width: 600px) {
.inputs-grid {
    grid-template-columns: 1fr;
}
}

/* FIELD */
.field {
  background: var(--surface);
  border: 1px solid rgba(227, 132, 64, 0.25);
  padding: 20px 22px;
  position: relative;
  transition: border-color 0.2s;
}
.field:focus-within {
  border-color: var(--orange);
}
.field-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.field-label .tooltip-wrap {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}
.field-label .tooltip-icon {
  width: 16px;
  height: 16px;
  border: 1px solid var(--orange);
  color: var(--orange);
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
  user-select: none;
}
.tooltip-box {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #2a3038;
  border: 1px solid var(--orange);
  color: var(--gray);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  padding: 12px 14px;
  width: 260px;
  line-height: 1.6;
  z-index: 100;
  pointer-events: none;
}
.tooltip-wrap:hover .tooltip-box,
.tooltip-wrap:focus .tooltip-box {
  display: block;
}
.input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.currency {
  font-size: 18px;
  font-weight: 300;
  color: var(--orange);
  flex-shrink: 0;
}
.field input[type='number'],
.field input[type='text'] {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--white);
  font-family: var(--font);
  font-size: 22px;
  font-weight: 300;
  width: 100%;
  padding: 4px 0;
  outline: none;
  -moz-appearance: textfield;
}
.field input[type='number']::-webkit-inner-spin-button,
.field input[type='number']::-webkit-outer-spin-button {
  -webkit-appearance: none;
}
.field input[type='number']:focus,
.field input[type='text']:focus {
  border-bottom-color: var(--orange);
}

/* SLIDER FIELD */
.slider-value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.slider-num {
  font-size: 22px;
  font-weight: 300;
  color: var(--white);
}
.slider-pct {
  color: var(--orange);
}
input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.15);
  outline: none;
  cursor: pointer;
}
input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  background: var(--orange);
  cursor: pointer;
  border: none;
  border-radius: 0;
}
input[type='range']::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: var(--orange);
  cursor: pointer;
  border: none;
  border-radius: 0;
}
.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--gray);
  margin-top: 6px;
  letter-spacing: 1px;
}

/* PERIOD FIELD */
.period-inputs {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}
.period-part {
  flex: 1;
}
.period-part label {
  font-size: 10px;
  color: var(--gray);
  letter-spacing: 1px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 6px;
}
.period-part select {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--white);
  font-family: var(--font);
  font-size: 18px;
  font-weight: 300;
  width: 100%;
  padding: 4px 0;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.period-part select option {
  background: #23292f;
}
.period-part select:focus {
  border-bottom-color: var(--orange);
}

/* DIVIDER */
.divider {
  border: none;
  border-top: 1px solid rgba(227, 132, 64, 0.2);
  margin: 36px 0;
}

/* RESULTS WRAPPER */
.results-wrapper {
  background: #ffffff !important;
  padding: 28px 30px;
  margin-bottom: 28px;
}
@media (max-width: 600px) {
.results-wrapper {
    padding: 16px 12px;
}
}

/* RESULTS */
.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}
@media (max-width: 700px) {
.results-grid {
    grid-template-columns: 1fr;
}
}
.result-card {
  border: 2px solid var(--orange);
  padding: 22px 20px;
  position: relative;
  background: #ffffff !important;
}
.result-card.primary {
  background: #ffffff !important;
  border-color: var(--orange);
}
.result-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #888 !important;
  margin-bottom: 14px;
  line-height: 1.5;
}
.result-card.primary .result-label {
  color: #888 !important;
}
.result-value {
  font-size: 26px;
  font-weight: 300;
  color: #1a1a1a !important;
  line-height: 1;
  margin-bottom: 12px;
}
.result-value .curr {
  color: var(--orange);
  font-size: 18px;
  margin-right: 3px;
}

/* editable result */
.editable-row {
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid rgba(227, 132, 64, 0.4);
  padding-bottom: 4px;
}
.editable-row input {
  background: transparent;
  border: none;
  color: #1a1a1a !important;
  font-family: var(--font);
  font-size: 26px;
  font-weight: 300;
  width: 100%;
  outline: none;
  -moz-appearance: textfield;
  min-width: 0;
}
@media (max-width: 600px) {
.editable-row input {
    font-size: 22px;
}
.result-card {
    padding: 16px 14px;
}
}
.editable-row input::-webkit-inner-spin-button,
.editable-row input::-webkit-outer-spin-button {
  -webkit-appearance: none;
}
.edit-hint {
  font-size: 10px;
  color: var(--orange) !important;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 6px;
}

/* Capital highlight */
.capital-block {
  background: #ffffff !important;
  padding: 28px 30px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
@media (max-width: 600px) {
.capital-block {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 16px;
    gap: 12px;
}
.capital-right .cap-value {
    text-align: left;
    font-size: 32px;
}
}
.capital-left .cap-label {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--orange) !important;
  margin-bottom: 6px;
}
.capital-left .cap-desc {
  font-size: 13px;
  color: #666 !important;
  font-weight: 300;
}
.capital-right .cap-value {
  font-size: clamp(32px, 6vw, 52px);
  font-weight: 300;
  color: #1a1a1a !important;
  letter-spacing: 1px;
  text-align: right;
}
.capital-right .cap-value .curr {
  color: var(--orange);
  font-size: 70%;
}

/* BREAKDOWN */
.breakdown {
  background: #ffffff !important;
  border: 1px solid rgba(227, 132, 64, 0.2);
  padding: 20px 24px;
  margin-bottom: 28px;
}
.breakdown-title {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #888 !important;
  margin-bottom: 14px;
}
.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 14px;
}
@media (max-width: 600px) {
.breakdown {
    padding: 16px 12px;
}
.breakdown-row {
    flex-wrap: wrap;
    font-size: 12px;
    padding: 6px 0;
    gap: 4px;
}
.breakdown-row .br-label {
    width: 100%;
    margin-bottom: 2px;
}
.breakdown-row .br-val {
    width: 100%;
    text-align: right;
}
}
.breakdown-row:last-child {
  border-bottom: none;
}
.breakdown-row .br-label {
  color: #666 !important;
  font-weight: 300;
}
.breakdown-row .br-val {
  color: #1a1a1a !important;
  font-weight: 400;
}
.breakdown-row .br-val.orange {
  color: var(--orange) !important;
}

/* CTA BLOCK */
.cta-block {
  border: none;
  padding: 30px 32px;
  margin-bottom: 24px;
  text-align: center;
  background: transparent;
}
.cta-text {
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 24px;
  font-weight: 300;
}
.cta-text strong {
  color: var(--white);
  font-weight: 600;
}
.cta-btn {
  display: inline-block;
  padding: 14px 40px;
  border: 2px solid var(--orange);
  background: var(--orange);
  color: var(--white);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}
.cta-btn:hover {
  background: var(--orange-hover);
  color: var(--white);
}
.footer-line {
  text-align: center;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 2px;
  text-transform: uppercase;
  padding-bottom: 32px;
}

/* Integration and approved validation; reference styling above is preserved. */
body { margin: 0; }
.field, .period-part { min-width: 0; }
.field input { min-width: 0; }
.calculator-message { margin: 16px 0 24px; padding: 14px 16px; border-left: 3px solid var(--orange); color: #1a1a1a; background: #fff5eb; font-size: 14px; line-height: 1.6; }
.calculator-message[hidden] { display: none; }
.calculator-note { color: #666; font-size: 12px; line-height: 1.7; padding: 0 0 24px; }
.calculator-back { display:block; margin:0 auto 24px; color:#e38440; font-size:13px; text-align:center; }
input[aria-invalid=true] { border-bottom-color:#ad2c23 !important; }
.breakdown-row { gap: 16px; }
.br-val { text-align: right; }
@media(max-width:600px) { .header { padding:32px 0; } .header-label { line-height:1.6; } .header-sub { line-height:1.6; } .cta-block { padding:30px 0; } .cta-btn { max-width:100%; padding:14px 20px; line-height:1.6; } .tooltip-box { position:fixed; left:20px; right:20px; bottom:20px; transform:none; width:auto; } }
