/* ============================================================
   FINISIT TOOLS — Financial Intelligence Suite
   Health Check + Calculators
   ============================================================ */

/* ---------- Hero ---------- */
.tools-hero {
  padding: calc(var(--nav-height) + var(--sp-9)) 0 var(--sp-8);
  position: relative;
  border-bottom: 1px solid var(--border-soft);
}
.tools-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 500px at 70% -20%, rgba(212,184,135,0.07), transparent 60%),
    radial-gradient(600px 400px at -5% 80%, rgba(96,165,250,0.05), transparent 60%);
  pointer-events: none;
}
.tools-hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-8);
  align-items: center;
}
.tools-hero h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  margin-bottom: var(--sp-4);
}
.tools-hero__lead {
  color: var(--ivory-muted);
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  max-width: 480px;
}
.tools-hero__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
  padding: var(--sp-6);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  background: rgba(255,255,255,0.02);
  backdrop-filter: blur(12px);
}
.tools-hero__stat { text-align: center; }
.tools-hero__stat-num {
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--gold);
  display: block;
}
.tools-hero__stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--ivory-dim);
  margin-top: 4px;
}
[data-theme="light"] .tools-hero__stats { background: rgba(255,255,255,0.5); }
[data-theme="light"] .tools-hero__lead { color: #4A3D2A; }

@media (max-width: 900px) {
  .tools-hero__inner { grid-template-columns: 1fr; }
  .tools-hero__stats { max-width: 420px; }
}

/* ---------- Section layout ---------- */
.tools-section {
  padding: var(--sp-10) 0;
  border-bottom: 1px solid var(--border-soft);
}
.tools-section:last-child { border-bottom: none; }
.tools-section-head {
  margin-bottom: var(--sp-8);
}
.tools-section-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-2);
}
.tools-section-head p {
  color: var(--ivory-muted);
  font-size: var(--text-md);
  max-width: 560px;
}
[data-theme="light"] .tools-section-head p { color: #4A3D2A; }

/* ═══════════════════════════════════
   FINANCIAL HEALTH CHECK
═══════════════════════════════════ */
.hc-wrap {
  max-width: 760px;
  margin: 0 auto;
}

/* ── Intro two-column ── */
.hc-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-8);
  align-items: center;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  padding: var(--sp-8);
  background: rgba(255,255,255,0.02);
  backdrop-filter: blur(16px);
}
[data-theme="light"] .hc-intro { background: rgba(255,255,255,0.6); border-color: rgba(139,111,63,0.18); }

.hc-intro__visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
}

.hc-gauge-wrap {
  position: relative;
  width: 200px;
  height: 120px;
}
.hc-gauge {
  width: 200px;
  height: 120px;
  filter: drop-shadow(0 0 18px rgba(212,184,135,0.12));
}
.hc-gauge__center {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  line-height: 1;
}
.hc-gauge__q {
  display: block;
  font-size: 2.2rem;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--gold);
  line-height: 1;
}
.hc-gauge__sub {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ivory-dim);
}
.hc-gauge__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.05em;
  color: var(--ivory-dim);
}

.hc-intro__content { display: flex; flex-direction: column; gap: var(--sp-4); }
.hc-intro__eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--gold);
  margin: 0;
}
.hc-intro__content h3 {
  font-size: var(--text-xl);
  font-weight: 400;
  margin: 0;
  line-height: 1.3;
}
.hc-intro__content p {
  color: var(--ivory-muted);
  line-height: var(--leading-relaxed);
  margin: 0;
  font-size: var(--text-sm);
}
[data-theme="light"] .hc-intro__content p { color: #4A3D2A; }

.hc-intro__cats {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.hc-intro__cat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-xs);
  color: var(--ivory-muted);
  padding: 5px 10px;
  border-radius: var(--r-md);
  border-left: 2px solid var(--cc, var(--gold));
  background: rgba(255,255,255,0.02);
}
[data-theme="light"] .hc-intro__cat { color: #4A3D2A; background: rgba(0,0,0,0.03); }

.hc-start-btn { margin-top: var(--sp-2); align-self: flex-start; }

/* ── Question ── */
.hc-question {
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  padding: var(--sp-7) var(--sp-7);
  background: rgba(255,255,255,0.02);
  backdrop-filter: blur(16px);
}
[data-theme="light"] .hc-question { background: rgba(255,255,255,0.6); border-color: rgba(139,111,63,0.18); }

/* Dot map */
.hc-dotmap {
  display: flex;
  gap: 7px;
  margin-bottom: var(--sp-5);
  flex-wrap: wrap;
}
.hc-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-soft);
  transition: all 0.3s var(--ease-luxe);
  flex-shrink: 0;
}
.hc-dot.is-done {
  background: var(--dc, var(--gold));
  opacity: 0.5;
}
.hc-dot.is-active {
  background: var(--dc, var(--gold));
  box-shadow: 0 0 8px var(--dc, var(--gold));
  transform: scale(1.3);
}

