/* ============================================================
   THINK2INVEST — CALCULATORS CSS
   Hub page, category pages, individual calculator pages
   Fully responsive + dark mode via CSS custom properties
   ============================================================ */

/* ── COLOR ALIASES ─────────────────────────────────────── */
:root {
  --calc-blue:        #2563eb;
  --calc-blue-bg:     #eff6ff;
  --calc-blue-border: #bfdbfe;
  --calc-green:       var(--t2i-green);
  --calc-green-bg:    var(--t2i-green-light);
  --calc-green-border:var(--t2i-green-border);
  --calc-amber:       #d97706;
  --calc-amber-bg:    #fffbeb;
  --calc-amber-border:#fde68a;
  --calc-purple:      #7c3aed;
  --calc-purple-bg:   #f5f3ff;
  --calc-purple-border:#ddd6fe;
  --calc-rose:        #e11d48;
  --calc-rose-bg:     #fff1f2;
  --calc-rose-border: #fecdd3;
}

body.dark-mode,
body[data-theme="dark"],
html[data-theme="dark"] body,
@media (prefers-color-scheme: dark) {
  body:not(.light-mode):not([data-theme="light"]) {
    --calc-blue-bg:      #1e3a5f;
    --calc-blue-border:  #1d4ed8;
    --calc-amber-bg:     #2d1f08;
    --calc-amber-border: #92400e;
    --calc-purple-bg:    #2e1065;
    --calc-purple-border:#6d28d9;
    --calc-rose-bg:      #4c0519;
    --calc-rose-border:  #be123c;
  }
}

[data-theme="dark"] {
  --calc-blue-bg:      #1e3a5f;
  --calc-blue-border:  #1d4ed8;
  --calc-amber-bg:     #2d1f08;
  --calc-amber-border: #92400e;
  --calc-purple-bg:    #2e1065;
  --calc-purple-border:#6d28d9;
  --calc-rose-bg:      #4c0519;
  --calc-rose-border:  #be123c;
}

/* ── COLOR HELPER CLASSES ───────────────────────────────── */
.calc-color-blue   { --cc: var(--calc-blue);   --cc-bg: var(--calc-blue-bg);   --cc-border: var(--calc-blue-border); }
.calc-color-green  { --cc: var(--calc-green);  --cc-bg: var(--calc-green-bg);  --cc-border: var(--calc-green-border); }
.calc-color-amber  { --cc: var(--calc-amber);  --cc-bg: var(--calc-amber-bg);  --cc-border: var(--calc-amber-border); }
.calc-color-purple { --cc: var(--calc-purple); --cc-bg: var(--calc-purple-bg); --cc-border: var(--calc-purple-border); }
.calc-color-rose   { --cc: var(--calc-rose);   --cc-bg: var(--calc-rose-bg);   --cc-border: var(--calc-rose-border); }

/* ============================================================
   HUB PAGE — HERO
   ============================================================ */
.calc-hub-hero {
  background: var(--t2i-surface);
  border-bottom: 1px solid var(--t2i-border);
  padding: 64px 0 48px;
}

.calc-hero-inner {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 48px;
  align-items: center;
}

.calc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--t2i-green);
  margin-bottom: 16px;
}

.calc-eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--t2i-green);
  animation: pulse-dot 2s ease infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(1.4); }
}

.calc-hero-title {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.18;
  margin-bottom: 16px;
  color: var(--t2i-ink);
}

.calc-hero-accent {
  color: var(--t2i-green);
  position: relative;
}

.calc-hero-sub {
  font-size: 17px;
  color: var(--t2i-muted);
  line-height: 1.65;
  max-width: 520px;
  margin-bottom: 28px;
}

.calc-hero-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.calc-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.calc-stat strong {
  font-size: 22px;
  font-weight: 700;
  color: var(--t2i-green);
  font-family: 'Inter', sans-serif;
}

.calc-stat span {
  font-size: 12px;
  color: var(--t2i-muted);
  font-weight: 500;
}

.calc-stat-div {
  width: 1px;
  height: 32px;
  background: var(--t2i-border);
}

/* ── SEARCH BOX ── */
.calc-hero-search {
  position: relative;
}

.calc-search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--t2i-card);
  border: 1.5px solid var(--t2i-border);
  border-radius: var(--t2i-radius-lg);
  padding: 12px 16px;
  box-shadow: var(--t2i-shadow);
  transition: border-color .2s, box-shadow .2s;
}

.calc-search-wrap:focus-within {
  border-color: var(--t2i-green);
  box-shadow: 0 0 0 3px rgba(26,143,78,.15), var(--t2i-shadow);
}

.calc-search-wrap svg { color: var(--t2i-muted); flex-shrink: 0; }

.calc-search-wrap input {
  flex: 1;
  border: none;
  background: none;
  font-size: 15px;
  color: var(--t2i-body);
  padding: 0;
  width: 100%;
}

.calc-search-wrap input:focus { outline: none; box-shadow: none; border: none; }

.calc-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--t2i-card);
  border: 1px solid var(--t2i-border);
  border-radius: var(--t2i-radius);
  box-shadow: var(--t2i-shadow-md);
  z-index: 100;
  max-height: 340px;
  overflow-y: auto;
}

.calc-sr-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--t2i-border);
  text-decoration: none;
  transition: background .15s;
}

.calc-sr-item:last-child { border-bottom: none; }
.calc-sr-item:hover { background: var(--t2i-surface); }

.calc-sr-name { font-size: 14px; font-weight: 500; color: var(--t2i-ink); }
.calc-sr-cat  { font-size: 11px; font-weight: 600; color: var(--cc, var(--t2i-green)); background: var(--cc-bg, var(--t2i-green-light)); padding: 2px 8px; border-radius: 100px; }
.calc-sr-empty { padding: 16px; text-align: center; color: var(--t2i-muted); font-size: 14px; }

.calc-quick-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.calc-quick-label {
  font-size: 12px;
  color: var(--t2i-muted);
  font-weight: 500;
}

.calc-quick-links a {
  font-size: 12px;
  font-weight: 500;
  color: var(--t2i-green);
  background: var(--t2i-green-light);
  padding: 3px 10px;
  border-radius: 100px;
  text-decoration: none;
  transition: background .15s;
}

.calc-quick-links a:hover { background: var(--t2i-green-border); }

/* ── FILTER TABS ── */
.calc-filter-bar {
  background: var(--t2i-card);
  border-bottom: 1px solid var(--t2i-border);
  position: sticky;
  top: 0;
  z-index: 80;
  box-shadow: var(--t2i-shadow-sm);
}

.calc-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 10px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.calc-tabs::-webkit-scrollbar { display: none; }

