/* Tokens, base, header, theme button, buttons and tags copied from the PUBLISHED
   Lobby (bancada-lobby.vercel.app/styles.css, read 2026-11-01). The local Lobby
   checkout has uncommitted palette changes; production is the reference. */
:root {
  --bg: #f3f1ec;
  --surface: #fbfaf7;
  --raised: #ffffff;
  --ink: #16181b;
  --ink-2: #4b4f55;
  --ink-3: #61656c;
  --rule: #d9d5cc;
  --grid: rgba(22, 24, 27, .055);
  --accent: #c2410c;
  --tension: #1f5fa8;
  --cool: #9fb3c2;
  --warn-bg: #f4e4cc;
  --warn-ink: #6b3a00;
  --soft: #f6e9df;
  --ok-ink: #1d5b3a;
  --err-bg: #f6dcd6;
  --err-ink: #8a1c0b;
  --water: #9cc3e0;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #101214;
  --surface: #171a1d;
  --raised: #1e2226;
  --ink: #ebe8e1;
  --ink-2: #b6b2aa;
  --ink-3: #96928a;
  --rule: #2d3135;
  --grid: rgba(235, 232, 225, .05);
  --accent: #f07b3f;
  --tension: #74a9e6;
  --cool: #3c5566;
  --warn-bg: #36280f;
  --warn-ink: #f2cd92;
  --soft: #302219;
  --ok-ink: #8fd3ae;
  --err-bg: #3a1a14;
  --err-ink: #f4b4a6;
  --water: #2f5a7a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100dvh;
  background: var(--bg); color: var(--ink);
  font: 400 1rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s, color .3s;
}
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -3rem; background: var(--ink); color: var(--bg); padding: .5rem .8rem; z-index: 10; }
.skip:focus { top: .75rem; }
.muted { color: var(--ink-3); }
.ico { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* topo (Lobby) adaptado: sem navegação promocional; produto e retorno à Bancada */
.top {
  position: sticky; top: 0; z-index: 6;
  display: flex; align-items: center; gap: 1.25rem;
  padding: .55rem clamp(1rem, 3vw, 2.5rem);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; font: 500 1rem/1 var(--mono); letter-spacing: .02em; }
.top .brand interaenge-mark { width: 44px; height: 44px; }
.product { display: flex; align-items: baseline; gap: .8rem; min-width: 0; padding-left: 1.1rem; border-left: 1px solid var(--rule); }
.product-name { font: 500 .95rem/1.2 var(--mono); }
.product-case { font-size: .86rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.back {
  margin-left: auto; display: inline-flex; align-items: center; gap: .45rem; min-height: 36px;
  padding: 0 .75rem; border: 1px solid var(--rule); border-radius: 3px; text-decoration: none; font: 500 .8rem/1 var(--mono);
}
.back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.back:hover { color: var(--accent); border-color: var(--accent); }
.theme {
  display: flex; align-items: center; gap: .45rem; min-height: 36px;
  font: 500 .8rem/1 var(--mono); color: var(--ink);
  background: none; border: 1px solid var(--rule); border-radius: 999px;
  padding: .45rem .75rem; cursor: pointer;
}
.theme svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.theme .moon, [data-theme="dark"] .theme .sun { display: none; }
[data-theme="dark"] .theme .moon { display: inline; }

.tabs {
  display: flex; gap: 1.6rem; overflow-x: auto; scrollbar-width: thin;
  padding: 0 clamp(1rem, 3vw, 2.5rem); border-bottom: 1px solid var(--rule);
}
.tabs a {
  display: inline-flex; align-items: center; flex-shrink: 0; min-height: 44px;
  border-bottom: 2px solid transparent; color: var(--ink-2); text-decoration: none; font-size: .9rem;
}
.tabs a[aria-current="page"] { border-bottom-color: var(--accent); color: var(--ink); font-weight: 600; }
.tabs a:hover { color: var(--accent); }

/* tipografia e etiquetas (Lobby) */
.kicker, .tag, th, .eyebrow { font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
.kicker { color: var(--accent); margin: 0 0 .4rem; }
h1 { font: 400 clamp(1.9rem, 3.2vw, 2.7rem)/1.05 var(--serif); letter-spacing: -.015em; margin: 0; text-wrap: balance; }
h2 { font: 400 clamp(1.4rem, 2vw, 1.8rem)/1.15 var(--serif); letter-spacing: -.01em; margin: 0 0 .8rem; }
h2.pane-title { font: 400 clamp(1.9rem, 3.2vw, 2.7rem)/1.05 var(--serif); letter-spacing: -.015em; margin: 0; text-wrap: balance; } /* título de aba: aparência do h1, semântica h2 */
h3 { font: 600 .98rem/1.4 var(--sans); margin: 0 0 .5rem; }
.tag { display: inline-block; padding: .22rem .5rem; border-radius: 3px; font-size: .66rem; line-height: 1.3; white-space: nowrap; }
.tag-calc { background: var(--ink); color: var(--bg); }
.tag-ill { border: 1px dashed var(--ink-3); color: var(--ink-2); }
.tag-stale { background: var(--warn-bg); color: var(--warn-ink); }

/* botões (Lobby) */
.btn, .btn-ghost, .btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 38px;
  font: 500 .86rem/1 var(--sans); cursor: pointer; border-radius: 3px; padding: .55rem .9rem;
  border: 1px solid var(--ink); color: var(--ink); background: transparent; text-decoration: none; white-space: nowrap;
}
.btn:hover, .btn-ghost:hover { background: var(--ink); color: var(--bg); }
.btn-ghost { border-color: var(--rule); }
.btn-ghost:hover { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
:is(.btn, .btn-ghost, .btn-primary):disabled { background: var(--surface); color: var(--ink-3); border-color: var(--rule); cursor: not-allowed; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--rule); border-radius: 3px; background: transparent; color: var(--ink); cursor: pointer; }
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }
.icon-btn:disabled { color: var(--ink-3); opacity: .5; cursor: not-allowed; }
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 3px; overflow: hidden; }
.seg button { min-height: 36px; padding: 0 .8rem; border: 0; border-right: 1px solid var(--rule); background: transparent; color: var(--ink-2); font: 500 .82rem/1 var(--sans); cursor: pointer; }
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"] { background: var(--soft); color: var(--accent); }
.seg button:disabled { color: var(--ink-3); opacity: .55; cursor: not-allowed; }

