/* ============================================
   Calculator — T & H
   ============================================ */

/* Hero */
.calc-hero {
  max-width: 720px; margin: 0 auto;
  padding: clamp(48px, 8vw, 80px) 0 clamp(24px, 4vw, 40px);
}
.calc-hero h1 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(36px, 8vw, 56px);
  font-weight: 400; line-height: 1.05;
  color: #1A1A1A; margin: 0 0 12px;
}
.calc-intro {
  font-size: clamp(14px, 2.5vw, 16px);
  color: #8C8578; line-height: 1.5; margin: 0;
}

/* Inputs section */
.calc-inputs {
  max-width: 720px; margin: 0 auto;
  padding-bottom: 8px;
}
.input-group {
  margin-bottom: 24px;
}
.input-group label {
  display: block;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: #8C8578; margin-bottom: 10px;
}
.input-row {
  display: flex; align-items: center; gap: 12px;
}

/* Range slider */
input[type="range"] {
  flex: 1; height: 4px;
  -webkit-appearance: none; appearance: none;
  background: #E8E4DF; border-radius: 2px;
  outline: none; cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 20px; height: 20px; border-radius: 50%;
  background: #1A1A1A; cursor: pointer;
  border: 3px solid #FAFAF8;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%;
  background: #1A1A1A; cursor: pointer;
  border: 3px solid #FAFAF8;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

/* Editable value input */
.value-input {
  min-width: 88px; max-width: 100px;
  text-align: right;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 17px; font-weight: 600;
  color: #1A1A1A;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 4px 8px;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.2s, background 0.2s;
  outline: none;
}
.value-input:focus {
  border-color: #E8E4DF;
  background: #fff;
}

/* Results cards */
.calc-results {
  max-width: 720px; margin: 0 auto;
  background: #fff;
  border-radius: 2px;
  padding: clamp(24px, 4vw, 36px);
  margin-top: 16px;
  border: 1px solid #E8E4DF;
}
.calc-results + .calc-results {
  margin-top: 24px;
}
.result-label {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.25em; text-transform: uppercase;
  color: #B8704B; margin: 0 0 20px;
}

/* Comparison boxes */
.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 480px) {
  .comparison { grid-template-columns: 1fr; }
}
.comp-box {
  padding: clamp(14px, 3vw, 20px);
  border-radius: 2px;
}
.comp-box.savings { background: #F5F4F1; }
.comp-box.invested { background: #F0F7F0; }
.comp-label {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: #8C8578; margin: 0 0 6px;
}
.comp-amount {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(24px, 5vw, 32px);
  font-weight: 400; margin: 0;
  font-variant-numeric: tabular-nums;
}
.comp-box.savings .comp-amount { color: #555; }
.comp-box.invested .comp-amount { color: #2E7D32; }
.comp-detail {
  font-size: 12px; color: #8C8578; margin: 4px 0 0;
}

/* Difference bar */
.stats-row {
  display: flex; gap: 16px;
  margin-bottom: 16px;
}
.stat {
  flex: 1;
  padding: clamp(12px, 2vw, 16px);
  background: #FAFAF8;
  border: 1px solid #E8E4DF;
  border-radius: 2px;
  text-align: center;
}
.stat-label {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: #8C8578; margin: 0 0 4px;
}
.stat-value {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(20px, 4vw, 26px);
  font-weight: 400; margin: 0;
  color: #1A1A1A;
  font-variant-numeric: tabular-nums;
}
.stat-value.accent { color: #B8704B; }
.difference-bar {
  background: #1A1A1A; color: #FAFAF8;
  border-radius: 2px;
  padding: 16px 20px;
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px;
}
.diff-label {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px; font-weight: 500;
}
.diff-amount {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: clamp(20px, 4vw, 26px);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

/* Callout */
.callout-box {
  text-align: center;
  padding: 16px 20px;
  font-size: 14px; color: #1A1A1A;
  line-height: 1.6;
  background: #FBF9F3;
  border-radius: 2px;
  margin-bottom: 24px;
  border-left: 3px solid #B8704B;
  text-align: left;
}

/* Chart */
.chart-wrap {
  height: 200px; min-height: 200px; position: relative;
}
.chart-wrap canvas {
  width: 100% !important; height: 100% !important;
}
.chart-legend {
  display: flex; gap: 20px; justify-content: center;
  margin-top: 12px; font-size: 12px; color: #8C8578;
}
.legend-item {
  display: flex; align-items: center; gap: 6px;
}
.legend-dot {
  width: 10px; height: 10px; border-radius: 50%;
}
.dot-gray { background: #BBB; }
.dot-green { background: #2E7D32; }
.dot-light { background: #E8E4DF; }
.chart-note {
  font-size: 12px; color: #8C8578;
  text-align: center; margin: 8px 0 0;
}

/* Tables */
.table-section { margin-top: 24px; }
.table-toggle {
  display: block; width: 100%;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px; color: #8C8578;
  background: none; border: none;
  cursor: pointer; text-align: center;
  padding: 10px 0;
  transition: color 0.2s;
}
.table-toggle:hover { color: #1A1A1A; }
.table-wrap { overflow-x: auto; }
.table-wrap.hidden { display: none; }
table {
  width: 100%; border-collapse: collapse;
  font-size: 13px; margin-top: 8px;
}
th {
  text-align: left;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: #8C8578; padding: 8px 6px;
  border-bottom: 1px solid #E8E4DF;
}
td {
  padding: 8px 6px;
  border-bottom: 1px solid #F5F4F1;
  font-variant-numeric: tabular-nums;
}
td.green { color: #2E7D32; font-weight: 600; }
td.gray { color: #8C8578; }

/* Coast section intro */
.coast-intro {
  font-size: clamp(13px, 2.2vw, 14px);
  color: #8C8578; margin: 0 0 24px; line-height: 1.5;
}
.coast-section .input-group {
  margin-bottom: 20px;
}

/* Disclaimer */
.calc-disclaimer {
  max-width: 720px; margin: 0 auto;
  font-size: 12px; color: #8C8578;
  text-align: center; line-height: 1.6;
  padding: clamp(32px, 5vw, 48px) 0;
}
