/*
 * bc-calculator-a.css — Option A: "Editorial Quiet"
 *
 * Two-col layout. Left rail (320px) for inputs + italic pull-quote.
 * Right column for chart + horizontal 3-stat strip.
 * Uses the brand variable system (--gold, --brown, etc) by alias so
 * typography matches the page exactly.
 */

.bc-calc-a {
  --bcc-gold:      #BFA46F;
  --bcc-gold-dark: #85724D;
  --bcc-ink:       #1D1C1A;
  --bcc-ink-80:    rgba(29, 28, 26, 0.8);
  --bcc-ink-50:    rgba(29, 28, 26, 0.5);
  --bcc-ink-28:    rgba(29, 28, 26, 0.28);
  --bcc-rule:      rgba(29, 28, 26, 0.12);
  --bcc-rule-dark: rgba(29, 28, 26, 0.2);
  --bcc-rule-gold: rgba(191, 164, 111, 0.4);

  width: 100%;
  font-family: "Ogg Text", Georgia, serif;
  color: var(--bcc-ink);
  font-weight: 400;
}

/* Force the calculator row to span full width beneath the heading column. */
.elementor-element.elementor-element-c7e178b {
  --width: 100% !important;
  width: 100% !important;
  max-width: 100% !important;
}
.elementor-element.elementor-element-c7e178b > .elementor-widget-container,
.elementor-element.elementor-element-5741ae5 > .elementor-widget-container {
  padding: 0 !important;
}

/* ============================================================
   Heading row — badge + two-line h2 (left), lede (top-right),
   mirrors section 005 "Graded Gold Coins" layout. The h2 keeps
   its global desktop-heading-indent/deindent classes so the
   badge overlaps the first line and line 2 wraps full-left.
   ============================================================ */
.bc-calc-headrow {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 24px 48px;
  width: 100%;
}
.bc-calc-headrow-left {
  flex: 1 1 680px;
  min-width: 0;
}
/* badge sits above; the h2's deindent negative-margin pulls it up to overlap */
.bc-calc-headrow-left .elementor-widget-image .elementor-widget-container { line-height: 0; }
/* The h2 inherits max-width:80% + margin-left:-40px tuned for a full-width
   column; in this narrower heading column that overflows left and over-wraps.
   Neutralise so the title aligns under the badge and breaks cleanly in two. */
.bc-calc-headrow-left .elementor-element-41f5176 {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
}
/* The indent/deindent acts on the .elementor-heading-title itself: it caps the
   width and applies a negative margin-left tuned for a full-width column, which
   overflows here. Keep only the first-line text-indent (clears the badge); let
   the title use the full column width and align its left edge with the badge.
   margin-top is left untouched so the badge still overlaps line 1. */
.bc-calc-headrow-left .elementor-element-41f5176 .elementor-heading-title {
  margin-left: 0 !important;
  max-width: none !important;
  width: auto !important;
}
/* Badge / heading-line calibration (match sections 002 and 005).
   The badge widget (2291b03) is float:left inside this block container, so the
   heading first line wraps AFTER the float (already shifted right by one
   badge-width). The reference sections (002/005) sit in a flex container where
   float is inert, so there the first line is governed by text-indent alone and
   the gap from badge-right to text equals text-indent minus badge-width.
   We reproduce that gap by setting text-indent = reference-indent minus badge-width:
     desktop 160 minus 115 = 45 (gap 45); mobile 90 minus 80 = 10 (gap 10).
   Badge margin-top centres the pill on line 1 (reference uses +6px; the float
   layout needs a smaller nudge on mobile). max-width caps the heading measure so
   it breaks two lines ("See What Your" / "Money Becomes") like the
   width-constrained reference titles, instead of leaving a one-word widow. */
@media (min-width: 1025px) {
  .bc-calc-headrow-left .elementor-element-2291b03 > .elementor-widget-container {
    margin-top: 6px !important;
  }
  .bc-calc-headrow-left .elementor-element-41f5176 .elementor-heading-title {
    text-indent: 45px !important;
    max-width: 660px !important;
  }
}
@media (max-width: 1024px) {
  .bc-calc-headrow-left .elementor-element-2291b03 > .elementor-widget-container {
    margin-top: 3px !important;
  }
  .bc-calc-headrow-left .elementor-element-41f5176 .elementor-heading-title {
    text-indent: 10px !important;
  }
}
/* The real constraint: this widget's container carries an inherited
   padding-right (~277px) + negative margin-left from the original full-width
   003 column, which squeezed the title to ~490px (→ 3 lines) and shoved it
   off the left edge. Reset both so the title uses the whole heading column. */
