/* ===================== */
/* TAX CALCULATOR PAGE   */
/* Extends calculator.css patterns for the tax comparison tool */
/* ===================== */

/* Hero */
.calc-hero {
  padding: 2rem 0 1rem;
  position: relative;
  z-index: 1;
}

.calc-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--purple-600);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
  transition: gap 0.2s;
}

.calc-back:hover {
  gap: 0.75rem;
  color: var(--purple-700);
}

.calc-hero-inner {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 2rem;
  align-items: start;
}

.calc-hero-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
  font-weight: 700;
  color: var(--charcoal);
  margin: 0 0 0.5rem;
  line-height: 1.15;
}

.calc-hero-subtitle {
  font-size: 0.95rem;
  color: var(--gray-600);
  line-height: 1.6;
  margin: 0 0 1.5rem;
}

/* Benefit Cards */
.calc-benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}

.calc-benefit {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem;
  background: var(--white);
  border: 1px solid rgba(45, 27, 78, 0.06);
  border-radius: 0.85rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.calc-benefit:hover {
  border-color: rgba(139, 92, 246, 0.15);
  box-shadow: 0 4px 12px -4px rgba(139, 92, 246, 0.08);
}

.calc-benefit-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--purple-50), var(--purple-100));
  color: var(--purple-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.calc-benefit strong {
  display: block;
  font-size: 0.82rem;
  color: var(--charcoal);
  margin-bottom: 0.15rem;
  line-height: 1.3;
}

.calc-benefit span {
  display: block;
  font-size: 0.75rem;
  color: var(--gray-500);
  line-height: 1.45;
}

/* Instructions Card */
.calc-instructions {
  background: var(--white);
  border: 1px solid rgba(45, 27, 78, 0.06);
  border-radius: 1.25rem;
  padding: 1.75rem;
  margin-top: 1.5rem;
}

.calc-instructions-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--charcoal);
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.calc-instructions-title i {
  color: #f59e0b;
  font-size: 0.95rem;
}

.calc-instructions-list {
  margin: 0;
  padding: 0 0 0 1.25rem;
  counter-reset: inst;
  list-style: none;
}

.calc-instructions-list li {
  position: relative;
  padding-left: 0.25rem;
  margin-bottom: 0.6rem;
  font-size: 0.88rem;
  color: var(--gray-600);
  line-height: 1.55;
  counter-increment: inst;
}

.calc-instructions-list li::before {
  content: counter(inst) ".";
  position: absolute;
  left: -1.25rem;
  font-weight: 700;
  color: var(--purple-600);
  font-size: 0.82rem;
}

.calc-instructions-list li:last-child {
  margin-bottom: 0;
}

.calc-instructions-list li strong {
  color: var(--charcoal);
}

/* Calculator Section */
.calc-section {
  padding: 1.5rem 0 4rem;
  position: relative;
  z-index: 1;
}

.calc-layout {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 1.75rem;
  align-items: start;
}

/* Panels */
.calc-panel {
  background: var(--white);
  border-radius: 1.25rem;
  border: 1px solid rgba(45, 27, 78, 0.06);
  padding: 1.75rem;
  margin-bottom: 1.25rem;
}

.calc-panel:last-child {
  margin-bottom: 0;
}

.calc-panel-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.calc-panel-header-row .calc-panel-title {
  margin-bottom: 0;
}

.calc-panel-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--charcoal);
  margin: 0 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.calc-panel-title i {
  color: var(--purple-600);
  font-size: 0.95rem;
}

/* Inputs Panel - Sticky */
.calc-inputs .calc-panel {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--purple-200) transparent;
}

.calc-inputs .calc-panel::-webkit-scrollbar {
  width: 4px;
}

.calc-inputs .calc-panel::-webkit-scrollbar-thumb {
  background: var(--purple-200);
  border-radius: 2px;
}

/* Field divider */
.calc-field-divider {
  height: 1px;
  background: var(--gray-200);
  margin: 1.5rem 0;
}

