/* ============================================================
   A11y Kit · v1.3.0 — painel de acessibilidade reutilizável
   Vanilla CSS, sem dependências. Tudo prefixado com `ak-`.
   Tematize sobrescrevendo as variáveis em :root (ver --ak-*).
   ============================================================ */

:root {
  /* paleta do kit (sobrescreva no projeto host) */
  --ak-accent: #AB4807;
  --ak-accent-dark: #8B3700;
  --ak-accent-soft: rgba(171, 72, 7, 0.08);
  --ak-surface: #ffffff;
  --ak-surface-2: #f4ece4;
  --ak-text: #1c1714;
  --ak-text-dim: #4a4035;
  --ak-text-faint: #6b625b; /* 1.2: era #8a7f78 (3,9:1 nos títulos de grupo); agora 6:1 */
  --ak-line: #e0d6cc;
  --ak-line-strong: #c0794b;
  --ak-on-accent: #ffffff;
  --ak-shadow-md: 0 4px 12px rgba(40, 32, 26, 0.10);
  --ak-shadow-lg: 0 12px 32px rgba(40, 32, 26, 0.16);
  --ak-radius: 12px;
  --ak-radius-lg: 14px;
  /* 1.3 · identidade do painel (a loja sobrescreve via cfg.theme) */
  --ak-accent-ink: var(--ak-accent-dark); /* acento usado como TEXTO: mais escuro, contraste AA */
  --ak-head-bg: var(--ak-accent);          /* faixa do cabeçalho */
  --ak-canvas: var(--ak-surface-2);        /* fundo atrás dos cartões */
  --ak-line-soft: rgba(0, 0, 0, 0.07);
  --ak-switch-off: #8a8079;                /* trilho desligado: 3:1 contra o branco */
  --ak-panel-w: 760px;
  --ak-font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ak-z: 2147483000; /* acima de quase tudo */
  --ak-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  /* vars de espaçamento de texto (controladas pelo kit) */
  --ak-line-h: 1.9;
  --ak-letter: 0.045em;
  --ak-word: 0.1em;
}

/* ============ FAB (botão flutuante) ============ */
.ak-fab {
  position: fixed; bottom: 24px; right: 24px;
  width: 58px; height: 58px;
  display: grid; place-items: center;
  border: 2px solid var(--ak-accent); /* 1.3: anel na cor da marca */
  border-radius: 50%;
  background: var(--ak-surface);
  color: var(--ak-accent);
  box-shadow: var(--ak-shadow-lg);
  cursor: pointer;
  z-index: var(--ak-z);
  touch-action: none;
  user-select: none; -webkit-user-select: none;
  transition: transform 0.15s var(--ak-ease), box-shadow 0.15s var(--ak-ease);
}
.ak-fab:hover { transform: translateY(-2px) scale(1.04); }
.ak-fab:active { transform: scale(0.97); }
.ak-fab svg { width: 28px; height: 28px; pointer-events: none; }
.ak-fab img { width: 36px; height: 36px; border-radius: 50%; pointer-events: none; -webkit-user-drag: none; }
/* cantos (definidos depois do base para vencer especificidade) */
/* --ak-fab-y / --ak-fab-x (tema): afastam o botão da borda, para não cobrir outro botão fixo do site
   (chat, aviso de cookies). Padrão 24px. */
.ak-fab--br { top: auto; bottom: var(--ak-fab-y, 24px); left: auto; right: var(--ak-fab-x, 24px); }
.ak-fab--bl { top: auto; bottom: var(--ak-fab-y, 24px); right: auto; left: var(--ak-fab-x, 24px); }
.ak-fab--tr { bottom: auto; top: 20px; left: auto; right: 24px; }
.ak-fab--tl { bottom: auto; top: 20px; right: auto; left: 24px; }
.ak-fab--dragging {
  transition: none !important;
  cursor: grabbing;
  transform: scale(1.08);
  box-shadow: 0 20px 48px rgba(40, 32, 26, 0.30);
}

/* zonas de encaixe (durante o arraste) */
.ak-dropzones {
  position: fixed; inset: 0; z-index: calc(var(--ak-z) - 1);
  pointer-events: none; opacity: 0; transition: opacity 0.2s var(--ak-ease);
}
.ak-dropzones.is-on { opacity: 1; }
.ak-dropzone {
  position: fixed; width: 62px; height: 62px; border-radius: 16px;
  border: 2px dashed var(--ak-line-strong); background: var(--ak-accent-soft);
  transition: transform 0.15s var(--ak-ease), background 0.15s, border-color 0.15s;
}
.ak-dropzone--br { bottom: 22px; right: 22px; }
.ak-dropzone--bl { bottom: 22px; left: 22px; }
.ak-dropzone--tr { top: 18px; right: 22px; }
.ak-dropzone--tl { top: 18px; left: 22px; }
.ak-dropzone.is-near { background: var(--ak-accent); border-color: var(--ak-accent); transform: scale(1.12); }

/* ============ Painel (1.3: cara de plugin da marca, duas colunas) ============ */
.ak-backdrop {
  position: fixed; inset: 0; z-index: calc(var(--ak-z) + 1);
  background: rgba(20, 16, 13, 0.4);
  opacity: 0; pointer-events: none; transition: opacity 0.25s var(--ak-ease);
}
.ak-backdrop.is-open { opacity: 1; pointer-events: auto; }

.ak-panel {
  position: fixed; top: 0; right: 0; height: 100%;
  /* 1.3: mais largo, com os grupos em duas colunas; em telas estreitas volta a uma coluna */
  /* com fonte maior o <html> tem zoom e o painel também cresce: dividir pela escala mantém o painel dentro da tela */
  width: var(--ak-panel-w); max-width: calc((100vw - 24px) / var(--ak-zoom, 1));
  box-sizing: border-box;
  background: var(--ak-canvas);
  border-left: 1px solid var(--ak-line);
  box-shadow: var(--ak-shadow-lg);
  z-index: calc(var(--ak-z) + 2);
  display: flex; flex-direction: column;
  container-type: inline-size; container-name: akpanel;
  transform: translateX(100%);
  /* Fechado o painel so saia da tela: os 34 controles continuavam na ordem do
     Tab (o foco sumia fora da tela antes de chegar ao curso) e no leitor de
     tela. visibility:hidden tira os dois; o atraso deixa a animacao terminar. */
  visibility: hidden;
  transition: transform 0.28s var(--ak-ease), visibility 0s linear 0.28s;
  font-family: var(--ak-font);
  font-size: 14px; line-height: 1.4;
  color: var(--ak-text);
  text-align: left;
}
.ak-panel *, .ak-panel *::before, .ak-panel *::after { box-sizing: border-box; }
.ak-panel.is-open { transform: translateX(0); visibility: visible; transition: transform 0.28s var(--ak-ease); }
.ak-panel.ak-panel--left {
  left: 0; right: auto;
  border-left: 0; border-right: 1px solid var(--ak-line);
  transform: translateX(-100%);
}
.ak-panel.ak-panel--left.is-open { transform: translateX(0); }
.ak-ico { width: 20px; height: 20px; flex-shrink: 0; display: block; }
.ak-panel :focus-visible { outline: 3px solid var(--ak-accent-ink); outline-offset: 2px; }

/* cabeçalho na cor da marca */
.ak-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px 16px 20px; flex-shrink: 0;
  background: var(--ak-head-bg); color: var(--ak-on-accent);
}
.ak-head :focus-visible { outline-color: var(--ak-on-accent); }
.ak-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ak-brand-ico {
  width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: 50%; background: rgba(255, 255, 255, 0.16); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}
