/* N&K Lab: tokens Dark Tech do briefing, só no Lab (decisão D4 pendente) */
:root {
  --bg: #07111D; --surface: #0E2030; --raised: #132A40; --line: rgba(162, 179, 194, .14);
  --t-1: 160ms; --t-2: 240ms; --t-3: 400ms; --t-4: 700ms;
  --e-in: cubic-bezier(.4,0,1,1); --e-out: cubic-bezier(0,0,.2,1); --e-io: cubic-bezier(.4,0,.2,1);
  --r-sm: 6px; --r-md: 10px; --r-lg: 16px; --cy-a: rgba(39,217,209,.1);
  --cyan: #27D9D1; --cyan-soft: rgba(39, 217, 209, .1); --blue: #467BFF;
  --text: #F4F7FB; --muted: #A2B3C2; --warn: #F2B544; --warn-soft: rgba(242, 181, 68, .1);
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --gutter: clamp(1rem, 4vw, 2.5rem);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 1rem; line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: var(--gutter); top: -4rem; z-index: 10; padding: .6rem 1rem; background: var(--cyan); color: var(--bg); border-radius: 6px; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 1rem; }
.lab-wrap { max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
.label { font-family: var(--mono); font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; line-height: 1.5; color: var(--cyan); }
.label-muted { color: var(--muted); }

/* header / footer */
.lab-header { border-bottom: 1px solid var(--line); }
.lab-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.5rem; }
.lab-brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; }
.lab-brand svg { width: 2.1rem; height: auto; }
.lab-brand b { font-size: 1.15rem; letter-spacing: -.01em; }
.lab-brand b + span { display: block; font-family: var(--mono); font-size: .625rem; letter-spacing: .28em; color: var(--muted); }
.lab-nav { display: flex; align-items: center; gap: .5rem 1.25rem; flex-wrap: wrap; justify-content: flex-end; }
.lab-nav > a:not(.btn) { text-decoration: none; font-size: .9375rem; color: var(--muted); padding-block: .6rem; }
.lab-nav > a:not(.btn):hover, .lab-nav > a[aria-current="page"] { color: var(--text); }
.lab-footer { margin-top: 4rem; padding-block: 2rem; border-top: 1px solid var(--line); font-size: .875rem; color: var(--muted); }
.lab-footer .lab-wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 2rem; }
.lab-footer a { color: var(--text); }
.crumbs { padding-block: 1.5rem 1rem; font-size: .875rem; color: var(--muted); }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; }
.crumbs li { display: inline-flex; align-items: center; min-height: 44px; font-size: inherit; line-height: 1.55; }
.crumbs li + li::before { content: "/"; content: "/" / ""; margin-right: .5rem; color: var(--line); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--text); }
.crumbs a,.lab-footer a,.lab-nav a,.chip span { display:inline-flex;align-items:center;min-height:44px;min-width:44px; }
.lab-brand b + span,small,thead th,.status,.step-lane { font-size:max(12px, .75rem); }
.demo { border-radius:var(--r-lg);box-shadow:inset 0 1px 0 rgba(244,247,251,.05),0 16px 40px -24px rgba(0,0,0,.7); }
.chip,.hub-card,.step { border-radius:var(--r-md); }
.cmp-tabs [aria-selected="true"],.val-tabs [aria-selected="true"] { background:var(--cy-a);border-color:var(--cyan);box-shadow:inset 0 -2px 0 var(--cyan); }
.svc-demo-links { display:flex;gap:16px;flex-wrap:wrap; }

/* buttons, chips */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: .6rem 1.1rem; border: 1px solid var(--line); border-radius: 4px; background: transparent; font-weight: 600; font-size: .9375rem; line-height: 1.2; cursor: pointer; text-decoration: none; color: var(--text); }
.btn:hover:not(:disabled) { border-color: var(--muted); }
.btn-primary { background: var(--cyan); border-color: var(--cyan); color: var(--bg); }
.btn-primary:hover:not(:disabled) { background: #5FE5DF; border-color: #5FE5DF; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-cta { border-color: var(--cyan); color: var(--cyan); }
.btn-cta:hover { background: var(--cyan-soft); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { position: relative; }
.chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-height: 2.5rem; padding: .45rem .8rem; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); font-size: .875rem; }
.chip input:checked + span { border-color: var(--cyan); background: var(--raised); box-shadow: inset 3px 0 0 var(--cyan); }
.chip input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 2px; }
.chip input:disabled { cursor: not-allowed; }
.chip input:disabled + span { opacity: .55; }