.calc-field-group-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.calc-field-group-label i {
  color: var(--purple-400);
  font-size: 0.75rem;
}

/* Side-by-side field rows */
.calc-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.calc-field-row .calc-field {
  margin-bottom: 0;
}

.calc-field-row .calc-field:last-of-type {
  margin-bottom: 0;
}

/* Fields */
.calc-field {
  margin-bottom: 1rem;
}

.calc-field:last-of-type {
  margin-bottom: 1.5rem;
}

.calc-label-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}

.calc-label-row label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--charcoal);
}

.calc-value-display {
  margin-left: auto;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--purple-700);
  background: var(--purple-50);
  padding: 0.15rem 0.55rem;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
}

/* Tooltips */
.tooltip-trigger {
  position: relative;
  cursor: help;
  color: var(--gray-400);
  font-size: 0.78rem;
  transition: color 0.2s;
}

.tooltip-trigger:hover {
  color: var(--purple-600);
}

.tooltip-trigger:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: -8px;
  background: var(--charcoal);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.5;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  width: 260px;
  z-index: 50;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  animation: tooltipIn 0.15s ease-out;
}

.tooltip-trigger:hover::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 4px;
  border: 5px solid transparent;
  border-top-color: var(--charcoal);
  z-index: 51;
  pointer-events: none;
  animation: tooltipIn 0.15s ease-out;
}

@keyframes tooltipIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Select */
.calc-select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  background: var(--white);
  color: var(--charcoal);
  cursor: pointer;
  transition: border-color 0.2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b6b6b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
}

.calc-select:focus {
  outline: none;
  border-color: var(--purple-400);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* Slider */
.calc-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  background: var(--gray-200);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.calc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, var(--purple-500), var(--purple-700));
  border-radius: 50%;
  cursor: grab;
  box-shadow: 0 2px 6px -2px rgba(139, 92, 246, 0.5);
  border: 2.5px solid var(--white);
  transition: transform 0.15s, box-shadow 0.15s;
}

.calc-slider::-webkit-slider-thumb:hover {
  transform: scale(1.12);
  box-shadow: 0 3px 10px -2px rgba(139, 92, 246, 0.6);
}

.calc-slider::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.08);
}

.calc-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: linear-gradient(135deg, var(--purple-500), var(--purple-700));
  border-radius: 50%;
  cursor: grab;
  box-shadow: 0 2px 6px -2px rgba(139, 92, 246, 0.5);
  border: 2.5px solid var(--white);
}

.calc-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--gray-400);
  margin-top: 0.2rem;
  font-weight: 500;
}

/* Dollar input wrapper */
.calc-dollar-input {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  margin-top: 0.4rem;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: var(--white);
}

.calc-dollar-input:focus-within {
  border-color: var(--purple-400);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.08);
}

.calc-dollar-prefix {
  padding: 0.5rem 0 0.5rem 0.7rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gray-500);
  user-select: none;
  flex-shrink: 0;
}

.calc-dollar-input .calc-input-text {
  border: none;
  margin-top: 0;
  border-radius: 0;
  padding-left: 0.25rem;
}

.calc-dollar-input .calc-input-text:focus {
  box-shadow: none;
}

/* Text input */
.calc-input-text {
  width: 100%;
  padding: 0.5rem 0.7rem;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  border: 1.5px solid var(--gray-200);
  border-radius: 7px;
  color: var(--charcoal);
  margin-top: 0.4rem;
  transition: border-color 0.2s;
  font-variant-numeric: tabular-nums;
}

.calc-input-text::placeholder {
  color: var(--gray-400);
  font-size: 0.8rem;
  font-weight: 400;
}

.calc-input-text:focus {
  outline: none;
  border-color: var(--purple-400);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.08);
}

/* Run Button */
.calc-run-btn {
  width: 100%;
  margin-top: 0.25rem;
}

