/* SIP insight UX — LTCG tax + inflation, 3-input grid (1 col mobile / 3 col desktop) */

.sip-insight-scope {
  font-family: var(--sans, "Source Sans 3", system-ui, sans-serif);
}

body.sip-page {
  font-family: var(--sans, "Source Sans 3", system-ui, sans-serif);
}

/* Slim hero: hide topline, kicker, guide link; tighten title/subtitle */
body.sip-page .hero-theme-sip--slim .sip-hero-topline,
body.sip-page .hero-theme-sip--slim .hero-kicker,
body.sip-page .hero-theme-sip--slim .sip-hero-guide-link {
  display: none !important;
}

body.sip-page .hero-theme-sip--slim .hero-stage-inner.hero-page-layout {
  padding: 6px 0 4px !important;
  border-bottom: none !important;
}

body.sip-page .hero-theme-sip--slim .hero-title-compact {
  margin: 0 0 4px;
}

body.sip-page .hero-theme-sip--slim .hero-title-main {
  font-family: var(--display, "Fraunces", Georgia, serif);
  font-size: clamp(1.35rem, 2.8vw, 1.75rem) !important;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.15;
  white-space: normal;
}

body.sip-page .hero-theme-sip--slim .hero-subtitle-compact {
  display: block !important;
  margin-top: 4px !important;
  max-width: 36rem;
  font-size: 0.875rem !important;
  line-height: 1.45;
  color: #64748b;
}

/* Density: page + open calc shell */
body.sip-page .page {
  padding-left: 16px !important;
  padding-right: 16px !important;
  padding-bottom: 40px !important;
}

body.sip-page .page-breadcrumb {
  padding: 8px 0 10px !important;
}

body.sip-page .calc-page-stack {
  margin-bottom: 20px !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  overflow: visible !important;
}

body.sip-page .calc-page-stack > .calc-shell {
  border-top: none !important;
  padding: 0 0 18px !important;
  background: transparent !important;
  max-width: none;
}

body.sip-page .sip-calc-primary {
  margin: 0 !important;
  padding: 8px 0 4px !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  width: 100%;
  max-width: none;
}

body.sip-page .sip-calc-primary .zone-core .zone-label,
body.sip-page .sip-calc-primary .zone-first-result .zone-label {
  display: none !important;
}

/* 3 inputs: always stacked vertically (uses space below; mobile-friendly) */
body.sip-page .sip-calc-primary .sip-core-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 10px !important;
  max-width: 28rem;
}

body.sip-page .sip-calc-primary .field-compact {
  margin: 0;
  min-width: 0;
}

body.sip-page .sip-calc-primary .field-compact label {
  margin-bottom: 5px !important;
  font-size: 0.625rem !important;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #64748b;
  line-height: 1.25;
}

body.sip-page .sip-calc-primary .field-compact .field-hint,
body.sip-page .sip-preset-row {
  display: none !important;
}

body.sip-page .sip-calc-primary .sip-input-stepper {
  border-radius: 12px;
  min-height: 42px;
}

body.sip-page .sip-calc-primary .sip-input-stepper input[type="number"] {
  padding: 8px 2px !important;
  font-size: 0.95rem !important;
  font-weight: 700;
  min-width: 0;
}

body.sip-page .sip-calc-primary .sip-input-stepper .sip-step-btn {
  flex: 0 0 34px;
  min-height: 40px;
  font-size: 1rem;
}

body.sip-page .sip-calc-primary .zone-first-result {
  margin-top: 10px !important;
  padding-top: 10px !important;
}

/* Insight block */
body.sip-page .sip-insight {
  margin: 8px 0 0 !important;
  padding: 10px 0 8px !important;
  border: none;
  background: transparent;
  width: 100%;
}

body.sip-page .sip-insight-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

