/* ============================================================
   Pipeline de Dados — HKI AIR Suspension
   Paleta e tipografia conforme brand/manual-de-marca.pdf
   ============================================================ */

:root {
  /* Cores oficiais — página CORES do manual */
  --hki-blue:       #4F81C1;
  --hki-blue-deep:  #284D6B;
  --hki-navy:       #025483;   /* azul da capa do manual */
  --hki-gray:       #919295;
  --hki-gray-dark:  #58595B;
  --hki-ink:        #181818;
  --hki-bg:         #F5F5F5;
  --hki-surface:    #FFFFFF;

  /* Derivados de uso — sempre a partir das cores acima */
  --line:        rgba(145, 146, 149, .32);
  --line-soft:   rgba(145, 146, 149, .18);
  --blue-wash:   rgba(79, 129, 193, .08);
  --blue-wash-2: rgba(79, 129, 193, .16);

  /* Texto pequeno usa o cinza ESCURO da marca: o claro (#919295) fica em
     ~3.1:1 sobre branco e reprova no WCAG AA. O claro segue em linhas e pontos. */
  --text-soft: var(--hki-gray-dark);

  /* Camadas do banco: rampa do bruto ao pronto, dentro da paleta */
  --bronze: var(--hki-gray);
  --silver: var(--hki-blue-deep);
  --gold:   var(--hki-blue);

  /* Tipografia — Avenir (títulos) e Gotham (textos) com substitutas livres */
  --font-title: 'Jost', 'Avenir Next', 'Avenir', system-ui, 'Segoe UI', sans-serif;
  --font-text:  'Montserrat', 'Gotham', 'Avenir Next', system-ui, 'Segoe UI', sans-serif;

  /* Densidade do diagrama. Redefinida no modo apresentação e em telas baixas,
     para o fluxo caber sem rolagem numa projeção. */
  --d-card:    22px 24px 26px;
  --d-rowgap:  34px;
  --d-groups:  14px;
  --d-chips:   6px;
  --d-fonte:   7px 10px;
  --d-stages:  16px;
  --d-stage:   11px 13px;
  --d-collbl:  9px;

  --shadow-sm: 0 1px 2px rgba(24, 24, 24, .05);
  --shadow-md: 0 6px 20px rgba(40, 77, 107, .12);
  --ease: cubic-bezier(.4, 0, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--hki-bg);
  color: var(--hki-ink);
  font-family: var(--font-text);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-title);
  font-weight: 300;          /* "os títulos devem ser grandes e leves" */
  letter-spacing: -.015em;
  margin: 0;
  line-height: 1.12;
}

p { margin: 0; }
img { max-width: 100%; height: auto; display: block; }

button {
  font: inherit;
  color: inherit;
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--hki-blue);
  outline-offset: 2px;
  border-radius: 4px;
}

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.noscript {
  margin: 0;
  padding: 14px 22px;
  background: var(--hki-navy);
  color: #fff;
  font-size: 14px;
}

/* ============================================================
   Barra de topo
   ============================================================ */

.topbar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 28px;
  background: var(--hki-surface);
  border-bottom: 1px solid var(--line-soft);
  position: sticky;
  top: 0;
  z-index: 40;
}

.topbar__logo {
  /* o manual fixa 200px como redução máxima em meio eletrônico */
  width: 200px;
  flex: none;
}

.topbar__title {
  border-left: 1px solid var(--line);
  padding-left: 20px;
  min-width: 0;
}

.topbar__title h1 {
  font-size: 21px;
  font-weight: 400;
}

.topbar__title p {
  font-size: 12px;
  color: var(--text-soft);
  letter-spacing: .02em;
}

.topbar__facts {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--hki-gray-dark);
  white-space: nowrap;
}
.topbar__facts b { font-weight: 700; color: var(--hki-blue-deep); }
.topbar__facts i { font-style: normal; color: var(--text-soft); margin: 0 3px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--hki-gray-dark);
  cursor: pointer;
  transition: all .2s var(--ease);
  white-space: nowrap;
}
.btn:hover {
  border-color: var(--hki-blue);
  color: var(--hki-blue-deep);
  background: var(--blue-wash);
}

