/* ==========================================================
   UI/UX refresh layer (branch ui-ux-refresh).
   Refines the approved Alta light theme; no new palette.
   Loaded last so it can be reverted by removing one <link>.
   See UI_UX_REVIEW.md for the reasoning behind each block.
   ========================================================== */

/* Q1 · Scenario cards keep their own height when a sibling is expanded. */
#scenarioCards { align-items: start; }
#scenarioCards .scenario-price { margin-top: 0; }

/* Q2 · Money never breaks mid-number. */
#scenarioCards .scenario-details .tco-metric strong {
  overflow-wrap: normal;
  word-break: normal;
  font-size: 15px !important;
  font-variant-numeric: tabular-nums;
}
#scenarioCards .scenario-detail-grid { gap: 14px 18px; }

/* Q10 · Full-width scenario accent along the top edge. */
.scenario-card::before { left: 0; right: 0; height: 3px; border-radius: 0; }

/* Q3 · Form disclosures become structured rows with a rotating chevron. */
#manual-calculator aside > details { margin: 0; border-top: 1px solid var(--r5-divider); }
#manual-calculator aside > details:last-of-type { border-bottom: 1px solid var(--r5-divider); }
#manual-calculator aside > .form-grid + details { margin-top: 12px; }
#manual-calculator aside details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 12px 2px;
  color: var(--r5-text);
  border-radius: 8px;
  transition: color .16s ease, background-color .16s ease;
}
#manual-calculator aside details > summary::before { content: none; display: none; }
#manual-calculator aside details > summary::after {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin: 0 6px 4px 0;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  color: var(--r5-muted);
  transform: rotate(45deg);
  transition: transform .2s ease, margin .2s ease;
}
#manual-calculator aside details[open] > summary::after { transform: rotate(-135deg); margin-bottom: -2px; }
#manual-calculator aside details > summary:hover { color: var(--r5-accent); }
#manual-calculator aside details[open] > summary { color: var(--r5-accent); }
#manual-calculator aside > details[open] { padding-bottom: 12px; }
#price-books > summary { font-size: 13px !important; }

/* Q3b · Other disclosures (cost details, chart data, yearly table, model info) share a small leading chevron. */
summary::before {
  content: "";
  display: inline-block;
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  margin: 0 10px 2px 2px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform .2s ease;
  vertical-align: middle;
}
details[open] > summary::before { content: ""; transform: rotate(45deg); }

#hardwarePriceStatus:empty { display: none; }

#downloadEstimate {
  display: inline-grid; place-items: center; padding: 0;
  width: 44px; height: 44px; flex: 0 0 44px; border: 0; box-shadow: none;
  background: transparent; position: relative; isolation: isolate;
}
#downloadEstimate::before { content: ''; position: absolute; inset: 5px; border-radius: 8px; z-index: -1; }
#downloadEstimate:enabled { background: transparent; color: white; }
#downloadEstimate:enabled::before { background: #006ed7; }
#downloadEstimate:enabled:hover::before { background: #005bb5; }
#downloadEstimate:focus-visible { outline: 3px solid #005bb5; outline-offset: 3px; }
#downloadEstimate:disabled { background: transparent; color: rgb(255 255 255 / 65%); opacity: 1; }
#downloadEstimate svg { width: 22px; height: 22px; }
@media (max-width: 420px) {
  .alta-topbar { flex-wrap: nowrap; column-gap: 8px; }
}

