/* Laboratório de eixos · triagem do eixo do rotor.
   Tokens de base.css e a mesma estrutura dos laboratórios elétrico e térmico. Duas colunas a partir de 1000 px.
   Cores das grandezas (paleta validada de base.css): momento = --c-em, torque = --c-s1, flecha = --c-s3, cortante = tinta. */
:root {
  --hh: 56px; --ah: 40px; --mb: 0px; --inputs-w: 400px;
  --gut: clamp(16px, 3vw, 36px);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}
body.shaft-app { min-height: 100dvh; font-size: 14px; line-height: 1.55; }
.s-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; }
.s-skip:focus { top: 10px; }
.s-eyebrow { color: var(--accent); font-size: .64rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }

/* ---- Cabeçalho ---------------------------------------------------------- */
.s-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); }
.s-brand { flex: none; font-size: 1.3rem; font-weight: 850; letter-spacing: -.05em; }
.s-brand b { color: var(--accent); }
.s-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; }
.s-back:hover { color: var(--text); background: var(--surface-2); }
.s-header-divider { flex: none; width: 1px; height: 26px; background: var(--line); }
.s-appbar-title { display: grid; min-width: 0; line-height: 1.15; }
.s-appbar-title .overline { color: var(--text-3); font-size: .6rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.s-appbar-title strong { overflow: hidden; font-size: .9rem; text-overflow: ellipsis; white-space: nowrap; }
.s-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.s-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); }
.s-act > span:first-child { font-size: 1.05rem; line-height: 1; }
.s-act:hover { border-color: var(--line); background: var(--surface-2); color: var(--text); }
.s-act-primary { background: var(--accent); color: var(--accent-ink); }
.s-act-primary:hover { border-color: var(--accent-strong); background: var(--accent-strong); color: var(--accent-ink); }
.s-act:disabled { opacity: .45; cursor: not-allowed; }
.s-act-icon { padding: 0; }
.s-theme-moon { display: none; }
html[data-theme="light"] .s-theme-sun { display: none; }
html[data-theme="light"] .s-theme-moon { display: inline; }
@media (prefers-color-scheme: light) { html:not([data-theme]) .s-theme-sun { display: none; } html:not([data-theme]) .s-theme-moon { display: inline; } }
.s-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; }
.s-areas::-webkit-scrollbar { display: none; }
.s-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; }
.s-area:hover { color: var(--text); background: var(--surface); }
.s-area[aria-current="page"] { border-bottom-color: var(--accent); color: var(--text); background: var(--accent-wash); }
.s-area-number { color: var(--accent); font: 700 .62rem var(--font-mono); }
.s-area-detail { color: var(--text-3); font-weight: 500; }

/* ---- Área de trabalho --------------------------------------------------- */
.s-workspace { display: grid; grid-template-columns: var(--inputs-w) minmax(0, 1fr); align-items: start; }
.s-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; }
.s-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); }
.s-inputs-head h2 { margin-top: 3px; font-size: 1.05rem; letter-spacing: -.01em; }
.s-progress { display: grid; justify-items: end; gap: 5px; min-width: 112px; color: var(--text-3); font-size: .66rem; font-weight: 700; text-align: right; }
.s-progress-track { width: 112px; height: 5px; border-radius: 99px; background: var(--line); overflow: hidden; }
.s-progress-fill { display: block; height: 100%; border-radius: 99px; background: var(--teal); transition: width .4s var(--ease-out); }
.s-progress.is-done .s-progress-fill { background: var(--ok); }
.s-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; padding: 10px 18px 0; color: var(--text-3); font-size: .68rem; }
.s-legend span { display: inline-flex; align-items: center; gap: 6px; }
.s-legend i { width: 14px; height: 10px; border-radius: 3px; border: 1px solid var(--line-strong); background: var(--bg); }
.s-legend i.is-calc { border-style: dashed; border-color: var(--accent-line); background: var(--accent-wash); }
.s-inputs-foot { padding: 6px 20px 28px; color: var(--text-3); font-size: .72rem; line-height: 1.6; }
#s-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, .f-box textarea { 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 textarea { height: auto; min-height: 96px; padding: 10px 12px; font: 500 .78rem/1.5 var(--font-sans); resize: vertical; }
.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, .f-box textarea::placeholder { color: var(--text-3); font-weight: 450; font-size: .8rem; }
.f-box :is(input, select, textarea):hover { border-color: var(--text-3); }
.f-box :is(input, select, textarea):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 :is(input, select, textarea) { border-color: var(--fail); box-shadow: 0 0 0 3px var(--fail-bg); }
.f.is-off { opacity: .48; }
.f[hidden] { display: none !important; }
.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; }
@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; }
.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; }
/* perfil no formulário */
.f-profile { grid-column: 1 / -1; display: grid; gap: 6px; width: 100%; padding: 10px 10px 8px; border: 1px dashed var(--line-strong); border-radius: 12px; background: var(--c-surface); color: var(--text-2); text-align: left; transition: border-color var(--t-fast), background var(--t-fast); }
.f-profile:hover { border-color: var(--accent-line); background: color-mix(in srgb, var(--accent-wash) 60%, var(--c-surface)); }
.f-profile-fig .sxv { max-height: 92px; }
.f-profile-sum { font: 600 .68rem/1.4 var(--font-mono); color: var(--text-2); }
.f-profile-acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.btn-count { min-width: 22px; padding: 0 6px; border-radius: 99px; background: var(--surface-3); color: var(--text-2); font: 700 .64rem/20px var(--font-mono); text-align: center; }

