/* ═══════════════════════════════════════════════════════════════════════════
   SALARYLAB TOOLS INTERACTIVE CSS — 2026
   ─────────────────────────────────────────────────────────────────────────
   Shared interactive layer for all 13 tool pages.
   Components:
   01. Tool page layout + header
   02. Input group redesign
   03. Preset bar
   04. Calculate button
   05. Result card entrance animation
   06. Live preview strip
   07. Breakdown bar (animated)
   08. Tool hero visual (CSS-only, per-category)
   09. Category color tokens
   10. Result number display
   11. Comparison columns
   12. Progress/gauge bar
   13. Mobile responsive
   ═══════════════════════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════════════════════════════════
   01. TOOL PAGE LAYOUT + HEADER
   ═══════════════════════════════════════════════════════════════════════════ */
.tool-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 40px var(--page-gutter) 80px;
}

.tool-header {
  max-width: var(--shell-max, 1120px);
  margin: 0 auto 32px;
  padding: 0 var(--page-gutter, 16px);
}

.tool-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.tool-kicker--tax    { color: #4338CA; }
.tool-kicker--forest { color: #065F46; }
.tool-kicker--amber  { color: #B45309; }
.tool-kicker--purple { color: #6c5ce7; }
.tool-kicker--slate  { color: #1E3A5F; }

.tool-title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.375rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 10px;
}

.tool-sub {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-2);
  max-width: 560px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   02. INPUT GROUP REDESIGN
   ═══════════════════════════════════════════════════════════════════════════ */
.ti-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ti-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-2);
  line-height: 1;
}

.ti-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.ti-prefix,
.ti-suffix {
  position: absolute;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  pointer-events: none;
  z-index: 1;
  transition: color 0.15s;
}

.ti-prefix { left: 12px; }
.ti-suffix { right: 12px; }

.ti-input {
  width: 100%;
  height: 46px;
  padding: 0 40px 0 32px;
  border: 1.5px solid var(--border-md);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  -webkit-appearance: none;
}

.ti-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: var(--bg);
}

.ti-input:focus ~ .ti-prefix,
.ti-input:focus + .ti-suffix {
  color: var(--accent);
}

.ti-input.is-filled {
  border-color: var(--border-warm, rgba(67,56,202,0.25));
}

.ti-input--no-prefix { padding-left: 14px; }
.ti-input--no-suffix { padding-right: 14px; }

.ti-select {
  width: 100%;
  height: 46px;
  padding: 0 36px 0 14px;
  border: 1.5px solid var(--border-md);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  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' fill='none'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%2352575B' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.ti-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}


/* ═══════════════════════════════════════════════════════════════════════════
   03. PRESET BAR
   ═══════════════════════════════════════════════════════════════════════════ */
.ti-preset-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.ti-preset-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--subtle);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  white-space: nowrap;
}

.ti-preset-btn {
  padding: 5px 11px;
  border: 1.5px solid var(--border-md);
  border-radius: 99px;
  background: var(--bg);
  color: var(--text-2);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.ti-preset-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.ti-preset-btn.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}


/* ═══════════════════════════════════════════════════════════════════════════
   04. CALCULATE BUTTON
   ═══════════════════════════════════════════════════════════════════════════ */
.ti-calc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 52px;
  padding: 0 24px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 14px;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
  box-shadow: 0 2px 12px rgba(67,56,202,0.25);
  position: relative;
  overflow: hidden;
}

.ti-calc-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, transparent 60%);
  pointer-events: none;
}

.ti-calc-btn:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 20px rgba(67,56,202,0.3);
}

.ti-calc-btn:active {
  transform: scale(0.98);
}

.ti-calc-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.ti-calc-btn--forest {
  background: var(--forest);
  box-shadow: 0 2px 12px rgba(6,95,70,0.25);
}
.ti-calc-btn--forest:hover {
  background: #054f39;
  box-shadow: 0 4px 20px rgba(6,95,70,0.3);
}

.ti-calc-btn--amber {
  background: var(--amber-accent);
  box-shadow: 0 2px 12px rgba(180,83,9,0.25);
}
.ti-calc-btn--amber:hover {
  background: #9a4800;
  box-shadow: 0 4px 20px rgba(180,83,9,0.3);
}

/* Loading state */
.ti-calc-btn.is-loading .ti-btn-text { opacity: 0; }
.ti-calc-btn.is-loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ti-spin 0.7s linear infinite;
}
@keyframes ti-spin {
  to { transform: rotate(360deg); }
}


/* ═══════════════════════════════════════════════════════════════════════════
   05. RESULT CARD ENTRANCE
   ═══════════════════════════════════════════════════════════════════════════ */
.ti-result {
  display: none;
  margin-top: 24px;
  border: 1px solid var(--border-md);
  border-radius: 18px;
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.ti-result.is-visible {
  display: block;
  animation: ti-result-in 0.35s cubic-bezier(0.16,1,0.3,1) forwards;
}

@keyframes ti-result-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .ti-result.is-visible { animation: none; }
}