.btn__icon {
  width: 12px;
  height: 12px;
  flex: none;
  border: 2px solid currentColor;
  border-radius: 2px;
  opacity: .75;
}

/* ============================================================
   Seção do fluxo
   ============================================================ */

.flow {
  padding: 34px 28px 30px;
  max-width: 1520px;
  margin: 0 auto;
}

.flow__head { max-width: 780px; margin-bottom: 26px; }
.flow__title { font-size: clamp(26px, 3.4vw, 40px); margin: 6px 0 10px; }

.flow__lead {
  font-size: 15px;
  color: var(--hki-gray-dark);
  max-width: 68ch;
  min-height: 3em;
  transition: opacity .3s var(--ease);
}
.flow__lead.is-swapping { opacity: 0; }

.flow__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 296px;
  gap: 26px;
  align-items: start;
}

/* ---- palco do diagrama ---- */

.flow__stage {
  position: relative;
  background: var(--hki-surface);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: var(--d-card);
  box-shadow: var(--shadow-sm);
}

.wires {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}

.grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns:
    minmax(178px, 1.02fr)
    minmax(118px, .58fr)
    minmax(148px, .82fr)
    minmax(148px, .86fr);
  grid-template-rows: auto auto;
  grid-template-areas:
    "origem coleta banco  fim"
    ".      polar  polar  polar";
  column-gap: clamp(26px, 4vw, 62px);
  row-gap: var(--d-rowgap);
  align-items: stretch;
}

.col--origem { grid-area: origem; }
.col--coleta { grid-area: coleta; }
.col--banco  { grid-area: banco; }
.col--fim    { grid-area: fim; }
.col--polar  { grid-area: polar; justify-self: end; width: min(100%, 260px); }

.col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: opacity .35s var(--ease);
}

.col__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-soft);
  padding-bottom: var(--d-collbl);
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}
.col__label span {
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--text-soft);
  opacity: .75;
  margin-left: 5px;
}

/* corpo da coluna: centraliza verticalmente contra a coluna mais alta */
.col > :not(.col__label) {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.groups { gap: var(--d-groups); }
.stages { gap: var(--d-stages); }
.ends   { gap: 14px; }

/* etapas apagadas fora da cena atual */
.col.is-off { opacity: .16; pointer-events: none; }

/* ---- grupos de domínio ---- */

.group { display: flex; flex-direction: column; gap: 6px; }

.group__label {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--hki-gray-dark);
}
.group__count {
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--text-soft);
  text-transform: none;
}

.group__chips { display: flex; flex-direction: column; gap: var(--d-chips); }

/* ---- nós ---- */

.node {
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  background: var(--hki-surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 11px;
  cursor: pointer;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease),
              transform .2s var(--ease), opacity .35s var(--ease),
              filter .35s var(--ease), background .2s var(--ease);
}
.node:hover { border-color: var(--hki-blue); box-shadow: var(--shadow-md); }
.node.is-active {
  border-color: var(--hki-blue);
  background: var(--blue-wash);
  box-shadow: 0 0 0 1px var(--hki-blue), var(--shadow-md);
}
.node.is-dim { opacity: .2; filter: grayscale(1); }

.node__name {
  display: block;          /* spans: sem isso o kicker cola no nome */
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -.005em;
  line-height: 1.25;
}
.node__detail {
  display: inline;         /* fica na mesma linha do nome */
  font-weight: 500;
  color: var(--text-soft);
  font-size: 11px;
  margin-left: 4px;
}

/* fonte: nome à esquerda, sinais à direita */
.node--fonte {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: var(--d-fonte);
}
.node--fonte .node__name { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.node__signals { display: flex; align-items: center; gap: 8px; flex: none; }

.cad {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--hki-blue-deep);
  background: var(--blue-wash-2);
  border-radius: 4px;
  padding: 2px 5px;
  line-height: 1.2;
}
.cad[data-cargas="1"] { color: var(--hki-gray-dark); background: rgba(145, 146, 149, .16); }

.imp { display: flex; gap: 2.5px; align-items: center; }
.imp i {
  width: 4.5px;
  height: 4.5px;
  border-radius: 50%;
  background: rgba(145, 146, 149, .34);
}
.imp i.on { background: var(--hki-blue); }
.imp[data-peso="4"] i.on { background: var(--hki-blue); box-shadow: 0 0 0 1.5px var(--blue-wash-2); }