/* ---- Resultados --------------------------------------------------------- */
.s-results { min-width: 0; padding: 0 var(--gut) 80px; }
.s-intro { max-width: 860px; padding: 28px 0 6px; }
.s-intro h1 { margin-top: 8px; font-size: clamp(1.9rem, 3.6vw, 3rem); line-height: 1.05; }
.s-intro h1 em { font-family: var(--font-serif); font-weight: 400; color: var(--accent); }
.s-intro p:last-child { max-width: 72ch; margin-top: 10px; color: var(--text-2); font-size: .86rem; line-height: 1.65; }
.s-alert { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; margin: 10px 0; padding: 13px 16px; border: 1px solid var(--line); border-left-width: 3px; border-radius: 12px; background: var(--surface); }
.s-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; }
.s-alert strong { font-size: .84rem; }
.s-alert p, .s-alert li { color: var(--text-2); font-size: .78rem; line-height: 1.55; }
.s-alert ul { margin: 6px 0 0; padding-left: 18px; }
.s-alert a { color: var(--text); text-decoration: underline; text-decoration-color: var(--fail-line); text-underline-offset: 2px; }
.s-alert-fail { border-color: var(--fail-line); border-left-color: var(--fail); background: var(--fail-bg); }
.s-alert-fail .s-alert-mark, .s-alert-fail > strong { color: var(--fail); }
#s-error { display: block; margin-top: 18px; }
#s-error[hidden] { display: none; }
.s-alert-warn { border-left-color: var(--warn); background: var(--warn-bg); }
.s-alert-warn .s-alert-mark { color: var(--warn); }
.alerts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; margin: 4px 0; }
.alerts .s-alert { margin: 6px 0; }
.alerts-more { grid-column: 1 / -1; margin: 2px 0 6px; font-size: .74rem; }
.alerts-more a { color: var(--accent); font-weight: 650; }
#s-output { min-width: 0; transition: opacity var(--t); }
#s-output.is-stale { opacity: .35; filter: saturate(.3); pointer-events: none; }

/* Destaque */
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 8px 28px; margin: 18px 0 12px; 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: .4em; font-weight: 650; letter-spacing: -.01em; }
.hero-split { margin-top: 8px; color: var(--text-2); font-size: .92rem; font-weight: 600; 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.6; }
.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; gap: 8px; min-width: 0; margin: 0; }
.hero-shaft { display: block; width: 100%; padding: 12px 10px; border: 1px solid var(--line); border-radius: 14px; background: 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: 20px 20px; transition: border-color var(--t-fast); }
.hero-shaft:hover { border-color: var(--accent-line); }
.hero-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--text-3); font-size: .68rem; }
.hero-legend span { display: inline-flex; align-items: center; gap: 6px; }
.hero-legend .sw { width: 14px; height: 10px; border-radius: 2px; background: var(--sx-steel); border: 1px solid var(--line-strong); }
.hero-legend .sw.is-warn { background: color-mix(in srgb, var(--warn) 30%, var(--c-surface)); }
.hero-legend .sw.is-fail { background: color-mix(in srgb, var(--fail) 38%, var(--c-surface)); border-color: var(--fail); }
.hero-legend .sw.is-dmin { height: 0; border: 0; border-top: 2px dashed var(--accent); border-radius: 0; background: none; }
.hero-figure figcaption { 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); }
.is-updated { animation: s-flash .9s var(--ease-out); }
@keyframes s-flash { from { background-color: var(--accent-wash); } to { background-color: transparent; } }

/* Cadeia de cálculo */
.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 dt { color: var(--accent); }
.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-row.is-final.is-bad { border-color: var(--fail); background: var(--fail-bg); }
.seq-row.is-final.is-bad dd, .seq-row.is-final.is-bad dt { color: var(--fail); }
.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; }

/* ---- Desenho do eixo (tela) -------------------------------------------- */
.sxv { display: block; width: 100%; height: auto; overflow: visible;
  --sx-steel: color-mix(in srgb, var(--text-3) 22%, var(--c-surface));
  --sx-steel-2: color-mix(in srgb, var(--text-3) 40%, var(--c-surface)); }
.hero-legend { --sx-steel: color-mix(in srgb, var(--text-3) 22%, var(--c-surface)); }
.sxv text { font-family: var(--font-sans); fill: var(--text); }
.sxv .sx-t { font-size: 11px; font-weight: 560; fill: var(--text-2); paint-order: stroke; stroke: var(--c-surface); stroke-width: 3px; stroke-linejoin: round; }
.sxv .sx-t2 { font-size: 10.5px; fill: var(--text-3); }
.sxv .sx-strong { font-weight: 760; fill: var(--text); }
.sxv .sx-sec { fill: var(--sx-steel); stroke: none; transition: fill var(--t-fast); }
.sxv .sx-sec.is-warn { fill: color-mix(in srgb, var(--warn) 30%, var(--c-surface)); }
.sxv .sx-sec.is-fail { fill: color-mix(in srgb, var(--fail) 38%, var(--c-surface)); }
.sxv .sx-sec.is-sel { stroke: var(--accent); stroke-width: 2; }
.sxv .sx-sec.is-hover:not(.is-sel) { stroke: var(--text-2); stroke-width: 1.5; }
.sxv .sx-selband { fill: var(--accent-wash); stroke: var(--accent-line); stroke-width: 1; stroke-dasharray: 3 3; }
.sxv .sx-outline { fill: none; stroke: var(--line-strong); stroke-width: 1.3; stroke-linejoin: round; }
.sxv .sx-joint { stroke: var(--line-strong); stroke-width: .8; }
.sxv .sx-center { stroke: var(--text-3); stroke-width: .8; stroke-dasharray: 12 3 2 3; }
.sxv .sx-hidden { stroke: var(--text-2); stroke-width: 1; stroke-dasharray: 4 3; }
.sxv .sx-flat { fill: none; stroke: var(--text-3); stroke-width: .8; }
.sxv .sx-core { fill: color-mix(in srgb, var(--c-s3) 9%, transparent); stroke: color-mix(in srgb, var(--c-s3) 55%, transparent); stroke-width: 1.2; stroke-dasharray: 5 4; }
.sxv .sx-brg-shell { fill: var(--sx-steel-2); stroke: var(--line-strong); stroke-width: 1; }
.sxv .sx-hatch { stroke: var(--line-strong); stroke-width: .7; }
.sxv .sx-axisline { stroke: var(--text-3); stroke-width: .8; stroke-dasharray: 6 3 1.5 3; }
.sxv .sx-brg-mark { fill: var(--text-2); }
.sxv .sx-force { stroke: var(--text-2); stroke-width: 1.6; stroke-linecap: round; }
.sxv .sx-force-h, .sxv .sx-mag-h, .sxv .sx-react-h { fill: var(--text-2); stroke: none; }
.sxv .sx-react { stroke: var(--teal); }
.sxv .sx-react-h { fill: var(--teal); }
.sxv .sx-torque { fill: none; stroke: var(--c-s1); stroke-width: 1.8; }
.sxv .sx-torque-h { fill: var(--c-s1); }
.sxv .sx-dmin { fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-dasharray: 4 3; }
.sxv .sx-dmin.is-over { stroke: var(--fail); stroke-width: 2.4; stroke-dasharray: none; }
.sx-mini { max-height: 150px; }
.hf .hf-base { stroke: var(--c-axis); stroke-width: 1; }
.hf .hf-bar { fill: var(--c-deemph); }
.hf .hf-bar.is-warn { fill: var(--warn); }
.hf .hf-bar.is-fail { fill: var(--fail); }
.hf .hf-bar.is-sel { stroke: var(--accent); stroke-width: 1.6; }
.hf .hf-limit { stroke: var(--fail); stroke-width: 1; stroke-dasharray: 4 3; }
.hf .hf-t { font: 500 9.5px var(--font-mono); fill: var(--c-ink-3); }
.hf .hf-cap { font-family: var(--font-sans); font-weight: 650; fill: var(--c-ink-2); }
.hf .hf-bad { font-weight: 700; fill: var(--fail); paint-order: stroke; stroke: var(--c-surface); stroke-width: 3px; }
.hf .hf-lead { stroke: var(--fail); stroke-width: .8; opacity: .7; }
.sx-mini .sx-outline { stroke-width: 1; }