.ti-result-header {
  padding: 16px 22px;
  background: var(--accent-soft);
  border-bottom: 1px solid var(--border-warm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.ti-result-kicker {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
}

.ti-result-body {
  padding: 20px 22px;
}

/* ── Primary result number ── */
.ti-result-primary {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}

.ti-result-amount {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 2.75rem);
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.03em;
  line-height: 1;
  animation: ti-count-in 0.5s ease forwards;
  animation-delay: 0.1s;
  opacity: 0;
}

@keyframes ti-count-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .ti-result-amount { animation: none; opacity: 1; }
}

.ti-result-period {
  font-size: 0.875rem;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 4px;
}

.ti-result-sub {
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 16px;
}


/* ═══════════════════════════════════════════════════════════════════════════
   06. LIVE PREVIEW STRIP
   ═══════════════════════════════════════════════════════════════════════════ */
.ti-live-preview {
  display: none;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  margin: 12px 0;
  transition: opacity 0.2s ease;
}

.ti-live-preview.is-active {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  animation: ti-preview-in 0.2s ease forwards;
}

@keyframes ti-preview-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.ti-live-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 80px;
  text-align: center;
}

.ti-live-val {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1;
}

.ti-live-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--subtle);
}

.ti-live-sep {
  width: 1px;
  height: 28px;
  background: var(--border-md);
  flex-shrink: 0;
}


/* ═══════════════════════════════════════════════════════════════════════════
   07. BREAKDOWN BAR (animated)
   ═══════════════════════════════════════════════════════════════════════════ */
.ti-breakdown {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0;
}

.ti-breakdown-row {
  display: grid;
  grid-template-columns: 140px 1fr 80px;
  align-items: center;
  gap: 10px;
}

.ti-breakdown-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
}

.ti-breakdown-track {
  height: 8px;
  background: var(--bg-3);
  border-radius: 99px;
  overflow: hidden;
}

.ti-breakdown-fill {
  height: 100%;
  border-radius: 99px;
  width: 0%;
  transition: width 0.8s cubic-bezier(0.16,1,0.3,1);
}