/* Q meta row */
.hc-q-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-3);
}
.hc-q-cat {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--cc, var(--gold));
  padding: 3px 10px;
  border-radius: var(--r-pill);
  border: 1px solid currentColor;
  opacity: 0.85;
}
.hc-q-counter {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: var(--tracking-wide);
  color: var(--ivory-dim);
  text-transform: uppercase;
}

/* Progress bar */
.hc-progress-bar {
  height: 3px;
  background: var(--border-soft);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: var(--sp-5);
}
.hc-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-lt, #E8C87A));
  border-radius: 2px;
  transition: width 0.4s var(--ease-luxe);
}

.hc-question__text {
  font-size: var(--text-lg);
  font-weight: 400;
  line-height: 1.4;
  margin-bottom: var(--sp-5);
  color: var(--ivory);
}
[data-theme="light"] .hc-question__text { color: #1A1610; }

/* Options with letter labels */
.hc-options { display: flex; flex-direction: column; gap: var(--sp-2); }
.hc-option {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 12px var(--sp-4);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--dur-base) var(--ease-luxe);
  background: transparent;
  text-align: left;
  color: var(--ivory-muted);
  font-size: var(--text-sm);
  width: 100%;
}
[data-theme="light"] .hc-option { color: #4A3D2A; border-color: rgba(139,111,63,0.2); }
.hc-option:hover {
  border-color: var(--border-gold);
  color: var(--ivory);
  background: rgba(212,184,135,0.05);
}
[data-theme="light"] .hc-option:hover { color: #1A1610; background: rgba(212,184,135,0.08); border-color: rgba(139,111,63,0.5); }
.hc-option.selected {
  border-color: var(--cc, var(--gold));
  color: var(--ivory);
  background: color-mix(in srgb, var(--cc, var(--gold)) 10%, transparent);
}

.hc-option__letter {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1.5px solid var(--cc, var(--gold));
  color: var(--cc, var(--gold));
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--dur-fast);
}
.hc-option.selected .hc-option__letter {
  background: var(--cc, var(--gold));
  color: var(--bg-deep, #0E0C08);
}
.hc-option__text { line-height: 1.4; }

/* ── Result ── */
.hc-result {
  border-radius: var(--r-xl);
  padding: var(--sp-8);
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  background: rgba(255,255,255,0.02);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  gap: var(--sp-7);
}
[data-theme="light"] .hc-result { background: rgba(255,255,255,0.6); border-color: rgba(139,111,63,0.18); }

.hc-result__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Spectrum bar */
.hc-spectrum { text-align: left; }
.hc-spectrum__track {
  position: relative;
  height: 10px;
  border-radius: 99px;
  background: linear-gradient(90deg, #EF4444 0%, #F59E0B 30%, #60A5FA 55%, #D4B887 100%);
  margin-bottom: 8px;
  opacity: 0.75;
}
.hc-spectrum__marker {
  position: absolute;
  top: -6px;
  transform: translateX(-50%);
  transition: left 1s cubic-bezier(.4,0,.2,1);
  font-size: 11px;
  line-height: 1;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}
.hc-spectrum__labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ivory-dim);
}

/* Hero: ring + tier info */
.hc-result__hero {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  text-align: left;
}
.hc-result__ring-wrap {
  position: relative;
  flex-shrink: 0;
  display: inline-block;
}
.hc-result__score-ring { display: block; }
.hc-result__score-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.hc-result__score-big {
  font-size: 2.8rem;
  font-weight: 600;
  font-family: var(--font-mono);
  line-height: 1;
}
.hc-result__score-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--ivory-dim);
  margin-top: 3px;
}
.hc-result__tier-info { flex: 1; }
.hc-result__badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: var(--r-pill);
  margin-bottom: var(--sp-3);
  font-weight: 600;
}
.hc-result__title {
  font-size: var(--text-xl);
  font-weight: 400;
  margin-bottom: var(--sp-3);
  line-height: 1.3;
}
.hc-result__desc {
  color: var(--ivory-muted);
  line-height: var(--leading-relaxed);
  font-size: var(--text-sm);
  margin: 0;
}
[data-theme="light"] .hc-result__desc { color: #4A3D2A; }

/* Category bars */
.hc-breakdown { text-align: left; }
.hc-breakdown__title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--ivory-dim);
  margin-bottom: var(--sp-4);
}
.hc-cat-bars { display: flex; flex-direction: column; gap: var(--sp-3); }
.hc-cat-bar { display: flex; flex-direction: column; gap: 6px; }
.hc-cat-bar__label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-xs);
  color: var(--ivory-muted);
}
[data-theme="light"] .hc-cat-bar__label { color: #4A3D2A; }
.hc-cat-bar__pct {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}
.hc-cat-bar__track {
  height: 6px;
  background: var(--border-soft);
  border-radius: 99px;
  overflow: hidden;
}
.hc-cat-bar__fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.8s cubic-bezier(.4,0,.2,1);
  width: 0%;
}