/* coleta */
.node--coleta {
  text-align: center;
  padding: 15px 13px;
  border-color: var(--hki-blue-deep);
  border-style: dashed;
}
.node--coleta .node__name { font-size: 13px; }
.node--coleta .node__tag { margin-top: 5px; }

.pulse {
  display: block;
  width: 9px;
  height: 9px;
  margin: 0 auto 9px;
  border-radius: 50%;
  background: var(--hki-blue);
  box-shadow: 0 0 0 0 rgba(79, 129, 193, .55);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(79, 129, 193, .5); }
  70%  { box-shadow: 0 0 0 11px rgba(79, 129, 193, 0); }
  100% { box-shadow: 0 0 0 0 rgba(79, 129, 193, 0); }
}

/* camadas do banco */
.node--stage {
  border-left: 3px solid var(--stage, var(--hki-gray));
  padding: var(--d-stage);
}
/* --stage pinta a barra lateral (decorativa); --stage-ink pinta o texto,
   sempre num tom que passa no contraste sobre branco. */
.node--stage[data-stage="bronze"] { --stage: var(--bronze); --stage-ink: var(--hki-gray-dark); }
.node--stage[data-stage="silver"] { --stage: var(--silver); --stage-ink: var(--hki-blue-deep); }
.node--stage[data-stage="gold"]   { --stage: var(--gold);   --stage-ink: var(--hki-blue-deep); }

.node--stage[data-stage="gold"] {
  box-shadow: 0 0 0 1px rgba(79, 129, 193, .28), 0 8px 22px rgba(79, 129, 193, .18);
}
.node--stage[data-stage="gold"]:hover,
.node--stage[data-stage="gold"].is-active {
  box-shadow: 0 0 0 1px var(--hki-blue), 0 10px 26px rgba(79, 129, 193, .28);
}

.node__kicker {
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--stage-ink, var(--hki-gray-dark));
  margin-bottom: 3px;
}
.node--stage .node__name {
  font-family: var(--font-title);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: .04em;
}

.node__tag {
  display: block;
  font-size: 10.5px;
  color: var(--text-soft);
  margin-top: 2px;
  line-height: 1.35;
}

/* destinos e polar */
.node--end { border-left: 3px solid var(--hki-blue); padding: 11px 13px; }

.node--polar {
  border-style: dashed;
  border-color: var(--line);
  background: rgba(145, 146, 149, .06);
}
.node--polar .node__name { color: var(--hki-gray-dark); }
.node--polar .node__tag { color: var(--text-soft); }

.tag-out {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--hki-gray-dark);
  background: rgba(145, 146, 149, .2);
  border-radius: 3px;
  padding: 2px 5px;
  margin-bottom: 5px;
}

/* pulso de chegada de carga */
.node.is-hit { animation: hit .55s var(--ease); }
@keyframes hit {
  0%   { box-shadow: 0 0 0 0 rgba(79, 129, 193, .45); }
  100% { box-shadow: 0 0 0 10px rgba(79, 129, 193, 0); }
}

/* ---- fios ---- */

.wire {
  fill: none;
  stroke: var(--hki-gray);
  stroke-width: 1;
  opacity: .38;
  transition: opacity .3s var(--ease), stroke .3s var(--ease), stroke-width .3s var(--ease);
}
.wire--main { stroke: var(--hki-blue-deep); stroke-width: 1.5; opacity: .5; }
.wire--dashed { stroke-dasharray: 4 6; stroke: var(--hki-gray); opacity: .5; }
.wire.is-lit { stroke: var(--hki-blue); stroke-width: 2; opacity: 1; }
.wire.is-dim { opacity: .07; }

.p { transition: opacity .3s var(--ease); }
.p--critica { fill: var(--hki-blue); filter: drop-shadow(0 0 4px rgba(79, 129, 193, .85)); }
.p--alta    { fill: var(--hki-blue); }
.p--media   { fill: var(--hki-blue-deep); }
.p--apoio   { fill: var(--hki-gray); }
.p--flow    { fill: var(--hki-blue); }
.p--polar   { fill: none; stroke: var(--hki-gray); stroke-width: 1.2; }