.ti-breakdown-fill--accent  { background: linear-gradient(90deg, #4338CA 0%, #6366F1 100%); }
.ti-breakdown-fill--amber   { background: linear-gradient(90deg, #B45309 0%, #D97706 100%); }
.ti-breakdown-fill--forest  { background: linear-gradient(90deg, #065F46 0%, #10B981 100%); }
.ti-breakdown-fill--purple  { background: linear-gradient(90deg, #6c5ce7 0%, #a29bfe 100%); }
.ti-breakdown-fill--muted   { background: var(--bg-3); }

.ti-breakdown-val {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  text-align: right;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .ti-breakdown-fill { transition: none; }
}

@media (max-width: 540px) {
  .ti-breakdown-row {
    grid-template-columns: 80px 1fr 54px;
    gap: 6px;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   08. TOOL HERO VISUAL (CSS-only per category)
   ═══════════════════════════════════════════════════════════════════════════ */
.ti-hero-visual {
  max-width: var(--shell-max, 1120px);
  margin: 0 auto 28px;
  border: 1px solid var(--border-md);
  border-radius: 16px;
  background: var(--bg-2);
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
}

.ti-hero-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 60% at 100% 0%, var(--tool-accent-soft, var(--accent-soft)) 0%, transparent 60%);
  pointer-events: none;
}

.ti-hero-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  position: relative;
}

.ti-hero-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 12px;
  border-right: 1px solid var(--border-md);
  text-align: center;
}

.ti-hero-stat:last-child { border-right: none; }

.ti-hero-stat-val {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--tool-accent, var(--accent));
  letter-spacing: -0.02em;
  line-height: 1;
}

.ti-hero-stat-label {
  font-size: 0.68rem;
  color: var(--subtle);
  font-weight: 500;
  line-height: 1.3;
}

/* Mini bar chart in hero */
.ti-hero-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 40px;
  position: relative;
}

.ti-hero-bar {
  flex: 1;
  border-radius: 3px 3px 0 0;
  background: var(--tool-accent, var(--accent));
  opacity: 0.15;
  transition: opacity 0.2s;
}

.ti-hero-bar:hover { opacity: 0.4; }
.ti-hero-bar.is-active { opacity: 0.9; }


/* Mobile: ti-hero-visual — 14 tool pages */
@media (max-width: 640px) {
  .ti-hero-visual {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
  }
  .ti-hero-stat-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
  }
  .ti-hero-stat {
    padding: 10px 12px;
  }
  .ti-hero-stat:nth-child(2) {
    border-right: none;
  }
  .ti-hero-stat:last-child {
    grid-column: 1 / -1;
    border-top: 1px solid var(--border-md);
    border-right: none;
  }
  .ti-hero-stat-val {
    font-size: 1.25rem;
  }
  .ti-hero-stat-label {
    font-size: 0.75rem;
  }
  .ti-hero-bars {
    display: none;
  }
  .ti-breakdown {
    margin: 12px 0;
    gap: 8px;
  }
  .ti-breakdown-label {
    font-size: 0.78rem;
  }
  .ti-breakdown-val {
    font-size: 0.78rem;
  }
}

@media (max-width: 480px) {
  .ti-hero-visual {
    padding: 14px;
    border-radius: 10px;
    margin-bottom: 16px;
  }
  .ti-hero-stat-row {
    grid-template-columns: 1fr;
  }
  .ti-hero-stat {
    padding: 8px 12px;
    border-right: none;
    border-bottom: 1px solid var(--border-md);
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  .ti-hero-stat:last-child {
    border-bottom: none;
  }
  .ti-hero-stat-val {
    font-size: 1.125rem;
  }
  .ti-hero-stat-label {
    font-size: 0.75rem;
  }
  .ti-breakdown {
    margin: 10px 0;
    gap: 6px;
  }
  .ti-breakdown-row {
    grid-template-columns: 70px 1fr 50px;
    gap: 4px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   09. CATEGORY COLOR TOKENS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Tax/Paycheck category */
.tool-cat--tax {
  --tool-accent: #4338CA;
  --tool-accent-soft: rgba(67,56,202,0.08);
  --tool-accent-hover: #3730A3;
}

/* Conversion category */
.tool-cat--conversion {
  --tool-accent: #065F46;
  --tool-accent-soft: rgba(6,95,70,0.08);
  --tool-accent-hover: #054f39;
}

/* Hours/OT category */
.tool-cat--hours {
  --tool-accent: #B45309;
  --tool-accent-soft: rgba(180,83,9,0.08);
  --tool-accent-hover: #9a4800;
}

/* Benchmarking category */
.tool-cat--bench {
  --tool-accent: #6c5ce7;
  --tool-accent-soft: rgba(108,92,231,0.08);
  --tool-accent-hover: #574bd6;
}

/* Historical category */
.tool-cat--history {
  --tool-accent: #1E3A5F;
  --tool-accent-soft: rgba(30,58,95,0.08);
  --tool-accent-hover: #162d4a;
}

/* AI Script category */
.tool-cat--ai {
  --tool-accent: #4338CA;
  --tool-accent-soft: rgba(67,56,202,0.08);
  --tool-accent-hover: #3730A3;
}


/* ═══════════════════════════════════════════════════════════════════════════
   10. RESULT NUMBER DISPLAY
   ═══════════════════════════════════════════════════════════════════════════ */
.ti-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.ti-result-cell {
  padding: 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ti-result-cell--accent {
  background: var(--accent-soft);
  border-color: var(--border-warm, rgba(67,56,202,0.2));
}

.ti-result-cell--amber {
  background: var(--amber-soft);
  border-color: rgba(180,83,9,0.2);
}

.ti-result-cell--forest {
  background: var(--forest-soft);
  border-color: rgba(6,95,70,0.2);
}

.ti-cell-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--subtle);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1;
}

.ti-cell-val {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.ti-result-cell--accent .ti-cell-val { color: var(--accent); }
.ti-result-cell--amber  .ti-cell-val { color: var(--amber-accent); }
.ti-result-cell--forest .ti-cell-val { color: var(--forest); }

.ti-cell-sub {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.3;
}


/* ═══════════════════════════════════════════════════════════════════════════
   11. COMPARISON COLUMNS
   ═══════════════════════════════════════════════════════════════════════════ */
.ti-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 14px 0;
}

.ti-compare-col {
  border: 1.5px solid var(--border-md);
  border-radius: 14px;
  overflow: hidden;
}

.ti-compare-col--a { border-color: rgba(67,56,202,0.25); }
.ti-compare-col--b { border-color: rgba(180,83,9,0.25); }

.ti-compare-head {
  padding: 10px 14px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}

.ti-compare-col--a .ti-compare-head { color: var(--accent); background: var(--accent-soft); }
.ti-compare-col--b .ti-compare-head { color: var(--amber-accent); background: var(--amber-soft); }

.ti-compare-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
}

.ti-compare-row:last-child { border-bottom: none; }

.ti-compare-row-label { color: var(--muted); }
.ti-compare-row-val   { font-weight: 700; color: var(--text); }

.ti-compare-row--total {
  background: var(--bg-2);
  font-weight: 700;
}


/* ═══════════════════════════════════════════════════════════════════════════
   12. GAUGE / RANK BAR
   ═══════════════════════════════════════════════════════════════════════════ */
.ti-gauge {
  margin: 16px 0;
}

.ti-gauge-track {
  position: relative;
  height: 12px;
  background: var(--bg-3);
  border-radius: 99px;
  overflow: visible;
  margin-bottom: 8px;
}

.ti-gauge-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--amber-bright) 100%);
  transition: width 0.9s cubic-bezier(0.16,1,0.3,1);
  width: 0%;
}

.ti-gauge-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
  background: var(--accent);
  border: 3px solid var(--bg);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--accent-soft);
  transition: left 0.9s cubic-bezier(0.16,1,0.3,1);
  z-index: 2;
}