/* ---- Explorador --------------------------------------------------------- */
.sx { margin: 14px 0; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); overflow: hidden; scroll-margin-top: calc(var(--hh) + var(--ah) + 12px); }
.sx-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 18px; padding: 16px 18px 12px; }
.sx-head h3 { font-size: 1.05rem; letter-spacing: -.02em; }
.sx-head p { max-width: 62ch; margin-top: 4px; color: var(--text-2); font-size: .76rem; line-height: 1.55; }
.sx-lanes { display: flex; flex-wrap: wrap; gap: 4px; }
.sx-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 0 11px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--text-3); font-size: .72rem; font-weight: 680; transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast); }
.sx-chip::before { content: ""; width: 12px; height: 3px; border-radius: 2px; background: var(--k, var(--text-3)); opacity: .35; }
.sx-chip[aria-pressed="true"] { border-color: var(--line-strong); background: var(--surface-2); color: var(--text); }
.sx-chip[aria-pressed="true"]::before { opacity: 1; }
.sx-chip:hover { color: var(--text); }
.sx-chip-dmin::before { height: 0; border-top: 2px dashed var(--accent); background: none; }
.sx-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 18px; border-top: 1px solid var(--line); background: var(--surface-2); }
.sx-step { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--bg); color: var(--text); font-size: 1.1rem; font-weight: 700; }
.sx-step:hover { border-color: var(--accent-line); background: var(--accent-wash); }
.sx-select { height: 34px; max-width: 260px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--bg); color: var(--text); font: 650 .78rem var(--font-sans); }
.sx-read { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; min-width: 0; margin-left: auto; color: var(--text-3); font-size: .72rem; font-variant-numeric: tabular-nums; }
.sx-ri { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.sx-ri em { font-style: italic; font-family: var(--font-serif); color: var(--text-3); }
.sx-ri b { color: var(--text); font-weight: 700; }
.sx-ri-sec { padding: 1px 8px; border-radius: 6px; background: var(--surface-3); color: var(--text-2); font-weight: 700; }
.sx-ri-sec.is-fail { background: var(--fail-bg); color: var(--fail); }
.sx-stage { position: relative; padding: 4px 0 0; background-color: var(--c-surface); cursor: crosshair; touch-action: pan-y; }
.sx-stage:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.sx-stage svg { width: 100%; height: auto; }
/* pistas */
.lx .lx-bg { fill: transparent; }
.lx .lx-band { fill: color-mix(in srgb, var(--accent) 13%, transparent); }
.lx .lx-band-edge { fill: none; stroke: var(--accent-line); stroke-width: 1; stroke-dasharray: 3 3; }
.lx .lx-sep { stroke: var(--line); stroke-width: 1; }
.lx .lx-grid { stroke: var(--c-grid); stroke-width: 1; }
.lx .lx-zero { stroke: var(--c-axis); stroke-width: 1; }
.lx .lx-tick { stroke: var(--c-axis); stroke-width: 1; }
.lx .lx-axis { font: 500 10px var(--font-mono); fill: var(--c-ink-3); }
.lx .lx-title { font: 700 11px var(--font-sans); fill: var(--c-ink-2); }
.lx .lx-unit { font-weight: 500; fill: var(--c-ink-3); }
.lx .lx-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; font-variant-numeric: tabular-nums; }
.lx .lx-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.lx .lx-area { stroke: none; opacity: .14; }
.lx .is-v { stroke: var(--c-ink-2); fill: var(--c-ink-2); }
.lx .is-m { stroke: var(--c-em); fill: var(--c-em); }
.lx .is-t { stroke: var(--c-s1); fill: var(--c-s1); }
.lx .is-y, .lx .is-th { stroke: var(--c-s3); fill: var(--c-s3); }
.lx .lx-line.is-v, .lx .lx-line.is-m, .lx .lx-line.is-t, .lx .lx-line.is-y, .lx .lx-line.is-th { fill: none; }
.lx .lx-max, .lx .lx-dot { stroke: var(--c-surface); stroke-width: 2; }
.lx .lx-bar { fill: var(--c-deemph); transition: fill var(--t-fast); }
.lx .lx-bar.is-warn { fill: var(--warn); }
.lx .lx-bar.is-fail { fill: var(--fail); }
.lx .lx-bar.is-sel { stroke: var(--accent); stroke-width: 2; }
.lx .lx-limit { stroke: var(--fail); stroke-width: 1.2; stroke-dasharray: 5 3; }
.lx .lx-mode1 { stroke: var(--c-s1); }
.lx .lx-mode2 { stroke: var(--c-em); }
.lx .lx-key1 { fill: var(--c-s1); }
.lx .lx-key2 { fill: var(--c-em); }
.lx .lx-brg { fill: var(--c-ink-3); }
.lx .lx-cross { stroke: var(--c-ink-3); stroke-width: 1; stroke-dasharray: 3 3; pointer-events: none; }
.lx .lx-hit { fill: transparent; }
/* detalhe do trecho */
.sx-detail { padding: 14px 18px 16px; border-top: 1px solid var(--line); }
.sxd-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.sxd-code { padding: 3px 9px; border-radius: 8px; background: var(--accent-wash); color: var(--accent); font: 800 .8rem var(--font-mono); }
.sxd-code.is-fail { background: var(--fail-bg); color: var(--fail); }
.sxd-title { display: grid; flex: 1; min-width: 200px; }
.sxd-title strong { font-size: .95rem; }
.sxd-title small { color: var(--text-3); font-size: .7rem; font-variant-numeric: tabular-nums; }
.sxd-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 14px 26px; margin-top: 12px; }
.sxd-bars { display: grid; align-content: start; gap: 12px; }
.sfb-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; color: var(--text-2); font-size: .74rem; font-weight: 650; }
.sfb-top b { color: var(--text); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.sfb-top b small { color: var(--text-3); font-size: .68rem; font-weight: 600; }
.sfb-track { position: relative; height: 8px; margin-top: 6px; border-radius: 99px; background: var(--surface-3); }
.sfb-fill { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: var(--ok); transition: width .45s var(--ease-out); }
.sfb-min { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--text); }
.sfb.is-warn .sfb-fill { background: var(--warn); }
.sfb.is-fail .sfb-fill { background: var(--fail); }
.sfb.is-fail .sfb-top b { color: var(--fail); }
.sfb.is-gov .sfb-top span::after { content: " · governa"; color: var(--text-3); font-weight: 500; }
.sxd-dmin { color: var(--text-2); font-size: .76rem; font-variant-numeric: tabular-nums; }
.sxd-dmin b { color: var(--text); }
.sxd-kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; margin: 0; }
.sxd-kv div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.sxd-kv dt { color: var(--text-3); font-size: .72rem; }
.sxd-kv dd { margin: 0; color: var(--text); font-size: .8rem; font-weight: 680; font-variant-numeric: tabular-nums; text-align: right; }
.sxd-link { display: inline-block; margin-top: 12px; color: var(--accent); font-size: .76rem; font-weight: 700; }

