/*
 * v24 · 21/11/2026 · "Integre a Akrus na sua infraestrutura" (Lady).
 * Mecânica: o trecho real de POST /v1/charges roda; a cobrança Pix do app gera o QR e é paga; o charge.paid chega
 * assinado no log do servidor. Palco no azul do dial (painel v3 aprovado), lajes com aresta acesa e uma luz só (bento).
 * Não toca hero, Planos, site/v21/filme.* nem os blocos v23.
 */
/* A seção inteira é o palco no azul do dial: separa de Segurança (obsidiana) e de Perguntas (creme). */
.k24 {
  padding-bottom: clamp(96px, 11vw, 160px);
  background:
    radial-gradient(70% 55% at 12% 0%, rgba(140, 186, 236, 0.26) 0%, transparent 62%),
    linear-gradient(170deg, #22426a 0%, #183052 42%, #0f213a 100%);
  color: #f4f2ee;
  isolation: isolate;
}
.k24__note { margin: -12px 0 24px; font-size: 14px; color: rgba(244, 242, 238, 0.66); }
.k24__head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: end;
  margin-bottom: clamp(40px, 5vw, 64px);
}
.k24 .k24__title { max-width: 14ch; color: #f4f2ee; }
.k24 .k24__title .k24__title-b { display: block; color: rgba(244, 242, 238, 0.58); }
.k24__lead { margin: 0 0 28px; max-width: 44ch; color: rgba(244, 242, 238, 0.74); }
.k24__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 8px;
  background: #fff;
  color: #111113;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.k24__cta svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s ease; }
.k24__cta:hover { background: #e7e5e6; }
.k24__cta:hover svg { transform: translateX(3px); }
.k24__cta:focus-visible,
.k24 button:focus-visible,
.k24 [tabindex="0"]:focus-visible { outline: 2px solid #6aa6ea; outline-offset: 3px; }

/* Palco: a laje azul do dial, luz em cima à esquerda, grão. */
.k24__stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(20px, 2.6vw, 36px);
  align-items: start;
}
.k24__dev { display: grid; gap: clamp(16px, 2vw, 24px); min-width: 0; }
.k24__dev .k24-log { margin-right: clamp(48px, 5.6vw, 96px); }

/* Lajes escuras: a mesma espessura do bento (aresta acesa, borda, sombra de contato e de projeção). */
.k24-ed,
.k24-pix,
.k24-log {
  position: relative;
  border-radius: 16px;
  background: linear-gradient(180deg, #141418 0%, #0b0b0d 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 0 1px rgba(0, 0, 0, 0.5),
    0 2px 0 rgba(0, 0, 0, 0.35),
    0 28px 50px -24px rgba(3, 10, 20, 0.85);
}

/* Editor */
.k24-ed { display: flex; flex-direction: column; min-width: 0; }
.k24-ed__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 0 10px 0 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.k24-ed__tabs { display: flex; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.k24-ed__tabs button {
  position: relative;
  flex: none;
  min-height: 56px;
  padding: 0 14px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  color: #99979b;
  cursor: pointer;
}
.k24-ed__tabs button:hover { color: #f4f2ee; }
.k24-ed__tabs button[aria-selected='true'] { color: #f4f2ee; }
.k24-ed__tabs button[aria-selected='true']::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: #6aa6ea;
}
.k24-run {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px 0 12px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: #111113;
  font: inherit;
  font-size: 15px;
  white-space: nowrap;
  font-weight: 600;
  cursor: pointer;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.18);
  transition: background-color 0.2s ease, opacity 0.2s ease;
}
.k24-run svg { width: 14px; height: 14px; fill: currentColor; }
.k24-run:hover { background: #e7e5e6; }
.k24-run[aria-disabled='true'] { opacity: 0.6; cursor: progress; }
.k24-ed__pre {
  margin: 0;
  padding: 20px 22px;
  overflow: auto;
  font-family: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13.5px;
  line-height: 1.7;
  color: #e7e5e6;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}
.k24-ed__pre code { font: inherit; white-space: pre; }
.k24 .tk-c { color: #8f8d92; font-style: italic; }
.k24 .tk-s { color: #dacbc0; }
.k24 .tk-k { color: #6aa6ea; }
.k24 .tk-p { color: #b7d4f5; }
.k24 .tk-n { color: #c2aea0; }
.k24 .tk-f { color: #b1afb2; }
.k24 .tk-v { color: #e4c9b6; }
.k24-ed__pre.is-running code { animation: k24-scan 0.9s ease both; }
@keyframes k24-scan { 0% { opacity: 0.55; } 100% { opacity: 1; } }
.k24-ed__out {
  position: relative;
  flex: 1;
  display: grid;
  min-height: 210px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.015);
}
.k24-ed__out > * { grid-area: 1 / 1; margin: 0; transition: opacity 0.35s ease, transform 0.35s ease; }
.k24-ed__wait { align-self: center; justify-self: center; font-size: 15px; color: #858388; }
.k24-ed__res { opacity: 0; transform: translateY(8px); padding: 16px 22px 18px; visibility: hidden; transition: opacity 0.35s ease, transform 0.35s ease, visibility 0s linear 0.35s; }
.k24-ed__status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 10px; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 14px; color: #e7e5e6; }
.k24-ed__status b { padding: 2px 8px; border-radius: 6px; background: rgba(158, 230, 184, 0.14); color: #9ee6b8; font-weight: 600; }
.k24-ed__status span { color: #858388; }
.k24-ed__json { margin: 0; overflow: auto; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 14px; line-height: 1.6; color: #e7e5e6; }
.k24-ed__json code { font: inherit; white-space: pre; }
.k24__stage:not([data-state='idle']) .k24-ed__wait { opacity: 0; transition: none; visibility: hidden; }
.k24__stage:not([data-state='idle']) .k24-ed__res { opacity: 1; transform: none; visibility: visible; transition: opacity 0.35s ease, transform 0.35s ease, visibility 0s; }

/* Coluna da direita: a cobrança e o servidor, ligados por um fio. */
.k24__flow { display: grid; grid-template-rows: auto 1fr; gap: clamp(16px, 2vw, 24px); min-width: 0; }

/* A cobrança Pix no creme do app (componente "Pix gerado"), o objeto que domina: por cima do editor, em profundidade. */
.k24 .k24-pix {
  position: relative;
  z-index: 2;
  margin-left: clamp(-88px, -5vw, -40px);
  margin-top: 40px;
  padding: 24px 26px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-radius: 22px;
  background:
    radial-gradient(120% 80% at 0% 0%, #fbf7f1 0%, transparent 60%),
    linear-gradient(170deg, #f1e8de 0%, #e4d6c8 100%);
  color: #201916;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 0 0 1px rgba(32, 25, 22, 0.12),
    0 3px 0 #c9b8a8,
    0 5px 0 rgba(32, 25, 22, 0.25),
    0 50px 90px -30px rgba(3, 10, 20, 0.95);
}
.k24-pix__top { align-self: stretch; display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.k24-pix__brand { height: 18px; width: auto; display: block; filter: invert(1) brightness(0.25); }
.k24-pix__mode { padding: 3px 10px; border-radius: 999px; background: rgba(50, 96, 143, 0.12); color: #284e76; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; }
.k24 .k24-pix__tag { margin: 0; font-size: 15px; font-weight: 500; color: #523f38; }
.k24-pix__amount { margin: 4px 0 2px; font-size: clamp(34px, 3.2vw, 46px); font-weight: 600; letter-spacing: -0.03em; color: #201916; font-variant-numeric: tabular-nums; }
.k24-pix__what { margin: 0 0 18px; font-size: 15px; color: #523f38; }
.k24-pix__id { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 5px; background: rgba(32, 25, 22, 0.08); font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 13px; color: #382b27; }
.k24-pix__qr {
  position: relative;
  width: min(220px, 70%);
  aspect-ratio: 1;
  padding: 14px;
  border-radius: 18px;
  background: #fffdf9;
  box-shadow: inset 0 0 0 1px rgba(32, 25, 22, 0.1), 0 1px 0 rgba(255, 255, 255, 0.8), 0 12px 24px -16px rgba(32, 25, 22, 0.5);
}
.k24-qr { display: block; width: 100%; height: 100%; opacity: 0.08; transition: opacity 0.5s ease, filter 0.5s ease; filter: blur(2px); }
.k24-qr rect { fill: #201916; }
.k24__stage[data-state='pending'] .k24-qr { opacity: 0.35; animation: k24-breathe 1s ease-in-out infinite alternate; }
.k24__stage[data-state='ready'] .k24-qr,
.k24__stage[data-state='paid'] .k24-qr { opacity: 1; filter: none; animation: none; }
@keyframes k24-breathe { from { opacity: 0.18; } to { opacity: 0.4; } }
.k24-pix__ok {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 2px;
  border-radius: 18px;
  background: #f4fbf6;
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.k24-pix__ok svg { width: 72px; height: 72px; padding: 14px; border-radius: 50%; background: #1d6b43; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 10px; }
.k24-pix__ok b { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; color: #1d6b43; }
.k24-pix__ok small { font-size: 15px; color: #2f5d43; }
.k24__stage[data-state='paid'] .k24-pix__ok { opacity: 1; transform: none; }
.k24-pix__status { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 16px 0 14px; font-size: 15px; font-weight: 500; color: #523f38; }
.k24-pix__status i { width: 8px; height: 8px; border-radius: 50%; background: #9c8173; flex: none; }
.k24__stage[data-state='ready'] .k24-pix__status i { background: #32608f; animation: k24-pulse 1.2s ease-in-out infinite; }
.k24__stage[data-state='paid'] .k24-pix__status,
.k24__stage[data-state='paid'] .k24-pix__tag { color: #1d6b43; }
.k24__stage[data-state='paid'] .k24-pix__status i { background: #1d6b43; }
@keyframes k24-pulse { 50% { box-shadow: 0 0 0 5px rgba(50, 96, 143, 0.2); } }
.k24-pix__copy { align-self: stretch; display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border-radius: 12px; background: rgba(255, 253, 249, 0.75); box-shadow: inset 0 0 0 1px rgba(32, 25, 22, 0.12); transition: opacity 0.3s ease; }
.k24-pix__copy code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 13px; color: #382b27; }
.k24-pix__copy span { flex: none; padding: 8px 12px; border-radius: 8px; background: #201916; color: #f4f2ee; font-size: 14px; font-weight: 600; }
.k24__stage[data-state='idle'] .k24-pix__copy,
.k24__stage[data-state='pending'] .k24-pix__copy,
.k24__stage[data-state='paid'] .k24-pix__copy { opacity: 0.4; }

/* O servidor */
.k24-log { display: flex; flex-direction: column; min-height: 220px; overflow: hidden; }
.k24__flow { position: relative; }
.k24-log__top { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.k24-log__top code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 14px; color: #e7e5e6; }
.k24-log__host { margin-left: auto; font-size: 14px; color: #858388; }
.k24-log__dot { width: 8px; height: 8px; border-radius: 50%; background: #9ee6b8; box-shadow: 0 0 0 4px rgba(158, 230, 184, 0.12); }
.k24-log__list { margin: 0; padding: 12px 18px 16px; list-style: none; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 14px; line-height: 1.6; }
.k24-log__idle { color: #858388; }
.k24-log__idle::after { content: '▍'; margin-left: 4px; animation: k24-caret 1s steps(1) infinite; }
@keyframes k24-caret { 50% { opacity: 0; } }
.k24-log__item { padding: 10px 0; border-top: 1px solid rgba(255, 255, 255, 0.06); animation: k24-in 0.45s cubic-bezier(0.16, 1, 0.3, 1) both; }
.k24-log__item:first-child { border-top: 0; }
.k24-log__row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; color: #e7e5e6; }
.k24-log__type { color: #b7d4f5; font-weight: 600; }
.k24-log__sig { color: #9ee6b8; }
.k24-log__code { margin-left: auto; padding: 0 7px; border-radius: 5px; background: rgba(158, 230, 184, 0.14); color: #9ee6b8; font-weight: 600; }
.k24-log__body { margin: 6px 0 0; color: #b1afb2; white-space: pre-wrap; word-break: break-word; }
.k24-log__body b { color: #dacbc0; font-weight: 500; }
@keyframes k24-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Tablet e celular: empilha. */
@media (max-width: 1023px) {
  .k24__head { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .k24__stage { grid-template-columns: minmax(0, 1fr); }
  .k24 .k24-pix { margin: 0; }
  .k24__dev { display: contents; }
  .k24__dev .k24-log { margin-right: 0; }
  .k24-ed { order: 1; }
  .k24 .k24-pix { order: 2; }
  .k24-log { order: 3; }
  .k24__stage[data-state='idle'] .k24-ed__out { min-height: 56px; }
}
@media (max-width: 560px) {
  .k24__stage { gap: 12px; }
  .k24__flow { gap: 12px; }
  .k24-ed__pre { padding: 16px; font-size: 13px; }
  .k24-ed__res { padding: 14px 16px 16px; }
  .k24-ed__json, .k24-ed__status { font-size: 13px; }
  .k24-ed__out { min-height: 190px; }
  .k24__stage[data-state='idle'] .k24-ed__out { min-height: 52px; }
  .k24-ed__tabs button { padding: 0 10px; }
  .k24-ed__tabs button[aria-selected='true']::after { left: 10px; right: 10px; }
  .k24-pix { padding: 16px; column-gap: 14px; }
  .k24-pix__qr { width: min(220px, 68%); height: auto; }
  .k24-pix__ok svg { width: 60px; height: 60px; padding: 12px; margin-bottom: 6px; }
  .k24-pix__ok b { font-size: 22px; }
  .k24-ed__json { max-height: 150px; overflow: auto; }
  .k24-pix__amount { font-size: 28px; }
  .k24-log__top { padding: 0 14px; }
  .k24-log__list { padding: 10px 14px 14px; font-size: 13px; }
  .k24__cta { width: 100%; justify-content: center; }
  .k24-run { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .k24 *, .k24 *::before, .k24 *::after { animation: none !important; transition: none !important; }
}

.k24-ed__pre, .k24-ed__json {
  background:
    linear-gradient(90deg, #0d0d10 30%, rgba(13, 13, 16, 0)) left center / 28px 100% no-repeat local,
    linear-gradient(270deg, #0d0d10 30%, rgba(13, 13, 16, 0)) right center / 28px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(255, 255, 255, 0.16), transparent) left center / 12px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(255, 255, 255, 0.16), transparent) right center / 12px 100% no-repeat scroll;
}

.k24-ed__out { grid-template-columns: minmax(0, 1fr); }
.k24-ed__res { min-width: 0; }
.k24-ed__json { max-width: 100%; }
.k24-ed__status span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; max-width: 100%; }
.k24-ed, .k24-log { min-width: 0; }

/* Paga: um rótulo só (no topo) e o QR vira o estado; o copia e cola sai. */
.k24__stage[data-state='paid'] .k24-pix__copy,
.k24__stage[data-state='paid'] .k24-pix__status { display: none; }
.k24__stage[data-state='paid'] .k24-pix__qr { margin-bottom: 4px; }