.calc-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 16px;
  border-radius: 100px;
  border: 1.5px solid transparent;
  background: transparent;
  color: var(--t2i-muted);
  cursor: pointer;
  transition: all .18s;
  font-family: 'Inter', sans-serif;
}

.calc-tab:hover { background: var(--t2i-surface); color: var(--t2i-ink); }

.calc-tab.active {
  background: var(--t2i-green);
  color: #fff;
  border-color: var(--t2i-green);
}

.calc-tab-icon { font-size: 14px; }

/* ── SECTIONS ── */
.calc-section { padding: 56px 0; border-bottom: 1px solid var(--t2i-border); }
.calc-section:last-of-type { border-bottom: none; }

.calc-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
}

.calc-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--cc, var(--t2i-green));
  background: var(--cc-bg, var(--t2i-green-light));
  border: 1px solid var(--cc-border, var(--t2i-green-border));
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 10px;
}

.calc-section-title {
  font-size: clamp(20px, 2.5vw, 26px);
  margin-bottom: 6px;
  color: var(--t2i-ink);
}

.calc-section-sub {
  font-size: 15px;
  color: var(--t2i-muted);
  margin: 0;
}

/* ── FEATURED GRID ── */
.calc-featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.calc-featured-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 20px;
  background: var(--cc-bg, var(--t2i-surface));
  border: 1.5px solid var(--cc-border, var(--t2i-border));
  border-radius: var(--t2i-radius-lg);
  text-decoration: none;
  transition: transform .18s, box-shadow .18s, border-color .18s;
  position: relative;
  overflow: hidden;
}

.calc-featured-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--cc, var(--t2i-green));
  border-radius: 3px 3px 0 0;
}

.calc-featured-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--t2i-shadow-md);
  border-color: var(--cc, var(--t2i-green));
  text-decoration: none;
}

.calc-featured-cat {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--cc, var(--t2i-green));
}

.calc-featured-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--t2i-ink);
  font-family: 'Playfair Display', serif;
  line-height: 1.3;
}

.calc-featured-desc {
  font-size: 13px;
  color: var(--t2i-muted);
  line-height: 1.5;
  flex: 1;
}

.calc-featured-cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--cc, var(--t2i-green));
  margin-top: 6px;
}

/* ── CALC CARD GRID ── */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.calc-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--t2i-card);
  border: 1px solid var(--t2i-border);
  border-radius: var(--t2i-radius);
  text-decoration: none;
  transition: all .18s;
  border-left: 3px solid var(--cc, var(--t2i-green));
}

.calc-card:hover {
  box-shadow: var(--t2i-shadow);
  transform: translateX(4px);
  border-color: var(--cc, var(--t2i-green));
  background: var(--t2i-surface);
  text-decoration: none;
}

.calc-card-inner { flex: 1; min-width: 0; }
.calc-card-name  { font-size: 14px; font-weight: 600; color: var(--t2i-ink); margin-bottom: 3px; }
.calc-card-desc  { font-size: 12px; color: var(--t2i-muted); line-height: 1.4; }
.calc-card-cta   { font-size: 11px; font-weight: 600; color: var(--cc, var(--t2i-green)); margin-top: 6px; }
.calc-card-arrow { color: var(--t2i-muted); flex-shrink: 0; transition: transform .18s, color .18s; }
.calc-card:hover .calc-card-arrow { transform: translateX(4px); color: var(--cc, var(--t2i-green)); }

/* ── WHY SECTION ── */
.calc-why-section { padding: 56px 0; background: var(--t2i-surface); }

.calc-why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.calc-why-card {
  text-align: center;
  padding: 28px 20px;
  background: var(--t2i-card);
  border: 1px solid var(--t2i-border);
  border-radius: var(--t2i-radius-lg);
}

.calc-why-icon { font-size: 32px; margin-bottom: 12px; }
.calc-why-title { font-size: 16px; font-weight: 700; color: var(--t2i-ink); margin-bottom: 8px; font-family: 'Inter', sans-serif; }
.calc-why-card p { font-size: 13px; color: var(--t2i-muted); line-height: 1.6; margin: 0; }

/* ============================================================
   INDIVIDUAL CALCULATOR PAGE
   ============================================================ */
.t2i-calc-page { padding: 0; }

/* ── AUDIENCE SWITCHER ── */
.calc-audience-switch {
  display: flex;
  gap: 8px;
  padding: 10px 0 6px;
  border-bottom: 1px solid var(--t2i-border);
  margin-bottom: 2px;
  flex-wrap: wrap;
}

.calc-audience-btn {
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 100px;
  border: 1.5px solid var(--t2i-border);
  background: transparent;
  color: var(--t2i-muted);
  cursor: pointer;
  transition: all .18s;
  font-family: 'Inter', sans-serif;
}

.calc-audience-btn:hover { background: var(--t2i-surface); color: var(--t2i-ink); }

.calc-audience-btn.active {
  background: var(--t2i-ink);
  color: var(--t2i-bg);
  border-color: var(--t2i-ink);
}

/* ── GROUP HEADER ── */
.calc-group-header {
  background: var(--t2i-surface);
  border-top: 2px solid var(--t2i-border);
  border-bottom: 1px solid var(--t2i-border);
  padding: 20px 0;
  margin-top: 8px;
}

.calc-group-label {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.calc-group-label p {
  font-size: 14px;
  color: var(--t2i-muted);
  margin: 0;
}

.calc-group-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  padding: 6px 18px;
  border-radius: 100px;
  white-space: nowrap;
}

.calc-group-badge--business {
  background: #052e16;
  color: #86efac;
  border: 1px solid #166534;
}

[data-theme="dark"] .calc-group-badge--business,
body.dark-mode .calc-group-badge--business {
  background: #052e16;
  color: #86efac;
}

.calc-group-badge--individual {
  background: #1e3a5f;
  color: #93c5fd;
  border: 1px solid #1d4ed8;
}

[data-theme="dark"] .calc-group-badge--individual,
body.dark-mode .calc-group-badge--individual {
  background: #1e3a5f;
  color: #93c5fd;
}

/* ── CALC LAYOUT SECTION ── */
.calc-layout-section { padding: 40px 0; }

/* ── CALC BREADCRUMB ── */
.calc-breadcrumb {
  background: var(--t2i-surface);
  border-bottom: 1px solid var(--t2i-border);
  padding: 12px 0;
  font-size: 13px;
  color: var(--t2i-muted);
}

.calc-breadcrumb a { color: var(--t2i-muted); text-decoration: none; }
.calc-breadcrumb a:hover { color: var(--t2i-green); }
.calc-breadcrumb span { margin: 0 6px; }

/* ── CALC HERO STRIP ── */
.calc-page-hero {
  background: var(--t2i-surface);
  border-bottom: 1px solid var(--t2i-border);
  padding: 40px 0 32px;
}