.bc-calc-headrow-left .elementor-element-41f5176 > .elementor-widget-container {
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-right: 0 !important;
  padding-left: 0 !important;
}
.bc-calc-headrow-right {
  flex: 0 1 340px;
  min-width: 240px;
  padding-top: 10px;
}
/* lede top-right — match 005 intro: Ogg Text ~18px, ink-muted, no stray margins */
.bc-calc-headrow-right .elementor-element-e59ccd4 p,
.bc-calc-headrow-right .elementor-widget-text-editor p {
  font-family: "Ogg Text", Georgia, serif !important;
  font-size: 18px !important;
  line-height: 1.5 !important;
  font-weight: 300 !important;
  color: rgba(29, 28, 26, 0.8) !important;
  margin: 0 !important;
}
@media (max-width: 1024px) {
  .bc-calc-headrow-right { flex-basis: 100%; padding-top: 0; }
}

/* ============================================================
   Two-col grid: 320px rail + flex chart column
   ============================================================ */
.bc-calc-a-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 80px;
  align-items: stretch;
  margin-top: 48px;
}

/* ============================================================
   Eyebrow utility (uppercase, archivo, 0.16em tracking)
   ============================================================ */
.bc-calc-a-eyebrow {
  font-family: "Archivo", "Acid Grotesk", "Jost", sans-serif;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bcc-ink-80);
  font-weight: 500;
  display: block;
}

/* ============================================================
   Left rail
   ============================================================ */
.bc-calc-a-rail {
  display: flex;
  flex-direction: column;
}

.bc-calc-a-field { margin-bottom: 36px; }
.bc-calc-a-field:last-of-type { margin-bottom: 0; }

.bc-calc-a-input-wrap {
  position: relative;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--bcc-ink);
  margin-top: 12px;
}

.bc-calc-a-input {
  width: 100%;
  background: transparent;
  border: 0;
  outline: 0;
  font-family: "Ogg", Georgia, serif;
  font-weight: 500;
  font-size: 56px;
  line-height: 1;
  color: var(--bcc-ink);
  padding: 0;
  letter-spacing: -0.01em;
  caret-color: var(--bcc-gold);
}

.bc-calc-a-chips {
  display: flex;
  gap: 18px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.bc-calc-a-chip {
  font-family: "Archivo", "Acid Grotesk", "Jost", sans-serif;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bcc-ink-50);
  padding: 4px 0;
  border: 0;
  background: transparent;
  border-bottom: 1px solid transparent;
  cursor: pointer;
  font-weight: 500;
  line-height: 1;
  border-radius: 0;
  transition: color .15s ease, border-color .15s ease;
}
.bc-calc-a-chip:hover { color: var(--bcc-ink); }
.bc-calc-a-chip.is-active {
  color: var(--bcc-ink);
  border-bottom-color: var(--bcc-gold);
}

.bc-calc-a-years {
  display: flex;
  gap: 30px;
  align-items: baseline;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--bcc-ink);
  margin-top: 12px;
}
.bc-calc-a-year {
  font-family: "Ogg", Georgia, serif;
  font-size: 18px;
  line-height: 1;
  color: var(--bcc-ink-50);
  padding: 4px 2px;
  border: 0;
  background: transparent;
  border-bottom: 1px solid transparent;
  cursor: pointer;
  letter-spacing: -0.01em;
  border-radius: 0;
  transition: color .15s ease, border-color .15s ease, font-size .15s ease;
}
.bc-calc-a-year:hover { color: var(--bcc-ink); }
.bc-calc-a-year.is-active {
  font-size: 28px;
  color: var(--bcc-ink);
  border-bottom-color: var(--bcc-gold);
}

.bc-calc-a-spacer { flex: 1; min-height: 32px; }

.bc-calc-a-quote-hr {
  width: 36px;
  height: 1px;
  background: var(--bcc-gold);
  margin: 0 0 22px;
  border: 0;
}

.bc-calc-a-quote {
  font-family: "Ogg Text", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 26px;
  line-height: 1.25;
  margin: 0;
  color: var(--bcc-ink);
  letter-spacing: -0.005em;
}
.bc-calc-a-quote strong,
.bc-calc-a-quote .num {
  color: var(--bcc-gold-dark);
  font-weight: 500;
  font-style: italic;
}

.bc-calc-a-foot {
  font-family: "Jost", "Navigo", sans-serif;
  font-size: 12px;
  color: var(--bcc-ink-50);
  margin: 18px 0 0;
  letter-spacing: 0.02em;
  line-height: 1.5;
}
.bc-calc-a-foot a {
  font-style: italic;
  color: var(--bcc-ink-80);
  text-decoration: none;
  border: 0;
}
.bc-calc-a-foot a:hover { color: var(--bcc-gold-dark); }

/* ============================================================
   Right column — chart + stat strip
   ============================================================ */
.bc-calc-a-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.bc-calc-a-chart-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 10px;
}
.bc-calc-a-chart-head .bc-calc-a-eyebrow { color: var(--bcc-ink); }
.bc-calc-a-chart-range {
  font-family: "Jost", "Navigo", sans-serif;
  font-size: 12px;
  color: var(--bcc-ink-50);
  letter-spacing: 0.04em;
}
.bc-calc-a-chart-hr {
  flex: 1;
  height: 1px;
  background: var(--bcc-gold);
  opacity: 0.4;
  margin-left: 8px;
}

