/* Laboratório térmico · área mínima do trocador ar–água (IC81).
   Usa os tokens de base.css e a mesma estrutura do laboratório elétrico. Duas colunas a partir de 1000 px. */
:root {
  --hh: 56px; --ah: 40px; --mb: 0px; --inputs-w: 400px;
  --gut: clamp(16px, 3vw, 36px);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  /* Correntes: ar quente (laranja), ar frio (petróleo), água (anil) · paleta validada de base.css */
  --air-hot: var(--c-em);
  --air-cold: var(--c-s1);
  --water: var(--c-s3);
}
body.thermal-app { min-height: 100dvh; font-size: 14px; line-height: 1.55; }
.t-skip { position: fixed; top: -80px; left: 16px; z-index: 300; padding: 10px 16px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 750; }
.t-skip:focus { top: 10px; }
.t-eyebrow { color: var(--accent); font-size: .64rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }

/* ---- Cabeçalho ---------------------------------------------------------- */
.t-appbar { position: sticky; top: 0; z-index: 80; display: flex; align-items: center; gap: 14px; height: var(--hh); padding: 0 var(--gut) 0 16px;
  border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); }
.t-brand { flex: none; font-size: 1.3rem; font-weight: 850; letter-spacing: -.05em; }
.t-brand b { color: var(--accent); }
.t-back { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 6px 8px; border-radius: 8px; color: var(--text-3); font-size: .74rem; font-weight: 650; }
.t-back:hover { color: var(--text); background: var(--surface-2); }
.t-header-divider { flex: none; width: 1px; height: 26px; background: var(--line); }
.t-appbar-title { display: grid; min-width: 0; line-height: 1.15; }
.t-appbar-title .overline { color: var(--text-3); font-size: .6rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.t-appbar-title strong { overflow: hidden; font-size: .9rem; text-overflow: ellipsis; white-space: nowrap; }
.t-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.t-act { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 40px; height: 38px; padding: 0 12px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--text-2); font-size: .78rem; font-weight: 680; transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast); }
.t-act > span:first-child { font-size: 1.05rem; line-height: 1; }
.t-act:hover { border-color: var(--line); background: var(--surface-2); color: var(--text); }
.t-act-primary { background: var(--accent); color: var(--accent-ink); }
.t-act-primary:hover { border-color: var(--accent-strong); background: var(--accent-strong); color: var(--accent-ink); }
.t-act:disabled { opacity: .45; cursor: not-allowed; }
.t-act-icon { padding: 0; }
.t-theme-moon { display: none; }
html[data-theme="light"] .t-theme-sun { display: none; }
html[data-theme="light"] .t-theme-moon { display: inline; }
@media (prefers-color-scheme: light) { html:not([data-theme]) .t-theme-sun { display: none; } html:not([data-theme]) .t-theme-moon { display: inline; } }
.t-areas { position: sticky; top: var(--hh); z-index: 70; display: flex; gap: 2px; height: var(--ah); padding: 0 var(--gut) 0 16px; border-bottom: 1px solid var(--line); background: var(--bg-alt); overflow-x: auto; scrollbar-width: none; }
.t-areas::-webkit-scrollbar { display: none; }
.t-area { display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; border-bottom: 2px solid transparent; color: var(--text-2); font-size: .76rem; font-weight: 650; white-space: nowrap; }
.t-area:hover { color: var(--text); background: var(--surface); }
.t-area[aria-current="page"] { border-bottom-color: var(--accent); color: var(--text); background: var(--accent-wash); }
.t-area-number { color: var(--accent); font: 700 .62rem var(--font-mono); }
.t-area-detail { color: var(--text-3); font-weight: 500; }

/* ---- Área de trabalho --------------------------------------------------- */
.t-workspace { display: grid; grid-template-columns: var(--inputs-w) minmax(0, 1fr); align-items: start; }
.t-inputs { position: sticky; top: calc(var(--hh) + var(--ah)); height: calc(100dvh - var(--hh) - var(--ah)); overflow-y: auto; overscroll-behavior: contain; border-right: 1px solid var(--line); background: var(--bg-alt); scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.t-inputs-head { position: sticky; top: 0; z-index: 5; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 16px 18px 14px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg-alt) 92%, transparent); backdrop-filter: blur(10px); }
.t-inputs-head h2 { margin-top: 3px; font-size: 1.05rem; letter-spacing: -.01em; }
.t-progress { display: grid; justify-items: end; gap: 5px; min-width: 112px; color: var(--text-3); font-size: .66rem; font-weight: 700; text-align: right; }
.t-progress-track { width: 112px; height: 5px; border-radius: 99px; background: var(--line); overflow: hidden; }
.t-progress-fill { display: block; height: 100%; border-radius: 99px; background: var(--teal); transition: width .4s var(--ease-out); }
.t-progress.is-done .t-progress-fill { background: var(--ok); }
.t-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; padding: 10px 18px 0; color: var(--text-3); font-size: .68rem; }
.t-legend span { display: inline-flex; align-items: center; gap: 6px; }
.t-legend i { width: 14px; height: 10px; border-radius: 3px; border: 1px solid var(--line-strong); background: var(--bg); }
.t-legend i.is-calc { border-style: dashed; border-color: var(--accent-line); background: var(--accent-wash); }
.t-inputs-foot { padding: 6px 20px 28px; color: var(--text-3); font-size: .72rem; line-height: 1.6; }
#t-form { display: grid; gap: 10px; padding: 12px; }

/* Grupos */
.g { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: clip; }
.g > summary { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto 18px; align-items: center; gap: 11px; padding: 13px 14px; cursor: pointer; list-style: none; }
.g > summary::-webkit-details-marker { display: none; }
.g > summary:hover { background: var(--surface-2); }
.g-n { display: inline-grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); color: var(--text-2); font: 700 .72rem var(--font-mono); }
.g[open] .g-n { border-color: var(--accent-line); background: var(--accent-wash); color: var(--accent); }
.g-title { display: grid; min-width: 0; font-size: .86rem; font-weight: 720; line-height: 1.25; }
.g-title small { overflow: hidden; color: var(--text-3); font-size: .7rem; font-weight: 450; text-overflow: ellipsis; white-space: nowrap; }
.g-count { color: var(--text-3); font: 600 .66rem var(--font-mono); white-space: nowrap; }
.g-count.is-done { color: var(--ok); }
.g-count.is-bad { color: var(--fail); }
.g-arrow { color: var(--text-3); font-size: 1.1rem; transition: transform var(--t); }
.g[open] .g-arrow { transform: rotate(180deg); }
.g-premise { border-style: dashed; background: repeating-linear-gradient(135deg, var(--surface) 0 12px, color-mix(in srgb, var(--surface-2) 70%, var(--surface)) 12px 13px); }
.g-premise .g-n { border-style: dashed; }
.g-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; padding: 4px 14px 16px; }