.calc-page-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.calc-page-badge {
  font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  color: var(--cc, var(--t2i-green)); background: var(--cc-bg, var(--t2i-green-light));
  border: 1px solid var(--cc-border, var(--t2i-green-border));
  padding: 3px 10px; border-radius: 100px;
}

.calc-page-title {
  font-size: clamp(24px, 3.5vw, 38px);
  margin-bottom: 10px;
  color: var(--t2i-ink);
}

.calc-page-sub {
  font-size: 16px;
  color: var(--t2i-muted);
  max-width: 640px;
  margin: 0;
  line-height: 1.6;
}

/* ── CALC LAYOUT ── */
.calc-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
  padding: 40px 0 60px;
}

/* ── INPUT PANEL ── */
.calc-input-panel {
  background: var(--t2i-card);
  border: 1px solid var(--t2i-border);
  border-radius: var(--t2i-radius-lg);
  overflow: hidden;
}

.calc-panel-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--t2i-border);
  background: var(--t2i-surface);
}

.calc-panel-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--t2i-ink);
  font-family: 'Inter', sans-serif;
  margin: 0;
}

.calc-panel-body { padding: 24px; }

/* ── FIELD GROUP ── */
.calc-field {
  margin-bottom: 22px;
}

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

.calc-field-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.calc-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--t2i-ink);
  display: flex;
  align-items: center;
  gap: 6px;
}

.calc-label-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--t2i-green);
  font-family: 'Inter', sans-serif;
  background: var(--t2i-green-light);
  padding: 2px 10px;
  border-radius: 100px;
}

/* ── TOOLTIP ── */
.calc-tip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--t2i-surface-2);
  border: 1px solid var(--t2i-border);
  color: var(--t2i-muted);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  transition: background .15s;
  font-family: 'Inter', sans-serif;
  flex-shrink: 0;
  line-height: 1;
  padding: 0;
}

.calc-tip-btn:hover { background: var(--t2i-green-light); color: var(--t2i-green); }

.calc-tip-box {
  display: none;
  position: absolute;
  z-index: 50;
  left: -140px;
  top: 24px;
  width: 280px;
  background: var(--t2i-ink);
  color: var(--t2i-bg);
  font-size: 12px;
  line-height: 1.55;
  padding: 10px 14px;
  border-radius: var(--t2i-radius);
  box-shadow: var(--t2i-shadow-md);
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  pointer-events: none;
}

.calc-tip-box::before {
  content: '';
  position: absolute;
  top: -6px; left: 146px;
  width: 12px; height: 12px;
  background: var(--t2i-ink);
  transform: rotate(45deg);
  border-radius: 2px;
}

.calc-tip-btn:hover .calc-tip-box,
.calc-tip-btn:focus .calc-tip-box { display: block; }

/* ── RANGE SLIDER ── */
.calc-range-wrap { position: relative; }

input[type="range"].calc-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 10px;
  background: linear-gradient(to right, var(--t2i-green) 0%, var(--t2i-green) var(--val, 50%), var(--t2i-border) var(--val, 50%), var(--t2i-border) 100%);
  border: none;
  outline: none;
  cursor: pointer;
  padding: 0;
  box-shadow: none;
}

input[type="range"].calc-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid var(--t2i-green);
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  cursor: pointer;
  transition: transform .15s;
}

input[type="range"].calc-range::-webkit-slider-thumb:hover { transform: scale(1.15); }
input[type="range"].calc-range::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid var(--t2i-green);
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  cursor: pointer;
}

.calc-range-ticks {
  display: flex;
  justify-content: space-between;
  padding: 4px 0 0;
  font-size: 10px;
  color: var(--t2i-subtle);
}

/* ── NUMBER INPUT ── */
.calc-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.calc-input-prefix,
.calc-input-suffix {
  position: absolute;
  font-size: 14px;
  font-weight: 600;
  color: var(--t2i-muted);
  pointer-events: none;
  z-index: 1;
}

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

.calc-input-wrap input {
  font-size: 15px;
  font-weight: 600;
  color: var(--t2i-ink);
  text-align: right;
  padding-right: 36px;
  border-radius: var(--t2i-radius-sm);
  height: 44px;
}

.calc-input-wrap.has-prefix input { padding-left: 28px; }

/* ── RESULT PANEL (sticky) ── */
.calc-result-panel {
  position: sticky;
  top: 20px;
}

.calc-result-card {
  background: var(--t2i-card);
  border: 1px solid var(--t2i-border);
  border-radius: var(--t2i-radius-lg);
  overflow: hidden;
  box-shadow: var(--t2i-shadow);
}

.calc-result-header {
  padding: 18px 22px;
  background: var(--t2i-green);
  color: #fff;
}

.calc-result-header-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  opacity: .85;
  margin-bottom: 4px;
  font-family: 'Inter', sans-serif;
}

.calc-result-main {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 800;
  line-height: 1.1;
  font-family: 'Inter', sans-serif;
}

.calc-result-main-label {
  font-size: 12px;
  opacity: .8;
  margin-top: 4px;
  font-family: 'Inter', sans-serif;
}

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

/* ── STAT ROWS ── */
.calc-stat-rows { display: flex; flex-direction: column; gap: 0; }

.calc-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--t2i-border);
  gap: 12px;
}

.calc-stat-row:last-child { border-bottom: none; }

.calc-stat-row-label {
  font-size: 13px;
  color: var(--t2i-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.calc-stat-row-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.calc-stat-row-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--t2i-ink);
  font-family: 'Inter', sans-serif;
}

/* ── CHART AREA ── */
.calc-chart-wrap {
  margin: 16px 0;
  position: relative;
}

.calc-chart-wrap canvas {
  max-height: 200px;
}

/* ── CTA in result panel ── */
.calc-share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 16px;
  padding: 11px 20px;
  background: var(--t2i-green-light);
  border: 1.5px solid var(--t2i-green-border);
  border-radius: var(--t2i-radius);
  font-size: 13px;
  font-weight: 600;
  color: var(--t2i-green);
  cursor: pointer;
  transition: all .18s;
  font-family: 'Inter', sans-serif;
}

.calc-share-btn:hover {
  background: var(--t2i-green);
  color: #fff;
  border-color: var(--t2i-green);
}

/* ── EXPLANATION SECTION ── */
.calc-explain-section { padding: 48px 0 64px; }

.calc-explain-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  align-items: start;
}

.calc-explain-body h2 {
  font-size: 22px;
  margin-bottom: 12px;
  color: var(--t2i-ink);
}

.calc-explain-body p {
  font-size: 15px;
  color: var(--t2i-body);
  line-height: 1.7;
}

