:root {
  --bastidor: #193d32;
  --bastidor-2: #21483b;
  --verde: #286046;
  --mineral: #f5f6f1;
  --tinta: #1d3328;
  --linha: #cfdacb;
  --claude: #d97757;
  --codex: #10a37f;
  --display: "Bahnschrift", "DIN Alternate", "Segoe UI", sans-serif;
  --texto: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --mono: "Cascadia Mono", "Cascadia Code", Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--mineral); color: var(--tinta); font: 17px/1.6 var(--texto); }
a { color: var(--verde); }
:focus-visible { outline: 3px solid #f0a07f; outline-offset: 3px; border-radius: 4px; }
.faixa { max-width: 1120px; margin: 0 auto; padding: 0 28px; }
.sr { position: absolute; left: -999px; top: 0; background: #fff; color: #000; padding: 8px 12px; z-index: 100; }
.sr:focus { left: 8px; top: 8px; }

/* Cabeçalho fixo */
header.topo { position: sticky; top: 0; z-index: 20; background: var(--bastidor); color: #e4eee3; border-bottom: 1px solid #2b5545; }
header.topo .faixa { display: flex; align-items: center; gap: 24px; min-height: 60px; flex-wrap: wrap; }
.marca { display: flex; align-items: center; gap: 10px; color: #f2f7ec; text-decoration: none;
         font: 600 20px/1 var(--display); font-stretch: 87%; letter-spacing: .01em; }
.marca img { width: 28px; height: 28px; }
header.topo nav { margin-left: auto; display: flex; gap: 22px; }
header.topo nav a { color: #c7d9c8; text-decoration: none; font-size: 15px; padding: 6px 0; }
header.topo nav a:hover { color: #fff; text-decoration: underline; }

/* Botões */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 9px; border: 1.5px solid #86b39b;
       background: transparent; color: #eef5ea; font: 600 16px/1.2 var(--texto); cursor: pointer; text-decoration: none; min-height: 44px; }
.btn:hover { background: #2a5444; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.pri { background: #f2f7ec; color: var(--tinta); border-color: #f2f7ec; }
.btn.pri:hover { background: #fff; }
.btn.link { border-color: transparent; text-decoration: underline; text-underline-offset: 4px; }
header.topo .btn { margin-left: 0; padding: 6px 14px; min-height: 40px; }

/* Bloco 1: primeira tela */
.hero { background: var(--bastidor); color: #e9f1e7; padding: 28px 0 24px; border-bottom: 0; }
.hero h1 { font: 600 clamp(28px, 3.6vw, 44px)/1.08 var(--display); font-stretch: 84%; letter-spacing: -.01em; margin: 0 0 8px; color: #f6faf1; }
.hero .lead { color: #c3d6c6; font-size: 18px; margin: 0 0 16px; line-height: 1.4; }
.caminhos { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-bottom: 16px; }
.quadro { max-width: min(100%, calc((100svh - 330px) * 16 / 9)); min-width: 280px; margin: 0 auto 0 0; }
.quadro video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #0c1b15; border-radius: 12px; border: 1px solid #36604f; }
.vazio { margin: 0; padding: 40px 20px; border: 1px dashed #5d8573; border-radius: 12px; color: #d6e4d4; }
details.transcricao { margin-top: 8px; color: #d6e4d4; font-size: 15px; }
details.transcricao summary { cursor: pointer; padding: 6px 0; text-decoration: underline; text-underline-offset: 4px; }
details.transcricao ol { margin: 8px 0 0; padding-left: 22px; max-width: 70ch; }

/* Seções */
section { padding: 72px 0; border-bottom: 1px solid var(--linha); }
section.hero { padding: 28px 0 24px; border-bottom: 0; }
h2.titulo { font: 600 clamp(28px, 3.4vw, 40px)/1.08 var(--display); font-stretch: 84%; margin: 0 0 14px; color: var(--tinta); }
.intro { max-width: 64ch; color: #45594d; margin: 0 0 32px; }
.razoes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.razoes li { border-top: 3px solid var(--tinta); padding-top: 14px; }
.razoes b { display: block; font: 600 21px/1.2 var(--display); font-stretch: 90%; margin-bottom: 6px; }
.razoes p { margin: 0; color: #3d5146; }
.passos { list-style: none; counter-reset: passo; margin: 0 0 40px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 3px solid var(--tinta); }
.passos li { counter-increment: passo; padding: 18px 22px 0 0; }
.passos li::before { content: counter(passo); font: 600 15px/1 var(--display); color: var(--verde); display: block; margin-bottom: 10px; }
.passos b { display: block; font: 600 19px/1.2 var(--display); font-stretch: 90%; margin-bottom: 6px; }
.passos p { margin: 0; color: #4d6155; font-size: 15.5px; }
figure.tela { margin: 0; }
figure.tela img { width: 100%; height: auto; display: block; border-radius: 12px; border: 1px solid var(--linha); box-shadow: 0 30px 60px -30px rgba(25, 61, 50, .45); }
figure.tela figcaption { margin-top: 14px; color: #5a6d61; font-size: 15px; }

/* Provedores: painel interativo */
section.escuro { background: var(--bastidor); color: #e9f1e7; border-bottom: 0; }
section.escuro h2.titulo { color: #f6faf1; }
section.escuro .intro { color: #c3d6c6; }
.painel { position: relative; display: grid; grid-template-columns: minmax(180px, 1fr) minmax(260px, 1.35fr);
          gap: clamp(60px, 12vw, 180px); background: var(--bastidor-2); border: 1px solid #36604f; border-radius: 14px; padding: 30px clamp(18px, 3vw, 36px); }
.painel svg.cabos { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.coluna h3 { font: 600 12px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: #a9c5b4; margin: 0 0 14px; }
.clis { display: grid; gap: 16px; align-content: center; min-width: 0; }
.coluna { min-width: 0; }
.cli { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 10px; background: #193d32; border: 1px solid #3b6655; }
.cli strong { font: 600 20px/1.1 var(--display); font-stretch: 90%; display: block; color: #f3f8ef; }
.cli span { font: 13px/1.3 var(--mono); color: #a9c5b4; }
.cli .tomada { margin-left: auto; }
.tomada { width: 16px; height: 16px; border-radius: 50%; border: 3px solid #5d8573; background: #11281f; flex: none; transition: border-color .2s, background .2s; }
.cli[data-cli="claude"].ligado .tomada { border-color: var(--claude); background: var(--claude); }
.cli[data-cli="codex"].ligado .tomada { border-color: var(--codex); background: var(--codex); }
.provedores { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.provedores li, .provedores button { display: flex; align-items: center; gap: 12px; text-align: left; width: 100%;
                       padding: 10px 14px; border-radius: 9px; border: 1px solid #36604f; background: transparent;
                       color: #dce9da; font: 15px/1.3 var(--texto); }
.provedores button { cursor: pointer; }
.provedores li:has(> button) { padding: 0; border: 0; }
.provedores button:hover { background: #2a5444; }
.provedores button[aria-pressed="true"] { background: #f2f7ec; color: var(--tinta); border-color: #f2f7ec; }
.provedores button[aria-pressed="true"] .tomada { border-color: var(--verde); background: var(--verde); }
.provedores small { margin-left: auto; font: 12px/1 var(--mono); color: #a9c5b4; }
.provedores button[aria-pressed="true"] small { color: #3f5a4b; }
.legenda { grid-column: 1 / -1; margin: 6px 0 0; padding-top: 18px; border-top: 1px solid #36604f; color: #d6e4d4; font-size: 16px; min-height: 3.2em; }
.legenda b { color: #fff; }
path.cabo { fill: none; stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: puxar .55s ease-out forwards; }
path.cabo.claude { stroke: var(--claude); }
path.cabo.codex { stroke: var(--codex); }
text.protocolo { font: 12px var(--mono); fill: #cfe0cf; paint-order: stroke; stroke: var(--bastidor-2); stroke-width: 5px; }
@keyframes puxar { to { stroke-dashoffset: 0; } }
.rolagem { overflow-x: auto; margin-top: 40px; }
table.matriz { width: 100%; border-collapse: collapse; font-size: 15.5px; color: #e4eee3; }
.matriz caption { text-align: left; font: 600 12px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: #a9c5b4; padding-bottom: 12px; }
.matriz th, .matriz td { text-align: left; padding: 11px 14px; border-bottom: 1px solid #36604f; vertical-align: top; }
.matriz thead th { font: 600 12px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: #a9c5b4; border-bottom: 2px solid #86b39b; }
.matriz td:first-child { font-weight: 600; white-space: nowrap; }
.sim, .nao { font: 13px/1 var(--mono); padding: 4px 8px; border-radius: 5px; white-space: nowrap; }
.sim.claude { background: #f6dfd5; color: #8a3d22; }
.sim.codex { background: #d3efe5; color: #0b5c47; }
.nao { color: #a9c5b4; }
section.escuro code { background: #12261e; color: #dbe9d8; }
.nota { font-size: 15px; color: #5a6d61; max-width: 70ch; }
section.escuro .nota { color: #c3d6c6; margin-top: 18px; }

.duas { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.duas h3 { font: 600 20px/1.2 var(--display); font-stretch: 90%; margin: 0 0 12px; }
.duas ul { margin: 0; padding-left: 20px; color: #3d5146; }
.duas li { margin-bottom: 8px; }
code, pre { font-family: var(--mono); }
code { background: #e6ece2; padding: 1px 6px; border-radius: 4px; font-size: .9em; }
pre { background: #12261e; color: #dbe9d8; padding: 22px 24px; border-radius: 12px; overflow-x: auto; font-size: 14.5px; line-height: 1.55; margin: 0; }
pre .c { color: #9bb9a6; }
pre .k { color: #f2b49b; }
.cadeia { list-style: none; margin: 0 0 20px; padding: 0; max-width: 760px; }
.cadeia li { display: grid; grid-template-columns: 150px 1fr; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--linha); }
.cadeia li > span { font: 600 14px/1.4 var(--display); letter-spacing: .04em; text-transform: uppercase; color: var(--verde); }
.numeros { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.numeros li { border-top: 3px solid var(--tinta); padding-top: 12px; }
.numeros b { display: block; font: 600 clamp(40px, 5vw, 60px)/1 var(--display); font-stretch: 80%; color: var(--verde); }
.numeros span { display: block; margin-top: 6px; color: #3d5146; }
.req { margin: 0 0 20px; padding-left: 20px; color: #3d5146; }
footer { padding: 36px 0 60px; color: #5a6d61; font-size: 14px; }

/* Apresentar: diálogo modal, painel ancorado embaixo para o bloco real aparecer atrás */
.em-cena { outline: 4px solid #d97757; outline-offset: -4px; }
.apres { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: #12261e; color: #eef5ea; border-top: 3px solid var(--claude);
         padding: 14px 0 16px; box-shadow: 0 -18px 40px rgba(0, 0, 0, .35); }
.apres:focus { outline: none; }
.apres-in { max-width: 1120px; margin: 0 auto; padding: 0 28px; }
.apres-topo { display: flex; align-items: baseline; gap: 14px; font-size: 14px; color: #bcd2c3; }
.apres-topo strong { font: 600 16px/1.2 var(--display); color: #fff; }
.apres-topo .pos { margin-left: auto; font-family: var(--mono); }
.apres-legenda { margin: 8px 0 10px; font-size: 19px; line-height: 1.45; min-height: 4.4em; max-width: 80ch; }
.apres-barra { height: 4px; background: #2b5545; border-radius: 2px; overflow: hidden; margin-bottom: 12px; }
.apres-barra i { display: block; height: 100%; width: 0; background: var(--claude); }
.apres-ctl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.apres-ctl .btn { padding: 6px 14px; min-height: 40px; font-size: 15px; }
.apres-ctl select { min-height: 40px; border-radius: 9px; border: 1.5px solid #86b39b; background: #12261e; color: #eef5ea; font: 15px var(--texto); padding: 0 10px; max-width: 100%; }
.apres-aviso { flex-basis: 100%; font-size: 14px; color: #bcd2c3; }
.apres-aviso.falha { color: #ffd08a; font-weight: 600; }

@media (max-width: 860px) {
  .painel { grid-template-columns: 1fr 1.3fr; gap: 54px; padding: 22px 16px; }
  .passos { grid-template-columns: 1fr 1fr; row-gap: 26px; }
  .duas { grid-template-columns: 1fr; gap: 32px; }
  .razoes, .numeros { grid-template-columns: 1fr; gap: 20px; }
  .cadeia li { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 700px) {
  header.topo .faixa { gap: 4px 14px; padding-top: 8px; }
  header.topo nav { order: 3; width: 100%; margin-left: 0; flex-wrap: wrap; gap: 6px 18px; padding-bottom: 4px; }
  header.topo .btn { margin-left: auto; }
  .hero { padding-top: 18px; }
  .hero .lead { font-size: 16px; }
  .btn { padding: 8px 14px; font-size: 15px; }
  .quadro { max-width: 100%; }
  .apres-legenda { font-size: 16px; min-height: 6.5em; }
}
@media (max-width: 640px) {
  .painel { grid-template-columns: 1fr; gap: 26px; }
  .painel svg.cabos { display: none; }
  .clis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .clis h3 { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .provedores small { display: none; }
  .cli span { display: none; }
  .passos { grid-template-columns: 1fr; }
  .faixa { padding: 0 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
  path.cabo { stroke-dashoffset: 0; }
}
