@import url('./amci-helpers.css');

/* Coding-site presentation. EDU behavior and scoring remain in their source files. */
/* Clip horizontal overflow without creating an ancestor scroll container for sticky panels. */
body.calculator-page { overflow-x: clip; overflow-y: visible; }
.calculator-shell {
  --calc-accent: #435dea;
  --calc-accent-strong: #304bdc;
  --calc-tint: #f0f4ff;
  --calc-line: #dfe6f0;
  --calc-muted: #58698a;
  --app-card-radius: 12px;
  --app-card-border: var(--calc-line);
  --app-card-bg: #fff;
  --app-card-shadow: none;
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 12px 72px;
  color: var(--ink-900);
}
.calculator-shell [hidden] { display: none !important; }
.calculator-shell :is(button, input, select) { font-family: inherit; }
.calculator-shell button { cursor: pointer; }
.calculator-shell :is(input[type='radio'], input[type='checkbox']) { accent-color: var(--calc-accent); }
.calculator-shell :focus-visible { outline: 3px solid #99b3ff; outline-offset: 3px; }
.calculator-shell :is(h1, h2, h3, h4) { color: var(--ink-900); font-weight: 700; letter-spacing: -0.025em; }
.calculator-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin-bottom: 28px; }
.calculator-toolbar .calculator-breadcrumb { flex: 0 0 auto; margin-bottom: 0; }
.calculator-toolbar .calculator-nav { flex-shrink: 0; margin: 0 0 0 auto; }
@media (max-width: 991.98px) {
  .calculator-toolbar { display: grid; grid-template-columns: minmax(0, 1fr); }
  .calculator-toolbar .calculator-nav { margin-left: 0; }
}