.ak-brand-ico .ak-ico { width: 26px; height: 26px; }
/* mesmo ícone do botão (imagem), sobre disco branco */
.ak-brand-ico--img { background: #fff; box-shadow: none; overflow: hidden; }
.ak-brand-ico--img img { width: 36px; height: 36px; max-width: none; display: block; border-radius: 50%; }
.ak-brand-txt { min-width: 0; }
.ak-title { margin: 0; font-size: 19px; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; color: inherit; }
.ak-subtitle { margin: 2px 0 0; font-size: 13px; line-height: 1.35; color: inherit; }
.ak-head-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.ak-reset {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px;
  font: inherit; font-size: 13px; font-weight: 600; color: inherit;
  background: transparent; border: 1px solid rgba(255, 255, 255, 0.7); border-radius: 99px; cursor: pointer;
}
.ak-reset .ak-ico { width: 16px; height: 16px; }
.ak-reset:hover { background: rgba(255, 255, 255, 0.16); }
.ak-close {
  width: 40px; height: 40px; display: grid; place-items: center; padding: 0;
  border: 0; background: transparent; color: inherit; cursor: pointer; border-radius: 50%;
}
.ak-close:hover { background: rgba(255, 255, 255, 0.16); }
.ak-close .ak-ico { width: 22px; height: 22px; }

/* abas em controle segmentado */
.ak-panel .ak-tabs {
  display: flex; gap: 4px; flex-shrink: 0; overflow: visible;
  margin: 14px 20px 2px; padding: 4px;
  background: var(--ak-surface); border: 1px solid var(--ak-line); border-radius: 99px;
}
.ak-panel .ak-tab {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 6px 12px; font: inherit; font-size: 14px; font-weight: 600;
  border: 0; border-radius: 99px; background: transparent; color: var(--ak-text-dim); cursor: pointer;
}
.ak-tab .ak-ico { width: 18px; height: 18px; }
.ak-panel .ak-tab:hover { color: var(--ak-text); background: var(--ak-accent-soft); }
.ak-panel .ak-tab.is-active { background: var(--ak-accent); color: var(--ak-on-accent); }

.ak-body { flex: 1; overflow-y: auto; padding: 14px 20px 24px; overscroll-behavior: contain; }
.ak-pane { display: none; }
/* o site pode estilizar [role=tabpanel]/[role=tab] (a loja e a VTEX fazem); o painel não herda isso */
.ak-panel .ak-pane { margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
/* duas colunas: a ordem de leitura e do Tab desce a 1ª coluna e depois a 2ª (a mesma do código) */
.ak-pane.is-active { display: block; columns: 2; column-gap: 14px; }

.ak-group {
  break-inside: avoid; -webkit-column-break-inside: avoid; page-break-inside: avoid;
  display: block; width: 100%; margin: 0 0 14px; padding: 14px 16px 12px;
  background: var(--ak-surface); border: 1px solid var(--ak-line); border-radius: var(--ak-radius-lg);
}
.ak-group--wide { column-span: all; -webkit-column-span: all; }
.ak-group-title {
  display: flex; align-items: center; gap: 10px; margin: 0 0 8px;
  font-size: 15px; font-weight: 700; line-height: 1.25; letter-spacing: 0; text-transform: none; color: var(--ak-text);
}
.ak-group-ico {
  width: 32px; height: 32px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: 10px; background: var(--ak-accent-soft); color: var(--ak-accent-ink);
}
.ak-group-ico .ak-ico { width: 18px; height: 18px; }
.ak-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 8px 0; min-height: 44px;
}
.ak-group .ak-row + .ak-row { border-top: 1px solid var(--ak-line-soft); }
.ak-row--col { flex-direction: column; align-items: stretch; gap: 8px; }
.ak-row[hidden] { display: none; }
.ak-rowlabel { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ak-text); min-width: 0; }
.ak-rowico { display: grid; place-items: center; color: var(--ak-text-dim); }
.ak-rowico .ak-ico { width: 18px; height: 18px; }
.ak-row--col .ak-rowlabel { margin-bottom: 0; }
.ak-note { font-size: 12.5px; line-height: 1.5; color: var(--ak-text-dim); margin: 8px 0 2px; }
.ak-badge {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--ak-text-faint); border: 1px solid var(--ak-line); border-radius: 99px; padding: 1px 7px;
}

/* switch */
.ak-switch {
  position: relative; width: 46px; height: 28px; flex-shrink: 0;
  border: 0; background: none; cursor: pointer; padding: 0; border-radius: 99px;
}
.ak-switch .ak-track {
  display: block; width: 46px; height: 28px; border-radius: 99px;
  background: var(--ak-switch-off); transition: background 0.2s var(--ak-ease);
}
.ak-switch .ak-thumb {
  position: absolute; top: 3px; left: 3px; width: 22px; height: 22px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  transition: transform 0.2s var(--ak-ease);
}
.ak-switch.is-on .ak-track { background: var(--ak-accent); }
.ak-switch.is-on .ak-thumb { transform: translateX(18px); }
.ak-switch:disabled { opacity: 0.45; cursor: default; }

/* optgroup (segmentado) */
.ak-optgroup { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
/* min-width: max-content: um rótulo longo ("Deuteranopia") leva o botão para a linha de baixo em vez de estourar */
.ak-opt {
  flex: 1 1 auto; min-width: max-content; min-height: 36px; padding: 6px 10px; font: inherit; font-size: 13px; font-weight: 600;
  border: 1px solid var(--ak-line-strong); border-radius: 99px; background: var(--ak-surface);
  color: var(--ak-text); cursor: pointer; transition: all 0.15s var(--ak-ease);
}
.ak-opt:hover { border-color: var(--ak-accent); background: var(--ak-accent-soft); }
.ak-opt.is-active { background: var(--ak-accent); border-color: var(--ak-accent); color: var(--ak-on-accent); }
.ak-opt:disabled { opacity: 0.5; cursor: default; }

/* slider */
.ak-slider { display: flex; align-items: center; gap: 10px; width: 100%; }
.ak-slider input[type="range"] { flex: 1; min-width: 0; accent-color: var(--ak-accent); cursor: pointer; }
.ak-slider-val { font-size: 12px; font-weight: 600; color: var(--ak-text-dim); min-width: 52px; text-align: right; font-variant-numeric: tabular-nums; }

/* stepper (A- / A+) */
.ak-stepper { display: flex; align-items: center; gap: 6px; padding: 3px; border: 1px solid var(--ak-line-strong); border-radius: 99px; }
.ak-step {
  width: 36px; height: 32px; border: 0; border-radius: 99px;
  background: var(--ak-accent-soft); color: var(--ak-accent-ink); font: inherit; font-weight: 700; cursor: pointer;
}
.ak-step:hover { background: var(--ak-accent); color: var(--ak-on-accent); }
.ak-step--lg { font-size: 17px; }
.ak-step-val { font-size: 13px; font-weight: 700; color: var(--ak-text); min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; }

/* select */
.ak-select {
  width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--ak-line-strong); border-radius: 10px;
  background: var(--ak-surface); color: var(--ak-text); font: inherit; font-size: 13.5px; cursor: pointer;
}