/* campos */
input, select, textarea { font: inherit; color: var(--ink); }
.input, select {
  width: 100%; min-height: 38px; padding: .4rem .6rem; background: var(--raised); border: 1px solid var(--rule); border-radius: 3px;
  font-variant-numeric: tabular-nums;
}
.input[aria-invalid="true"] { border-color: var(--err-ink); }
.field-inline { display: inline-flex; flex-direction: column; gap: .2rem; font-size: .72rem; color: var(--ink-3); font-family: var(--mono); letter-spacing: .04em; text-transform: uppercase; }
.field-inline select { min-width: 12rem; text-transform: none; letter-spacing: 0; font: 400 .88rem/1.2 var(--sans); }

/* layout */
main { padding: 0 clamp(1rem, 3vw, 2.5rem) 3rem; max-width: 96rem; margin: 0 auto; }
.pane-head { padding: 1.4rem 0 1rem; }
.case-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 2rem; padding: 1.2rem 0 1rem; }
.case-tags { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .55rem; }
.case-actions { display: flex; flex-wrap: wrap; align-items: end; gap: .8rem; }
.toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: .6rem; padding: .6rem 0; border-top: 1px solid var(--rule); }
.toolbar .spacer { flex: 1; }
.workbench { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1rem; align-items: start; }
.stage-wrap { min-width: 0; }
.stage {
  position: relative; height: clamp(380px, 62vh, 660px); border: 1px solid var(--rule); border-radius: 3px;
  background-color: var(--surface);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px; overflow: hidden;
}
.view2d { position: absolute; inset: 0; overflow: auto; }
.view2d svg { display: block; width: 100%; height: auto; min-height: 100%; user-select: none; -webkit-user-select: none; }
body.asm-dragging { user-select: none; -webkit-user-select: none; cursor: grabbing; }
.view3d { position: absolute; inset: 0; }
.view3d canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.stage-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; padding: .55rem 0; font-size: .82rem; color: var(--ink-3); }
.scale-note { margin: 0; max-width: 46rem; }