.calc-tip-cards { display: flex; flex-direction: column; gap: 12px; }

.calc-tip-card {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: var(--t2i-surface);
  border: 1px solid var(--t2i-border);
  border-radius: var(--t2i-radius);
  align-items: flex-start;
}

.calc-tip-card-icon {
  font-size: 18px;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--t2i-green-light);
  border-radius: var(--t2i-radius-sm);
}

.calc-tip-card-body h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--t2i-ink);
  margin-bottom: 4px;
  font-family: 'Inter', sans-serif;
}

.calc-tip-card-body p {
  font-size: 12px;
  color: var(--t2i-muted);
  line-height: 1.5;
  margin: 0;
}

/* ── RELATED CALCULATORS ── */
.calc-related-section {
  background: var(--t2i-surface);
  border-top: 1px solid var(--t2i-border);
  padding: 40px 0;
}

.calc-related-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--t2i-ink);
  margin-bottom: 20px;
  font-family: 'Inter', sans-serif;
}

.calc-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

/* ── PROGRESS BAR ANIMATION ── */
@keyframes calc-bar-grow {
  from { width: 0; }
}

.calc-progress-bar {
  height: 8px;
  border-radius: 10px;
  background: var(--t2i-border);
  overflow: hidden;
  margin: 6px 0;
}

.calc-progress-fill {
  height: 100%;
  border-radius: 10px;
  background: var(--t2i-green);
  animation: calc-bar-grow .7s ease forwards;
  transition: width .5s ease;
}

/* ── AMORTISATION TABLE ── */
.calc-table-wrap {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--t2i-border);
  border-radius: var(--t2i-radius);
  margin-top: 20px;
}

.calc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.calc-table th {
  position: sticky;
  top: 0;
  background: var(--t2i-surface);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 10px 14px;
  color: var(--t2i-muted);
  border-bottom: 1px solid var(--t2i-border);
  z-index: 2;
}

.calc-table td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--t2i-border);
  color: var(--t2i-body);
}

.calc-table tr:last-child td { border-bottom: none; }
.calc-table tr:hover td { background: var(--t2i-surface); }

/* ── SCENARIO COMPARE ── */
.calc-compare-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--t2i-muted);
}

.calc-toggle-switch {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.calc-toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }

.calc-toggle-track {
  position: absolute;
  inset: 0;
  background: var(--t2i-border);
  border-radius: 100px;
  cursor: pointer;
  transition: background .2s;
}

.calc-toggle-switch input:checked + .calc-toggle-track { background: var(--t2i-green); }

.calc-toggle-track::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.calc-toggle-switch input:checked + .calc-toggle-track::after { transform: translateX(18px); }

/* ── FORMULA BOX ── */
.calc-formula-box {
  background: var(--t2i-surface);
  border: 1px solid var(--t2i-border);
  border-left: 3px solid var(--t2i-green);
  border-radius: 0 var(--t2i-radius) var(--t2i-radius) 0;
  padding: 14px 18px;
  margin: 16px 0;
  font-size: 13px;
  color: var(--t2i-body);
}

.calc-formula-box strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--t2i-green);
  margin-bottom: 4px;
  font-family: 'Inter', sans-serif;
}