/* perfis (cartões com ícone) */
.ak-presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: 100%; }
.ak-preset {
  display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: left;
  padding: 12px 14px; font: inherit; border: 1px solid var(--ak-line); border-radius: var(--ak-radius);
  background: var(--ak-surface); color: var(--ak-text); cursor: pointer; transition: all 0.15s var(--ak-ease);
}
.ak-preset:hover { border-color: var(--ak-accent); background: var(--ak-accent-soft); }
.ak-preset.is-active { border-color: var(--ak-accent); background: var(--ak-accent-soft); box-shadow: inset 0 0 0 1px var(--ak-accent); }
.ak-preset-ico {
  width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%;
  background: var(--ak-accent-soft); color: var(--ak-accent-ink);
}
.ak-preset.is-active .ak-preset-ico { background: var(--ak-accent); color: var(--ak-on-accent); }
.ak-preset-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ak-preset-title { font-size: 14px; font-weight: 700; color: var(--ak-text); }
.ak-preset.is-active .ak-preset-title { color: var(--ak-accent-ink); }
.ak-preset-desc { font-size: 12.5px; line-height: 1.45; color: var(--ak-text-dim); }
.ak-preset-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.ak-preset-tag {
  font-size: 11px; font-weight: 600; letter-spacing: 0.02em; padding: 2px 8px;
  border-radius: 99px; background: var(--ak-surface-2); color: var(--ak-text-dim);
}
.ak-preset.is-active .ak-preset-tag { background: var(--ak-surface); color: var(--ak-accent-ink); }
/* 1.8 · perfil com tipos: a escolha ocupa a linha inteira, logo abaixo do cartão */
.ak-preset-tipos { grid-column: 1 / -1; padding: 12px 14px; border: 1px solid var(--ak-accent); border-radius: var(--ak-radius); background: var(--ak-surface-2); }
.ak-preset-tipos[hidden] { display: none; }
.ak-preset-tipos-tit { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--ak-text); }
.ak-preset-tipos-lista { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ak-tipo {
  display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 10px 12px; font: inherit;
  border: 1px solid var(--ak-line-strong); border-radius: 10px; background: var(--ak-surface); color: var(--ak-text); cursor: pointer;
}
.ak-tipo:hover { border-color: var(--ak-accent); background: var(--ak-accent-soft); }
.ak-tipo.is-active { border-color: var(--ak-accent); background: var(--ak-accent-soft); box-shadow: inset 0 0 0 1px var(--ak-accent); }
.ak-tipo-tit { font-size: 13.5px; font-weight: 700; }
.ak-tipo.is-active .ak-tipo-tit { color: var(--ak-accent-ink); }
.ak-tipo-desc { font-size: 12px; line-height: 1.4; color: var(--ak-text-dim); }
.ak-preset-tipos .ak-note { margin: 8px 0 0; }

/* barra do leitor de voz */
.ak-reader { display: flex; align-items: center; gap: 8px; }
.ak-reader button {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%;
  border: 0; background: var(--ak-accent-soft); color: var(--ak-accent-ink); cursor: pointer;
}
.ak-reader button:hover { background: var(--ak-accent); color: var(--ak-on-accent); }
.ak-reader svg { width: 18px; height: 18px; }
.ak-reader-speed { width: auto !important; min-height: 36px; padding: 0 14px; font: inherit; font-weight: 700; font-size: 13px; border-radius: 99px !important; border: 1px solid var(--ak-line-strong) !important; background: var(--ak-surface) !important; color: var(--ak-text) !important; cursor: pointer; }
.ak-reader-speed:hover { border-color: var(--ak-accent) !important; }

/* rodapé opcional (cfg.footer) */
.ak-foot {
  flex-shrink: 0; padding: 10px 20px; font-size: 12px; color: var(--ak-text-dim); text-align: center;
  background: var(--ak-surface); border-top: 1px solid var(--ak-line);
}

/* uma coluna quando o painel fica estreito (celular, zoom alto) */
@container akpanel (max-width: 600px) {
  .ak-pane.is-active { columns: 1; }
  .ak-presets { grid-template-columns: 1fr; }
  .ak-preset-tipos-lista { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .ak-pane.is-active { columns: 1; }
  .ak-presets { grid-template-columns: 1fr; }
  .ak-preset-tipos-lista { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ak-subtitle { display: none; }
  .ak-head { padding: 12px 12px 12px 16px; }
  .ak-panel .ak-tabs { margin: 12px 14px 2px; }
  .ak-body { padding: 12px 14px 20px; }
}
/* painel estreito (celular, ou fonte maior com zoom): Resetar vira só ícone; o texto fica para o leitor de tela */
@container akpanel (max-width: 440px) { .ak-reset span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } .ak-reset { padding: 0 10px; } .ak-title { font-size: 17px; } .ak-brand-ico { width: 38px; height: 38px; } }
@container akpanel (max-width: 320px) { .ak-brand-ico { display: none; } .ak-head { padding-left: 14px; gap: 6px; } .ak-title { font-size: 16px; overflow-wrap: anywhere; }
  .ak-panel .ak-tab { padding: 6px 8px; min-width: 0; } .ak-panel .ak-tab .ak-ico { display: none; } .ak-panel .ak-tabs { margin-left: 10px; margin-right: 10px; } .ak-body { padding-left: 10px; padding-right: 10px; } .ak-group { padding-left: 12px; padding-right: 12px; } }
@media (max-width: 380px) { .ak-reset span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } .ak-reset { padding: 0 10px; } }
/* link "pular para o conteúdo" */
.ak-skip {
  position: fixed; top: -200px; left: 16px; z-index: calc(var(--ak-z) + 5);
  background: var(--ak-accent); color: var(--ak-on-accent); padding: 10px 18px;
  border-radius: 0 0 var(--ak-radius) var(--ak-radius); font-weight: 600; text-decoration: none;
  transition: top 0.2s var(--ak-ease);
}

/* legenda de descrição de imagem */
.ak-img-desc { display: none; margin-top: 8px; padding: 12px 14px; border-radius: var(--ak-radius);
  background: var(--ak-surface-2); border-left: 3px solid var(--ak-accent); font-size: 15px; line-height: 1.55; color: var(--ak-text); }
.ak-img-desc-tag { display: inline-block; margin-right: 8px; font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em; color: var(--ak-accent); }

@media (max-width: 480px) {
  .ak-fab, .ak-fab--br, .ak-fab--bl { bottom: 16px; }
  .ak-fab--br { right: 16px; } .ak-fab--bl { left: 16px; }
}

/* ============================================================
   EFEITOS — aplicados a <html>; afetam o conteúdo do host.
   Escopo do conteúdo = a var `--ak-content` (default: body).
   ============================================================ */

/* foco reforçado (navegação por teclado) */
html.ak-keyboard :focus-visible {
  outline: 3px solid var(--ak-accent); outline-offset: 3px; border-radius: 3px;
}
html.ak-keyboard .ak-skip:focus { top: 0; }

/* cursor grande */
html.ak-large-cursor, html.ak-large-cursor * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 24 24'%3E%3Cpath d='M5 2l14 7-6 2-2 6z' fill='%23000' stroke='%23fff' stroke-width='1.2'/%3E%3C/svg%3E") 4 2, auto;
}

/* destacar links */
html.ak-highlight-links a:not(.ak-ui) { /* o link "Pular para o conteúdo" do kit tem cor própria */
  text-decoration: underline !important; text-underline-offset: 2px;
  /* background-color, não o atalho background: o atalho apagava ícones feitos com background-image
     (no site real, o ícone de "Entre ou cadastre-se" sumia) */
  background-color: var(--ak-accent-soft); outline: 1px solid var(--ak-line-strong);
}

/* espaçamento de texto */
html.ak-spacing :where(p, li, h1, h2, h3, h4, h5, h6, blockquote, a, span, td, th) {
  line-height: var(--ak-line-h) !important;
  letter-spacing: var(--ak-letter) !important;
  word-spacing: var(--ak-word) !important;
}