.ti-gauge-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--subtle);
}

.ti-gauge-pct {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.03em;
  line-height: 1;
}


/* ═══════════════════════════════════════════════════════════════════════════
   13. MOBILE RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .tool-page { padding: 24px 16px 60px; }
  .tool-title { font-size: 1.75rem; }

  .ti-result-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .ti-compare-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .ti-breakdown-row {
    grid-template-columns: 90px 1fr 60px;
    gap: 6px;
  }

  /* ti-hero-stat-row grid columns are controlled by the earlier
     mobile media blocks (repeat(2,1fr) at <=640px, 1fr at <=480px).
     Do NOT override here — a previous version of this block set
     repeat(3,1fr) which broke the 2-column mobile layout. */

  .ti-result-amount {
    font-size: 2.25rem;
  }

  .ti-calc-btn {
    height: 54px;
    font-size: 1rem;
  }

  .ti-live-preview.is-active {
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ti-calc-btn,
  .ti-input,
  .ti-select,
  .ti-preset-btn,
  .ti-breakdown-fill,
  .ti-gauge-fill,
  .ti-gauge-marker {
    transition: none;
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   SALARY HEATMAP — Global tokens + sticky table
   ═══════════════════════════════════════════════════════════════════════════ */

/* Heatmap color tokens (globally available) */
:root {
  --hm-accent:   #4338CA;
  --hm-accent-s: rgba(67,56,202,0.08);
  --hm-amber:    #B45309;
  --hm-amber-s:  rgba(180,83,9,0.08);
  --hm-forest:   #065F46;
  --hm-forest-s: rgba(6,95,70,0.08);
  --hm-danger:   #B91C1C;
  --hm-danger-s: rgba(185,28,28,0.08);
}

/* Scrollable table with sticky header */
.hm-table-scroll {
  max-height: 360px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.15) transparent;
  transition: max-height 0.4s cubic-bezier(0.16,1,0.3,1);
}
.hm-table-scroll.is-expanded { max-height: 2400px; }

.hm-table-scroll table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }

.hm-table-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #FFFFFF;
  border-bottom: 2px solid rgba(0,0,0,0.1);
  padding: 9px 14px;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #A8A29E;
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}

.hm-table-scroll tbody td {
  padding: 8px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  color: #3D4145;
  vertical-align: middle;
}

