/* Local P2 demonstration. Existing public CTAs remain the fallback. */
.plate-preview[hidden], .plate-preview [hidden] { display: none !important; }
.plate-preview { width: 100%; max-width: 572px; min-width: 0; padding: 0; border: 0; background: transparent; color: var(--text-dark); text-align: left; }
.plate-preview label { display: block; margin-bottom: 8px; font-weight: 600; }
.plate-preview__row { display: flex; align-items: stretch; gap: 12px; }
.plate-preview input[type="text"] { flex: 1 1 0; min-width: 0; width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--bright-teal-blue); border-radius: var(--radius-sm); font: inherit; text-transform: uppercase; letter-spacing: .12em; }
.plate-preview .btn { min-height: 48px; white-space: nowrap; }
.plate-preview .plate-preview__row button.btn { flex: 0 0 auto; width: auto; padding-inline: 20px; }
.plate-preview :is(input, select, button, a):focus-visible { outline: 3px solid var(--bright-teal-blue); outline-offset: 3px; }
.plate-preview button:disabled { opacity: .65; cursor: wait; }
.plate-preview__help { margin: 10px 0; font-size: .9rem; color: var(--text-muted); }
.plate-preview__status { margin: 12px 0; overflow-wrap: anywhere; }
.plate-preview__status:empty { display: none; }
.plate-preview__loading { position: fixed; inset: 0; z-index: 250; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(2, 6, 23, .55); backdrop-filter: blur(3px); }
.plate-preview__loading-panel { position: relative; display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; max-width: 384px; overflow: hidden; padding: 28px; border: 1px solid color-mix(in srgb, var(--white) 15%, transparent); border-radius: 28px; background: var(--white); color: var(--text-dark); text-align: center; box-shadow: var(--shadow-lg); }
.plate-preview__loading-panel::before { content: ''; position: absolute; inset: 0 0 auto; height: 6px; background: linear-gradient(to right, var(--frosted-blue-1), var(--turquoise-surf), var(--french-blue)); }
.plate-preview__loading-icon { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; background: radial-gradient(circle at top, var(--light-cyan), var(--white)); color: var(--bright-teal-blue); box-shadow: inset 0 2px 4px rgba(3, 4, 94, .08); }
.plate-preview__loading-icon svg { width: 32px; height: 32px; animation: plate-preview-spin 1s linear infinite; }
.plate-preview__loading-panel p { margin: 0; font-size: 1rem; font-weight: 700; }
.plate-preview__loading-panel { gap: 12px; }
.plate-preview__loading-panel .plate-preview__loading-title { color: var(--french-blue); font-size: 1.05rem; }
.plate-preview__loading-plate { display: inline-flex; flex-direction: column; align-items: stretch; min-width: 168px; overflow: hidden; border: 2px solid var(--text-dark); border-radius: 8px; background: var(--white); box-shadow: 0 6px 18px rgba(3, 4, 94, .12); }
.plate-preview__loading-plate[hidden] { display: none; }
.plate-preview__loading-plate-band { padding: 2px 0; background: var(--french-blue); color: var(--white); font-size: .6rem; font-weight: 700; letter-spacing: .2em; }
.plate-preview__loading-plate [data-preview-loading-plate-value] { padding: 4px 14px 6px; color: var(--text-dark); font-family: ui-monospace, 'Consolas', monospace; font-size: 1.6rem; font-weight: 800; letter-spacing: .12em; line-height: 1.1; }
.plate-preview__loading-panel .plate-preview__loading-text { color: var(--text-muted, #64748b); font-size: .875rem; font-weight: 500; }
@keyframes plate-preview-spin { to { transform: rotate(360deg); } }
/* Indicador de progresso essencial: gira como no app, mesmo com redução de movimento (a regra global de styles.css zeraria a duração). */
@media (prefers-reduced-motion: reduce) { .plate-preview__loading-icon svg { animation: plate-preview-spin 1s linear infinite !important; } }
.plate-preview__verification { min-height: 76px; margin: 12px 0; padding: 12px; border: 1px solid var(--frosted-blue-1); border-radius: var(--radius-sm); font-size: .9rem; }
.plate-preview__verification button { margin-top: 8px; }
.plate-preview__demo { margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--frosted-blue-1); font-size: .875rem; }
.plate-preview__demo select { width: 100%; min-height: 44px; margin-top: 8px; padding: 8px; font: inherit; color: var(--text-dark); background: var(--white); border: 1px solid var(--bright-teal-blue); border-radius: var(--radius-sm); }
.plate-preview__trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.plate-preview dialog { width: min(460px, calc(100% - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 24px; border: 1px solid var(--frosted-blue-1); border-radius: var(--radius); color: var(--text-dark); background: var(--white); overflow: auto; }
.plate-preview dialog::backdrop { background: rgba(3, 4, 94, .45); }
.plate-preview dialog p { margin-bottom: 16px; }
@media (max-width: 390px) { .plate-preview__row { gap: 8px; } .plate-preview .plate-preview__row button.btn { padding-inline: 16px; } }

/* Approved preview layout. The demonstration remains local and opt-in. */
.plate-preview .plate-preview__verification--live { min-height: 0; margin: 0; padding: 0; border: 0; background: transparent; }
.plate-preview__verification--live > div, .plate-preview__visible-widget { display: grid; justify-items: center; margin-top: 12px; }
.plate-preview__verification--live > div:empty { margin-top: 0; }
.plate-preview-layout .hero-grid { min-width: 0; column-gap: 48px; row-gap: 16px; }
.plate-preview-layout .hero-copy { min-width: 0; align-self: end; }
.plate-preview-layout .hero-copy .hero-lead { margin-bottom: 0; }
.plate-preview-layout .hero-cta-group { display: flex; flex-direction: column; align-items: flex-start; align-self: start; gap: 12px; min-width: 0; }
.plate-preview-layout .plate-preview { max-width: 500px; }
.plate-preview-layout .plate-preview > label { margin-bottom: 10px; font-size: 1rem; font-weight: 600; line-height: 1.4; }
.plate-preview-layout .plate-preview__row { flex-wrap: wrap; gap: 8px; padding: 6px; border: 1px solid color-mix(in srgb, var(--french-blue) 65%, var(--white)); border-radius: calc(var(--radius) + 6px); background: var(--white); box-shadow: var(--shadow-sm); transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease); }
.plate-preview-layout .plate-preview__row:focus-within { border-color: var(--french-blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--french-blue) 15%, transparent); }
.plate-preview-layout .plate-preview input[data-preview-plate] { flex: 1 1 6.5em; min-height: 50px; padding: 10px 12px; border: 0; border-radius: var(--radius); color: var(--text-dark); background: transparent; font-size: 1.125rem; font-weight: 500; letter-spacing: .1em; }
.plate-preview-layout .plate-preview input[data-preview-plate]::placeholder { color: var(--text-muted); opacity: 1; }
.plate-preview-layout .plate-preview .plate-preview__row button.btn { min-height: 50px; max-width: 100%; width: auto; padding: 12px 22px; border-radius: var(--radius); background: var(--french-blue); box-shadow: var(--shadow-sm); font-size: 1rem; font-weight: 600; line-height: 1.4; white-space: normal; transform: none; }
.plate-preview-layout .plate-preview .plate-preview__row button.btn:hover:not(:disabled) { background: var(--bright-teal-blue); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.plate-preview-layout .plate-preview .plate-preview__row button.btn:active:not(:disabled) { transform: translateY(0); box-shadow: none; }
.plate-preview-layout .plate-preview :is(input, button, a):focus-visible { outline: 2px solid var(--french-blue); outline-offset: 2px; }
.plate-preview-layout .plate-preview input[aria-invalid="true"] { outline: 2px solid var(--french-blue); outline-offset: -2px; }
.plate-preview-layout .plate-preview__status { margin: 12px 0 0; font-size: 1rem; line-height: 1.5; }
.plate-preview-layout .plate-preview [data-preview-challenge],
.plate-preview-layout .plate-preview [data-preview-signup],
.plate-preview-layout .plate-preview [data-preview-buy] { margin-top: 12px; font-size: 1rem; line-height: 1.5; }
.plate-preview-layout .plate-preview a { color: var(--french-blue); text-decoration: underline; text-underline-offset: 3px; }
.plate-preview-layout .preview-secondary { display: inline-flex; align-items: center; justify-content: center; width: fit-content; max-width: 100%; min-height: 44px; padding: 10px 18px; border: 1px solid var(--french-blue); border-radius: var(--radius); background: var(--white); color: var(--french-blue); font-size: 1rem; font-weight: 600; line-height: 1.4; text-decoration: none; transition: background-color 180ms var(--ease); }
.plate-preview-layout .preview-secondary:hover { background: var(--light-cyan); text-decoration: none; }
.plate-preview-layout .preview-secondary:focus-visible { outline: 2px solid var(--french-blue); outline-offset: 4px; border-radius: var(--radius-sm); }
.plate-preview-layout:has([data-plate-preview]:not([hidden])) [data-preview-fallback] { display: none; }
.plate-preview-layout--placa .hero-grid { row-gap: 16px; }
.plate-preview-layout--placa .hero-copy { align-self: end; }
.plate-preview-layout--placa .hero-cta-group { align-self: start; }
.plate-preview-layout--placa .plate-preview { margin-top: 0; }
.plate-preview-layout .plate-preview dialog { width: min(420px, calc(100% - 40px)); padding: 24px; border-color: var(--french-blue); border-radius: calc(var(--radius) + 4px); box-shadow: var(--shadow-lg); }
.plate-preview-layout .plate-preview dialog::backdrop { background: color-mix(in srgb, var(--deep-twilight) 32%, transparent); }
.plate-preview-layout .plate-preview dialog p { line-height: 1.6; }
.plate-preview-layout .plate-preview dialog .btn { border-radius: var(--radius); background: var(--french-blue); box-shadow: var(--shadow-sm); }
.plate-preview__expired-title { font-size: 1.125rem; font-weight: 700; }
.plate-preview__expired-progress { height: 4px; margin: 0 0 20px; overflow: hidden; border-radius: var(--radius); background: var(--light-cyan); }
.plate-preview__expired-progress span { display: block; width: 100%; height: 100%; transform-origin: left; background: var(--french-blue); }
@media (max-width: 820px) {
  .plate-preview-layout .hero-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: none; text-align: left; gap: 0; }
  .plate-preview-layout .hero-copy { display: block; grid-area: auto; text-align: left; }
  .plate-preview-layout .hero-copy .eyebrow { margin-bottom: 16px; }
  .plate-preview-layout .hero-copy h1 { margin-bottom: 18px; }
  .plate-preview-layout .hero-copy .hero-lead { margin: 0; }
  .plate-preview-layout .hero .hero-grid:has(.hero-cta-group) .hero-cta-group { grid-area: auto; order: 0; align-items: flex-start; margin: 16px 0 0; gap: 10px; }
  .plate-preview-layout .hero .hero-grid:has(.hero-cta-group) .hero-media,
  .plate-preview-layout--placa .hero-grid .hero-media { grid-area: auto; order: 0; margin: 28px 0 0; }
  .plate-preview-layout--placa .plate-preview { margin-top: 0; }
  .plate-preview-layout .plate-preview__row { gap: 6px; }
  .plate-preview-layout .plate-preview input[data-preview-plate] { font-size: 1rem; padding-inline: 8px; }
  .plate-preview-layout .plate-preview .plate-preview__row button.btn { padding-inline: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .plate-preview-layout .plate-preview__row,
  .plate-preview-layout .plate-preview .plate-preview__row button.btn { transition: none; }
}

/* Verificação adicional: só o quadro do Cloudflare fica visível. */
.plate-preview__sr { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* Card de limite atingido: convite para criar conta ou entrar. */
.plate-preview-layout .plate-preview .plate-preview__account { position: relative; display: grid; justify-items: center; gap: 6px; margin-top: 16px; overflow: hidden; padding: 26px 20px 20px; border: 1px solid var(--frosted-blue-1); border-radius: calc(var(--radius) + 6px); background: var(--white); box-shadow: var(--shadow-md); color: var(--text-dark); text-align: center; }
.plate-preview__account::before { content: ''; position: absolute; inset: 0 0 auto; height: 5px; background: linear-gradient(to right, var(--frosted-blue-1), var(--turquoise-surf), var(--french-blue)); }
.plate-preview__account-icon { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; margin-bottom: 4px; border-radius: 50%; background: radial-gradient(circle at top, var(--light-cyan), var(--white)); color: var(--bright-teal-blue); box-shadow: inset 0 2px 4px rgba(3, 4, 94, .08); }
.plate-preview__account-icon svg { width: 26px; height: 26px; }
.plate-preview-layout .plate-preview .plate-preview__account-title { margin: 0; font-size: 1.1rem; font-weight: 700; line-height: 1.35; }
.plate-preview__account-title:focus { outline: none; }
.plate-preview-layout .plate-preview .plate-preview__account-text { margin: 0; color: var(--text-muted); font-size: .95rem; line-height: 1.5; }
.plate-preview__account-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; width: 100%; margin-top: 12px; }
.plate-preview-layout .plate-preview .plate-preview__account-actions .btn { flex: 1 1 170px; min-height: 48px; padding: 12px 20px; text-decoration: none; white-space: normal; }
.plate-preview-layout .plate-preview .plate-preview__account-actions .btn-primary { color: var(--white); }
.plate-preview-layout .plate-preview .plate-preview__account-actions .btn-outline:hover { color: var(--white); }

/* Popup da prévia (placa não localizada / prévia indisponível). Mesma linguagem do loader "Consultando a placa". */
.plate-preview dialog.plate-preview__dialog,
.plate-preview-layout .plate-preview dialog.plate-preview__dialog { position: fixed; width: min(400px, calc(100% - 32px)); padding: 34px 28px 24px; border: 0; border-radius: 28px; background: var(--white); color: var(--text-dark); text-align: center; overflow: hidden auto; box-shadow: 0 24px 80px rgba(2, 62, 138, .28), 0 2px 6px rgba(3, 4, 94, .06); }
.plate-preview dialog.plate-preview__dialog[open] { display: flex; flex-direction: column; align-items: center; gap: 12px; animation: plate-preview-dialog-in 220ms var(--ease, ease-out); }
.plate-preview dialog.plate-preview__dialog::before { content: ''; position: absolute; inset: 0 0 auto; height: 6px; background: linear-gradient(to right, var(--frosted-blue-1), var(--turquoise-surf), var(--french-blue)); }
.plate-preview dialog.plate-preview__dialog::backdrop,
.plate-preview-layout .plate-preview dialog.plate-preview__dialog::backdrop { background: rgba(2, 6, 23, .55); backdrop-filter: blur(3px); }
.plate-preview__dialog-icon { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; margin-bottom: 2px; border-radius: 50%; background: radial-gradient(circle at top, var(--light-cyan), var(--white)); color: var(--french-blue); box-shadow: inset 0 2px 4px rgba(3, 4, 94, .08), 0 0 0 6px color-mix(in srgb, var(--light-cyan) 45%, transparent); }
.plate-preview__dialog-icon svg { width: 30px; height: 30px; }
.plate-preview__dialog-icon svg[hidden] { display: none; }
.plate-preview dialog.plate-preview__dialog p { margin: 0; }
.plate-preview dialog.plate-preview__dialog .plate-preview__dialog-title { color: var(--french-blue); font-size: 1.2rem; font-weight: 800; line-height: 1.3; letter-spacing: -.01em; }
.plate-preview__dialog-plate { margin: 2px 0; }
.plate-preview__dialog-plate-value { padding: 4px 14px 6px; color: var(--text-dark); font-family: ui-monospace, 'Consolas', monospace; font-size: 1.6rem; font-weight: 800; letter-spacing: .12em; line-height: 1.1; }
.plate-preview dialog.plate-preview__dialog .plate-preview__dialog-text { max-width: 32ch; color: var(--text-muted, #64748b); font-size: .95rem; line-height: 1.6; }
.plate-preview dialog.plate-preview__dialog .plate-preview__dialog-hint { padding: 8px 14px; border: 1px solid var(--frosted-blue-1); border-radius: 999px; background: color-mix(in srgb, var(--light-cyan) 55%, var(--white)); color: var(--french-blue); font-size: .8rem; line-height: 1.4; }
.plate-preview dialog.plate-preview__dialog .plate-preview__dialog-hint[hidden] { display: none; }
.plate-preview dialog.plate-preview__dialog .plate-preview__dialog-hint strong { font-family: ui-monospace, 'Consolas', monospace; letter-spacing: .06em; }
.plate-preview dialog.plate-preview__dialog .plate-preview__dialog-button,
.plate-preview-layout .plate-preview dialog.plate-preview__dialog .plate-preview__dialog-button { width: 100%; min-height: 48px; margin-top: 10px; border: 0; border-radius: 14px; background: linear-gradient(to right, var(--french-blue), var(--bright-teal-blue)); color: var(--white); font-size: 1rem; font-weight: 600; box-shadow: 0 8px 20px color-mix(in srgb, var(--bright-teal-blue) 28%, transparent); transition: filter 180ms var(--ease, ease), box-shadow 180ms var(--ease, ease); }
.plate-preview dialog.plate-preview__dialog .plate-preview__dialog-button:hover { filter: brightness(1.08); box-shadow: 0 10px 24px color-mix(in srgb, var(--bright-teal-blue) 36%, transparent); }
.plate-preview dialog.plate-preview__dialog .plate-preview__dialog-button:focus-visible { outline: 3px solid color-mix(in srgb, var(--bright-teal-blue) 45%, transparent); outline-offset: 3px; }
@keyframes plate-preview-dialog-in { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