.calc-formula-box code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  background: none;
  border: none;
  padding: 0;
  color: var(--t2i-ink);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .calc-hero-inner          { grid-template-columns: 1fr; gap: 32px; }
  .calc-hero-sub            { max-width: 100%; }
  .calc-featured-grid       { grid-template-columns: repeat(2, 1fr); }
  .calc-explain-grid        { grid-template-columns: 1fr; }
  .calc-why-grid            { grid-template-columns: repeat(2, 1fr); }

  /* ── Stack input above result on tablet ── */
  .calc-layout {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 24px 0 40px;
  }
  .calc-result-panel {
    position: static;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .calc-hub-hero            { padding: 40px 0 32px; }
  .calc-featured-grid       { grid-template-columns: 1fr; }
  .calc-grid                { grid-template-columns: 1fr; }
  .calc-related-grid        { grid-template-columns: repeat(2, 1fr); }
  .calc-why-grid            { grid-template-columns: 1fr; }
  .calc-tip-box             { left: -80px; width: 220px; }
  .calc-tip-box::before     { left: 86px; }

  /* ── Result card: centered, full-width ── */
  .calc-result-card {
    border-radius: var(--t2i-radius-lg);
    margin: 0 auto;
    max-width: 100%;
    box-shadow: var(--t2i-shadow-md);
  }

  /* ── Result header: fully centered ── */
  .calc-result-header {
    padding: 24px 20px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .calc-result-header-title {
    font-size: 11px;
    letter-spacing: .8px;
    margin-bottom: 8px;
    text-align: center;
    width: 100%;
  }

  .calc-result-main {
    font-size: clamp(32px, 10vw, 44px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.5px;
    text-align: center;
    width: 100%;
  }

  .calc-result-main-label {
    font-size: 13px;
    margin-top: 6px;
    opacity: .9;
    text-align: center;
    width: 100%;
    padding: 0 8px;
    line-height: 1.4;
  }

  /* ── Body padding ── */
  .calc-result-body {
    padding: 16px 16px 20px;
  }

  /* ── Chart wrap: proper height, no overflow ── */
  .calc-chart-wrap {
    margin: 8px 0 12px;
    width: 100%;
    overflow: hidden;
  }

  .calc-chart-wrap canvas {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-height: 260px !important;
  }

  /* ── Stat rows: prevent overflow ── */
  .calc-stat-rows {
    width: 100%;
  }

  .calc-stat-row {
    display: flex;
    align-items: flex-start;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 10px 0;
  }

  .calc-stat-row-label {
    font-size: 12px;
    flex: 1;
    min-width: 0;
    line-height: 1.4;
    word-break: break-word;
  }

  .calc-stat-row-val {
    font-size: 12px;
    font-weight: 700;
    text-align: right;
    flex-shrink: 0;
    max-width: 50%;
    word-break: break-word;
    line-height: 1.4;
  }

  /* ── Share button — solid green, white text always ── */
  .calc-share-btn {
    padding: 13px 20px;
    font-size: 14px;
    background: var(--t2i-green) !important;
    color: #fff !important;
    border-color: var(--t2i-green) !important;
    border-radius: var(--t2i-radius);
  }

  .calc-share-btn:hover {
    background: var(--t2i-green-dark) !important;
    color: #fff !important;
  }

  /* Share menu opens upward to avoid overflow */
  .calc-share-menu {
    bottom: calc(100% + 8px);
    top: auto;
    border-radius: var(--t2i-radius-lg);
  }

  /* ── Input panel padding ── */
  .calc-panel-body   { padding: 18px 16px; }
  .calc-panel-header { padding: 16px 16px 12px; }

  /* ── Field label value pill ── */
  .calc-label-value  { font-size: 13px; padding: 2px 10px; }
  .calc-range-ticks  { font-size: 9px; }

  /* ── Page elements ── */
  .calc-breadcrumb   { font-size: 12px; padding: 10px 0; }
  .calc-page-hero    { padding: 28px 0 22px; }
  .calc-page-title   { font-size: clamp(20px, 5vw, 28px); }
  .calc-page-sub     { font-size: 14px; }
  .calc-layout-section { padding: 20px 0; }
  .calc-explain-section { padding: 32px 0 48px; }
  .calc-formula-box  { font-size: 12px; padding: 12px 14px; }
  .calc-tip-card     { padding: 12px; }
}

@media (max-width: 480px) {
  .calc-related-grid        { grid-template-columns: 1fr; }
  .calc-hero-stats          { gap: 12px; }

  .calc-layout {
    gap: 16px;
    padding: 16px 0 32px;
  }

  /* ── Result header fully centered ── */
  .calc-result-header {
    padding: 20px 14px 18px;
  }

  .calc-result-main {
    font-size: clamp(28px, 11vw, 38px);
    letter-spacing: -1px;
  }

  .calc-result-main-label {
    font-size: 12px;
    padding: 0 4px;
  }

  .calc-result-body {
    padding: 12px 12px 16px;
  }

  /* ── Chart ── */
  .calc-chart-wrap canvas {
    max-height: 200px !important;
  }

  /* ── Stat rows tighter ── */
  .calc-stat-row {
    padding: 8px 0;
    align-items: center;
  }

  .calc-stat-row-label {
    font-size: 11px;
  }

  .calc-stat-row-val {
    font-size: 11px;
    max-width: 48%;
  }

  /* ── Share button ── */
  .calc-share-btn {
    font-size: 13px;
    padding: 12px 16px;
  }

  .calc-share-option {
    padding: 13px 14px;
    font-size: 13px;
  }

  /* ── Input panel ── */
  .calc-panel-body   { padding: 14px 12px; }
  .calc-panel-header { padding: 14px 12px 10px; }
  .calc-field        { margin-bottom: 18px; }
  .calc-label        { font-size: 12px; }

  /* ── Tooltip ── */
  .calc-tip-box         { left: -20px; width: 200px; }
  .calc-tip-box::before { left: 26px; }

  /* ── Hub tabs ── */
  .calc-audience-switch { gap: 6px; }
  .calc-audience-btn    { font-size: 12px; padding: 5px 12px; }
  .calc-tab             { font-size: 12px; padding: 6px 12px; }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.calc-card, .calc-featured-card, .calc-why-card {
  animation: fadeInUp .35s ease both;
}

.calc-grid .calc-card:nth-child(1)  { animation-delay: .04s; }
.calc-grid .calc-card:nth-child(2)  { animation-delay: .08s; }
.calc-grid .calc-card:nth-child(3)  { animation-delay: .12s; }
.calc-grid .calc-card:nth-child(4)  { animation-delay: .16s; }
.calc-grid .calc-card:nth-child(5)  { animation-delay: .20s; }
.calc-grid .calc-card:nth-child(6)  { animation-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  .calc-card, .calc-featured-card, .calc-why-card { animation: none; }
  .calc-eyebrow-dot { animation: none; }
  input[type="range"].calc-range::-webkit-slider-thumb:hover { transform: none; }
}

/* ============================================================
   HOMEPAGE CALCULATOR SPOTLIGHT
   ============================================================ */
/* ============================================================
   CALCULATOR SPOTLIGHT — Redesigned v10
   ============================================================ */

.hp-calc-spot {
  position: relative;
  background: var(--t2i-bg);
  padding: 88px 0 80px;
  overflow: hidden;
}

/* Animated grid */
.hp-calc-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(26,143,78,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,143,78,.04) 1px, transparent 1px);
  background-size: 44px 44px;
  animation: hpCalcGridShift 20s linear infinite;
  pointer-events: none;
}
@keyframes hpCalcGridShift {
  0%   { background-position: 0 0; }
  100% { background-position: 44px 44px; }
}

/* Ambient orbs */
.hp-calc-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  animation: hpCalcOrbFloat 8s ease-in-out infinite;
}
.hp-calc-orb-1 { width: 320px; height: 320px; background: rgba(26,143,78,.08); top: -80px; right: -60px; animation-delay: 0s; }
.hp-calc-orb-2 { width: 200px; height: 200px; background: rgba(37,168,98,.07); bottom: 40px; left: -40px; animation-delay: -3s; }
.hp-calc-orb-3 { width: 150px; height: 150px; background: rgba(26,143,78,.05); top: 40%; left: 40%; animation-delay: -5s; }
@keyframes hpCalcOrbFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-24px) scale(1.05); }
}

/* ── Header ── */
.hp-calc-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 52px;
  flex-wrap: wrap;
}

.hp-calc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--t2i-green);
  margin-bottom: 14px;
}

.hp-calc-eyebrow-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--t2i-green);
  position: relative;
  flex-shrink: 0;
}
.hp-calc-eyebrow-pulse::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid var(--t2i-green);
  animation: hpCalcRipple 2s ease-out infinite;
}
@keyframes hpCalcRipple {
  0%   { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(2.4); }
}

.hp-calc-title {
  font-size: clamp(28px, 3.5vw, 44px);
  margin: 0 0 12px;
  color: var(--t2i-ink);
  line-height: 1.15;
  letter-spacing: -.5px;
}
.hp-calc-title em {
  font-style: italic;
  color: var(--t2i-green);
}

.hp-calc-sub {
  font-size: 16px;
  color: var(--t2i-muted);
  margin: 0;
  max-width: 500px;
  line-height: 1.6;
}

.hp-calc-view-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  background: var(--t2i-green);
  color: #fff !important;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all .22s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 8px 28px rgba(26,143,78,.22);
}
.hp-calc-view-all:hover {
  background: var(--t2i-green-dark);
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(26,143,78,.3);
  text-decoration: none;
}
.hp-calc-view-all svg { transition: transform .22s; }
.hp-calc-view-all:hover svg { transform: translateX(3px); }

/* ── Card Grid ── */
.hp-calc-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 16px;
  margin-bottom: 20px;
}

/* ── Base Card ── */
.hp-cc {
  position: relative;
  background: var(--t2i-card);
  border: 1px solid var(--t2i-border);
  border-radius: 20px;
  padding: 26px 24px 22px;
  text-decoration: none;
  overflow: hidden;
  transition: transform .24s cubic-bezier(.4,0,.2,1), box-shadow .24s cubic-bezier(.4,0,.2,1), border-color .24s;
  display: flex;
  flex-direction: column;
}
.hp-cc::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--cc-accent, var(--t2i-green));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .32s cubic-bezier(.4,0,.2,1);
}
.hp-cc:hover {
  transform: translateY(-5px);
  box-shadow: var(--t2i-shadow), 0 12px 40px rgba(0,0,0,.07);
  border-color: transparent;
  text-decoration: none;
}
.hp-cc:hover::before { transform: scaleX(1); }