/* ===================== */
/* RESULTS               */
/* ===================== */
.calc-results-panel {
  border: 1px solid rgba(139, 92, 246, 0.1);
}

/* Tax Gain Overview */
.tax-gain-overview {
  background: var(--cream);
  border-radius: 0.85rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.tax-gain-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0;
  font-size: 0.85rem;
}

.tax-gain-label {
  color: var(--gray-600);
}

.tax-gain-value {
  font-weight: 700;
  color: var(--charcoal);
  font-variant-numeric: tabular-nums;
}

.tax-gain-value.negative {
  color: #ef4444;
}

.tax-gain-divider {
  height: 1px;
  background: var(--gray-200);
  margin: 0.4rem 0;
}

.tax-gain-item.total .tax-gain-label {
  font-weight: 700;
  color: var(--charcoal);
}

.tax-gain-item.total .tax-gain-value {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.1rem;
  color: var(--purple-700);
}

/* Metrics Grid */
.calc-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.calc-metric {
  padding: 1rem;
  background: var(--cream);
  border-radius: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.calc-metric.highlight {
  background: linear-gradient(135deg, var(--purple-50), rgba(139, 92, 246, 0.08));
  grid-column: 1 / -1;
  text-align: center;
  align-items: center;
  padding: 1.35rem;
  border: 1px solid rgba(139, 92, 246, 0.1);
}

.calc-metric.highlight .calc-metric-value {
  font-size: 2rem;
  color: var(--purple-700);
}

.calc-metric-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.calc-metric-value {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--charcoal);
  font-variant-numeric: tabular-nums;
}

.calc-metric-sub {
  font-size: 0.72rem;
  color: var(--gray-500);
  line-height: 1.4;
}

/* ===================== */
/* SCENARIO COMPARISON   */
/* ===================== */
.scenario-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.scenario-card {
  border-radius: 0.85rem;
  overflow: hidden;
  border: 1.5px solid var(--gray-200);
}

.scenario-card.scenario-seller {
  border-color: var(--purple-400);
  box-shadow: 0 4px 14px -4px rgba(139, 92, 246, 0.12);
}

.scenario-header {
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.scenario-traditional .scenario-header {
  background: #f8fafc;
}

.scenario-seller .scenario-header {
  background: linear-gradient(135deg, var(--purple-50), rgba(139, 92, 246, 0.08));
}

.scenario-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  border-radius: 2rem;
}

.scenario-badge.traditional {
  background: var(--gray-200);
  color: var(--gray-600);
}

.scenario-badge.seller {
  background: var(--purple-600);
  color: var(--white);
}

.scenario-recommended {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--green-500);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.scenario-recommended i {
  font-size: 0.6rem;
}

.scenario-body {
  padding: 1rem;
}

.scenario-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.3rem 0;
  font-size: 0.82rem;
}

.scenario-line span {
  color: var(--gray-600);
}

.scenario-line strong {
  font-weight: 700;
  color: var(--charcoal);
  font-variant-numeric: tabular-nums;
}

.scenario-line.negative strong {
  color: #ef4444;
}

.scenario-line strong.positive {
  color: var(--green-500);
}

.scenario-divider {
  height: 1px;
  background: var(--gray-200);
  margin: 0.4rem 0;
}

.scenario-line.total {
  padding-top: 0.4rem;
}

.scenario-line.total span {
  font-weight: 700;
  color: var(--charcoal);
  font-size: 0.85rem;
}

.scenario-line.total strong {
  font-size: 1rem;
  color: var(--charcoal);
}

.scenario-seller .scenario-line.total strong {
  color: var(--purple-700);
}

/* Advantage Callout */
.scenario-advantage {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem;
  background: linear-gradient(135deg, var(--green-100), rgba(34, 197, 94, 0.08));
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 0.85rem;
}

.advantage-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--green-500);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.advantage-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.advantage-text strong {
  font-size: 0.9rem;
  color: var(--charcoal);
}

.advantage-text > span {
  font-size: 0.8rem;
  color: var(--gray-600);
}