/* propriedades */
.props { position: sticky; top: 4.5rem; max-height: calc(100dvh - 5.5rem); overflow: auto; border: 1px solid var(--rule); border-radius: 3px; background: var(--surface); }
.props-inner { padding: 1rem 1rem 1.2rem; }
.props-head { display: flex; align-items: start; gap: .6rem; margin-bottom: .9rem; }
.props-head h2 { margin: 0; font-size: 1.45rem; }
.props-head .id { font: 500 .78rem/1 var(--mono); color: var(--accent); display: block; margin-bottom: .3rem; }
.props-head .icon-btn { margin-left: auto; }
.props-close { display: none; }
.group { border-top: 1px solid var(--rule); padding: .8rem 0 .2rem; }
.group > .eyebrow { color: var(--ink-3); margin: 0 0 .5rem; display: flex; gap: .5rem; align-items: center; }
.field { display: grid; gap: .2rem; margin-bottom: .75rem; }
.field label { font-size: .84rem; font-weight: 500; display: flex; justify-content: space-between; gap: .5rem; }
.field label .sym { font: italic 400 .95rem/1 var(--serif); color: var(--ink-2); }
.field .row { display: flex; align-items: center; gap: .4rem; }
.field .unit { font: 400 .78rem/1 var(--mono); color: var(--ink-3); min-width: 3.4rem; }
.field .help { font-size: .76rem; color: var(--ink-3); margin: 0; line-height: 1.45; }
.field .err { font-size: .78rem; color: var(--err-ink); margin: 0; }
.derived { display: grid; grid-template-columns: 1fr auto; gap: .2rem .8rem; font-size: .84rem; margin: 0 0 .6rem; }
.derived dt { color: var(--ink-3); }
.derived dd { margin: 0; font: 400 .84rem/1.5 var(--mono); text-align: right; font-variant-numeric: tabular-nums; }
.curve-table { width: 100%; border-collapse: collapse; margin-bottom: .5rem; }
.curve-table td { padding: .15rem .2rem; }
.curve-table th { text-align: left; color: var(--ink-3); font-weight: 400; padding: .2rem; }
.item-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.note { font-size: .8rem; color: var(--ink-2); background: var(--bg); border-left: 2px solid var(--rule); padding: .5rem .7rem; margin: .4rem 0 .8rem; }
.note.warn { border-left-color: var(--warn-ink); background: var(--warn-bg); color: var(--warn-ink); }