/* Hero card */
.hp-cc--hero {
  grid-row: 1 / 3;
  padding: 32px 28px;
  background: linear-gradient(148deg, #0d5c33 0%, #1a8f4e 55%, #25a862 100%);
  border-color: transparent;
}
.hp-cc--hero::before { display: none; }
.hp-cc--hero:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 32px rgba(26,143,78,.18), 0 20px 60px rgba(26,143,78,.22);
  border-color: transparent;
}

/* Icon wrapper */
.hp-cc-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--cc-bg, var(--t2i-green-light));
  margin-bottom: 14px;
  flex-shrink: 0;
}
.hp-cc--hero .hp-cc-icon-wrap {
  width: 64px; height: 64px;
  border-radius: 18px;
  background: rgba(255,255,255,.15);
  margin-bottom: 20px;
}
.hp-cc-icon-svg { width: 24px; height: 24px; }
.hp-cc--hero .hp-cc-icon-svg { width: 32px; height: 32px; }

/* Name */
.hp-cc-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--t2i-ink);
  margin-bottom: 6px;
  line-height: 1.2;
}
.hp-cc--hero .hp-cc-name {
  color: #fff;
  font-size: 22px;
  font-family: var(--t2i-font-serif, Georgia, serif);
  margin-bottom: 10px;
}

/* Description */
.hp-cc-desc {
  font-size: 13px;
  color: var(--t2i-muted);
  line-height: 1.55;
  flex: 1;
}
.hp-cc--hero .hp-cc-desc { color: rgba(255,255,255,.75); font-size: 15px; }

/* Animated bar chart (hero) */
.hp-cc-chart {
  margin: 18px 0 4px;
  height: 80px;
}
.hp-cc-chart svg { width: 100%; height: 100%; overflow: visible; }
.hp-cc-chart-bar {
  animation: hpGrowBar .8s cubic-bezier(.4,0,.2,1) both;
  transform-origin: bottom;
}
@keyframes hpGrowBar {
  from { transform: scaleY(0); }
  to   { transform: scaleY(1); }
}

/* Stats row (hero) */
.hp-cc-stats {
  display: flex;
  gap: 16px;
  margin: 16px 0 14px;
}
.hp-cc-stat { flex: 1; }
.hp-cc-stat-val {
  font-family: var(--t2i-font-serif, Georgia, serif);
  font-size: 22px;
  font-weight: 400;
  color: #fff;
  line-height: 1;
}
.hp-cc-stat-lbl {
  font-size: 10px;
  color: rgba(255,255,255,.58);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-top: 4px;
}

/* CTA */
.hp-cc-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: var(--cc-accent, var(--t2i-green));
  margin-top: 12px;
  transition: gap .2s;
}
.hp-cc--hero .hp-cc-cta {
  color: #fff;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  padding: 9px 18px;
  border-radius: 100px;
  font-size: 14px;
  margin-top: 16px;
  width: fit-content;
}
.hp-cc:hover .hp-cc-cta { gap: 8px; }

/* Sparkline (home loan) */
.hp-cc-sparkline { margin: 12px 0 2px; height: 36px; }
.hp-cc-sparkline svg { width: 100%; height: 100%; overflow: visible; }
.hp-cc-sparkline-path {
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  animation: hpDrawLine 1.3s ease forwards var(--delay, .2s);
}
@keyframes hpDrawLine { to { stroke-dashoffset: 0; } }

/* Ticker (income tax) */
.hp-cc-ticker { display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; }
.hp-cc-ticker-val {
  font-family: var(--t2i-font-serif, Georgia, serif);
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
}
.hp-cc-ticker-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 100px;
  letter-spacing: .5px;
}

/* Ring (FIRE) */
.hp-cc-ring-wrap { display: flex; align-items: center; gap: 12px; margin: 12px 0 4px; }
.hp-cc-ring { width: 52px; height: 52px; flex-shrink: 0; }
.hp-cc-ring-track { fill: none; stroke: #ffe4e6; stroke-width: 5; }
.hp-cc-ring-fill {
  fill: none;
  stroke: #e11d48;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 138;
  stroke-dashoffset: 138;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  animation: hpFillRing 1.5s ease forwards .4s;
}
@keyframes hpFillRing { to { stroke-dashoffset: 38; } }
.hp-cc-ring-text { font-size: 12px; color: var(--t2i-muted); line-height: 1.45; }
.hp-cc-ring-text strong { font-size: 18px; display: block; font-family: var(--t2i-font-serif, Georgia, serif); font-weight: 400; }

/* Break-even dot */
.hp-cc-beeline { margin: 12px 0 4px; height: 40px; }
.hp-cc-beeline svg { width: 100%; height: 100%; }
.hp-cc-dot-pulse { animation: hpDotPulse 1.6s ease-in-out infinite; }
@keyframes hpDotPulse {
  0%, 100% { r: 5; opacity: 1; }
  50%       { r: 7; opacity: .7; }
}



/* ── Counters strip ── */
.hp-calc-counters {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--t2i-border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--t2i-card);
  margin: 16px 0 14px;
}
.hp-calc-counter-item {
  flex: 1;
  padding: 14px 12px;
  text-align: center;
  border-right: 1px solid var(--t2i-border);
}
.hp-calc-counter-item:last-child { border-right: none; }
.hp-calc-counter-num {
  font-family: 'DM Sans', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--t2i-green);
  line-height: 1;
  display: block;
  letter-spacing: -.3px;
}
.hp-calc-counter-lbl {
  font-size: 10px;
  color: var(--t2i-muted);
  margin-top: 4px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .5px;
  display: block;
}