/* Campos */
.g-fields > * { min-width: 0; }
.f { display: grid; align-content: end; gap: 5px; min-width: 0; transition: opacity var(--t-fast); }
.f-wide { grid-column: 1 / -1; }
.f-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; min-width: 0; min-height: 18px; }
.f-label { min-width: 0; color: var(--text-2); font-size: .72rem; font-weight: 650; line-height: 1.25; }
.f-code { flex: none; overflow: hidden; padding: 1px 6px; border-radius: 5px; background: var(--teal-wash); color: var(--teal); font: 600 .6rem/1.6 var(--font-mono); text-overflow: ellipsis; white-space: nowrap; }
.f-box { position: relative; display: flex; align-items: center; }
.f-box input, .f-box select { width: 100%; min-width: 0; height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg); color: var(--text); font: 600 .95rem var(--font-sans); font-variant-numeric: tabular-nums; outline: none; transition: border-color var(--t-fast), box-shadow var(--t-fast); appearance: none; -webkit-appearance: none; }
.f-box select { padding-right: 34px; font-size: .84rem; cursor: pointer; }
.f-box select option { background: var(--surface); color: var(--text); }
.f-box.has-unit input { padding-right: calc(16px + var(--unit-w, 3ch)); }
.f-unit { position: absolute; right: 11px; color: var(--text-3); font-size: .74rem; font-weight: 600; pointer-events: none; }
.f-chev { position: absolute; right: 12px; color: var(--text-3); pointer-events: none; }
.f-box input::placeholder { color: var(--text-3); font-weight: 450; font-size: .8rem; }
.f-box input:hover, .f-box select:hover { border-color: var(--text-3); }
.f-box input:focus, .f-box select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.f.is-empty .f-box input { border-style: dashed; }
.f.is-bad .f-box input, .f.is-bad .f-box select { border-color: var(--fail); box-shadow: 0 0 0 3px var(--fail-bg); }
.f.is-off { opacity: .48; }
.f-foot { display: grid; gap: 3px; min-width: 0; }
.f-foot:empty, .f-foot:not(:has(> :not([hidden]))) { display: none; }
.f-help { color: var(--text-3); font-size: .66rem; line-height: 1.4; }
/* Alinha rótulo, campo e ajuda entre as duas colunas */
@supports (grid-template-rows: subgrid) {
  .g-fields > .f { grid-row: span 3; grid-template-rows: subgrid; row-gap: 5px; align-content: stretch; }
  .g-fields > .f > .f-top { align-self: end; }
  .g-fields > .f > .f-foot { display: grid; align-self: start; }
}
.f-err { color: var(--fail); font-size: .68rem; font-weight: 650; line-height: 1.35; }

/* Valor calculado dentro do formulário (consequência dos dados acima) */
.f-calc { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; padding: 10px 12px; border: 1px dashed var(--accent-line); border-radius: 10px; background: var(--accent-wash); }
.f-calc-label { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--text-2); font-size: .72rem; font-weight: 650; }
.f-calc-tag { flex: none; padding: 1px 6px; border-radius: 5px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); font: 700 .56rem/1.6 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.f-calc-value { color: var(--text); font-size: 1.02rem; font-weight: 780; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.f-calc-note { grid-column: 1 / -1; color: var(--text-3); font: 500 .66rem/1.45 var(--font-mono); overflow-wrap: anywhere; }
.f-calc.is-final { border-style: solid; border-color: var(--accent); }
.f-calc.is-final .f-calc-value { color: var(--accent); font-size: 1.2rem; }

/* ---- Resultados --------------------------------------------------------- */
.t-results { min-width: 0; padding: 0 var(--gut) 80px; }
.t-intro { max-width: 860px; padding: 28px 0 6px; }
.t-intro h1 { margin-top: 8px; font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.05; }
.t-intro h1 em { font-family: var(--font-serif); font-weight: 400; color: var(--accent); }
.t-intro p:last-child { max-width: 72ch; margin-top: 10px; color: var(--text-2); font-size: .86rem; line-height: 1.65; }
.t-alert { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; margin: 12px 0; padding: 14px 16px; border: 1px solid var(--line); border-left-width: 3px; border-radius: 12px; background: var(--surface); }
.t-alert-mark { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid currentColor; font-size: .72rem; font-weight: 850; }
.t-alert strong { font-size: .84rem; }
.t-alert p, .t-alert li { color: var(--text-2); font-size: .78rem; line-height: 1.55; }
.t-alert ul { margin: 6px 0 0; padding-left: 18px; }
.t-alert a { color: var(--text); text-decoration: underline; text-decoration-color: var(--fail-line); text-underline-offset: 2px; }
.t-alert-fail { border-color: var(--fail-line); border-left-color: var(--fail); background: var(--fail-bg); }
.t-alert-fail .t-alert-mark, .t-alert-fail > strong { color: var(--fail); }
#t-error { display: block; margin-top: 18px; }
#t-error[hidden] { display: none; }
.t-alert-warn { border-left-color: var(--warn); background: var(--warn-bg); }
.t-alert-warn .t-alert-mark { color: var(--warn); }
.t-alert-info { border-left-color: var(--teal); }
.t-alert-info .t-alert-mark { color: var(--teal); }
#t-output { min-width: 0; transition: opacity var(--t); }
#t-output.is-stale { opacity: .35; filter: saturate(.3); pointer-events: none; }

/* Destaque: área mínima */
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 8px 28px; margin: 18px 0 14px; padding: 24px 26px 22px; border: 1px solid var(--accent-line); border-radius: 20px; overflow: hidden;
  background: radial-gradient(120% 120% at 0% 0%, var(--accent-wash), transparent 55%), var(--surface); box-shadow: var(--shadow); }