.legend { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.legend .ramp { width: 160px; height: 10px; border-radius: 2px; background: linear-gradient(90deg, #440154, #3b528b, #21918c, #5ec962, #fde725); }
.legend .lbl { font: 400 .78rem/1 var(--mono); color: var(--ink-2); }

/* 3D */
.view3d .labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.view3d .lbl3d { position: absolute; transform: translate(-50%, -100%); pointer-events: auto; font: 500 11px/1 var(--mono); padding: .25rem .4rem; border: 1px solid var(--rule); border-radius: 3px; background: color-mix(in srgb, var(--surface) 90%, transparent); color: var(--ink); cursor: pointer; white-space: nowrap; }
.view3d .lbl3d[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.view3d .ctl { position: absolute; top: .6rem; right: .6rem; display: flex; gap: .35rem; }
.view3d .ctl .icon-btn { background: var(--surface); }
.view3d .hint { position: absolute; left: .6rem; bottom: .5rem; font-size: .75rem; color: var(--ink-3); margin: 0; background: color-mix(in srgb, var(--surface) 85%, transparent); padding: .2rem .4rem; border-radius: 3px; }
.fallback { position: absolute; inset: 0; display: grid; place-content: center; gap: .8rem; text-align: center; padding: 1.5rem; }

/* resultados */
.block { border-top: 1px solid var(--rule); padding: 1.3rem 0; }
.answer { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; align-items: end; }
.answer .big { font: 400 clamp(2.4rem, 5vw, 3.6rem)/1 var(--serif); }
.answer .big small { font: 400 1rem/1 var(--mono); color: var(--ink-3); margin-left: .35rem; }
.answer .lbl { font: 500 .72rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .4rem; }
.kv { display: flex; flex-wrap: wrap; gap: .8rem 2rem; margin: 1rem 0 0; }
.kv div { min-width: 8rem; }
.kv dt { font: 500 .7rem/1.2 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.kv dd { margin: .2rem 0 0; font: 500 1.05rem/1.2 var(--mono); font-variant-numeric: tabular-nums; }
.interp { max-width: 70ch; padding-left: 1.1rem; }
.interp li { margin: .35rem 0; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: 3px; }
.tbl { width: 100%; border-collapse: collapse; font-size: .86rem; font-variant-numeric: tabular-nums; }
.tbl th { text-align: right; padding: .55rem .7rem; color: var(--ink-3); font-weight: 500; border-bottom: 1px solid var(--rule); background: var(--surface); white-space: nowrap; }
.tbl td { text-align: right; padding: .5rem .7rem; border-bottom: 1px solid var(--rule); white-space: nowrap; font-family: var(--mono); font-size: .82rem; }
.tbl :is(th, td):first-child, .tbl :is(th, td).l { text-align: left; }
.tbl td.l { font-family: var(--sans); }
.tbl tbody tr { cursor: pointer; }
.tbl tbody tr:hover { background: var(--surface); }
.tbl tbody tr[aria-selected="true"] { background: var(--soft); box-shadow: inset 3px 0 var(--accent); }
.tbl tbody tr:focus-visible { outline-offset: -2px; }
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 1.2rem; }
.chart { max-width: 820px; margin: 0; border: 1px solid var(--rule); border-radius: 3px; background: var(--surface); padding: .8rem; min-width: 0; }
.chart figcaption { display: flex; justify-content: space-between; align-items: start; gap: .8rem; margin-bottom: .4rem; }
.chart figcaption strong { font-weight: 600; font-size: .92rem; }
.chart figcaption span { display: block; color: var(--ink-3); font-size: .78rem; }
.chart svg { display: block; width: 100%; height: auto; }
.ax { stroke: var(--ink-3); stroke-width: 1; }
.gridl { stroke: var(--rule); stroke-width: 1; }
.axt { font: 400 10.5px var(--mono); fill: var(--ink-3); }
.axl { font: 500 11px var(--sans); fill: var(--ink-2); }
.ln-geo { fill: none; stroke: var(--ink-2); stroke-width: 2; }
.ln-hgl { fill: none; stroke: var(--tension); stroke-width: 2; stroke-dasharray: 6 4; }
.ln-egl { fill: none; stroke: var(--accent); stroke-width: 2; }
.ln-sys { fill: none; stroke: var(--tension); stroke-width: 2; }
.ln-pump { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 6 4; }
.ln-b { stroke-dasharray: 2 4; }
.pt-op { fill: var(--surface); stroke: var(--ink); stroke-width: 2; }
.bar { fill: var(--cool); }
.bar.pipe { fill: var(--tension); }
.bar.sel { stroke: var(--accent); stroke-width: 2; }
.band-sel { fill: var(--accent); opacity: .1; }
.chart-key { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .76rem; color: var(--ink-2); margin-top: .4rem; }
.chart-key i { display: inline-block; width: 22px; height: 0; border-top: 2px solid; vertical-align: middle; margin-right: .35rem; }
.chart-key i.sw { width: 12px; height: 12px; border: 0; vertical-align: -1px; }
.warnings { margin: .8rem 0 0; padding: 0; list-style: none; }
.warnings li { display: flex; gap: .5rem; align-items: start; font-size: .86rem; padding: .45rem .7rem; background: var(--warn-bg); color: var(--warn-ink); border-radius: 3px; margin-bottom: .35rem; }
.empty { padding: 2.5rem 1rem; text-align: center; color: var(--ink-2); border: 1px dashed var(--rule); border-radius: 3px; }
.empty p { margin: 0 0 1rem; }

/* memorial e relatório: contínuos, sem recolhimento */
.memorial ol { list-style: none; padding: 0; margin: 0; counter-reset: st; }
.memorial li.step { counter-increment: st; padding: 1rem 0; border-bottom: 1px solid var(--rule); scroll-margin-top: 6rem; }
.memorial li.step h3::before { content: counter(st) ". "; color: var(--ink-3); font-family: var(--mono); font-weight: 400; }
.memorial li.step[data-sel="true"] { box-shadow: inset 3px 0 var(--accent); padding-left: .9rem; background: var(--soft); }
.memorial p { margin: .3rem 0; max-width: 78ch; color: var(--ink-2); font-size: .92rem; }
.eq { margin: .6rem 0; padding: .7rem 1rem; border: 1px solid var(--rule); border-left: 3px solid var(--accent); border-radius: 3px; background: var(--surface); font: 400 1.05rem/1.6 "Cambria Math", var(--serif); overflow-x: auto; }
.subst { margin: .4rem 0; padding: .5rem .8rem; border-left: 2px solid var(--rule); background: var(--surface); font: 400 .8rem/1.7 var(--mono); color: var(--ink-2); overflow-wrap: anywhere; }
.export-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

/* comparar e aprender */
.cmp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 1rem; }
.card { border: 1px solid var(--rule); border-radius: 3px; background: var(--surface); padding: 1rem; }
.diff-add { color: var(--ok-ink); }
.diff-del { color: var(--err-ink); }
.learn-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 1rem; }
.gloss { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: .2rem 2rem; }
.gloss dl { margin: 0; padding: .8rem 0; border-bottom: 1px solid var(--rule); }
.gloss dt { font-weight: 600; }
.gloss dd { margin: .2rem 0 0; color: var(--ink-2); font-size: .88rem; }
.choice { display: flex; flex-direction: column; gap: .35rem; margin: .6rem 0; }
.choice label { display: flex; gap: .5rem; align-items: center; font-size: .9rem; }
.reveal { margin-top: .6rem; padding: .7rem .9rem; border-left: 3px solid var(--accent); background: var(--bg); font-size: .9rem; }

/* diálogos */
.sheet { border: 1px solid var(--rule); border-radius: 3px; background: var(--surface); color: var(--ink); padding: 0; width: min(560px, calc(100vw - 2rem)); }
.sheet::backdrop { background: rgba(10, 12, 14, .45); }
.sheet-inner { padding: 1rem 1.2rem 1.3rem; }
.sheet header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.sheet h2 { margin: 0; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .6rem; margin-top: .8rem; }
.lib-item { display: flex; flex-direction: column; align-items: start; gap: .3rem; text-align: left; padding: .8rem; border: 1px solid var(--rule); border-radius: 3px; background: var(--raised); color: var(--ink); cursor: pointer; font: inherit; }
.lib-item:hover { border-color: var(--accent); }
.lib-item span { font-size: .8rem; color: var(--ink-3); }
.lib-item svg { width: 44px; height: 30px; }

@media (max-width: 1100px) { .workbench { grid-template-columns: minmax(0, 1fr) 320px; } }
@media (max-width: 860px) {
  .workbench { grid-template-columns: minmax(0, 1fr); }
  .stage { height: clamp(320px, 58vh, 520px); }
  .props {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 8; max-height: 72dvh;
    border-radius: 8px 8px 0 0; border-bottom: 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, .18);
    transform: translateY(105%); transition: transform .25s ease; visibility: hidden;
  }
  .props.open { transform: none; visibility: visible; }
  .props-close { display: inline-grid; }
  .product { padding-left: .7rem; flex-direction: column; gap: 0; }
  .case-actions { width: 100%; }
  .case-actions .field-inline { flex: 1 1 100%; }
  .case-actions .field-inline select { min-width: 0; }
  .case-actions .btn-primary { flex: 1; }
}
@media (max-width: 520px) {
  .top { gap: .6rem; }
  .top .brand span, .back span, .top .theme .theme-label { display: none; }
  .top .brand interaenge-mark { width: 38px; height: 38px; }
  .product-case { max-width: 9.5rem; }
  .toolbar { gap: .45rem; }
  .toolbar .field-inline { flex: 1 1 8rem; min-width: 0; }
  .toolbar .field-inline select { min-width: 0; }
  .toolbar .spacer { display: none; }
  .toolbar :is(.btn-ghost) { min-height: 36px; padding: .4rem .6rem; font-size: .8rem; }
  .tabs { gap: 1.2rem; }
}

/* ===== movimento: curvas do Lobby ===== */
:root { --ease: cubic-bezier(.16, 1, .3, 1); }
.btn, .btn-ghost, .btn-primary, .icon-btn, .seg button, .chip, .tabs a, .back, .theme, .input, select, .lib-item, .card, .chart {
  transition: color .2s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease), box-shadow .25s var(--ease), transform .2s var(--ease);
}
.btn-primary:active, .btn:active, .btn-ghost:active, .chip:active { transform: translateY(1px); }
.btn-ghost.danger:hover { color: var(--err-ink); border-color: var(--err-ink); }
.input:focus, select:focus { border-color: var(--ink-3); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); outline: none; }
.pane.enter { animation: rise .2s var(--ease); }
.props-inner.enter > * { animation: rise .18s var(--ease) both; }
.props-inner.enter > *:nth-child(2) { animation-delay: .03s; }
.props-inner.enter > *:nth-child(3) { animation-delay: .06s; }
.props-inner.enter > *:nth-child(n+4) { animation-delay: .09s; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.card:hover, .chart:hover { border-color: color-mix(in srgb, var(--ink-3) 45%, var(--rule)); }

/* ===== cabeçalho do caso ===== */
.case-head h1 { font-size: clamp(2.1rem, 3.6vw, 3.1rem); }
.case-head .kicker { letter-spacing: .08em; }

/* ===== barra de ferramentas, interruptor e paleta ===== */
.switch { position: relative; display: inline-flex; align-items: center; gap: .5rem; min-height: 38px; font-size: .84rem; color: var(--ink-2); cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 34px; height: 20px; border-radius: 999px; background: var(--rule); position: relative; transition: background-color .25s var(--ease); flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .25s var(--ease); }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(14px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 3px; }
.palette-bar { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .9rem; padding: .55rem 0 .8rem; }
.palette-bar .eyebrow { color: var(--ink-3); }
.palette { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 38px; padding: .3rem .75rem .3rem .45rem;
  border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); color: var(--ink);
  font: 500 .84rem/1 var(--sans); cursor: grab; touch-action: none; user-select: none;
}
.chip:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); box-shadow: 0 4px 12px -6px rgba(0, 0, 0, .25); }
.chip .glyph { width: 34px; height: 20px; }
.palette-hint { font-size: .8rem; color: var(--ink-3); }
.drag-ghost {
  position: fixed; left: 0; top: 0; z-index: 50; pointer-events: none;
  display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .7rem .4rem .45rem;
  border: 1px solid var(--accent); border-radius: 999px; background: var(--surface); color: var(--accent);
  font: 500 .84rem/1 var(--sans); box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .35);
}
.drag-ghost .glyph { width: 34px; height: 20px; }