/* ── Category pills ── */
.hp-calc-cats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.hp-calc-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  background: var(--t2i-card);
  border: 1px solid var(--t2i-border);
  border-radius: 100px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--t2i-ink);
  transition: all .22s cubic-bezier(.4,0,.2,1);
}
.hp-calc-cat-pill:hover {
  border-color: var(--t2i-green);
  background: var(--t2i-green-light);
  color: var(--t2i-green);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(26,143,78,.1);
  text-decoration: none;
}
.hp-calc-cat-pill-icon {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--t2i-surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  transition: background .22s;
}
.hp-calc-cat-pill:hover .hp-calc-cat-pill-icon { background: rgba(26,143,78,.1); }
.hp-calc-cat-count {
  font-size: 11px;
  font-weight: 700;
  background: var(--t2i-surface);
  border-radius: 100px;
  padding: 3px 10px;
  color: var(--t2i-muted);
  margin-left: auto;
  transition: all .22s;
}
.hp-calc-cat-pill:hover .hp-calc-cat-count {
  background: rgba(26,143,78,.1);
  color: var(--t2i-green);
}
.hp-calc-cat-pill--all {
  background: var(--t2i-green-light);
  border-color: var(--t2i-green-border);
  color: var(--t2i-green);
  font-weight: 600;
}
.hp-calc-cat-pill--all:hover {
  background: var(--t2i-green);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 28px rgba(26,143,78,.22);
}
.hp-calc-cat-pill--all:hover .hp-calc-cat-count { background: rgba(255,255,255,.2); color: #fff; }
.hp-calc-cat-pill--all .hp-calc-cat-count { background: rgba(26,143,78,.12); color: var(--t2i-green); }

/* ── Dark mode ── */
[data-theme="dark"] .hp-calc-bg-grid {
  background-image:
    linear-gradient(rgba(26,143,78,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,143,78,.06) 1px, transparent 1px);
}
[data-theme="dark"] .hp-cc-ring-track { stroke: #4c0519; }
[data-theme="dark"] .hp-cc-ticker-badge { background: #1e3a5f !important; color: #60a5fa !important; }

/* ── Responsive ── */
@media (max-width: 960px) {
  .hp-calc-grid { grid-template-columns: 1fr 1fr; }
  .hp-cc--hero { grid-column: 1 / -1; grid-row: auto; }
}
@media (max-width: 640px) {
  .hp-calc-grid { grid-template-columns: 1fr; }
  .hp-cc--hero { grid-column: auto; }
  .hp-calc-header { flex-direction: column; align-items: flex-start; }
  .hp-calc-view-all { align-self: flex-start; }
  .hp-calc-cats { flex-direction: column; }
  .hp-calc-cat-pill { border-radius: 14px; }
  .hp-calc-counters { flex-wrap: wrap; border-radius: 12px; }
  .hp-calc-counter-item { flex: 1 1 calc(50% - 1px); border-bottom: 1px solid var(--t2i-border); border-right: none; padding: 12px 8px; }
  .hp-calc-counter-item:nth-child(odd) { border-right: 1px solid var(--t2i-border); }
  .hp-calc-counter-item:nth-child(3),
  .hp-calc-counter-item:nth-child(4) { border-bottom: none; }
  .hp-calc-spot { padding: 60px 0 52px; }
}

/* ============================================================
   FOOTER CALCULATOR ROW
   ============================================================ */
.footer-calc-row {
  border-top: 1px solid var(--t2i-border);
  padding: 24px 0;
  margin-top: 8px;
}

.footer-calc-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
}

.footer-calc-row-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--t2i-ink);
  letter-spacing: .3px;
  font-family: 'Inter', sans-serif;
}

.footer-calc-row-all {
  font-size: 12px;
  font-weight: 600;
  color: var(--t2i-green);
  text-decoration: none;
  transition: color .2s;
}

.footer-calc-row-all:hover { color: var(--t2i-green-dark); }

.footer-calc-row-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.footer-calc-row-links a {
  font-size: 12px;
  color: var(--t2i-muted);
  text-decoration: none;
  padding: 3px 0;
  transition: color .18s;
  border-bottom: 1px solid transparent;
}

.footer-calc-row-links a:hover {
  color: var(--t2i-green);
  border-bottom-color: var(--t2i-green-border);
}

/* ── Footer calc link highlight in Pages column ── */
.footer-links .footer-calc-link {
  color: var(--t2i-green) !important;
  font-weight: 600;
}

.footer-links .footer-calc-link:hover {
  color: var(--t2i-green-dark) !important;
}

@media (max-width: 600px) {
  .footer-calc-row-links { gap: 6px 10px; }
}

/* ── Hero CTA calculator button ── */
.hp-cta-calc {
  color: var(--t2i-green) !important;
  border-color: var(--t2i-green) !important;
  background: transparent !important;
  transition: background var(--t2i-transition), color var(--t2i-transition), transform var(--t2i-transition), box-shadow var(--t2i-transition) !important;
}
.hp-cta-calc:hover {
  background: var(--t2i-green) !important;
  color: #fff !important;
  border-color: var(--t2i-green) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(26,143,78,.22) !important;
}

/* ── Hero Read Articles button hover fix ── */
.hp-cta-primary {
  color: #fff !important;
}
.hp-cta-primary:hover {
  color: #fff !important;
  background: var(--t2i-green-dark) !important;
  text-decoration: none !important;
}

/* ============================================================
   SHARE DROPDOWN MENU
   ============================================================ */
.calc-share-wrap {
  position: relative;
  margin-top: 16px;
}

.calc-share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 20px;
  background: var(--t2i-green-light);
  border: 1.5px solid var(--t2i-green-border);
  border-radius: var(--t2i-radius);
  font-size: 13px;
  font-weight: 600;
  color: var(--t2i-green);
  cursor: pointer;
  transition: all .18s;
  font-family: 'Inter', sans-serif;
}

.calc-share-btn:hover {
  background: var(--t2i-green);
  color: #fff;
  border-color: var(--t2i-green);
}

.calc-share-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--t2i-card);
  border: 1px solid var(--t2i-border);
  border-radius: var(--t2i-radius-lg);
  box-shadow: var(--t2i-shadow-md);
  overflow: hidden;
  z-index: 200;
  animation: shareMenuIn .15s ease;
}

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

.calc-share-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  border-radius: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--t2i-body);
  cursor: pointer;
  text-align: left;
  transition: background .15s, color .15s;
  font-family: 'Inter', sans-serif;
}

.calc-share-option:hover {
  background: var(--t2i-surface);
  color: var(--t2i-green);
}

.calc-share-option svg {
  flex-shrink: 0;
  color: var(--t2i-muted);
  transition: color .15s;
}

.calc-share-option:hover svg { color: var(--t2i-green); }

.calc-share-divider {
  height: 1px;
  background: var(--t2i-border);
  margin: 4px 0;
}

/* ── Loading state ── */
.calc-share-btn[disabled] {
  opacity: .7;
  cursor: wait;
}

/* ── Mobile select overflow fix ── */
@media (max-width: 768px) {
  .calc-input-panel select,
  .calc-input-panel input[type="number"] {
    font-size: 16px; /* prevents iOS zoom on focus */
    width: 100%;
    max-width: 100%;
  }

  /* Result panel — remove any overflow issues */
  .calc-result-panel,
  .calc-result-card,
  .calc-result-body,
  .calc-stat-rows {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }

  /* Stat value: allow text to wrap gracefully */
  .calc-stat-row-val {
    max-width: 55%;
    word-break: break-word;
  }
}