/* hub */
.hub-head { display: grid; gap: 1rem; max-width: 70ch; padding-block: 1rem 2.5rem; }
.hub-head h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem); letter-spacing: -.03em; line-height: 1.1; }
.hub-head p:not(.label) { color: var(--muted); font-size: 1.0625rem; }
.hub-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; }
.hub-card { display: flex; flex-direction: column; gap: .6rem; height: 100%; padding: 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.hub-card h2 { font-size: 1.25rem; letter-spacing: -.015em; line-height: 1.3; }
.hub-card p { color: var(--muted); font-size: .9375rem; }
.hub-card .btn { align-self: flex-start; margin-top: auto; }
.hub-card .soon { font-family: var(--mono); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* demo shell (contract shared by every Lab demo) */
.demo { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: clamp(1.1rem, 3vw, 2rem); }
.demo-head { display: grid; gap: .75rem; max-width: 72ch; }
.demo-head h1, .demo-head h2 { font-size: clamp(1.5rem, 1.15rem + 1.5vw, 2.25rem); font-weight: 700; letter-spacing: -.025em; line-height: 1.15; text-wrap: balance; }
.demo-head .lead { color: var(--muted); font-size: 1.0625rem; }
.tag-fict { justify-self: start; padding: .25rem .6rem; border: 1px solid rgba(242, 181, 68, .5); border-radius: 4px; color: var(--warn); font-family: var(--mono); font-size: .8125rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.controls { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 2rem; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.variant { border: 0; margin: 0; padding: 0; min-width: 0; }
.variant legend { padding: 0; margin-bottom: .5rem; font-size: .875rem; font-weight: 600; }
.variant legend small { font-weight: 400; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.actions .btn-primary { min-width: 10.5rem; }
.live { margin-top: 1rem; min-height: calc(2 * 1.55em); font-size: .9375rem; color: var(--muted); }
.demo-note { margin-top: 1.25rem; font-size: .8125rem; color: var(--muted); max-width: 90ch; }
.summary { margin-top: 1.25rem; padding: 1.1rem 1.25rem; border: 1px solid var(--line); border-radius: 10px; display: grid; gap: .75rem; }
.summary.is-done { border-color: var(--cyan); background: var(--cyan-soft); }
.summary h2 { font-size: 1.125rem; letter-spacing: -.01em; }
.summary h2:focus { outline: none; }
.summary p { min-height: calc(2 * 1.55em); color: var(--muted); }
.summary.is-done p { color: var(--text); }
.summary .row { display: flex; flex-wrap: wrap; gap: .5rem; }
.summary .is-off { visibility: hidden; }

/* RPA demo: pipeline, stage (inbox | check | result), log */
.pipeline { display: flex; align-items: stretch; margin-top: 1.25rem; }
.pipeline li { flex: 1 1 0; min-width: 0; padding: .7rem .6rem; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); text-align: center; font-weight: 600; font-size: .9375rem; line-height: 1.3; }
.pipeline li small { display: block; margin-top: .15rem; font-weight: 400; font-size: .8125rem; color: var(--muted); }
.pipeline li + li { margin-left: 1.75rem; position: relative; }
.pipeline li + li::before { content: ""; position: absolute; left: -1.5rem; top: 50%; width: 1.25rem; height: 1px; background: var(--muted); opacity: .6; }
.pipeline li[aria-current="step"] { border-color: var(--cyan); background: var(--raised); box-shadow: inset 0 -3px 0 var(--cyan); }
.pipeline li[aria-current="step"] small { color: var(--cyan); }

.stage { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) minmax(0, 4fr); gap: 1rem; margin-top: 1rem; }
.panel { min-width: 0; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 1rem; }
.panel > h2, .panel > h3 { margin-bottom: .6rem; }
.inbox li { display: grid; grid-template-columns: minmax(0, 1fr) 6.5rem; gap: 0 .6rem; align-items: center; padding: .55rem .5rem; border-bottom: 1px solid var(--line); border-radius: 4px; }
.inbox li:last-child { border-bottom: 0; }
.inbox li.is-current { background: var(--raised); box-shadow: inset 3px 0 0 var(--cyan); }
.doc-id { font-family: var(--mono); font-size: .8125rem; font-weight: 700; }
.doc-meta { grid-column: 1; font-size: .8125rem; color: var(--muted); overflow-wrap: anywhere; }
.status { grid-column: 2; grid-row: 1 / span 2; justify-self: stretch; text-align: center; padding: .2rem .3rem; border: 1px solid var(--line); border-radius: 3px; font-family: var(--mono); font-size: .6875rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.status[data-s="run"] { border-color: var(--blue); background: rgba(70, 123, 255, .2); color: var(--text); }
.status[data-s="ok"] { border-color: var(--cyan); color: var(--cyan); }
.status[data-s="exc"] { border-color: var(--warn); color: var(--warn); }

.check-title { font-weight: 600; margin-bottom: .5rem; min-height: 1.55em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: .875rem; }
caption { text-align: left; }
col.c-item { width: 26%; } col.c-nf, col.c-erp { width: 26%; } col.c-res { width: 22%; }
th, td { padding: .45rem .4rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: break-word; }
tbody th, tbody td { height: calc(2 * 1.4em + .9rem); line-height: 1.4; }
thead th { font-family: var(--mono); font-size: .6875rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
tbody th { font-weight: 600; }
td.res { color: var(--muted); }
td.res[data-r="ok"] { color: var(--cyan); }
td.res[data-r="fail"] { color: var(--warn); font-weight: 600; }
td.res small { display: block; font-size: .75rem; color: var(--muted); font-weight: 400; }
.rules { margin-top: .9rem; font-size: .875rem; color: var(--muted); }
.rules summary { cursor: pointer; color: var(--text); font-weight: 600; min-height: 2.25rem; display: flex; align-items: center; }
.rules ol { list-style: decimal; padding-left: 1.25rem; display: grid; gap: .2rem; }

.panel-out { display: flex; flex-direction: column; }
.counters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.counters div { padding: .6rem; border: 1px solid var(--line); border-radius: 6px; }
.counters dt { font-size: .75rem; color: var(--muted); line-height: 1.3; }
.counters dd { font-size: 1.75rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.counters .c-ok dd { color: var(--cyan); }
.counters .c-exc dd { color: var(--warn); }
.out-title { margin-top: 1rem; margin-bottom: .35rem; }
.out-box { flex: 1 1 0; min-height: 5.5rem; overflow-y: auto; border-top: 1px solid var(--line); }
.out-list li { padding: .45rem 0; border-bottom: 1px dashed var(--line); font-size: .875rem; }
.out-list li:last-child { border-bottom: 0; }
.out-list .empty { color: var(--muted); }
.exc-list li:not(.empty) { padding-left: .6rem; border-left: 2px solid var(--warn); border-bottom: 0; margin-top: .4rem; background: var(--warn-soft); }
.out-list b { font-family: var(--mono); font-size: .8125rem; }
.out-list span { display: block; color: var(--muted); }

.log { margin-top: 1rem; }
.log-box { height: 9.5rem; overflow-y: auto; margin-top: .4rem; padding: .6rem .8rem; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; font-family: var(--mono); font-size: .75rem; line-height: 1.6; color: var(--muted); }
.log-box li { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); gap: .5rem; }
.log-box li.ok { color: var(--cyan); }
.log-box li.exc { color: var(--warn); }

@media (prefers-reduced-motion: no-preference) {
  .pipeline li, .inbox li, .status, td.res, .btn, .chip span, .summary { transition: background-color var(--t-2) var(--e-out), border-color var(--t-2) var(--e-out), color var(--t-2) var(--e-out), box-shadow var(--t-2) var(--e-out); }
  .out-list li.is-new, .log-box li.is-new { animation: lab-rise var(--t-3) var(--e-out) backwards; }
  @keyframes lab-rise { from { opacity: 0; } }
}

@media (max-width: 960px) {
  .stage { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .panel-check { grid-column: 1 / -1; grid-row: 1; }
}
@media (max-width: 640px) {
  .lab-header-inner { min-height: 3.75rem; }
  .lab-nav > a:not(.btn) { display: none; }
  .stage { grid-template-columns: minmax(0, 1fr); }
  .panel-check { grid-row: auto; }
  .panel-inbox { order: -1; }
  .out-box { flex: 0 0 auto; height: 7.5rem; }
  .out-box-ok { height: 10rem; }
  .pipeline { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
  .pipeline li + li { margin-left: 0; }
  .pipeline li + li::before { display: none; }
  .actions, .actions .btn { width: 100%; }
  .actions .btn { flex: 1 1 auto; }
  .controls { align-items: stretch; }
  .panel { padding: .85rem .7rem; }
  .live { min-height: calc(3 * 1.55em); }
  .summary p { min-height: calc(6 * 1.55em); }
  table { font-size: .75rem; }
  th, td { padding: .4rem .25rem; }
  tbody th, tbody td { height: calc(3 * 1.4em + .8rem); }
  thead th { letter-spacing: .02em; font-size: .625rem; }
  col.c-item { width: 28%; } col.c-nf, col.c-erp { width: 25%; } col.c-res { width: 22%; }
}
/* Shared minimums for all three demos. */ .lab-brand b + span,.status,thead th,small{font-size:12px}.crumbs a{min-width:44px}.lab-footer a{min-height:44px}