/* ===================== */
/* CHARTS                */
/* ===================== */
.chart-container {
  margin-bottom: 0.75rem;
}

.chart-container canvas {
  width: 100% !important;
  height: auto !important;
}

.chart-subtitle {
  font-size: 0.78rem;
  color: var(--gray-500);
  margin: 0 0 1rem;
  line-height: 1.4;
}

.chart-legend-row {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.legend-label {
  color: var(--gray-600);
}

/* ===================== */
/* SCHEDULE TABLE        */
/* ===================== */
.tax-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -0.5rem;
  padding: 0 0.5rem;
}

.tax-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  min-width: 640px;
}

.tax-table th {
  text-align: left;
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-500);
  padding: 0.6rem 0.5rem;
  border-bottom: 2px solid var(--gray-200);
  white-space: nowrap;
}

.tax-table td {
  padding: 0.5rem;
  color: var(--charcoal);
  border-bottom: 1px solid rgba(45, 27, 78, 0.04);
}

.tax-table tbody tr:hover {
  background: var(--purple-50);
}

.tax-table tbody tr:first-child {
  background: rgba(139, 92, 246, 0.04);
}

.tax-table tfoot td {
  font-weight: 700;
  border-top: 2px solid var(--gray-200);
  border-bottom: none;
  padding-top: 0.75rem;
  color: var(--purple-700);
}

/* ===================== */
/* PERSONA / ADVISOR     */
/* ===================== */
.calc-persona-panel {
  border: 1px solid rgba(139, 92, 246, 0.1);
}

.persona-insight-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.persona-insight-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.persona-insight-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--charcoal);
  margin: 0 0 0.15rem;
}

.persona-insight-role {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.persona-insight-body {
  font-size: 0.88rem;
  color: var(--gray-600);
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.persona-insight-body p {
  margin: 0 0 0.75rem;
}

.persona-insight-body p:last-child {
  margin-bottom: 0;
}

.persona-outcomes {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.persona-outcome {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.75rem;
  background: var(--cream);
  border-radius: 0.75rem;
  font-size: 0.85rem;
  line-height: 1.5;
}

.persona-outcome-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.7rem;
}

.persona-outcome-icon.info {
  background: #dbeafe;
  color: #3b82f6;
}

.persona-outcome-icon.highlight {
  background: linear-gradient(135deg, var(--purple-50), var(--purple-100));
  color: var(--purple-600);
}

.persona-outcome-text {
  color: var(--gray-600);
}

.persona-outcome-text strong {
  color: var(--charcoal);
}

/* ===================== */
/* CTA PANEL             */
/* ===================== */
.calc-cta-panel {
  background: linear-gradient(160deg, var(--purple-900), var(--purple-700));
  color: var(--white);
  text-align: center;
}

.calc-cta-panel h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
}

.calc-cta-panel p {
  font-size: 0.88rem;
  opacity: 0.85;
  margin: 0 0 1.25rem;
}

.calc-cta-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.calc-cta-panel .btn-primary {
  background: var(--white);
  color: var(--purple-800);
  box-shadow: none;
}

.calc-cta-panel .btn-primary:hover {
  background: var(--purple-50);
}

.calc-cta-panel .btn-secondary {
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.25);
}

.calc-cta-panel .btn-secondary:hover {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.05);
}

/* ===================== */
/* FAQ                   */
/* ===================== */
.calc-faq-section {
  padding: 4rem 0 5rem;
  background: var(--white);
  position: relative;
  z-index: 1;
}

.calc-faq-grid {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.calc-faq-item {
  background: var(--cream);
  border-radius: 0.85rem;
  border: 1px solid rgba(45, 27, 78, 0.06);
  overflow: hidden;
  transition: border-color 0.2s;
}

.calc-faq-item:hover {
  border-color: rgba(139, 92, 246, 0.12);
}

.calc-faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1rem 1.25rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  gap: 1rem;
}