#downloadDialog {
  box-sizing: border-box;
  width: min(576px, calc(100% - 24px));
  padding: clamp(16px, 4vw, 28px);
  border: 1px solid var(--r5-border);
  border-radius: 16px;
  background: var(--r5-card);
  color: var(--r5-text);
  box-shadow: 0 18px 55px rgba(15, 33, 59, .22);
}
#downloadDialog::backdrop { background: rgba(15, 33, 59, .55); }
#downloadDialog h2 { margin: 0; font-size: 24px; letter-spacing: -.025em; }
#downloadDescription { margin: 6px 0 16px; color: var(--r5-muted); }
.download-options { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: clamp(8px,2vw,16px); }
.format-card { --ink:#176954; --tint:#e9f5ef; display:flex; flex-direction:column; align-items:flex-start; min-width:0; min-height:174px; padding:clamp(12px,2vw,20px); border:1px solid var(--r5-border); border-radius:14px; background:#fff; color:var(--r5-text); font:inherit; text-align:left; cursor:pointer; }
.format-card#exportPdf { --ink:#21569b; --tint:#eaf2fc; }
.format-icon { box-sizing:content-box; width:24px; height:24px; padding:9px; border-radius:10px; background:var(--tint); color:var(--ink); }
.format-card strong { margin-top:16px; font-size:21px; line-height:1.15; }
.format-card span { margin:4px 0 16px; color:var(--r5-muted); font-size:13px; }
.format-card small { margin-top:auto; color:var(--ink); font-weight:600; font-size:13px; }
.format-card b { margin-left:2px; }
.format-card:hover,.format-card:focus-visible { border-color:var(--ink); background:var(--tint); }
.format-card:focus-visible { outline:2px solid var(--ink); outline-offset:2px; }
@media (prefers-reduced-motion:no-preference) {
  .format-card { transition:background-color .15s,border-color .15s; }
  #downloadDialog[open] { animation:format-appear .16s ease-out; }
  @keyframes format-appear { from { opacity:0; transform:translateY(5px); } }
}
.download-dialog-actions { display: flex; justify-content: flex-end; margin-top: 16px; }
#downloadDialog .btn { min-height: 44px; }

/* Q5 · Error callouts. */
#inputErrors:not([hidden]),
#reportError:not([hidden]) {
  margin: 16px 0 0;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--r5-danger) 35%, transparent);
  border-left-width: 4px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--r5-danger) 7%, #fff);
  color: #8f1d29;
  font-size: 13px;
  line-height: 1.5;
}
#reportError:not([hidden]) { margin: 0 0 16px; }

/* Q6 · Text left, numbers right with tabular figures. */
#manual-calculator input:not([type=number]):not([type=checkbox]) { text-align: left; }
input[type=number] { font-variant-numeric: tabular-nums; }

/* Q7 · Readable footer. */
.footer { font-size: 12px; font-weight: 400; letter-spacing: 0; color: var(--r5-muted); }

/* Q8 · One clear focus ring instead of outline + glow. */
input:focus-visible,
select:focus-visible { box-shadow: none; }
#manual-calculator aside details > summary:focus-visible { outline-offset: 2px; }

/* Q9 · Info triggers use theme tokens and respond to hover/focus. */
.info {
  border-color: var(--r5-border);
  color: var(--r5-muted);
  font-size: 11px;
  line-height: 16px;
  font-weight: 600;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease;
}
.info:hover,
.info:focus-visible { background: var(--r5-accent); border-color: var(--r5-accent); color: #fff; }
.info-tip { border-color: var(--r5-border); color: var(--r5-text); box-shadow: 0 12px 32px -12px rgba(19, 32, 51, .35); }

/* Q11 · Results header button keeps its natural width on phones. */
.results-navigation .btn { flex: 0 0 auto; }


/* M1 · Cumulative and annual trends share one frame with a segmented toggle. */
.chart-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 4px; }
.chart-card-head h3 { margin: 0 !important; font-size: 20px; }
.segmented {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--r5-border);
  border-radius: 12px;
  background: var(--r5-panel);
}
.segmented-option {
  min-height: 38px;
  min-width: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--r5-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.segmented-option:hover { color: var(--r5-text); }
.segmented-option[aria-selected="true"] {
  background: #fff;
  color: var(--r5-text);
  box-shadow: 0 1px 2px rgba(19, 32, 51, .12), 0 0 0 1px var(--r5-border);
}
@media (max-width: 620px) { .segmented-option { min-height: 44px; } .chart-card-head h3 { font-size: 18px; } }
#trendCharts .chart[hidden] { display: none; }
#trendCharts .chart svg { max-width: none; }

/* M2 · Year hover band: a dashed guide marks the year under the pointer. */
.chart .year-band { cursor: crosshair; }
.chart .year-band line { stroke: var(--r5-accent); stroke-dasharray: 3 4; opacity: 0; transition: opacity .12s ease; }
.chart .year-band:hover line { opacity: .55; }

/* M3 · Functional motion. #results[data-reveal] is set briefly after an explicit
   Calculate or when results first appear; auto-recalculation stays still.
   Everything here is skipped for prefers-reduced-motion. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes refresh-rise { from { opacity: 0; transform: translateY(6px); } }
  @keyframes refresh-fade { from { opacity: 0; } }
  @keyframes refresh-grow { from { transform: scaleX(0); } }
  @keyframes refresh-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

  #results[data-reveal] #answer > *,
  #results[data-reveal] .scenario-card { animation: refresh-rise .34s cubic-bezier(.2, .7, .2, 1) both; }
  #results[data-reveal] .scenario-card:nth-child(2) { animation-delay: .05s; }
  #results[data-reveal] .scenario-card:nth-child(3) { animation-delay: .1s; }
  #results[data-reveal] .bar-track > div { transform-origin: left center; animation: refresh-grow .6s cubic-bezier(.2, .7, .2, 1) .08s both; }
  #results[data-reveal] .trend-line { stroke-dasharray: 1; animation: refresh-draw .9s ease-out .12s both; }
  #results[data-reveal] .chart circle { animation: refresh-fade .3s ease-out .7s both; }

  /* Disclosure content and chart tab switches fade in. */
  details[open] > :not(summary) { animation: refresh-fade .2s ease-out; }
  #trendCharts .chart:not([hidden]) { animation: refresh-fade .2s ease-out; }
}