/* leitura biônica */
.ak-bionic-strong { font-weight: 700; }

/* fontes assistivas (alvo: elementos com [data-ak-content] ou body).
   Vale também para os descendentes: sites como o VTEX põem font-family nas próprias classes
   (t-body, productBrand...) e assim o nome dos produtos não herdava a fonte escolhida.
   Ficam de fora código (pre/code/kbd/samp), o interior de SVG e a interface do próprio painel. */
html.ak-font-lexend [data-ak-content], html.ak-font-lexend [data-ak-content] *:not(pre, code, kbd, samp, svg *, .ak-ui, .ak-ui *),
html.ak-font-lexend.ak-content-body body, html.ak-font-lexend.ak-content-body body *:not(pre, code, kbd, samp, svg *, .ak-ui, .ak-ui *) {
  font-family: "Lexend", system-ui, sans-serif !important;
}
html.ak-font-atkinson [data-ak-content], html.ak-font-atkinson [data-ak-content] *:not(pre, code, kbd, samp, svg *, .ak-ui, .ak-ui *),
html.ak-font-atkinson.ak-content-body body, html.ak-font-atkinson.ak-content-body body *:not(pre, code, kbd, samp, svg *, .ak-ui, .ak-ui *) {
  font-family: "Atkinson Hyperlegible", system-ui, sans-serif !important;
}
html.ak-font-dyslexic [data-ak-content], html.ak-font-dyslexic [data-ak-content] *:not(pre, code, kbd, samp, svg *, .ak-ui, .ak-ui *),
html.ak-font-dyslexic.ak-content-body body, html.ak-font-dyslexic.ak-content-body body *:not(pre, code, kbd, samp, svg *, .ak-ui, .ak-ui *) {
  font-family: "OpenDyslexic", system-ui, sans-serif !important;
}