/* Action plan */
.hc-action-plan { text-align: left; }
.hc-action-plan__title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--ivory-dim);
  margin-bottom: var(--sp-4);
}
.hc-result__recs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}
.hc-result__rec {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  background: rgba(255,255,255,0.015);
  text-align: left;
}
[data-theme="light"] .hc-result__rec { background: rgba(0,0,0,0.02); border-color: rgba(139,111,63,0.15); }
.hc-result__rec-num {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: var(--gold);
  background: rgba(212,184,135,0.12);
  border-radius: 4px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.hc-result__rec-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  line-height: 1.4;
}
.hc-result__rec-text {
  font-size: var(--text-xs);
  color: var(--ivory-muted);
  line-height: 1.5;
}
[data-theme="light"] .hc-result__rec-text { color: #4A3D2A; }

.hc-result__actions {
  display: flex;
  gap: var(--sp-3);
  justify-content: center;
  flex-wrap: wrap;
}

/* Tier badge colors */
.tier-critical .hc-result__badge { background: rgba(239,68,68,0.12); color: #EF4444; border: 1px solid rgba(239,68,68,0.3); }
.tier-needs   .hc-result__badge { background: rgba(245,158,11,0.12); color: #F59E0B; border: 1px solid rgba(245,158,11,0.3); }
.tier-good    .hc-result__badge { background: rgba(96,165,250,0.12); color: #60A5FA; border: 1px solid rgba(96,165,250,0.3); }
.tier-apex    .hc-result__badge { background: rgba(212,184,135,0.15); color: var(--gold); border: 1px solid rgba(212,184,135,0.4); }

/* Hidden state */
.hc-intro.is-hidden,
.hc-question.is-hidden,
.hc-result.is-hidden { display: none; }

/* Responsive */
@media (max-width: 640px) {
  .hc-intro { grid-template-columns: 1fr; }
  .hc-intro__visual { display: none; }
  .hc-result__hero { flex-direction: column; text-align: center; }
  .hc-result__tier-info { text-align: center; }
  .hc-result__recs { grid-template-columns: 1fr; }
}

/* ============================================================
   CALCULATORS
   ============================================================ */
.calc-tabs {
  display: flex;
  gap: 0;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: var(--sp-6);
  background: rgba(255,255,255,0.02);
}
[data-theme="light"] .calc-tabs { background: rgba(255,255,255,0.4); border-color: rgba(139,111,63,0.2); }
.calc-tab {
  flex: 1;
  padding: var(--sp-3) var(--sp-4);
  background: transparent;
  border: none;
  border-right: 1px solid var(--border-soft);
  color: var(--ivory-dim);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--dur-base) var(--ease-luxe);
  white-space: nowrap;
}
.calc-tab:last-child { border-right: none; }
.calc-tab:hover { color: var(--ivory); background: rgba(255,255,255,0.04); }
[data-theme="light"] .calc-tab { color: #9E8A6E; border-right-color: rgba(139,111,63,0.18); }
[data-theme="light"] .calc-tab:hover { color: #2C1E0A; background: rgba(212,184,135,0.1); }
.calc-tab.is-active {
  background: rgba(212,184,135,0.12);
  color: var(--gold);
  font-weight: 600;
}
[data-theme="light"] .calc-tab.is-active { background: rgba(212,184,135,0.2); color: #7A5C28; }

/* Panel layout — stacked */
.calc-panel { display: none; }
.calc-panel.is-active {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

/* Row 1: header strip */
.calc-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-6);
  padding: var(--sp-5) var(--sp-6);
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  backdrop-filter: blur(12px);
}
.calc-panel__title h3 {
  font-size: var(--text-md);
  font-weight: 400;
  color: var(--ivory);
  margin-bottom: var(--sp-2);
}
.calc-panel__title p {
  font-size: var(--text-sm);
  color: var(--ivory-dim);
  max-width: 400px;
}
.calc-panel__hero {
  text-align: right;
  flex-shrink: 0;
}
.calc-hero-val {
  font-family: var(--font-mono);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-top: 4px;
}
.calc-hero-val.positive { color: #3DB87A; }

/* Row 2: inputs grid */
.calc-inputs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-4) var(--sp-5);
  padding: var(--sp-5) var(--sp-6);
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  backdrop-filter: blur(12px);
}

/* Calc field styles (unchanged, still used by both new + gold panels) */
.calc-field {
  margin-bottom: 0;
}
.calc-field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--ivory-dim);
  margin-bottom: var(--sp-2);
}
[data-theme="light"] .calc-field label { color: #9E8A6E; }
.calc-field__row {
  position: relative;
}
.calc-field__prefix {
  position: absolute;
  left: var(--sp-3);
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--ivory-dim);
  pointer-events: none;
}
[data-theme="light"] .calc-field__prefix { color: #9E8A6E; }
.calc-input {
  width: 100%;
  padding: var(--sp-3) var(--sp-3);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-sm);
  color: var(--ivory);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  transition: border-color var(--dur-fast);
  box-sizing: border-box;
}
.calc-input.has-prefix { padding-left: 36px; }
.calc-input.has-suffix { padding-right: 36px; }
.calc-input:focus {
  outline: none;
  border-color: var(--border-gold);
}
[data-theme="light"] .calc-input {
  background: rgba(255,255,255,0.7);
  border-color: rgba(139,111,63,0.25);
  color: #1A1610;
}
[data-theme="light"] .calc-input:focus { border-color: var(--gold-deep, #8B6F3F); }
.calc-field__suffix {
  position: absolute;
  right: var(--sp-3);
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--ivory-dim);
  pointer-events: none;
}
[data-theme="light"] .calc-field__suffix { color: #9E8A6E; }

/* Row 3: metrics strip */
.calc-metrics-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
}

/* Metric card (reused across strip + gold panel) */
.calc-metric {
  padding: var(--sp-3);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  background: rgba(255,255,255,0.02);
}
[data-theme="light"] .calc-metric { background: rgba(255,255,255,0.4); border-color: rgba(139,111,63,0.15); }
.calc-metric__label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--ivory-dim);
  margin-bottom: 6px;
}
[data-theme="light"] .calc-metric__label { color: #9E8A6E; }
.calc-metric__value {
  font-family: var(--font-mono);
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--gold);
}
[data-theme="light"] .calc-metric__value { color: #7A5C28; }
.calc-metric__value.positive { color: #3DB87A; }
.calc-metric__value.highlight { color: var(--gold); }
[data-theme="light"] .calc-metric__value.positive { color: #166534; }

/* Row 4: chart section */
.calc-chart-section {
  padding: var(--sp-4) var(--sp-5);
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  backdrop-filter: blur(12px);
}
.calc-chart-section p {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ivory-dim);
  margin-bottom: var(--sp-3);
  opacity: 0.6;
}
.calc-chart-wrap {
  height: 260px;    /* FIXED height — eliminates infinite resize loop */
  position: relative;
}

/* Light mode overrides for new layout classes */
[data-theme="light"] .calc-panel__head,
[data-theme="light"] .calc-inputs-grid,
[data-theme="light"] .calc-chart-section {
  background: rgba(255,255,255,0.55);
  border-color: rgba(139,111,63,0.18);
}
[data-theme="light"] .calc-panel__title h3 { color: #1A1610; }
[data-theme="light"] .calc-panel__title p  { color: #6B5A3E; }
[data-theme="light"] .calc-hero-val         { color: #7A5C28; }

/* Responsive */
@media (max-width: 780px) {
  .calc-inputs-grid { grid-template-columns: 1fr; }
  .calc-metrics-strip { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .calc-panel__head { flex-direction: column; }
  .calc-panel__hero { text-align: left; }
  .calc-metrics-strip { grid-template-columns: 1fr; }
}

/* ============================================================
   GOLD TAB — legacy two-column layout preserved
   (Gold tab still uses .calc-inputs + .calc-results)
   ============================================================ */
.calc-inputs {
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  background: rgba(255,255,255,0.02);
  backdrop-filter: blur(12px);
}
[data-theme="light"] .calc-inputs { background: rgba(255,255,255,0.55); border-color: rgba(139,111,63,0.18); }
.calc-inputs h3 {
  font-size: var(--text-md);
  font-weight: 400;
  margin-bottom: var(--sp-5);
  color: var(--ivory);
}
[data-theme="light"] .calc-inputs h3 { color: #1A1610; }
/* Inside gold tab, calc-field needs its own bottom margin restored */
#tab-gold .calc-field {
  margin-bottom: var(--sp-4);
}

/* ============================================================
   CTA STRIP
   ============================================================ */
.tools-cta {
  padding: var(--sp-10) 0;
  text-align: center;
}
.tools-cta__inner {
  max-width: 600px;
  margin: 0 auto;
}
.tools-cta h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 300;
  margin-bottom: var(--sp-3);
}
.tools-cta p {
  color: var(--ivory-muted);
  margin-bottom: var(--sp-6);
  line-height: var(--leading-relaxed);
}
[data-theme="light"] .tools-cta p { color: #4A3D2A; }

/* ============================================================
   GOLD CONVERTER TAB
   ============================================================ */

/* The calc-results panel (right column) — mirrors calc-result */
.calc-results {
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  background: rgba(255,255,255,0.02);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
[data-theme="light"] .calc-results { background: rgba(255,255,255,0.55); border-color: rgba(139,111,63,0.18); }
.calc-results h3 {
  font-size: var(--text-md);
  font-weight: 400;
  color: var(--ivory);
}
[data-theme="light"] .calc-results h3 { color: #1A1610; }

/* Live price bar */
.gold-live-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid rgba(212,184,135,0.2);
  border-radius: var(--r-sm);
  background: rgba(212,184,135,0.05);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--ivory-dim);
  margin-bottom: var(--sp-4);
  flex-wrap: wrap;
}
[data-theme="light"] .gold-live-bar {
  background: rgba(212,184,135,0.1);
  border-color: rgba(139,111,63,0.2);
  color: #9E8A6E;
}
.gold-live-bar strong {
  color: var(--gold);
  font-weight: 600;
}
[data-theme="light"] .gold-live-bar strong { color: #7A5C28; }

/* Animated green dot (same pattern as ticker) */
.gc-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 6px rgba(34,197,94,0.7);
  flex-shrink: 0;
  animation: gc-pulse 2s ease-in-out infinite;
}
@keyframes gc-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(0.85); }
}

/* Separator dot */
.gc-sep {
  color: var(--border-soft);
  font-size: 1rem;
  line-height: 1;
}

/* Section labels between weight / value groups */
.gc-section-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--ivory-dim);
  margin-bottom: var(--sp-2);
}
[data-theme="light"] .gc-section-label { color: #9E8A6E; }

/* Horizontal divider between weight and value groups */
.gc-divider {
  border: none;
  border-top: 1px solid var(--border-soft);
  margin: var(--sp-3) 0 var(--sp-3);
}
[data-theme="light"] .gc-divider { border-top-color: rgba(139,111,63,0.18); }

/* Quick reference table */
.gc-ref-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}
.gc-ref-table thead tr {
  background: rgba(212,184,135,0.1);
  border-radius: var(--r-sm);
}
[data-theme="light"] .gc-ref-table thead tr { background: rgba(212,184,135,0.18); }
.gc-ref-table th {
  padding: var(--sp-2) var(--sp-3);
  text-align: left;
  font-size: 9px;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  border-bottom: 1px solid rgba(212,184,135,0.2);
}
[data-theme="light"] .gc-ref-table th { color: #7A5C28; border-bottom-color: rgba(139,111,63,0.25); }
.gc-ref-table td {
  padding: var(--sp-2) var(--sp-3);
  color: var(--ivory-muted);
  border-bottom: 1px solid var(--border-soft);
}
[data-theme="light"] .gc-ref-table td { color: #4A3D2A; border-bottom-color: rgba(139,111,63,0.12); }
.gc-ref-table tbody tr:last-child td { border-bottom: none; }
.gc-ref-table tbody tr:hover td {
  background: rgba(212,184,135,0.05);
}
.gc-ref-table td:first-child {
  color: var(--ivory);
  font-weight: 500;
}
[data-theme="light"] .gc-ref-table td:first-child { color: #1A1610; }

/* Refresh notice */
.gc-refresh-note {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.03em;
  color: var(--ivory-dim);
  opacity: 0.7;
  margin-top: auto;
  padding-top: var(--sp-2);
}
[data-theme="light"] .gc-refresh-note { color: #9E8A6E; }