body.sip-page .sip-insight-title {
  margin: 0;
  font-family: var(--display, "Fraunces", Georgia, serif);
  font-size: 1.05rem;
  font-weight: 650;
  color: #10231d;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

body.sip-page .sip-insight-sub {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.4;
}

/* Assumptions pill + sheet */
body.sip-page .sip-assume-pill {
  appearance: none;
  border: 1px solid #d6e4de;
  background: #fff;
  color: #0f7558;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 5px 10px 5px 11px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 650;
  cursor: pointer;
  line-height: 1.2;
}

body.sip-page .sip-assume-pill[aria-expanded="true"] {
  background: #e8f7f1;
  border-color: #1d9e75;
  box-shadow: inset 0 0 0 1px rgba(29, 158, 117, 0.2);
}

body.sip-page .sip-assume-pill-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(29, 158, 117, 0.1);
  font-size: 0.7rem;
}

body.sip-page .sip-assume-sheet {
  margin: 0 0 8px;
  padding: 6px;
  border-radius: 10px;
  background: transparent;
  border: none;
}

body.sip-page .sip-assume-sheet[hidden] {
  display: none !important;
}

body.sip-page .sip-assume-sheet-head {
  display: none !important;
}

body.sip-page .sip-assume-sheet-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

body.sip-page .sip-assume-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border: 1px solid #e2ebe7;
  border-radius: 10px;
  background: #fff;
}

body.sip-page .sip-assume-pop-label {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #475569;
}

body.sip-page .sip-chip-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  border: 1px solid #d7e3de;
  border-radius: 8px;
  overflow: hidden;
  background: #f8fbfa;
}

body.sip-page .sip-chip {
  appearance: none;
  flex: 1 1 0;
  min-width: 0;
  min-height: 30px;
  padding: 3px 2px;
  border: 0;
  border-right: 1px solid #e7efeb;
  border-radius: 0;
  background: transparent;
  color: #52645e;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 650;
  cursor: pointer;
}

body.sip-page .sip-chip:last-child {
  border-right: 0;
}

body.sip-page .sip-chip.is-active {
  background: #e8f7f1;
  color: #0f7558;
}

/* Retain rail — kept / tax / inflation (tax = yellow-orange like RD) */
body.sip-page .sip-retain {
  margin: 0 0 8px;
}

body.sip-page .sip-retain-rail {
  display: flex;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.05);
}

body.sip-page .sip-retain-seg {
  display: block;
  min-width: 0;
  height: 100%;
  transition: flex-grow 0.28s ease, opacity 0.2s ease;
}