/* ============================================================
   FAQ SECTION
   ============================================================ */
.calc-faq-section {
  background: var(--t2i-surface);
  border-top: 1px solid var(--t2i-border);
  padding: 48px 0 56px;
}

.calc-faq-title {
  font-size: clamp(20px, 2.5vw, 26px);
  color: var(--t2i-ink);
  margin-bottom: 28px;
}

.calc-faq-list {
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.calc-faq-item {
  border-bottom: 1px solid var(--t2i-border);
}

.calc-faq-item:first-child {
  border-top: 1px solid var(--t2i-border);
}

.calc-faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 18px 4px;
  background: none;
  border: none;
  border-radius: 0;
  text-align: left;
  font-size: 15px;
  font-weight: 600;
  color: var(--t2i-ink);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  line-height: 1.45;
  transition: color .18s;
}

.calc-faq-q:hover { color: var(--t2i-green); }

.calc-faq-q[aria-expanded="true"] { color: var(--t2i-green); }

.calc-faq-chevron {
  flex-shrink: 0;
  color: var(--t2i-muted);
  transition: transform .22s ease, color .18s;
}

.calc-faq-q[aria-expanded="true"] .calc-faq-chevron {
  transform: rotate(180deg);
  color: var(--t2i-green);
}

.calc-faq-a {
  padding: 0 4px 18px;
}

.calc-faq-a[hidden] { display: none; }

.calc-faq-a p {
  font-size: 14px;
  color: var(--t2i-body);
  line-height: 1.7;
  margin: 0;
}

/* ── Last updated badge ── */
.calc-last-updated {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--t2i-muted);
  margin-top: 14px;
  background: var(--t2i-surface);
  border: 1px solid var(--t2i-border);
  border-radius: 100px;
  padding: 4px 12px;
}

.calc-last-updated svg { color: var(--t2i-green); flex-shrink: 0; }

/* ── FAQ responsive ── */
@media (max-width: 768px) {
  .calc-faq-section { padding: 36px 0 44px; }
  .calc-faq-q       { font-size: 14px; padding: 16px 0; }
  .calc-faq-a p     { font-size: 13px; }
}

/* ============================================================
   BROKER COMPARISON CTA — Calculators Hub Page
   ============================================================ */

.calc-broker-cta-section {
  background: linear-gradient(135deg, var(--t2i-surface) 0%, var(--t2i-green-light) 100%);
  border-top: 1px solid var(--t2i-border);
  padding: 64px 0;
}

[data-theme="dark"] .calc-broker-cta-section,
body.dark-mode .calc-broker-cta-section {
  background: linear-gradient(135deg, var(--t2i-surface) 0%, rgba(34,197,94,0.06) 100%);
}

.calc-broker-cta-inner {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 48px;
  align-items: center;
}

.calc-broker-cta-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--t2i-green);
  margin-bottom: 12px;
}

.calc-broker-cta-heading {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  color: var(--t2i-ink);
  font-family: 'Inter', sans-serif;
  line-height: 1.2;
  margin: 0 0 14px;
}

.calc-broker-cta-desc {
  font-size: 15px;
  color: var(--t2i-body);
  line-height: 1.65;
  margin: 0 0 20px;
}

.calc-broker-cta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.calc-broker-pill {
  display: inline-block;
  padding: 5px 12px;
  background: var(--t2i-card);
  border: 1px solid var(--t2i-border);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--t2i-ink);
  white-space: nowrap;
}

.calc-broker-cta-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.calc-broker-cta-btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  background: var(--t2i-green);
  color: #fff !important;
  border-radius: var(--t2i-radius);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: background var(--t2i-transition), transform var(--t2i-transition);
  box-shadow: 0 4px 14px rgba(34,197,94,0.25);
}

.calc-broker-cta-btn:hover {
  background: var(--t2i-green-dark);
  transform: translateY(-2px);
  color: #fff !important;
}

.calc-broker-cta-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--t2i-green);
  text-decoration: none;
  border-bottom: 1px solid var(--t2i-green-border);
  transition: color var(--t2i-transition);
}

.calc-broker-cta-link:hover { color: var(--t2i-green-dark); }

/* Right card */
.calc-broker-cta-card {
  background: var(--t2i-card);
  border: 1.5px solid var(--t2i-border);
  border-radius: var(--t2i-radius-lg);
  padding: 24px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

[data-theme="dark"] .calc-broker-cta-card,
body.dark-mode .calc-broker-cta-card {
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}

.calc-broker-cta-card-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--t2i-muted);
  margin-bottom: 16px;
  font-family: 'Inter', sans-serif;
}

.calc-broker-compare-rows {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 18px;
}

.calc-broker-compare-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--t2i-border);
  gap: 10px;
}

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

.calc-broker-compare-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--t2i-ink);
  min-width: 90px;
}

.calc-broker-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.calc-broker-compare-charges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.calc-broker-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  background: var(--t2i-surface-2, #f1f5f9);
  color: var(--t2i-body);
  white-space: nowrap;
}

.calc-broker-badge--green {
  background: var(--t2i-green-light);
  color: var(--t2i-green-dark);
}

.calc-broker-badge--amber {
  background: #fef3c7;
  color: #92400e;
}

[data-theme="dark"] .calc-broker-badge--amber,
body.dark-mode .calc-broker-badge--amber {
  background: #2d1f08;
  color: #fbbf24;
}

.calc-broker-cta-card-link {
  display: block;
  text-align: center;
  padding: 11px;
  background: var(--t2i-green-light);
  color: var(--t2i-green-dark);
  border-radius: var(--t2i-radius);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background var(--t2i-transition), color var(--t2i-transition);
  border: 1px solid var(--t2i-green-border);
}

.calc-broker-cta-card-link:hover {
  background: var(--t2i-green);
  color: #fff;
}

/* Responsive */
@media (max-width: 900px) {
  .calc-broker-cta-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .calc-broker-cta-section { padding: 48px 0; }
}

@media (max-width: 540px) {
  .calc-broker-cta-actions {
    flex-direction: column;
    align-items: flex-start;
  }
  .calc-broker-cta-btn { width: 100%; justify-content: center; }
}

/* ============================================================
   FOOTER BROKERAGE ROW
   ============================================================ */

.footer-brokerage-row {
  border-top-color: var(--t2i-border);
}

.footer-brokerage-compare-all {
  font-weight: 700 !important;
  color: var(--t2i-green) !important;
  border-bottom: 1px solid var(--t2i-green-border) !important;
}

.footer-brokerage-compare-all:hover {
  color: var(--t2i-green-dark) !important;
}