/* ============================================================
   Painel lateral: legenda por padrão, detalhe ao clicar
   ============================================================ */

.flow__aside {
  position: sticky;
  top: 88px;
  background: var(--hki-surface);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.aside__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.aside__title {
  font-family: var(--font-title);
  font-size: 19px;
  font-weight: 400;
  line-height: 1.2;
}
.aside__kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--hki-blue-deep);
  margin-bottom: 5px;
}

.aside__close {
  flex: none;
  width: 26px;
  height: 26px;
  line-height: 1;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--hki-gray-dark);
  cursor: pointer;
  font-size: 15px;
  transition: all .2s var(--ease);
}
.aside__close:hover { border-color: var(--hki-blue); color: var(--hki-blue-deep); }

.aside__body { font-size: 13.5px; color: var(--hki-gray-dark); }
.aside__body p + p { margin-top: 11px; }
.aside__body strong { color: var(--hki-ink); font-weight: 600; }

.aside__rows {
  margin: 15px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--line-soft);
  display: grid;
  gap: 9px;
}
.aside__row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  font-size: 12.5px;
  align-items: baseline;
}
.aside__row dt {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.aside__row dd { margin: 0; color: var(--hki-ink); font-weight: 500; }

.transform {
  margin-top: 14px;
  padding: 11px 13px;
  border-radius: 8px;
  background: var(--blue-wash);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  flex-wrap: wrap;
}
.transform b { font-weight: 600; color: var(--hki-blue-deep); }
.transform span { color: var(--text-soft); }

.aside__warn {
  margin-top: 14px;
  padding: 11px 13px;
  border-left: 3px solid var(--hki-gray);
  background: rgba(145, 146, 149, .09);
  font-size: 12.5px;
  color: var(--hki-gray-dark);
  border-radius: 0 6px 6px 0;
}

/* legenda */
.legend { display: grid; gap: 16px; }

.legend__item { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 13px; align-items: center; }
.legend__label { font-size: 12.5px; color: var(--hki-gray-dark); line-height: 1.4; }
.legend__label b { display: block; color: var(--hki-ink); font-weight: 600; font-size: 12.5px; }

.legend__demo { display: flex; align-items: center; gap: 4px; justify-content: center; }
.legend__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--hki-blue); }
.legend__dot--sm { width: 4px; height: 4px; background: var(--hki-gray); }
.legend__dot--lg { width: 11px; height: 11px; box-shadow: 0 0 7px rgba(79, 129, 193, .9); }

.legend__note {
  font-size: 12px;
  color: var(--text-soft);
  border-top: 1px solid var(--line-soft);
  padding-top: 14px;
  line-height: 1.5;
}

/* ============================================================
   Controles abaixo do palco
   ============================================================ */

.flow__controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px 26px;
  align-items: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
}

.steps { display: flex; flex-wrap: wrap; gap: 8px; }

.step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--hki-gray-dark);
  cursor: pointer;
  transition: all .2s var(--ease);
}
.step:hover { border-color: var(--hki-blue); color: var(--hki-blue-deep); }
.step.is-on {
  background: var(--hki-blue-deep);
  border-color: var(--hki-blue-deep);
  color: #fff;
}
.step__n {
  font-size: 10px;
  font-weight: 700;
  opacity: .55;
  font-variant-numeric: tabular-nums;
}
.step.is-on .step__n { opacity: .7; }

.clock { grid-column: 2; grid-row: 1 / span 2; width: 176px; }
.clock__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.clock__label { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-soft); }
.clock__time {
  font-family: var(--font-title);
  font-size: 17px;
  font-weight: 400;
  color: var(--hki-blue-deep);
  font-variant-numeric: tabular-nums;
}
.clock__track { height: 3px; background: var(--line-soft); border-radius: 2px; overflow: hidden; }
.clock__fill { display: block; height: 100%; width: 0; background: var(--hki-blue); }

.filters { grid-column: 1; display: flex; flex-wrap: wrap; gap: 10px 26px; }
.filters__row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.filters__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.chips { display: flex; flex-wrap: wrap; gap: 5px; }