/* Tabela dos trechos com barras */
.st-table { font-size: .8rem; }
.st-table td, .st-table th { padding: 6px 8px; }
.st-row.is-fail td:first-child { box-shadow: inset 3px 0 0 var(--fail); }
.st-btn { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; color: var(--text); font: inherit; text-align: left; }
.st-btn:hover { color: var(--accent); }
.st-code { padding: 1px 6px; border-radius: 5px; background: var(--surface-3); font: 700 .66rem var(--font-mono); }
.st-row.is-fail .st-code { background: var(--fail-bg); color: var(--fail); }
.st-u { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.st-bars { display: grid; gap: 3px; width: 72px; position: relative; }
.st-bars::after { content: ""; position: absolute; top: -2px; bottom: -2px; left: calc(100% / 1.5); width: 1.5px; background: var(--text-3); }
.st-bar { display: block; height: 5px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.st-bar i { display: block; height: 100%; border-radius: 99px; }
.st-bar.is-y i { background: var(--c-em); }
.st-bar.is-f i { background: var(--c-s1); }
.st-bar.is-over i { background: var(--fail); }
.st-uv { min-width: 34px; color: var(--text-2); font-weight: 700; }
.st-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 8px; color: var(--text-3); font-size: .7rem; }
.st-legend span { display: inline-flex; align-items: center; gap: 6px; }
.st-key { display: inline-block; width: 16px; height: 5px; border-radius: 99px; }
.st-key.is-y { background: var(--c-em); }
.st-key.is-f { background: var(--c-s1); }
.sec-memory { margin-top: 18px; scroll-margin-top: calc(var(--hh) + var(--ah) + 64px); }

/* Gráficos menores (mapa, modos) */
.pf-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 6px; 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-wrap:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 8px; }
.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-cross { stroke: var(--c-ink-3); stroke-width: 1; stroke-dasharray: 3 3; }
.chart { margin: 0; padding: 14px 16px 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.chart .pf { max-height: 340px; }
.chart figcaption { margin-top: 6px; color: var(--text-3); font-size: .72rem; line-height: 1.55; }
.mp .mp-band { fill: var(--c-fail-wash); }
.mp .mp-op { stroke: var(--fail); stroke-width: 1.2; }
.mp .mp-ov { stroke: var(--c-ink-3); stroke-width: 1; stroke-dasharray: 5 3; }
.mp .mp-line { fill: none; stroke-width: 2; stroke-linejoin: round; }
.mp .mp-1 { stroke: var(--c-s1); fill: var(--c-s1); }
.mp .mp-2 { stroke: var(--c-em); fill: var(--c-em); }
.mp .mp-3 { stroke: var(--c-s3); fill: var(--c-s3); }
.mp .mp-line.mp-1, .mp .mp-line.mp-2, .mp .mp-line.mp-3 { fill: none; }
.mp .mp-rigid { stroke: var(--c-ink-3); stroke-width: 1; stroke-dasharray: 2 4; }
.mp .mp-k { stroke: var(--text); stroke-width: 1; stroke-dasharray: 4 3; }
.mp .mp-dot, .mp .mp-hover { stroke: var(--c-surface); stroke-width: 2; }
.chart-modes .pf { max-height: 260px; }
.md .md-ghost { opacity: .5; }
.md .md-line { fill: none; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.md .md-1 { stroke: var(--c-s1); }
.md .md-2 { stroke: var(--c-em); }
.md .md-3 { stroke: var(--c-s3); }

/* Elementos finitos: malha, comparação e convergência */
.sxv .sx-mesh { fill: none; stroke: var(--c-s1); stroke-width: 1; opacity: .8; }
.lx .lx-meshlab { fill: var(--c-s1); font-weight: 650; }
.sx-chip-mesh::before { height: 9px; border-radius: 0; background: repeating-linear-gradient(90deg, var(--c-s1) 0 1.5px, transparent 1.5px 4px); }
.chip-link { text-decoration: none; transition: border-color var(--t-fast), background var(--t-fast); }
.chip-link:hover { border-color: var(--teal); background: color-mix(in srgb, var(--teal) 16%, transparent); }
.chart-mesh .pf { max-height: none; }
.ms .ms-h { fill: var(--c-s1-wash); stroke: var(--c-s1); stroke-width: 1.2; stroke-linejoin: round; }
.ms .ms-base { stroke: var(--c-axis); stroke-width: 1; }
.ms .ms-brg { stroke: var(--c-ink-3); stroke-width: 1; stroke-dasharray: 3 3; }
.cmp-tbl td.cv-used { background: var(--accent-wash); color: var(--text); font-weight: 750; }
.tbl td.dim-n { color: var(--text-3); }
.cmp-note { margin-top: 8px; }
.cv-box { display: block; }
.cv-wait { padding: 34px 0; border: 1px dashed var(--line-strong); border-radius: 14px; color: var(--text-3); font-size: .78rem; text-align: center; }
.cv-status { display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: start; gap: 10px; padding: 12px 16px; border: 1px solid var(--line); border-left-width: 3px; border-radius: 12px; background: var(--surface); }
.cv-status.is-ok { border-color: var(--ok-line); border-left-color: var(--ok); background: var(--ok-bg); }
.cv-status.is-warn { border-color: var(--warn-line); border-left-color: var(--warn); background: var(--warn-bg); }
.cv-status-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; }
.cv-status.is-ok .cv-status-mark { color: var(--ok); }
.cv-status.is-warn .cv-status-mark { color: var(--warn); }
.cv-status p { color: var(--text-2); font-size: .8rem; line-height: 1.6; }
.cv-status b { color: var(--text); }
.cv-use { display: inline-flex; align-items: center; min-height: 28px; margin-left: 8px; padding: 0 11px; border: 1px solid var(--accent); border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-size: .74rem; font-weight: 750; vertical-align: middle; }
.cv-use:hover { background: var(--accent-strong); }
.cv-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 14px 0 6px; }
.cv-chip::before { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); opacity: .9; }
.cv-chip.is-warn::before { background: var(--warn); }
.cv-chip[aria-pressed="true"]::before { opacity: 1; }
.cv-info { max-width: 110ch; margin: 4px 0 10px; color: var(--text-2); font-size: .78rem; line-height: 1.6; font-variant-numeric: tabular-nums; }
.cv-info b { color: var(--text); }
.cv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cv-fig { min-width: 0; }
.cv-fig .pf { max-height: 320px; }
.cv .cq-y, .cv .cq-y2, .cv .cq-th { --q: var(--c-s3); }
.cv .cq-m { --q: var(--c-em); }
.cv .cq-r { --q: var(--c-ink-2); }
.cv .cq-n1, .cv .cq-n2 { --q: var(--c-s1); }
.cv .cq-f { --q: var(--teal); }
.cv .cv-line, .cv .cv-eline { fill: none; stroke: var(--q); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.cv .cv-eline { stroke-width: 1.4; opacity: .3; }
.cv .cv-eline.is-sel { stroke-width: 2.4; opacity: 1; }
.cv .cv-line.cq-y2, .cv .cv-eline.cq-y2, .cv .cv-line.cq-n2, .cv .cv-eline.cq-n2 { stroke-dasharray: 7 4; }
.cv .cv-line.cq-th, .cv .cv-eline.cq-th { stroke-dasharray: 1.5 4; }
.cv .cv-pt { fill: var(--q); stroke: var(--c-surface); stroke-width: 2; }
.cv .cv-pt.is-floor { fill: var(--c-surface); stroke: var(--q); stroke-width: 1.8; }
.cv .cv-pt.is-cur { fill: var(--c-surface); stroke: var(--text); stroke-width: 2.6; }
.cv .cv-band { fill: var(--c-ok-wash); stroke: var(--ok-line); stroke-width: 1; }
.cv .cv-ref { stroke: var(--c-ink-2); stroke-width: 1.2; stroke-dasharray: 5 4; }
.cv .cv-conv { stroke: var(--ok); stroke-width: 1.4; stroke-dasharray: 2 3; }
.cv .cv-curline { stroke: var(--c-ink-3); stroke-width: 1.2; stroke-dasharray: 4 3; }
.cv .cv-curlab { fill: var(--c-ink-2); }
.cv .cv-floor { fill: color-mix(in srgb, var(--c-ink-3) 12%, transparent); }
.cv .cv-floorlab { font-size: 9px; }
.cv .cv-tol { stroke: var(--warn); stroke-width: 1.4; stroke-dasharray: 6 3; }
.cv .cv-tollab { fill: var(--warn); }
.cv .cv-dec { stroke: var(--c-axis); opacity: .5; }
.cv-table { margin-top: 12px; }
.cv-table .tbl-wrap { margin-top: 0; }
.cv-tbl { font-size: .76rem; }
.cv-tbl th, .cv-tbl td { padding: 6px 9px; }
.cv-tbl th small { display: block; color: var(--text-3); font: 500 .6rem var(--font-mono); letter-spacing: 0; }
.cv-tbl .cv-selcol { background: color-mix(in srgb, var(--accent-wash) 65%, transparent); }
.cv-n b { font-size: .84rem; }
.cv-n small { display: block; color: var(--text-3); font: 500 .62rem var(--font-mono); }
.cv-tag { margin-left: 6px; padding: 0 6px; border-radius: 5px; background: var(--text); color: var(--bg); font: 700 .56rem/1.7 var(--font-mono); letter-spacing: .05em; text-transform: uppercase; vertical-align: 1px; }
.cv-tag.is-ref { background: var(--surface-3); color: var(--text-2); }
.cv-act { width: 1%; }
.cv-use-row { padding: 2px 9px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--bg); color: var(--text-2); font-size: .7rem; font-weight: 700; }
.cv-use-row:hover { border-color: var(--accent-line); background: var(--accent-wash); color: var(--text); }
.cv-note { margin-top: 10px; }
/* controle da malha: refinos, nós pedidos e resultados nos nós */
.f-mesh { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.f-mesh-sum { flex: 1; min-width: 160px; color: var(--text-3); font-size: .68rem; line-height: 1.4; }
.sxv .sx-mesh-user { fill: none; stroke: var(--accent); stroke-width: 2; }
.ms .ms-zone { fill: var(--accent-wash); stroke: var(--accent-line); stroke-width: 1; stroke-dasharray: 4 3; }
.ms .ms-zlab { fill: var(--accent); font-weight: 650; }
.ms .ms-user { fill: var(--accent); stroke: var(--c-surface); stroke-width: 1.2; }
.ms .ms-guide { stroke: var(--text-2); stroke-width: 1.2; stroke-dasharray: 3 3; pointer-events: none; }
.ms .ms-drag { fill: color-mix(in srgb, var(--accent) 22%, transparent); stroke: var(--accent); stroke-width: 1.4; pointer-events: none; }
.ms .ms-hit { fill: transparent; }
.chart-mesh .pf-wrap { cursor: crosshair; }
.ms-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 8px; }
.ms-bar-note { flex: 1; min-width: 200px; color: var(--text-3); font-size: .7rem; line-height: 1.45; }
.nd-tbl td.nd-user { color: var(--accent); font-weight: 700; }
.nd-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 8px; }
.nd-note { color: var(--text-3); font-size: .68rem; }
.nd-all { margin-top: 8px; }
.nd-all .tbl-wrap { max-height: 420px; overflow: auto; }
.nd-all .nd-mark td { background: var(--accent-wash); }
.nd-all td.nd-lab { color: var(--accent); font-weight: 650; }
.ed-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 16px; margin-top: 4px; }
.ed-line .ed-sum { margin-top: 0; }
.ed-hint { color: var(--accent); font-size: .72rem; font-weight: 650; }
.ed-hint:empty, .ed-hint-x:empty { display: none; }
.ed-hint-x { margin-left: auto; color: var(--text-2); font: 600 .7rem var(--font-mono); }
.ed.is-mesh .ed-fig { cursor: crosshair; touch-action: none; user-select: none; -webkit-user-select: none; }
.ed.is-mesh .ed-fig .sxv { max-height: 230px; }
.ed-empty td { padding: 18px 12px !important; color: var(--text-3); font-size: .76rem; text-align: center !important; }

