/* O diálogo nativo ocupa a viewport. A camada de destaque e o balão
   usam as mesmas coordenadas, inclusive no celular. */
.vertex-guide {
  position: fixed;
  inset: 0;
  z-index: 10020;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  color: var(--ink);
  background: transparent;
  font-family: Manrope, sans-serif;
}
.vertex-guide:not([open]) { display: none; }
.vertex-guide[open] { display: block; }
.vertex-guide::backdrop { background: transparent; }
/* Evita deslocar o controle enquanto a seta está apontada para ele. */
.vertex-guide-open :is(.app-page-enter, .app-page-enter > *, .workspace-enter) { animation: none !important; }

.vertex-guide__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 19px 22px 11px; }
.vertex-guide__eyebrow { color: var(--ink-soft); font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.vertex-guide__progress { padding: 5px 9px; color: var(--text-accent); background: var(--surface-soft); border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.vertex-guide__dots { display: flex; gap: 5px; padding: 0 22px; }
.vertex-guide__dots span { flex: 1; height: 3px; border-radius: 8px; background: var(--line); transition: background-color .18s ease, transform .18s ease; }
.vertex-guide__dots .is-current { background: var(--brand-mid); transform: scaleY(1.65); }
.vertex-guide__dots .is-complete { background: var(--brand-end); }
.vertex-guide__body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px 22px 20px; }
.vertex-guide [hidden] { display: none !important; }
.vertex-guide__symbol { display: grid; place-items: center; width: 64px; height: 48px; margin-bottom: 10px; color: var(--text-accent); }
.vertex-guide__symbol svg { width: 62px; height: 46px; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.vertex-guide h2 { margin: 0 0 10px; font-size: clamp(22px, 3vw, 28px); font-weight: 800; line-height: 1.13; letter-spacing: -.035em; text-wrap: balance; }
.vertex-guide h2:focus { outline: none; }
.vertex-guide p { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.58; }
.vertex-guide strong, .vertex-guide b { color: var(--ink); }
.vertex-guide__callout { margin: 14px 0 0; padding: 13px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.vertex-guide__callout b { display: block; margin-bottom: 4px; font-size: 12px; }
.vertex-guide__callout span { display: block; color: var(--ink-soft); font-size: 12px; line-height: 1.5; }
.vertex-guide .vertex-guide__note { margin-top: 13px; font-size: 11px; line-height: 1.5; }
.vertex-guide__steps { display: grid; gap: 7px; margin: 13px 0 0; padding-left: 19px; color: var(--ink-soft); font-size: 12px; line-height: 1.5; }
.vertex-guide__steps li { padding-left: 3px; }
.vertex-guide__steps li::marker { color: var(--text-accent); font-weight: 800; }
.vertex-guide__features { display: grid; gap: 0; margin: 12px 0 0; padding: 0; list-style: none; }
.vertex-guide__features li { padding: 9px 0; border-bottom: 1px solid var(--line); }
.vertex-guide__features li:last-child { padding-bottom: 0; border-bottom: 0; }
.vertex-guide__features b { display: block; margin-bottom: 2px; font-size: 12px; }
.vertex-guide__features span { display: block; color: var(--ink-soft); font-size: 11px; line-height: 1.45; }
.vertex-guide__footer { display: flex; flex: 0 0 auto; align-items: center; gap: 7px; padding: 13px 16px; border-top: 1px solid var(--line); }
.vertex-guide__footer button { min-height: 40px; padding: 8px 11px; border: 0; border-radius: 11px; font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.vertex-guide__footer button:focus-visible, [data-open-guide]:focus-visible { outline: 3px solid var(--brand-end); outline-offset: 3px; }
.vertex-guide__back { color: var(--ink); background: var(--surface-soft); }
.vertex-guide__back:disabled { opacity: .4; cursor: default; }
.vertex-guide__skip { margin-left: auto; color: var(--ink-soft); background: transparent; }
.vertex-guide__next { display: flex; align-items: center; justify-content: center; gap: 7px; color: white; background: var(--brand-mid); }
.vertex-guide__next:hover { background: var(--brand-start); }
.vertex-guide__next:active, .vertex-guide__back:active, .vertex-guide__skip:active { transform: translateY(1px); }

.vertex-guide-backdrop, .vertex-guide__arrows {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.vertex-guide-backdrop[hidden] { display: none; }
.vertex-guide-veil {
  position: absolute;
  display: block;
  background: rgb(3 12 24 / .66);
  backdrop-filter: blur(5px) saturate(.75);
}
.vertex-guide__arrows {
  width: 100%;
  height: 100%;
  overflow: visible;
  color: var(--brand-end);
}
.vertex-guide__arrows .vertex-guide-target {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  filter: drop-shadow(0 0 3px #061626);
}
.vertex-guide__arrows path { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; filter: drop-shadow(0 1px 2px #061626); }
.vertex-guide__arrows polygon { fill: currentColor; filter: drop-shadow(0 1px 2px #061626); }
.vertex-guide__arrows circle { fill: var(--surface); stroke: currentColor; stroke-width: 2; }
.vertex-guide__arrows text { fill: var(--ink); font: 800 12px Manrope, sans-serif; text-anchor: middle; dominant-baseline: central; }

.vertex-guide__presentation {
  position: absolute;
  display: grid;
  grid-template-columns: minmax(100px, .65fr) minmax(250px, 1fr);
  align-items: end;
  gap: 12px;
  width: min(575px, calc(100% - 24px));
}
.vertex-guide[data-tex-step="0"] .vertex-guide__presentation { width: min(680px, calc(100% - 24px)); }
.vertex-guide__bubble {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: var(--guide-card-max-height, calc(100dvh - 24px));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 12px 36px rgb(0 0 0 / .32);
}
.vertex-guide__body { flex: 1 1 auto; }
.vertex-guide__top { flex: 0 0 auto; }
.vertex-guide__companion { pointer-events: none; }
.vertex-guide__companion img {
  display: block;
  width: 100%;
  height: min(170px, var(--guide-card-max-height, 170px));
  object-fit: contain;
  object-position: center bottom;
  transform: scaleX(var(--tex-direction, 1));
  filter: drop-shadow(0 8px 10px rgb(0 0 0 / .18));
}
.vertex-guide[data-tex-step="0"] .vertex-guide__companion img { height: min(240px, var(--guide-card-max-height, 240px)); }
.vertex-guide__companion [data-tex-dark] { display: none; }
:root[data-theme="dark"] .vertex-guide__companion [data-tex-light] { display: none; }
:root[data-theme="dark"] .vertex-guide__companion [data-tex-dark] { display: block; }

@media (max-width: 620px) {
  .vertex-guide__presentation,
  .vertex-guide[data-tex-step="0"] .vertex-guide__presentation {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: min(420px, calc(100% - 24px));
  }
  .vertex-guide__companion { width: 100px; align-self: flex-end; margin-right: 12px; }
  .vertex-guide__companion img { height: 68px; }
  .vertex-guide[data-tex-step="0"] .vertex-guide__companion { width: 145px; }
  .vertex-guide[data-tex-step="0"] .vertex-guide__companion img { height: 96px; }
  .vertex-guide__top { padding: 10px 14px 7px; }
  .vertex-guide__dots { padding-inline: 14px; }
  .vertex-guide__body { padding: 11px 14px 12px; }
  .vertex-guide h2 { font-size: 20px; }
  .vertex-guide__footer { flex-wrap: wrap; padding: 7px 9px; }
}
@media (max-height: 520px) {
  .vertex-guide__top { padding-block: 8px 5px; }
  .vertex-guide__body { padding-block: 8px; }
  .vertex-guide__footer { padding-block: 6px; }
  .vertex-guide__companion img { max-height: 78px; }
}
@media (prefers-reduced-motion: reduce) {
  .vertex-guide__dots span { transition: none; }
}
