/* ============================================================
   BRIDGEVANTI Resource Center + calculators (v1)
   Loaded after styles.css on /resources/ pages only.
   Report colours (cream, forest, antique gold) are used for the
   results statement, the print report and the PDF.
   ============================================================ */
:root {
  --cream: #f3eee2;
  --forest: #0b2a1c;
  --antique: #c2a15b;
  --cream-ink: #34463b;
  --cream-mute: #5d6e63;
  --loss: #a8402f;
}

/* ---------- Shared bits ---------- */
.tool-hero { padding-bottom: clamp(28px, 4vw, 48px); }
.tool-hero h1 { font-size: clamp(2.4rem, 5.6vw, 4.6rem); max-width: 18ch; }
.tool-hero .lede { max-width: 54ch; margin-top: 22px; }
.tool-facts { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.tool-facts li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--mute); font-size: 0.92rem; }
.tool-facts svg { width: 16px; height: 16px; color: var(--green); }
.btn--sm { min-height: 44px; padding: 0 18px; font-size: 0.95rem; }
.text-btn {
  background: none; border: 0; color: var(--gold); font-weight: 600; font-size: 0.95rem;
  min-height: 44px; padding: 0 6px; border-radius: 8px; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px;
  transition: text-decoration-color var(--dur-fast) ease;
}
.text-btn:hover { text-decoration-color: currentColor; }
.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 999px;
  background: transparent; border: 1px solid var(--line); color: var(--mute);
  transition: color var(--dur-fast) ease, border-color var(--dur-fast) ease;
}
.icon-btn:hover { color: var(--paper); border-color: var(--line-strong); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Calculator layout ---------- */
.calc-app { padding-bottom: clamp(56px, 8vw, 104px); }
.calc-noscript { padding: 18px 20px; border: 1px dashed var(--gold); border-radius: var(--radius-s); margin-bottom: 20px; }
.calc-layout { display: grid; gap: 24px; align-items: start; }
@media (min-width: 1024px) {
  .calc-layout { grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr); gap: 28px; }
  .calc-dash {
    position: sticky; top: 96px; max-height: calc(100vh - 112px); overflow-y: auto; overscroll-behavior: contain;
    padding-right: 4px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
  }
}

