/* ROX ID — design system "Luz do Dia" (df.css)
   Manual: docs/DESIGN.md · Vitrine: /dev/design-system.html
   Sem estilo inline, sem recurso externo. Ordem das camadas (a folha da página escreve em @layer pages,
   que vence os componentes e perde para os utilitários): */
@layer reset, tokens, base, layout, components, pages, utilities;

/* Fontes locais (woff2 variáveis, subconjunto latino) + reservas com métrica ajustada (o texto não pula ao carregar) */
@font-face { font-family: "Lexend"; src: url(/assets/fonts/lexend.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Figtree"; src: url(/assets/fonts/figtree.woff2) format("woff2"); font-weight: 300 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(/assets/fonts/jetbrains-mono.woff2) format("woff2"); font-weight: 100 800; font-display: swap; }
@font-face { font-family: "Lexend Reserva"; src: local("Arial"), local("Helvetica Neue"), local("Liberation Sans"); size-adjust: 105.7%; ascent-override: 94.6%; descent-override: 23.65%; line-gap-override: 0%; }
@font-face { font-family: "Figtree Reserva"; src: local("Arial"), local("Helvetica Neue"), local("Liberation Sans"); size-adjust: 99.3%; ascent-override: 95.7%; descent-override: 25.2%; line-gap-override: 0%; }
@font-face { font-family: "Mono Reserva"; src: local("Courier New"), local("Courier"); size-adjust: 100%; ascent-override: 102%; descent-override: 30%; line-gap-override: 0%; }

/* ========================================================================== reset */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; }
  /* palavra comprida quebra em vez de estourar; herdado (um componente pode trocar por "anywhere" e os <p> de dentro seguem) */
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overflow-wrap: break-word; }
  img, svg, video, canvas { display: block; max-width: 100%; }
  img { height: auto; }
  input, button, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
  button { cursor: pointer; background: none; border: 0; padding: 0; }
  ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
  table { border-collapse: collapse; border-spacing: 0; }
  fieldset { border: 0; padding: 0; min-width: 0; }
  legend { padding: 0; }
  summary { cursor: pointer; }
  [hidden] { display: none !important; }
}

/* ========================================================================== tokens */
@layer tokens {
  :root {
    color-scheme: light;
    /* cor — por papel */
    --bg: #FCFCFD;            /* página (branco-quente) */
    --surface: #FFFFFF;       /* cartões e campos */
    --surface-2: #F4F6FB;     /* fundo das áreas internas, cabeçalho de tabela */
    --sky: #EEF2F9;           /* faixas alternadas, seleção */
    --sky-2: #DBE4F3;         /* tijolos, trilhos */
    --text: #13203B;          /* tinta: todo texto principal (15,9:1 no fundo) */
    --text-2: #3D4A63;        /* apoio (8,7:1) */
    --on-color: #FFFFFF;      /* texto sobre azul */
    --primary: #1B4DB8;       /* única cor de ação (branco nele: 6,87:1) */
    --primary-strong: #153D94;/* hover (9,33:1) */
    --field: #10306B;         /* campo de marca: blocos azuis cheios */
    --sun: #F0B429;           /* destaque: marca-texto, check do símbolo, tijolos (tinta nele: 10,46:1) */
    --sun-2: #FBE6B0;
    --success: #13794A; --success-bg: #E2F3E9;
    --warning: #8A5300; --warning-bg: #FFF3D1; --warning-line: #B87A1A;
    --danger: #C0262D; --danger-strong: #9E1F25; --danger-bg: #FDECEC;
    --border: #DCE3F2;        /* decorativa (1,28:1): nunca é o único limite de um campo */
    --border-field: #6B7894;  /* contorno de campo (4,43:1) */
    --border-strong: #9AA6BE; /* trilho de etapa futura, campo desabilitado */
    --disabled-bg: #E6EAF2;
    --wa: #25D366; --wa-strong: #1FB855;
    --focus: #13203B; --focus-halo: #F0B429;
    /* tipografia */
    --font-title: "Lexend", "Lexend Reserva", system-ui, sans-serif;
    --font-text: "Figtree", "Figtree Reserva", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", "Mono Reserva", ui-monospace, monospace;
    --fs-xs: .9375rem;   /* 15 — só áreas internas e nota legal */
    --fs-base: 1.125rem; /* 18 — corpo, rótulo, ajuda, erro, botão */
    --fs-lead: 1.25rem;  /* 20 */
    --fs-h3: 1.5rem;     /* 24 */
    --fs-h2: clamp(1.875rem, 1.639rem + 1.009vw, 2.5rem);  /* 30 → 40 */
    --fs-h1: clamp(2.5rem, 1.743rem + 3.229vw, 4.5rem);    /* 40 → 72 */
    --fs-price: clamp(2.5rem, 2.122rem + 1.615vw, 3.5rem); /* 40 → 56 */
    --lh: 1.5; --lh-title: 1.08;
    /* espaço (base 4) */
    --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.5rem; --s6: 2rem; --s7: 3rem; --s8: 4rem; --s9: 6rem;
    --gutter: clamp(1rem, .5rem + 2.5vw, 2rem);
    --container: 75rem;
    --measure: 65ch;
    /* forma: 3 raios, 2 sombras */
    --r-pill: 999px;   /* botões, etiquetas */
    --r-card: 24px;    /* cartões, blocos */
    --r-field: 14px;   /* campos, escolhas, avisos */
    --shadow-1: 0 2px 0 rgb(19 32 59 / .18);                                  /* "apoio": o que se pisa */
    --shadow-2: 0 4px 0 rgb(19 32 59 / .08), 0 16px 40px rgb(19 32 59 / .2); /* só o que flutua */
    --ring: 0 0 0 2px var(--surface), 0 0 0 5px var(--focus), 0 0 0 8px var(--focus-halo);
    /* movimento */
    --dur-1: 150ms; --dur-2: 250ms; --dur-3: 400ms; --ease: cubic-bezier(.2, .7, .2, 1);
    /* medidas */
    --tap: 3rem; --header-h: 4.5rem;
    --ameia: 0px;
  }
  @media (prefers-reduced-motion: reduce) { :root { --dur-1: 0ms; --dur-2: 0ms; --dur-3: 0ms; } }
}