.hm-table-scroll tbody tr:last-child td { border-bottom: none; }
.hm-table-scroll tbody tr:hover td { background: rgba(67,56,202,0.05); }
.hm-table-scroll tbody tr.highlight-row td {
  background: rgba(67,56,202,0.08);
  font-weight: 600;
}
.hm-table-scroll td.is-you { color: #4338CA; font-weight: 700; }

/* Mini bar in table cells */
.hm-row-bar {
  display: inline-block;
  height: 4px;
  border-radius: 99px;
  vertical-align: middle;
  margin-left: 6px;
  opacity: 0.65;
  min-width: 4px;
}

@media (max-width: 640px) {
  .hm-table-scroll { max-height: 280px; }
}


/* ═══════════════════════════════════════════════════════════════
   SALARY HEATMAP — Global styles (Astro scoping override)
   These elements may be JS-rendered, so no :scope() needed
   ═══════════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════════════════════════════════
   SALARY HEATMAP — 2026 REDESIGN
   Warm Indigo on Cream · Flagship premium tool
   ═══════════════════════════════════════════════════════════════════════════ */

/* Heatmap-specific color tokens */
:root {
  --hm-accent:   #4338CA;
  --hm-accent-s: rgba(67,56,202,0.08);
  --hm-amber:    #B45309;
  --hm-amber-s:  rgba(180,83,9,0.08);
  --hm-forest:   #065F46;
  --hm-forest-s: rgba(6,95,70,0.08);
  --hm-danger:   #B91C1C;
  --hm-danger-s: rgba(185,28,28,0.08);
  --hm-purple:   #6c5ce7;
  --hm-radius: 20px;
}

/* ── LAYOUT ── */
/* Default: center within shell container (~1120px cap on desktop).
   Centered (not full-bleed) for readability on PC and mobile — input forms
   stay comfortable even at wide viewports. Override inline max-width
   that was scattering tools between 720/760/780/820. Add .calc-wrap--narrow
   modifier for tools that need an even tighter column (e.g. long scripts). */
.calc-wrap {
  max-width: var(--shell-max, 1120px);
  margin: 0 auto;
  padding: 0 var(--page-gutter, 16px) 64px;
}
.calc-wrap--narrow {
  max-width: 780px;
  margin: 0 auto;
}
@media (max-width: 640px) {
  .calc-wrap { padding: 0 16px 64px; }
}
@media (max-width: 400px) {
  .calc-wrap { padding: 0 12px 48px; }
}

/* ── INPUT CARD ── */
.sc-input-card {
  background: var(--ewm-card, #fff);
  border: 1.5px solid var(--ewm-border-2, rgba(0,0,0,0.14));
  border-radius: var(--hm-radius);
  box-shadow: 0 2px 16px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px;
}
@media (max-width: 580px) { .sc-input-card { padding: 18px; gap: 14px; border-radius: 16px; } }

/* ── PRESET BAR ── */
.sc-preset-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.preset-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ewm-subtle, #A8A29E); white-space: nowrap; }
.sc-preset-btn {
  padding: 6px 13px;
  border-radius: 99px;
  border: 1.5px solid rgba(67,56,202,0.25);
  background: var(--hm-accent-s);
  color: var(--hm-accent);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  /* Min 40px keeps the button above the cursor-crash zone on small preset
     pills and gives touch targets a 40px hit area. Combined with the
     1.5px border, the effective hit area is ~41.5px which clears the
     44px iOS touch minimum recommendation when paired with even 1-2px
     of vertical hover buffer. */
  min-height: 40px;
}
.sc-preset-btn:hover { background: rgba(67,56,202,0.14); border-color: rgba(67,56,202,0.45); }
/* No translateY on hover — see tax-estimator note about cursor-crash loop
   on small preset pills with shifting transform. Color + border only. */
.sc-preset-btn.active { background: var(--hm-accent); border-color: var(--hm-accent); color: #fff; }

/* ── GRID ── */
.calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.tool-grid-two { grid-template-columns: 1fr 1fr; }
@media (max-width: 520px) { .tool-grid-two { grid-template-columns: 1fr; } }
.calc-field { display: flex; flex-direction: column; gap: 7px; }
.calc-field label { font-size: 0.8rem; font-weight: 600; color: var(--ewm-text-2, #3D4145); }
.input-prefix {
  display: flex; align-items: center;
  gap: 0;
  border: 1.5px solid rgba(0,0,0,0.14);
  border-radius: 12px;
  background: var(--ewm-bg, #FAFAF8);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input-prefix:focus-within { border-color: var(--accent, #4338CA); box-shadow: 0 0 0 3px rgba(67,56,202,0.1); }
.input-prefix span { padding: 11px 12px 11px 13px; font-size: 1rem; font-weight: 600; color: var(--ewm-muted, #52575B); pointer-events: none; flex-shrink: 0; white-space: nowrap; border-right: 1px solid rgba(0,0,0,0.1); background: rgba(0,0,0,0.03); }
.input-prefix input { border: none; outline: none; background: transparent; padding: 11px 13px; margin-left: 40px; font-size: 1rem; font-weight: 600; font-family: inherit; color: var(--ewm-text, #1C1917); width: 100%; min-width: 0; }
.input-prefix input::placeholder { color: var(--ewm-subtle, #A8A29E); font-weight: 400; }
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }
select {
  padding: 11px 36px 11px 13px;
  border: 1.5px solid rgba(0,0,0,0.14);
  border-radius: 12px;
  background: var(--ewm-bg, #FAFAF8);
  font-size: 1rem;
  font-family: inherit;
  color: var(--ewm-text, #1C1917);
  cursor: pointer;
  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' fill='none'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%2352575B' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border-color 0.15s, box-shadow 0.15s;
}
select:focus { outline: none; border-color: var(--hm-accent); box-shadow: 0 0 0 3px var(--hm-accent-s); }

/* ── CALCULATE BUTTON ── */
.sc-calc-btn {
  width: 100%; padding: 15px 24px;
  border: none; border-radius: 14px;
  background: var(--hm-accent);
  color: #fff;
  font-size: 1rem; font-weight: 700; font-family: inherit;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: 0 2px 12px rgba(67,56,202,0.25);
  position: relative; overflow: hidden;
}
.sc-calc-btn::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, transparent 60%);
  pointer-events: none;
}
.sc-calc-btn:hover { background: #3730A3; box-shadow: 0 4px 20px rgba(67,56,202,0.32); }
.sc-calc-btn:active { transform: scale(0.98); box-shadow: none; }
.sc-calc-btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* ── RESULTS ── */
.hm-results {
  margin-top: 28px;
  animation: hm-results-in 0.35s cubic-bezier(0.16,1,0.3,1) forwards;
}
@keyframes hm-results-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) { .hm-results { animation: none; } }

/* Post-result ad zone — appears directly below the calculator result block.
   Reserve space even when empty (script pending) so layout doesn't shift
   when Journey by Mediavine approval arrives. */
.tool-post-result-ad {
  margin: 28px auto 8px;
  max-width: 728px;
  /* Wrapper reserves space when inner ad-zone is empty/script missing.
     Inner .ad-zone--post-result has 120px min-height when rendered. */
  min-height: 120px;
  display: block;
}
.tool-post-result-ad:has(.ad-zone) {
  /* When inner renders, wrapper just behaves as normal block container */
  min-height: 0;
}
@media (max-width: 640px) {
  .tool-post-result-ad { margin: 20px auto 0; min-height: 90px; }
}

/* ── HOME VERDICT — Premium card ── */
.hm-home-verdict {
  border-radius: 16px;
  border: 1.5px solid transparent;
  padding: 18px 22px;
  margin-bottom: 16px;
}
.hm-home-row { display: flex; align-items: flex-start; gap: 14px; }
.hm-home-icon { flex-shrink: 0; margin-top: 2px; }
.hm-home-copy { flex: 1; }
.hm-home-kicker {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--ewm-subtle, #A8A29E);
  margin-bottom: 5px;
}
.hm-home-value {
  font-family: var(--font-display, 'Plus Jakarta Sans', sans-serif);
  font-size: clamp(1.25rem, 3vw, 1.625rem);
  font-weight: 800; line-height: 1.15;
  letter-spacing: -0.02em; margin-bottom: 4px;
}
.hm-home-meta { font-size: 0.8rem; color: var(--ewm-muted, #52575B); }

/* ── RELOCATION SCENE ── */
.hm-relocate-scene { margin-bottom: 24px; }
.hm-relocate-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
}
.hm-relocate-kicker {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--hm-accent); margin-bottom: 5px;
}
.hm-relocate-title { font-size: 1rem; font-weight: 700; color: var(--ewm-text, #1C1917); margin-bottom: 3px; }
.hm-relocate-copy { font-size: 0.82rem; color: var(--ewm-muted, #52575B); line-height: 1.5; max-width: 320px; }

/* 3-column comparison cards */
.hm-relocate-cards {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin-bottom: 16px;
}
@media (max-width: 600px) { .hm-relocate-cards { grid-template-columns: 1fr; gap: 8px; } }

.hm-relocate-card {
  background: var(--ewm-bg-2, #F4F3EF);
  border: 1.5px solid rgba(0,0,0,0.1);
  border-radius: 14px; padding: 14px 16px;
}
.hm-relocate-card--current {
  border-color: rgba(67,56,202,0.25);
  background: var(--hm-accent-s);
}
.hm-relocate-card--best {
  border-color: rgba(6,95,70,0.3);
  background: var(--hm-forest-s);
}
.hm-relocate-card--worst {
  border-color: rgba(185,28,28,0.2);
  background: var(--hm-danger-s);
}
.hm-relocate-label {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ewm-subtle, #A8A29E); margin-bottom: 6px;
}
.hm-relocate-card--current .hm-relocate-label { color: var(--hm-accent); }
.hm-relocate-card--best    .hm-relocate-label { color: var(--hm-forest); }
.hm-relocate-card--worst   .hm-relocate-label { color: var(--hm-danger); }

.hm-relocate-value {
  font-family: var(--font-display, 'Plus Jakarta Sans', sans-serif);
  font-size: 1.35rem; font-weight: 800;
  color: var(--ewm-text, #1C1917);
  letter-spacing: -0.02em; margin-bottom: 4px; line-height: 1;
}
.hm-relocate-card--current .hm-relocate-value { color: var(--hm-accent); }
.hm-relocate-card--best    .hm-relocate-value { color: var(--hm-forest); }
.hm-relocate-card--worst   .hm-relocate-value { color: var(--hm-danger); }

.hm-relocate-note { font-size: 0.75rem; color: var(--ewm-muted, #52575B); line-height: 1.45; }

/* ── COMPARISON TRACK — Premium redesign ── */
.hm-relocate-track-shell {
  background: var(--ewm-bg-2, #F4F3EF);
  border: 1px solid rgba(0,0,0,0.09);
  border-radius: 14px; padding: 18px 22px; margin-bottom: 12px;
}
.hm-track-label {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--ewm-subtle, #A8A29E);
  margin-bottom: 14px;
}
.hm-relocate-track {
  position: relative; height: 10px;
  background: linear-gradient(90deg, var(--hm-danger-s) 0%, var(--hm-amber-s) 40%, var(--hm-forest-s) 75%, var(--hm-accent-s) 100%);
  border-radius: 99px; overflow: visible;
  border: 1px solid rgba(0,0,0,0.08);
}
/* Gradient bar fill */
.hm-track-fill {
  position: absolute; left: 0; top: 0; height: 100%;
  background: linear-gradient(90deg, #B91C1C 0%, #B45309 35%, #065F46 70%, #4338CA 100%);
  border-radius: 99px; opacity: 0.3;
  width: 100%;
}
.hm-relocate-pin {
  position: absolute; top: 50%;
  transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 0;
  z-index: 2;
}
.hm-relocate-pin-dot {
  width: 16px; height: 16px; border-radius: 50%;
  border: 3px solid var(--ewm-bg, #FAFAF8);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.hm-relocate-pin--current .hm-relocate-pin-dot { background: var(--hm-accent); }
.hm-relocate-pin--best    .hm-relocate-pin-dot { background: var(--hm-forest); }
.hm-relocate-pin--worst   .hm-relocate-pin-dot { background: var(--hm-danger); }

.hm-relocate-pin-text {
  font-size: 0.62rem; font-weight: 700;
  color: var(--ewm-muted, #52575B);
  white-space: nowrap; margin-top: 5px;
}
.hm-relocate-pin--current .hm-relocate-pin-text { color: var(--hm-accent); }
.hm-relocate-pin--best    .hm-relocate-pin-text { color: var(--hm-forest); }
.hm-relocate-pin--worst   .hm-relocate-pin-text { color: var(--hm-danger); }

.hm-relocate-foot {
  font-size: 0.82rem; color: var(--ewm-text-2, #3D4145);
  line-height: 1.55; margin-top: 12px;
  padding-top: 10px; border-top: 1px solid rgba(0,0,0,0.07);
}

/* ── LEGEND ── */
.hm-legend {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 10px; margin-bottom: 16px; padding: 10px 14px;
  background: var(--ewm-bg-2, #F4F3EF);
  border-radius: 10px; border: 1px solid rgba(0,0,0,0.08);
}
.hm-legend-label { font-size: 0.72rem; font-weight: 700; color: var(--ewm-text-2, #3D4145); margin-right: 4px; }
.hm-legend-item { display: flex; align-items: center; gap: 6px; }
.hm-legend-swatch { width: 10px; height: 10px; border-radius: 3px; }
.hm-legend-swatch.low  { background: var(--hm-danger); }
.hm-legend-swatch.mid  { background: var(--hm-amber); }
.hm-legend-swatch.high { background: var(--hm-forest); }
.hm-legend-swatch.top  { background: var(--hm-accent); }
.hm-legend-copy { font-size: 0.75rem; color: var(--ewm-text-2, #3D4145); }

/* ── RANK GRID ── */
.hm-rank-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 14px; margin-bottom: 24px;
}
@media (max-width: 580px) { .hm-rank-grid { grid-template-columns: 1fr; } }

.hm-rank-section {
  border: 1.5px solid rgba(0,0,0,0.1);
  border-radius: 14px; overflow: hidden;
}
.hm-rank-section--best  { border-color: rgba(6,95,70,0.25); }
.hm-rank-section--worst { border-color: rgba(185,28,28,0.2); }

.hm-rank-title {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; padding: 10px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  background: var(--ewm-bg-2, #F4F3EF);
}
.hm-rank-section--best  .hm-rank-title { color: var(--hm-forest); background: var(--hm-forest-s); border-color: rgba(6,95,70,0.15); }
.hm-rank-section--worst .hm-rank-title { color: var(--hm-danger); background: var(--hm-danger-s); border-color: rgba(185,28,28,0.1); }

.hm-rank-list { display: flex; flex-direction: column; }
.hm-rank-item {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 8px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: background 0.12s;
}
.hm-rank-item:last-child { border-bottom: none; }
.hm-rank-item:hover { background: var(--ewm-bg-2, #F4F3EF); }

.hm-rank-left { display: flex; align-items: center; gap: 8px; }
.hm-rank-rank {
  font-size: 0.72rem; font-weight: 800;
  min-width: 28px; padding: 2px 6px;
  border-radius: 99px; text-align: center;
  background: var(--hm-forest-s); color: var(--hm-forest);
}
.hm-rank-section--worst .hm-rank-rank {
  background: var(--hm-danger-s); color: var(--hm-danger);
}
.hm-rank-name  { font-size: 0.84rem; font-weight: 600; color: var(--ewm-text, #1C1917); }
.hm-rank-value { font-size: 0.84rem; font-weight: 800; }
.hm-rank-section--best  .hm-rank-value { color: var(--hm-forest); }
.hm-rank-section--worst .hm-rank-value { color: var(--hm-danger); }

/* ── FULL TABLE — Scrollable with max-height + toggle ── */
.hm-table-section {
  border: 1.5px solid rgba(0,0,0,0.1);
  border-radius: 14px; overflow: hidden;
  margin-bottom: 20px;
}
.hm-table-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 16px;
  background: var(--ewm-bg-2, #F4F3EF);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  flex-wrap: wrap;
}
.hm-table-title {
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ewm-text-2, #3D4145);
}
.hm-table-toggle {
  font-size: 0.75rem; font-weight: 600; color: var(--hm-accent);
  background: none; border: none; cursor: pointer;
  padding: 3px 8px; border-radius: 6px;
  transition: background 0.15s;
}
.hm-table-toggle:hover { background: var(--hm-accent-s); }

.hm-table-scroll {
  max-height: 360px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.15) transparent;
  transition: max-height 0.35s ease;
}
.hm-table-scroll.is-expanded { max-height: 2000px; }

/* Sticky header inside scroll */
.hm-table-scroll table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.hm-table-scroll thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--ewm-card, #fff);
  border-bottom: 2px solid rgba(0,0,0,0.1);
  padding: 9px 14px; text-align: left;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--ewm-subtle, #A8A29E);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}
.hm-table-scroll tbody td {
  padding: 8px 14px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  color: var(--ewm-text-2, #3D4145);
  vertical-align: middle;
}
.hm-table-scroll tbody tr:last-child td { border-bottom: none; }
.hm-table-scroll tbody tr:hover td { background: var(--hm-accent-s); }
.hm-table-scroll tbody tr.highlight-row td {
  background: rgba(67,56,202,0.07);
  font-weight: 600;
}
.hm-table-scroll td.is-you { color: var(--hm-accent); font-weight: 700; }

/* Row bar mini visualization */
.hm-row-bar {
  display: inline-block; height: 5px; border-radius: 99px;
  vertical-align: middle; margin-left: 6px; opacity: 0.7;
}

/* ── VALUE BADGE ── */
.hm-tax-badge {
  display: inline-flex; align-items: center;
  padding: 1px 6px; border-radius: 99px;
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--hm-forest-s); color: var(--hm-forest);
  border: 1px solid rgba(6,95,70,0.2);
  margin-left: 4px; vertical-align: middle;
}

/* ── POST-CALC ── */
.post-calc-row { display: flex; gap: 8px; margin: 16px 0; flex-wrap: wrap; }
.btn-copy-result, .btn-share-result {
  padding: 8px 16px;
  border: 1.5px solid rgba(0,0,0,0.14);
  border-radius: 10px;
  background: var(--ewm-bg, #FAFAF8);
  color: var(--ewm-text-2, #3D4145);
  font-size: 0.82rem; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: all 0.15s;
}
.btn-copy-result:hover, .btn-share-result:hover {
  border-color: var(--hm-accent); color: var(--hm-accent);
}

/* ── UPSELL ── */
.calc-upsell {
  background: var(--hm-accent-s);
  border: 1.5px solid rgba(67,56,202,0.2);
  border-radius: 12px; padding: 14px 18px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin: 16px 0;
}
.calc-upsell-text { font-size: 0.875rem; color: var(--ewm-text-2, #3D4145); }
.calc-upsell-link {
  font-size: 0.82rem; font-weight: 700; color: var(--hm-accent);
  white-space: nowrap; text-decoration: none; transition: color 0.15s;
}
.calc-upsell-link:hover { color: #3730A3; }

/* ── CALC NEXT STEPS ─────────────────────────────────────── */
/* Shown after successful calculation via tool-interactions.js observer */
.calc-next-steps {
  display: none;
  margin: 24px 0 0;
  padding: 18px 20px;
  background: var(--ewm-bg-2, #f7f7f5);
  border: 1px solid var(--ewm-border, #e2e8f0);
  border-radius: 12px;
}
.calc-next-steps.is-visible {
  display: block;
}
.calc-next-steps__label {
  font-family: var(--ewm-font-display, inherit);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--ewm-accent, #7c3aed);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 12px;
}
.calc-next-steps__items {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.calc-next-steps__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 13px;
  background: var(--ewm-bg, #fafaf8);
  border: 1px solid var(--ewm-border, #e2e8f0);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.calc-next-steps__item:hover {
  border-color: var(--ewm-accent, #7c3aed);
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.08);
}
.calc-next-steps__item-label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ewm-text, #1a1a1a);
}
.calc-next-steps__item-sub {
  font-size: 0.8125rem;
  color: var(--ewm-muted, #6b7280);
  line-height: 1.4;
}
@media (max-width: 640px) {
  .calc-next-steps { padding: 14px 16px; margin-top: 18px; }
  .calc-next-steps__item { padding: 8px 12px; }
}



/* ── CROSS-TOOL BANNER ── */
.cross-tool-banner {
  background: var(--hm-amber-s);
  border: 1.5px solid rgba(180,83,9,0.2);
  border-radius: 12px; padding: 11px 16px; margin-bottom: 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.cross-tool-banner-text { font-size: 0.84rem; color: var(--ewm-text-2, #3D4145); }
.cross-tool-banner-text strong { color: var(--ewm-text, #1C1917); }
.cross-tool-banner-link {
  font-size: 0.82rem; font-weight: 700; color: var(--hm-amber);
  white-space: nowrap; text-decoration: none; transition: opacity 0.15s;
}
.cross-tool-banner-link:hover { opacity: 0.8; }

/* ── CALC ERROR ── */
.calc-error {
  padding: 10px 14px;
  background: rgba(185,28,28,0.08); border: 1.5px solid rgba(185,28,28,0.25);
  border-radius: 10px; font-size: 0.875rem; color: var(--hm-danger);
}

/* ── MOBILE ── */
@media (max-width: 640px) {
  .hm-table-scroll { max-height: 280px; }
  .hm-relocate-value { font-size: 1.15rem; }
  .hm-home-value { font-size: 1.25rem; }
}