.calc-form { display: grid; gap: 14px; min-width: 0; }
.calc-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; }
.scen-switch, .calc-toolbar-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.scen-tab {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 8px;
  border-radius: 999px; border: 1.5px solid var(--line-strong); background: transparent; color: var(--mute); font-weight: 600;
  max-width: 220px;
}
.scen-tab [data-tab-name] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scen-tab .scen-key { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--raise-2); color: var(--paper); font-size: 0.85rem; flex-shrink: 0; }
.scen-tab[aria-pressed="true"] { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.scen-tab[aria-pressed="true"] .scen-key { background: var(--gold); color: var(--ink); }
.calc-status { min-height: 0; color: var(--gold); font-size: 0.95rem; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.calc-status:empty { display: none; }
.example-note { font-size: 0.93rem; color: var(--mute); padding: 14px 16px; border: 1px dashed rgba(244, 182, 59, 0.55); border-radius: var(--radius-s); background: rgba(244, 182, 59, 0.05); }
.example-note strong { color: var(--gold); }
.error-summary { color: var(--danger); font-size: 0.95rem; padding: 12px 16px; border: 1px solid var(--danger); border-radius: var(--radius-s); }
.warn-box { color: var(--gold); font-size: 0.95rem; padding: 12px 16px; border: 1px solid rgba(244, 182, 59, 0.5); border-radius: var(--radius-s); }

/* Cards */
.calc-card { background: var(--raise); border: 1px solid var(--line); border-radius: 22px; padding: clamp(18px, 2.6vw, 28px); min-width: 0; }
.cc-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 16px; margin-bottom: 18px; width: 100%; }
.cc-head h2, .cc-head .h2 { font-family: var(--font-display); font-size: clamp(1.2rem, 2vw, 1.4rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; display: inline-flex; align-items: center; gap: 12px; }
.cc-num { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; border: 1.5px solid rgba(244, 182, 59, 0.6); color: var(--gold); font-size: 0.85rem; font-weight: 700; flex-shrink: 0; }
.cc-sub { color: var(--mute); font-size: 0.92rem; }
.cc-sub strong { color: var(--paper); font-weight: 600; margin-left: 4px; }
.cc-intro { color: var(--mute); font-size: 0.95rem; margin-bottom: 16px; }
.calc-line { color: var(--mute); font-size: 0.92rem; margin-top: 16px; }
.calc-line strong { color: var(--paper); font-weight: 600; }
details.calc-more > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; border-radius: 12px; min-height: 44px; }
details.calc-more > summary::-webkit-details-marker { display: none; }
details.calc-more > summary.cc-head { margin-bottom: 0; flex-wrap: nowrap; }
details.calc-more > summary .cc-sub { margin-left: auto; text-align: right; }
details.calc-more > summary::after {
  content: ""; width: 12px; height: 12px; flex-shrink: 0; border-right: 2px solid var(--mute); border-bottom: 2px solid var(--mute);
  transform: rotate(45deg) translateY(-3px); transition: transform var(--dur-med) var(--ease-out);
}
details.calc-more[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
details.calc-more[open] > summary { margin-bottom: 18px; }
details.calc-more > summary:hover .h2 { color: var(--gold); }

/* Fields */
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
.fgrid + .fgrid, .seg + .fgrid { margin-top: 0; }
.fgrid .span-2 { grid-column: 1 / -1; }
.calc-form .field { gap: 6px; align-content: start; min-width: 0; }
.calc-form .field label, .calc-form .field .label { font-size: 0.95rem; }
.opt { color: var(--mute); font-weight: 400; font-size: 0.85rem; }
.field-note { color: var(--mute); font-size: 0.85rem; line-height: 1.45; }
.calc-form .field.has-warning .field-error { display: block; color: var(--gold); }
.calc-form .input { min-height: 52px; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.calc-form .select { font-size: 1rem; }
.affix { position: relative; }
.affix .affix-pre, .affix .affix-suf { position: absolute; top: 50%; transform: translateY(-50%); color: var(--mute); pointer-events: none; font-size: 1rem; }
.affix .affix-pre { left: 15px; }
.affix .affix-pre + .input { padding-left: 30px; }
.affix--suf .affix-suf { right: 15px; }
.affix--suf .input { padding-right: 34px; }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 24px; }
.tip-btn {
  position: relative; width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  border: 1.5px solid var(--line-strong); background: transparent; color: var(--mute); font-size: 0.8rem; font-weight: 700; line-height: 1;
}
.tip-btn::before { content: ""; position: absolute; inset: -9px; }
.tip-btn[aria-expanded="true"], .tip-btn:hover { color: var(--ink); background: var(--gold); border-color: var(--gold); }
.tip-text { font-size: 0.9rem; color: var(--paper); background: rgba(244, 182, 59, 0.08); border-left: 3px solid var(--gold); padding: 10px 14px; border-radius: 0 10px 10px 0; }

/* Segmented choice */
.seg { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.seg legend { font-weight: 600; font-size: 0.95rem; margin-bottom: 10px; padding: 0; float: left; width: 100%; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seg span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px;
  border: 1.5px solid var(--line-strong); color: var(--mute); font-weight: 600; font-size: 0.93rem;
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease, border-color var(--dur-fast) ease;
}
.seg label:hover span { border-color: rgba(238, 243, 238, 0.45); color: var(--paper); }
.seg input:checked + span { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.seg input:checked + span::before { content: "✓"; margin-right: 6px; }
.seg input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 3px; }
.check { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; font-weight: 500 !important; }
.check input { width: 22px; height: 22px; accent-color: var(--gold); flex-shrink: 0; }

/* Slider + number */
.range-combo { display: grid; grid-template-columns: minmax(0, 1fr) 116px; gap: 16px; align-items: center; }
.affix--short .input { text-align: right; }

/* Junk removal extras */
.loads-viz { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin-top: 18px; }
.loads-viz:empty { display: none; }
.load { position: relative; width: 46px; height: 56px; border: 1.5px solid var(--line-strong); border-radius: 8px 8px 4px 4px; overflow: hidden; background: rgba(238, 243, 238, 0.03); }
.load i { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(180deg, var(--gold), var(--gold-deep)); transition: height 500ms var(--ease-out); }
.load span { position: absolute; inset: auto 0 4px 0; text-align: center; font-size: 0.72rem; font-weight: 700; color: var(--ink); mix-blend-mode: normal; text-shadow: 0 0 2px rgba(255, 255, 255, 0.4); }
.load-more { color: var(--mute); font-size: 0.9rem; align-self: center; }
.sub-title { font-family: var(--font-body); font-size: 1rem; font-weight: 600; letter-spacing: 0; margin: 22px 0 12px; }
.sub-more { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 4px; }
.sub-more > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--gold); list-style: none; }
.sub-more > summary::-webkit-details-marker { display: none; }
.sub-more > summary::before { content: "+"; width: 22px; height: 22px; display: inline-grid; place-items: center; border-radius: 50%; border: 1.5px solid currentColor; font-size: 0.95rem; line-height: 1; }
.sub-more[open] > summary::before { content: "−"; }
.sub-more[open] > summary { margin-bottom: 12px; }
.st-unit { font-size: 0.82rem; color: rgba(243, 238, 226, 0.75) !important; }
.st-unit:empty { display: none; }

/* Line items */
.lines { display: grid; gap: 10px; }
.lines-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.lines-head { display: none; }
.line-row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; gap: 10px;
  padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: rgba(238, 243, 238, 0.02);
}
.line-row .lr-desc { grid-column: 1 / -1; }
.line-row .lr-total { grid-column: 1 / 3; grid-row: 3; align-self: center; font-weight: 600; color: var(--paper); }
.line-row .lr-total::before { content: "Line total  "; color: var(--mute); font-weight: 400; font-size: 0.9rem; }
.line-row .lr-remove { grid-column: 3; grid-row: 3; }
.line-row .lr-qty { grid-row: 2; grid-column: 1; }
.line-row .lr-unit { grid-row: 2; grid-column: 2 / 4; }
.lr-label { font-size: 0.85rem !important; color: var(--mute); font-weight: 500 !important; }
.line-row .input { min-height: 48px; }
.line-row .field.has-error .input { border-color: var(--danger); }
@media (min-width: 680px) {
  .lines-head, .line-row { grid-template-columns: minmax(0, 2.2fr) minmax(64px, 0.7fr) minmax(0, 1.1fr) minmax(84px, 0.9fr) 44px; }
  .lines-head { display: grid; gap: 10px; color: var(--mute); font-size: 0.85rem; padding: 0 13px; }
  .lines-head span:nth-child(4) { text-align: right; }
  .line-row { align-items: center; }
  .line-row > * { grid-row: auto !important; grid-column: auto !important; }
  .line-row .lr-total { text-align: right; }
  .line-row .lr-total::before { content: none; }
  .lr-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.lines .btn--sm { justify-self: start; }

/* ---------- Results ---------- */
.calc-dash { display: grid; gap: 14px; min-width: 0; }
.statement {
  background: var(--cream); color: var(--forest); border-radius: 24px; padding: clamp(22px, 3vw, 32px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 24px 60px -30px rgba(0, 0, 0, 0.6);
  position: relative; overflow: hidden;
}
.statement::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--antique); }
.st-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.st-label { font-weight: 600; color: var(--cream-mute); font-size: 0.95rem; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 0.85rem; font-weight: 700; }
.status-badge.is-gain { background: var(--forest); color: var(--cream); }
.status-badge.is-gain::before { content: "✓"; color: var(--antique); }
.status-badge.is-loss { background: var(--loss); color: #fff; }
.status-badge.is-loss::before { content: "!"; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: #fff; color: var(--loss); font-size: 0.75rem; }
.status-badge.is-neutral { background: rgba(11, 42, 28, 0.08); color: var(--cream-ink); }
.st-big {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -0.045em; line-height: 1;
  font-size: clamp(2.6rem, 4.8vw, 4rem); margin: 10px 0 18px; color: var(--forest); overflow-wrap: anywhere;
}
.calc-dash.is-loss .st-big { color: var(--loss); }
.st-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; padding-top: 18px; border-top: 1px solid rgba(11, 42, 28, 0.14); }
.st-kpis dt { font-size: 0.82rem; color: var(--cream-mute); }
.st-kpis dd { margin: 2px 0 0; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.st-prices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.st-prices > div { background: rgba(11, 42, 28, 0.06); border-radius: 14px; padding: 12px 14px; display: grid; gap: 2px; }
.st-prices > div:last-child { background: var(--forest); color: var(--cream); }
.st-prices span { font-size: 0.82rem; color: var(--cream-mute); }
.st-prices > div:last-child span { color: rgba(243, 238, 226, 0.75); }
.st-prices strong { font-family: var(--font-display); font-size: 1.45rem; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.st-prices > div:last-child strong { color: var(--antique); }
.st-guidance { margin-top: 16px; font-size: 0.93rem; color: var(--cream-ink); border-left: 3px solid var(--antique); padding-left: 12px; }
.st-try {
  margin-top: 14px; width: 100%; min-height: 46px; border-radius: 999px; border: 1.5px solid rgba(11, 42, 28, 0.35);
  background: transparent; color: var(--forest); font-weight: 600; font-size: 0.95rem;
  transition: background var(--dur-fast) ease;
}
.st-try:hover { background: rgba(11, 42, 28, 0.07); }
.statement :focus-visible { outline-color: var(--forest); }
.st-multi { margin-top: 12px; font-size: 0.9rem; color: var(--cream-ink); }

.dash-card { background: var(--raise); border: 1px solid var(--line); border-radius: 20px; padding: clamp(18px, 2.4vw, 24px); margin: 0; min-width: 0; }
.dash-card figcaption, .dash-card h3 { font-family: var(--font-body); font-weight: 600; font-size: 0.95rem; color: var(--mute); letter-spacing: 0; margin-bottom: 14px; }
.hbars { display: grid; gap: 14px; }
.hbar-top { display: flex; justify-content: space-between; gap: 12px; font-size: 0.95rem; margin-bottom: 6px; }
.hbar-top span:last-child { font-weight: 600; }
.hbar-track { height: 12px; border-radius: 8px; background: rgba(238, 243, 238, 0.07); overflow: hidden; }
.hbar-track i { display: block; height: 100%; border-radius: 8px; transition: width 500ms var(--ease-out); }
.b-rev i { background: var(--paper); }
.b-cost i { background: var(--gold); }
.b-profit i { background: var(--green); }
.b-loss i { background: repeating-linear-gradient(135deg, var(--danger) 0 6px, #c9604f 6px 12px); }
.b-loss .hbar-top span:first-child::before { content: "▼ "; color: var(--danger); }
.b-be i { background: #7aa892; }
.b-target i { background: var(--gold); }
.meter-track { position: relative; height: 14px; border-radius: 8px; background: rgba(238, 243, 238, 0.07); }
.meter-fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 8px; background: var(--green); transition: width 500ms var(--ease-out); }
.meter.is-loss .meter-fill { background: var(--danger); }
.meter-target { position: absolute; top: -6px; width: 4px; height: 26px; margin-left: -2px; background: var(--gold); border-radius: 2px; box-shadow: 0 0 0 2px var(--raise); }
.meter-scale { display: flex; justify-content: space-between; color: var(--mute); font-size: 0.78rem; margin-top: 10px; }
.meter-note { margin-top: 10px; font-size: 0.92rem; }
.donut-wrap { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 20px; align-items: center; }
.donut svg { width: 100%; height: auto; color: var(--paper); }
.legend { list-style: none; padding: 0; display: grid; gap: 8px; font-size: 0.92rem; }
.legend li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto 40px; gap: 10px; align-items: center; }
.legend .sw { width: 12px; height: 12px; border-radius: 3px; }
.legend .lg-val { font-weight: 600; }
.legend .lg-pct { color: var(--mute); text-align: right; }
.legend li.is-zero { opacity: 0.45; }
.dash-actions h3 { color: var(--paper); font-size: 1.05rem; }
.act-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.act-grid .btn { width: 100%; padding: 0 14px; }
.act-grid .btn:first-child { grid-column: 1 / -1; }
.save-box { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.save-label { font-weight: 600; font-size: 0.95rem; }
.save-row { display: flex; gap: 8px; }
.save-row .input { flex: 1; min-width: 0; min-height: 48px; }
.save-row .btn { min-height: 48px; }
.save-note { font-size: 0.88rem; }
.save-note:empty { display: none; }
.save-list { list-style: none; padding: 0; display: grid; }
.save-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.save-info { display: grid; min-width: 0; }
.save-info strong { overflow-wrap: anywhere; }
.save-info span { font-size: 0.85rem; }
.save-acts { display: flex; gap: 8px; }

/* Comparison */
.compare { margin-top: 28px; background: var(--deep); border: 1px solid var(--line); border-radius: 24px; padding: clamp(20px, 3vw, 32px); }
.compare h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -0.03em; margin-bottom: 6px; }
.compare .table-scroll { overflow-x: auto; margin-top: 18px; }
.cmp-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 0.97rem; }
.cmp-table th, .cmp-table td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); text-align: right; }
.cmp-table th[scope="row"], .cmp-table thead th:first-child { text-align: left; font-weight: 500; }
.cmp-table thead th { color: var(--mute); font-size: 0.88rem; font-weight: 600; }
.cmp-table .diff { font-weight: 700; }
.cmp-table .diff.is-better { color: var(--green); }
.cmp-table .diff.is-worse { color: var(--danger); }

/* Mobile results bar */
.mini-bar {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px 10px 18px; border-radius: 18px; text-decoration: none;
  background: rgba(243, 238, 226, 0.97); color: var(--forest); box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.6);
  transform: translateY(140%); visibility: hidden; transition: transform var(--dur-med) var(--ease-out), visibility 0s linear var(--dur-med);
}
.mini-bar.is-on { transform: none; visibility: visible; transition: transform var(--dur-med) var(--ease-out), visibility 0s; }
.mini-bar > span:first-child { display: grid; line-height: 1.1; }
.mini-label { font-size: 0.75rem; color: var(--cream-mute); font-weight: 600; }
.mini-bar strong { font-family: var(--font-display); font-size: 1.35rem; letter-spacing: -0.02em; }
.mini-bar.is-loss strong { color: var(--loss); }
.mini-margin { font-size: 0.85rem; font-weight: 600; color: var(--cream-ink); }
.mini-go { background: var(--forest); color: var(--cream); border-radius: 12px; padding: 0 14px; min-height: 40px; display: inline-flex; align-items: center; font-weight: 600; font-size: 0.9rem; white-space: nowrap; }
@media (min-width: 1024px) { .mini-bar { display: none; } }

