/* Calculator UI layer (Nov 18 2026). One compact, consistent "clinical instrument" design for every
   calculator page: inputs → units → result readout → formula & sources. Loaded last in <head> by
   build_calc_app.py as a fingerprinted copy (assets/calc-ui.<hash>.css), so it refines each page's own
   styles without editing 219 files. Also styles what assets/calc-ui.js adds: the grouped Units row
   (.cu-units), the collapsible calculators (.cx-*), the Sample data bar (.cs-*) and the folded
   formula/source note (.cu-fine). Do not edit the hashed copy; edit this file and run build_calc_app.py. */

/* ── Section heading + intro above a calculator ── */
main #calculator > h2 { font-size: clamp(21px, 2.3vw, 26px); line-height: 1.22; letter-spacing: -.01em; margin-bottom: 6px; }
main #calculator > h2 + p { font-size: 15px; line-height: 1.6; color: var(--text-mid); margin-bottom: 12px; }

/* ── The instrument card ── */
.calc-wrap, .calc-card {
  position: relative;
  padding: 16px 18px 14px !important;
  margin: 10px 0 18px !important;
  border-radius: 16px !important;
  background: var(--white, #fff) !important;
  border: 1px solid var(--border, #dfe6f0) !important;
  box-shadow: 0 1px 2px rgba(15, 30, 51, .05), 0 8px 24px -12px rgba(15, 30, 51, .14) !important;
}
.calc-wrap, .calc-card { border-top: 3px solid var(--teal, #1a6b72) !important; }

/* ── Units: one quiet row of segmented controls ── */
.cu-units { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 2px 0 12px; margin: 0 0 12px;
  border-bottom: 1px dashed var(--border, #dfe6f0); }
.cu-units .unit-toggle-wrap, .calc-wrap > .unit-toggle-wrap { display: inline-flex !important; align-items: center; gap: 7px; margin: 0 !important; }
.calc-wrap > .unit-toggle-wrap { margin: 0 16px 10px 0 !important; }
.unit-toggle-wrap .ut-label { font-size: 12px !important; font-weight: 600 !important; letter-spacing: 0 !important; text-transform: none !important;
  color: var(--text-muted) !important; margin: 0 !important; white-space: nowrap; }
.unit-toggle { border-radius: 9px !important; overflow: hidden; }
.unit-toggle .unit-btn { padding: 5px 11px !important; font-size: 12.5px !important; min-height: 30px; line-height: 1; }

/* ── Fields ── */
.calc-grid { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important; gap: 12px 14px !important; margin: 4px 0 6px !important; }
.calc-field { margin: 0 !important; min-width: 0; display: flex; flex-direction: column; }
.calc-field > label, .calc-card label {
  font-size: 12.5px !important; font-weight: 650 !important; letter-spacing: 0 !important; text-transform: none !important;
  color: var(--text) !important; line-height: 1.3 !important; margin: 0 0 5px !important;
}
.calc-field input:not([type=checkbox]):not([type=radio]), .calc-field select,
.calc-wrap input[type=number], .calc-wrap input[type=text], .calc-wrap select,
.calc-card input[type=number], .calc-card input[type=text], .calc-card select {
  height: 42px; min-height: 42px; padding: 8px 11px !important; box-sizing: border-box; width: 100%;
  font-size: 16px !important;              /* 16px: iOS does not zoom the page on focus */
  font-variant-numeric: tabular-nums; border-radius: 10px !important;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.calc-wrap input::placeholder, .calc-card input::placeholder { color: var(--text-faint, #8a96a8); opacity: .85; }
.calc-wrap input:focus, .calc-wrap select:focus, .calc-card input:focus, .calc-card select:focus {
  outline: none; border-color: var(--teal, #1a6b72) !important; box-shadow: 0 0 0 3px rgba(26, 107, 114, .16) !important;
}
.calc-wrap .field-hint, .calc-card .field-hint { font-size: 11.5px !important; line-height: 1.4 !important; margin-top: 4px !important; color: var(--text-muted); }

/* ── Result readout ── */
.calc-result-box { margin-top: 14px !important; padding: 14px 16px !important; border-radius: 14px !important; border-width: 1.5px !important; }
.calc-metrics-row { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)) !important; gap: 8px !important; margin-bottom: 10px; }
.calc-metric-card { padding: 10px 10px 9px !important; border-radius: 11px !important; background: rgba(255, 255, 255, .78) !important; }
.calc-metric-card .cmv { font-size: clamp(22px, 2.6vw, 27px) !important; font-weight: 700 !important; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.calc-metric-card .cml { font-size: 10.5px !important; letter-spacing: .06em; margin-top: 5px !important; }
.calc-metric-card .cmt { font-size: 11.5px !important; margin-top: 3px !important; }
.calc-verdict-text { font-size: 14.5px !important; line-height: 1.55 !important; margin: 6px 0 6px !important; }
.calc-action-text { font-size: 13.5px !important; line-height: 1.55 !important; }
.calc-btn, .calc-wrap button[type=submit] { min-height: 42px; border-radius: 10px !important; font-weight: 700; }

/* ── Formula, sources & limitations (folded) ── */
.calc-disclaimer { font-size: 12px !important; line-height: 1.55 !important; color: var(--text-muted) !important; }
details.cu-fine { margin-top: 12px; border-top: 1px solid var(--border, #dfe6f0); padding-top: 8px; }
details.cu-fine > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  font: 600 12.5px/1.3 Inter, system-ui, sans-serif; color: var(--text-muted); padding: 4px 0; }
details.cu-fine > summary::-webkit-details-marker { display: none; }
details.cu-fine > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform .15s; margin-right: 2px; }
details.cu-fine[open] > summary::before { transform: rotate(45deg); }
details.cu-fine > summary:hover { color: var(--teal, #1a6b72); }
details.cu-fine .calc-disclaimer { margin: 6px 0 0 !important; padding: 0 !important; border: 0 !important; }

/* ── Phones: two fields per row, aligned inputs ── */
@media (max-width: 600px) {
  .calc-wrap, .calc-card { padding: 14px 13px 12px !important; border-radius: 14px !important; }
  .calc-grid { grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)) !important; gap: 11px 10px !important; }
  .calc-field > label { font-size: 12px !important; }
  .cu-units { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, max-content)); gap: 8px 14px; }
  .cu-units .unit-toggle-wrap { flex-direction: column; align-items: flex-start !important; gap: 4px; }
  .cu-units .ut-label { font-size: 11px !important; }
  .calc-field .field-hint { font-size: 11px !important; }
  .cu-units { gap: 8px 12px; }
  .calc-metrics-row { grid-template-columns: repeat(auto-fit, minmax(86px, 1fr)) !important; gap: 6px !important; }
  .calc-metric-card { padding: 8px 6px 7px !important; }
  .calc-metric-card .cmv { font-size: 19px !important; }
  .calc-metric-card .cml { font-size: 9.5px !important; letter-spacing: .04em; }
}

/* ── Calculators carry no author panel (Nov 18 2026); the footer keeps the renalcarematters.com attribution.
   The markup stays because patch_references_accordion.py anchors on it. ── */
.dr-card-wrap { display: none !important; }

/* ── Collapsible calculators (pages with 2+ calculators) ── */
.cx-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 10px;
  font: 600 13px/1.3 Inter, system-ui, sans-serif; color: var(--text-muted); }
.cx-bar button { font: 600 13px/1 Inter, system-ui, sans-serif; color: var(--teal, #1a6b72); background: none; border: 0; padding: 8px 2px; cursor: pointer; }
.cx-bar button:hover { text-decoration: underline; }
.cx-unit { border: 1px solid var(--border, #dfe6f0); border-radius: 16px; background: var(--white, #fff); margin: 0 0 10px;
  box-shadow: 0 1px 2px rgba(15, 30, 51, .04); transition: box-shadow .2s, border-color .2s; scroll-margin-top: 90px; }
.cx-unit.cx-open { border-color: rgba(26, 107, 114, .4); box-shadow: 0 10px 30px -16px rgba(15, 30, 51, .28); }
.cx-head { display: flex !important; align-items: center; gap: 12px; margin: 0 !important; padding: 14px 16px !important; cursor: pointer;
  font-size: clamp(16px, 1.8vw, 18px) !important; line-height: 1.35 !important; border-radius: 16px;
  user-select: none; -webkit-tap-highlight-color: transparent; }
.cx-head:hover { background: rgba(26, 107, 114, .045); }
.cx-head:focus-visible { outline: 3px solid rgba(26, 107, 114, .35); outline-offset: -3px; }
.cx-num { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 9px;
  background: rgba(26, 107, 114, .11); color: var(--teal, #1a6b72); font: 700 13px/1 Inter, system-ui, sans-serif; }
.cx-unit.cx-open .cx-num { background: var(--teal, #1a6b72); color: #fff; }
.cx-title { flex: 1; min-width: 0; }
.cx-chev { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round;
  stroke-linejoin: round; transition: transform .2s; opacity: .6; }
.cx-unit.cx-open .cx-chev { transform: rotate(180deg); }
.cx-body { padding: 0 16px 6px; }
.cx-unit:not(.cx-open) .cx-body { display: none; }
.cx-body > :first-child { margin-top: 0 !important; }
.cx-body .calc-wrap, .cx-body .calc-card { margin: 8px 0 12px !important; }
@media (max-width: 600px) { .cx-body { padding: 0 10px 4px; } .cx-head { padding: 13px 12px !important; gap: 10px; } }

/* a section that only holds a collapsed calculator sheds its big padding and eyebrow (the number badge replaces it) */
section.section:has(> .cx-unit) { padding-top: 3px; padding-bottom: 3px; border-bottom: 0; }
section.section:has(> .cx-bar) { padding-top: 48px; }
section.section:has(> .cx-unit) > .section-tag { display: none; }

/* ── Sample data bar ── */
.cs-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; margin: -2px 0 10px; }
.cs-btn { display: inline-flex; align-items: center; gap: 6px; font: 600 12.5px/1 Inter, system-ui, sans-serif; padding: 7px 12px; min-height: 32px;
  border-radius: 999px; border: 1px solid rgba(26, 107, 114, .35); background: rgba(26, 107, 114, .06); color: var(--teal, #1a6b72); cursor: pointer; }
.cs-bar [hidden] { display: none !important; }
.cs-btn:hover { background: rgba(26, 107, 114, .12); }
.cs-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.cs-btn.cs-clear { border-color: var(--border, #dfe6f0); background: transparent; color: var(--text-muted); }
.cs-note { margin-right: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: #7a4b00; }
.cs-note::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: #fff8e6; border: 1.5px solid #e5bd6b; }
.calc-wrap [data-rcm-sample], .calc-card [data-rcm-sample], [data-rcm-sample] { background-color: #fff8e6 !important; border-color: #e5bd6b !important; }

/* ── Dark mode ── */
html[data-theme="dark"] .calc-wrap, html[data-theme="dark"] .calc-card, html[data-theme="dark"] .cx-unit { background: #1a2535 !important; border-color: #2c3a52 !important; }
html[data-theme="dark"] .calc-wrap, html[data-theme="dark"] .calc-card { border-top-color: #3aa3ab !important; }
html[data-theme="dark"] .cx-unit.cx-open { border-color: #3aa3ab !important; }
html[data-theme="dark"] .calc-metric-card { background: rgba(255, 255, 255, .05) !important; }
html[data-theme="dark"] .cx-num { background: rgba(79, 179, 187, .18); color: #9fdde2; }
html[data-theme="dark"] .cx-unit.cx-open .cx-num { background: #0e4a50; color: #fff; }
html[data-theme="dark"] .cx-bar button, html[data-theme="dark"] .cs-btn, html[data-theme="dark"] details.cu-fine > summary:hover { color: #9fdde2; }
html[data-theme="dark"] .cs-btn { border-color: rgba(79, 179, 187, .45); background: rgba(79, 179, 187, .08); }
html[data-theme="dark"] .cs-btn.cs-clear { color: #b4bfcf; border-color: #2c3a52; background: transparent; }
html[data-theme="dark"] .cs-note { color: #fde68a; }
html[data-theme="dark"] .cs-note::before { background: #2a2210; border-color: #7a5d1d; }
html[data-theme="dark"] [data-rcm-sample] { background-color: #2a2210 !important; border-color: #7a5d1d !important; color: #f8e7c2 !important; }
html[data-theme="dark"] .cx-head:hover { background: rgba(79, 179, 187, .07); }
html[data-theme="dark"] .cu-units, html[data-theme="dark"] details.cu-fine { border-color: #2c3a52; }

@media print {
  .cs-bar, .cx-bar, .cx-chev { display: none !important; }
  .cx-unit .cx-body { display: block !important; }
  .cx-unit { border: 0; box-shadow: none; }
  details.cu-fine > summary { display: none; }
  details.cu-fine > :not(summary) { display: block !important; }
}

/* ══ Calculator redesign (Dec 1 2026, the default) ══════════════════════════════════════════════════════════
   Scoped to html.calc-v2 (set before first paint for every visitor by the CALC-UI head block; ?v2=0 or localStorage
   rcm-calc-v2 = "0" turns it off for debugging) and html.calc-panel (?panel=1, the flyout from guides/calculators.html).
   Dark rules use [data-theme~="dark"] so the generated Dim CSS is not regenerated. */
html.calc-v2 .hero { padding-top: 22px !important; padding-bottom: 16px !important; min-height: 0 !important; }
html.calc-v2 .hero h1 { font-size: clamp(24px, 3.2vw, 34px) !important; line-height: 1.15 !important; margin-bottom: 6px !important; }
html.calc-v2 .hero h1 em { font-size: .62em; }
html.calc-v2 .hero .hero-sub { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 15px !important; line-height: 1.5 !important; margin: 4px 0 0 !important; }
html.calc-v2 body .hero .hero-meta, html.calc-v2 body .hero .hero-figure, html.calc-v2 body .hero .hero-vignette, html.calc-v2 body .hero .hero-tag { display: none !important; }
html.calc-v2 .hero-grid { display: block !important; }
html.calc-v2 .hero .rcm-share { margin-top: 8px !important; transform: scale(.88); transform-origin: left center; }
html.calc-v2 .hero .rcm-share-slot:empty { height: 30px; margin-top: 6px; }
html.calc-v2 main [id], html.calc-v2 main h2, html.calc-v2 main h3 { scroll-margin-top: 118px; }
html.calc-v2 main > section:first-of-type { padding-top: 20px; }

/* result card */
html.calc-v2 .cv-out { margin: 14px 0 6px; }
html.calc-v2 .cv-out-h { font: 700 11px/1 Inter, system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); margin: 0 0 8px; }
html.calc-v2 .cv-empty { border: 1.5px dashed var(--border, #dfe6f0); border-radius: 12px; padding: 14px 16px; font: 600 14px/1.45 Manrope, system-ui, sans-serif; color: var(--text-muted); background: color-mix(in srgb, var(--bg, #f9fafb) 70%, transparent); }
html.calc-v2 .cv-empty[hidden], html.calc-v2 .cv-stale[hidden] { display: none !important; }
html.calc-v2 .cv-stale { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; padding: 8px 12px; border-radius: 10px; font: 700 13px/1.3 Inter, system-ui, sans-serif;
  color: #7a4b00; background: #fff4dc; border: 1px solid #e5bd6b; }
html.calc-v2 .cv-stale::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #d97706; flex: none; }
html.calc-v2 .cv-out .cv-stale ~ * { transition: opacity .2s; }
html.calc-v2 .cv-out:has(.cv-stale:not([hidden])) .cv-body > :not(.cv-stale):not(.cv-out-h):not(.cv-acts) { opacity: .55; }
html.calc-v2 .cv-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
html.calc-v2 .cv-acts button { font: 600 13px/1 Inter, system-ui, sans-serif; padding: 9px 14px; min-height: 36px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(26, 107, 114, .35); background: rgba(26, 107, 114, .07); color: var(--teal, #1a6b72); }
html.calc-v2 .cv-acts button:hover:not(:disabled) { background: rgba(26, 107, 114, .14); }
html.calc-v2 .cv-acts button:disabled { opacity: .45; cursor: default; }
html.calc-v2 .cv-carry { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font: 600 13px/1.4 Manrope, system-ui, sans-serif; color: var(--teal, #1a6b72);
  background: rgba(26, 107, 114, .07); border: 1px solid rgba(26, 107, 114, .22); border-radius: 10px; padding: 8px 12px; margin: 0 0 14px; }
html.calc-v2 .cv-carry button { font: inherit; color: inherit; text-decoration: underline; background: none; border: 0; padding: 0; cursor: pointer; }
html[data-theme~="dark"].calc-v2 .cv-stale { color: #f6d08a; background: rgba(217, 119, 6, .14); border-color: rgba(229, 189, 107, .45); }
html[data-theme~="dark"].calc-v2 .cv-acts button, html[data-theme~="dark"].calc-v2 .cv-carry { color: #9fdde2; border-color: rgba(79, 179, 187, .45); background: rgba(79, 179, 187, .08); }
html[data-theme~="dark"].calc-v2 .cv-empty { color: #b4bfcf; border-color: #34445e; background: rgba(255, 255, 255, .03); }

/* desktop: the result column stays beside the inputs */
@media (min-width: 1100px) {
  html.calc-v2:not(.calc-panel) .cv-cols { display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); column-gap: 28px; align-items: start;
    max-width: none !important; width: min(1120px, calc(100vw - 132px - var(--cv-dock, 0px))) !important; margin-left: calc((100% - min(1120px, 100vw - 132px - var(--cv-dock, 0px))) / 2) !important; box-sizing: border-box; }
  html.calc-v2:not(.calc-panel) .cv-cols > :not(.cv-out) { grid-column: 1; min-width: 0; }
  html.calc-v2:not(.calc-panel) .cv-cols > .cv-out { grid-column: 2; grid-row: 1 / span 60; position: sticky; top: 118px; align-self: start; margin: 0;
    max-height: calc(100vh - 136px); overflow: auto; overscroll-behavior: contain; padding: 14px; border-radius: 16px; border: 1px solid var(--border, #dfe6f0);
    background: var(--white, #fff); box-shadow: 0 10px 30px -18px rgba(15, 30, 51, .3); }
  html.calc-v2:not(.calc-panel) .cv-cols > .cv-out .cv-body > :is(.calc-result-box, [id$="result"], .wkt-result) { margin-top: 0 !important; }
  html[data-theme~="dark"].calc-v2:not(.calc-panel) .cv-cols > .cv-out { background: #1a2535; border-color: #2c3a52; }
}

/* print summary */
#cv-print { display: none; }
@media print {
  html.cv-printing body > :not(#cv-print) { display: none !important; }
  html.cv-printing #cv-print { display: block !important; font: 11pt/1.5 Manrope, system-ui, sans-serif; color: #111; }
  #cv-print h1 { font: 700 18pt/1.2 Inter, system-ui, sans-serif; margin: 0 0 4pt; }
  #cv-print h2 { font: 700 12pt/1.2 Inter, system-ui, sans-serif; margin: 14pt 0 6pt; }
  #cv-print .cv-pd, #cv-print .cv-pf { color: #444; font-size: 9.5pt; }
  #cv-print table { border-collapse: collapse; width: 100%; }
  #cv-print th, #cv-print td { text-align: left; border-bottom: 1px solid #ccc; padding: 4pt 6pt; vertical-align: top; }
  #cv-print th { width: 45%; font-weight: 600; }
  #cv-print .cv-pr { white-space: pre-wrap; border: 1px solid #bbb; border-radius: 6pt; padding: 8pt 10pt; }
  html.cv-printing { filter: none !important; }
}

/* ── Phone flyout (?panel=1): inputs, then result, then a link to the full page ── */
html.calc-panel body :is(.guide-toggle-bar, .rcf-fab, .ca-scrim, .site-header, .nav-strip, .rcm-share, .rcm-share-slot, .rcm-rail, .rcm-drawer, .rcm-scrim, .float-controls, .float-controls-left,
  .print-btn, .scroll-top-btn, .sc-fab, .calc-nav-pill, .ca-tab, .ca-appbar, .ca-drawer, .related-guides, .guide-footer, .ref-section, .glossary-section,
  .glossary-acc, .calc-rg-btn, .dr-card-wrap, .audience-tabs, .mdc-instructions, .hero-tag, .hero-sub, .hero-meta, .hero-figure, .hero-cards, .hero-toc,
  .hero-xlink, .cs-note, .cv-hide, .cv-acts .cv-print) { display: none !important; }
html.calc-panel .hero p { display: none !important; }
html.calc-panel main > :not(:has(input, select, textarea)):not(.cv-keep):not(script):not(style) { display: none !important; }
html.calc-panel body > :is(section:not(.hero), details, aside, nav, .container:not(main)) { display: none !important; }
html.calc-panel body { padding: 0 !important; padding-bottom: env(safe-area-inset-bottom) !important; }
html.calc-panel .hero { padding: 12px 0 4px !important; min-height: 0 !important; overflow: visible !important; }
html.calc-panel .hero .hx-wash, html.calc-panel .hero .calc-formulas { display: none !important; }
html.calc-panel .hero h1 { font-size: 20px !important; line-height: 1.2 !important; margin: 0 !important; letter-spacing: -.01em; }
html.calc-panel .hero h1 em { display: block; font-size: 13px; margin-top: 3px; }
html.calc-panel main { padding-top: 4px !important; padding-bottom: 28px !important; }
html.calc-panel main > section, html.calc-panel main section.section { padding-top: 8px !important; padding-bottom: 8px !important; border: 0 !important; }
html.calc-panel main .section-tag { display: none !important; }
html.calc-panel [style*="max-width:580px"], html.calc-panel [style*="max-width: 580px"] { max-width: none !important; }
html.calc-panel :is(.calc-wrap, .calc-card, #egfr-calc-wrap) { padding: 14px 12px !important; margin: 8px 0 12px !important; }
html.calc-panel .cv-panel-foot { display: block !important; margin: 18px 0 8px; padding: 14px 0 0; border-top: 1px solid var(--border, #dfe6f0); }
html.calc-panel .cv-panel-foot a { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; border-radius: 12px; font: 700 15px/1.2 Inter, system-ui, sans-serif;
  color: var(--teal, #1a6b72); border: 1.5px solid rgba(26, 107, 114, .4); text-decoration: none; }
html.calc-panel .cv-panel-foot a::after { content: "→"; }
html[data-theme~="dark"].calc-panel .cv-panel-foot a { color: #9fdde2; border-color: rgba(79, 179, 187, .5); }

/* ── Tool-first calculator page (calc-v2, Dec 1 2026) ── */
html.cv-tf .hero.cv-hero { padding: 18px 0 14px !important; min-height: 0 !important; }
/* the site's title label: one outlined pill (same as .hero-tag in site-nav.js frameCss) */
html.cv-tf .cv-kicker { display: inline-flex; align-items: center; gap: .5em; max-width: 100%; box-sizing: border-box; font: 700 11.5px/1.35 Inter, system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase;
  color: var(--teal, #1a6b72); margin: 0 0 18px; padding: 6px 14px; border: 1px solid color-mix(in srgb, currentColor 38%, transparent); border-radius: 999px; }
html.cv-tf .hero.cv-hero h1 { margin: 0 0 4px !important; }
html.cv-tf .cv-purpose1 { margin: 4px 0 0 !important; max-width: 760px; font: 500 15.5px/1.5 Manrope, system-ui, sans-serif !important; color: var(--text-mid) !important; text-align: left !important; }
html.cv-tf .cv-meta { margin: 6px 0 0 !important; font: 600 12px/1.4 Inter, system-ui, sans-serif !important; color: var(--text-muted) !important; }
html.cv-tf .cv-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
html.cv-tf .cv-chip { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 0 11px; border-radius: 999px; font: 600 12.5px/1 Inter, system-ui, sans-serif;
  border: 1px solid rgba(26, 107, 114, .32); background: rgba(255, 255, 255, .6); color: #0e4a50 !important; text-decoration: none !important; cursor: pointer; }
html.cv-tf .cv-chip:hover { background: rgba(26, 107, 114, .1); }
html.cv-tf .cv-chip svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
html.cv-tf details.cv-howto { margin: 6px 0 14px; border: 1px solid var(--border, #dfe6f0); border-radius: 12px; background: var(--white, #fff); }
html.cv-tf details.cv-howto > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; padding: 10px 14px; font: 700 14px/1.3 Inter, system-ui, sans-serif; color: var(--teal, #1a6b72); }
html.cv-tf details.cv-howto > summary::-webkit-details-marker { display: none; }
html.cv-tf details.cv-howto > summary::before { content: "?"; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: rgba(26, 107, 114, .12); font-size: 12px; }
html.cv-tf details.cv-howto > summary::after { content: ""; margin-left: auto; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .15s; }
html.cv-tf details.cv-howto[open] > summary::after { transform: rotate(-135deg); }
html.cv-tf .cv-howto .cv-howto-body { margin: 0 !important; border: 0 !important; border-top: 1px solid var(--border, #dfe6f0) !important; border-radius: 0 0 12px 12px !important; padding: 10px 16px 12px !important; font-size: 14px; }
html.cv-tf main > section:first-of-type { padding-top: 14px !important; }
html.cv-tf main > section:first-of-type > .section-tag { display: none; }
html.cv-tf main > section:first-of-type > h2 { margin-top: 0 !important; }

/* rail */
html.cv-tf .cv-rail { position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 905; display: flex; flex-direction: column; gap: 1px; padding: 6px 0;
  background: var(--white, #fff); border: 1px solid var(--border, #d8dee8); border-right: 0; border-radius: 12px 0 0 12px; box-shadow: -4px 4px 18px rgba(15, 23, 42, .1); max-height: calc(100vh - 80px); overflow-y: auto; scrollbar-width: none; }
html.cv-tf .cv-rb { position: relative; display: flex; align-items: center; justify-content: center; width: 46px; height: 42px; flex: none; border: 0; background: transparent; color: #1f3864; cursor: pointer; padding: 0; }
html.cv-tf .cv-rb svg, html.cv-tf .cv-bbar svg, html.cv-tf .cv-dx svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
html.cv-tf .cv-rb:hover, html.cv-tf .cv-rb:focus-visible, html.cv-tf .cv-rb.on { color: var(--teal, #1a6b72); background: rgba(26, 107, 114, .1); outline: none; }
html.cv-tf .cv-rb:focus-visible { box-shadow: inset 0 0 0 2px var(--teal, #1a6b72); }
html.cv-tf .cv-rb.on::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--teal, #1a6b72); }
html.cv-tf .cv-tip { position: fixed; right: 54px; transform: translateY(0); background: #1e2a38; color: #fff; font: 600 12px/1 Manrope, Inter, system-ui, sans-serif; padding: 7px 10px; border-radius: 6px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .12s; margin-top: 0; }
html.cv-tf .cv-rb:hover .cv-tip, html.cv-tf .cv-rb:focus-visible .cv-tip { opacity: 1; }
html.cv-tf .cv-rsep { height: 1px; margin: 5px 9px; background: var(--border, #d8dee8); flex: none; }
html.cv-tf .cv-tool { color: #475569; }

/* drawer */
html.cv-tf .cv-drawer { position: fixed; z-index: 960; display: flex; flex-direction: column; background: var(--white, #fff); color: var(--text, #1e2a38);
  right: 0; top: 0; bottom: 0; width: min(480px, 90vw); box-shadow: -12px 0 36px rgba(15, 23, 42, .22); transform: translateX(104%); visibility: hidden;
  transition: transform .24s ease, visibility 0s .24s; }
html.cv-tf .cv-drawer.open { transform: none; visibility: visible; transition: transform .24s ease; }
html.cv-tf .cv-drawer[data-mode="dock"] { top: 64px; bottom: 12px; right: 56px; width: 380px; border: 1px solid var(--border, #d8dee8); border-radius: 14px; box-shadow: 0 12px 36px -18px rgba(15, 23, 42, .35); z-index: 900; }
html.cv-tf .cv-drawer[data-mode="sheet"] { left: 0; width: auto; top: 0; padding-top: env(safe-area-inset-top); transform: translateY(104%); }
html.cv-tf .cv-drawer[data-mode="sheet"].open { transform: none; }
html.cv-tf .cv-dh { flex: none; display: flex; align-items: center; gap: 4px; padding: 6px 6px 0 10px; border-bottom: 1px solid var(--border, #d8dee8); }
html.cv-tf .cv-tabs { flex: 1; min-width: 0; display: flex; overflow-x: auto; scrollbar-width: none; }
html.cv-tf .cv-tabs::-webkit-scrollbar { display: none; }
html.cv-tf .cv-tab { flex: none; border: 0; background: transparent; padding: 12px 8px 11px; font: 700 11.5px/1 Inter, system-ui, sans-serif; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
html.cv-tf .cv-tab[aria-selected="true"] { color: var(--teal, #1a6b72); border-bottom-color: var(--teal, #1a6b72); }
html.cv-tf .cv-tab:focus-visible { outline: 2px solid var(--teal, #1a6b72); outline-offset: -2px; }
html.cv-tf .cv-dx { flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--text-mid); cursor: pointer; display: grid; place-items: center; }
html.cv-tf .cv-dx:hover { background: rgba(15, 23, 42, .07); }
html.cv-tf .cv-panes { flex: 1; min-height: 0; overflow: hidden; display: flex; }
html.cv-tf .cv-pane { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px 20px 32px; font-size: 14px; line-height: 1.65; }
html.cv-tf .cv-pane[hidden] { display: none; }
html.cv-tf .cv-pane-t { font: 800 18px/1.25 Inter, system-ui, sans-serif !important; margin: 0 0 10px !important; color: var(--text); }
html.cv-tf .cv-pane-lead { font: 700 14px/1.4 Inter, system-ui, sans-serif; color: var(--text-mid); margin: 0 0 8px; }
html.cv-tf .cv-pane .cv-moved-sub { color: var(--text-mid) !important; font: 500 14.5px/1.65 Manrope, system-ui, sans-serif !important; max-width: none !important; margin: 0 0 12px !important; text-align: left !important; }
html.cv-tf .cv-pane > details.cv-moved-det > summary { display: none; }
html.cv-tf .cv-pane > details, html.cv-tf .cv-pane > section, html.cv-tf .cv-pane > div { margin: 0 0 14px !important; padding: 0 !important; border: 0 !important; box-shadow: none !important; background: transparent !important; max-width: none !important; }
html.cv-tf .cv-pane .mdc-acc-body { padding: 0 !important; }
html.cv-tf .cv-pane .related-cards { display: grid !important; grid-template-columns: 1fr !important; gap: 8px; }
html.cv-tf .cv-pane .related-card-thumb { display: none !important; }
html.cv-tf .cv-pane table { font-size: 13px; }
html.cv-tf .cv-pane .ref-acc > summary { display: none; }
html.cv-tf .cv-flash { animation: cvflash 1.6s ease; }
@keyframes cvflash { 0%, 40% { background: rgba(197, 90, 17, .16); } 100% { background: transparent; } }
html.cv-tf .cv-dscrim { position: fixed; inset: 0; z-index: 950; background: rgba(15, 23, 42, .24); opacity: 0; transition: opacity .2s; }
html.cv-tf .cv-dscrim.on { opacity: 1; }
html.cv-tf .cv-dscrim[hidden] { display: none; }
@media (min-width: 1100px) {
  html.cv-docked { --cv-dock: 400px; }
  html.cv-docked body { padding-right: 440px; }
  html.cv-docked .cv-cols { grid-template-columns: minmax(0, 1fr) minmax(260px, 320px) !important; }
}

/* result: summary bar (hidden on desktop, where the docked card shows everything) */
html.calc-v2 .cv-sum { display: none; }
@media (max-width: 1099px) {
  html.cv-has-bar { --cv-lift: 86px; }
  html.cv-has-bar body { padding-bottom: 84px !important; }
  html.cv-tf .cv-out.cv-barred { position: fixed; z-index: 920; left: 0; right: 0; bottom: 0; margin: 0 !important; padding: 0 14px calc(10px + env(safe-area-inset-bottom));
    background: var(--white, #fff); border-top: 1px solid var(--border, #d8dee8); box-shadow: 0 -8px 26px -14px rgba(15, 23, 42, .35); border-radius: 16px 16px 0 0; max-height: 74vh; max-height: 74dvh; overflow: hidden; display: flex; flex-direction: column; }
  html.cv-tf .cv-out.cv-barred > .cv-body { display: none; }
  html.cv-tf .cv-out.cv-barred.cv-open { overflow-y: auto; overscroll-behavior: contain; z-index: 970; }
  html.cv-tf .cv-out.cv-barred.cv-open > .cv-body { display: block; padding-bottom: 6px; }
  html.cv-tf .cv-out.cv-barred .cv-sum { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto; align-items: center; gap: 2px 10px; width: 100%; min-height: 60px; padding: 8px 2px;
    border: 0; background: transparent; text-align: left; cursor: pointer; color: var(--text); position: sticky; top: 0; background: inherit; z-index: 1; }
  html.cv-tf .cv-sum-v { font: 800 20px/1.15 Inter, system-ui, sans-serif; font-variant-numeric: tabular-nums; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  html.cv-tf .cv-out:not(.cv-has) .cv-sum-v { font-size: 15px; color: var(--text-muted); }
  html.cv-tf .cv-sum-l { font: 600 12.5px/1.3 Manrope, system-ui, sans-serif; color: var(--text-mid); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  html.cv-tf .cv-sum-d { font: 700 12.5px/1 Inter, system-ui, sans-serif; color: var(--teal, #1a6b72); border: 1px solid rgba(26, 107, 114, .35); border-radius: 999px; padding: 8px 12px; }
  html.cv-tf .cv-out:has(.cv-stale:not([hidden])) .cv-sum-v::after { content: " · recalculate"; font-size: 12px; color: #b45309; font-weight: 700; }
}
html.cv-tf .float-controls { bottom: var(--cv-lift, 24px) !important; }

/* phone: Learn + overflow menu share the bottom bar with the result */
html.cv-tf .cv-bbar { display: none; }
@media (max-width: 640px) {
  html.cv-tf .cv-rail { display: none; }
  html.cv-tf .cv-bbar { display: flex; position: fixed; z-index: 925; right: 0; bottom: 0; gap: 4px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); align-items: center; }
  html.cv-tf:not(.cv-has-bar) .cv-bbar { left: 0; justify-content: flex-end; background: var(--white, #fff); border-top: 1px solid var(--border, #d8dee8); }
  html:not(.cv-has-bar).cv-tf body { padding-bottom: 72px !important; }
  html.cv-tf:not(.cv-has-bar) { --cv-lift: 80px; }
  html.cv-tf .cv-out.cv-barred { right: 0; padding-right: 128px; }
  html.cv-tf .cv-out.cv-barred.cv-open { padding-right: 14px; }
  html.cv-tf .cv-out.cv-barred .cv-sum { grid-template-columns: minmax(0, 1fr) auto; }
  html.cv-tf .cv-out.cv-barred .cv-sum-l { grid-column: 1; grid-row: 2; -webkit-line-clamp: 1; }
  html.cv-tf .cv-out.cv-barred .cv-sum-d { grid-column: 2; grid-row: 1 / span 2; padding: 7px 9px; }
  html.cv-tf .cv-out.cv-barred.cv-open .cv-sum { grid-template-columns: minmax(0, 1fr) auto; }
  html.cv-tf .cv-learn, html.cv-tf .cv-more { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 50px; min-width: 52px; padding: 0 6px; border-radius: 12px;
    border: 1px solid var(--border, #d8dee8); background: var(--white, #fff); color: #1f3864; font: 700 11px/1 Inter, system-ui, sans-serif; cursor: pointer; }
  html.cv-tf .cv-learn { background: var(--teal, #1a6b72); border-color: var(--teal, #1a6b72); color: #fff; }
  html.cv-tf .cv-menu { position: absolute; right: 8px; bottom: calc(100% + 6px); min-width: 210px; padding: 6px; border-radius: 12px; background: var(--white, #fff); border: 1px solid var(--border, #d8dee8); box-shadow: 0 14px 36px -12px rgba(15, 23, 42, .4); }
  html.cv-tf .cv-menu[hidden] { display: none; }
  html.cv-tf .cv-mi { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text) !important; font: 600 14px/1.2 Manrope, system-ui, sans-serif; text-decoration: none !important; cursor: pointer; text-align: left; }
  html.cv-tf .cv-mi:hover, html.cv-tf .cv-mi:focus-visible { background: rgba(26, 107, 114, .08); outline: none; }
  html.cv-tf .cv-mi svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  html.cv-tf .hero.cv-hero { padding: 12px 0 10px !important; }
  html.cv-tf .cv-purpose1 { font-size: 14.5px !important; }
  html.cv-tf .cv-drawer[data-mode="sheet"] .cv-pane { padding: 12px 16px calc(28px + env(safe-area-inset-bottom)); }
}
@media (min-width: 641px) and (max-width: 1099px) { html.cv-tf main.container { padding-right: 58px; } }

/* dark */
html[data-theme~="dark"].cv-tf .cv-rail, html[data-theme~="dark"].cv-tf .cv-drawer, html[data-theme~="dark"].cv-tf .cv-out.cv-barred, html[data-theme~="dark"].cv-tf .cv-menu,
html[data-theme~="dark"].cv-tf .cv-more, html[data-theme~="dark"].cv-tf details.cv-howto, html[data-theme~="dark"].cv-tf:not(.cv-has-bar) .cv-bbar { background: #1a2535; border-color: #2c3a52; }
html[data-theme~="dark"].cv-tf .cv-rb, html[data-theme~="dark"].cv-tf .cv-more { color: #c9d3e1; }
html[data-theme~="dark"].cv-tf .cv-rb.on, html[data-theme~="dark"].cv-tf .cv-rb:hover, html[data-theme~="dark"].cv-tf .cv-tab[aria-selected="true"], html[data-theme~="dark"].cv-tf .cv-sum-d,
html[data-theme~="dark"].cv-tf details.cv-howto > summary, html[data-theme~="dark"].cv-tf .cv-kicker { color: #9fdde2; }
html[data-theme~="dark"].cv-tf .cv-tab[aria-selected="true"] { border-bottom-color: #9fdde2; }
html[data-theme~="dark"].cv-tf .cv-chip { color: #cfeef1 !important; background: rgba(255, 255, 255, .06); border-color: rgba(159, 221, 226, .35); }
html[data-theme~="dark"].cv-tf .cv-learn { background: #0e4a50; border-color: #3aa3ab; }
html[data-theme~="dark"].cv-tf .cv-dx { color: #c9d3e1; }

@media print {
  html.cv-tf .cv-rail, html.cv-tf .cv-bbar, html.cv-tf .cv-dscrim, html.cv-tf .cv-dh, html.cv-tf .cv-sum, html.cv-tf .cv-acts { display: none !important; }
  html.cv-tf .cv-drawer { position: static !important; transform: none !important; visibility: visible !important; width: auto !important; box-shadow: none !important; border: 0 !important; display: block !important; }
  html.cv-tf .cv-panes { display: block !important; overflow: visible !important; }
  html.cv-tf .cv-pane { display: block !important; overflow: visible !important; padding: 0 !important; }
  html.cv-tf .cv-pane[hidden] { display: block !important; }
  html.cv-tf .cv-out.cv-barred { position: static !important; box-shadow: none !important; border: 0 !important; padding: 0 !important; max-height: none !important; }
  html.cv-tf .cv-out.cv-barred > .cv-body { display: block !important; }
  html.cv-tf .cv-out .cv-empty[hidden], html.cv-tf .cv-out .cv-stale[hidden] { display: none !important; }
  html.cv-tf.cv-docked body { padding-right: 0 !important; }
}

/* the calculator's own heading repeats the page title: keep it small */
html.cv-tf main > section:first-of-type > h2 { font-size: clamp(17px, 1.8vw, 20px) !important; line-height: 1.3 !important; margin-bottom: 4px !important; }
html.cv-tf main > section:first-of-type > h2 + p { font-size: 14.5px !important; line-height: 1.5 !important; text-align: left !important; color: var(--text-mid) !important; margin-bottom: 8px !important; }
@media (max-width: 1099px) { html.cv-tf main > section:first-of-type > h2 + p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } }
html.cv-tf .cs-bar { margin: 0 0 6px; }

/* ══ Approved palette for calc-v2 pages (Dec 1 2026): navy ink, the site navy #1f3864 header, dark page #0f1520 like every page, Calculo indigo for navigation and links,
   teal for the Calculate button, the result card and How to use, quiet neutral surfaces. ══ */
html.calc-v2 { --cv-ink: #0f1e2e; --cv-ind: #4f46e5; --cv-ind-soft: #eef0fe; --cv-teal: #1a6b72; --cv-teal-ink: #fff; --cv-res: #e6f2f2; --cv-res-ink: #0e4a50; --cv-line: #dfe5ec; --cv-page: #f6f8fa; }
html[data-theme~="dark"].calc-v2 { --cv-ink: var(--text, #e8edf2); --cv-ind: #a5b4fc; --cv-ind-soft: rgba(165, 180, 252, .14); --cv-teal: #5fb3b9; --cv-teal-ink: #0b2427;
  --cv-res: rgba(95, 179, 185, .12); --cv-res-ink: #cdeff1; --cv-line: var(--border, #2c3a52); --cv-page: #0f1520; }
html.calc-v2 .site-header { background: #1f3864 !important; }   /* the site navy: one top-bar color on every page */
html.calc-v2 body { background: var(--cv-page); }
html.cv-tf .cv-kicker, html.cv-tf .cv-chip, html.cv-tf .cv-tab[aria-selected="true"], html.cv-tf .cv-rb.on, html.cv-tf .cv-rb:hover, html.cv-tf .cv-pane a,
html.calc-v2 .cv-carry button, html.calc-panel .cv-panel-foot a { color: var(--cv-ind) !important; }
html.cv-tf .cv-tab[aria-selected="true"] { border-bottom-color: var(--cv-ind) !important; }
html.cv-tf .cv-rb.on::before { background: var(--cv-ind) !important; }
html.cv-tf .cv-rb.on, html.cv-tf .cv-rb:hover { background: var(--cv-ind-soft) !important; }
html.cv-tf .cv-chip { border-color: color-mix(in srgb, var(--cv-ind) 32%, transparent) !important; background: var(--white, #fff) !important; }
html.cv-tf .cv-chip:hover { background: var(--cv-ind-soft) !important; }
html.calc-panel .cv-panel-foot a { border-color: color-mix(in srgb, var(--cv-ind) 40%, transparent) !important; }
html.cv-tf .hero.cv-hero h1 { color: var(--cv-ink) !important; }
html.calc-v2 :is(.calc-btn, .calc-wrap button[type=submit], .calc-card button[type=submit]) { background: var(--cv-teal) !important; color: var(--cv-teal-ink) !important; border-color: var(--cv-teal) !important; }
html.calc-v2 .cv-out .cv-body, html.calc-v2:not(.calc-panel) .cv-cols > .cv-out { background: var(--cv-res); color: var(--cv-res-ink); }
html.calc-v2 .cv-out .cv-body { border-radius: 14px; padding: 12px; }
html.calc-v2:not(.calc-panel) .cv-cols > .cv-out .cv-body { padding: 0; }
html.calc-v2 .cv-out-h { color: var(--cv-res-ink) !important; }
html.calc-v2 .cv-empty { color: var(--cv-res-ink) !important; border-color: color-mix(in srgb, var(--cv-teal) 40%, transparent) !important; background: transparent !important; }
html.calc-v2 .cv-acts button { color: var(--cv-res-ink) !important; border-color: color-mix(in srgb, var(--cv-teal) 45%, transparent) !important; background: var(--white, #fff) !important; }
html.cv-tf details.cv-howto > summary { color: #0e4a50; }
html[data-theme~="dark"].cv-tf details.cv-howto > summary { color: #9fdde2; }
html.cv-tf .cv-sum-d { color: var(--cv-res-ink) !important; }
@media (min-width: 1100px) { html.calc-v2:not(.calc-panel) .cv-cols > .cv-out { border-color: color-mix(in srgb, var(--cv-teal) 30%, transparent) !important; } }

@media (max-width: 1099px) {
  html.cv-tf .cv-out.cv-barred, html.calc-v2:not(.calc-panel) .cv-cols > .cv-out.cv-barred { background: var(--white, #fff) !important; }
  html[data-theme~="dark"].cv-tf .cv-out.cv-barred, html[data-theme~="dark"].calc-v2:not(.calc-panel) .cv-cols > .cv-out.cv-barred { background: #1a2535 !important; }
}
html.cv-tf .cv-drawer[data-mode="fly"], html.cv-tf .cv-drawer[data-mode="sheet"] { z-index: 10060; }
html.cv-tf .cv-dscrim { z-index: 10050; }
html.cv-tf .cv-out.cv-barred.cv-open { z-index: 10040; }

/* Related cards: light tiles in the current site style (Dec 1 2026, Dr. Rivero: "old one is too dark") */
html body .related-card{background:linear-gradient(135deg,#eef6f7 0%,#fff 70%);border:1px solid #d7e3e6;border-top:3px solid var(--teal,#1a6b72);box-shadow:none}
html body .related-card:hover{box-shadow:0 8px 22px rgba(26,107,114,.14);transform:translateY(-2px)}
html body .related-card .related-card-tag{color:#155e66}
html body .related-card .related-card-title{color:#14233f}
html body .related-card .related-card-desc{color:#475569}
html[data-theme~="dark"] body .related-card{background:linear-gradient(135deg,#1d3a44 0%,#1a2535 75%);border-color:#2a3a52;border-top-color:#5ec2c6}
html[data-theme~="dark"] body .related-card .related-card-tag{color:#8fd9dc}
html[data-theme~="dark"] body .related-card .related-card-title{color:#eef3f9}
html[data-theme~="dark"] body .related-card .related-card-desc{color:#b8c3d3}

/* Alignment fixes (Dec 1 2026, Dr. Rivero: date fields overlapped and labels of different lengths pushed inputs out of line) */
html.calc-v2 .calc-grid > *, html.calc-v2 .calc-field { min-width: 0; }
html.calc-v2 :is(input, select, textarea) { max-width: 100%; box-sizing: border-box; }
html.calc-v2 :is(input[type="date"], input[type="time"], input[type="datetime-local"], input[type="month"]) {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; min-width: 0; text-align: left; }
html.calc-v2 input::-webkit-date-and-time-value { text-align: left; }
@supports (grid-template-rows: subgrid) {
  html.calc-v2 .calc-grid:not(:has(> :not(.calc-field))) { grid-auto-rows: auto; row-gap: 14px !important; }
  html.calc-v2 .calc-grid:not(:has(> :not(.calc-field))) > .calc-field:not(:has(> :nth-child(4))) {
    display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 5px; align-content: start; }
  html.calc-v2 .calc-grid:not(:has(> :not(.calc-field))) > .calc-field > label { align-self: end; }
}
html.calc-panel .hero { display: none !important; }