/* leitor: destaque do trecho lido */
.ak-reading { background-color: var(--ak-accent-soft); box-shadow: 0 0 0 4px var(--ak-accent-soft); border-radius: 3px; }
/* 1.7 · palavra que a voz está lendo (CSS Custom Highlight API: não mexe no DOM) */
::highlight(ak-word) { background-color: #ffe14d; color: #000; text-decoration: underline 2px; }
@media (forced-colors: active) { ::highlight(ak-word) { background-color: Highlight; color: HighlightText; } }

/* 1.6 · clique para ouvir: contorno no trecho sob o ponteiro, cursor de alto-falante e aviso flutuante */
html.ak-click-read .ak-click-hover, html.ak-hover-read .ak-click-hover { outline: 2px dashed var(--ak-accent) !important; outline-offset: 2px; }
html.ak-click-read:not(.ak-large-cursor) .ak-click-hover, html.ak-click-read:not(.ak-large-cursor) .ak-click-hover * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='15' fill='%23fff' stroke='%23000' stroke-width='1.5'/%3E%3Cpath d='M15 9.5 10.5 13H8v6h2.5l4.5 3.5z' fill='%23000'/%3E%3Cpath d='M19 13a4 4 0 0 1 0 6M21.5 10.5a7.5 7.5 0 0 1 0 11' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") 16 16, pointer;
}
.ak-clickread {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: var(--ak-z);
  display: flex; align-items: center; gap: 8px; max-width: calc(100vw - 32px); box-sizing: border-box;
  padding: 6px 6px 6px 14px; border: 2px solid var(--ak-accent); border-radius: 999px;
  background: var(--ak-surface, #fff); color: var(--ak-text, #1c1714); font: 600 15px/1.3 var(--ak-font, system-ui, sans-serif);
  box-shadow: 0 4px 16px rgba(0,0,0,.18);
}
.ak-clickread-ico { display: inline-flex; color: var(--ak-accent-ink, var(--ak-accent)); }
.ak-clickread-ico svg { width: 20px; height: 20px; }
.ak-clickread-txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ak-clickread-btn {
  min-width: 44px; min-height: 44px; padding: 0 14px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--ak-accent); color: #fff; font: inherit; display: inline-flex; align-items: center; justify-content: center;
}
.ak-clickread-btn[hidden] { display: none; }
.ak-clickread-x { padding: 0; width: 44px; background: transparent; color: var(--ak-text, #1c1714); border: 2px solid var(--ak-line-strong, #6b5d50); }
.ak-clickread-x svg { width: 18px; height: 18px; }
.ak-clickread-btn:focus-visible { outline: 3px solid var(--ak-text, #000); outline-offset: 2px; }
/* celular: encosta à esquerda para não cobrir o botão do kit */
@media (max-width: 640px) { .ak-clickread { left: 12px; transform: none; max-width: calc(100vw - 100px); } .ak-clickread-txt { font-size: 13px; white-space: normal; } .ak-fab--bl ~ .ak-clickread { left: auto; right: 12px; } }

/* 1.9 · preencher campos falando: microfone flutuante junto do campo focado */
.ak-voz {
  position: fixed; z-index: var(--ak-z); display: flex; align-items: center; gap: 8px; box-sizing: border-box;
  max-width: min(360px, calc(100vw - 16px)); padding: 4px 12px 4px 4px; border: 2px solid var(--ak-accent); border-radius: 999px;
  background: var(--ak-surface, #fff); color: var(--ak-text, #1c1714); font: 600 14px/1.3 var(--ak-font, system-ui, sans-serif);
  box-shadow: 0 4px 16px rgba(0,0,0,.18);
}
.ak-voz[hidden] { display: none; }
.ak-voz-btn {
  flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; cursor: pointer; padding: 0;
  display: inline-flex; align-items: center; justify-content: center; background: var(--ak-accent); color: #fff;
}
.ak-voz-btn svg { width: 22px; height: 22px; }
.ak-voz-btn:focus-visible { outline: 3px solid var(--ak-text, #000); outline-offset: 2px; }
.ak-voz.is-ouvindo { border-color: #b3261e; }
.ak-voz.is-ouvindo .ak-voz-btn { background: #b3261e; animation: ak-voz-pulso 1.4s ease-out infinite; }
.ak-voz-txt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes ak-voz-pulso { 0% { box-shadow: 0 0 0 0 rgba(179,38,30,.45); } 100% { box-shadow: 0 0 0 12px rgba(179,38,30,0); } }
html.ak-no-motion .ak-voz.is-ouvindo .ak-voz-btn { animation: none; }
@media (prefers-reduced-motion: reduce) { .ak-voz.is-ouvindo .ak-voz-btn { animation: none; } }
@media (forced-colors: active) { .ak-voz, .ak-voz-btn { border: 2px solid CanvasText; } }

/* modo escuro (inverte tokens — escopo no host via filtro de inversão opcional OU classe) */
html.ak-dark { background-color: #16131f; }
html.ak-dark body { background-color: #16131f; color: #e8e2da; }
html.ak-dark .ak-panel { --ak-surface: #211c2b; --ak-surface-2: #2c2638; --ak-canvas: #18141f; --ak-text: #e8e2da; --ak-text-dim: #b8b0a6; --ak-text-faint: #a99fb4; --ak-line: #3a3346; --ak-line-strong: #6a6178; --ak-line-soft: rgba(255,255,255,0.08); --ak-switch-off: #6a6178; --ak-accent-soft: rgba(255,255,255,0.08); --ak-accent-ink: #e8e2da; }

@media (prefers-reduced-motion: reduce) {
  .ak-panel, .ak-backdrop, .ak-fab, .ak-dropzones, .ak-dropzone, .ak-skip, .ak-tab, .ak-chev, .ak-switch .ak-thumb, .ak-switch .ak-track { transition: none !important; }
}

/* "aumentar contraste" do sistema */
@media (prefers-contrast: more) {
  .ak-panel, .ak-fab { --ak-text-dim: #1c1714; --ak-text-faint: #4a4035; --ak-line: #6b5d50; --ak-line-strong: #4a4035; --ak-line-soft: #6b5d50; --ak-accent: var(--ak-accent-dark); --ak-accent-ink: var(--ak-accent-dark); --ak-head-bg: var(--ak-accent-dark); --ak-switch-off: #4a4035; }
  html.ak-dark .ak-panel { --ak-text-dim: #e8e2da; --ak-text-faint: #d2cabf; --ak-line: #a79db3; }
  .ak-panel :focus-visible, .ak-fab:focus-visible { outline: 3px solid currentColor; outline-offset: 2px; }
}

/* Alto Contraste do Windows: fundo e sombra somem, então estado e limite viram cor do sistema */
@media (forced-colors: active) {
  .ak-fab, .ak-panel, .ak-opt, .ak-step, .ak-preset, .ak-select { border: 1px solid ButtonText; }
  .ak-panel :focus-visible, .ak-fab:focus-visible { outline: 3px solid Highlight; outline-offset: 2px; }
  .ak-group, .ak-tabs, .ak-reset, .ak-stepper, .ak-action { border: 1px solid ButtonText; }
  .ak-head { border-bottom: 1px solid CanvasText; }
  .ak-panel .ak-tab.is-active { forced-color-adjust: none; background: Highlight; color: HighlightText; }
  .ak-preset.is-active .ak-preset-ico { forced-color-adjust: none; background: HighlightText; color: Highlight; }
  .ak-tipo { border: 1px solid ButtonText; }
  .ak-tipo.is-active { forced-color-adjust: none; background: Highlight; border-color: Highlight; color: HighlightText; box-shadow: none; }
  .ak-tipo.is-active .ak-tipo-tit, .ak-tipo.is-active .ak-tipo-desc { color: HighlightText; }
  .ak-opt.is-active, .ak-preset.is-active { forced-color-adjust: none; background: Highlight; border-color: Highlight; color: HighlightText; box-shadow: none; }
  .ak-preset.is-active .ak-preset-title, .ak-preset.is-active .ak-preset-desc { color: HighlightText; }
  .ak-preset.is-active .ak-preset-tag { background: HighlightText; color: Highlight; }
  .ak-switch .ak-track { forced-color-adjust: none; box-sizing: border-box; background: Canvas; border: 1px solid ButtonText; }
  .ak-switch .ak-thumb { forced-color-adjust: none; background: ButtonText; box-shadow: none; }
  .ak-switch.is-on .ak-track { background: Highlight; border-color: Highlight; }
  .ak-switch.is-on .ak-thumb { background: HighlightText; }
}

/* ============================================================
   1.2 · controles novos do painel
   ============================================================ */
.ak-action {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; margin: 4px 0; padding: 10px 14px; text-align: left;
  font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ak-text);
  background: var(--ak-surface); border: 1px solid var(--ak-line-strong); border-radius: 10px; cursor: pointer;
}
.ak-action .ak-ico { width: 18px; height: 18px; color: var(--ak-accent-ink); }
.ak-action .ak-chev { margin-left: auto; transition: transform 0.2s var(--ak-ease); }
.ak-action[aria-expanded="true"] .ak-chev { transform: rotate(180deg); }
.ak-action:hover { border-color: var(--ak-accent); background: var(--ak-accent-soft); }
.ak-action[aria-expanded="true"] { border-color: var(--ak-accent); color: var(--ak-accent-ink); }
.ak-action--primary { justify-content: center; text-align: center; background: var(--ak-accent); border-color: var(--ak-accent); color: var(--ak-on-accent); }
.ak-action--primary:hover { background: var(--ak-accent-dark); color: var(--ak-on-accent); }
.ak-action:disabled { opacity: 0.6; cursor: default; }
.ak-sub { display: block; font-size: 12.5px; font-weight: 700; color: var(--ak-text); margin: 12px 0 6px; padding: 0; }
.ak-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ak-panel kbd { font: inherit; font-weight: 700; padding: 1px 5px; border: 1px solid var(--ak-line); border-radius: 4px; background: var(--ak-surface-2); }

/* estrutura da página */
.ak-structure { margin-top: 4px; }
.ak-structure-list { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow-y: auto; border: 1px solid var(--ak-line); border-radius: 8px; }
.ak-structure-list li + li { border-top: 1px solid var(--ak-line); }
.ak-structure-item {
  display: flex; align-items: baseline; gap: 8px; width: 100%; padding: 8px 6px; text-align: left;
  font: inherit; font-size: 13px; color: var(--ak-text); background: none; border: 0; cursor: pointer;
}
.ak-structure-item:hover { background: var(--ak-accent-soft); }
.ak-structure-tag { flex-shrink: 0; font-size: 10.5px; font-weight: 700; color: var(--ak-accent); min-width: 22px; }

/* relatar barreira */
.ak-report { margin-top: 4px; }
.ak-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.ak-radio { display: flex; align-items: center; gap: 8px; font-size: 13.5px; padding: 4px 0; cursor: pointer; }
.ak-radio input { accent-color: var(--ak-accent); width: 18px; height: 18px; margin: 0; }
.ak-input {
  box-sizing: border-box; width: 100%; padding: 8px 10px; font: inherit; font-size: 13.5px;
  color: var(--ak-text); background: var(--ak-surface); border: 1px solid var(--ak-text-faint); border-radius: 8px;
}
.ak-input[aria-invalid="true"] { border: 2px solid #b3261e; }
textarea.ak-input { resize: vertical; min-height: 84px; }
.ak-error { margin: 4px 0 0; font-size: 12.5px; font-weight: 600; color: #b3261e; }
.ak-error:empty { display: none; }
.ak-status { margin: 8px 0 0; font-size: 13px; font-weight: 600; color: var(--ak-text); }
.ak-status:empty { display: none; }
.ak-status a { color: var(--ak-accent); }

/* ============================================================
   1.2 · EFEITOS NOVOS (no <html>; .ak-ui = interface do próprio kit, sempre fora)
   ============================================================ */

/* cursor grande branco */
html.ak-large-cursor.ak-cursor-white, html.ak-large-cursor.ak-cursor-white * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 24 24'%3E%3Cpath d='M5 2l14 7-6 2-2 6z' fill='%23fff' stroke='%23000' stroke-width='1.2'/%3E%3C/svg%3E") 4 2, auto;
}

/* alto contraste (1.2.1). O kit só pinta o FUNDO de quem já tinha fundo próprio: marca os
   elementos com data-ak-bg / data-ak-em depois de ler as cores originais (marcarFundos no JS).
   Camadas transparentes do site continuam transparentes (pintá-las escondia a página).
   Imagens e vídeos ficam como estão (no supermercado a foto identifica o produto). */
html.ak-ct-medindo, html.ak-ct-medindo * { transition: none !important; }

/* escuro: texto branco sobre preto, links amarelos, bordas visíveis */
html.ak-contrast-dark, html.ak-contrast-dark body { background: #000 !important; }
html.ak-contrast-dark body :where(*):not(.ak-ui, .ak-ui *, [data-ak-ilha], [data-ak-ilha] *, [vw], [vw] *, img, video, picture, canvas, iframe, svg *) {
  color: #fff !important; border-color: #fff !important; text-shadow: none !important; box-shadow: none !important;
}
html.ak-contrast-dark body :where([data-ak-bg=claro], [data-ak-bg=escuro]):not(.ak-ui, .ak-ui *, [data-ak-ilha] *) { background-color: #000 !important; }
html.ak-contrast-dark body :is(a, a *):not(.ak-ui, .ak-ui *, [data-ak-ilha], [data-ak-ilha] *) { color: #ffe14d !important; }
html.ak-contrast-dark body a:not(.ak-ui, .ak-ui *, [data-ak-ilha], [data-ak-ilha] *) { text-decoration: underline !important; }
html.ak-contrast-dark body :is(button, input, select, textarea, [role=button]):not(.ak-ui, .ak-ui *, [data-ak-ilha], [data-ak-ilha] *) { border: 2px solid #fff !important; }
html.ak-contrast-dark body ::placeholder { color: #d0d0d0 !important; opacity: 1; }
html.ak-contrast-dark body :focus-visible:not(.ak-ui *) { outline: 3px solid #ffe14d !important; outline-offset: 2px; }
/* teste 20-11: lojas VTEX costumam misturar a foto do produto com o fundo do cartão
   (mix-blend-mode: multiply, para sumir com o branco da foto). Sobre o fundo preto a mistura
   deixava a foto toda preta. No contraste escuro e em "Minhas cores" a foto é desenhada normal. */
html:is(.ak-contrast-dark, .ak-contrast-custom) body :is(img, picture, video, canvas):not(.ak-ui, .ak-ui *) { mix-blend-mode: normal !important; }

/* claro: texto preto sobre branco, links azul-escuro. Faixas que eram escuras (cabeçalho,
   rodapé) ficam pretas com texto branco e links amarelos, para logo e ícones brancos não sumirem. */
html.ak-contrast-light, html.ak-contrast-light body { background: #fff !important; }
html.ak-contrast-light body :where(*):not(.ak-ui, .ak-ui *, [data-ak-ilha], [data-ak-ilha] *, [vw], [vw] *, img, video, picture, canvas, iframe, svg *) {
  color: #000 !important; border-color: #000 !important; text-shadow: none !important; box-shadow: none !important;
}
html.ak-contrast-light body [data-ak-bg=claro]:not(.ak-ui, .ak-ui *, [data-ak-ilha] *) { background-color: #fff !important; }
html.ak-contrast-light body :is([data-ak-bg=escuro], [data-ak-em=escuro]):not(.ak-ui, .ak-ui *, [data-ak-ilha], [data-ak-ilha] *, img, video, picture, canvas, iframe, svg *) { color: #fff !important; border-color: #fff !important; }
html.ak-contrast-light body [data-ak-bg=escuro]:not(.ak-ui, .ak-ui *, [data-ak-ilha] *) { background-color: #000 !important; }
html.ak-contrast-light body :is(a, a *):not(.ak-ui, .ak-ui *, [data-ak-ilha], [data-ak-ilha] *) { color: #0000b3 !important; }
html.ak-contrast-light body :is(a, a *):is([data-ak-bg=escuro], [data-ak-em=escuro]):not(.ak-ui, .ak-ui *, [data-ak-ilha], [data-ak-ilha] *) { color: #ffe14d !important; }
html.ak-contrast-light body a:not(.ak-ui, .ak-ui *, [data-ak-ilha], [data-ak-ilha] *) { text-decoration: underline !important; }
html.ak-contrast-light body :is(button, input, select, textarea, [role=button]):not(.ak-ui, .ak-ui *, [data-ak-ilha], [data-ak-ilha] *) { border: 2px solid #000 !important; }
html.ak-contrast-light body :is(button, input, select, textarea, [role=button]):is([data-ak-bg=escuro], [data-ak-em=escuro]):not(.ak-ui, .ak-ui *, [data-ak-ilha], [data-ak-ilha] *) { border-color: #fff !important; }
html.ak-contrast-light body ::placeholder { color: #444 !important; opacity: 1; }
html.ak-contrast-light body :focus-visible:not(.ak-ui *) { outline: 3px solid #0000b3 !important; outline-offset: 2px; }
html.ak-contrast-light body :is([data-ak-bg=escuro], [data-ak-em=escuro]):focus-visible:not(.ak-ui *) { outline-color: #ffe14d !important; }

/* ícones SVG (1.3): seguem a cor do texto em volta (currentColor), em vez de ganhar a cor
   genérica do modo. Sem isso, ícone de link ficava azul-escuro sobre faixa preta e ícone de botão
   ficava preto sobre preto. :not(#ak-x) só sobe a especificidade para vencer as regras acima. */
html:is(.ak-contrast-light, .ak-contrast-dark) body :is(svg, svg *):not(.ak-ui, .ak-ui *, [data-ak-ilha], [data-ak-ilha] *):not(#ak-x) { color: inherit !important; }

/* 1.7 · "Minhas cores": a pessoa escolhe fundo, texto e links (variáveis no <html>). Mesma lógica
   do contraste escuro: só pinta o fundo de quem já tinha fundo, e faixas claras ou escuras ficam
   todas com o fundo escolhido. */
html.ak-contrast-custom, html.ak-contrast-custom body { background: var(--ak-cc-bg, #fff8e1) !important; }
html.ak-contrast-custom body :where(*):not(.ak-ui, .ak-ui *, [data-ak-ilha], [data-ak-ilha] *, [vw], [vw] *, img, video, picture, canvas, iframe, svg *) {
  color: var(--ak-cc-fg, #1a1a1a) !important; border-color: var(--ak-cc-fg, #1a1a1a) !important; text-shadow: none !important; box-shadow: none !important;
}
html.ak-contrast-custom body :where([data-ak-bg=claro], [data-ak-bg=escuro]):not(.ak-ui, .ak-ui *, [data-ak-ilha] *) { background-color: var(--ak-cc-bg, #fff8e1) !important; }
html.ak-contrast-custom body :is(a, a *):not(.ak-ui, .ak-ui *, [data-ak-ilha], [data-ak-ilha] *) { color: var(--ak-cc-link, #0b3d91) !important; }
html.ak-contrast-custom body a:not(.ak-ui, .ak-ui *, [data-ak-ilha], [data-ak-ilha] *) { text-decoration: underline !important; }
html.ak-contrast-custom body :is(button, input, select, textarea, [role=button]):not(.ak-ui, .ak-ui *, [data-ak-ilha], [data-ak-ilha] *) { border: 2px solid var(--ak-cc-fg, #1a1a1a) !important; }
html.ak-contrast-custom body ::placeholder { color: var(--ak-cc-fg, #1a1a1a) !important; opacity: 0.75; }
html.ak-contrast-custom body :focus-visible:not(.ak-ui *) { outline: 3px solid var(--ak-cc-link, #0b3d91) !important; outline-offset: 2px; }
html.ak-contrast-custom body :is(svg, svg *):not(.ak-ui, .ak-ui *, [data-ak-ilha], [data-ak-ilha] *):not(#ak-x) { color: inherit !important; }
html.ak-contrast-custom body [data-ak-bg=veu]:not(.ak-ui, .ak-ui *) { background-color: rgba(0, 0, 0, 0.7) !important; }

/* teste 20-11: "ilhas". Onde o site trava o fundo de um bloco com !important (aviso de cookies de
   terceiros, por exemplo), o kit não consegue pintar esse fundo. Trocar só a cor do texto deixava
   texto claro sobre fundo claro. O JS marca o bloco com data-ak-ilha e guarda a cor original do
   texto em --ak-cor; o bloco e o que está dentro dele ficam com as cores do site. */
html:is(.ak-contrast-light, .ak-contrast-dark, .ak-contrast-custom) body [data-ak-ilha]:not(.ak-ui, .ak-ui *) { color: var(--ak-cor) !important; }

/* teste 20-11 (ak-icone-sobre-foto): com a foto desenhada normal, ícones de botões que o site põe
   por cima dela (favorito, lista) ficavam amarelos ou brancos sobre o branco da foto. Um contorno
   na cor do fundo do modo mantém o ícone visível; sobre o fundo do próprio modo o contorno some. */
html.ak-contrast-dark body :is(button, [role=button]) svg:not(.ak-ui, .ak-ui *, [data-ak-ilha] *) { filter: drop-shadow(0 0 1px #000) drop-shadow(0 0 1px #000) drop-shadow(0 0 2px #000) !important; }
html.ak-contrast-custom body :is(button, [role=button]) svg:not(.ak-ui, .ak-ui *, [data-ak-ilha] *) { filter: drop-shadow(0 0 1px var(--ak-cc-bg, #fff8e1)) drop-shadow(0 0 1px var(--ak-cc-bg, #fff8e1)) drop-shadow(0 0 2px var(--ak-cc-bg, #fff8e1)) !important; }

/* fundo de modal: véu escuro translúcido, nos dois contrastes */
html:is(.ak-contrast-light, .ak-contrast-dark) body [data-ak-bg=veu]:not(.ak-ui, .ak-ui *) { background-color: rgba(0, 0, 0, 0.7) !important; }

/* bloquear animações (o mesmo efeito do "reduzir movimento" do sistema) */
html.ak-no-motion *, html.ak-no-motion *::before, html.ak-no-motion *::after {
  animation-duration: 0.001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important;
}

/* espaço depois do parágrafo: 2× o tamanho da fonte (WCAG 1.4.12) */
html.ak-para-spacing :where(p, blockquote, dd):not(.ak-ui *) { margin-bottom: 2em !important; }

/* linhas mais curtas (~70 caracteres) e alinhamento à esquerda */
html.ak-text-width :where(p, li, dd, blockquote, h1, h2, h3, h4, h5, h6):not(.ak-ui *) { max-width: 70ch !important; }
html.ak-text-left :where(p, li, dd, blockquote, td, th, h1, h2, h3, h4, h5, h6):not(.ak-ui *) { text-align: left !important; }

/* sublinhar títulos */
html.ak-underline-headings :where(h1, h2, h3, h4, h5, h6, [role=heading]):not(.ak-ui *) {
  text-decoration: underline !important; text-underline-offset: 0.18em; text-decoration-thickness: 0.08em;
}

/* destacar o bloco sob o mouse e o que tem o foco */
html.ak-highlight-content :where(p, li, h1, h2, h3, h4, h5, h6, blockquote, td, th, dd, figure, article, label):not(.ak-ui, .ak-ui *):hover,
html.ak-highlight-content :where(li, article, figure, label):not(.ak-ui, .ak-ui *):focus-within {
  outline: 3px solid var(--ak-accent) !important; outline-offset: 2px; border-radius: 4px;
}

/* máscara e guia de leitura (sobreposição; não captura cliques) */
.ak-rt { display: none; position: fixed; inset: 0; pointer-events: none; z-index: calc(var(--ak-z) - 2); --ak-rt-y: 33vh; --ak-rt-h: 7.5em; }
.ak-rt--mask, .ak-rt--guide, .ak-rt--underline { display: block; }
.ak-rt-top, .ak-rt-bot, .ak-rt-line { position: absolute; left: 0; right: 0; display: none; }
.ak-rt--mask .ak-rt-top, .ak-rt--mask .ak-rt-bot { display: block; background: rgba(0, 0, 0, 0.6); }
.ak-rt--mask .ak-rt-top { top: 0; height: max(0px, calc(var(--ak-rt-y) - var(--ak-rt-h) / 2)); }
.ak-rt--mask .ak-rt-bot { top: calc(var(--ak-rt-y) + var(--ak-rt-h) / 2); bottom: 0; }
.ak-rt--guide .ak-rt-line {
  display: block; top: calc(var(--ak-rt-y) + 0.9em); height: 6px;
  background: var(--ak-accent); border-top: 2px solid #fff; border-bottom: 2px solid #fff; box-shadow: 0 0 0 1px #000;
}
/* 1.7 · régua "Sublinhado": linha fina logo abaixo da linha que se lê, como no estudo de réguas
   digitais (Niklaus et al., CHI 2023; github.com/adobe/digital-reading-rulers, Apache-2.0).
   O ponteiro fica embaixo da linha de texto; a borda clara mantém a linha visível em fundo escuro. */
.ak-rt--underline .ak-rt-line {
  display: block; top: calc(var(--ak-rt-y) + 4px); height: 2px;
  background: #000; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.85);
}
html.ak-contrast-dark .ak-rt--underline .ak-rt-line { background: #ffe14d; box-shadow: 0 0 0 1px #000; }
@media (forced-colors: active) { .ak-rt--underline .ak-rt-line { background: CanvasText; } }
@media (forced-colors: active) { .ak-rt--guide .ak-rt-line { background: Highlight; } .ak-rt--mask .ak-rt-top, .ak-rt--mask .ak-rt-bot { background: Canvas; opacity: 0.7; } }
@media print { .ak-rt { display: none !important; } }

/* 1.4 · daltonismo: correção opcional e teste rápido */
.ak-cb-mais[hidden], .ak-cbt-box[hidden] { display: none; }
.ak-cb-mais { margin-top: 4px; }
.ak-cbt { margin: 6px 0 2px; }
.ak-cbt-abrir { background: none; border: 0; padding: 8px 0; min-height: 44px; color: var(--ak-accent-ink); font: inherit; font-size: 14px; font-weight: 600; text-decoration: underline; cursor: pointer; text-align: left; }
.ak-cbt-box { border: 1px solid var(--ak-line); border-radius: 10px; padding: 10px 12px; background: var(--ak-surface); }
.ak-cbt-tit { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--ak-text); }
.ak-cbt-par { display: flex; align-items: center; gap: 12px; margin: 8px 0; }
.ak-cbt-par .ak-optgroup { width: auto; flex: 1; }
.ak-cbt-amostra { display: inline-flex; flex: none; }
.ak-cbt-amostra i { display: block; width: 32px; height: 32px; }
.ak-cbt-amostra i:first-child { border-radius: 6px 0 0 6px; }
.ak-cbt-amostra i:last-child { border-radius: 0 6px 6px 0; }
.ak-cbt-res { margin: 8px 0 0; font-size: 14px; color: var(--ak-text); }
.ak-cbt-res:empty { display: none; }
/* 1.5 · controle pela cabeça: aviso de carga/erro no painel */
.ak-head-status:empty { display: none; }
.ak-note--erro { color: #a4262c; font-weight: 700; }

/* 1.7 · "Minhas cores" no painel */
.ak-cc { margin-top: 6px; padding: 10px 12px; border: 1px solid var(--ak-line); border-radius: 10px; background: var(--ak-surface); }
.ak-cc[hidden] { display: none; }
.ak-cc .ak-note { margin-top: 0; }
.ak-cc-prontas { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.ak-cc-pronta { width: 44px; height: 44px; border-radius: 10px; border: 2px solid var(--ak-line-strong); font: 700 16px/1 var(--ak-font); cursor: pointer; }
.ak-cc-pronta:hover { outline: 2px solid var(--ak-accent); outline-offset: 2px; }
.ak-cc-campos { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.ak-cc-campo { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--ak-text); cursor: pointer; }
.ak-cc-campo input[type=color] { width: 44px; height: 36px; padding: 2px; border: 1px solid var(--ak-line-strong); border-radius: 8px; background: var(--ak-surface); cursor: pointer; }
.ak-cc-info { margin: 10px 0 6px; font-size: 13px; line-height: 1.45; color: var(--ak-text); }
.ak-cc-info--baixo { color: #a4262c; font-weight: 700; }
.ak-cc-fix { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 2px solid var(--ak-accent); background: var(--ak-surface); color: var(--ak-accent-ink); font: 700 14px/1 var(--ak-font); cursor: pointer; }
.ak-cc-fix:hover { background: var(--ak-accent-soft); }
.ak-cc-fix[hidden] { display: none; }

/* teste 19/11 · comandos de voz: barra de estado, números e ajuda */
.ak-cmd {
  position: fixed; left: 16px; bottom: 16px; z-index: var(--ak-z); display: flex; align-items: center; gap: 8px;
  max-width: min(520px, calc(100vw - 110px)); box-sizing: border-box; padding: 6px 6px 6px 6px;
  border: 2px solid var(--ak-line-strong, #6b5d50); border-radius: 999px; background: var(--ak-surface, #fff); color: var(--ak-text, #1c1714);
  font: 600 15px/1.3 var(--ak-font, system-ui, sans-serif); box-shadow: 0 4px 16px rgba(0,0,0,.18);
}
.ak-cmd.is-ouvindo { border-color: #b3261e; }
.ak-cmd-mic, .ak-cmd-btn {
  flex: none; width: 44px; height: 44px; padding: 0; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font: 700 18px/1 var(--ak-font, system-ui, sans-serif);
}
.ak-cmd-mic { border: 0; background: #5c5248; color: #fff; }
.ak-cmd-mic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ak-cmd.is-ouvindo .ak-cmd-mic { background: #b3261e; animation: ak-voz-pulso 1.4s ease-out infinite; }
.ak-cmd-btn { background: transparent; color: var(--ak-text, #1c1714); border: 2px solid var(--ak-line-strong, #6b5d50); }
.ak-cmd-btn svg { width: 18px; height: 18px; }
.ak-cmd-mic:focus-visible, .ak-cmd-btn:focus-visible { outline: 3px solid var(--ak-text, #000); outline-offset: 2px; }
.ak-cmd-txt { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ak-cmd-num {
  position: fixed; z-index: var(--ak-z); pointer-events: none; min-width: 20px; box-sizing: border-box; padding: 1px 5px; text-align: center;
  background: #1c1714; color: #fff; border: 2px solid #fff; border-radius: 7px; font: 700 13px/1.3 var(--ak-font, system-ui, sans-serif); box-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.ak-cmd-alvo { outline: 4px solid #b3261e !important; outline-offset: 2px !important; }
.ak-cmd-ajuda {
  position: fixed; left: 16px; bottom: 82px; z-index: var(--ak-z); width: min(380px, calc(100vw - 32px)); max-height: calc(100vh - 110px); overflow: auto; box-sizing: border-box;
  padding: 12px 16px; border: 2px solid var(--ak-line-strong, #6b5d50); border-radius: 14px; background: var(--ak-surface, #fff); color: var(--ak-text, #1c1714);
  font: 400 14px/1.45 var(--ak-font, system-ui, sans-serif); box-shadow: 0 6px 24px rgba(0,0,0,.25);
}
.ak-cmd-ajuda[hidden] { display: none; }
.ak-cmd-ajuda-t { margin: 0 0 6px; font-weight: 700; font-size: 15px; }
.ak-cmd-ajuda ul { margin: 0; padding: 0; list-style: none; }
.ak-cmd-ajuda li { margin: 0 0 4px; }
html.ak-no-motion .ak-cmd.is-ouvindo .ak-cmd-mic { animation: none; }
@media (prefers-reduced-motion: reduce) { .ak-cmd.is-ouvindo .ak-cmd-mic { animation: none; } }
@media (forced-colors: active) { .ak-cmd, .ak-cmd-mic, .ak-cmd-btn, .ak-cmd-num, .ak-cmd-ajuda { border: 2px solid CanvasText; } }

/* 21/11 · por cima do site real */
::highlight(ak-bionic) { text-shadow: 0.022em 0 0 currentColor, -0.022em 0 0 currentColor; }
html.ak-dark-inv, html.ak-dark-inv body { background-color: #fff !important; color: #111 !important; }
html.ak-dark-inv img, html.ak-dark-inv video, html.ak-dark-inv picture img, html.ak-dark-inv iframe,
html.ak-dark-inv .ak-ui, html.ak-dark-inv #assistente-compras-teste, html.ak-dark-inv #agente-visivel, html.ak-dark-inv [style*="background-image"] { filter: invert(1) hue-rotate(180deg); }
html.ak-dark-inv picture img, html.ak-dark-inv .ak-ui img, html.ak-dark-inv [style*="background-image"] img { filter: none; }

/* 24/11 (felipe): o que abre dentro do painel (tipos de daltonismo, Minhas cores, relatar barreira, linhas que surgem)
   cresce e some com movimento suave, em vez de aparecer de repente e empurrar o resto. Sem movimento no perfil
   Epilepsia / "Bloquear animações" (html.ak-no-motion) e para quem pede menos movimento no sistema. */
.ak-panel { interpolate-size: allow-keywords; }
.ak-preset-tipos, .ak-cbt-box, .ak-cb-mais, .ak-cc, .ak-cc-fix, .ak-report, .ak-panel .ak-row {
  overflow: clip; overflow-clip-margin: 8px;
  transition: height 0.26s var(--ak-ease, ease), opacity 0.22s var(--ak-ease, ease), display 0.26s allow-discrete, content-visibility 0.26s allow-discrete;
}
.ak-preset-tipos[hidden], .ak-cbt-box[hidden], .ak-cb-mais[hidden], .ak-cc[hidden], .ak-cc-fix[hidden], .ak-report[hidden], .ak-panel .ak-row[hidden] {
  display: none; height: 0; opacity: 0;
}
@starting-style {
  .ak-preset-tipos:not([hidden]), .ak-cbt-box:not([hidden]), .ak-cb-mais:not([hidden]), .ak-cc:not([hidden]), .ak-cc-fix:not([hidden]), .ak-report:not([hidden]), .ak-panel .ak-row:not([hidden]) { height: 0; opacity: 0; }
}
.ak-voz:not([hidden]), .ak-cmd-ajuda:not([hidden]) { animation: ak-surge 0.2s var(--ak-ease, ease); }
@keyframes ak-surge { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) {
  .ak-preset-tipos, .ak-cbt-box, .ak-cb-mais, .ak-cc, .ak-cc-fix, .ak-report, .ak-panel .ak-row, .ak-voz, .ak-cmd-ajuda { transition: none !important; animation: none !important; }
}

/* 24/11 (revisão no celular): em tela de toque, área de toque de pelo menos 44 px nos controles pequenos,
   sem mudar o desenho (a área extra é invisível, por ::after). */
@media (pointer: coarse) {
  .ak-switch, .ak-step, .ak-reset, .ak-close { position: relative; }
  .ak-switch::after { content: ''; position: absolute; inset: -8px -4px; }
  .ak-step::after { content: ''; position: absolute; inset: -7px -4px; }
  .ak-reset::after, .ak-close::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; }
  .ak-opt { min-height: 44px; }
}

/* 24/11 (felipe): com o assistente de compras ligado, os comandos de voz não mostram a barra de baixo;
   o microfone fica embutido no chat do assistente (que mostra se está ouvindo e liga/pausa a escuta). */
html.ak-asst-on .ak-cmd { display: none !important; }
html.ak-asst-on.ak-cmd-on #assistente-compras-teste { --asst-baixo: 16px !important; }