.calc-faq-question h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--charcoal);
  margin: 0;
  line-height: 1.35;
}

.calc-faq-item .faq-toggle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--purple-100);
  color: var(--purple-600);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.68rem;
  transition: transform 0.3s, background 0.3s;
}

.calc-faq-item.open .faq-toggle {
  transform: rotate(180deg);
  background: var(--purple-600);
  color: var(--white);
}

.calc-faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.calc-faq-item.open .calc-faq-answer {
  max-height: 300px;
}

.calc-faq-answer-inner {
  padding: 0 1.25rem 1rem;
}

.calc-faq-answer-inner p {
  color: var(--gray-600);
  font-size: 0.88rem;
  line-height: 1.7;
  margin: 0;
}

/* ===================== */
/* TABLET                */
/* ===================== */
@media (min-width: 769px) and (max-width: 1024px) {
  .calc-hero-inner {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .calc-benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .calc-layout {
    grid-template-columns: 1fr;
  }

  .calc-inputs .calc-panel {
    position: static;
    max-height: none;
  }

  .calc-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .scenario-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===================== */
/* MOBILE                */
/* ===================== */
@media (max-width: 768px) {
  .calc-hero {
    padding: 1.25rem 0 0.5rem;
  }

  .calc-hero-inner {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .calc-hero-title {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  .calc-hero-subtitle {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }

  .calc-benefits-grid {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .calc-benefit {
    padding: 0.7rem;
  }

  .calc-benefit-icon {
    width: 30px;
    height: 30px;
    font-size: 0.78rem;
  }

  .calc-instructions {
    padding: 1.25rem;
  }

  .calc-instructions-title {
    font-size: 0.95rem;
  }

  .calc-instructions-list li {
    font-size: 0.84rem;
  }

  .calc-section {
    padding: 1rem 0 2.5rem;
  }

  .calc-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .calc-inputs .calc-panel {
    position: static;
    max-height: none;
  }

  .calc-panel {
    padding: 1.25rem;
    border-radius: 1rem;
  }

  .calc-panel-title {
    font-size: 1rem;
    margin-bottom: 1.25rem;
  }

  .calc-panel-header-row {
    flex-wrap: wrap;
  }

  .calc-field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .calc-field-row .calc-field {
    margin-bottom: 1rem;
  }

  /* Metrics */
  .calc-metrics {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .calc-metric.highlight .calc-metric-value {
    font-size: 1.65rem;
  }

  /* Scenarios */
  .scenario-cards {
    grid-template-columns: 1fr;
  }

  .scenario-line {
    font-size: 0.8rem;
  }

  /* Tooltips */
  .tooltip-trigger:hover::after {
    width: 220px;
  }

  /* CTA */
  .calc-cta-buttons {
    flex-direction: column;
  }

  .calc-cta-panel h3 {
    font-size: 1.1rem;
  }

  .scenario-advantage {
    flex-direction: column;
    text-align: center;
  }

  /* Charts */
  .chart-legend-row {
    gap: 0.75rem;
    font-size: 0.72rem;
  }

  /* Table */
  .tax-table {
    font-size: 0.72rem;
  }

  .tax-table th {
    font-size: 0.62rem;
    padding: 0.5rem 0.35rem;
  }

  .tax-table td {
    padding: 0.4rem 0.35rem;
  }

  /* FAQ */
  .calc-faq-section {
    padding: 3rem 0 3.5rem;
  }

  .calc-faq-question {
    padding: 0.85rem 1rem;
  }

  .calc-faq-question h3 {
    font-size: 0.9rem;
  }

  .calc-faq-answer-inner {
    padding: 0 1rem 0.85rem;
  }
}

@media (max-width: 480px) {
  .calc-label-row {
    flex-wrap: wrap;
  }

  .calc-value-display {
    font-size: 0.78rem;
  }

  .chart-legend-row {
    flex-direction: column;
    gap: 0.4rem;
  }
}