/* Folha A3 */
.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 com chave de linha */
.tip { position: fixed; z-index: 400; max-width: 280px; 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; }
.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); content-visibility: auto; contain-intrinsic-size: auto 520px; }
.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; max-width: 300px; 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 { overflow: hidden; max-width: 100%; font-size: .98rem; font-variant-numeric: tabular-nums; text-overflow: ellipsis; 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-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: 160px; }
.lab-link { color: var(--accent); font-weight: 700; text-decoration: underline; text-decoration-color: var(--accent-line); text-underline-offset: 2px; }
.btn-soft { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; 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); }
.btn-soft.btn-primary { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.btn-soft.btn-primary:hover { background: var(--accent-strong); }
.pend { display: grid; gap: 6px; margin: 0; padding-left: 20px; color: var(--text-2); font-size: .8rem; line-height: 1.55; }
.pend-scope { color: var(--text-3); }

/* Verificações e referências */
.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; }
.refs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ref { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.ref strong { display: block; font-size: .8rem; line-height: 1.35; }
.ref p { margin-top: 4px; color: var(--text-2); font-size: .74rem; line-height: 1.5; }
.ref span { display: block; margin-top: 6px; color: var(--accent); font: 600 .64rem var(--font-mono); }
.scope { margin-top: 18px; color: var(--text-3); font-size: .72rem; line-height: 1.6; }
.scope b { color: var(--text-2); }

/* ---- Editor do perfil (diálogo) ---------------------------------------- */
.ed { width: min(1120px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--line-strong); border-radius: 18px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-pop); overflow: hidden; }
.ed[open] { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; }
.ed::backdrop { background: color-mix(in srgb, var(--bg) 62%, transparent); backdrop-filter: blur(3px); }
.ed-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 16px 12px 20px; border-bottom: 1px solid var(--line); }
.ed-head h2 { margin-top: 2px; font-size: 1.1rem; }
.ed-tabs { display: inline-flex; gap: 2px; margin-left: auto; padding: 3px; border: 1px solid var(--line); border-radius: 11px; background: var(--bg); }
.ed-tab { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--text-3); font-size: .76rem; font-weight: 700; }
.ed-tab[aria-selected="true"] { background: var(--surface-2); color: var(--text); box-shadow: var(--shadow-s), inset 0 -2px 0 var(--accent); }
.ed-tab-n { min-width: 20px; padding: 0 5px; border-radius: 99px; background: var(--surface-3); color: var(--text-2); font: 700 .62rem/18px var(--font-mono); text-align: center; }
.ed-close { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--text-2); font-size: .95rem; }
.ed-close:hover { border-color: var(--line-strong); color: var(--text); }
.ed-preview { padding: 10px 20px 8px; border-bottom: 1px solid var(--line); background: var(--c-surface); }
.ed-fig .sxv { max-height: 120px; }
.ed-sum { margin-top: 4px; color: var(--text-3); font: 600 .68rem var(--font-mono); }
.ed-body { overflow: auto; overscroll-behavior: contain; }
.ed-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .78rem; font-variant-numeric: tabular-nums; }
.ed-table th { position: sticky; top: 0; z-index: 2; padding: 8px 6px; border-bottom: 1px solid var(--line); background: var(--surface-2); color: var(--text-2); font-size: .68rem; font-weight: 700; text-align: left; white-space: nowrap; }
.ed-table th small { display: block; color: var(--text-3); font: 500 .6rem var(--font-mono); }
.ed-table td { padding: 3px 4px; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.ed-table tr.is-focus td { background: var(--accent-wash); }
.ed-n { width: 34px; color: var(--text-3); font: 600 .66rem var(--font-mono); text-align: center !important; }
.ed-ro { width: 70px; color: var(--text-3); font: 500 .7rem var(--font-mono); text-align: right !important; white-space: nowrap; }
.ed-in { width: 100%; min-width: 64px; height: 32px; padding: 0 8px; border: 1px solid transparent; border-radius: 7px; background: var(--bg); color: var(--text); font: 600 .8rem var(--font-sans); font-variant-numeric: tabular-nums; outline: none; }
.ed-name .ed-in { min-width: 190px; font-weight: 600; }
.ed-in:hover { border-color: var(--line-strong); }
.ed-in:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.ed-in::placeholder { color: var(--text-3); }
.ed-in.is-bad { border-color: var(--fail); background: var(--fail-bg); }
.ed-acts { width: 70px; white-space: nowrap; }
.ed-act { width: 28px; height: 28px; margin-left: 2px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--text-3); font-size: .8rem; }
.ed-act:hover { border-color: var(--line); background: var(--surface-2); color: var(--text); }
.ed-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--surface-2); }
.ed-spacer { flex: 1; }
.ed-status { color: var(--ok); font-size: .74rem; font-weight: 650; }
.ed-status.is-bad { color: var(--fail); }
.ed-ghost { border-color: transparent; background: transparent; }
.ed-paste { position: absolute; inset: auto 16px 70px 16px; z-index: 5; display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-pop); }
.ed-paste[hidden] { display: none; }
.ed-paste p { color: var(--text-2); font-size: .76rem; }
.ed-paste textarea { width: 100%; padding: 10px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg); color: var(--text); font: 500 .76rem/1.5 var(--font-mono); resize: vertical; }
.ed-paste-acts { display: flex; gap: 8px; }