body.sip-page .sip-retain-seg--kept {
  background: linear-gradient(90deg, #34d399, #1d9e75 55%, #0f7558);
  flex-grow: 70;
}

body.sip-page .sip-retain-seg--tax {
  background: linear-gradient(90deg, #fbbf24, #d97706);
  flex-grow: 12;
}

body.sip-page .sip-retain-seg--inf {
  background: linear-gradient(90deg, #fda4af, #e11d48);
  flex-grow: 18;
}

/* Journey cards */
body.sip-page .sip-journey {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

body.sip-page .sip-journey-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: #fff;
}

body.sip-page .sip-journey-card[data-step="today"] {
  border-color: rgba(29, 158, 117, 0.2);
  box-shadow: 0 4px 14px rgba(15, 117, 88, 0.06);
}

body.sip-page .sip-journey-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

body.sip-page .sip-journey-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 650;
  color: #334155;
}

body.sip-page .sip-journey-trend {
  display: inline-flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 0.75rem;
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

body.sip-page .sip-journey-card--up .sip-journey-trend {
  background: rgba(29, 158, 117, 0.12);
  color: #0f766e;
}

body.sip-page .sip-journey-card.is-loss .sip-journey-trend {
  background: rgba(239, 68, 68, 0.1);
  color: #b91c1c;
}

body.sip-page .sip-impact-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(180, 83, 9, 0.08);
  color: #92400e;
  font-size: 0.6875rem;
  font-weight: 700;
}

body.sip-page .sip-journey-card--up .sip-impact-badge {
  background: rgba(29, 158, 117, 0.1);
  color: #0f7558;
}

body.sip-page .sip-journey-amount {
  font-size: clamp(1.12rem, 3vw, 1.3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

body.sip-page .sip-journey-note {
  font-size: 0.66rem;
  color: #94a3b8;
  line-height: 1.35;
}

body.sip-page .sip-journey-bridge {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 14px;
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 700;
}

/* Verdict pill */
body.sip-page .sip-verdict {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 7px;
  margin-top: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  line-height: 1.2;
}

body.sip-page .sip-verdict-mark { font-size: 0.8rem; font-weight: 700; }
body.sip-page .sip-verdict-title { font-size: 0.78rem; font-weight: 700; }
body.sip-page .sip-verdict-sep { opacity: 0.45; font-weight: 700; }
body.sip-page .sip-verdict-meta { font-size: 0.72rem; font-weight: 500; }
body.sip-page .sip-verdict-meta strong {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

body.sip-page .sip-verdict[data-tone="gain"] {
  background: rgba(29, 158, 117, 0.1);
  border-color: rgba(29, 158, 117, 0.18);
  color: #0f7558;
}

body.sip-page .sip-verdict[data-tone="loss"] {
  background: rgba(185, 28, 28, 0.07);
  border-color: rgba(185, 28, 28, 0.14);
  color: #9f1239;
}

body.sip-page .sip-verdict[data-tone="flat"],
body.sip-page .sip-verdict[data-tone="off"] {
  background: rgba(100, 116, 139, 0.08);
  border-color: rgba(100, 116, 139, 0.14);
  color: #475569;
}

/* Chart / exit / CTA width alignment */
body.sip-page #sip-chart-zone,
body.sip-page .sip-exit,
body.sip-page .sip-decision-cta {
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: 100%;
}

body.sip-page #sip-chart-zone {
  margin-top: 12px !important;
  padding-top: 12px !important;
}

body.sip-page .sip-exit {
  margin: 14px 0 4px !important;
  padding: 12px 0 4px !important;
  box-sizing: border-box;
}

/* Same content width for calc + guide / learn / FAQ blocks */
body.sip-page .calc-page-stack,
body.sip-page .content-bridge,
body.sip-page .below-fold-panel,
body.sip-page .sip-guide,
body.sip-page .sip-faq-section,
body.sip-page #sip-faq.faq-section {
  max-width: none !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box;
}

body.sip-page .sip-guide {
  margin-top: 20px !important;
}

body.sip-page .sip-guide-lead {
  max-width: none !important;
}

body.sip-page .content-bridge,
body.sip-page .below-fold-panel,
body.sip-page .sip-faq-section,
body.sip-page #sip-faq.faq-section {
  margin-top: 18px !important;
}

@media (min-width: 720px) {
  body.sip-page .sip-assume-sheet-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
}

@media (min-width: 860px) {
  body.sip-page .page {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  body.sip-page .sip-calc-primary .sip-core-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    max-width: 32rem;
  }

  body.sip-page .sip-journey--impact {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
    align-items: stretch;
    gap: 8px;
  }

  body.sip-page .sip-journey-bridge {
    height: auto;
    align-self: center;
  }

  body.sip-page .sip-journey-bridge span {
    display: inline-flex;
    transform: rotate(-90deg);
  }
}

/* Mobile: assume-pill + chips sizing like RD */
@media (max-width: 720px) {
  body.sip-page .page {
    padding-left: 12px !important;
    padding-right: 12px !important;
    padding-bottom: 28px !important;
  }

  body.sip-page .hero-theme-sip--slim .hero-title-main {
    font-size: 1.2rem !important;
  }

  body.sip-page .hero-theme-sip--slim .hero-subtitle-compact {
    font-size: 0.8125rem !important;
  }

  body.sip-page .sip-calc-primary .sip-core-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  body.sip-page .sip-calc-primary .sip-input-stepper .sip-step-btn {
    flex: 0 0 32px;
    min-height: 40px;
  }

  body.sip-page .sip-calc-primary .sip-input-stepper input[type="number"] {
    font-size: 0.9rem !important;
  }

  body.sip-page .sip-calc-primary .zone-first-result {
    margin-top: 8px !important;
    padding-top: 8px !important;
  }

  body.sip-page .sip-insight-head {
    flex-direction: column;
    align-items: stretch;
  }

  body.sip-page .sip-assume-pill {
    align-self: flex-start;
    min-height: 36px !important;
  }

  body.sip-page .sip-chip {
    min-height: 32px !important;
  }

  body.sip-page .sip-journey-card {
    padding: 10px !important;
  }
}