.bc-calc-a-chart-wrap {
  width: 100%;
  margin: 0;
  aspect-ratio: 940 / 500;
  max-height: 500px;
}
.bc-calc-a-chart {
  width: 100%;
  height: 100%;
  display: block;
}

/* Stats strip */
.bc-calc-a-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-top: 1px solid var(--bcc-ink);
  margin-top: 12px;
  padding-top: 18px;
}
.bc-calc-a-stat {
  padding-left: 24px;
  border-left: 1px solid var(--bcc-rule-dark);
}
.bc-calc-a-stat:first-child {
  padding-left: 0;
  border-left: 0;
}
.bc-calc-a-stat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.bc-calc-a-stat-head .bc-calc-a-eyebrow { white-space: nowrap; }
.bc-calc-a-stat-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.bc-calc-a-stat-value {
  font-family: "Ogg", Georgia, serif;
  font-weight: 500;
  font-size: 36px;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--bcc-ink);
}
.bc-calc-a-stat-mult {
  font-family: "Ogg", Georgia, serif;
  font-size: 18px;
  color: var(--bcc-gold-dark);
}
.bc-calc-a-stat-sub {
  font-family: "Jost", "Navigo", sans-serif;
  font-size: 12px;
  color: var(--bcc-ink-50);
  margin-top: 8px;
  letter-spacing: 0.02em;
}

/* Swatch SVG colour */
.bc-calc-a-swatch { display: inline-block; vertical-align: middle; }

/* ============================================================
   Methodology modal — shared chrome
   ============================================================ */
.bc-calc-a-modal {
  position: fixed; inset: 0;
  display: none; align-items: center; justify-content: center;
  z-index: 99990; padding: 24px;
}
.bc-calc-a-modal.is-open { display: flex; }
.bc-calc-a-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(29, 28, 26, 0.7);
}
.bc-calc-a-modal-content {
  position: relative;
  max-width: 720px; width: 100%;
  max-height: 86vh;
  overflow-y: auto;
  background: #fff;
  padding: 48px 56px;
  border-top: 2px solid var(--bcc-gold);
  font-family: "Ogg Text", Georgia, serif;
  color: var(--bcc-ink);
  font-weight: 400;
}
.bc-calc-a-modal-close {
  position: absolute; top: 14px; right: 16px;
  background: transparent; border: 0;
  font-size: 28px; line-height: 1;
  color: var(--bcc-gold-dark);
  cursor: pointer;
}
.bc-calc-a-modal-content h3 {
  font-family: "Ogg", Georgia, serif;
  font-size: 32px; line-height: 1.15;
  margin: 0 0 18px;
  color: var(--bcc-ink);
  font-weight: 500;
}
.bc-calc-a-modal-content h4 {
  font-family: "Archivo", "Jost", sans-serif;
  text-transform: uppercase; letter-spacing: 0.14em;
  font-size: 11px; color: var(--bcc-gold-dark);
  font-weight: 500;
  margin: 26px 0 10px;
}
.bc-calc-a-modal-content ul {
  margin: 0 0 8px; padding-left: 20px;
  font-size: 14px; line-height: 1.7;
  color: var(--bcc-ink-80);
}
.bc-calc-a-modal-content li { margin-bottom: 8px; }
.bc-calc-a-modal-content li strong { color: var(--bcc-ink); font-weight: 500; }

/* ============================================================
   Responsive — stack rail above chart under 1100px
   ============================================================ */
@media (max-width: 1100px) {
  .bc-calc-a-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .bc-calc-a-spacer { display: none; }
  .bc-calc-a-quote-hr { margin-top: 16px; }
}
@media (max-width: 760px) {
  /* Tighten the heading stack on phones: the H2 -> lede gap and the lede ->
     first field gap (an Elementor spacer plus the grid's 48px margin) are far
     too tall at this width. */
  .bc-calc-headrow { gap: 12px 48px; }
  .bc-calc-headrow-left .elementor-heading-title { margin-bottom: 0 !important; }
  .elementor-element-00c208c > .elementor-widget-container { margin-bottom: 0 !important; }
  .bc-calc-a-grid { margin-top: 22px; }

  /* Match the near-square mobile viewBox in bc-calculator-a.js so the chart
     fills the wrap (no letterboxing) and the thicker lines/labels have room. */
  .bc-calc-a-chart-wrap { aspect-ratio: 560 / 540; max-height: none; }
  .bc-calc-a-input { font-size: 44px; }
  .bc-calc-a-year { font-size: 16px; }
  .bc-calc-a-year.is-active { font-size: 24px; }
  .bc-calc-a-quote { font-size: 22px; }
  .bc-calc-a-stats {
    grid-template-columns: 1fr;
    border-top: 0;
    padding-top: 0;
  }
  .bc-calc-a-stat {
    padding: 20px 0;
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--bcc-rule-gold);
  }
  .bc-calc-a-stat-value { font-size: 30px; }
  .bc-calc-a-modal-content { padding: 32px 26px; }
}