/* ---------- Education ---------- */
.edu { padding-block: clamp(56px, 8vw, 104px); border-top: 1px solid var(--line); }
.edu-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.edu h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.035em; margin-bottom: 8px; }
.edu-main h3 { font-family: var(--font-display); font-size: 1.35rem; letter-spacing: -0.02em; margin-top: 36px; margin-bottom: 10px; }
.edu-main p, .edu-main li { color: rgba(238, 243, 238, 0.86); }
.edu-main ol, .edu-main ul { padding-left: 1.3em; display: grid; gap: 8px; }
.edu-main li::marker { color: var(--gold); }
.formula-list { list-style: none; padding: 16px 18px !important; background: var(--raise); border: 1px solid var(--line); border-radius: 16px; font-variant-numeric: tabular-nums; margin-bottom: 14px; }
.formula-list strong { color: var(--gold); font-weight: 600; }
.edu-faq-title { font-size: clamp(1.6rem, 3vw, 2.2rem) !important; }
.faq-mini { border-top: 1px solid var(--line); margin-top: 18px; }
.faq-mini details { border-bottom: 1px solid var(--line); }
.faq-mini summary { list-style: none; cursor: pointer; padding: 18px 36px 18px 0; font-weight: 600; position: relative; }
.faq-mini summary::-webkit-details-marker { display: none; }
.faq-mini summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 1.4rem; color: var(--gold); transition: transform var(--dur-med) var(--ease-out); }
.faq-mini details[open] summary::after { transform: rotate(45deg); }
.faq-mini details p { color: var(--mute); padding-bottom: 18px; }