.calculator-breadcrumb { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 28px; color: var(--calc-muted); font-size: 0.8rem; }
.calculator-breadcrumb a { color: var(--calc-muted); text-decoration: none; }
.calculator-breadcrumb a:hover { color: var(--calc-accent); text-decoration: underline; }
.calculator-breadcrumb > span:last-child { color: var(--ink-700); }
.calculator-nav { display: flex; flex-wrap: wrap; gap: 4px; padding: 5px; margin-bottom: 32px; border: 1px solid var(--calc-line); border-radius: 10px; background: #f8faff; width: fit-content; max-width: 100%; }
.calculator-nav a { padding: 10px 16px; border: 1px solid transparent; border-radius: 7px; color: var(--ink-700); font-size: 0.85rem; font-weight: 600; text-decoration: none; line-height: 1.4; }
.calculator-nav a:hover { color: var(--calc-accent); background: #eaf0ff; }
.calculator-nav a[aria-current='page'] { color: var(--calc-accent-strong); border-color: #dfe5fc; background: #fff; box-shadow: 0 2px 4px #1b2b4e07; }
.calculator-eyebrow { color: var(--calc-accent); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; }
.calculator-index-hero { max-width: none; margin: 48px 0 40px; }
.calculator-index-hero > .calculator-eyebrow { display: flex; align-items: center; gap: 12px; }
.calculator-index-hero > .calculator-eyebrow::before { content: ''; width: 28px; height: 3px; background: var(--calc-accent); border-radius: 2px; }
.calculator-index-hero h1 { margin: 16px 0 20px; font-size: clamp(2.2rem, 4vw, 3.25rem); line-height: 1.1; letter-spacing: -0.04em; }
.calculator-index-hero > p:not(.calculator-eyebrow) { max-width: none; margin: 0; font-size: 1.1rem; line-height: 1.75; color: var(--calc-muted); }
.calculator-index-meta { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 24px; color: var(--calc-muted); font-size: 0.82rem; }
.calculator-index-meta span { display: inline-flex; gap: 8px; align-items: center; }
.calculator-index-meta i { color: var(--calc-accent); }
.calculator-directory { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.calculator-directory-card { display: flex; flex-direction: column; padding: 28px; border: 1px solid var(--calc-line); border-radius: 12px; background: #fff; color: var(--ink-900); text-decoration: none; transition: border-color 180ms ease, box-shadow 180ms ease; }
.calculator-directory-card:hover { color: var(--ink-900); border-color: #b4c3f8; box-shadow: 0 8px 28px #1b2b4e0a; }
.calculator-directory-card__top { display: flex; gap: 12px; align-items: center; }
.calculator-directory-icon { display: grid; place-items: center; flex: 0 0 44px; height: 44px; border: 1px solid #e2e8fb; border-radius: 10px; background: #f4f7ff; color: var(--calc-accent); font-size: 1.3rem; }
.calculator-directory-card h2 { margin: 26px 0 14px; font-size: 1.4rem; line-height: 1.25; }
.calculator-directory-card p { margin: 0 0 24px; color: var(--calc-muted); font-size: 0.95rem; line-height: 1.7; }
.calculator-directory-detail { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; margin-bottom: 22px; color: var(--calc-muted); font-size: 0.75rem; }
.calculator-card-link { display: flex; justify-content: space-between; align-items: center; padding-top: 18px; border-top: 1px solid var(--calc-line); color: var(--calc-accent); font-size: 0.9rem; font-weight: 600; }
.calculator-card-link i { transition: transform 180ms ease; }
.calculator-directory-card:hover .calculator-card-link i { transform: translateX(3px); }
.calculator-noscript { padding: 16px; background: #fff8e8; border: 1px solid #eedcb9; border-radius: 8px; }

/* Shared calculator headers and workspaces. */
.calculator-shell :is(.amci-helper, .unit-calculator-helper) {
  --amci-ink: var(--ink-900);
  --amci-ink-accent: #273e68;
  --amci-line: var(--calc-line);
  --amci-shadow: none;
  padding: 0;
  margin: 0;
  border-radius: 0;
  background: #fff;
  overflow: visible;
}
.calculator-shell .amci-helper::before, .calculator-shell .amci-helper::after { display: none; }
.calculator-shell .amci-helper__hero { grid-template-columns: minmax(0, 1fr) 215px; align-items: center; padding: 4px 0 32px; gap: 32px; border: 0; border-bottom: 1px solid var(--calc-line); border-radius: 0; background: #fff; box-shadow: none; }
.calculator-shell .amci-helper__hero-copy { padding: 0; }
.calculator-shell .amci-helper__title { max-width: 28ch; margin: 12px 0 0; font-size: clamp(1.9rem, 3vw, 2.65rem); line-height: 1.15; letter-spacing: -0.035em; }
.calculator-shell .amci-helper__description { max-width: none; margin-top: 16px; color: var(--calc-muted); font-size: 1rem; line-height: 1.7; }
.calculator-shell :is(.amci-helper__eyebrow, .amci-helper__section-kicker, .amci-helper__summary-kicker, .amci-helper__result-kicker, .unit-calculator-helper__kicker) { color: var(--calc-accent); font-size: 0.7rem; line-height: 1.4; letter-spacing: 0.09em; }
.calculator-shell .amci-helper__hero-art { padding: 0; }
.calculator-shell .amci-helper__hero-brand { width: 215px; gap: 0; justify-items: center; }
.calculator-shell .amci-helper__hero-brand-label { line-height: 1.2; padding: 0; color: var(--calc-muted); font-size: 0.62rem; letter-spacing: 0.1em; }
.calculator-shell .amci-helper__hero-logo { width: 200px; max-height: 94px; object-position: center; opacity: 1; filter: none; }
/* Offset the transparent padding so the attribution sits close above the artwork. */
.calculator-shell .amci-helper__hero-logo-link { margin-top: -12px; margin-bottom: -12px; }
.calculator-shell .amci-helper__main { grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; margin-top: 28px; }
.calculator-shell :is(.amci-helper__content, .amci-helper__sidebar, .amci-helper__form) { min-width: 0; gap: 24px; }
.calculator-shell :is(.amci-helper__panel, .amci-helper__summary-card, .amci-helper__result-card, .unit-calculator-helper__panel) { padding: 24px; border: 1px solid var(--calc-line); border-radius: 12px; background: #fff; box-shadow: none; }
.calculator-shell .amci-helper__section-head { gap: 20px; align-items: center; margin-bottom: 24px; }
.calculator-shell .amci-helper__section-title { font-size: 1.2rem; line-height: 1.35; margin-top: 5px; }
.calculator-shell .amci-helper__section-head-actions { flex-shrink: 1; }
.calculator-shell .amci-helper__preset { padding: 10px 14px; border: 1px solid #d8e1fa; border-radius: 8px; color: var(--calc-accent-strong); background: #f5f7ff; box-shadow: none; font-size: 0.8rem; line-height: 1.5; }
.calculator-shell .amci-helper__preset:hover { border-color: #aebff2; background: #eaf0ff; }
.calculator-shell .amci-helper__preset-summary { color: var(--calc-muted); font-size: 0.75rem; }
.calculator-shell .amci-helper__preset-name { font-weight: 600; }
.calculator-guide { border: 1px solid var(--calc-line); border-radius: 10px; background: #f8faff; }
.calculator-guide > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; color: var(--ink-700); list-style: none; cursor: pointer; font-size: 0.85rem; font-weight: 600; }
.calculator-guide > summary::-webkit-details-marker { display: none; }
.calculator-guide > summary > span:first-child { display: flex; align-items: center; gap: 9px; }
.calculator-guide > summary i { color: var(--calc-accent); }
.calculator-guide__hint { display: flex; align-items: center; gap: 12px; color: var(--calc-muted); font-size: 0.75rem; font-weight: 400; }
.calculator-guide[open] > summary { border-bottom: 1px solid var(--calc-line); }
.calculator-guide[open] > summary .fa-chevron-down { transform: rotate(180deg); }
.calculator-shell .calculator-guide .amci-helper__guide { padding: 24px; border: 0; background: #fff; box-shadow: none; border-radius: 0 0 10px 10px; }
.calculator-shell .amci-helper__prompt-card { border-color: var(--calc-line); background: #fff; box-shadow: none; }
.calculator-shell .amci-helper__prompt-icon { width: 34px; height: 34px; border-radius: 8px; background: var(--calc-tint); color: var(--calc-accent); font-size: 0.95rem; }
.calculator-shell .amci-helper__prompt-card h3 { flex: 1; min-width: 0; font-size: 0.9rem; line-height: 1.4; }
.calculator-shell .amci-helper__prompt-title-row { gap: 10px; align-items: center; }
.calculator-shell .amci-helper__prompt-step { flex-shrink: 0; white-space: nowrap; font-size: 0.65rem; line-height: 1.5; letter-spacing: 0.08em; }
.calculator-shell :is(.amci-helper__prompt-question, .amci-helper__prompt-guidance) { color: var(--calc-muted); font-size: 0.85rem; line-height: 1.6; }

/* Choices and PDR: one selection language, with the numeric levels preserved. */
.calculator-shell .amci-helper__visit-setting-layout { grid-template-columns: 200px minmax(0, 1fr); background: #fff; box-shadow: none; }
.calculator-shell .amci-helper__visit-family-list { padding: 12px; gap: 6px; background: #f8faff; border-color: var(--calc-line); }
.calculator-shell .amci-helper__visit-family { gap: 10px; padding: 11px 10px; border-radius: 7px; border-color: transparent; background: transparent; }
.calculator-shell .amci-helper__visit-family-label { font-size: 0.82rem; font-weight: 600; line-height: 1.4; }
.calculator-shell .amci-helper__visit-family-icon { width: 30px; height: 30px; border-radius: 7px; font-size: 0.95rem; background: #edf2fc; color: #62749a; }
.calculator-shell .amci-helper__visit-family:is(:hover, .is-active) { margin: 0; border-color: #d4defa; border-radius: 7px; background: #fff; color: var(--calc-accent-strong); box-shadow: none; }
.calculator-shell .amci-helper__visit-family.is-active .amci-helper__visit-family-icon { background: #e9eeff; color: var(--calc-accent); }
.calculator-shell .amci-helper__visit-group-panel { padding: 18px; }
.calculator-shell .amci-helper__visit-group-card { padding: 0 0 18px; background: #fff; border: 0; border-bottom: 1px solid var(--calc-line); border-radius: 0; }
.calculator-shell .amci-helper__visit-group-icon { width: 38px; height: 38px; border-radius: 9px; background: var(--calc-tint); color: var(--calc-accent); }
.calculator-shell .amci-helper__visit-group-copy h3 { font-size: 1rem; }
.calculator-shell .amci-helper__visit-group-copy p { color: var(--calc-muted); font-size: 0.85rem; line-height: 1.6; }
.calculator-shell .amci-helper__visit-type-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
.calculator-shell :is(.amci-helper__option-card, .amci-helper__pdr-level-card) { border-radius: 9px; border-color: var(--calc-line); background: #fff; box-shadow: none; }
.calculator-shell :is(.amci-helper__option-card, .amci-helper__pdr-level-card):hover { transform: none; border-color: #aebff2; background: #f8faff; box-shadow: none; }
.calculator-shell :is(.amci-helper__option-card, .amci-helper__pdr-level-card):has(input:checked) { transform: none; border-color: #8da4ee; background: #f2f5ff; box-shadow: inset 3px 0 0 var(--calc-accent); }
.calculator-shell :is(.amci-helper__option-card, .amci-helper__pdr-level-card):has(input:focus-visible) { outline: 3px solid #99b3ff; outline-offset: 2px; }
.calculator-shell .amci-helper__option-card input:checked ~ .amci-helper__option-title { color: var(--calc-accent-strong); }
.calculator-shell :is(.amci-helper__option-body, .amci-helper__pdr-level-preview, .amci-helper__metric-help) { color: var(--calc-muted); font-size: 0.85rem; line-height: 1.55; }
.calculator-shell :is(.amci-helper__option-group, .amci-helper__visit-type-eyebrow) { font-size: 0.65rem; letter-spacing: 0.07em; color: #637491; }
.calculator-shell .amci-helper__pdr-tabs { gap: 8px; border: 0; padding: 0; margin: 0 0 -1px; align-items: stretch; z-index: 2; }
.calculator-shell .amci-helper__pdr-tab { border: 1px solid var(--calc-line); border-bottom-color: #aebff2; border-radius: 9px 9px 0 0; padding: 12px; background: #f8faff; gap: 4px 8px; margin: 0; }
.calculator-shell .amci-helper__pdr-tab.is-active { background: #f2f5ff; border: 1px solid #aebff2; border-bottom-color: #f2f5ff; border-radius: 9px 9px 0 0; margin: 0; box-shadow: inset 0 3px 0 var(--calc-accent); }
.calculator-shell .amci-helper__pdr-tab-topline { gap: 7px; }
.calculator-shell .amci-helper__pdr-tab-title { display: inline-flex; align-items: center; gap: 7px; font-size: 0.9rem; color: var(--ink-900); }
.calculator-shell .amci-helper__pdr-tab-step { color: var(--calc-muted); font-size: 0.62rem; }
.calculator-shell .amci-helper__pdr-tab-detail { color: var(--calc-muted); font-size: 0.75rem; font-weight: 400; }
.calculator-shell .amci-helper__pdr-tab-summary { min-width: 26px; height: 26px; padding: 0 6px; font-size: 0.8rem; }
.calculator-shell .amci-helper__pdr-panel { --pdr-panel-padding: 20px; padding: var(--pdr-panel-padding); border: 1px solid #aebff2; border-radius: 0 0 10px 10px; background: #fff; }
.calculator-shell .amci-helper__pdr-panel-header h3 { font-size: 1.05rem; line-height: 1.4; }
.calculator-shell :is(.amci-helper__pdr-panel-header p, .amci-helper__pdr-detail-card > p, .amci-helper__pdr-detail-callout p) { color: var(--calc-muted); font-size: 0.85rem; line-height: 1.6; }
.calculator-shell .amci-helper__pdr-workspace-grid { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 16px; }
.calculator-shell .amci-helper__pdr-level-title { color: var(--ink-700); font-size: 0.85rem; }
.calculator-shell .amci-helper__pdr-level-chip { color: var(--calc-accent); background: #ecf0ff; }
.calculator-shell .amci-helper__pdr-detail-card { padding: 18px; background: #f8faff; border-color: var(--calc-line); border-radius: 9px; }
.calculator-shell .amci-helper__pdr-detail-card h4 { font-size: 1.05rem; line-height: 1.4; }
.calculator-shell .amci-helper__pdr-detail-callout { padding: 14px 0 0; border: 0; border-top: 1px solid var(--calc-line); border-radius: 0; background: transparent; }
.calculator-shell :is(.amci-helper__pdr-detail-kicker, .amci-helper__pdr-panel-kicker, .amci-helper__pdr-detail-callout h5) { color: #58698a; font-size: 0.65rem; letter-spacing: 0.07em; }
.calculator-shell .amci-helper__pdr-summary-pill--accent { border: 1px solid #dce3fc; background: #f1f4ff; }
.calculator-shell .amci-helper__pdr-summary-pill--accent :is(.amci-helper__pdr-summary-label, strong) { color: var(--calc-accent-strong); }
.calculator-shell .amci-helper__metric-card { padding: 16px; background: #f8faff; }
.calculator-shell .amci-helper__metric-label { font-size: 0.9rem; }
.calculator-shell .amci-helper__metric-help { min-height: 3.25rem; font-size: 0.8rem; }
.calculator-shell .amci-helper__metric-card input { width: 100%; min-width: 0; border-color: #ccd7e8; border-radius: 8px; background: #fff; font-size: 1.4rem; }
.calculator-shell .amci-helper__toggle { background: #f8faff; border-color: var(--calc-line); }
.calculator-shell .amci-helper__toggle small { color: var(--calc-muted); line-height: 1.5; }
.calculator-shell .btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border: 1px solid var(--calc-accent); border-radius: 8px; background: var(--calc-accent); color: #fff; font-size: 0.95rem; font-weight: 600; box-shadow: none; }
.calculator-shell .btn-primary:hover { background: var(--calc-accent-strong); border-color: var(--calc-accent-strong); }

/* Summary and results: compact labels, readable evidence, quiet status colors. */
.calculator-shell .amci-helper__summary-card { background: #f8faff; }
.calculator-shell .amci-helper__summary-card h2 { margin-top: 8px; font-size: 1.2rem; }
.calculator-shell .amci-helper__summary-items { gap: 0; }
.calculator-shell .amci-helper__summary-item { padding: 14px 0; border: 0; border-bottom: 1px solid var(--calc-line); border-radius: 0; background: transparent; }
.calculator-shell .amci-helper__summary-item:last-child { border: 0; padding-bottom: 0; }
.calculator-shell :is(.amci-helper__summary-label, .amci-helper__result-chip-label) { color: var(--calc-muted); font-size: 0.65rem; line-height: 1.4; letter-spacing: 0.07em; }
.calculator-shell .amci-helper__summary-value { font-size: 0.85rem; line-height: 1.55; }
.calculator-shell .amci-helper__result-card { scroll-margin-top: 100px; }
.calculator-shell .amci-helper__sidebar > [id$='ResultPanel'] { scroll-margin-top: 96px; }
.calculator-shell .amci-helper__result-card h2 { font-size: 1.15rem; line-height: 1.4; margin-top: 8px; }
.calculator-shell .amci-helper__result-card p { color: var(--calc-muted); font-size: 0.85rem; line-height: 1.65; }
.calculator-shell .amci-helper__result-card > p:last-child { margin-bottom: 0; }
.calculator-shell .amci-helper__result-card:not(.amci-helper__result-card--success):not(.amci-helper__result-card--warning) { border-style: dashed; }
.calculator-shell .amci-helper__result-card--success { border-top: 3px solid var(--calc-accent); background: #fff; }
.calculator-shell .amci-helper__result-card--success > h2 { font-size: 2rem; color: var(--calc-accent-strong); font-variant-numeric: tabular-nums; letter-spacing: -0.03em; overflow-wrap: anywhere; }
.calculator-shell .amci-helper__result-card--warning { background: #fffbf2; border-color: #e8d5a9; }
.calculator-shell .amci-helper__chip-row { display: grid; gap: 8px; margin-top: 16px; }
.calculator-shell .amci-helper__result-chip { gap: 5px; padding: 12px; background: #f6f8fc; border-radius: 8px; border-color: var(--calc-line); font-size: 0.75rem; }
.calculator-shell .amci-helper__result-chip strong { font-size: 0.9rem; line-height: 1.4; }
.calculator-shell .amci-helper__breakdown-item { padding: 14px; border-color: var(--calc-line); border-radius: 8px; }
.calculator-shell .amci-helper__breakdown-head { font-size: 0.82rem; }
.calculator-shell .amci-helper__breakdown-title { color: var(--ink-700); font-size: 0.8rem; line-height: 1.5; margin: 6px 0; }
.calculator-shell .amci-helper__breakdown-item p { font-size: 0.8rem; margin: 0; }
.calculator-shell .amci-helper__explanation { padding: 14px; background: #f8faff; border-color: var(--calc-line); border-radius: 8px; }
.calculator-shell .amci-helper__explanation h3 { font-size: 0.9rem; line-height: 1.4; }
.calculator-shell .amci-helper__explanation p { margin: 0; font-size: 0.8rem; }
.calculator-shell .amci-helper__explanation--warning { background: #fffcf5; }
.calculator-shell .amci-helper__teacher-note { padding: 14px 0 0; border-top: 1px solid var(--calc-line); border-radius: 0; background: transparent; color: var(--calc-accent); }
.calculator-shell .amci-helper__teacher-note span { color: var(--calc-muted); font-size: 0.8rem; line-height: 1.6; }

/* Standard calculator and clinical conversion workspace. */
.calculator-shell .unit-calculator-helper__header { grid-template-columns: 1fr; }
.calculator-shell .unit-calculator-helper__workspace { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 24px; align-items: start; margin-top: 28px; }
.calculator-shell .unit-calculator-helper__divider { display: none; }
.calculator-shell .unit-calculator-helper__panel h2 { margin: 6px 0 0; font-size: 1.2rem; font-weight: 700; line-height: 1.4; }
.calculator-shell .unit-calculator-helper__panel-icon { width: 40px; height: 40px; border: 1px solid #e0e7fb; border-radius: 9px; background: #f3f6ff; color: var(--calc-accent); font-size: 1.1rem; }
.calculator-shell .unit-calculator-helper :is(.quick-calculator, .unit-converter) { height: auto; }
.calculator-shell .quick-calculator { padding: 0; border: 0; border-radius: 0; background: #fff; box-shadow: none; }
.calculator-shell .quick-calculator__screen { min-height: 106px; padding: 18px; border: 1px solid var(--calc-line); border-radius: 9px; background: #f7f9fe; }
.calculator-shell .quick-calculator__display { color: var(--ink-900); font-size: 2.1rem; font-weight: 600; }
.calculator-shell .quick-calculator__keys { gap: 9px; margin-top: 16px; }
.calculator-shell .quick-calculator__key { min-height: 54px; border-color: var(--calc-line); border-radius: 8px; font-size: 1.05rem; color: var(--ink-700); background: #fff; }
.calculator-shell .quick-calculator__key:hover { transform: none; background: #f1f4ff; border-color: #aebff2; }
.calculator-shell .quick-calculator__key--utility { background: #f7f9fc; color: var(--calc-muted); }
.calculator-shell .quick-calculator__key--operator { background: #f1f4ff; color: var(--calc-accent); }
.calculator-shell .quick-calculator__key--equals { min-height: 117px; border-color: var(--calc-accent); background: var(--calc-accent); color: #fff; }
.calculator-shell .quick-calculator__key--equals:hover { background: var(--calc-accent-strong); color: #fff; }
.calculator-shell .unit-calculator-helper .unit-converter { padding: 0; gap: 20px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.calculator-shell .unit-calculator-helper .unit-converter__categories { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.calculator-shell .unit-converter-category { min-height: 42px; gap: 7px; padding: 8px; border-radius: 8px; border-color: var(--calc-line); background: #fff; color: var(--ink-700); font-size: 0.8rem; font-weight: 500; }
.calculator-shell .unit-converter-category:is(.is-active, :hover) { color: var(--calc-accent-strong); border-color: #b0bff0; background: #f0f3ff; }
.calculator-shell .unit-converter__hint { color: var(--calc-muted); font-size: 0.82rem; line-height: 1.6; min-height: 2.6em; }
.calculator-shell .unit-converter__field { gap: 9px; }
.calculator-shell .unit-converter__field > span { color: var(--calc-muted); font-size: 0.7rem; letter-spacing: 0.07em; }
.calculator-shell .unit-converter__field :is(input, select) { min-height: 46px; border-color: #ccd7e8; border-radius: 8px; color: var(--ink-700); font-size: 0.9rem; font-weight: 500; }
.calculator-shell .unit-converter__field input { font-size: 1.15rem; font-weight: 600; }
.calculator-shell .unit-converter__field input[readonly] { background: #f8faff; }
.calculator-shell .unit-converter__field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m2.5 4.5 3.5 3.5 3.5-3.5' fill='none' stroke='%2358698a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 12px;
}
.calculator-shell .unit-converter__swap { border-radius: 8px; background: #f1f4ff; color: var(--calc-accent); }
.calculator-shell .unit-converter__result { padding: 16px; border-color: #dce3fc; border-radius: 8px; background: #f1f4ff; color: var(--calc-accent-strong); font-size: 0.95rem; }

/* Keep the live summary and result available beside the desktop form. */
@media (min-width: 1101px) {
  .calculator-shell .amci-helper__sidebar {
    position: sticky;
    top: 96px;
    align-self: start;
    max-height: calc(100vh - 112px);
    max-height: calc(100dvh - 112px);
    gap: 16px;
  }
  .calculator-shell .amci-helper__sidebar > .amci-helper__summary-card { flex: 0 0 auto; }
  .calculator-shell .amci-helper__sidebar > [id$='ResultPanel'] {
    flex: 0 1 auto;
    min-height: 0;
    overflow-y: auto;
    border-radius: 12px;
    scrollbar-width: thin;
    scrollbar-color: #b4c2d9 transparent;
  }
}
@media (min-width: 1101px) and (max-height: 700px) {
  .calculator-shell .amci-helper__sidebar .amci-helper__summary-card { padding: 16px; }
  .calculator-shell .amci-helper__sidebar .amci-helper__summary-items { margin-top: 8px; }
  .calculator-shell .amci-helper__sidebar .amci-helper__summary-item { padding: 8px 0; }
}
@media (min-width: 1200px) and (max-width: 1399.98px) { .calculator-shell { max-width: 1140px; } }
@media (min-width: 992px) and (max-width: 1199.98px) { .calculator-shell { max-width: 960px; } }
@media (min-width: 768px) and (max-width: 991.98px) { .calculator-shell { max-width: 720px; } }
@media (min-width: 576px) and (max-width: 767.98px) { .calculator-shell { max-width: 540px; } }
@media (max-width: 1100px) {
  .calculator-shell .amci-helper__main { grid-template-columns: 1fr; }
  .calculator-shell .amci-helper__sidebar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
}
@media (max-width: 991.98px) {
  .calculator-directory { grid-template-columns: 1fr; }
  .calculator-directory-card { padding: 24px; }
  .calculator-shell .unit-calculator-helper__workspace { grid-template-columns: 1fr; }
  .calculator-shell .amci-helper__hero { grid-template-columns: minmax(0, 1fr) 185px; gap: 20px; }
  .calculator-shell .amci-helper__hero-brand { width: 185px; }
  .calculator-shell .amci-helper__hero-logo { width: 174px; }
  .calculator-shell .amci-helper__visit-family-list { grid-template-columns: 1fr; border-right: 1px solid var(--calc-line); border-bottom: 0; }
  .calculator-shell .amci-helper__pdr-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .calculator-shell .amci-helper__metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .calculator-shell .amci-helper__option-grid--mdm { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
  .calculator-shell .amci-helper__hero { grid-template-columns: 1fr; }
  .calculator-shell .amci-helper__hero-art { justify-content: flex-start; }
  .calculator-shell .amci-helper__hero-brand { justify-items: center; margin: 0; }
  .calculator-shell .amci-helper__hero-logo { object-position: center; }
  .calculator-shell .amci-helper__pdr-workspace-grid { grid-template-columns: 1fr; }
  .calculator-shell .amci-helper__pdr-tab-topline { display: grid; gap: 3px; }
  .calculator-shell .amci-helper__pdr-tab { grid-template-columns: minmax(0, 1fr); }
  .calculator-shell .amci-helper__pdr-tab-summary { display: none; }
  .calculator-shell .amci-helper__sidebar { display: flex; align-items: stretch; }
  .calculator-shell .amci-helper__section-head { align-items: flex-start; flex-direction: column; gap: 14px; }
  .calculator-shell .amci-helper__section-head-actions { width: 100%; }
  .calculator-shell .amci-helper__preset-row--compact { justify-content: flex-start; }
  .calculator-shell .amci-helper__visit-setting-layout { grid-template-columns: 1fr; }
  .calculator-shell .amci-helper__visit-family-list { grid-template-columns: repeat(2, minmax(0, 1fr)); border-right: 0; border-bottom: 1px solid var(--calc-line); }
  .calculator-shell .amci-helper__visit-family { padding: 9px; gap: 8px; }
  .calculator-shell .amci-helper__visit-family-icon { display: none; }
  .calculator-shell .unit-calculator-helper .unit-converter__fields { grid-template-columns: 1fr; }
  .calculator-shell .unit-converter__swap { justify-self: center; }
  .calculator-guide__hint { font-size: 0; gap: 0; }
  .calculator-guide__hint i { font-size: 0.75rem; }
}
@media (max-width: 575.98px) {
  .calculator-shell { padding: 20px 20px 48px; }
  .calculator-breadcrumb { margin-bottom: 20px; font-size: 0.72rem; gap: 8px; }
  .calculator-nav { gap: 4px; margin-bottom: 28px; width: 100%; }
  .calculator-nav a { flex: 1 1 calc(50% - 4px); padding: 10px 8px; font-size: 0.75rem; text-align: center; }
  .calculator-index-hero { margin: 32px 0; }
  .calculator-index-hero h1 { font-size: 2.15rem; }
  .calculator-index-hero > p:not(.calculator-eyebrow) { font-size: 1rem; }
  .calculator-shell :is(.amci-helper__panel, .amci-helper__summary-card, .amci-helper__result-card, .unit-calculator-helper__panel) { padding: 18px; }
  .calculator-shell .amci-helper__pdr-panel { --pdr-panel-padding: 14px; padding: var(--pdr-panel-padding); }
  .calculator-shell .amci-helper__pdr-tab { padding: 10px 8px; }
  .calculator-shell .amci-helper__pdr-tab-title { font-size: 0.8rem; }
  .calculator-shell .amci-helper__pdr-tab-detail { font-size: 0.68rem; }
  .calculator-shell .amci-helper__metric-grid, .calculator-shell .amci-helper__option-grid--mdm { grid-template-columns: 1fr; }
  .calculator-shell .amci-helper__metric-help { min-height: 0; }
  .calculator-shell .amci-helper__metric-card { gap: 8px; }
  .calculator-shell .btn-primary { width: 100%; }
  .calculator-shell .unit-calculator-helper .unit-converter__categories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calculator-shell .unit-converter-category { font-size: 0.75rem; }
  .calculator-guide > summary { padding: 16px; font-size: 0.8rem; }
  .calculator-shell .calculator-guide .amci-helper__guide { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) { .calculator-shell *, .calculator-shell *::after { transition: none !important; scroll-behavior: auto !important; } }

/* Facility MDM: two compact choices, then a single Low / Moderate / High progression. */
.calculator-shell .facility-mdm { min-width: 0; padding: 0; margin: 0; border: 0; }
.calculator-shell .facility-mdm__hint { margin: -8px 0 18px; color: var(--calc-muted); font-size: 0.85rem; line-height: 1.6; }
.calculator-shell .facility-mdm__basics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.calculator-shell .facility-mdm__levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.calculator-shell .facility-mdm__option { min-width: 0; margin: 0; padding: 18px; border-radius: 10px; gap: 6px; box-shadow: none; }
.calculator-shell .facility-mdm__option .amci-helper__option-title { padding-right: 22px; color: var(--ink-900); font-size: 1rem; line-height: 1.4; }
.calculator-shell .facility-mdm__option .amci-helper__option-body { font-size: 0.78rem; line-height: 1.5; }
.calculator-shell .facility-mdm__selection { position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 19px; height: 19px; border: 1px solid #b9c5da; border-radius: 50%; color: #fff; background: #fff; font-size: 0.7rem; pointer-events: none; }
.calculator-shell .facility-mdm__selection i { visibility: hidden; }
.calculator-shell .facility-mdm__option:has(input:checked) { background: #f0f4ff; border-color: #879eeb; box-shadow: inset 0 0 0 1px #879eeb; }
.calculator-shell .facility-mdm__option:has(input:checked) .facility-mdm__selection { border-color: var(--calc-accent); background: var(--calc-accent); }
.calculator-shell .facility-mdm__option:has(input:checked) .facility-mdm__selection i { visibility: visible; }
.calculator-shell .facility-mdm__points { display: inline-flex; align-items: baseline; gap: 5px; color: var(--calc-muted); font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.calculator-shell .facility-mdm__points strong { color: var(--calc-accent-strong); font-size: 1.25rem; font-weight: 700; }
.calculator-shell .facility-mdm__icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; background: #f1f4fb; color: #62749a; font-size: 1rem; }
.calculator-shell .facility-mdm__option--basic { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; column-gap: 12px; align-items: start; padding-right: 46px; }
.calculator-shell .facility-mdm__option--basic .facility-mdm__icon { grid-column: 1; grid-row: 1 / span 2; }
.calculator-shell .facility-mdm__option--basic .amci-helper__option-title { grid-column: 2; padding: 0; font-size: 0.85rem; align-self: center; }
.calculator-shell .facility-mdm__option--basic .facility-mdm__points { grid-column: 3; grid-row: 1; white-space: nowrap; }
.calculator-shell .facility-mdm__option--basic .facility-mdm__points strong { font-size: 1rem; }
.calculator-shell .facility-mdm__option--basic .amci-helper__option-body { grid-column: 2 / -1; }
.calculator-shell .facility-mdm__signal { display: flex; align-items: flex-end; gap: 4px; height: 22px; margin: 2px 0 12px; }
.calculator-shell .facility-mdm__signal i { display: block; width: 6px; background: #d7e0f0; border-radius: 2px; }
.calculator-shell .facility-mdm__signal i:nth-child(1) { height: 8px; background: var(--calc-accent); }
.calculator-shell .facility-mdm__signal i:nth-child(2) { height: 14px; }
.calculator-shell .facility-mdm__signal i:nth-child(3) { height: 20px; }
.calculator-shell .facility-mdm__signal[data-mdm-intensity='2'] i:nth-child(2),
.calculator-shell .facility-mdm__signal[data-mdm-intensity='3'] i { background: var(--calc-accent); }
@media (max-width: 767.98px) {
  .calculator-shell .facility-mdm__option--basic { grid-template-columns: 26px minmax(0, 1fr); padding: 14px 34px 14px 14px; gap: 7px; }
  .calculator-shell .facility-mdm__option--basic .facility-mdm__points { grid-column: 2; grid-row: 2; }
  .calculator-shell .facility-mdm__option--basic .amci-helper__option-body { grid-column: 1 / -1; }
  .calculator-shell .facility-mdm__option--basic .facility-mdm__icon { width: 26px; height: 26px; }
}
@media (max-width: 575.98px) {
  .calculator-shell .facility-mdm__basics { grid-template-columns: 1fr; gap: 10px; }
  .calculator-shell .facility-mdm__levels { gap: 8px; }
  .calculator-shell .facility-mdm__option--level { padding: 14px 10px; }
  .calculator-shell .facility-mdm__option--level .amci-helper__option-title { padding: 0; font-size: 0.78rem; }
  .calculator-shell .facility-mdm__option--level .facility-mdm__selection { top: 12px; right: 10px; width: 16px; height: 16px; font-size: 0.6rem; }
  .calculator-shell .facility-mdm__option--level .facility-mdm__points { gap: 3px; font-size: 0.68rem; }
  .calculator-shell .facility-mdm__option--level .facility-mdm__points strong { font-size: 1.1rem; }
  .calculator-shell .facility-mdm__option--level .facility-mdm__signal { gap: 3px; margin-bottom: 10px; }
  .calculator-shell .facility-mdm__option--level .facility-mdm__signal i { width: 4px; }
  .calculator-shell .facility-mdm__selection { top: 14px; right: 12px; }
}
@media (max-width: 359.98px) {
  .calculator-shell .facility-mdm__option--level { padding-inline: 7px; }
  .calculator-shell .facility-mdm__option--level .amci-helper__option-title { font-size: 0.7rem; }
}

/* Join the active PDR tab to its matching category header. */
.calculator-shell .amci-helper__pdr-tab.is-active::after { content: ''; position: absolute; right: 0; bottom: -2px; left: 0; height: 3px; background: #f2f5ff; }
.calculator-shell .amci-helper__pdr-tab.is-active .amci-helper__pdr-tab-title { color: var(--calc-accent-strong); }
.calculator-shell .amci-helper__pdr-tab-title i { font-size: 0.85em; color: #7585a5; }
.calculator-shell .amci-helper__pdr-tab.is-active .amci-helper__pdr-tab-title i { color: var(--calc-accent); }
.calculator-shell .amci-helper__pdr-panel-header { margin: calc(-1 * var(--pdr-panel-padding)) calc(-1 * var(--pdr-panel-padding)) 0; padding: var(--pdr-panel-padding); border-bottom: 1px solid #dfe6fa; background: #f2f5ff; }
.calculator-shell .amci-helper__pdr-panel-header .amci-helper__pdr-panel-kicker { display: flex; align-items: center; gap: 8px; color: var(--calc-accent-strong); font-size: 0.9rem; font-weight: 700; letter-spacing: 0; text-transform: none; }
.calculator-shell .amci-helper__pdr-panel-header h3 { margin-top: 0; }
.calculator-shell .amci-helper__pdr-panel-header p { margin-bottom: 0; }
@media (max-width: 575.98px) { .calculator-shell .amci-helper__pdr-tab-title i { display: none; } }
