/* Proposta COGNIX[SE] · Controle de entregas do PCM (bp bioenergy)
   Look: the client's colours as bp.com uses them: always light (no dark theme: the brand
   is light, owner 11/11), white and the greys #f7f7f7 / #e9e9e9, ink #252530, Roboto with
   light headings, a short yellow rule above each heading, green #007f00 for the active
   item and the main button. Green and yellow never fill a large area (owner, 11/11).
   Status colours measured with the dataviz validator: crimson #e11d48 keeps 8.4 dE from
   the green under deuteranopia. */

/* ---------- tokens ---------- */
:root {
  color-scheme: only light;
  --bg: #ffffff;
  --bg-soft: #f7f7f7;
  --surface: #ffffff;
  --line: #e9e9e9;
  --line-strong: #c6c6c6;
  --ink: #252530;
  --ink-2: #4a4a57;
  --muted: #666666;
  --brand: #007f00;
  --brand-deep: #006400;
  --on-brand: #ffffff;
  --brand-tint: #e9f4e7;
  --link: #007f00;
  --yellow: #ffe600;
  --on-yellow: #252530;
  --band: #252530;
  --on-band: #ffffff;
  --on-band-2: #c9c9d2;
  --band-line: #4a4a57;
  --focus: #0064cc;
  --font: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --mono: "Roboto Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --display: "Red Hat Display", "Roboto", system-ui, sans-serif;
  --wrap: 1120px;
  --gut: 16px;
  --ctl: 44px;
}
@media (min-width: 720px) {
  :root { --gut: 32px; }
}
/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
a { color: var(--link); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.vh {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.d-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }

/* ---------- top bar ---------- */
.top { border-bottom: 1px solid var(--line); background: var(--bg); }
.top-in {
  max-width: var(--wrap); margin: 0 auto; padding: 10px var(--gut);
  display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap;
}
.lock { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; text-decoration: none; color: var(--ink); }
.lock img { width: 28px; height: 28px; display: block; }
.lock-name { font: 700 17px/1 var(--display); letter-spacing: 0.01em; }
.lock-name b { color: #2563eb; font-weight: 700; }
.top-doc { margin: 0; color: var(--muted); font-size: 14px; }
.aud { margin-left: auto; display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; padding: 2px; gap: 2px; }
.aud button {
  height: 44px; padding: 0 14px; border: 0; border-radius: 6px; background: transparent;
  color: var(--ink-2); font-weight: 500; font-size: 14px; cursor: pointer; white-space: nowrap;
}
.aud button[aria-selected="true"] { background: var(--brand); color: #ffffff; }
/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--ctl); padding: 0 18px; border-radius: 6px; border: 1px solid transparent;
  font-weight: 500; font-size: 15px; line-height: 1; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn-primary { background: var(--brand); color: #ffffff; }
.btn-primary:hover { background: var(--brand-deep); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn[disabled] { opacity: 0.55; cursor: default; }

/* ---------- hero ---------- */
.hero { background: var(--bg-soft); color: var(--ink); border-bottom: 1px solid var(--line); }
.hero-in { padding-top: 44px; padding-bottom: 0; }
.hero-top { display: grid; gap: 32px; }
.hero-card { display: none; }
@media (min-width: 960px) {
  .hero-top { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: center; }
  .hero-card { display: block; background: #ffffff; color: #252530; border: 1px solid #c6c6c6; border-radius: 12px; padding: 24px; font-size: 14px; line-height: 1.4; }
}
.hc-k { display: block; margin-bottom: 6px; font-size: 12px; color: #666666; }
.hc-mail b { display: block; font-weight: 500; font-size: 15px; }
.hc-subj { display: block; margin-top: 8px; padding: 8px 10px; border-radius: 6px; background: #f3f3f3; font: 500 12px/1.45 var(--mono); overflow-wrap: anywhere; }
.hc-arrow { position: relative; width: 2px; height: 24px; margin: 14px 0 14px 13px; background: #b9b9b9; }
.hc-arrow::after { content: ""; position: absolute; left: -4px; bottom: 0; width: 8px; height: 8px; border-right: 2px solid #b9b9b9; border-bottom: 2px solid #b9b9b9; transform: rotate(45deg); }
.hc-line { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.hc-line b { font-weight: 500; font-size: 15px; }
.hc-then { color: #666666; }
.hero-eye { margin: 0 0 18px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.hero-eye::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 10px; border-radius: 2px; background: var(--link); }
.hero h1 {
  margin: 0; max-width: 17ch;
  font-weight: 300; font-size: clamp(34px, 6.2vw, 62px); line-height: 1.06; letter-spacing: -0.015em;
}
.hero h1 mark { background: none; color: inherit; text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 0.1em; text-underline-offset: 0.22em; text-decoration-skip-ink: none; }
.hero-lead { margin: 22px 0 0; max-width: 62ch; font-size: clamp(17px, 1.6vw, 19px); line-height: 1.55; color: var(--ink-2); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.facts {
  margin: 44px 0 0; padding: 0; list-style: none;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
}
.facts li { padding: 18px 16px 22px 0; }
.facts li:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line-strong); }
.facts li:nth-child(n + 3) { border-top: 1px solid var(--line-strong); }
.facts strong { display: block; font-weight: 500; font-size: clamp(18px, 1.8vw, 21px); line-height: 1.2; }
.facts span { display: block; margin-top: 6px; font-size: 14px; line-height: 1.4; color: var(--muted); }
@media (min-width: 860px) {
  .hero-in { padding-top: 72px; }
  .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 64px; }
  .facts li, .facts li:nth-child(even) { padding: 20px 20px 26px 0; border-left: 0; }
  .facts li + li, .facts li:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--line-strong); }
  .facts li:nth-child(n + 3) { border-top: 0; }
}

/* ---------- sections ---------- */
.d-sec { padding: 56px 0; }
.d-sec.soft { background: var(--bg-soft); }
@media (min-width: 860px) { .d-sec { padding: 84px 0; } }
.d-num { margin: 0 0 12px; font: 500 14px/1 var(--font); color: var(--muted); }
.d-num::before { content: ""; display: block; width: 72px; height: 3px; margin-bottom: 16px; background: var(--yellow); }
.nw { white-space: nowrap; }
.d-sec h2 { margin: 0; font-weight: 400; font-size: clamp(26px, 3.4vw, 38px); line-height: 1.15; letter-spacing: -0.01em; max-width: 34ch; }
.d-intro { margin: 16px 0 0; max-width: 64ch; color: var(--ink-2); font-size: 17px; }
.d-body { margin-top: 32px; }
.steps.d-body, .phases.d-body, .needs.d-body { margin-top: 36px; }
.d-note { margin: 20px 0 0; max-width: 72ch; color: var(--muted); font-size: 14px; }

/* understood */
.und { display: grid; gap: 28px; }
.und-quote { margin: 0; }
.und-quote p { margin: 0; font-weight: 300; font-size: clamp(24px, 3vw, 34px); line-height: 1.2; letter-spacing: -0.01em; }
.und-quote mark { background: none; color: inherit; text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 0.12em; text-underline-offset: 0.18em; text-decoration-skip-ink: none; }
.und-quote footer { margin-top: 14px; color: var(--muted); font-size: 14px; }
.ticks { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.ticks li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start; }
.ticks svg { width: 22px; height: 22px; margin-top: 2px; color: var(--link); }
@media (min-width: 860px) { .und { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; } }

/* steps */
.steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 0; counter-reset: st; }
.steps > li { position: relative; padding: 0 0 28px 44px; counter-increment: st; }
.steps > li::before {
  content: counter(st); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; background: var(--ink); color: var(--bg); font: 500 14px/1 var(--font);
}
.steps > li::after { content: ""; position: absolute; left: 13.5px; top: 34px; bottom: 6px; width: 1px; background: var(--line-strong); }
.steps > li:last-child { padding-bottom: 0; }
.steps > li:last-child::after { display: none; }
.steps h3 { margin: 2px 0 6px; font-size: 18px; font-weight: 500; line-height: 1.3; }
.steps p { margin: 0; color: var(--ink-2); font-size: 15px; }
.st-vis { margin-top: 12px; min-height: 0; }
@media (min-width: 960px) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
  .steps > li { padding: 44px 0 0 0; }
  .steps > li::after { left: 36px; right: -22px; top: 13.5px; bottom: auto; width: auto; height: 1px; }
}
.subj {
  display: inline-block; max-width: 100%; padding: 6px 8px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface);
  font: 500 12px/1.4 var(--mono); color: var(--ink); overflow-wrap: anywhere;
}
.subj b { background: var(--yellow); color: var(--on-yellow); font-weight: 500; padding: 0 2px; border-radius: 2px; }
.mini-row { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; padding: 6px 8px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); font: 400 12px/1.4 var(--mono); color: var(--ink); }
.mini-cells { display: inline-flex; align-items: center; gap: 6px; }
.mini-cells b { font-weight: 500; font-size: 15px; margin-left: 6px; }
.priv { margin: 32px 0 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-soft); max-width: 78ch; font-size: 15px; color: var(--ink-2); }
.d-sec.soft .priv { background: var(--surface); }

/* ---------- status marks (shared by the workbook and the legend) ---------- */
.mk { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; flex: none; }
.mk svg { width: 16px; height: 16px; display: block; }
.mk.ok { background: transparent; color: #007f00; }
.mk.ok svg { width: 19px; height: 19px; }
.mk.late { background: #ffe600; color: #252530; }
.mk.miss { background: #e11d48; color: #ffffff; }
.mk.wait { background: transparent; }
.mk.wait::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid #8a8a8a; }
.mk.none::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: #a3a3a3; }
.mk.sm { width: 20px; height: 20px; border-radius: 5px; }
.mk.sm svg { width: 12px; height: 12px; }
.mk.sm.ok svg { width: 15px; height: 15px; }
.mk.sm.wait::before { width: 12px; height: 12px; }

/* ---------- demo ---------- */
.demo { display: grid; gap: 20px; margin-top: 32px; }
@media (min-width: 1000px) { .demo { grid-template-columns: 312px minmax(0, 1fr); gap: 24px; align-items: start; } }
.sim { border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); padding: 18px; }
@media (min-width: 1000px) { .sim { position: sticky; top: 16px; } }
.sim-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sim-head p { margin: 0; font-size: 14px; color: var(--muted); }
.sim-clock { font: 500 28px/1 var(--mono); color: var(--ink); letter-spacing: -0.02em; }
.sim-box { margin: 16px 0 0; }
.sim-box h3 { margin: 0 0 8px; font-size: 13px; font-weight: 500; color: var(--muted); }
.inbox { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.inbox li { padding: 9px 10px; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 2px 8px; font-size: 13px; line-height: 1.35; }
.inbox li + li { border-top: 1px solid var(--line); }
.inbox time { font: 500 12px/1.5 var(--mono); color: var(--muted); grid-row: span 2; }
.inbox b { font-weight: 500; }
.inbox span { font: 400 11px/1.4 var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.inbox li.is-new { background: var(--brand-tint); }
.inbox li.is-empty { display: block; color: var(--muted); }
.sim-cap { margin: 14px 0 0; min-height: 4.2em; font-size: 15px; line-height: 1.4; color: var(--ink); }
.sim-ctl { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.sim-step { margin: 0 0 0 auto; font-size: 13px; color: var(--muted); }

/* format switch above the workbook */
.wb-col { min-width: 0; }
.wb-col > .d-note { margin-top: 12px; }
.fmt { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 0 0 12px; }
.fmt-l { font-size: 14px; color: var(--muted); }
.fmt-seg { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line-strong); border-radius: 8px; }
.fmt-seg button { height: 44px; padding: 0 16px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-2); font-weight: 500; font-size: 14px; cursor: pointer; }
.fmt-seg button[aria-pressed="true"] { background: var(--brand); color: #ffffff; }

/* ---------- workbook: always light, like the real file ---------- */
.wb {
  --wb-ink: #252530; --wb-muted: #666666; --wb-line: #e0e0e0; --wb-head: #f3f3f3; --wb-grp: #f5f5f5;
  margin: 0; min-width: 0; border: 1px solid #b9b9b9; border-radius: 10px; overflow: hidden;
  background: #ffffff; color: var(--wb-ink); font-size: 13px; line-height: 1.35;
  color-scheme: light;
  container: wb / inline-size;
}
.wb :focus-visible { outline: 2px solid #0064cc; outline-offset: 1px; border-radius: 4px; }
.wb-bar { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: #f3f3f3; color: #252530; border-bottom: 1px solid var(--wb-line); }
.wb-ico { width: 20px; height: 20px; flex: none; display: block; }
.wb-file { font-weight: 500; font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-saved { margin-left: auto; font-size: 12px; white-space: nowrap; color: #666666; }
.wb-tag { padding: 2px 7px; border-radius: 4px; background: #ffe600; color: #252530; font-size: 11px; font-weight: 500; white-space: nowrap; }
.wb-fx { display: flex; align-items: stretch; border-bottom: 1px solid var(--wb-line); background: #ffffff; font: 400 12px/1.4 var(--mono); color: var(--wb-ink); }
.wb-ref { flex: none; width: 52px; padding: 7px 8px; border-right: 1px solid var(--wb-line); text-align: center; }
.wb-fxl { flex: none; padding: 7px 8px; color: var(--wb-muted); font-style: italic; border-right: 1px solid var(--wb-line); }
.wb-formula { flex: 1; min-width: 0; padding: 7px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-pane { padding: 14px 12px 16px; min-height: 340px; }
.wb-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0 0 12px; }
.wb-h h3 { margin: 0; font-size: 16px; font-weight: 500; color: var(--wb-ink); }
.wb-h p { margin: 0; color: var(--wb-muted); font-size: 13px; }
.wb-tabs { display: flex; gap: 0; border-top: 1px solid var(--wb-line); background: var(--wb-head); overflow-x: auto; }
.wb-tabs button {
  flex: none; height: 44px; padding: 0 16px; border: 0; border-right: 1px solid var(--wb-line); background: transparent;
  color: #4a4a57; font-size: 13px; cursor: pointer; box-shadow: none;
}
.wb-tabs button[aria-selected="true"] { background: #ffffff; color: #252530; font-weight: 500; box-shadow: inset 0 -3px 0 #007f00; }

/* system layout: the same workbook with a side menu, no formula bar, no sheet tabs */
.wb-nav { display: none; }
.wb.is-app .wb-fx, .wb.is-app .wb-tabs { display: none; }
.wb.is-app .wb-body { display: grid; grid-template-columns: 152px minmax(0, 1fr); }
.wb.is-app .wb-nav { display: flex; flex-direction: column; padding: 10px 0; background: #ffffff; border-right: 1px solid var(--wb-line); }
.wb-nav button { height: 48px; padding: 0 16px; border: 0; background: transparent; color: #252530; font-size: 14px; text-align: left; cursor: pointer; }
.wb-nav button[aria-current="page"] { background: #007f00; color: #ffffff; font-weight: 500; }
.wb.is-app .wb-pane { padding: 18px 18px 20px; }
.wb.is-app.is-compact .wb-body { display: block; }
.wb.is-app.is-compact .wb-nav { flex-direction: row; padding: 0; border-right: 0; border-bottom: 1px solid var(--wb-line); }
.wb.is-app.is-compact .wb-nav button { flex: 1 1 0; min-width: 0; padding: 0 4px; font-size: 13px; text-align: center; }
.wb.is-app.is-compact .wb-pane { padding: 14px 10px 16px; }
.acard { margin-top: 14px; border: 1px solid var(--wb-line); border-radius: 4px; overflow: hidden; }
.acard-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; padding: 10px 14px; background: #f5f5f5; border-bottom: 1px solid var(--wb-line); }
.acard-h b { font-weight: 500; font-size: 14px; color: var(--wb-ink); }
.acard-h span { font-size: 12px; color: var(--wb-muted); }
.agrid { width: 100%; border-collapse: collapse; table-layout: fixed; }
.agrid th, .agrid td { padding: 0; border-bottom: 1px solid var(--wb-line); }
.agrid tbody tr:last-child th, .agrid tbody tr:last-child td { border-bottom: 0; }
.agrid thead th { height: 40px; font-size: 12px; font-weight: 500; color: var(--wb-ink); text-align: center; }
.agrid thead th small { display: block; font-weight: 400; font-size: 11px; color: var(--wb-muted); }
.agrid thead th.g-name { text-align: left; padding-left: 14px; color: var(--wb-muted); font-weight: 400; }
.agrid thead th.g-wk { text-align: right; padding-right: 14px; color: var(--wb-muted); font-weight: 400; }
.agrid thead th.is-today { background: #252530; color: #ffffff; }
.agrid thead th.is-today small { color: #ffffff; }
.agrid col.c-day { width: 56px; }
.agrid col.c-wk { width: 76px; }
.agrid th.u { padding: 6px 14px; text-align: left; font-weight: 400; color: var(--wb-ink); }
.agrid th.u small { display: none; font-size: 11px; color: var(--wb-muted); }
.agrid td.d { height: 44px; text-align: center; }
.agrid td.d.is-today { background: #ececec; }
.agrid td.wk { padding-right: 14px; text-align: right; font-variant-numeric: tabular-nums; color: var(--wb-ink); }
.agrid.compact col.c-day { width: 45px; }
.agrid.compact th.u { padding: 4px 8px; }
.agrid.compact th.u small { display: block; }
.agrid.compact thead th.g-name { padding-left: 8px; }
.wb.is-app .dash2 .blk, .wb.is-app .trend { padding: 14px; border: 1px solid var(--wb-line); border-radius: 4px; }
.sheet.app th, .sheet.app td { border-left: 0; border-right: 0; }
.sheet.app thead th { background: transparent; border-top: 0; color: var(--wb-muted); font-weight: 400; }

/* control grid */
.grid { width: 100%; border-collapse: collapse; table-layout: fixed; }
.grid th, .grid td { border: 1px solid var(--wb-line); padding: 0; }
.grid thead th { background: var(--wb-head); color: var(--wb-ink); font-weight: 500; font-size: 12px; height: 40px; text-align: center; }
.grid thead th.g-name, .grid thead th.g-resp { text-align: left; padding: 0 10px; }
.grid thead th small { display: block; font-weight: 400; color: var(--wb-muted); font-size: 11px; }
.grid thead th.is-today { background: #252530; color: #ffffff; }
.grid thead th.is-today small { color: #ffffff; }
.grid col.c-rn { width: 30px; }
.grid col.c-resp { width: 104px; }
.grid col.c-lim { width: 58px; }
.grid col.c-day { width: 52px; }
.grid col.c-wk { width: 60px; }
.grid td.rn { background: var(--wb-head); color: var(--wb-muted); text-align: center; font-size: 11px; }
.grid tr.grp th { background: var(--wb-grp); text-align: left; padding: 8px 10px; font-weight: 500; color: var(--wb-ink); }
.grid tr.grp th span { font-weight: 400; color: var(--wb-muted); margin-left: 8px; white-space: nowrap; }
.grid th.u { text-align: left; padding: 6px 10px; font-weight: 400; color: var(--wb-ink); }
.grid th.u small { display: none; color: var(--wb-muted); font-size: 11px; }
.grid td.resp, .grid td.lim { padding: 0 10px; color: var(--wb-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grid td.lim { text-align: center; padding: 0; font-variant-numeric: tabular-nums; }
.grid td.wk { text-align: right; padding: 0 10px; font-variant-numeric: tabular-nums; color: var(--wb-ink); }
.grid td.d { height: 44px; text-align: center; }
.grid td.d.is-today { background: #ececec; }
.cellb { display: grid; place-items: center; width: 100%; height: 44px; border: 0; background: transparent; padding: 0; cursor: pointer; }
.cellb[aria-pressed="true"] { box-shadow: inset 0 0 0 2px #007f00; }
.cellb.flash .mk { animation: mkpop 0.5s ease-out; }
@keyframes mkpop { 0% { transform: scale(0.6); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .cellb.flash .mk { animation: none; } }
.wb-detail { margin: 12px 0 0; padding: 9px 10px; border-radius: 6px; background: var(--wb-head); color: var(--wb-ink); font-size: 13px; min-height: 2.9em; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 12px 0 0; padding: 0; list-style: none; color: var(--wb-ink); font-size: 12px; }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
/* the script renders fewer columns when the workbook is narrow (class compact) */
.grid.compact col.c-day { width: 45px; }
.wb.is-compact .wb-pane { padding: 12px 8px 14px; }
.wb.is-compact .wb-fx { display: none; }
.grid.compact th.u { padding: 4px 6px; }
.grid.compact th.u small { display: block; }
.grid.compact tr.grp th span { display: block; margin: 2px 0 0; white-space: normal; }
@container wb (max-width: 620px) {
  .wb-saved { display: none; }
}

/* dashboard sheet */
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.seg button { height: 44px; padding: 0 14px; border: 1px solid #b9b9b9; border-radius: 8px; background: #ffffff; color: var(--wb-ink); font-size: 13px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: #007f00; border-color: #007f00; color: #ffffff; }
.selw { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--wb-ink); }
.selw select { height: 44px; min-width: 190px; padding: 0 12px; border: 1px solid #8a8a8a; border-radius: 8px; background: #ffffff; color: var(--wb-ink); font-size: 14px; }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 14px 0 0; border: 1px solid var(--wb-line); border-radius: 8px; }
.kpi { padding: 12px 14px 14px; min-width: 0; }
.kpi:nth-child(even) { border-left: 1px solid var(--wb-line); }
.kpi:nth-child(n + 3) { border-top: 1px solid var(--wb-line); }
.kpi dt { color: var(--wb-muted); font-size: 12px; }
.kpi dd { margin: 4px 0 0; }
.kpi-v { font-size: 30px; line-height: 1.1; font-weight: 500; color: var(--wb-ink); }
.kpi.is-hero .kpi-v { font-size: 48px; font-weight: 400; letter-spacing: -0.02em; }
.kpi-s { display: block; margin-top: 4px; color: var(--wb-muted); font-size: 12px; }
.kpis.sm { margin-top: 0; }
.kpis.sm .kpi { padding: 10px 14px 12px; }
.kpis.sm .kpi-v, .kpis.sm .kpi.is-hero .kpi-v { font-size: 24px; font-weight: 500; letter-spacing: 0; }
@container wb (min-width: 621px) {
  .kpis { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .kpi, .kpi:nth-child(even) { border-left: 0; }
  .kpi + .kpi { border-left: 1px solid var(--wb-line); }
  .kpi:nth-child(n + 3) { border-top: 0; }
}
.dash2 { display: grid; gap: 18px; margin-top: 18px; }
@container wb (min-width: 621px) { .dash2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; } }
.blk h4 { margin: 0 0 2px; font-size: 13px; font-weight: 500; color: var(--wb-ink); }
.blk > p { margin: 0 0 10px; font-size: 12px; color: var(--wb-muted); }
.keys { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: -2px 0 10px; padding: 0; list-style: none; font-size: 12px; color: var(--wb-ink); }
.keys li { display: inline-flex; align-items: center; gap: 6px; }
.keys i { display: block; width: 10px; height: 10px; border-radius: 2px; }
.keys i.ok { background: #007f00; }
.keys i.late { background: #ffe600; }
.keys i.miss { background: #e11d48; }
.rows { margin: 0; padding: 0; list-style: none; }
.rows li { display: grid; grid-template-columns: minmax(0, 118px) minmax(0, 1fr) 44px; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--wb-line); }
.rows li:first-child { border-top: 0; }
.rows .nm { color: var(--wb-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rows .nm small { display: block; color: var(--wb-muted); font-size: 11px; }
.rows .pc { text-align: right; font-variant-numeric: tabular-nums; color: var(--wb-ink); font-weight: 500; }
.bar { display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden; background: #ececec; }
.bar i { display: block; height: 100%; }
.bar i.ok { background: #007f00; }
.bar i.late { background: #ffe600; }
.bar i.miss { background: #e11d48; }
.bar.one { background: #e6e6e6; }
.bar.one i.ok { background: #4a4a57; }
.rows .nd { grid-column: 2 / 4; color: var(--wb-muted); font-size: 12px; }
.trend { margin-top: 18px; }
.cols { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); align-items: end; gap: 8px; height: 132px; padding: 18px 0 0; border-bottom: 1px solid #b9b9b9; }
.cols .col { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.cols .col i { display: block; width: min(24px, 70%); border-radius: 3px 3px 0 0; background: #cfcfcf; }
.cols .col.now i { background: #007f00; }
.cols .col b { position: absolute; left: 50%; transform: translateX(-50%); font-size: 12px; font-weight: 500; color: var(--wb-ink); white-space: nowrap; }
.colx { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; margin: 6px 0 0; padding: 0; list-style: none; color: var(--wb-muted); font-size: 11px; text-align: center; }
.colx .now { color: var(--wb-ink); font-weight: 500; }

/* tables inside the workbook */
.sheet { width: 100%; border-collapse: collapse; }
.sheet th, .sheet td { border: 1px solid var(--wb-line); padding: 7px 9px; text-align: left; vertical-align: top; color: var(--wb-ink); }
.sheet thead th { background: var(--wb-head); font-weight: 500; font-size: 12px; white-space: nowrap; }
.sheet td.m { font: 400 11.5px/1.45 var(--mono); overflow-wrap: anywhere; }
.sheet td.n { white-space: nowrap; font-variant-numeric: tabular-nums; }
.sheet tr.is-new td { background: #eaf5e7; }
.st-chip { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
/* narrow workbook: grouped lists instead of wide tables */
.cgrp { border: 1px solid var(--wb-line); border-radius: 8px; margin: 0 0 8px; overflow: hidden; }
.cgrp summary { position: relative; list-style: none; cursor: pointer; min-height: 44px; padding: 9px 38px 9px 12px; }
.cgrp summary::-webkit-details-marker { display: none; }
.cgrp summary::after { content: ""; position: absolute; right: 16px; top: 18px; width: 8px; height: 8px; border-right: 2px solid var(--wb-ink); border-bottom: 2px solid var(--wb-ink); transform: rotate(45deg); }
.cgrp[open] summary::after { transform: rotate(-135deg); top: 22px; }
.cgrp summary b { display: block; font-weight: 500; color: var(--wb-ink); }
.cgrp summary span { display: block; margin-top: 2px; color: var(--wb-muted); font-size: 12px; }
.cbox { border: 1px solid var(--wb-line); border-radius: 8px; margin: 0 0 8px; overflow: hidden; }
.clist { margin: 0; padding: 0; list-style: none; }
.clist li { padding: 8px 12px; border-top: 1px solid var(--wb-line); color: var(--wb-ink); }
.cbox .clist li:first-child { border-top: 0; }
.clist li b { font-weight: 500; }
.clist li .m { display: block; margin-top: 3px; font: 400 11.5px/1.45 var(--mono); overflow-wrap: anywhere; }
.clist li.is-new { background: #eaf5e7; }
.cl-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.cl-top .n { color: var(--wb-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.cl-top .st-chip { margin-left: auto; font-size: 12px; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line-strong); max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line-strong); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 10px 0; font-size: 17px; font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 10px; height: 10px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); margin: 0 6px 4px 0; }
.faq details[open] summary::after { transform: rotate(-135deg); margin: 4px 6px 0 0; }
.faq details > p { margin: 0 0 18px; max-width: 70ch; color: var(--ink-2); }

/* ---------- scope ---------- */
.scope { display: grid; gap: 32px; }
@media (min-width: 860px) { .scope { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; } }
.scope h3 { margin: 0 0 14px; font-size: 18px; font-weight: 500; }
.outs { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; color: var(--ink-2); }
.outs li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; }
.outs li::before { content: ""; width: 12px; height: 2px; background: var(--muted); margin: 12px 0 0 5px; }

/* ---------- comparison + price tables (document) ---------- */
.t { width: 100%; border-collapse: collapse; font-size: 15px; }
.t th, .t td { padding: 14px 14px 14px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.t thead th { font-size: 13px; font-weight: 500; color: var(--muted); border-bottom-color: var(--line-strong); white-space: nowrap; }
.t tbody th { font-weight: 500; }
.t td { color: var(--ink-2); }
.t td.num { text-align: right; white-space: nowrap; color: var(--ink); font-variant-numeric: tabular-nums; padding-right: 0; }
.t thead th.num { text-align: right; padding-right: 0; }
.t tr.rec th, .t tr.rec td { background: var(--surface); color: var(--ink); border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.t.cmp th:first-child, .t.cmp td:first-child { padding-left: 14px; }
.t td.num:not(:last-child), .t thead th.num:not(:last-child) { padding-right: 28px; }
.t tr.total th, .t tr.total td { border-bottom: 0; border-top: 2px solid var(--ink); font-size: 18px; font-weight: 500; color: var(--ink); }
.tag { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 4px; background: var(--brand); color: #ffffff; font-size: 12px; font-weight: 500; white-space: nowrap; vertical-align: 2px; }
.tag.draft { background: var(--yellow); color: var(--on-yellow); margin-left: 12px; vertical-align: 6px; font-size: 13px; }
.tag.rec { margin: 8px 0 0; }
.tag.no { background: transparent; color: var(--muted); border: 1px solid var(--line-strong); margin-left: 0; }
.tag.opt { background: transparent; color: var(--ink-2); border: 1px solid var(--line-strong); margin-left: 0; }
@media (max-width: 759px) {
  .t.stack thead { display: none; }
  .t.stack, .t.stack tbody, .t.stack tr, .t.stack th, .t.stack td { display: block; width: 100%; }
  .t.stack tr { padding: 16px 0; border-bottom: 1px solid var(--line-strong); }
  .t.stack tr.rec { padding: 16px 14px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; margin: 8px 0; }
  .t.stack th, .t.stack td { border: 0; padding: 3px 0; }
  .t.stack.cmp th:first-child, .t.stack.cmp td:first-child { padding-left: 0; }
  .t.stack td.num:not(:last-child) { padding-right: 0; }
  .t.stack tbody th { font-size: 17px; padding-bottom: 8px; }
  .t.stack td[data-l] { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; }
  .t.stack td[data-l]::before { content: attr(data-l); color: var(--muted); font-size: 13px; padding-top: 2px; }
  .t.stack td.num { text-align: left; }
  .t.stack tr.total { border-top: 2px solid var(--ink); border-bottom: 0; }
  .t.stack tr.total th, .t.stack tr.total td { border-top: 0; }
}

/* ---------- phases ---------- */
.phases { margin: 0; padding: 0; list-style: none; display: grid; gap: 0; }
.phases > li { position: relative; padding: 0 0 32px 44px; }
.phases > li::before { content: attr(data-n); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--ink); color: var(--ink); background: var(--bg); font: 500 14px/1 var(--font); }
.phases > li::after { content: ""; position: absolute; left: 13.5px; top: 34px; bottom: 6px; width: 1px; background: var(--line-strong); }
.phases > li:last-child { padding-bottom: 0; }
.phases > li:last-child::after { display: none; }
.phases h3 { margin: 2px 0 2px; font-size: 19px; font-weight: 500; }
.ph-when { margin: 0 0 10px; font-size: 14px; color: var(--link); font-weight: 500; }
.phases p { margin: 0; color: var(--ink-2); max-width: 46ch; }
.phases .ph-when + p { margin-bottom: 12px; }
.phases p.ph-dep { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; }
.phases > li { display: flex; flex-direction: column; }
.ph-dep b { color: var(--ink); font-weight: 500; }
@media (min-width: 960px) {
  .phases { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; }
  .phases > li { padding: 46px 0 0; }
  .phases > li::after { left: 36px; right: -30px; top: 13.5px; bottom: auto; width: auto; height: 1px; }
}

/* ---------- price ---------- */
.opts { margin: 36px 0 0; }
.opts h3, .cond h3 { margin: 0 0 4px; font-size: 18px; font-weight: 500; }
.cond { margin: 36px 0 0; max-width: 72ch; color: var(--ink-2); }
.cond p { margin: 8px 0 0; }

/* ---------- needs ---------- */
.needs { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; max-width: 78ch; }
.needs li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; }
.needs li::before { content: ""; width: 18px; height: 18px; margin-top: 3px; border: 2px solid var(--line-strong); border-radius: 4px; }
.needs b { font-weight: 500; }

/* ---------- next step ---------- */
.next { background: var(--bg-soft); color: var(--ink); padding: 64px 0; border-top: 1px solid var(--line); }
.next h2 { margin: 0; font-weight: 300; font-size: clamp(30px, 4.6vw, 52px); line-height: 1.08; letter-spacing: -0.015em; max-width: 18ch; }
.next p:not(.d-num) { margin: 18px 0 0; max-width: 56ch; color: var(--ink-2); font-size: 17px; }
.next-in { display: grid; gap: 28px; }
.next-cta { display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 860px) {
  .next-in { grid-template-columns: minmax(0, 1fr) auto; gap: 56px; align-items: end; }
  .next-cta { flex-direction: column; align-items: stretch; }
}

/* ---------- footer ---------- */
.foot { padding: 32px 0 48px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.foot p { margin: 0 0 8px; max-width: 92ch; }
.foot strong { color: var(--ink); font-weight: 500; }
.foot a { color: inherit; }

/* ---------- internal study ---------- */
.st-banner { background: var(--bg-soft); color: var(--ink); border-bottom: 1px solid var(--line); }
.tag.int { margin: 0 10px 0 0; background: var(--yellow); color: var(--on-yellow); vertical-align: 1px; }
.st-banner p { margin: 0; padding: 10px 0; font-size: 14px; font-weight: 500; }
.st { padding-top: 40px; padding-bottom: 24px; }
.st h1 { margin: 0; font-weight: 300; font-size: clamp(30px, 4.4vw, 46px); line-height: 1.1; letter-spacing: -0.015em; }
.st-lead { margin: 14px 0 0; max-width: 72ch; color: var(--ink-2); font-size: 17px; }
.st-sec { margin-top: 56px; }
.st-sec > h2 { margin: 0 0 6px; font-size: 24px; font-weight: 500; line-height: 1.2; letter-spacing: -0.005em; }
.st-sec > p { margin: 10px 0 0; max-width: 78ch; color: var(--ink-2); }
.st-sec > ul, .st-sec > ol { margin: 12px 0 0; padding-left: 20px; max-width: 78ch; color: var(--ink-2); }
.st-sec li { margin: 6px 0; }
.st-sec li b, .st-sec p b { color: var(--ink); font-weight: 500; }
.st-verdict { margin: 24px 0 0; display: grid; gap: 0; border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; }
.st-verdict div { padding: 16px 18px; }
.st-verdict div + div { border-top: 1px solid var(--line-strong); }
.st-verdict dt { font-size: 13px; color: var(--muted); }
.st-verdict dd { margin: 4px 0 0; font-size: 17px; line-height: 1.4; }
@media (min-width: 860px) {
  .st-verdict { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .st-verdict div + div { border-top: 0; border-left: 1px solid var(--line-strong); }
}
.st-two { display: grid; gap: 24px; margin-top: 16px; }
@media (min-width: 860px) { .st-two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; } }
.st-two h3 { margin: 0 0 8px; font-size: 16px; font-weight: 500; }
.st-two ul { margin: 0; padding-left: 20px; color: var(--ink-2); }
.st .t { margin-top: 16px; font-size: 14.5px; }
.st .t td, .st .t th { padding-top: 11px; padding-bottom: 11px; }
.st .t code, .st-sec code { font: 400 13px/1.4 var(--mono); background: var(--bg-soft); padding: 1px 5px; border-radius: 4px; }
.st-sec > .flow { margin: 20px 0 0; padding: 0; max-width: none; list-style: none; display: grid; gap: 10px; counter-reset: fl; }
.flow li { border: 1px solid var(--line-strong); border-radius: 8px; padding: 12px 14px; margin: 0; background: var(--surface); color: var(--ink); position: relative; counter-increment: fl; }
.flow li b { display: block; font-weight: 500; }
.flow li b::before { content: counter(fl) " · "; color: var(--muted); font-weight: 400; }
.flow li span { display: block; margin-top: 2px; color: var(--ink-2); font-size: 14px; }
@media (min-width: 960px) {
  .st-sec > .flow { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px; }
  .flow li + li::before { content: ""; position: absolute; left: -19px; top: 50%; width: 10px; height: 10px; border-top: 2px solid var(--muted); border-right: 2px solid var(--muted); transform: translateY(-50%) rotate(45deg); }
}
.st-sec > p.flow-note { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-soft); max-width: none; }
.sw { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 6px; border: 1px solid rgba(0, 0, 0, 0.25); }
.qs { margin: 16px 0 0; padding: 16px 18px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); max-width: 86ch; }
.qs ol { margin: 0; padding-left: 20px; color: var(--ink); }
.qs li { margin: 8px 0; }
.qs li span { color: var(--muted); }
.src { margin: 12px 0 0; padding-left: 20px; font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.src li { margin: 5px 0; }

/* ---------- print ---------- */
@media print {
  .top .aud, .sim-ctl { display: none; }
  .d-sec, .next { padding: 28px 0; }
}

/* ---------- v4: pixel sky, perched animals and scroll-linked motion ----------
   Tone studied on agentes.chat: a coarse dithered pixel sky under crisp white cards, small
   half-hidden characters, few clouds, scroll-linked reveals. Here: a light morning sky over a
   cane field, birds, a toucan, an egret, a capybara. All art is drawn in sky.js. */
.sky { position: absolute; inset: 0; width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.perch { position: absolute; display: block; image-rendering: pixelated; pointer-events: none; }

.hero { position: relative; overflow: hidden; background: #93c5ec; border-bottom: 0; }
.hero-in { position: relative; z-index: 1; padding-top: 52px; padding-bottom: 176px; }
.hero-eye, .hero-lead { color: var(--ink); }
.hero h1 { font-size: clamp(36px, 6.4vw, 68px); line-height: 1.03; letter-spacing: -0.03em; }
.hero .btn-ghost { background: #ffffff; border-color: #ffffff; }
.hero .btn-ghost:hover { background: #f1f1f1; }
.hero-cardw { display: none; position: relative; }
.hero-card { display: block; position: relative; z-index: 1; overflow: hidden; border: 0; border-radius: 16px; padding: 24px 24px 54px; background: #ffffff; color: #252530; font-size: 14px; line-height: 1.4; box-shadow: 0 24px 44px -24px rgba(37, 37, 48, 0.5); }
.hstrip { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 32px; display: block; image-rendering: pixelated; }
.perch-tucano { width: 85px; height: 75px; top: -69px; right: 30px; z-index: 0; }
.motion-btn { position: absolute; right: var(--gut); bottom: 14px; z-index: 2; min-height: 44px; padding: 0 16px; border: 0; border-radius: 22px; background: #ffffff; color: #252530; font-size: 13px; font-weight: 500; cursor: pointer; box-shadow: 0 2px 10px -3px rgba(37, 37, 48, 0.45); }
@media (min-width: 960px) {
  .hero-cardw { display: block; }
  .hero-in { padding-top: 88px; padding-bottom: 196px; }
}
.facts-band { background: var(--bg); border-bottom: 1px solid var(--line); }
.facts-band .facts { margin: 0; border-top: 0; }

.wb-wrap { position: relative; }
.wb-wrap > .wb { position: relative; z-index: 1; }
.perch-bemtevi { display: none; width: 52px; height: 52px; top: -48px; right: 44px; z-index: 0; }
@media (min-width: 760px) { .perch-bemtevi { display: block; } }

.next { position: relative; overflow: hidden; background: #a9cdea; border-top: 0; padding: 72px 0 0; }
.next-in { position: relative; z-index: 1; padding-bottom: 184px; }
.next .btn-ghost { background: #ffffff; border-color: #ffffff; }
.next p:not(.d-num) { color: var(--ink); }
.next .d-num { color: var(--ink-2); }
@media (min-width: 860px) {
  .next { padding-top: 96px; }
  .next-in { padding-bottom: 214px; }
}

/* motion: only where the browser supports scroll-linked animation */
@keyframes g-rise { from { opacity: 0; translate: 0 56px; } to { opacity: 1; translate: none; } }
@keyframes g-tip { from { opacity: 0; transform: perspective(1400px) rotateX(9deg) scale(0.97) translateY(44px); } to { opacity: 1; transform: none; } }
@keyframes g-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes g-draw { from { scale: 0 1; } to { scale: 1 1; } }
@keyframes g-lift { to { translate: 0 -36px; } }
@keyframes g-float { from { translate: 0 0; } to { translate: 0 -7px; } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .rv { animation: g-rise linear both; animation-timeline: view(); animation-range: entry 0px entry 240px; }
    .rv-tip { animation: g-tip linear both; animation-timeline: view(); animation-range: entry 0px entry 280px; transform-origin: 50% 100%; }
    .d-num::before { transform-origin: 0 50%; animation: g-draw linear both; animation-timeline: view(); animation-range: entry 40px entry 260px; }
    .hero-top { animation: g-lift linear both; animation-timeline: scroll(root); animation-range: 0px 700px; }
    .hero-cardw { animation: g-float 3.2s ease-in-out infinite alternate; }
  }
  @media (prefers-reduced-motion: reduce) {
    .rv, .rv-tip { animation: g-fade linear both; animation-timeline: view(); animation-range: entry 0px entry 200px; }
  }
}
html.motion-off .rv, html.motion-off .rv-tip, html.motion-off .d-num::before, html.motion-off .hero-top { animation: none; }
html.motion-off .hero-cardw { animation-play-state: paused; }
@media print {
  .rv, .rv-tip, .d-num::before, .hero-top, .hero-cardw { animation: none; }
  .motion-btn { display: none; }
}

/* a second bem-te-vi sits on the closing button */
.cta-perch { position: relative; display: inline-flex; }
.cta-perch .btn { position: relative; z-index: 1; flex: 1 1 auto; }
.perch-bemtevi2 { display: none; width: 52px; height: 52px; top: -48px; right: 16px; z-index: 0; }
@media (min-width: 860px) { .perch-bemtevi2 { display: block; } }

/* ---------- optional items shown as prototypes: two e-mails and a Power BI page ---------- */
.optx { display: grid; gap: 32px; }
.optx h3 { margin: 0 0 4px; font-size: 18px; font-weight: 500; }
.optx h3 + p { margin: 0 0 14px; color: var(--ink-2); font-size: 15px; }
@media (min-width: 900px) {
  .optx { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px 32px; }
  .opt-wide { grid-column: 1 / -1; }
}
.mail, .pbi { --wb-ink: #252530; --wb-muted: #666666; --wb-line: #e0e0e0; --wb-head: #f3f3f3; background: #ffffff; color: #252530; border: 1px solid #c6c6c6; border-radius: 10px; overflow: hidden; font-size: 14px; line-height: 1.45; color-scheme: light; }
.mail-h { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 4px 12px; padding: 14px 16px; border-bottom: 1px solid var(--wb-line); }
.mail-av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #252530; color: #ffffff; font-size: 12px; font-weight: 500; }
.mail-h b { display: block; font-weight: 500; font-size: 15px; line-height: 1.3; }
.mail-h div span { display: block; color: var(--wb-muted); font-size: 12px; }
.mail-h time { grid-column: 2; color: var(--wb-muted); font-size: 12px; }
.mail-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; background: var(--wb-head); border: 1px solid var(--wb-line); font-size: 12px; font-weight: 500; }
.mail-b { padding: 14px 16px 16px; }
.mail-b p { margin: 0 0 10px; }
.mail-b p:last-child { margin-bottom: 0; }
.mail-subj { padding: 8px 10px; border-radius: 6px; background: var(--wb-head); font: 500 12px/1.45 var(--mono); overflow-wrap: anywhere; }
.mail-auto, .mail-note { color: var(--wb-muted); font-size: 12px; }
.mail-kpi { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 12px; border: 1px solid var(--wb-line); border-radius: 8px; }
.mail-kpi div { padding: 10px 12px; }
.mail-kpi div + div { border-left: 1px solid var(--wb-line); }
.mail-kpi dt { color: var(--wb-muted); font-size: 12px; }
.mail-kpi dd { margin: 2px 0 0; font-size: 26px; font-weight: 500; line-height: 1.1; }
.mail-units { margin: 0 0 12px; padding: 0; list-style: none; }
.mail-units li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--wb-line); }
.mail-units li:first-child { border-top: 0; }
.mail-units b { font-weight: 500; font-variant-numeric: tabular-nums; }
.mail-b p.mail-t { margin: 12px 0 4px; font-weight: 500; }
.mail-list { margin: 0; padding: 0; list-style: none; color: var(--wb-ink); font-size: 13px; }
.mail-list li { display: flex; align-items: center; gap: 8px; padding: 3px 0; }

.pbi { container: wb / inline-size; }
.pbi-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 16px; border-bottom: 1px solid var(--wb-line); background: var(--wb-head); }
.pbi-bar b { font-weight: 500; font-size: 15px; }
.pbi-bar span { color: var(--wb-muted); font-size: 12px; }
.pbi-bar .selw { margin-left: auto; }
.pbi-in { padding: 14px 16px 16px; }
.pbi-grid { display: grid; gap: 14px; margin-top: 14px; }
@container wb (min-width: 621px) { .pbi-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.pbi-v { padding: 12px 14px 14px; border: 1px solid var(--wb-line); border-radius: 4px; min-width: 0; }
.pbi-v h4 { margin: 0 0 8px; font-size: 13px; font-weight: 500; }
.dcols { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: end; gap: 10px; height: 150px; padding-top: 20px; border-bottom: 1px solid #b9b9b9; }
.dcol { position: relative; height: 100%; display: flex; flex-direction: column-reverse; align-items: center; gap: 2px; }
.dcol i { display: block; width: min(24px, 60%); }
.dcol i.ok { background: #007f00; }
.dcol i.late { background: #ffe600; }
.dcol i.miss { background: #e11d48; }
.dcol b { font-size: 12px; font-weight: 500; margin-bottom: 2px; }
.dcolx { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 6px 0 0; padding: 0; list-style: none; text-align: center; font-size: 11px; color: var(--wb-muted); }
.pbi-m { width: 100%; border-collapse: collapse; font-size: 13px; }
.pbi-m th, .pbi-m td { padding: 8px 8px; border-bottom: 1px solid var(--wb-line); text-align: right; font-variant-numeric: tabular-nums; }
.pbi-m thead th { font-weight: 400; font-size: 11.5px; color: var(--wb-muted); vertical-align: bottom; }
.pbi-m th:first-child { text-align: left; font-weight: 400; }
.pbi-m tbody tr:last-child th, .pbi-m tbody tr:last-child td { border-bottom: 0; }
.pbi-m td.low { font-weight: 500; }
.pbi-m .abbr { display: none; }
.pbi-v { overflow-x: auto; }
@container wb (max-width: 620px) {
  .pbi-m .full { display: none; }
  .pbi-m .abbr { display: inline; }
  .pbi-m th, .pbi-m td { padding: 8px 5px; }
  .pbi-in { padding: 12px 10px 14px; }
  .pbi-v { padding: 12px 10px 12px; }
}
/* the reminder's case as three moments of the simulation */
.tl { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; font-size: 14px; color: var(--ink-2); }
.tl li { display: grid; grid-template-columns: 20px 48px minmax(0, 1fr); gap: 10px; align-items: start; }
.tl li .mk { margin-top: 1px; }
.tl time { font: 500 13px/1.5 var(--mono); color: var(--ink); }
.tl li.is-done { color: var(--ink); }

/* draft notice: prices and deadlines are illustrative */
.draft-bar { border-bottom: 1px solid var(--line); }
.notice { margin: 0 0 20px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: 15px; }

/* the hero leads with the system's name */
.hero h1 { max-width: none; font-size: clamp(52px, 10vw, 108px); line-height: 0.98; letter-spacing: -0.04em; }
.hero h1 mark { text-decoration-thickness: 0.07em; text-underline-offset: 0.14em; }
.hero-sub { margin: 20px 0 0; max-width: 30ch; font-size: clamp(20px, 2.3vw, 27px); line-height: 1.25; font-weight: 400; color: var(--ink); }
.hero-lead { margin-top: 16px; }

/* ---------- v7: commercial and technical document ---------- */
.ficha { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ficha div { padding: 16px 16px 18px 0; border-top: 1px solid var(--line); }
.ficha div:nth-child(-n + 2) { border-top: 0; }
.ficha div:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line); }
.ficha dt { font-size: 13px; color: var(--muted); }
.ficha dd { margin: 4px 0 0; font-size: 15px; line-height: 1.4; color: var(--ink); }
@media (min-width: 860px) {
  .ficha { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ficha div, .ficha div:nth-child(even) { padding: 18px 20px 20px 0; border-left: 0; border-top: 1px solid var(--line); }
  .ficha div:nth-child(-n + 3) { border-top: 0; }
  .ficha div:not(:nth-child(3n + 1)) { padding-left: 20px; border-left: 1px solid var(--line); }
}
.d-h3 { margin: 36px 0 12px; font-size: 18px; font-weight: 500; }
.plain { margin: 0; padding: 0; list-style: none; max-width: 86ch; color: var(--ink-2); }
.plain li { padding: 11px 0; border-top: 1px solid var(--line); }
.plain li:first-child { border-top: 0; padding-top: 0; }
.d-sec.soft .plain li, .d-sec.soft .ficha div { border-color: var(--line-strong); }
.arch { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; counter-reset: ar; }
.arch li { position: relative; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); counter-increment: ar; }
.arch b { display: block; font-weight: 500; font-size: 16px; }
.arch b::before { content: counter(ar) " · "; color: var(--muted); font-weight: 400; }
.arch i { display: block; margin-top: 4px; font: 500 12px/1.4 var(--mono); font-style: normal; color: var(--muted); }
.arch span { display: block; margin-top: 8px; font-size: 14px; color: var(--ink-2); }
@media (min-width: 1000px) {
  .arch { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; }
  .arch li + li::before { content: ""; position: absolute; left: -18px; top: 26px; width: 9px; height: 9px; border-top: 2px solid var(--muted); border-right: 2px solid var(--muted); transform: rotate(45deg); }
}
.terms { margin: 12px 0 0; display: grid; gap: 0; max-width: 78ch; }
.terms div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; padding: 10px 0; border-top: 1px solid var(--line-strong); }
.terms div:first-child { border-top: 0; }
.terms dt { color: var(--muted); font-size: 14px; }
.terms dd { margin: 0; color: var(--ink); }
.cond { max-width: none; }

/* phone tables: no repeated label when a table has only two columns; the total on one line */
@media (max-width: 759px) {
  .t.stack.nolabel td[data-l] { display: block; }
  .t.stack.nolabel td[data-l]::before { display: none; }
  .t.stack tr.total { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
  .t.stack tr.total th, .t.stack tr.total td { width: auto; padding: 0; }
  .t.stack tr.total td:empty { display: none; }
  .t.stack tr.total td[data-l] { display: block; }
  .t.stack tr.total td[data-l]::before { display: none; }
}
.terms div { grid-template-columns: 150px minmax(0, 1fr); }
@media (max-width: 559px) {
  .terms div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