.chip {
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--hki-gray-dark);
  cursor: pointer;
  transition: all .18s var(--ease);
}
.chip:hover { border-color: var(--hki-blue); color: var(--hki-blue-deep); }
.chip.is-on {
  background: var(--blue-wash-2);
  border-color: var(--hki-blue);
  color: var(--hki-blue-deep);
  font-weight: 600;
}

/* ============================================================
   Seções de apoio
   ============================================================ */

.support {
  scroll-margin-top: 90px;   /* a topbar é fixa: não deixa o título por baixo dela */
  max-width: 1080px;
  margin: 0 auto;
  padding: 56px 28px;
  border-top: 1px solid var(--line-soft);
}

.support__head { max-width: 720px; margin-bottom: 30px; }
.support__head h2 { font-size: clamp(23px, 2.6vw, 32px); margin: 6px 0 10px; }
.support__lead { color: var(--hki-gray-dark); font-size: 14.5px; }

/* ---- trilha de 24h ---- */

.track {
  background: var(--hki-surface);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 24px 26px 18px;
  box-shadow: var(--shadow-sm);
}

.lane { display: grid; grid-template-columns: 186px minmax(0, 1fr); gap: 20px; align-items: center; padding: 15px 0; }
.lane + .lane { border-top: 1px solid var(--line-soft); }

.lane__name { font-size: 13.5px; font-weight: 600; }
.lane__meta { font-size: 11px; color: var(--text-soft); margin-top: 3px; line-height: 1.4; }
.lane__badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--hki-blue-deep);
  background: var(--blue-wash-2);
  border-radius: 4px;
  padding: 2px 6px;
  margin-top: 6px;
}
.lane__badge[data-cargas="1"] { color: var(--hki-gray-dark); background: rgba(145, 146, 149, .16); }

.lane__rail { position: relative; height: 40px; }
.lane__line {
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: var(--line);
}

.mark {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--hki-surface);
  border: 2px solid var(--hki-blue);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease);
}
.mark[data-cargas="1"] { border-color: var(--text-soft); }
.mark.is-hit {
  background: var(--hki-blue);
  transform: scale(1.7);
  box-shadow: 0 0 0 6px rgba(79, 129, 193, .16);
}
.mark[data-cargas="1"].is-hit { background: var(--hki-gray); box-shadow: 0 0 0 6px rgba(145, 146, 149, .16); }

.mark__hour {
  position: absolute;
  top: calc(50% + 9px);
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.playhead {
  position: absolute;
  top: 2px;
  bottom: 2px;
  width: 1px;
  background: var(--hki-blue-deep);
  opacity: .5;
  transform: translateX(-.5px);
}

.track__axis {
  display: flex;
  justify-content: space-between;
  margin-left: 206px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  font-size: 10px;
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
}

.note {
  margin-top: 20px;
  background: var(--hki-surface);
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--hki-blue);
  border-radius: 0 10px 10px 0;
  padding: 15px 20px;
}
.note summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--hki-blue-deep);
  list-style: none;
}
.note summary::-webkit-details-marker { display: none; }
.note summary::before {
  content: '+';
  display: inline-block;
  width: 16px;
  font-weight: 400;
  font-size: 16px;
  color: var(--hki-blue-deep);
}
.note[open] summary::before { content: '–'; }
.note p { margin-top: 11px; font-size: 13px; color: var(--hki-gray-dark); padding-left: 16px; }

/* ---- antes × depois ---- */

.switch {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(145, 146, 149, .13);
  margin-bottom: 22px;
}
.switch__opt {
  padding: 7px 22px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--hki-gray-dark);
  cursor: pointer;
  transition: all .25s var(--ease);
}
.switch__opt.is-on { background: var(--hki-surface); color: var(--hki-blue-deep); box-shadow: var(--shadow-sm); }

.compare { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }

.compare li {
  background: var(--hki-surface);
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--hki-gray);
  border-radius: 0 10px 10px 0;
  padding: 15px 20px;
  font-size: 14px;
  color: var(--hki-gray-dark);
  display: flex;
  align-items: center;
  gap: 13px;
  transition: border-color .35s var(--ease), color .35s var(--ease), transform .35s var(--ease);
}
.compare li .mode-mark {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-soft);
  flex: none;
  width: 52px;
}
.compare li .mode-text { transition: opacity .3s var(--ease); }