/* ========================================================================== base */
@layer base {
  html { scroll-padding-top: calc(var(--header-h) + 1rem); }
  body { min-height: 100dvh; background: var(--bg); color: var(--text); font: 400 var(--fs-base)/var(--lh) var(--font-text);
    font-variant-numeric: tabular-nums; font-synthesis: none; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
  h1, h2, h3, h4 { font-family: var(--font-title); line-height: var(--lh-title); text-wrap: balance; } /* cor herdada: branco sobre azul */
  h1, .h1 { font-size: var(--fs-h1); font-weight: 700; letter-spacing: -.03em; }
  h2, .h2 { font-size: var(--fs-h2); font-weight: 700; letter-spacing: -.025em; }
  h3, .h3 { font-size: var(--fs-h3); font-weight: 600; letter-spacing: -.015em; line-height: 1.2; }
  h4, .h4 { font-size: var(--fs-lead); font-weight: 600; line-height: 1.3; }
  p, li { text-wrap: pretty; }
  .lead { font-size: var(--fs-lead); color: var(--text-2); max-width: 36ch; }
  strong, b { font-weight: 700; }
  em, i, cite { font-style: normal; font-weight: 700; } /* sem itálico: ênfase por peso */
  small { font-size: var(--fs-base); }
  a { color: var(--primary); text-decoration-line: underline; text-decoration-thickness: .09em; text-underline-offset: .2em; }
  a:hover { color: var(--primary-strong); text-decoration-thickness: .14em; }
  :is(p, dd) a { overflow-wrap: anywhere; } /* link comprido (endereço, e-mail) no meio do texto não alarga grade nem cartão */
  code, kbd, samp, pre { font-family: var(--font-mono); font-size: 1rem; }
  hr { border: 0; height: 2px; background: var(--border); }
  ::selection { background: var(--sun); color: var(--text); }
  :focus { outline: none; }
  :focus-visible { outline: 3px solid transparent; outline-offset: 2px; box-shadow: var(--ring); border-radius: var(--r-field); }
  :target { scroll-margin-top: calc(var(--header-h) + 1rem); }
  [tabindex="-1"]:focus-visible { box-shadow: none; }
  .marca { background: linear-gradient(transparent 86%, var(--sun) 86%, var(--sun) 96%, transparent 96%); -webkit-box-decoration-break: clone; box-decoration-break: clone; padding-inline: .06em; }
  .mono { font-family: var(--font-mono); letter-spacing: .02em; white-space: nowrap; }
  .icon { width: 1.5rem; height: 1.5rem; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .icon--lg { width: 2rem; height: 2rem; }
  .icon--xl { width: 2.75rem; height: 2.75rem; }
  .skip-link { position: absolute; z-index: 100; left: var(--s4); top: -10rem; padding: var(--s3) var(--s5); border-radius: var(--r-pill); background: var(--text); color: #fff; font-weight: 700; }
  .skip-link:focus { top: var(--s3); }
}

/* ========================================================================== layout */
@layer layout {
  .container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
  .container--narrow { --container: 48rem; }
  .stack { display: flex; flex-direction: column; gap: var(--gap, var(--s4)); }
  .cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap, var(--s3)); }
  .flow > * + * { margin-top: var(--flow, 1em); }
  .grid { display: grid; gap: var(--gap, var(--s5)); grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--min, 17rem)), 1fr)); }
  .grid--2 { --min: 22rem; } .grid--3 { --min: 16rem; } .grid--4 { --min: 14rem; }
  .split { display: grid; gap: var(--gap, var(--s6)); align-items: start; }
  @media (min-width: 64em) { .split { grid-template-columns: 1fr 1fr; } }
  .section { position: relative; padding-block: clamp(3rem, 2rem + 4vw, 6rem); }
  .section--tight { padding-block: clamp(2rem, 1.5rem + 2vw, 3.5rem); }
  .section--sky { background: var(--sky); }
  /* recorte de ameias no topo da seção (assinatura) */
  .section--edge { --edge: var(--sky); margin-top: var(--ameia); }
  .section--edge::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: var(--ameia);
    background: linear-gradient(90deg, var(--edge) 50%, transparent 0) 50% 0 / calc(var(--ameia) * 4) 100% repeat-x; }
  .section-head { display: grid; gap: var(--s3); max-width: 46rem; margin-bottom: clamp(1.5rem, 1rem + 2vw, 3rem); }
  .section-head--center { margin-inline: auto; text-align: center; justify-items: center; }
  .kicker { display: inline-flex; align-items: center; gap: var(--s2); color: var(--primary); font-weight: 700; }
  .kicker::before { content: ""; width: 1.75rem; height: .875rem; flex: none;
    background: linear-gradient(currentColor 0 0) 0 100% / 100% 4px no-repeat, linear-gradient(90deg, currentColor 33.3%, transparent 0 66.6%, currentColor 0) 0 0 / 100% 7px no-repeat; }

  /* cabeçalho do site */
  .site-header { position: sticky; top: 0; z-index: 50; background: var(--bg); }
  .site-header::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 8px; pointer-events: none;
    background: linear-gradient(var(--border) 0 0) 0 0 / 100% 1px no-repeat; }
  .site-header--static { position: relative; } /* compra: cabeçalho enxuto, não fixo (K-04) */
  .site-header__in { display: flex; align-items: center; gap: var(--s2); min-height: 4rem; }
  .safe-note { display: inline-flex; align-items: center; gap: .375rem; color: var(--success); font-weight: 700; }
  .brand { display: inline-flex; align-items: center; gap: .5rem; min-height: var(--tap); margin-right: auto; color: var(--text); text-decoration: none;
    font: 600 1.25rem/1 var(--font-title); letter-spacing: -.02em; white-space: nowrap; border-radius: var(--r-field); }
  .brand:hover { color: var(--text); }
  /* Marca ROX ID: "ROX" em tinta + "ID" em selo azul (mesmo desenho do logo.svg) */
  .brand__name { font-weight: 700; letter-spacing: -.01em; }
  .brand__id { display: inline-block; margin-left: .3em; padding: .2em .32em .16em; border-radius: .3em; background: var(--primary); color: #fff; line-height: 1; }
  .brand img, .brand svg { width: 2rem; height: 2rem; }
  .site-nav__list { display: flex; flex-direction: column; gap: var(--s1); }
  .site-nav a { display: flex; align-items: center; min-height: var(--tap); padding: .5rem .875rem; border-radius: var(--r-field); color: var(--text); font-weight: 700; text-decoration: none; }
  .site-nav a:hover { background: var(--sky); color: var(--primary-strong); }
  .site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: .35em; text-decoration-color: var(--primary); }
  @media (max-width: 63.99em) {
    .js .site-nav { position: absolute; left: 0; right: 0; top: calc(100% + 8px); padding: var(--s3) var(--gutter) var(--s5); background: var(--bg); border-bottom: 2px solid var(--border); box-shadow: var(--shadow-2); }
    .js .site-nav:not(.is-open) { display: none; }
    .site-nav a { font-size: var(--fs-lead); }
  }
  /* sem JavaScript (ou antes de /js/df/chrome.js pôr a classe "js" no <html>): o botão "Menu" não funciona;
     a lista de links vai para uma linha abaixo da marca, sem rolagem lateral */
  @media (max-width: 63.99em) {
    html:not(.js) .site-header__in:has(> .site-nav) { flex-wrap: wrap; padding-bottom: .25rem; } /* só cabeçalho com menu */
    html:not(.js) .site-nav { order: 3; flex: 1 1 100%; }
    html:not(.js) .site-nav__list { flex-direction: row; flex-wrap: wrap; gap: 0 .25rem; }
    html:not(.js) .site-nav a { font-size: var(--fs-base); padding-inline: .5rem; }
  }
  @media (max-width: 47.99em) { .site-header .container { width: min(100% - 1.5rem, var(--container)); } .site-header .brand { font-size: 1.125rem; gap: .375rem; } .site-header__in { gap: .375rem; } }
  @media (max-width: 23.4em) { .brand__name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } }
  @media (min-width: 64em) {
    .site-header__in { gap: var(--s4); min-height: 4.5rem; }
    .brand { font-size: 1.5rem; } .brand img, .brand svg { width: 2.5rem; height: 2.5rem; }
    .site-nav__list { flex-direction: row; gap: var(--s1); }
    .site-nav a { white-space: nowrap; } /* "Como funciona" nunca em duas linhas */
  }
  /* 1024–1279 px: a linha inteira (marca + 4 links + "Comprar certificado") pedia 960 px, exatamente o que cabe em 1024
     sem barra de rolagem. Mais justo aqui deixa folga de ~90 px para a barra de rolagem clássica e para a fonte de reserva. */
  @media (min-width: 64em) and (max-width: 79.99em) {
    .site-header__in { gap: var(--s2); }
    .brand { font-size: 1.375rem; } .brand img, .brand svg { width: 2.25rem; height: 2.25rem; }
    .site-nav__list { gap: 0; }
    .site-nav a { padding-inline: .5rem; }
    .site-header__cta { padding-inline: 1.25rem; }
  }

  /* rodapé do site */
  .site-footer { position: relative; margin-top: var(--ameia); background: var(--text); color: #fff; padding-block: var(--s7) var(--s6); }
  .site-footer::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: var(--ameia);
    background: linear-gradient(90deg, var(--text) 50%, transparent 0) 50% 0 / calc(var(--ameia) * 4) 100% repeat-x; }
  .site-footer a { color: #fff; }
  .site-footer a:hover { color: var(--sun); }
  .site-footer :focus-visible { box-shadow: 0 0 0 3px var(--sun); }
  .site-footer__grid { display: grid; gap: var(--s6) var(--s4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer__grid > :nth-child(-n+2) { grid-column: 1 / -1; }
  @media (min-width: 48em) { .site-footer__grid { grid-template-columns: repeat(2, 1fr); } }
  @media (min-width: 64em) { .site-footer__grid { grid-template-columns: 1.3fr 1.2fr 1fr 1fr; } .site-footer__grid > :nth-child(-n+2) { grid-column: auto; } }
  .site-footer h2 { font-size: var(--fs-lead); color: #fff; margin-bottom: var(--s3); }
  .site-footer ul { list-style: none; padding: 0; display: grid; gap: var(--s1); }
  .site-footer li a { display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; }
  .site-footer__brand { display: inline-flex; align-items: center; gap: .625rem; font: 600 1.5rem/1 var(--font-title); letter-spacing: -.02em; color: #fff; text-decoration: none; min-height: var(--tap); }
  .site-footer__brand img { width: auto; height: 2.5rem; }
  .site-footer__legal { margin-top: var(--s6); padding-top: var(--s5); border-top: 2px solid rgb(255 255 255 / .22); display: grid; gap: var(--s2); }
  /* celular: o mesmo conteúdo (empresa, CNPJ, endereço, contato, horário, regras, acessibilidade) com menos respiro */
  @media (max-width: 47.99em) {
    .site-footer { padding-block: var(--s6) var(--s5); }
    .site-footer__grid { row-gap: var(--s5); }
    .site-footer__brand { min-height: 2.75rem; }
    .site-footer__brand img { height: 2rem; }
    .site-footer h2 { margin-bottom: var(--s2); }
    .site-footer__grid h2 ~ p { display: inline; } /* "…sábado, 8h às 12h. Horário de Brasília." numa frase só */
    .site-footer li a { padding-block: .25rem; } /* link de duas linhas não encosta no de baixo (uma linha continua com 44 px) */
    .site-footer__legal { margin-top: var(--s5); padding-top: var(--s4); }
  }

  /* compra: coluna do formulário + resumo ao lado (no celular, o resumo vem antes, recolhido) */
  .checkout { display: grid; gap: var(--s5); padding-block: var(--s5) var(--s8); }
  .checkout__grid { display: grid; gap: var(--s5); align-items: start; }
  @media (min-width: 64em) { .checkout__grid { grid-template-columns: minmax(0, 1fr) 23rem; grid-template-areas: "main side"; gap: var(--s7); }
    .checkout__grid > .summary { grid-area: side; } .checkout__grid > :not(.summary) { grid-area: main; } }

  /* casca das áreas internas (gestor, contador, atendente) */
  .shell { display: grid; min-height: 100dvh; background: var(--surface-2); grid-template-rows: auto 1fr; }
  .shell__side { background: var(--surface); border-bottom: 2px solid var(--border); padding: var(--s3) var(--gutter) var(--s4); }
  .shell__nav ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
  .shell__nav a { display: flex; align-items: center; gap: .625rem; min-height: var(--tap); padding: .5rem .875rem; border-radius: var(--r-field); color: var(--text); font-weight: 700; text-decoration: none; }
  .shell__nav a:hover { background: var(--sky); }
  .shell__nav a[aria-current="page"] { background: var(--sky); box-shadow: inset 4px 0 0 var(--primary); color: var(--primary-strong); }
  .shell__main { padding: var(--s5) var(--gutter) var(--s7); min-width: 0; }
  @media (min-width: 64em) {
    .shell { grid-template-columns: 17.5rem minmax(0, 1fr); grid-template-rows: none; }
    .shell__side { border-bottom: 0; border-right: 2px solid var(--border); padding: var(--s5) var(--s4); position: sticky; top: 0; height: 100dvh; overflow-y: auto; }
    .shell__nav ul { grid-template-columns: 1fr; gap: var(--s1); }
    .shell__main { padding: var(--s6) var(--s7) var(--s8); }
  }
}

/* ========================================================================== components */
@layer components {
  /* ---------- botão ---------- */
  .btn { --bg: var(--surface); --fg: var(--primary); --bd: var(--primary);
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: var(--tap); padding: .5rem 1.5rem;
    border: 2px solid var(--bd); border-radius: var(--r-pill); background: var(--bg); color: var(--fg);
    font: 700 var(--fs-base)/1.2 var(--font-text); text-align: center; text-decoration: none; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
    transition: background-color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease); }
  .btn:hover { --bg: var(--sky); color: var(--fg); text-decoration: none; }
  .btn:active { transform: translateY(1px); }
  .btn:focus-visible { border-radius: var(--r-pill); }
  .btn .icon { transition: transform var(--dur-2) var(--ease); }
  .btn:hover .icon--go { transform: translateX(3px); }
  .btn--primary { --bg: var(--primary); --fg: var(--on-color); --bd: var(--primary); box-shadow: var(--shadow-1); }
  .btn--primary:hover { --bg: var(--primary-strong); --bd: var(--primary-strong); }
  .btn--ghost { --bg: transparent; --bd: transparent; padding-inline: 1rem; }
  .btn--ghost:hover { --bg: var(--sky); --bd: var(--sky); }
  .btn--danger { --bg: var(--danger); --fg: #fff; --bd: var(--danger); }
  .btn--danger:hover { --bg: var(--danger-strong); --bd: var(--danger-strong); }
  .btn--danger-soft { --bg: var(--surface); --fg: var(--danger); --bd: var(--danger); }
  .btn--danger-soft:hover { --bg: var(--danger-bg); }
  .btn--whatsapp { --bg: var(--wa); --fg: var(--text); --bd: var(--wa); }
  .btn--whatsapp:hover { --bg: var(--wa-strong); --bd: var(--wa-strong); }
  .btn--light { --bg: #fff; --fg: var(--primary-strong); --bd: #fff; }
  .btn--light:hover { --bg: var(--sky); --bd: var(--sky); }
  .btn--lg { min-height: 3.5rem; padding-inline: 1.75rem; }
  .btn--sm { min-height: 2.75rem; padding: .375rem 1rem; }
  .btn--icon { width: var(--tap); padding: 0; }
  .btn--block { display: flex; width: 100%; }
  @media (max-width: 47.99em) { .btn--block-mobile { display: flex; width: 100%; } }
  .btn:disabled, .btn[aria-disabled="true"] { --bg: var(--disabled-bg); --fg: var(--text-2); --bd: var(--disabled-bg); box-shadow: none; cursor: not-allowed; transform: none; }
  .btn[aria-busy="true"] { cursor: progress; }
  .btn.is-done { --bg: var(--success); --fg: #fff; --bd: var(--success); }
  .btn.is-error { --bd: var(--danger); }
  /* foco: o anel duplo fica por cima da sombra de apoio (antes a sombra do principal, nesta camada, apagava o anel da camada base) */
  .btn:focus-visible { box-shadow: var(--ring); }
  .btn--primary:focus-visible { box-shadow: var(--shadow-1), var(--ring); }
  .site-header__cta, .site-header__menu { white-space: nowrap; }
  @media (max-width: 47.99em) { .site-header__cta { padding-inline: .75rem; } .site-header__menu { padding-inline: .5rem; gap: .375rem; } .site-header__menu .icon { width: 1.25rem; height: 1.25rem; } }
  @media (min-width: 64em) { .site-header__menu { display: none; } }
  @media (max-width: 63.99em) { html:not(.js) .site-header__menu { display: none; } } /* sem JavaScript o "Menu" não abre: os links ficam à vista (ver layout) */
  .btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }
  @media (max-width: 47.99em) { .btn-row--stack { flex-direction: column-reverse; align-items: stretch; } }
  .link-btn { display: inline-flex; align-items: center; gap: .375rem; min-height: 2.75rem; color: var(--primary); font-weight: 700; text-decoration: underline; text-underline-offset: .2em; }
  .link-btn:hover { color: var(--primary-strong); }

  .spinner { width: 1.25em; height: 1.25em; flex: none; border: 3px solid currentColor; border-right-color: transparent; border-radius: var(--r-pill); animation: df-spin .9s linear 14; }
  @keyframes df-spin { to { transform: rotate(1turn); } }
  @media (prefers-reduced-motion: reduce) { .spinner { animation: none; border-right-color: currentColor; border-style: dotted; } }

  /* ---------- etiqueta / selo ---------- */
  .tag { display: inline-flex; align-items: center; gap: .375rem; min-height: 2.25rem; padding: .25rem .875rem; border-radius: var(--r-pill);
    background: var(--sky); color: var(--primary-strong); font-weight: 700; line-height: 1.2; }
  .tag .icon { width: 1.25rem; height: 1.25rem; }
  .tag--success { background: var(--success-bg); color: var(--success); }
  .tag--warning { background: var(--warning-bg); color: var(--warning); }
  .tag--danger { background: var(--danger-bg); color: var(--danger); }
  .tag--neutral { background: var(--surface-2); color: var(--text-2); box-shadow: inset 0 0 0 2px var(--border); }
  .tag--sun { background: var(--sun); color: var(--text); }
  .tag--field { background: var(--field); color: #fff; }
  .tag--outline { background: var(--surface); box-shadow: inset 0 0 0 2px var(--sky-2); }
  .tag--sm { min-height: 1.75rem; padding: .125rem .625rem; font-size: var(--fs-xs); } /* só áreas internas */
  .seal { display: grid; grid-template-columns: auto 1fr; gap: .125rem .75rem; align-items: center; }
  .seal > .icon { grid-row: span 2; width: 2.5rem; height: 2.5rem; padding: .5rem; border-radius: var(--r-pill); background: var(--sky); color: var(--primary); }
  .seal__title { font-weight: 700; }
  .seal__text { color: var(--text-2); }

  /* ---------- aviso ---------- */
  .alert { --a-bg: var(--sky); --a-bd: var(--primary); --a-fg: var(--primary);
    display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .125rem .75rem; padding: 1rem 1.25rem; border: 2px solid var(--a-bd); border-radius: var(--r-field); background: var(--a-bg); color: var(--text); overflow-wrap: anywhere; }
  .alert > .icon { grid-row: 1 / span 9; width: 1.75rem; height: 1.75rem; color: var(--a-fg); }
  .alert__title { font-weight: 700; }
  .alert > :not(.icon) { grid-column: 2; }
  .alert > * + * { margin-top: var(--s1); }
  .alert ul, .alert ol { padding-left: 1.25em; }
  .alert--success { --a-bg: var(--success-bg); --a-bd: var(--success); --a-fg: var(--success); }
  .alert--warning { --a-bg: var(--warning-bg); --a-bd: var(--warning-line); --a-fg: var(--warning); }
  .alert--danger { --a-bg: var(--danger-bg); --a-bd: var(--danger); --a-fg: var(--danger); }
  .error-summary:focus-visible { box-shadow: var(--ring); }
  .error-summary a { color: var(--danger-strong); font-weight: 700; }

  /* ---------- cartão ---------- */
  .card { background: var(--surface); border: 2px solid var(--border); border-radius: var(--r-card); padding: clamp(1.25rem, 1rem + 1vw, 2rem);
    grid-template-columns: minmax(0, 1fr); } /* vale quando a página faz do cartão uma grade (display: grid): nada alarga além do cartão */
  .card--sky { background: var(--sky); border-color: var(--sky); }
  .card--field { background: var(--field); border-color: var(--field); color: #fff; }
  .card--field h2, .card--field h3 { color: #fff; }
  a.card { display: block; color: inherit; text-decoration: none; transition: border-color var(--dur-1) var(--ease); }
  a.card:hover { border-color: var(--primary); }
  .card__title { font-size: var(--fs-h3); margin-bottom: var(--s2); }

  /* ---------- preço ---------- */
  .price { display: inline-flex; align-items: flex-start; gap: .3rem; font: 700 var(--fs-price)/1 var(--font-title); letter-spacing: -.035em; color: var(--text); white-space: nowrap; }
  .price__cur { font-size: clamp(1.25rem, .43em, 1.5rem); margin-top: .16em; letter-spacing: 0; font-weight: 600; }
  .price-note { color: var(--text-2); }
  .price-note strong { color: var(--text); }

  /* ---------- cartão de produto ---------- */
  .product { display: flex; flex-direction: column; gap: var(--s4); height: 100%; background: var(--surface); border: 2px solid var(--border); border-radius: var(--r-card); padding: clamp(1.25rem, 1rem + 1vw, 2rem); }
  .product__top { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
  .product__art { width: 4rem; height: 4rem; border-radius: var(--r-field); background: var(--sky); display: grid; place-items: center; flex: none; }
  .product__art svg { width: 3rem; height: 3rem; }
  .product__name { font-size: var(--fs-h2); }
  .product__what { color: var(--text-2); margin-top: calc(var(--s2) * -1); }
  .product__price { display: grid; gap: var(--s1); padding-block: var(--s4); border-block: 2px solid var(--border); }
  .product .checks { flex: 1; }
  .product .btn { margin-top: var(--s2); }

  /* ---------- listas com ícone ---------- */
  .checks { list-style: none; padding: 0; display: grid; gap: var(--s2); }
  .checks li { display: grid; grid-template-columns: 1.5rem 1fr; gap: .625rem; align-items: start; }
  .checks .icon { margin-top: .0625rem; color: var(--success); stroke-width: 2.5; }
  .checks--sun .icon { color: var(--sun); }
  .checks--primary .icon { color: var(--primary); stroke-width: 2; }
  .numbered { list-style: none; padding: 0; counter-reset: n; display: grid; gap: var(--s3); }
  .numbered > li { counter-increment: n; display: grid; grid-template-columns: 2.25rem 1fr; gap: .75rem; align-items: start; }
  .numbered > li::before { content: counter(n); display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: var(--r-pill); background: var(--sun); color: var(--text); font: 700 1.125rem/1 var(--font-title); }
  .numbered > li > :first-child { padding-top: .25rem; }

  /* ---------- escolha grande (cartão-botão tipo rádio, ou link) ---------- */
  .choices { display: grid; gap: var(--s3); }
  @media (min-width: 40em) { .choices--2 { grid-template-columns: 1fr 1fr; } }
  .choice { position: relative; display: flex; align-items: center; gap: 1rem; min-height: 4.5rem; padding: 1rem 1.25rem; border: 2px solid var(--border-field); border-radius: var(--r-field);
    background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); cursor: pointer; text-decoration: none;
    transition: border-color var(--dur-1) var(--ease), background-color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease); }
  .choice:hover { border-color: var(--primary); color: var(--text); }
  .choice:active { transform: translateY(1px); box-shadow: none; }
  .choice__icon { display: grid; place-items: center; width: 3rem; height: 3rem; flex: none; border-radius: var(--r-pill); background: var(--sky); color: var(--primary); }
  @media (max-width: 29.99em) { .choice:has(.control) .choice__icon { display: none; } }
  .choice__body { display: grid; gap: .125rem; flex: 1; min-width: 0; }
  .choice__title { font: 600 var(--fs-lead)/1.25 var(--font-title); letter-spacing: -.01em; }
  .choice__text { color: var(--text-2); }
  .choice__text strong { color: var(--text); font-family: var(--font-title); font-weight: 600; white-space: nowrap; }
  .choice__end { margin-left: auto; flex: none; color: var(--primary); }
  .choice__price { font: 700 var(--fs-lead)/1 var(--font-title); white-space: nowrap; }
  a.choice:hover .choice__end .icon { transform: translateX(3px); }
  .choice__end .icon { transition: transform var(--dur-2) var(--ease); }
  .choice:has(:checked) { border-color: var(--primary); background: var(--sky); box-shadow: inset 0 0 0 2px var(--primary); }
  .choice:has(:checked) .choice__icon { background: var(--primary); color: #fff; }
  .choice:has(:focus-visible) { box-shadow: var(--ring); }
  .choice:has(:disabled) { background: var(--disabled-bg); border-color: var(--border-strong); box-shadow: none; cursor: not-allowed; color: var(--text-2); }
  .choice:has([aria-invalid="true"]) { border-color: var(--danger); }

  /* ---------- controles: rádio e caixa de marcar (grandes) ---------- */
  .control { appearance: none; -webkit-appearance: none; flex: none; display: inline-grid; place-content: center; width: 2rem; height: 2rem; margin: 0;
    border: 2px solid var(--border-field); background: var(--surface); cursor: pointer; transition: background-color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease); }
  .control[type="radio"] { border-radius: var(--r-pill); }
  .control[type="checkbox"] { border-radius: 0; } /* quadrado reto, como as ameias */
  .control:hover { border-color: var(--text); }
  .control[type="checkbox"]::before { content: ""; width: 1.125rem; height: 1.125rem; background: #fff; transform: scale(0); transition: transform var(--dur-1) var(--ease);
    clip-path: polygon(13% 47%, 0 62%, 40% 98%, 100% 22%, 86% 9%, 39% 70%); }
  .control[type="checkbox"]:checked { background: var(--primary); border-color: var(--primary); }
  .control[type="checkbox"]:checked::before { transform: scale(1); }
  .control[type="radio"]:checked { border-color: var(--primary); background: radial-gradient(circle, var(--primary) 0 .5rem, var(--surface) calc(.5rem + 1px)); }
  .control:disabled { background-color: var(--disabled-bg); border-color: var(--border-strong); cursor: not-allowed; }
  .control[aria-invalid="true"] { border-color: var(--danger); border-width: 3px; }
  .choice .control:focus-visible { box-shadow: none; }
  .check { display: flex; align-items: flex-start; gap: .875rem; min-height: var(--tap); padding-block: .5rem; cursor: pointer; }
  .check > span { padding-top: .1875rem; }
  .check:has(:disabled) { cursor: not-allowed; color: var(--text-2); }
  .check-box { padding: .75rem 1rem; border: 2px solid var(--border); border-radius: var(--r-field); background: var(--surface); }
  .check-box:has([aria-invalid="true"]) { border-color: var(--danger); }
  .check-box:has(> .field__error) { flex-wrap: wrap; } /* <label class="check check-box">: o erro vai para a linha de cima, não ao lado do quadrado */
  .check-box > .field__error { flex-basis: 100%; }

  /* ---------- campo de formulário ---------- */
  .form { display: grid; gap: var(--s5); }
  .field { display: grid; gap: .375rem; min-width: 0; }
  .field__label, .legend { font-weight: 700; color: var(--text); }
  .field__label .opt, .legend .opt { font-weight: 400; color: var(--text-2); }
  .legend--q { font: 700 var(--fs-h2)/var(--lh-title) var(--font-title); letter-spacing: -.025em; margin-bottom: var(--s4); }
  .legend--h3 { font: 600 var(--fs-h3)/1.2 var(--font-title); margin-bottom: var(--s2); }
  .field__hint { color: var(--text-2); }
  .field__error, .field__ok { display: flex; align-items: flex-start; gap: .5rem; font-weight: 700; }
  .field__error { color: var(--danger); }
  .field__ok { color: var(--success); }
  .field__error .icon, .field__ok .icon { width: 1.5rem; height: 1.5rem; margin-top: .0625rem; stroke-width: 2.25; }
  .field__count { color: var(--text-2); }
  .field__count.is-over { color: var(--danger); font-weight: 700; }
  .field.is-invalid, .field:has(> .input[aria-invalid="true"]), .field:has(> .input-wrap [aria-invalid="true"]) { padding-left: .875rem; border-left: 4px solid var(--danger); }
  .date-group .field:is(.field, .is-invalid) { padding-left: 0; border-left: 0; } /* data: a barra é só a do grupo (fieldset), não uma em cada parte (o :is() iguala a força da regra acima) */
  .input, .select, .textarea { display: block; width: 100%; min-height: 3.5rem; padding: .75rem 1rem; border: 2px solid var(--border-field); border-radius: var(--r-field);
    background: var(--surface); color: var(--text); font-size: var(--fs-base); line-height: 1.35; transition: border-color var(--dur-1) var(--ease); }
  .textarea { min-height: 8rem; resize: vertical; }
  .input::placeholder, .textarea::placeholder { color: #5E6A82; opacity: 1; }
  .input:hover, .select:hover, .textarea:hover { border-color: var(--text); }
  .input:focus-visible, .select:focus-visible, .textarea:focus-visible { border-color: var(--text); box-shadow: var(--ring); }
  /* data: o botão do calendário (dentro do campo) recebe o foco sozinho e o campo perde o :focus/:focus-visible
     (o anel sumia). Ele continua com :focus-within: o anel do campo fica enquanto o foco está em qualquer parte dele. */
  .input:is([type="date"], [type="time"], [type="month"]):focus-within { border-color: var(--text); box-shadow: var(--ring); }
  .input::-webkit-calendar-picker-indicator { border-radius: 6px; padding: 4px; cursor: pointer; }
  .input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); border-width: 3px; padding-inline: calc(1rem - 1px); }
  .input.is-valid { border-color: var(--success); }
  .input:disabled, .select:disabled, .textarea:disabled { background: var(--disabled-bg); border-color: var(--border-strong); color: var(--text-2); cursor: not-allowed; }
  .input[readonly] { background: var(--surface-2); border-style: dashed; }
  .input--code { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .06em; }
  .input--2 { max-width: 4.5rem; } .input--4 { max-width: 6rem; } .input--doc { max-width: 18rem; }
  .select { appearance: none; -webkit-appearance: none; padding-right: 3rem; cursor: pointer;
    background-image: linear-gradient(45deg, transparent 50%, var(--text) 50%), linear-gradient(135deg, var(--text) 50%, transparent 50%);
    background-position: calc(100% - 1.6rem) 52%, calc(100% - 1.15rem) 52%; background-size: .45rem .45rem; background-repeat: no-repeat; }
  .input-wrap { display: flex; align-items: stretch; width: 100%; border: 2px solid var(--border-field); border-radius: var(--r-field); background: var(--surface); transition: border-color var(--dur-1) var(--ease); }
  .input-wrap:hover { border-color: var(--text); }
  .input-wrap:focus-within { border-color: var(--text); box-shadow: var(--ring); }
  .input-wrap .input { border: 0; min-height: calc(3.5rem - 4px); flex: 1; min-width: 0; border-radius: var(--r-field); }
  .input-wrap .input:focus-visible { box-shadow: none; }
  .input-wrap:has([aria-invalid="true"]) { border-color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
  .input-wrap:has(.is-valid) { border-color: var(--success); }
  .input-wrap:has(:disabled) { background: var(--disabled-bg); border-color: var(--border-strong); }
  .input-affix { display: flex; align-items: center; gap: .375rem; padding-inline: .875rem; color: var(--text-2); font-weight: 700; white-space: nowrap; }
  .input-affix:first-child { border-right: 2px solid var(--border); }
  .input-affix--ok { color: var(--success); }
  .input-wrap .btn { margin: .25rem; min-height: calc(var(--tap) - 4px); }
  .date-group { display: flex; flex-wrap: wrap; gap: var(--s3); }
  .date-group .field { gap: .25rem; }
  .date-group .field__label { font-weight: 400; color: var(--text-2); }

  /* ---------- seletor de parcelas ---------- */
  .installments { display: grid; gap: var(--s2); padding: var(--s4); border-radius: var(--r-field); background: var(--surface); border: 2px solid var(--border); }
  .installments__detail { font-weight: 700; }
  .installments__total { color: var(--text-2); }

  /* ---------- barra de etapas (com texto) ---------- */
  .steps { display: grid; gap: var(--s2); }
  .steps__now { font-weight: 700; }
  .steps__now span { font-weight: 400; color: var(--text-2); }
  .steps__list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: .375rem; }
  .steps__item { display: grid; gap: .5rem; color: var(--text-2); }
  .steps__item::before { content: ""; height: .5rem; border-radius: var(--r-pill); background: var(--sky-2); box-shadow: inset 0 0 0 1px var(--border-strong); }
  .steps__item.is-done::before, .steps__item[aria-current="step"]::before { background: var(--primary); box-shadow: none; }
  .steps__label { display: flex; align-items: center; gap: .375rem; font-weight: 700; line-height: 1.25; }
  @media (max-width: 47.99em) { /* no celular o nome sai só da vista: o leitor de tela continua lendo a lista (use aria-hidden="true" no .steps__now) */
    .steps__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; } }
  .steps__label .icon { width: 1.25rem; height: 1.25rem; color: var(--success); stroke-width: 2.75; }
  .steps__item[aria-current="step"] { color: var(--text); }
  .steps__num { display: inline-grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: var(--r-pill); background: var(--surface); box-shadow: inset 0 0 0 2px currentColor; font-size: var(--fs-xs); flex: none; }
  .steps__item[aria-current="step"] .steps__num { background: var(--primary); color: #fff; box-shadow: none; }
  @media (min-width: 48em) { .steps__now { display: none; } }

  /* ---------- resumo do pedido ---------- */
  .summary { background: var(--surface); border: 2px solid var(--border); border-radius: var(--r-card); }
  .summary__toggle { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; min-height: 4rem; padding: .75rem 1.25rem; list-style: none; border-radius: var(--r-card); }
  .summary__toggle::-webkit-details-marker { display: none; }
  .summary__toggle .price { font-size: 1.5rem; }
  .summary__toggle-more { display: inline-flex; align-items: center; gap: .25rem; margin-left: auto; color: var(--primary); font-weight: 700; text-decoration: underline; text-underline-offset: .2em; }
  .summary__toggle-more .icon { transition: transform var(--dur-2) var(--ease); }
  details[open] > .summary__toggle .summary__toggle-more .icon { transform: rotate(180deg); }
  .summary__body { display: grid; gap: var(--s4); padding: 0 1.25rem 1.25rem; }
  .summary__title { font-size: var(--fs-h3); }
  .summary__list { display: grid; gap: var(--s3); }
  .summary__list > div { display: grid; gap: .125rem; }
  .summary__list dt { color: var(--text-2); }
  .summary__list dd { font-weight: 700; overflow-wrap: anywhere; }
  .summary__total { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem; padding-top: var(--s4); border-top: 2px solid var(--border); font-weight: 700; }
  .summary__total .price { font-size: 2.5rem; }
  @media (min-width: 64em) {
    .summary--sticky { position: sticky; top: calc(var(--header-h) + 1rem); }
    .summary__toggle--mobile { display: none; }
    .summary__body { padding: 1.5rem; }
  }

  /* ---------- linha do tempo (página do pedido) ---------- */
  .timeline { list-style: none; padding: 0; display: grid; }
  .timeline__item { position: relative; display: grid; grid-template-columns: 2.75rem 1fr; gap: 1rem; padding-bottom: var(--s5); }
  .timeline__item:last-child { padding-bottom: 0; }
  .timeline__item:not(:last-child)::after { content: ""; position: absolute; left: calc(1.375rem - 2px); top: 2.75rem; bottom: 0; width: 4px; background: var(--border); }
  .timeline__item.is-done:not(:last-child)::after { background: var(--success); }
  .timeline__dot { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: var(--r-pill); background: var(--surface); box-shadow: inset 0 0 0 2px var(--border-field); color: var(--text-2); font: 700 1.125rem/1 var(--font-title); }
  .timeline__item.is-done .timeline__dot { background: var(--success); color: #fff; box-shadow: none; }
  .timeline__item[aria-current="step"] .timeline__dot { background: var(--primary); color: #fff; box-shadow: 0 0 0 5px var(--sky-2); }
  .timeline__title { font-weight: 700; padding-top: .5rem; }
  .timeline__item:not(.is-done):not([aria-current]) .timeline__title { color: var(--text-2); }
  .timeline__meta { color: var(--text-2); }
  .timeline__item.is-failed .timeline__dot { background: var(--danger); color: #fff; box-shadow: none; }
  .timeline__item.is-failed .timeline__title { color: var(--danger); }
  .timeline__item.is-failed:not(:last-child)::after { background: var(--danger-bg); }
  .timeline__now { display: inline-flex; align-items: center; min-height: 1.75rem; margin-left: .25rem; padding: 0 .625rem; border-radius: var(--r-pill);
    background: var(--sky-2); color: var(--primary-strong); font-weight: 700; line-height: 1.2; vertical-align: .1em; } /* etiqueta "Agora" no tamanho do texto */

  /* ---------- sanfona (perguntas) ---------- */
  .accordion { border-top: 2px solid var(--border); }
  .accordion__item { border-bottom: 2px solid var(--border); }
  .accordion__q { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.75rem; padding: .875rem .25rem; list-style: none;
    font: 600 var(--fs-lead)/1.3 var(--font-title); letter-spacing: -.01em; color: var(--text); }
  .accordion__q::-webkit-details-marker { display: none; }
  .accordion__q:hover { color: var(--primary-strong); }
  .accordion__q .icon { display: grid; width: 2.25rem; height: 2.25rem; padding: .375rem; border-radius: var(--r-pill); background: var(--sky); color: var(--primary); transition: transform var(--dur-2) var(--ease); }
  .accordion__item[open] .accordion__q .icon { transform: rotate(180deg); }
  .accordion__a { padding: 0 .25rem var(--s5); max-width: var(--measure); color: var(--text); }
  .accordion__a > * + * { margin-top: var(--s3); }

  /* ---------- diálogo ---------- */
  .dialog { margin: auto; width: min(100% - 2rem, 34rem); max-height: calc(100dvh - 2rem); padding: 0; border: 0; border-radius: var(--r-card); background: var(--surface); color: var(--text); box-shadow: var(--shadow-2);
    overflow-y: auto; overscroll-behavior: contain; scroll-padding-block: 6rem 7rem; }
  .dialog::backdrop { background: rgb(19 32 59 / .62); }
  .dialog[open] { animation: df-rise var(--dur-2) var(--ease); }
  /* diálogo alto rola inteiro; título e ações ficam presos em cima e embaixo (rolar só o corpo reprova no axe: área rolável sem foco) */
  .dialog__head { position: sticky; top: 0; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.5rem 1.5rem .5rem; background: var(--surface); }
  .dialog__title { font-size: var(--fs-h3); padding-top: .5rem; }
  .dialog__body { padding: .5rem 1.5rem 1rem; display: grid; gap: var(--s3); }
  .dialog__actions { position: sticky; bottom: 0; z-index: 1; display: flex; flex-wrap: wrap; gap: var(--s3); padding: .5rem 1.5rem 1.5rem; background: var(--surface); }
  @media (max-width: 47.99em) { .dialog__actions .btn { flex: 1 1 100%; } }
  @media (max-width: 39.99em) { /* celular: "Fechar" numa linha acima, título com a largura inteira */
    .dialog__head { flex-wrap: wrap-reverse; justify-content: flex-end; gap: 0 1rem; }
    .dialog__title { flex: 1 1 100%; padding-top: .25rem; } }
  @keyframes df-rise { from { opacity: 0; transform: translateY(8px); } }

  /* ---------- aviso temporário (toast) ---------- */
  .toasts { position: fixed; z-index: 90; top: calc(var(--header-h) + .5rem); left: var(--s4); right: var(--s4); display: grid; gap: var(--s2); justify-items: center; pointer-events: none; }
  @media (min-width: 48em) { .toasts { left: auto; right: var(--s5); width: 26rem; justify-items: stretch; } }
  /* sem cabeçalho fixo (áreas internas, compra, pedido): avisos embaixo, longe dos botões do topo */
  :root:not(:has(.site-header:not(.site-header--static))) .toasts { top: auto; bottom: max(var(--s4), env(safe-area-inset-bottom)); }
  .toast { pointer-events: auto; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .75rem; align-items: start; width: 100%; padding: .875rem .875rem .875rem 1.125rem;
    border-radius: var(--r-field); background: var(--text); color: #fff; box-shadow: var(--shadow-2); animation: df-rise var(--dur-2) var(--ease); }
  .toast > .icon { color: var(--sun); margin-top: .1875rem; }
  .toast__text { padding-top: .1875rem; overflow-wrap: anywhere; }
  .toast__close { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: var(--r-pill); color: #fff; }
  .toast__close:hover { background: rgb(255 255 255 / .14); }
  .toast__close:focus-visible { box-shadow: 0 0 0 3px var(--sun); }

  /* ---------- tabela (vira cartões no celular) ---------- */
  .table-wrap { background: var(--surface); border: 2px solid var(--border); border-radius: var(--r-card); overflow: hidden; }
  .table { width: 100%; }
  .table caption { text-align: left; padding: 1rem 1.25rem .5rem; font: 600 var(--fs-h3)/1.2 var(--font-title); }
  .table th { text-align: left; font-weight: 700; color: var(--text-2); padding: .875rem 1.25rem; background: var(--surface-2); border-bottom: 2px solid var(--border); white-space: nowrap; }
  .table td { padding: 1rem 1.25rem; border-bottom: 2px solid var(--surface-2); vertical-align: middle; }
  .table tbody th { background: none; color: var(--text); border-bottom: 2px solid var(--surface-2); white-space: normal; }
  .table tr:last-child > * { border-bottom: 0; }
  .table .num { text-align: right; white-space: nowrap; }
  @media (max-width: 47.99em) { .table:not(.table--cards) :is(th, td) { padding: .75rem .5rem; } .cloud-card { padding: 1rem; } }
  .table tbody tr:hover { background: #FAFBFE; }
  @media (max-width: 47.99em) {
    .table--cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .table--cards, .table--cards tbody, .table--cards tr, .table--cards td { display: block; }
    .table--cards tr { padding: 1rem 1.25rem; border-bottom: 2px solid var(--border); }
    .table--cards tr:last-child { border-bottom: 0; }
    .table--cards tbody th { display: block; padding: 0 0 .5rem; font: 600 var(--fs-lead)/1.3 var(--font-title); }
    .table--cards td { display: grid; grid-template-columns: minmax(6.5rem, 38%) minmax(0, 1fr); gap: 0 .75rem; padding: .375rem 0; border: 0; text-align: left; }
    .table--cards td.num { text-align: left; }
    /* o rótulo ocupa a coluna da esquerda em todas as linhas: valor, data e nota da mesma célula descem pela coluna da direita */
    .table--cards td::before { content: attr(data-label); grid-row: span 20; font-weight: 700; color: var(--text-2); }
    .table--cards td > * + * { margin-top: .25rem; }
  }

  /* ---------- número grande (KPI) ---------- */
  .kpi { display: grid; grid-template-columns: minmax(0, 1fr); gap: .25rem; align-content: start; padding: 1.25rem 1.5rem; background: var(--surface); border: 2px solid var(--border); border-radius: var(--r-card); overflow-wrap: anywhere; }
  .kpi__label { font-weight: 700; color: var(--text-2); }
  .kpi__value { font: 700 1.875rem/1.1 var(--font-title); letter-spacing: -.025em; } /* dinheiro já vem com espaço que não quebra (money()) */
  .kpi__value--text { font-size: var(--fs-h3); line-height: 1.2; } /* valor em palavras: "quarta-feira, 11 de novembro" */
  .kpi__note { color: var(--text-2); }
  .kpi__empty { font: 600 var(--fs-lead)/1.3 var(--font-title); color: var(--text-2); padding-block: .5rem; }
  .kpi--featured { background: var(--field); border-color: var(--field); color: #fff; }
  .kpi--featured .kpi__label, .kpi--featured .kpi__note { color: var(--sky); }

  /* ---------- abas ---------- */
  .tabs__list { display: flex; flex-wrap: wrap; gap: .25rem; border-bottom: 2px solid var(--border); }
  .tab { min-height: var(--tap); padding: .5rem 1.125rem; margin-bottom: -2px; border-bottom: 4px solid transparent; border-radius: var(--r-field) var(--r-field) 0 0; font-weight: 700; color: var(--text-2); }
  .tab:hover { color: var(--text); background: var(--sky); }
  .tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--primary); }
  .tabs__panel { padding-top: var(--s5); }

  /* ---------- estado vazio e carregador ---------- */
  .empty { display: grid; justify-items: center; text-align: center; gap: .75rem; padding: 2.5rem 1.5rem; border: 2px dashed var(--border-strong); border-radius: var(--r-card); }
  .empty__icon { display: grid; place-items: center; width: 4rem; height: 4rem; border-radius: var(--r-pill); background: var(--sky); color: var(--primary); }
  .empty__title { font: 600 var(--fs-h3)/1.2 var(--font-title); }
  .empty p { max-width: 36ch; color: var(--text-2); }
  .skeleton { display: block; height: 1.125rem; border-radius: var(--r-pill); background: var(--disabled-bg); }
  .skeleton--title { height: 2rem; width: 60%; }
  .skeleton--block { height: 7rem; border-radius: var(--r-field); }
  .skeleton--short { width: 40%; }
  .loading { display: inline-flex; align-items: center; gap: .625rem; color: var(--text-2); font-weight: 700; }

  /* ---------- Pix ---------- */
  .pix { display: grid; gap: var(--s5); container-type: inline-size; }
  .pix__head { display: grid; gap: var(--s2); }
  .pix__due { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; }
  .pix__qr { width: min(100%, 15rem); padding: .75rem; background: #fff; border: 2px solid var(--text); border-radius: var(--r-field); }
  .pix__qr svg { width: 100%; height: auto; }
  .pix__code { width: 100%; min-height: 6rem; padding: .75rem 1rem; border: 2px dashed var(--border-field); border-radius: var(--r-field); background: var(--surface-2);
    font: 400 1rem/1.5 var(--font-mono); color: var(--text); word-break: break-all; resize: none; }
  .pix__wait { display: flex; align-items: center; gap: .75rem; padding: .875rem 1rem; border-radius: var(--r-field); background: var(--sky); color: var(--primary-strong); font-weight: 700; }
  .pix__payee { padding: .875rem 1rem; border-radius: var(--r-field); background: var(--warning-bg); border: 2px solid var(--warning-line); }
  .pix__main { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
  .pix__qrbox > summary { list-style: none; }
  .pix__qrbox > summary::-webkit-details-marker { display: none; }
  .pix__qrbox[open] > summary { margin-bottom: var(--s3); }
  /* computador: QR à esquerda, copiar à direita, em qualquer ordem no HTML (o certo é copiar primeiro: celular e teclado) */
  @media (min-width: 64em) { @container (min-width: 34rem) {
    .pix__main { grid-template-columns: 15rem minmax(0, 1fr); gap: var(--s6); }
    .pix__main > .pix__qrbox { grid-column: 1; grid-row: 1; }
    .pix__main > :not(.pix__qrbox) { grid-column: 2; } } }
  @media (min-width: 64em) { .pix__qrbox > summary { display: none; } }
  .pay-total { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding: 1rem 1.25rem; border-radius: var(--r-field); background: var(--sky); font-weight: 700; }
  .pay-total .price { font-size: 2.5rem; }
  .confirm { display: grid; justify-items: center; text-align: center; gap: var(--s3); }
  .confirm__mark { width: 5rem; height: 5rem; }
  .confirm__mark circle { fill: var(--success); }
  .confirm__mark path { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: df-draw var(--dur-3) var(--ease) .15s forwards; }
  @keyframes df-draw { to { stroke-dashoffset: 0; } }
  @media (prefers-reduced-motion: reduce) { .confirm__mark path { animation: none; stroke-dashoffset: 0; } }
  .copy-status:empty { display: none; }
  .copy-status { font-weight: 700; color: var(--success); }
  .copy-status.is-fallback { color: var(--warning); }

  /* ---------- muralha de garantias (tijolos) ---------- */
  .wall { position: relative; list-style: none; padding: calc(var(--ameia) + .5rem) 0 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
  .wall::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: var(--ameia);
    background: linear-gradient(90deg, var(--primary) 50%, transparent 0) 0 0 / calc(100% / 6.5) 100% repeat-x; }
  .brick { flex: 1 1 auto; display: flex; align-items: center; gap: .75rem; min-height: 4.5rem; padding: .875rem 1.125rem; background: var(--sky-2); color: var(--text); font-weight: 700; line-height: 1.3; }
  .brick .icon { width: 2rem; height: 2rem; color: var(--primary-strong); }
  .brick--sun { background: var(--sun); }
  .brick--sun .icon { color: var(--text); }
  .brick--white { background: var(--surface); box-shadow: inset 0 0 0 2px var(--sky-2); }
  .brick small { display: block; font-weight: 400; color: var(--text-2); }
  @media (max-width: 47.99em) { .brick { flex-direction: column; align-items: flex-start; gap: .5rem; flex: 1 1 38%; min-height: 0; }
    .brick:nth-child(4n+1), .brick:nth-child(4n) { flex-basis: 54%; } }
  .brick--sun small { color: var(--text); }

  /* ---------- faixa com ameias, faixa do contador, chamada final ---------- */
  .ameias { --c: var(--primary); height: calc(var(--ameia) * .5 + 4px); background: linear-gradient(var(--c) 0 0) 0 100% / 100% 4px no-repeat,
    linear-gradient(90deg, var(--c) 50%, transparent 0) 50% 0 / var(--ameia) calc(var(--ameia) * .5) repeat-x; }
  .ameias--short { width: 6rem; }
  .band { position: relative; margin-top: var(--ameia); padding: clamp(1.75rem, 1rem + 3vw, 3.5rem); border-radius: 0 0 var(--r-card) var(--r-card); background: var(--field); color: #fff; }
  .band::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: var(--ameia);
    background: linear-gradient(90deg, var(--field) 50%, transparent 0) 0 0 / calc(100% / 7.5) 100% repeat-x; }
  .band h2, .band h3 { color: #fff; }
  .band p { color: var(--sky); }
  .band__grid { display: grid; gap: var(--s5); align-items: center; }
  @media (min-width: 64em) { .band__grid { grid-template-columns: auto 1fr auto; gap: var(--s6); } }
  .band__art { width: 5rem; height: 5rem; display: grid; place-items: center; border-radius: var(--r-pill); background: var(--sun); color: var(--text); }
  .band :focus-visible { box-shadow: 0 0 0 2px var(--field), 0 0 0 5px var(--sun); }
  .cta-final { display: grid; justify-items: center; text-align: center; gap: var(--s5); }
  .cta-final .h1 { max-width: 16ch; }

  /* ---------- botão flutuante do WhatsApp ---------- */
  .wa-float { position: fixed; z-index: 60; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom));
    display: inline-flex; align-items: center; gap: .5rem; min-height: 3.5rem; padding: .5rem 1.25rem .5rem 1rem; border-radius: var(--r-pill);
    background: var(--wa); color: var(--text); font-weight: 700; text-decoration: none; box-shadow: var(--shadow-2);
    transition: transform var(--dur-2) var(--ease), opacity var(--dur-2) var(--ease), visibility 0s linear 0s; }
  .wa-float:hover { background: var(--wa-strong); color: var(--text); }
  .wa-float .icon { width: 1.75rem; height: 1.75rem; }
  .wa-float.is-hidden { opacity: 0; transform: translateY(1.5rem); visibility: hidden; pointer-events: none; transition: transform var(--dur-2) var(--ease), opacity var(--dur-2) var(--ease), visibility 0s linear var(--dur-2); }
  @media (max-width: 47.99em) { .has-wa-float { padding-bottom: 5.5rem; } }

  /* ---------- barra de demonstração (só ambiente de teste) ---------- */
  .demo-bar { position: relative; z-index: 51; border-bottom: 2px solid var(--text); color: var(--text); font-weight: 700;
    background: repeating-linear-gradient(-45deg, var(--sun) 0 14px, var(--sun-2) 14px 28px); }
  .demo-bar__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .25rem .75rem; min-height: 2.75rem; padding: .375rem var(--gutter); text-align: center; }
  .demo-bar__in > span { padding: .125rem .5rem; background: var(--sun-2); border-radius: var(--r-field); }
  .demo-bar a { color: var(--text); }

  /* ---------- topo da página inicial ---------- */
  .hero { position: relative; overflow-x: clip; padding-block: clamp(1.75rem, 1rem + 3vw, 4.5rem) clamp(2.5rem, 1.5rem + 3vw, 4.5rem); }
  .hero__grid { display: grid; gap: var(--s6); align-items: center; }
  .hero__text { display: grid; gap: var(--s5); justify-items: start; }
  .hero__title { font-size: var(--fs-h1); max-width: 12ch; }
  @media (min-width: 64em) { .hero__grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: var(--s8); } }
  .tower-wrap { position: relative; isolation: isolate; padding-top: var(--ameia); }
  .tower { position: relative; padding: clamp(1.5rem, 1rem + 1.5vw, 2.25rem); border-radius: 0 0 var(--r-card) var(--r-card); background: var(--field); color: #fff; display: grid; gap: var(--s4); }
  .tower::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: var(--ameia);
    background: linear-gradient(90deg, var(--field) 50%, transparent 0) 0 0 / calc(100% / 4.5) 100% repeat-x; }
  .tower__q { font-size: var(--fs-h3); color: #fff; }
  .tower .choice { border-color: #fff; box-shadow: 0 3px 0 rgb(7 18 66 / .45); }
  .tower .choice:hover { border-color: var(--sun); box-shadow: 0 3px 0 rgb(7 18 66 / .45), inset 0 0 0 2px var(--sun); }
  .tower .choice:focus-visible { box-shadow: 0 0 0 3px var(--field), 0 0 0 6px var(--sun); }
  .tower .checks { gap: .375rem; color: #fff; font-weight: 700; }
  .tower__sun { position: absolute; z-index: -1; width: clamp(7rem, 5rem + 8vw, 11rem); right: clamp(-3rem, -1rem - 2vw, -1.5rem); top: clamp(-3.75rem, -1rem - 4vw, -2rem); }
  .tower__note { position: absolute; z-index: 1; right: -1.5rem; bottom: -3.75rem; width: 21rem; display: none; grid-template-columns: auto 1fr; gap: .75rem; align-items: start;
    padding: .875rem 1rem; border-radius: var(--r-field); background: var(--surface); color: var(--text); font-size: var(--fs-xs); line-height: 1.4; box-shadow: var(--shadow-2); }
  .tower__note-icon { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: var(--r-pill); background: var(--wa); color: var(--text); }
  .tower__note-time { color: var(--text-2); font-weight: 400; }
  @media (min-width: 80em) { .tower__note { display: grid; } .hero { padding-bottom: 6rem; } }

  .hero__hours { display: inline-flex; align-items: center; gap: .5rem; color: var(--text-2); font-weight: 700; }
  .cloud-card { display: grid; gap: var(--s5); }
  .cloud-card__head { display: grid; gap: var(--s4); align-items: start; }
  @media (min-width: 48em) { .cloud-card__head { grid-template-columns: auto 1fr; } }
  @media (min-width: 64em) { .cloud-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--s7); align-items: center; } .cloud-card .table-wrap { grid-row: span 2; } }
  .helper { padding: 0; }
  .helper__toggle { display: flex; align-items: center; gap: 1rem; min-height: 5rem; padding: 1rem clamp(1.25rem, 1rem + 1vw, 2rem); list-style: none; border-radius: var(--r-card); }
  .helper__toggle::-webkit-details-marker { display: none; }
  .helper__chev { margin-left: auto; color: var(--primary); transition: transform var(--dur-2) var(--ease); }
  .helper[open] .helper__chev { transform: rotate(180deg); }
  .helper__form { padding: 0 clamp(1.25rem, 1rem + 1vw, 2rem) clamp(1.25rem, 1rem + 1vw, 2rem); }
  .helper__result:empty { display: none; }
  .have { display: grid; gap: var(--s5); }
  .have__list { list-style: none; padding: 0; display: grid; gap: var(--s4); }
  @media (min-width: 48em) { .have__list { grid-template-columns: repeat(3, 1fr); } }
  .have__list li { display: grid; grid-template-columns: auto 1fr; gap: .875rem; align-items: start; }
  .have__icon { display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: var(--r-pill); background: var(--surface); color: var(--primary); }

  /* ---------- como funciona ---------- */
  .how { counter-reset: how; display: grid; gap: var(--s5); }
  @media (min-width: 48em) { .how { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
  .how__step { display: grid; gap: var(--s3); align-content: start; }
  .how__art { aspect-ratio: 3 / 2; border-radius: var(--r-card); background: var(--sky); display: grid; place-items: center; padding: var(--s4); }
  .how__art svg { width: 100%; height: 100%; }
  .how__title { display: flex; align-items: center; gap: .75rem; font-size: var(--fs-h3); }
  .how__title::before { counter-increment: how; content: counter(how); display: grid; place-items: center; width: 2.5rem; height: 2.5rem; flex: none; border-radius: var(--r-pill); background: var(--sun); font: 700 1.25rem/1 var(--font-title); }
  .how__step p { color: var(--text-2); }
  @media (max-width: 47.99em) { .how__step { grid-template-columns: 6.5rem minmax(0, 1fr); column-gap: 1rem; row-gap: .375rem; }
    .how__art { grid-row: span 2; aspect-ratio: auto; height: 6.5rem; padding: .5rem; border-radius: var(--r-field); }
    .how__title { font-size: var(--fs-lead); gap: .5rem; } .how__title::before { width: 2rem; height: 2rem; font-size: 1rem; } }

  /* ---------- áreas internas: cabeçalho de página ---------- */
  .page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s5); }
  .page-head h1 { font-size: var(--fs-h2); }
}

/* ========================================================================== utilities */
@layer utilities {
  .visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
  .text-center { text-align: center; }
  .text-2 { color: var(--text-2); }
  .measure { max-width: var(--measure); }
  .gap-1 { --gap: var(--s1); } .gap-2 { --gap: var(--s2); } .gap-3 { --gap: var(--s3); } .gap-5 { --gap: var(--s5); } .gap-6 { --gap: var(--s6); } .gap-7 { --gap: var(--s7); }
  .mt-0 { margin-top: 0; } .mt-4 { margin-top: var(--s4); } .mt-6 { margin-top: var(--s6); }
  .full { width: 100%; }
  .nowrap { white-space: nowrap; }
  @media (max-width: 47.99em) { .hide-mobile { display: none !important; } }
  @media (min-width: 48em) { .hide-desktop { display: none !important; } }
}

/* Ajuste de 14/11/2026: sem sol e sem recortes de castelo; blocos com cantos arredondados por igual */
@layer utilities {
  .tower__sun { display: none !important; }
  .tower, .band, .pc-crown, .auth__card { border-radius: var(--r-card) !important; }
  .tower::before, .band::before, .wall::before, .pc-crown::before, .auth__card::before, .section--edge::before, .site-footer::before { display: none !important; }
  .ameias { height: 3px !important; background: var(--c) !important; border-radius: 2px; }
}

@media print {
  .site-header, .wa-float, .toasts, .demo-bar, .site-nav { display: none !important; }
  body { background: #fff; }
}