.hero-main { min-width: 0; }
.hero-title { margin-top: 8px; font-size: clamp(2.4rem, 5.4vw, 4rem); font-weight: 800; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.hero-title small { color: var(--text-2); font-size: .42em; font-weight: 650; letter-spacing: -.01em; }
.hero-split { margin-top: 6px; color: var(--text-2); font-size: .95rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.hero-split b { color: var(--text); }
.hero-sub { margin-top: 10px; color: var(--text-2); font-size: .82rem; line-height: 1.55; }
.hero-sub b { color: var(--text); font-weight: 650; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-size: .72rem; font-weight: 650; white-space: nowrap; }
.chip b { color: var(--text); font-weight: 750; font-variant-numeric: tabular-nums; }
.chip-ok { border-color: var(--ok-line); background: var(--ok-bg); color: var(--ok); }
.chip-warn { border-color: var(--warn-line); background: var(--warn-bg); color: var(--warn); }
.chip-fail { border-color: var(--fail-line); background: var(--fail-bg); color: var(--fail); }
.chip-info { border-color: color-mix(in srgb, var(--teal) 40%, transparent); background: var(--teal-wash); color: var(--teal); }
.hero-figure { display: grid; align-content: center; min-width: 0; }
.hero-figure figure { margin: 0; }
.hero-figure figcaption { margin-top: 4px; color: var(--text-3); font-size: .68rem; line-height: 1.5; }
.hero-kpis { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 14px 0 0; }
.kpi { min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.kpi dt { display: flex; align-items: center; gap: 6px; color: var(--text-3); font-size: .62rem; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.kpi dd { margin: 4px 0 0; font-size: 1.12rem; font-weight: 760; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi dd small { margin-left: 3px; color: var(--text-3); font-size: .7rem; font-weight: 600; letter-spacing: 0; }
.kpi p { margin-top: 2px; color: var(--text-3); font-size: .66rem; }
.kpi-tag { padding: 0 5px; border-radius: 4px; font: 700 .52rem/1.6 var(--font-mono); letter-spacing: .04em; }
.kpi-tag.is-def { background: var(--surface-3); color: var(--text-2); }
.kpi-tag.is-calc { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.kpi-bad { border-color: var(--fail-line); background: var(--fail-bg); }
.kpi-bad dd { color: var(--fail); }
.kpi-warn { border-color: var(--warn-line); }
.is-updated { animation: t-flash .9s var(--ease-out); }
@keyframes t-flash { from { background-color: var(--accent-wash); } to { background-color: transparent; } }

/* Perfil de temperaturas */
.pf-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 4px; color: var(--text-3); font-size: .7rem; }
.pf-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pf-legend i { display: inline-block; width: 16px; height: 3px; border-radius: 2px; }
.pf-wrap { position: relative; touch-action: pan-y; }
.pf { display: block; width: 100%; height: auto; overflow: visible; }
.pf-grid { stroke: var(--c-grid); stroke-width: 1; }
.pf-axis { fill: var(--c-ink-3); font: 500 10px var(--font-mono); }
.pf-lab { font: 700 11px var(--font-sans); fill: var(--c-ink-2); paint-order: stroke; stroke: var(--c-surface); stroke-width: 3px; stroke-linejoin: round; }
.pf-air { fill: none; stroke: var(--air-hot); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.pf-water { fill: none; stroke: var(--water); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.pf-band { fill: var(--air-hot); fill-opacity: .1; }
.pf-end-air { fill: var(--air-hot); stroke: var(--c-surface); stroke-width: 2; }
.pf-end-water { fill: var(--water); stroke: var(--c-surface); stroke-width: 2; }
.pf-wrap:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 8px; }
.pf-cross { stroke: var(--c-ink-3); stroke-width: 1; stroke-dasharray: 3 3; }
.pf-dot-air { fill: var(--air-hot); stroke: var(--surface); stroke-width: 2; }
.pf-dot-water { fill: var(--water); stroke: var(--surface); stroke-width: 2; }

/* Sequência do projeto: definido → calculado */
.seqflow { margin: 12px 0; padding: 13px 15px 15px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.seqflow-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 9px; }
.seqflow-head h3 { font-size: .92rem; }
.seqflow-head p { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; color: var(--text-3); font-size: .7rem; }
.seqflow-head p span { display: inline-flex; align-items: center; gap: 6px; }
.seq-key { width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--line-strong); background: var(--surface-2); }
.seq-key.is-calc { border: 1px dashed var(--accent-line); background: var(--accent-wash); }
.seq { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 14px; margin: 0; padding: 0; list-style: none; }
.seq-stage { position: relative; display: flex; flex-direction: column; gap: 7px; min-width: 0; padding: 10px 11px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.seq-stage + .seq-stage::before { content: "→"; position: absolute; top: 13px; left: -12px; color: var(--text-3); font-size: .75rem; line-height: 1; }
.seq-stage > strong { display: flex; align-items: center; gap: 7px; font-size: .77rem; }
.seq-n { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--surface-2); color: var(--accent); font: 700 .6rem var(--font-mono); }
.seq-dl { display: grid; margin: 0; }
.seq-row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 4px; min-width: 0; padding: 4px 0; border-top: 1px solid var(--line); }
.seq-row:first-child { border-top: 0; }
.seq-row dt { color: var(--teal); font: 600 .65rem var(--font-mono); white-space: nowrap; }
.seq-row dd { min-width: 0; margin: 0; font-size: .77rem; font-weight: 750; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.seq-row.is-calc:not(.is-final) { padding-left: 6px; border-left: 1px dashed var(--accent-line); }
.seq-row.is-calc dt { color: var(--accent); }
.seq-row.is-ref dt { color: var(--text-3); }
.seq-row.is-final { margin: 3px -5px 0; padding: 5px; border: 1px solid var(--accent-line); border-radius: 7px; background: var(--accent-wash); }
.seq-row.is-final dd { color: var(--accent); font-size: .81rem; }
.seq-detail { margin: auto 0 0; padding-top: 7px; border-top: 1px solid var(--line); color: var(--text-3); font-size: .64rem; line-height: 1.35; overflow-wrap: anywhere; }

/* Orçamentos: calor e resistências */
.budgets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 14px 0; }
.budget { min-width: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.budget-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.budget-head h3 { font-size: .92rem; }
.budget-head span { color: var(--text-3); font-size: .74rem; font-variant-numeric: tabular-nums; }
.budget-bar { display: flex; gap: 2px; height: 22px; margin: 12px 0 10px; }
.budget-seg { min-width: 3px; border-radius: 0; transition: flex-basis .45s var(--ease-out); cursor: default; }
.budget-seg:first-child { border-radius: 5px 0 0 5px; }
.budget-seg:last-child { border-radius: 0 5px 5px 0; }
.budget-seg:only-child { border-radius: 5px; }
.budget-seg:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.budget-legend { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.budget-legend li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto 48px; align-items: center; gap: 9px; padding: 4px 0; font-size: .74rem; }
.budget-legend .sw { width: 12px; height: 12px; border-radius: 3px; }
.budget-legend .lbl { color: var(--text-2); }
.budget-legend .lbl em { margin-left: 6px; color: var(--text-3); font-size: .66rem; font-style: normal; }
.budget-legend .val { color: var(--text); font-weight: 680; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.budget-legend .pct { color: var(--text-3); font-variant-numeric: tabular-nums; text-align: right; }
.budget-legend li.is-total { margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--line); font-weight: 700; }
.budget-legend li.is-total .lbl { color: var(--text); }
.budget-note { margin-top: 8px; color: var(--text-3); font-size: .7rem; line-height: 1.5; }
.seg-air { background: var(--air-hot); }
.seg-air-2 { background: color-mix(in srgb, var(--air-hot) 58%, var(--c-surface)); }
.seg-air-3 { background: color-mix(in srgb, var(--air-hot) 32%, var(--c-surface)); }
.seg-oil { background: repeating-linear-gradient(135deg, transparent 0 4px, color-mix(in srgb, var(--c-deemph) 85%, transparent) 4px 6px); box-shadow: inset 0 0 0 1px var(--line-strong); }
.seg-metal { background: var(--c-deemph); }
.seg-metal-2 { background: var(--c-deemph-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
.seg-water { background: var(--water); }
.seg-water-2 { background: color-mix(in srgb, var(--water) 48%, var(--c-surface)); }

/* O trocador por dentro: vistas, balões e lista de itens */
.hxbox { margin: 14px 0; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); overflow: hidden; }
.hxbox-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 18px; padding: 16px 18px 14px; border-bottom: 1px solid var(--line); }
.hxbox-head h3 { font-size: 1.05rem; letter-spacing: -.02em; }
.hxbox-head p { max-width: 66ch; margin-top: 4px; color: var(--text-2); font-size: .76rem; line-height: 1.55; }
.hxbox-head p b { color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }
.hx-tabs { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: var(--bg); }
.hx-tab { min-height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--text-3); font-size: .74rem; font-weight: 700; white-space: nowrap; transition: background var(--t-fast), color var(--t-fast); }
.hx-tab:hover { color: var(--text); }
.hx-tab-s { display: none; }
.hx-tab[aria-selected="true"] { background: var(--surface-2); color: var(--text); box-shadow: var(--shadow-s), inset 0 -2px 0 var(--accent); }
.hx-stage { position: relative; padding: 10px 14px 0;
  background-color: var(--c-surface);
  background-image: linear-gradient(color-mix(in srgb, var(--c-grid) 55%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--c-grid) 55%, transparent) 1px, transparent 1px);
  background-size: 24px 24px; background-position: -1px -1px; }
.hx-pane { margin: 0; }
.hx-pane-title { display: none; }
.hx-scroll { overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.hx-caption { max-width: 92ch; padding: 6px 4px 12px; color: var(--text-3); font-size: .72rem; line-height: 1.55; }
.hx-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px 18px; border-top: 1px solid var(--line); color: var(--text-3); font-size: .7rem; }
.hx-legend span { display: inline-flex; align-items: center; gap: 7px; }
.hx-legend .ln { width: 18px; height: 3px; border-radius: 2px; }
.hx-legend .sw { width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--line-strong); }
.hx-legend .tg { width: 18px; height: 11px; border-radius: 6px; border: 1.6px dashed var(--accent); }
.hx-parts { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 2px 12px; margin: 0; padding: 10px 12px 14px; border-top: 1px solid var(--line); list-style: none; }
.hx-item { display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: start; gap: 10px; width: 100%; padding: 8px 10px; border: 1px solid transparent; border-radius: 11px; background: transparent; color: var(--text); text-align: left; transition: background var(--t-fast), border-color var(--t-fast); }
.hx-item:hover, .hx-parts li.is-hot .hx-item { border-color: var(--accent-line); background: var(--accent-wash); }
.hx-item-n { display: inline-grid; place-items: center; width: 24px; height: 24px; border: 1.2px solid var(--text-2); border-radius: 50%; background: var(--c-surface); font: 700 .66rem var(--font-mono); }
.hx-parts li.is-hot .hx-item-n { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.hx-item-t { display: grid; gap: 1px; min-width: 0; }
.hx-item-t strong { font-size: .8rem; line-height: 1.3; }
.hx-item-t small { color: var(--text-3); font-size: .7rem; line-height: 1.4; font-variant-numeric: tabular-nums; }

/* Desenhos (tela): materiais e correntes com os tokens do site */
.hxv { display: block; width: 100%; height: auto; max-height: 540px; overflow: visible;
  --hx-steel: color-mix(in srgb, var(--text-3) 18%, var(--c-surface));
  --hx-steel-2: color-mix(in srgb, var(--text-3) 34%, var(--c-surface));
  --hx-copper: color-mix(in srgb, var(--accent) 72%, var(--c-surface));
  --hx-copper-line: color-mix(in srgb, var(--accent) 88%, var(--text));
  --hx-alu: color-mix(in srgb, var(--text-2) 20%, var(--c-surface));
  --hx-alu-line: color-mix(in srgb, var(--text-2) 46%, var(--c-surface));
  --hx-water-wash: color-mix(in srgb, var(--water) 17%, var(--c-surface)); }
.hxv text { font-family: var(--font-sans); fill: var(--text); }
.hxv .hx-t { font-size: 11px; font-weight: 560; }
.hxv .hx-t2 { font-size: 10px; fill: var(--text-3); }
.hxv .hx-strong { font-weight: 760; }
.hxv .hx-ttl { font-size: 11.5px; font-weight: 760; fill: var(--text-2); }
.hxv .hx-on, .hxv .hx-on-band { paint-order: stroke; stroke: var(--c-surface); stroke-width: 3.2px; stroke-linejoin: round; }
.hxv .hx-on-band { font-size: 10.5px; }
.hxv .hx-dim-t { font: 600 10.5px var(--font-mono); fill: var(--text); paint-order: stroke; stroke: var(--c-surface); stroke-width: 3.2px; stroke-linejoin: round; }
.hxv .hx-bal-t { font: 700 10px var(--font-mono); fill: var(--text); }
.hxv .hx-tag-t { font: 700 10.5px var(--font-mono); fill: var(--text); }
.hxv .hx-cut-t { font: 800 12px var(--font-mono); fill: var(--text); }
.hxv .hx-gap { fill: var(--surface-2); }
.hxv .hx-zone-hot { fill: var(--air-hot); fill-opacity: .13; }
.hxv .hx-zone-cold { fill: var(--air-cold); fill-opacity: .1; }
.hxv .hx-wall { fill: none; stroke: var(--line-strong); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.hxv .hx-ground { stroke: var(--line-strong); stroke-width: 1.5; }
.hxv .hx-steel { fill: var(--hx-steel); stroke: var(--line-strong); stroke-width: 1; }
.hxv .hx-steel-2 { fill: var(--hx-steel-2); stroke: var(--line-strong); stroke-width: 1; }
.hxv .hx-steel-cut { fill: var(--hx-steel); stroke: var(--line-strong); stroke-width: 1; }
.hxv .hx-hatch { stroke: var(--line-strong); stroke-width: .8; }
.hxv .hx-hatch-cu { stroke: var(--hx-copper); stroke-width: 1; }
.hxv .hx-sheet { stroke: var(--line-strong); stroke-width: 2; }
.hxv .hx-face-bg, .hxv .hx-fin-bg { fill: var(--hx-alu); }
.hxv .hx-fin-l { stroke: var(--hx-alu-line); stroke-width: .7; }
.hxv .hx-tube-l { stroke: var(--hx-copper); stroke-width: 1.3; }
.hxv .hx-outline { fill: none; stroke: var(--line-strong); stroke-width: 1.2; }
.hxv .hx-airband { stroke: none; }
.hxv .hx-fin { fill: var(--hx-alu); stroke: var(--hx-alu-line); stroke-width: .8; }
.hxv .hx-fin-root { fill: none; stroke: var(--hx-alu-line); stroke-width: .8; stroke-dasharray: 2 2; }
.hxv .hx-tube { fill: var(--hx-copper); stroke: var(--hx-copper-line); stroke-width: .8; }
.hxv .hx-bore { fill: var(--hx-water-wash); stroke: none; }
.hxv .hx-cu-sec { fill: color-mix(in srgb, var(--accent) 22%, var(--c-surface)); stroke: var(--hx-copper); stroke-width: 1; }
.hxv .hx-fin-sec { fill: var(--hx-alu-line); stroke: none; }
.hxv .hx-cu { fill: var(--hx-copper); stroke: var(--hx-copper-line); stroke-width: .8; }
.hxv .hx-core { fill: var(--hx-steel-2); stroke: var(--line-strong); stroke-width: 1; }
.hxv .hx-rotor { fill: var(--hx-steel); stroke: var(--line-strong); stroke-width: 1; }
.hxv .hx-shaft { fill: var(--c-deemph); }
.hxv .hx-bearing { fill: var(--hx-steel-2); stroke: var(--line-strong); stroke-width: 1; }
.hxv .hx-fan { fill: var(--text-2); }
.hxv .hx-pipe { fill: var(--hx-steel); stroke: var(--water); stroke-width: 1.2; }
.hxv .hx-flange { fill: var(--hx-steel-2); stroke: var(--line-strong); stroke-width: 1; }
.hxv .hx-flange-l { stroke: var(--line-strong); stroke-width: .8; }
.hxv .hx-tray { fill: color-mix(in srgb, var(--water) 12%, transparent); stroke: var(--line-strong); stroke-width: 1.4; stroke-linejoin: round; }
.hxv .hx-drain { stroke: var(--water); stroke-width: 1.4; }
.hxv .hx-hidden { stroke: var(--text-2); stroke-width: 1; stroke-dasharray: 4 3; }
.hxv .hx-center { stroke: var(--text-3); stroke-width: .7; stroke-dasharray: 10 3 2 3; }
.hxv .hx-cut { stroke: var(--text-2); stroke-width: 1; stroke-dasharray: 12 3 2 3; }
.hxv .hx-cut-a { stroke: var(--text-2); stroke-width: 2.4; }
.hxv .hx-dim, .hxv .hx-ext { stroke: var(--text-3); stroke-width: .8; }
.hxv .hx-ah { fill: var(--text-3); }
.hxv .hx-air, .hxv .hx-airflow { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.hxv .hx-hot { stroke: var(--air-hot); }
.hxv .hx-cold { stroke: var(--air-cold); }
.hxv .hx-water { stroke: var(--water); }
.hxv .hx-oil { stroke: var(--text-3); stroke-width: 1.4; stroke-dasharray: 3 3; }
.hxv .hx-thin { stroke-width: 1.4; }
.hxv .hx-ah-hot { fill: var(--air-hot); }
.hxv .hx-ah-cold { fill: var(--air-cold); }
.hxv .hx-ah-water { fill: var(--water); }
.hxv .hx-ah-oil { fill: var(--text-3); }
.hxv .hx-ox { fill: none; stroke-width: 1.4; }
.hxv .hx-ox-hot { stroke: var(--air-hot); }
.hxv .hx-tag { fill: var(--c-surface); stroke-width: 1.6; }
.hxv .hx-tag-hot { stroke: var(--air-hot); }
.hxv .hx-tag-cold { stroke: var(--air-cold); }
.hxv .hx-tag-water { stroke: var(--water); }
.hxv .hx-tag-calc { stroke: var(--accent); stroke-dasharray: 3 2; }
.hxv .hx-bal-c { fill: var(--c-surface); stroke: var(--text-2); stroke-width: 1.2; }
.hxv .hx-leader { stroke: var(--text-3); stroke-width: .9; }
.hxv .hx-bal-dot { fill: var(--text-3); }
.hxv .hx-band { fill: var(--water); }
.hxv .hx-pass-l { stroke: var(--c-surface); stroke-width: 1.5; }
.hxv .hx-divider { stroke: var(--text-2); stroke-width: 3; stroke-linecap: round; }
.hxv .hx-turn { fill: none; stroke: var(--water); stroke-width: 1.6; stroke-dasharray: 3 3; }
.hxv .hx-hole { fill: var(--c-surface); stroke: var(--hx-copper); stroke-width: .8; }
.hxv .hx-break { fill: none; stroke: var(--text-3); stroke-width: 1; }
.hxv .hx-free { stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; }
.hxv .hx-off { opacity: .18; }
.hxv .hx-stop-hot { stop-color: var(--air-hot); stop-opacity: .2; }
.hxv .hx-stop-cold { stop-color: var(--air-cold); stop-opacity: .2; }
.hxv .hx-stop-hot-s { stop-color: var(--air-hot); }
.hxv .hx-stop-cold-s { stop-color: var(--air-cold); }
.hxv .hx-flow { stroke-dasharray: 10 6; animation: hx-dash 1.4s linear infinite; }
.hxv .hx-thin.hx-flow { stroke-dasharray: 4 4; }
@keyframes hx-dash { to { stroke-dashoffset: -16; } }
/* destaque de um item: o resto do desenho recua */
.hxv .hx-part, .hxv .hx-bal { transition: opacity var(--t-fast); }
.hxv .hx-bal { cursor: pointer; }
.hxv.has-hot .hx-part:not(.is-hot), .hxv.has-hot .hx-bal:not(.is-hot) { opacity: .2; }
.hxv .hx-part.is-hot :is(rect, path, circle, line) { stroke: var(--accent); }
.hxv .hx-bal.is-hot .hx-bal-c { fill: var(--accent); stroke: var(--accent); }
.hxv .hx-bal.is-hot .hx-bal-t { fill: var(--accent-ink); }
.hxv .hx-bal.is-hot .hx-leader { stroke: var(--accent); stroke-width: 1.4; }

.hx-legend .sw.is-copper { background: color-mix(in srgb, var(--accent) 72%, var(--c-surface)); }
.hx-legend .sw.is-alu { background: color-mix(in srgb, var(--text-2) 20%, var(--c-surface)); }
.hx-legend .sw.is-steel { background: color-mix(in srgb, var(--text-3) 34%, var(--c-surface)); }

/* Figura do tubo aletado no formulário: a cota do campo em foco acende */
.f-figure { grid-column: 1 / -1; padding: 8px 8px 2px; border: 1px dashed var(--line-strong); border-radius: 12px; background: var(--c-surface); }
.f-figure .hxv { max-height: 168px; }
.f-figure p { padding: 0 4px 4px; color: var(--text-3); font-size: .64rem; }
.hxv.ff [data-key] { transition: opacity var(--t-fast); }
.hxv.ff.has-focus [data-key]:not(.is-focus) { opacity: .22; }
.hxv.ff .is-focus :is(.hx-dim, .hx-ext, .hx-leader) { stroke: var(--accent); stroke-width: 1.6; }
.hxv.ff .is-focus .hx-ah { fill: var(--accent); }
.hxv.ff .is-focus .hx-dim-t { fill: var(--accent); }
.hxv.ff .is-focus :is(.hx-fin, .hx-tube, .hx-bore, .hx-fin-sec, .hx-cu-sec) { stroke: var(--accent); stroke-width: 1.8; }
.hxv.ff .ff-contact-l { stroke: transparent; stroke-width: 3; }
.hxv.ff .is-focus .ff-contact-l { stroke: var(--accent); }

/* Gráfico vazão de água × área */
.chart { margin: 0; padding: 14px 16px 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.chart .pf { max-height: 300px; }
.chart figcaption { margin-top: 6px; color: var(--text-3); font-size: .72rem; line-height: 1.55; }
.fc-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.fc-base { stroke: var(--c-axis); stroke-width: 1; }
.fc-void { fill: var(--c-deemph-2); fill-opacity: .28; }
.fc-limit { stroke: var(--c-ink-3); stroke-width: 1; stroke-dasharray: 3 3; }
.fc-guide { stroke: var(--accent); stroke-width: 1; stroke-dasharray: 2 3; }
.fc-cur, .fc-hover { fill: var(--accent); stroke: var(--c-surface); stroke-width: 2; }
.chart-table { margin-top: 8px; }
.chart-table summary { width: max-content; color: var(--accent); font-size: .74rem; font-weight: 650; cursor: pointer; }
.chart-table .tbl-wrap { margin-top: 8px; }

/* Folha de desenho A3 (mesmo comportamento do laboratório elétrico) */
.sheet { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; }
.sheet-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.sheet-btn { display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--bg); color: var(--text); font-size: .95rem; font-weight: 700; }
.sheet-btn:hover { border-color: var(--accent-line); background: var(--accent-wash); }
.sheet-btn-text { font-size: .76rem; }
.sheet-btn-primary { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.sheet-btn-primary:hover { background: var(--accent-strong); color: var(--accent-ink); }
.sheet-zoom { min-width: 48px; color: var(--text-3); font: 600 .74rem var(--font-mono); text-align: center; }
.sheet-spacer { flex: 1; }
.sheet-view { max-height: 78vh; overflow: auto; padding: 14px; background: repeating-linear-gradient(45deg, var(--surface-2) 0 10px, var(--surface) 10px 20px); overscroll-behavior: contain; touch-action: pan-x pan-y pinch-zoom; }
.sheet-paper { width: 100%; margin: 0 auto; box-shadow: 0 6px 24px rgba(0, 0, 0, .25); }
.sheet-paper svg { display: block; width: 100%; height: auto; background: #fff; }
.sheet-note { margin-top: 10px; }

/* Dica de gráfico com chave de linha */
.tip .tip-row { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.tip-key { flex: none; width: 12px; height: 3px; border-radius: 2px; }
.tip strong { font-variant-numeric: tabular-nums; }

/* Navegação dos passos */
.stepnav { position: sticky; top: calc(var(--hh) + var(--ah)); z-index: 40; display: flex; gap: 4px; overflow-x: auto; margin: 22px calc(-1 * var(--gut)) 4px; padding: 9px var(--gut); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); scrollbar-width: none; }
.stepnav::-webkit-scrollbar { display: none; }
.stepnav a { display: inline-flex; align-items: center; gap: 7px; flex: none; padding: 7px 12px; border: 1px solid transparent; border-radius: 999px; color: var(--text-2); font-size: .76rem; font-weight: 650; white-space: nowrap; transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast); }
.stepnav a:hover { background: var(--surface); color: var(--text); }
.stepnav a.is-active { border-color: var(--accent-line); background: var(--accent-wash); color: var(--text); }
.stepnav-n { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-2); color: var(--accent); font: 700 .64rem var(--font-mono); }

/* Passos do cálculo */
.sec { position: relative; margin: 18px 0; padding-left: 52px; scroll-margin-top: calc(var(--hh) + var(--ah) + 64px); }
.sec::before { content: ""; position: absolute; top: 46px; bottom: -22px; left: 17px; width: 2px; background: linear-gradient(var(--line-strong), var(--line)); }
.sec:last-of-type::before { display: none; }
.sec > details > summary { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 16px; padding: 4px 0 12px; cursor: pointer; list-style: none; }
.sec > details > summary::-webkit-details-marker { display: none; }
.sec-n { position: absolute; top: 2px; left: -52px; display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--accent-line); border-radius: 11px; background: var(--bg); color: var(--accent); font: 800 .9rem var(--font-mono); box-shadow: 0 0 0 5px var(--bg); }
.sec h3 { font-size: 1.12rem; letter-spacing: -.02em; }
.sec-intro { grid-column: 1; max-width: 70ch; color: var(--text-2); font-size: .79rem; line-height: 1.55; }
.sec-key { grid-column: 2; grid-row: 1 / span 2; justify-self: end; display: grid; justify-items: end; gap: 2px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.sec-key small { color: var(--text-3); font-size: .6rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.sec-key b { font-size: .98rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sec details:not([open]) > summary { padding-bottom: 4px; }
.sec details:not([open]) .sec-intro::after { content: " · mostrar"; color: var(--accent); font-weight: 650; }
.steps { display: grid; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; }
.step { display: grid; grid-template-columns: minmax(150px, .75fr) minmax(0, 2fr); gap: 4px 20px; padding: 14px 18px; border-top: 1px solid var(--line); }
.step:first-child { border-top: 0; }
.step-what strong { display: block; font-size: .83rem; line-height: 1.35; }
.step-what small { display: block; margin-top: 3px; color: var(--text-3); font-size: .65rem; line-height: 1.35; }
.step-see { display: inline-flex; align-items: center; gap: 6px; margin-top: 7px; padding: 2px 8px 2px 3px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--text-3); font-size: .64rem; font-weight: 650; transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast); }
.step-see:hover { border-color: var(--accent-line); background: var(--accent-wash); color: var(--text); }
.step-see-n { display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 3px; border: 1px solid var(--text-3); border-radius: 999px; font: 700 .58rem var(--font-mono); }
.hxbox { scroll-margin-top: calc(var(--hh) + var(--ah) + 12px); }
.step-math { display: grid; gap: 4px; min-width: 0; }
.step-math code { display: block; overflow-wrap: anywhere; font: .78rem/1.55 var(--font-mono); }
.step-formula { color: var(--teal); }
.step-subst { color: var(--text-2); }
.step-res { display: inline-flex; align-items: baseline; gap: 4px; margin-left: 4px; padding: 1px 8px; border-radius: 7px; background: var(--accent-wash); color: var(--text); font: 760 .9rem var(--font-sans); font-variant-numeric: tabular-nums; white-space: nowrap; }
.step-note { grid-column: 2; color: var(--text-3); font-size: .72rem; line-height: 1.5; }
.sub-h { margin: 18px 0 8px; color: var(--text-3); font-size: .64rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.sec .tbl-wrap { margin-top: 8px; }
.tbl td.dim { color: var(--text-3); white-space: normal; min-width: 200px; }
.tbl.arr td:first-child { white-space: normal; min-width: 180px; }

/* Folha de dados para o fornecedor */
.tbl.rfq { min-width: 660px; }
.tbl.rfq td, .tbl.rfq th { text-align: left; white-space: normal; vertical-align: top; }
.tbl.rfq td { font-size: .78rem; }
.tbl.rfq td:first-child { color: var(--text-2); }
.tbl.rfq td:nth-child(2) { color: var(--text-3); font: 500 .7rem/1.6 var(--font-mono); white-space: nowrap; }
.tbl.rfq tr.sel td { font-weight: 700; }
.rfq-req { display: grid; gap: 6px; margin: 10px 0 0; padding-left: 20px; color: var(--text-2); font-size: .78rem; line-height: 1.55; }
.rfq-req b { color: var(--text); }
.summary-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.btn-soft { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--text); font-size: .78rem; font-weight: 700; }
.btn-soft:hover { border-color: var(--accent-line); background: var(--accent-wash); }

/* Verificações */
.checks { display: grid; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; }
.check { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 4px 16px; align-items: start; padding: 12px 16px; border-top: 1px solid var(--line); }
.check:first-child { border-top: 0; }
.check .chip { justify-self: start; }
.check strong { display: block; font-size: .82rem; }
.check p { margin-top: 2px; color: var(--text-2); font-size: .76rem; line-height: 1.5; }

/* Dica e aviso */
.tip { position: fixed; z-index: 400; max-width: 260px; padding: 8px 10px; border-radius: 9px; background: var(--text); color: var(--bg); box-shadow: var(--shadow-pop); font-size: .72rem; line-height: 1.4; pointer-events: none; }
.tip b { display: block; }
.tip span { display: block; font-variant-numeric: tabular-nums; }
.t-toast { position: fixed; left: 50%; bottom: calc(24px + var(--mb)); z-index: 300; transform: translateX(-50%); padding: 10px 16px; border-radius: 12px; background: var(--text); color: var(--bg); box-shadow: var(--shadow-pop); font-size: .8rem; font-weight: 650; }

/* Barra inferior (celular) */
.t-mobilebar, .t-peek, .only-mobile { display: none; }

/* ---- Responsivo --------------------------------------------------------- */
@media (max-width: 1440px) { .seq { grid-template-columns: repeat(2, minmax(0, 1fr)); } .seq-stage:nth-child(3)::before { display: none; } }
@media (max-width: 1280px) { :root { --inputs-w: 370px; } .hero { grid-template-columns: minmax(0, 1fr); } .hero-figure { max-width: 560px; } }
@media (max-width: 1100px) { .t-act-label { display: none; } .t-act { padding: 0 10px; } .hero-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1050px) {
  :root { --hh: 54px; --ah: 38px; --mb: calc(62px + env(safe-area-inset-bottom)); }
  body.thermal-app { padding-bottom: var(--mb); }
  .t-appbar-title, .t-header-divider, .t-back-label { display: none; }
  .t-areas { padding-inline: 8px; }
  .t-area { flex: 1; justify-content: center; padding-inline: 6px; }
  .t-workspace { display: block; }
  .t-inputs { position: static; height: auto; overflow: visible; border-right: 0; background: transparent; }
  .t-inputs-head { position: sticky; top: calc(var(--hh) + var(--ah)); padding: 14px var(--gut) 12px; background: color-mix(in srgb, var(--bg) 92%, transparent); }
  .t-legend { padding-inline: var(--gut); }
  #t-form { padding: 12px var(--gut); }
  .t-inputs-foot { padding-inline: var(--gut); padding-bottom: 90px; }
  .t-workspace[data-view="dados"] .t-results, .t-workspace[data-view="resultado"] .t-inputs { display: none; }
  .t-mobilebar { position: fixed; right: 0; bottom: 0; left: 0; z-index: 90; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg-alt) 92%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
  .t-mobilebar button { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--text-2); font-size: .84rem; font-weight: 720; }
  .t-mobilebar button[aria-pressed="true"] { border-color: var(--accent-line); background: var(--accent-wash); color: var(--text); }
  .t-mb-icon { font-size: 1rem; }
  .t-mb-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--fail); color: #fff; font-size: .66rem; font-weight: 800; line-height: 20px; }
  .t-peek:not([hidden]) { position: fixed; right: 12px; bottom: calc(var(--mb) + 10px); left: 12px; z-index: 85; display: block; }
  .t-peek button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 50px; padding: 0 16px; border: 1px solid var(--accent-line); border-radius: 14px; background: color-mix(in srgb, var(--surface) 94%, transparent); box-shadow: var(--shadow-pop); backdrop-filter: blur(12px); color: var(--text); text-align: left; }
  .t-peek-label { color: var(--accent); font-size: .62rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
  .t-peek strong { flex: 1; min-width: 0; overflow: hidden; font-size: .9rem; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
  .t-peek.is-bad strong { color: var(--fail); }
  .t-peek-go { color: var(--accent); font-size: 1.1rem; }
  .t-intro { padding-top: 20px; }
  .budgets { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .hero { padding: 20px 18px 18px; border-radius: 18px; }
  .hxbox-head { padding: 14px; }
  .hx-tabs { display: flex; width: 100%; }
  .hx-tab { flex: 1 1 0; padding: 0 6px; }
  .hx-tab-l { display: none; }
  .hx-tab-s { display: inline; }
  .hx-stage { padding: 8px 8px 0; }
  .hx-scroll .hxv { min-width: 680px; max-height: none; }
  .hx-parts { grid-template-columns: minmax(0, 1fr); padding: 8px; }
  .sheet-paper { min-width: 900px; }
  .sheet-view { padding: 8px; }
  .seqflow { padding: 14px; }
  .seq-stage::before { display: none; }
  .sec { padding-left: 0; }
  .sec::before { display: none; }
  .sec-n { position: static; width: 30px; height: 30px; margin-bottom: 6px; box-shadow: none; }
  .sec > details > summary { grid-template-columns: minmax(0, 1fr); }
  .sec-key { grid-column: 1; grid-row: auto; justify-self: start; justify-items: start; margin-top: 6px; }
  .step { grid-template-columns: minmax(0, 1fr); padding: 13px 14px; }
  .step-note { grid-column: 1; }
  .check { grid-template-columns: minmax(0, 1fr); padding: 12px 14px; }
  .fig { padding: 12px; }
  .dg { min-width: 620px; max-height: none; }
  .only-mobile { display: inline; }
  .t-intro { padding-top: 14px; }
  .t-intro h1 { font-size: 1.7rem; }
  .t-intro p:last-child { display: none; }
  .pf-axis { font-size: 12.5px; }
  .pf-lab { font-size: 13.5px; }
}
@media (max-width: 560px) { .seq { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) { .t-area-detail { display: none; } } /* cinco laboratórios na barra */
@media (max-width: 420px) {
  .t-act { min-width: 36px; height: 36px; padding: 0 8px; }
  .t-actions { gap: 0; }
  .t-area-detail { display: none; }
  .g-fields { gap: 12px 8px; padding-inline: 12px; }
  .hero-kpis { gap: 8px; }
  .kpi { padding: 10px 11px; }
  .kpi dd { font-size: 1rem; }
  .budget { padding: 14px; }
  .budget-legend li { gap: 7px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ---- Impressão ---------------------------------------------------------- */
@page { size: A4; margin: 12mm 11mm 13mm; }
@media print {
  html, html[data-theme] { color-scheme: light; --bg: #fff; --bg-alt: #fff; --surface: #fff; --surface-2: #f4f6f5; --surface-3: #e9eeec; --line: #d1d9d6; --line-strong: #aebdb8;
    --text: #172630; --text-2: #354c55; --text-3: #556971; --accent: #9a4a17; --accent-strong: #7d3a10; --accent-wash: rgba(154, 74, 23, .08); --accent-line: rgba(154, 74, 23, .4);
    --teal: #0f6f6a; --teal-wash: rgba(15, 111, 106, .07); --c-surface: #fff; --c-grid: #e7ece9; --c-ink-3: #556971;
    --c-s1: #008c82; --c-em: #b45a22; --c-em-wash: rgba(180, 90, 34, .1); --c-s3: #5866cf; --c-deemph: #b3c1c5; --c-deemph-2: #d3dcde; --shadow: none; }
  body.thermal-app { padding: 0; background: #fff; color: #172630; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .t-appbar, .t-areas, .t-inputs, .t-mobilebar, .t-peek, .stepnav, .t-skip, .summary-actions, .t-toast, .tip { display: none !important; }
  .t-workspace { display: block; }
  .t-workspace[data-view] .t-results { display: block !important; }
  .t-results { padding: 0; }
  .t-intro { padding-top: 0; }
  .hero, .budget, .step, .fig, .check, .seqflow, .ref, .tbl-wrap { break-inside: avoid; }
  .sec { padding-left: 0; }
  .sec::before { display: none; }
  .sec-n { position: static; margin-bottom: 4px; box-shadow: none; }
  .sec details > *:not(summary) { display: block !important; }
  .step { padding: 2.5mm 4mm; }
  .step-math code { font-size: 7.5pt; }
  .dg { min-width: 0; }
  #t-output.is-stale { opacity: 1; filter: none; }
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 6px 18px; margin-top: 10px; padding: 16px 18px; box-shadow: none; }
  .hero-title { font-size: 2.6rem; }
  .hero-figure { max-width: none; }
  .hero-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .kpi { padding: 8px 10px; }
  .seq { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .seq-stage + .seq-stage::before { display: block; }
  .budgets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .t-alert { break-inside: avoid; }
  .pf-axis { font-size: 10px; }
  .pf-lab { font-size: 11px; }
  .hx-tabs, .sheet-bar, .chart-table { display: none !important; }
  .hxbox .hx-pane[hidden] { display: block !important; }
  .hxbox .hx-parts li[hidden] { display: block !important; }
  .hx-pane { break-inside: avoid; }
  .hx-pane-title { display: block; padding: 3mm 0 1mm; font-size: 9pt; font-weight: 700; }
  .hx-stage { background-image: none; }
  .hxv .hx-flow { animation: none; }
  .chart { break-inside: avoid; }
  .step-see { display: none; }
  .sheet-view { max-height: none; overflow: visible; padding: 0; background: none; }
  .sheet-paper { min-width: 0; box-shadow: none; }
  .sec-sheet { break-before: page; }
}