/* Aviso e barra inferior */
.s-toast { position: fixed; left: 50%; bottom: calc(24px + var(--mb)); z-index: 600; 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; }
.s-mobilebar, .s-peek, .only-mobile { display: none; }

/* ---- Responsivo --------------------------------------------------------- */
@media (max-width: 1280px) { :root { --inputs-w: 370px; } .hero { grid-template-columns: minmax(0, 1fr); } .hero-figure { max-width: 640px; } }
@media (max-width: 1100px) { .s-act-label { display: none; } .s-act { padding: 0 10px; } .hero-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .seq { grid-template-columns: repeat(2, minmax(0, 1fr)); } .seq-stage:nth-child(3)::before { display: none; } .alerts { grid-template-columns: minmax(0, 1fr); } .sxd-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1180px) and (min-width: 1001px), (max-width: 760px) { .cv-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1050px) {
  :root { --hh: 54px; --ah: 38px; --mb: calc(62px + env(safe-area-inset-bottom)); }
  body.shaft-app { padding-bottom: var(--mb); }
  .s-appbar-title, .s-header-divider, .s-back-label { display: none; }
  .s-areas { padding-inline: 8px; }
  .s-area { flex: 1; justify-content: center; padding-inline: 6px; }
  .s-workspace { display: block; }
  .s-inputs { position: static; height: auto; overflow: visible; border-right: 0; background: transparent; }
  .s-inputs-head { position: sticky; top: calc(var(--hh) + var(--ah)); padding: 14px var(--gut) 12px; background: color-mix(in srgb, var(--bg) 92%, transparent); }
  .s-legend { padding-inline: var(--gut); }
  #s-form { padding: 12px var(--gut); }
  .s-inputs-foot { padding-inline: var(--gut); padding-bottom: 90px; }
  .s-workspace[data-view="dados"] .s-results, .s-workspace[data-view="resultado"] .s-inputs { display: none; }
  .s-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); }
  .s-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; }
  .s-mobilebar button[aria-pressed="true"] { border-color: var(--accent-line); background: var(--accent-wash); color: var(--text); }
  .s-mb-icon { font-size: 1rem; }
  .s-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; }
  .s-peek:not([hidden]) { position: fixed; right: 12px; bottom: calc(var(--mb) + 10px); left: 12px; z-index: 85; display: block; }
  .s-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; }
  .s-peek-label { color: var(--accent); font-size: .62rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
  .s-peek strong { flex: 1; min-width: 0; overflow: hidden; font-size: .88rem; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
  .s-peek.is-bad strong { color: var(--fail); }
  .s-peek-go { color: var(--accent); font-size: 1.1rem; }
  .s-intro { padding-top: 20px; }
  .refs { grid-template-columns: minmax(0, 1fr); }
  .sx-read { margin-left: 0; width: 100%; }
}
@media (max-width: 720px) {
  .hero { padding: 20px 18px 18px; border-radius: 18px; }
  .sx-head, .sx-nav, .sx-detail { padding-inline: 14px; }
  .sxd-kv { grid-template-columns: minmax(0, 1fr); }
  .sheet-paper { min-width: 900px; }
  .sheet-view { padding: 8px; }
  .seqflow { padding: 14px; }
  .seq { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .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; }
  .only-mobile { display: inline; }
  .s-intro { padding-top: 14px; }
  .s-intro h1 { font-size: 1.7rem; }
  .s-intro p:last-child { display: none; }
  .pf-axis { font-size: 12.5px; }
  .pf-lab { font-size: 13.5px; }
  .ed { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .ed-tabs { order: 3; width: 100%; margin-left: 0; }
  .ed-tab { flex: 1; justify-content: center; }
  .ed-head h2 { font-size: 1rem; }
  .ed-close { margin-left: auto; }
  .ed-name .ed-in { min-width: 150px; }
  .ed-foot .ed-spacer { display: none; }
  .ed-paste { inset: auto 8px 120px 8px; }
}
@media (max-width: 560px) { .seq { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) { .s-area-detail { display: none; } } /* cinco laboratórios na barra */
@media (max-width: 420px) {
  .s-act { min-width: 34px; height: 36px; padding: 0 7px; }
  .s-actions { gap: 0; }
  .g-fields { gap: 12px 8px; padding-inline: 12px; }
  .hero-kpis { gap: 8px; }
  .kpi { padding: 10px 11px; }
  .kpi dd { font-size: 1rem; }
  .sx-select { max-width: 170px; }
}
@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 {
  :root, html[data-theme], html[data-theme="dark"] { 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-axis: #b8c7c4; --c-ink-2: #354c55; --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; --c-fail-wash: rgba(180, 45, 45, .08); --shadow: none;
    --ok: #13784a; --ok-bg: rgba(19, 120, 74, .08); --ok-line: rgba(19, 120, 74, .3); --warn: #8a5a00; --warn-bg: rgba(193, 133, 0, .1); --warn-line: rgba(138, 90, 0, .3); --fail: #b42d2d; --fail-bg: rgba(180, 45, 45, .07); --fail-line: rgba(180, 45, 45, .3); }
  body.shaft-app { padding: 0; background: #fff; color: #172630; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .s-appbar, .s-areas, .s-inputs, .s-mobilebar, .s-peek, .stepnav, .s-skip, .s-toast, .tip, .sx-lanes, .sx-nav .sx-step, .sx-select, .sxd-link, .ed { display: none !important; }
  .s-workspace { display: block; }
  .s-workspace[data-view] .s-results { display: block !important; }
  .s-results { padding: 0; }
  .s-intro { padding-top: 0; }
  .hero, .step, .check, .seqflow, .ref, .chart, .sx-stage, .sx-detail, .s-alert, .kpi { break-inside: avoid; }
  .sx { break-inside: auto; }
  .tbl-wrap { overflow: visible; }
  .tbl { font-size: 7.4pt; }
  .tbl th, .tbl td, .st-table td, .st-table th { padding: 3px 6px; }
  .tbl tbody tr { break-inside: avoid; }
  .st-bars { width: 54px; }
  .sec { padding-left: 0; content-visibility: visible; }
  .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; }
  #s-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; }
  .alerts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .refs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sx-stage { cursor: default; }
  .lx .lx-cross, .lx .lx-dot { display: none; }
  .md .md-line animate { display: none; }
  .sheet-bar { display: none !important; }
  .cv-use, .cv-use-row, .cv-chips, .cv-wait, .ms-bar, .nd-acts { display: none !important; }
  .cv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cv-fig, .cv-status, .chart-mesh { break-inside: avoid; }
  .sheet-view { max-height: none; overflow: visible; padding: 0; background: none; }
  .sheet-paper { min-width: 0; box-shadow: none; }
  .sec-sheet { break-before: page; }
  .sec-sheet:has(details:not([data-loaded])) { display: none; }
  /* a página A4 tem ~710 px: desfaz os ajustes de celular que não servem ao papel */
  .s-intro h1 { font-size: 2rem; }
  .s-intro p:last-child { display: block; font-size: 9pt; }
  .step { grid-template-columns: minmax(120px, .7fr) minmax(0, 2fr); }
  .step-note { grid-column: 2; }
  .sec > details > summary { grid-template-columns: minmax(0, 1fr) auto; }
  .sec-key { grid-column: 2; grid-row: 1 / span 2; justify-self: end; justify-items: end; margin-top: 0; }
  .check { grid-template-columns: 90px minmax(0, 1fr); }
  .sxd-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
  .sxd-kv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sx-head, .sx-nav, .sx-detail { padding-inline: 14px; }
}

/* Modelo, DIN 743 e casos de verificação */
.vf-head { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; padding: 12px 16px; border: 1px solid var(--ok-line); border-left: 3px solid var(--ok); border-radius: 12px; background: var(--ok-bg); }
.vf-head.is-bad { border-color: var(--fail-line); border-left-color: var(--fail); background: var(--fail-bg); }
.vf-head p { color: var(--text-2); font-size: .8rem; line-height: 1.6; }
.vf-head b { color: var(--text); }
.vf-case { margin-top: 14px; }
.vf-case h4 { font-size: .86rem; }
.vf-case .vf-what { margin-top: 2px; color: var(--text-3); font-size: .72rem; line-height: 1.5; }
.vf-tbl td.ok { color: var(--ok); font-weight: 750; }
.vf-tbl td.fail { color: var(--fail); font-weight: 750; }
.din-tbl td.l small { display: block; color: var(--text-3); font-size: .64rem; }
.din-tbl tr.is-fail td:first-child { box-shadow: inset 3px 0 0 var(--fail); }
.din-tag { margin-left: 6px; padding: 0 5px; border-radius: 4px; background: var(--warn-bg); color: var(--warn); font: 700 .56rem/1.6 var(--font-mono); letter-spacing: .04em; text-transform: uppercase; }
