/* ===== TOOL TABS ===== */
.tool-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--sand);
  padding-bottom: 0;
  margin-bottom: 0;
}
.tool-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.25rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--mid);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: -1px;
  border-radius: 0;
  white-space: nowrap;
}
.tool-tab svg { flex-shrink: 0; }
.tool-tab:hover { color: var(--forest); }
.tool-tab.active {
  color: var(--forest);
  border-bottom-color: var(--copper);
}

/* ===== TOOL PANEL ===== */
.tool-panel { padding: 3rem 0; }

/* ===== TOOL GRID ===== */
.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

/* ===== TOOL INPUTS ===== */
.tool-title {
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  margin-bottom: 0.5rem;
}
.label-hint {
  font-weight: 400;
  color: var(--mid);
  font-size: 0.82rem;
}

/* ===== RESULT CARDS ===== */
.tool-results {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.result-card {
  background: var(--cream);
  border: 1px solid var(--sand);
  border-radius: 16px;
  padding: 1.1rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  transition: background 0.2s;
}
.result-card.primary {
  background: var(--forest);
  border-color: var(--forest);
}
.result-card.saving { border-color: rgba(31,107,79,0.25); background: rgba(31,107,79,0.06); }
.result-label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--mid);
}
.result-card.primary .result-label { color: rgba(255,255,255,0.65); }
.result-card.saving .result-label { color: var(--moss); }
.result-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--forest);
  line-height: 1;
}
.result-card.primary .result-value { color: var(--copper-lt); }
.result-card.saving .result-value { color: var(--moss); }

/* ===== TOOL CTA NOTE ===== */
.tool-cta-note {
  background: rgba(201,169,106,0.08);
  border: 1px solid rgba(201,169,106,0.22);
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  margin-top: 0.5rem;
}
.tool-cta-note p { color: var(--mid); font-size: 0.88rem; margin-bottom: 0.85rem; }
.tool-cta-note p:last-child { margin-bottom: 0; }

/* ===== REPAYMENT BAR ===== */
.repayment-bar-wrap { padding: 0.75rem 0; }
.repayment-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--mid);
  margin-bottom: 0.4rem;
}
.repayment-bar {
  display: flex;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--sand);
}
.repayment-bar-capital {
  background: var(--forest);
  transition: width 0.4s ease;
}
.repayment-bar-interest {
  background: var(--copper);
  transition: width 0.4s ease;
  flex: 1;
}

/* ===== STAMP DUTY BREAKDOWN ===== */
.sd-breakdown { font-size: 0.9rem; }
.sd-row {
  display: flex;
  justify-content: space-between;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--sand);
  color: var(--mid);
}
.sd-row:last-child { border-bottom: none; font-weight: 700; color: var(--forest); }
.sd-row span:last-child { font-weight: 600; color: var(--forest); }

/* ===== JOURNEY ===== */
.journey {
  display: flex;
  align-items: flex-start;
  gap: 0;
  position: relative;
}
.journey-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 0.75rem;
  position: relative;
}
.journey-num {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--forest);
  color: var(--copper-lt);
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}
.journey-icon {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 16px;
  background: rgba(15,27,45,0.06);
  display: grid;
  place-items: center;
  color: var(--forest);
  margin-bottom: 0.9rem;
  transition: background 0.25s, color 0.25s;
}
.journey-step:hover .journey-icon {
  background: rgba(201,169,106,0.16);
  color: var(--copper);
}
.journey-step h4 {
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
}
.journey-step p {
  font-size: 0.85rem;
  color: var(--mid);
  line-height: 1.55;
  margin: 0;
}
.journey-connector {
  width: 2rem;
  height: 2px;
  background: var(--sand);
  margin-top: 1rem;
  flex-shrink: 0;
  position: relative;
}
.journey-connector::after {
  content: '';
  position: absolute;
  right: -4px;
  top: -4px;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 6px solid var(--sand);
}

@media (max-width: 980px) {
  .tool-grid { grid-template-columns: 1fr; }
  .journey { flex-direction: column; align-items: stretch; gap: 0.5rem; }
  .journey-step { flex-direction: row; text-align: left; align-items: flex-start; gap: 1rem; padding: 0.75rem 0; }
  .journey-step h4 { margin-bottom: 0.25rem; }
  .journey-num { flex-shrink: 0; margin-bottom: 0; margin-top: 0.2rem; }
  .journey-icon { display: none; }
  .journey-connector { width: 2px; height: 1.5rem; margin: 0 0 0 0.9rem; }
  .journey-connector::after { display: none; }
}
@media (max-width: 720px) {
  .tool-tabs { gap: 0.25rem; }
  .tool-tab { padding: 0.7rem 0.85rem; font-size: 0.82rem; }
  .tool-tab svg { display: none; }
}