/* ===== barra-instrumento: estado + leitura ao vivo ===== */
.status {
  margin: 0 0 .9rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .6rem 1.5rem;
  min-height: 64px; padding: .6rem 1rem; border: 1px solid var(--rule); border-radius: 6px; background: var(--surface);
  transition: background-color .35s var(--ease), border-color .35s var(--ease);
}
.st-msg { display: flex; align-items: center; gap: .65rem; font-size: .9rem; min-width: 0; flex: 1 1 18rem; }
.st-msg .btn-ghost, .st-msg .btn { margin-left: .4rem; }
.st-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); flex: none; }
.status[data-state="calculado"] .st-dot { background: #2f9e6a; box-shadow: 0 0 0 4px rgba(47, 158, 106, .16); }
.status[data-state="calculando"] .st-dot { background: var(--accent); animation: pulse 1s var(--ease) infinite; }
.status:is([data-state="incompleto"], [data-state="desatualizado"]) { background: var(--warn-bg); border-color: transparent; color: var(--warn-ink); }
.status:is([data-state="incompleto"], [data-state="desatualizado"]) .st-dot { background: #c98a14; }
.status:is([data-state="erro"], [data-state="sem-solucao"]) { background: var(--err-bg); border-color: transparent; color: var(--err-ink); }
.status:is([data-state="erro"], [data-state="sem-solucao"]) .st-dot { background: var(--err-ink); }
@keyframes pulse { 50% { transform: scale(1.5); opacity: .5; } }
.metrics { display: flex; align-items: center; gap: 1.6rem; transition: opacity .3s var(--ease); }
.metrics.dim { opacity: .45; }
.metric { display: flex; flex-direction: column; gap: .15rem; min-width: 5.5rem; }
.m-lbl { font: 500 .66rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.m-num { font: 400 1.75rem/1 var(--serif); color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.m-num small { font: 400 .74rem/1 var(--mono); color: var(--ink-3); margin-left: .25rem; }
.m-more { display: inline-flex; align-items: center; gap: .2rem; font: 500 .8rem/1 var(--mono); text-decoration: none; color: var(--ink-2); align-self: center; }
.m-more:hover { color: var(--accent); }