.compare.is-depois li {
  border-left-color: var(--hki-blue);
  color: var(--hki-ink);
  font-weight: 500;
}
.compare.is-depois li .mode-mark { color: var(--hki-blue-deep); }

.compare li.is-swapping .mode-text { opacity: 0; }

/* ============================================================
   Rodapé
   ============================================================ */

.foot {
  border-top: 1px solid var(--line-soft);
  padding: 34px 28px 44px;
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  gap: 14px;
  justify-items: center;
  text-align: center;
}
.foot__logo { width: 200px; opacity: .8; }
.foot__resumo { font-size: 13px; color: var(--hki-gray-dark); max-width: 62ch; }
.foot__nota { font-size: 11px; color: var(--text-soft); }
.foot__nota span { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; }

/* ============================================================
   Modo apresentação
   ============================================================ */

body.is-presenting .support,
body.is-presenting .foot { display: none; }

body.is-presenting .flow { padding: 18px 24px 20px; }
body.is-presenting .flow__head { margin-bottom: 14px; }
body.is-presenting .flow__title { font-size: clamp(22px, 2.2vw, 28px); margin: 4px 0 6px; }
body.is-presenting .flow__lead { min-height: 2.6em; font-size: 14px; }
body.is-presenting .topbar { position: static; padding: 10px 24px; }

/* Compactação: um único conjunto de valores, usado tanto no modo
   apresentação quanto em telas de pouca altura (projetor, notebook). */
body.is-presenting {
  --d-card:    16px 18px 18px;
  --d-rowgap:  22px;
  --d-groups:  10px;
  --d-chips:   4px;
  --d-fonte:   5px 10px;
  --d-stages:  11px;
  --d-stage:   8px 12px;
  --d-collbl:  6px;
}
body.is-presenting .flow__controls { margin-top: 14px; padding-top: 14px; }
body.is-presenting .filters { gap: 8px 22px; }

@media (max-height: 900px) {
  :root {
    --d-card:    16px 18px 18px;
    --d-rowgap:  22px;
    --d-groups:  10px;
    --d-chips:   4px;
    --d-fonte:   5px 10px;
    --d-stages:  11px;
    --d-stage:   8px 12px;
    --d-collbl:  6px;
  }
  .flow { padding-top: 24px; }
  .flow__head { margin-bottom: 18px; }
}

/* ============================================================
   Responsivo
   ============================================================ */

@media (max-width: 1180px) {
  .flow__layout { grid-template-columns: minmax(0, 1fr) 262px; }
}

@media (max-width: 1024px) {
  .flow__layout { grid-template-columns: minmax(0, 1fr); }
  .flow__aside { position: static; }
  .flow__controls { grid-template-columns: minmax(0, 1fr); }
  .clock { grid-column: 1; grid-row: auto; width: 100%; max-width: 260px; }
}

@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; gap: 12px 16px; padding: 12px 18px; }
  .topbar__facts { margin-left: 0; order: 3; width: 100%; }
  /* nunca abaixo de 200px, mesmo no celular */
  .topbar__logo { width: 200px; }

  .flow { padding: 24px 18px; }
  .flow__stage { padding: 18px 16px 22px; }

  .grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "origem" "coleta" "banco" "fim" "polar";
    row-gap: 46px;
  }
  .col--polar { justify-self: stretch; width: 100%; }
  .col > :not(.col__label) { justify-content: flex-start; }
  .stages, .ends { gap: 14px; }

  .support { padding: 40px 18px; }
  .lane { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .track__axis { margin-left: 0; }
}

@media (max-width: 560px) {
  .topbar { gap: 10px 12px; }
  .topbar__title { border-left: 0; padding-left: 0; }
  .aside__row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .compare li { flex-direction: column; align-items: flex-start; gap: 6px; }
  .compare li .mode-mark { width: auto; }
}

/* ============================================================
   Movimento reduzido — a informação continua, a animação para
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .pulse { animation: none; box-shadow: 0 0 0 4px rgba(79, 129, 193, .18); }
  /* nada deve varrer a tela: o relógio e o cursor da trilha saem de cena.
     A cadência continua legível nos selos 4x/1x e nas marcas de hora. */
  .clock, .playhead { display: none; }
}