/* M4 · Winner marker on scenario cards (no glow; a quiet accent ring). */
#scenarioCards .scenario-top { min-height: 44px; align-items: flex-start; }
#scenarioCards .scenario-price small { min-height: 18px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
#scenarioCards .scenario-price .winner-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 1px 9px 1px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--r5-success) 12%, #fff);
  color: #1d6b45;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  white-space: nowrap;
}
#scenarioCards .scenario-price .winner-chip::before {
  content: "";
  width: 9px;
  height: 5px;
  margin-top: -2px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}
:root[data-theme] #scenarioCards .scenario-card.winner { border-color: color-mix(in srgb, var(--scenario-color, var(--r5-accent)) 45%, var(--r5-border)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--scenario-color, var(--r5-accent)) 30%, transparent); }
#scenarioCards .scenario-card { transition: border-color .16s ease; }
#scenarioCards .scenario-card:hover { border-color: var(--r5-border-strong); }

/* M5 · Empty state shows what is coming and offers a direct next step. */
.empty-preview { display: grid; gap: 6px; margin: 14px 0 18px; padding: 0; list-style: none; color: #c7d5e8; font-size: 13px; }
.empty-preview li { display: flex; align-items: center; gap: 10px; }
.empty-preview li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #36d4f5; flex: 0 0 auto; }
.project-start { display:flex; align-items:baseline; gap:.45em; }
.project-start span { display:inline-block; }
@media (max-width:820px) { .project-start span { transform: rotate(90deg); } }
#answer .answer-card :focus-visible { outline-color: #fff; }

/* Input assumptions sit between the scope fields and the expansion rule. */
#manual-calculator aside #outputControls { display: grid; grid-template-columns: minmax(0,1fr); gap: 14px; padding: 16px 0; margin: 0; }
#outputControls .output-controls-title { margin: 0; font-size: 15px; font-weight: 600; }
#manual-calculator #outputControls label.check { flex-flow: row nowrap; align-items: center; justify-content: flex-start; gap: 8px; margin: 0; }
#manual-calculator #outputControls label.check input { flex: none; }
/* Keep help readable independently of the narrow field heading. */
.info .info-tip { position: fixed; box-sizing: border-box; width: max-content; max-width: min(26rem, calc(100vw - 24px)); padding: 10px 14px; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; left: var(--help-x, 12px); top: var(--help-y, 12px); }
.info[data-help-dismissed] .info-tip { display: none; }

/* Polish B1 · Field errors sit with their field; stale results stay visible but paused. */
#manual-calculator input[aria-invalid="true"] {
  border-color: var(--r5-danger);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--r5-danger) 16%, transparent);
}
#manual-calculator .field-error {
  display: block;
  grid-column: 1 / -1;
  margin-top: 4px;
  color: #8f1d29;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
}
.stale-notice:not([hidden]) {
  position: sticky;
  top: 84px;
  z-index: 5;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--r5-danger) 35%, transparent);
  border-left-width: 4px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--r5-danger) 7%, #fff);
  color: #8f1d29;
  font-size: 13.5px;
  line-height: 1.5;
  box-shadow: 0 6px 18px rgba(16, 32, 56, .08);
}
.stale-notice-link {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.stale-notice-link:focus-visible { outline: 2px solid var(--r5-danger); outline-offset: 2px; border-radius: 3px; }
#results[data-stale] { opacity: .42; filter: grayscale(.6); pointer-events: none; user-select: none; transition: opacity .16s ease; }
@media (prefers-reduced-motion: reduce) { #results[data-stale] { transition: none; } }

/* Polish B1 · Actions menu is a solid surface; nothing shows through it. */
.topbar-menu-panel { background: #12223e; backdrop-filter: none; }


/* Polish B3 · One form rhythm: label left, control right, everywhere (stacked on phones). */
#manual-calculator aside #outputControls { gap: 0; }
#outputControls .output-controls-title { margin: 0 0 4px; }
#manual-calculator #outputControls label:not(.check) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(136px, 176px);
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--r5-divider);
}
#manual-calculator #outputControls label:not(.check) > input,
#manual-calculator #outputControls label:not(.check) > select { grid-column: 2; grid-row: 1; align-self: center; }
#manual-calculator #outputControls label.check { padding: 10px 0; border-bottom: 1px solid var(--r5-divider); }
@media (max-width: 620px) {
  #manual-calculator #outputControls label:not(.check) { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  #manual-calculator #outputControls label:not(.check) > input,
  #manual-calculator #outputControls label:not(.check) > select { grid-column: 1; grid-row: auto; }
}

/* Help icons sit on the label's last line, a small gap after the text. */
.heading-tail { white-space: nowrap; }
.heading-tail .info-tip { white-space: normal; }
#manual-calculator .field-heading .info,
#manual-calculator label.check .info,
#outputControls label .field-heading .info { margin: 0 0 0 6px; vertical-align: -3px; }
#manual-calculator label.check { justify-content: flex-start; }
.field-unit { color: var(--r5-muted); }

/* Numbers: no spinner arrows, always right-aligned with tabular figures. */
#manual-calculator input[type=number] { -moz-appearance: textfield; appearance: textfield; text-align: right; }
#manual-calculator input[type=number]::-webkit-inner-spin-button,
#manual-calculator input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
#manual-calculator #outputControls label .info { position: relative; right: auto; top: auto; }
#manual-calculator #outputControls label { padding-right: 0; }
#manual-calculator .field-heading > .field-unit { display: block; margin-top: 2px; font-size: 11.5px; color: var(--r5-faint); }
#manual-calculator .field-heading { min-width: 0; overflow-wrap: anywhere; }
#manual-calculator .field-heading > .field-unit { order: 9; }


/* Polish B6 · Recommendation leads with the savings. */
#answer .recommendation .answer-savings { margin: 10px 0 0; max-width: none; color: #eaf1fb; font-size: 17px; line-height: 1.4; }
#answer .recommendation .answer-savings b { color: #ffffff; font-weight: 700; font-variant-numeric: tabular-nums; }
#answer .recommendation .answer-savings b:first-child { font-size: 22px; }
#answer .recommendation .answer-next { margin: 8px 0 0; color: #b8c8df; font-size: 13px; font-variant-numeric: tabular-nums; }
@media (max-width: 620px) { #answer .recommendation .answer-savings { font-size: 15px; } #answer .recommendation .answer-savings b:first-child { font-size: 19px; } }

/* Polish B7 · The banner is the sole title; cards carry the comparison graphic. */
#results #answer { order: 0 !important; }
#results #bomTcoApplied { order: 1 !important; }
#results #scenarioCards { order: 2 !important; }
#results #trendCharts { order: 3 !important; }
#results #yearly-details { order: 4 !important; }
#scenarioCards .scenario-comparison { margin-top: 16px; }
#scenarioCards .scenario-bar-track { height: 8px; border-radius: 99px; background: #e8edf3; overflow: hidden; }
#scenarioCards .scenario-bar-fill { display: block; height: 100%; width: var(--bar-width); border-radius: inherit; background: var(--scenario-color, var(--r5-accent)); }
#scenarioCards .scenario-delta { margin: 8px 0 0; color: var(--r5-text); font-size: 13px; line-height: 1.35; font-weight: 600; font-variant-numeric: tabular-nums; }
#scenarioCards .scenario-details { margin-top: 13px; }
/* Small unit captions must remain readable on the white input card. */
#manual-calculator .field-heading > .field-unit { color: #526274; }

/* Polish B8c · Expansion is an explicit Yes/No switch; the whole row is the target. */
#manual-calculator label.expansion-toggle { display: flex; flex-flow: row nowrap; align-items: center; justify-content: flex-start; gap: 12px; min-height: 44px; margin: 0 0 4px; padding: 4px 0; cursor: pointer; color: var(--r5-text); font-size: 14px; font-weight: 600; }
#manual-calculator label.expansion-toggle .expansion-toggle-text { flex: 1 1 auto; min-width: 0; }
#manual-calculator label.expansion-toggle input[role=switch] { -webkit-appearance: none; appearance: none; position: relative; flex: none; width: 44px; height: 26px; min-height: 26px; margin: 0; padding: 0; border: 0; border-radius: 99px; background: #7b8b9c; cursor: pointer; transition: background-color .15s ease; }
#manual-calculator label.expansion-toggle input[role=switch]::before { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px #0003; transition: transform .15s ease; }
#manual-calculator label.expansion-toggle input[role=switch]:checked { background: var(--r5-accent); }
#manual-calculator label.expansion-toggle input[role=switch]:checked::before { transform: translateX(18px); }
#manual-calculator label.expansion-toggle input[role=switch]:focus-visible { outline: 2px solid var(--r5-accent); outline-offset: 3px; }
#manual-calculator label.expansion-toggle .switch-state { flex: none; min-width: 2.2em; color: var(--r5-muted); font-weight: 600; font-variant-numeric: tabular-nums; }
#expansionFields[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { #manual-calculator label.expansion-toggle input[role=switch], #manual-calculator label.expansion-toggle input[role=switch]::before { transition: none; } }

/* Polish B9b · Yearly table: section rows read as group headers, not data. */
#yearlyTable tbody th { font-weight: 400; }
#yearlyTable tr.detail-heading th,
#yearlyTable tr.detail-heading td { background: #e8eff7; color: #142948; font-weight: 700; border-top: 1px solid #cbd8e6; border-bottom: 1px solid #cbd8e6; }
#yearlyTable tr.detail-subtotal th,
#yearlyTable tr.detail-subtotal td,
#yearlyTable tr.detail-total th,
#yearlyTable tr.detail-total td { font-weight: 600; color: #183d50; }
#yearlyTable tr.detail-subtotal th,
#yearlyTable tr.detail-subtotal td { border-top: 1px solid #d7e2ed; }
#yearlyTable tr.detail-total:first-of-type th { border-top: 2px solid #cbd8e6; }
/* Polish B9c · All-zero rows stay visible (totals still add up) but step back. */
#yearlyTable tr.zero-row th,
#yearlyTable tr.zero-row td { color: #66768a; font-weight: 400; }

/* Batch 9 follow-up · In-box unit suffix ("5 years") for opted-in number fields. It shares the
   input's grid cell, sits in extra right padding after the right-aligned digits, and disappears
   while editing or when the value is empty/invalid. Clicks pass through to the input. */
#manual-calculator label.has-unit-suffix { --unit-pad: 11px; }
/* Annual (OPEX) hides the term row; the assumptions grid rule above outranked daniel.css's [hidden]. */
#manual-calculator #outputControls label[hidden]:not(.check) { display: none; }
#manual-calculator label.has-unit-suffix > input { padding-right: var(--unit-pad); }
#manual-calculator label.has-unit-suffix > input.unit-suffix-on:not(:focus) { padding-right: calc(var(--unit-pad) + var(--unit-suffix-w, 3.2em) + 4px); }
#manual-calculator label.has-unit-suffix > .unit-suffix { grid-column: 2; grid-row: 1; justify-self: end; align-self: center; z-index: 1; margin-right: calc(var(--unit-pad) + 1px); color: #526174; font-size: 13px; line-height: 1.25; white-space: nowrap; pointer-events: none; }
#manual-calculator label.has-unit-suffix > .unit-suffix[hidden],
#manual-calculator label.has-unit-suffix:focus-within > .unit-suffix { display: none; }
@media (max-width: 620px) {
  #manual-calculator label.has-unit-suffix > input,
  #manual-calculator #outputControls label.has-unit-suffix > input { grid-column: 1; grid-row: 2; }
  #manual-calculator label.has-unit-suffix > .unit-suffix { grid-column: 1; grid-row: 2; }
}

/* Polish B10a · Checkbox rows: only the box and its words are the target, not the empty row.
   The labor row keeps its full-width divider on a wrapper; the label shrinks to its content. */
#manual-calculator #outputControls .check-row { padding: 0; border-bottom: 1px solid var(--r5-divider); }
#manual-calculator #outputControls .check-row > label.check { display: inline-flex; width: fit-content; max-width: 100%; padding: 10px 0; border-bottom: 0; }
#yearly-details > label.check { display: inline-flex; width: fit-content; max-width: 100%; justify-content: flex-start; gap: 8px; min-height: 44px; }
@media (max-width: 620px) { #manual-calculator #outputControls .check-row > label.check { min-height: 44px; box-sizing: border-box; } }

/* Polish B10b · Scenario cards: one weight step heavier, and faint quarter ticks on the shared-scale
   bar. Each tick is a light hairline beside a dark one, so it reads over both fill and empty track. */
#scenarioCards .scenario-top h3 { font-weight: 600; }
#scenarioCards .scenario-price { font-weight: 600; }
#scenarioCards .scenario-delta { font-weight: 700; }
#scenarioCards .scenario-bar-track { position: relative; }
#scenarioCards .scenario-bar-ticks { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
#scenarioCards .scenario-bar-ticks > i { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: linear-gradient(to right, rgba(255, 255, 255, .7) 50%, rgba(19, 32, 51, .26) 50%); }
#scenarioCards .scenario-bar-ticks > i:nth-child(1) { left: 25%; }
#scenarioCards .scenario-bar-ticks > i:nth-child(2) { left: 50%; }
#scenarioCards .scenario-bar-ticks > i:nth-child(3) { left: 75%; }

/* Polish B10c · Charts show solid lines only; dots fade in while that chart's Detailed data is open.
   A selected year gets a marker line and emphasised dots; hover/focus previews more lightly. */
.chart circle.point { opacity: 0; pointer-events: none; transition: opacity .2s ease-out; }
.chart[data-dots] circle.point { opacity: 1; pointer-events: auto; }
.chart[data-dots] circle.point.is-preview { r: 4.5px; }
.chart[data-dots] circle.point.is-active { r: 6px; stroke: #ffffff; stroke-width: 2px; }
.chart .year-marker { display: none; stroke: #142948; stroke-width: 1.5px; pointer-events: none; }
.chart .year-marker.is-selected { display: inline; opacity: .7; }
.chart .year-marker.is-preview { display: inline; opacity: .35; stroke-dasharray: 3 4; }
.chart-values tr[data-year] { cursor: pointer; transition: background-color .12s ease; }
.chart-values tr[data-year].is-preview > * { background: #f2f6fb; }
.chart-values tr[data-year].is-selected > * { background: #e3edf9; color: #142948; font-weight: 600; }
.chart-values .year-toggle { -webkit-appearance: none; appearance: none; min-width: 32px; margin: -4px -6px; padding: 4px 6px; border: 0; border-radius: 6px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.chart-values .year-toggle:focus-visible { outline: 2px solid var(--r5-accent); outline-offset: 1px; }
@media (prefers-reduced-motion: reduce) { .chart circle.point, .chart-values tr[data-year] { transition: none; } }

/* Polish B10d · Cost details open together; cards in a row stay the same height. */
#scenarioCards .scenario-details-body { display: flow-root; }
@media (min-width: 821px) { #scenarioCards.scenario-grid { align-items: stretch; } }
#scenarioCards { overflow-anchor: none; }