.help-band { padding-bottom: clamp(56px, 8vw, 104px); }
.help-inner { display: grid; grid-template-columns: minmax(0, 1.3fr) auto; gap: 24px 48px; align-items: end; padding: clamp(24px, 4vw, 44px); border: 1px solid var(--line); border-radius: 28px; background: var(--deep); }
.help-inner h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); letter-spacing: -0.03em; margin-bottom: 12px; }

/* ---------- Resource Center ---------- */
.res-intro { max-width: 60ch; }
.res-tools { display: grid; gap: 18px; margin-bottom: 28px; }
.res-filter-group { border: 0; padding: 0; margin: 0; min-width: 0; }
.res-filter-group legend { font-weight: 600; font-size: 0.92rem; color: var(--mute); margin-bottom: 10px; padding: 0; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn {
  min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line-strong);
  background: transparent; color: var(--mute); font-weight: 600; font-size: 0.93rem;
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease, border-color var(--dur-fast) ease;
}
.chip-btn:hover { color: var(--paper); border-color: rgba(238, 243, 238, 0.45); }
.chip-btn[aria-pressed="true"] { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.res-search { position: relative; max-width: 420px; }
.res-search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--mute); pointer-events: none; }
.res-search .input { padding-left: 46px; }
.res-count { color: var(--mute); font-size: 0.95rem; margin-bottom: 16px; }
.res-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.res-card {
  position: relative; height: 100%; display: flex; flex-direction: column; gap: 14px;
  background: var(--raise); border: 1px solid var(--line); border-radius: 24px; padding: clamp(22px, 2.6vw, 30px);
  transition: transform var(--dur-med) var(--ease-out), border-color var(--dur-fast) ease, box-shadow var(--dur-med) ease;
}
.res-card.is-live:hover, .res-card.is-live:focus-within { transform: translateY(-4px); border-color: rgba(244, 182, 59, 0.6); box-shadow: 0 24px 50px -30px rgba(0, 0, 0, 0.8); }
.res-card.is-soon { background: transparent; border-style: dashed; }
.res-ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: rgba(244, 182, 59, 0.12); color: var(--gold); }
.res-card.is-soon .res-ico { background: rgba(238, 243, 238, 0.05); color: var(--mute); }
.res-ico svg { width: 26px; height: 26px; }
.res-card h3 { font-size: clamp(1.4rem, 2.2vw, 1.75rem); letter-spacing: -0.03em; line-height: 1.1; }
.res-card h3 a { text-decoration: none; }
.res-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.res-card h3 a:focus-visible { outline: none; }
.res-card.is-live:has(h3 a:focus-visible) { outline: 3px solid var(--gold); outline-offset: 3px; }
.res-card p { color: var(--mute); font-size: 0.98rem; }
.res-meta { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 0.88rem; margin: 0; }
.res-meta dt { color: var(--mute); }
.res-meta dd { margin: 0; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; border: 1px solid var(--line-strong); color: var(--mute); }
.tag--live { background: rgba(29, 180, 111, 0.15); color: #7fe0ad; border-color: transparent; }
.tag--soon { border-style: dashed; }
.res-go { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--gold); }
.res-go svg { width: 18px; height: 18px; transition: transform var(--dur-med) var(--ease-out); }
.res-card.is-live:hover .res-go svg { transform: translateX(4px); }
.res-soon-note { margin-top: auto; color: var(--mute); font-size: 0.9rem; }
.res-empty { padding: 32px; border: 1px dashed var(--line-strong); border-radius: 24px; text-align: left; }
.res-empty h3 { font-size: 1.4rem; margin-bottom: 8px; }
.res-empty p { color: var(--mute); margin-bottom: 16px; }
.res-principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.res-principles div { padding: 22px; border-top: 1px solid var(--line-strong); }
.res-principles h3 { font-size: 1.25rem; margin-bottom: 8px; }
.res-principles p { color: var(--mute); font-size: 0.97rem; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .edu-grid, .help-inner, .res-principles { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .fgrid { grid-template-columns: 1fr; }
  .range-combo { grid-template-columns: minmax(0, 1fr) 100px; }
  .st-prices { grid-template-columns: 1fr; }
  .act-grid { grid-template-columns: 1fr; }
  .donut-wrap { grid-template-columns: 1fr; justify-items: center; }
  .donut { width: 170px; }
  .legend { width: 100%; }
  .calc-toolbar { align-items: flex-start; }
  .save-row { flex-direction: column; }
  .save-row .btn { width: 100%; }
  .calc-app { padding-bottom: 96px; }
}
@media (max-width: 360px) {
  .st-kpis { grid-template-columns: 1fr; }
  .scen-tab { max-width: 100%; }
  .mini-margin { display: none; }
}

/* ---------- Print report (built by bv-calc-ui on Print) ---------- */
#print-report { display: none; }
@media print {
  @page { size: letter; margin: 14mm 14mm 16mm; }
  html, body { background: #fff !important; color: var(--forest) !important; }
  body > *:not(#print-report) { display: none !important; }
  #print-report { display: block !important; font-family: var(--font-body); font-size: 10.5pt; color: #222; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #print-report h1 { font-family: var(--font-display); font-size: 22pt; color: var(--forest); letter-spacing: -0.02em; margin: 14pt 0 6pt; }
  #print-report h2 { font-family: var(--font-display); font-size: 13pt; color: var(--antique); margin: 6pt 0 10pt; letter-spacing: 0; }
  .pr-head { display: flex; justify-content: space-between; align-items: center; background: var(--cream); padding: 12pt 14pt; border-bottom: 2pt solid var(--antique); }
  .pr-head img { width: 170px; height: auto; }
  .pr-headmeta { display: grid; text-align: right; font-size: 9pt; color: #5d6e63; }
  .pr-headmeta span:first-child { color: var(--antique); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 8pt; }
  .pr-break { break-before: page; }
  .pr-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8pt; margin-bottom: 12pt; }
  .pr-kpi { background: var(--cream); border-radius: 6pt; padding: 8pt 10pt; display: grid; gap: 4pt; }
  .pr-kpi span { font-size: 7.5pt; text-transform: uppercase; letter-spacing: 0.06em; color: #5d6e63; font-weight: 700; }
  .pr-kpi strong { font-family: var(--font-display); font-size: 14pt; color: var(--forest); }
  .pr-kpi.is-main { background: var(--forest); }
  .pr-kpi.is-main span { color: var(--antique); }
  .pr-kpi.is-main strong { color: var(--cream); }
  .pr-chart { display: flex; gap: 18pt; align-items: center; margin: 6pt 0 10pt; break-inside: avoid; }
  .pr-chart img { width: 120pt; height: 120pt; }
  .pr-legend { list-style: none; padding: 0; margin: 0; display: grid; gap: 4pt; flex: 1; }
  .pr-legend li { display: grid; grid-template-columns: 9pt 1fr auto; gap: 8pt; align-items: center; }
  .pr-legend .sw { width: 9pt; height: 9pt; border-radius: 2pt; }
  .pr-guidance { border-left: 3pt solid var(--antique); padding: 6pt 10pt; background: #faf7f0; margin: 8pt 0 12pt; max-width: none; }
  .pr-table { width: 100%; border-collapse: collapse; margin: 0 0 10pt; break-inside: avoid; }
  .pr-table caption { text-align: left; font-size: 8pt; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--antique); padding: 6pt 0 4pt; border-bottom: 0.75pt solid #ded6c4; }
  .pr-table th, .pr-table td { padding: 4pt 6pt; text-align: left; font-weight: 400; border-bottom: 0.5pt solid #eee7d8; }
  .pr-table td { text-align: right; color: var(--forest); font-weight: 600; }
  .pr-table tbody tr:nth-child(odd) { background: #faf7f0; }
  .pr-cmp thead th { font-size: 8pt; color: #5d6e63; text-align: right; font-weight: 700; }
  .pr-cmp thead th:first-child { text-align: left; }
  .pr-disclaimer { margin: 4pt 0 14pt; padding: 10pt 12pt; background: var(--cream); border-left: 3pt solid var(--antique); font-size: 9pt; color: #34463b; max-width: none; }
}
