/* Demonstração do contrato A100000 — usa as variáveis de styles.css */
.a1-code { background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 14px 16px; overflow-x: auto; font-size: .82rem; line-height: 1.5; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; margin: 0 0 1.4em; }
.a1-refs li { font-size: .95rem; }

.a1-sec { padding: 8px 0 24px; }
.a1-h2 { font-size: 1.5rem; letter-spacing: -0.015em; margin: 8px 0 8px; }
.a1-intro { font-family: var(--font-text); color: var(--muted); max-width: 80ch; line-height: 1.65; margin: 0 0 18px; }
.a1-intro strong { color: var(--ink); font-family: var(--font-ui); }

.a1 { display: grid; grid-template-columns: minmax(270px, 320px) minmax(0, 1fr); gap: 20px; align-items: start; }
.a1-form { background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 18px; position: sticky; top: 12px; }
.a1-form fieldset { border: 0; margin: 0 0 12px; padding: 0 0 12px; border-bottom: 1px solid var(--rule); }
.a1-form fieldset:last-of-type { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.a1-form legend { font-weight: 800; font-size: .95rem; margin: 0 0 8px; padding: 0; }
.a1-form label { display: block; font-size: .85rem; color: var(--muted); margin: 0 0 10px; }
.a1-form input[type="text"], .a1-form input[type="number"], .a1-form select { display: block; width: 100%; margin-top: 4px; font: inherit; font-size: .98rem; color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; padding: 8px 10px; font-variant-numeric: tabular-nums; }
.a1-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.a1-row3 { grid-template-columns: 1fr 1fr 1fr; }
.a1-form .a1-check { display: flex; gap: 8px; align-items: flex-start; color: var(--ink); }
.a1-form .a1-check input { margin-top: 3px; }
.a1-hint { font-size: .78rem; color: var(--muted); margin: -4px 0 8px; line-height: 1.45; }

.a1-out { min-width: 0; }
.a1-erros { background: #fbeae6; border: 1px solid var(--heat-5); border-radius: 6px; padding: 10px 14px; margin: 0 0 12px; font-size: .92rem; }
.a1-resumo { font-family: var(--font-text); background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 12px 16px; margin: 0 0 12px; line-height: 1.55; }
.a1-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 8px; }
.a1-kpi { background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 14px 16px; min-width: 0; }
.a1-k-label { color: var(--muted); font-size: .85rem; }
.a1-k-val { font-size: clamp(1.05rem, 1.5vw, 1.4rem); font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-top: 2px; white-space: nowrap; }
.a1-pior { color: var(--muted); font-size: .85rem; margin: 0 0 12px; }
.a1-pos { color: #2f6b45; }
.a1-neg { color: var(--heat-5); }

.a1-conc { border-radius: 8px; padding: 12px 16px; margin: 0 0 12px; line-height: 1.55; font-size: .95rem; border: 1px solid var(--rule); background: var(--surface); }
.a1-conc-ok { border-left: 6px solid var(--heat-1); }
.a1-conc-erro { border-left: 6px solid var(--heat-5); background: #fbeae6; }

.a1-card { background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 18px; margin-bottom: 12px; }
.a1-card h3 { font-size: 1.1rem; margin: 0 0 6px; }
.a1-sub { color: var(--muted); font-size: .85rem; margin: 0 0 8px; }
.a1-sw { display: inline-block; width: 12px; height: 10px; border-radius: 2px; margin: 0 5px 0 0; vertical-align: -1px; }
.a1-sw-bar { background: var(--heat-3); }
.a1-sw-pos { background: var(--heat-1); }
.a1-sw-line { background: var(--link); height: 3px; vertical-align: 2px; margin-left: 10px; }
.a1-chart svg { display: block; overflow: visible; }
.a1-chart text { font-family: var(--font-ui); font-size: 12px; fill: var(--muted); }
.a1-chart .grid { stroke: var(--rule); }
.a1-chart .a1-zero { stroke: var(--muted); stroke-width: 1; }
.a1-chart .a1-bar-pos { fill: var(--heat-1); }
.a1-chart .a1-bar-neg { fill: var(--heat-3); }
.a1-chart .a1-linha { fill: none; stroke: var(--link); stroke-width: 2.5; }

.a1-tablewrap { overflow: auto; max-height: 460px; border-top: 1px solid var(--rule); }
.a1-table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.a1-table th { position: sticky; top: 0; background: var(--surface); text-align: left; font-weight: 700; color: var(--muted); padding: 8px 5px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.a1-table td { padding: 6px 5px; border-bottom: 1px solid var(--rule); white-space: nowrap; font-variant-numeric: tabular-nums; }
.a1-table .n { text-align: right; }

[hidden] { display: none !important; }

@media (max-width: 960px) {
  .a1 { grid-template-columns: 1fr; }
  .a1-form { position: static; }
  .a1-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
