/* ==========================================================================
   iLoveXML — Design System (rebrand 2026-11)
   Um único CSS para o site público. Tema claro, leitura confortável,
   verde da marca como cor de ação, azul para links, navy para o Pro.
   ========================================================================== */

:root {
    --ink: #0b1324;
    --ink-2: #1e293b;
    --text: #334155;
    --muted: #64748b;
    --line: #e2e8f0;
    --line-2: #cbd5e1;
    --bg: #ffffff;
    --bg-soft: #f6f8fb;
    --bg-soft-2: #eef2f7;

    --brand: #0e9f6e;
    --brand-600: #0b8a5f;
    --brand-700: #05603a;
    --brand-soft: #e7f6ee;
    --brand-ring: rgba(14, 159, 110, .28);

    --link: #1d5bd8;
    --navy: #0b1730;
    --navy-2: #13254a;

    --ok: #0e9f6e;
    --warn: #b45309;
    --warn-soft: #fff7e6;
    --err: #c62828;
    --err-soft: #fdecec;
    --info-soft: #eaf1ff;

    --radius: 14px;
    --radius-sm: 10px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
    --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px rgba(15, 23, 42, .07);
    --shadow-lg: 0 2px 6px rgba(15, 23, 42, .06), 0 24px 60px rgba(15, 23, 42, .12);

    --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
    --container: 1180px;
    --header-h: 64px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
    margin: 0;
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.015em; font-weight: 800; }
h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); letter-spacing: -.02em; }
h3 { font-size: 1.18rem; font-weight: 700; }
h4 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 1em; }
h1:focus { outline: none; }
code, kbd { font-family: var(--mono); font-size: .9em; background: var(--bg-soft-2); padding: .1em .4em; border-radius: 6px; color: var(--ink-2); }
:focus-visible { outline: 3px solid var(--brand-ring); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--brand-soft); color: var(--brand-700); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 820px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 1000; }
.skip-link:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.center { text-align: center; }
.mt-0 { margin-top: 0 !important; }

/* ---------- Marca ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; font-size: 1.18rem; letter-spacing: -.02em; text-decoration: none !important; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand b { color: var(--brand); font-weight: 800; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav > a, .nav-dd > summary {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px;
    color: var(--ink-2); font-weight: 600; font-size: .95rem; cursor: pointer; list-style: none; text-decoration: none;
}
.nav > a:hover, .nav-dd > summary:hover, .nav-dd[open] > summary { background: var(--bg-soft); text-decoration: none; }
.nav > a[aria-current="page"] { color: var(--brand-700); }
.nav-dd { position: relative; }
.nav-dd > summary::-webkit-details-marker { display: none; }
.nav-dd > summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); opacity: .6; }
.nav-panel {
    position: absolute; top: calc(100% + 8px); left: 0; min-width: 340px; padding: 8px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.nav-panel a { display: flex; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.nav-panel a:hover { background: var(--bg-soft); }
.nav-panel strong { display: block; font-size: .94rem; }
.nav-panel span { display: block; font-size: .83rem; color: var(--muted); line-height: 1.4; }
.nav-ico { width: 36px; height: 36px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-700); }
.nav-ico.pro { background: var(--navy); color: #7ee2b8; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.menu-toggle { display: none; }

@media (max-width: 960px) {
    .site-header .container { gap: 12px; }
    .nav, .header-actions .hide-sm { display: none; }
    .menu-toggle { display: block; margin-left: auto; }
    .menu-toggle > summary { list-style: none; cursor: pointer; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; font-weight: 700; color: var(--ink); }
    .menu-toggle > summary::-webkit-details-marker { display: none; }
    .mobile-menu { position: fixed; inset: var(--header-h) 0 0 0; background: #fff; overflow-y: auto; padding: 16px 20px 40px; border-top: 1px solid var(--line); }
    .mobile-menu h3 { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 18px 0 6px; }
    .mobile-menu a { display: block; padding: 12px 4px; color: var(--ink); font-weight: 600; border-bottom: 1px solid var(--bg-soft-2); }
    .mobile-menu .btn { margin-top: 18px; }
}
@media (min-width: 961px) { .mobile-menu { display: none; } }

/* ---------- Botões ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 18px; border-radius: 12px; border: 1px solid transparent;
    font: 700 .96rem/1.2 var(--sans); cursor: pointer; text-decoration: none !important;
    transition: background .15s, border-color .15s, box-shadow .15s, transform .05s;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 6px 16px rgba(14, 159, 110, .28); }
.btn-primary:hover { background: var(--brand-600); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-2); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink-2); background: var(--bg-soft); }
.btn-link { background: none; border: 0; color: var(--link); padding: 6px 4px; font-weight: 600; }
.btn-sm { padding: 8px 12px; font-size: .88rem; border-radius: 10px; }
.btn-lg { padding: 15px 24px; font-size: 1.05rem; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-white { background: #fff; color: var(--navy); }
.btn-white:hover { background: #eafff5; }

/* ---------- Pills / badges ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-700); margin-bottom: 14px; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--bg-soft-2); color: var(--ink-2); }
.badge-brand { background: var(--brand-soft); color: var(--brand-700); }
.badge-pro { background: var(--navy); color: #7ee2b8; }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.trust-row { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0; margin: 18px 0 0; list-style: none; font-size: .93rem; color: var(--ink-2); font-weight: 600; }
.trust-row li { display: inline-flex; align-items: center; gap: 7px; }
.trust-row li::before { content: ""; width: 18px; height: 18px; border-radius: 50%; background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%230b8a5f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }

/* ---------- Breadcrumbs ---------- */
.crumbs { font-size: .86rem; color: var(--muted); margin-bottom: 18px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.crumbs li + li::before { content: "›"; margin-right: 6px; color: var(--line-2); }
.crumbs a { color: var(--muted); }
.crumbs [aria-current] { color: var(--ink-2); font-weight: 600; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 44px 0 56px; background:
    radial-gradient(900px 420px at 85% -10%, rgba(14,159,110,.10), transparent 60%),
    radial-gradient(700px 360px at -10% 10%, rgba(29,91,216,.07), transparent 60%),
    linear-gradient(#fff, var(--bg-soft)); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: start; }
.hero h1 { margin-bottom: 16px; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero .lead { font-size: 1.15rem; color: var(--text); max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.hero-simple { padding: 40px 0 36px; }
.hero-simple .lead { max-width: 760px; }
@media (max-width: 960px) {
    .hero { padding: 28px 0 40px; }
    .hero-grid { grid-template-columns: 1fr; gap: 28px; }
    .hero .lead { font-size: 1.05rem; }
}

/* ---------- Seções ---------- */
.section { padding: 72px 0; }
.section-sm { padding: 48px 0; }
.section-alt { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 720px; margin: 0 auto 40px; text-align: center; }
.section-head p { font-size: 1.08rem; color: var(--muted); margin: 0; }
.section-head.left { margin-left: 0; text-align: left; }
@media (max-width: 720px) { .section { padding: 52px 0; } }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }
a.card { display: block; color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
a.card:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-2px); }
.card .more { display: inline-block; margin-top: 12px; color: var(--link); font-weight: 700; }
.card-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-700); display: grid; place-items: center; margin-bottom: 14px; }
.card-pro { background: linear-gradient(160deg, var(--navy), var(--navy-2)); border-color: var(--navy); color: #cbd5e1; }
.card-pro h3 { color: #fff; }
.card-pro .card-ico { background: rgba(126, 226, 184, .14); color: #7ee2b8; }
.card-pro .more { color: #7ee2b8; }

.check-list { list-style: none; padding: 0; margin: 0 0 1em; }
.check-list li { position: relative; padding: 5px 0 5px 28px; }
.check-list li::before { content: ""; position: absolute; left: 0; top: 9px; width: 18px; height: 18px; border-radius: 50%; background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%230b8a5f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }
.check-list li.no { color: var(--muted); }
.check-list li.no::before { background: var(--bg-soft-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M5 5l6 6M11 5l-6 6' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center/12px no-repeat; }
.card-pro .check-list li::before { background-color: rgba(126, 226, 184, .16); }

/* Passos numerados */
.steps { display: grid; grid-template-columns: repeat(var(--n, 3), 1fr); gap: 20px; counter-reset: passo; list-style: none; padding: 0; margin: 0; }
.steps > li { counter-increment: passo; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.steps > li::before { content: counter(passo); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 800; margin-bottom: 12px; }
.steps h3 { font-size: 1.05rem; margin-bottom: 6px; }
.steps p { margin: 0; font-size: .95rem; }
@media (max-width: 960px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* Split (texto + destaque) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 28px; } }

/* Faixa de estatísticas */
.stats { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 26px; }
.stat strong { display: block; font-size: 1.7rem; color: var(--ink); font-weight: 800; letter-spacing: -.02em; }
.stat span { font-size: .88rem; color: var(--muted); }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 60%, #0d3b37 100%); color: #cbd5e1; border-radius: var(--radius-lg); padding: 44px; display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; }
.cta-band h2 { color: #fff; margin-bottom: 8px; }
.cta-band p { margin: 0; font-size: 1.05rem; }
.cta-band .price-hint { color: #7ee2b8; font-weight: 700; }
.cta-band-actions { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
@media (max-width: 820px) { .cta-band { grid-template-columns: 1fr; padding: 30px 24px; } }

.pro-strip { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 22px; border-radius: var(--radius); background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #cbd5e1; margin-top: 20px; text-decoration: none !important; }
.pro-strip strong { color: #fff; display: block; font-size: 1.02rem; }
.pro-strip span { font-size: .92rem; }
.pro-strip .btn { flex: none; }
@media (max-width: 640px) { .pro-strip { flex-direction: column; align-items: flex-start; } }

/* ---------- FAQ ---------- */
.faq { max-width: 860px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.faq summary { list-style: none; cursor: pointer; padding: 16px 52px 16px 20px; font-weight: 700; color: var(--ink); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--brand); font-weight: 500; }
.faq details[open] summary::after { content: "–"; }
.faq details[open] { border-color: var(--brand-ring); box-shadow: var(--shadow-sm); }
.faq .faq-a { padding: 0 20px 18px; }
.faq .faq-a p:last-child { margin-bottom: 0; }

/* ---------- Prosa (guias/artigos) ---------- */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
.article-aside { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 16px; }
.toc { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: #fff; }
.toc strong { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 18px; font-size: .9rem; }
.toc li { margin: 6px 0; }
.toc a { color: var(--ink-2); }
@media (max-width: 1000px) { .article-layout { grid-template-columns: 1fr; } .article-aside { position: static; } }

.prose { color: var(--text); font-size: 1.04rem; }
.prose > * + * { margin-top: 0; }
.prose h2 { margin-top: 2.2em; padding-top: .2em; font-size: clamp(1.35rem, 2.3vw, 1.7rem); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--brand); }
.prose strong { color: var(--ink-2); }
.prose a { text-decoration: underline; text-decoration-color: rgba(29, 91, 216, .35); text-underline-offset: 3px; }
.prose blockquote { margin: 1.4em 0; padding: 14px 18px; border-left: 4px solid var(--brand); background: var(--brand-soft); border-radius: 0 10px 10px 0; color: var(--ink-2); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose .updated { font-size: .88rem; color: var(--muted); }

.table-wrap { overflow-x: auto; margin: 1.2em 0 1.6em; border: 1px solid var(--line); border-radius: var(--radius-sm); -webkit-overflow-scrolling: touch; }
.table-wrap table, table.table { width: 100%; border-collapse: collapse; font-size: .94rem; background: #fff; }
.table-wrap th, .table-wrap td, table.table th, table.table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-wrap th, table.table th { background: var(--bg-soft); color: var(--ink); font-weight: 700; font-size: .86rem; white-space: nowrap; }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap td:first-child code { white-space: nowrap; }

.callout { display: flex; gap: 14px; padding: 16px 18px; border-radius: var(--radius-sm); background: var(--info-soft); border: 1px solid #cfdcff; color: var(--ink-2); margin: 1.4em 0; }
.callout.ok { background: var(--brand-soft); border-color: #bfe8d4; }
.callout.warn { background: var(--warn-soft); border-color: #f6d9a8; }
.callout p:last-child { margin: 0; }
.callout-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 20px 22px; border-radius: var(--radius); background: var(--brand-soft); border: 1px solid #bfe8d4; margin: 1.8em 0; }
.callout-cta strong { color: var(--ink); display: block; }
.callout-cta.pro { background: linear-gradient(135deg, var(--navy), var(--navy-2)); border-color: var(--navy); color: #cbd5e1; }
.callout-cta.pro strong { color: #fff; }

/* Tabela de códigos de rejeição */
.code-table td:first-child { font-family: var(--mono); font-weight: 700; color: var(--err); white-space: nowrap; }
.code-table tr.warn td:first-child { color: var(--warn); }
.code-table tr.ok td:first-child { color: var(--ok); }
.code-filter { width: 100%; max-width: 420px; }

/* ---------- Ferramenta (cards de app) ---------- */
.tool { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.tool-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); background: linear-gradient(#fff, #fbfcfe); }
.tool-head h2 { font-size: 1.12rem; margin: 0; letter-spacing: -.01em; }
.tool-head .sub { font-size: .84rem; color: var(--muted); }
.tool-body { padding: 22px; }
.tool-foot { padding: 14px 22px; border-top: 1px solid var(--line); background: var(--bg-soft); font-size: .86rem; color: var(--muted); display: flex; gap: 8px; align-items: center; }

.stepper { display: flex; gap: 6px; margin-bottom: 18px; list-style: none; padding: 0; }
.stepper li { flex: 1; display: flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 700; color: var(--muted); padding: 8px 10px; border-radius: 10px; background: var(--bg-soft); }
.stepper li span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 1px solid var(--line-2); font-size: .74rem; flex: none; }
.stepper li.done { color: var(--brand-700); background: var(--brand-soft); }
.stepper li.done span { background: var(--brand); border-color: var(--brand); color: #fff; }
.stepper li.now { color: var(--ink); background: #fff; box-shadow: inset 0 0 0 1.5px var(--brand); }
.stepper li.now span { border-color: var(--brand); color: var(--brand-700); }
@media (max-width: 480px) { .stepper li { font-size: 0; gap: 0; justify-content: center; } .stepper li span { font-size: .74rem; } }

.status-dot { display: inline-flex; align-items: center; gap: 7px; font-size: .8rem; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: var(--bg-soft-2); color: var(--muted); white-space: nowrap; }
.status-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-dot.ok { background: var(--brand-soft); color: var(--brand-700); }
.status-dot.wait { background: var(--warn-soft); color: var(--warn); }
.status-dot.wait::before { animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* Formulários */
.field { margin-bottom: 16px; }
.field > label, .label { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-weight: 700; font-size: .9rem; color: var(--ink); margin-bottom: 6px; }
.label-hint { font-weight: 500; color: var(--muted); font-size: .82rem; }
.input {
    width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line-2); background: #fff;
    font: 500 1rem/1.3 var(--sans); color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: #94a3b8; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-ring); }
.input:disabled { background: var(--bg-soft); color: var(--muted); cursor: not-allowed; }
.input.mono { font-family: var(--mono); letter-spacing: .02em; }
.input-lg { padding: 15px 16px; font-size: 1.05rem; }
textarea.input { resize: vertical; min-height: 120px; }
select.input { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") right 12px center/14px no-repeat; padding-right: 36px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row.r-2-1 { grid-template-columns: 2fr 1fr; }
.field-row.r-1-2 { grid-template-columns: 1fr 2fr; }
@media (max-width: 520px) { .field-row, .field-row.r-2-1, .field-row.r-1-2 { grid-template-columns: 1fr; } }
.counter { font-family: var(--mono); font-size: .8rem; font-weight: 700; color: var(--muted); }
.counter.ok { color: var(--brand-700); }
.hint { font-size: .84rem; color: var(--muted); margin: 6px 0 0; }
.input-wrap { position: relative; }
.input-wrap .counter { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: #fff; padding-left: 6px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--bg-soft-2); border-radius: 12px; }
.seg button { border: 0; background: transparent; padding: 9px; border-radius: 9px; font: 700 .92rem var(--sans); color: var(--muted); cursor: pointer; }
.seg button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.actions .btn-primary { flex: 1; min-width: 180px; }
.optional { border: 1px dashed var(--line-2); border-radius: 12px; padding: 0 14px; margin-bottom: 16px; }
.optional > summary { cursor: pointer; padding: 12px 0; font-weight: 700; color: var(--ink-2); font-size: .92rem; }
.optional[open] { padding-bottom: 4px; }
.pw-rules { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; padding: 0; list-style: none; }
.pw-rules li { font-size: .76rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--bg-soft-2); color: var(--muted); }
.pw-rules li.ok { background: var(--brand-soft); color: var(--brand-700); }

/* Alertas */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: .93rem; margin-bottom: 16px; border: 1px solid transparent; }
.alert-err { background: var(--err-soft); color: #8e1c1c; border-color: #f6caca; }
.alert-ok { background: var(--brand-soft); color: var(--brand-700); border-color: #bfe8d4; }
.alert-warn { background: var(--warn-soft); color: #7c3d06; border-color: #f6d9a8; }
.alert-info { background: var(--info-soft); color: #1e3a8a; border-color: #cfdcff; }
.alert .x { margin-left: auto; background: none; border: 0; font-size: 1.1rem; line-height: 1; color: inherit; cursor: pointer; opacity: .7; }

/* Certificados */
.cert-search { display: flex; gap: 8px; margin-bottom: 10px; }
.cert-list { display: grid; gap: 6px; max-height: 280px; overflow-y: auto; padding: 2px; }
.cert-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; font: inherit; color: inherit; }
.cert-item:hover { border-color: var(--brand); background: var(--brand-soft); }
.avatar { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--navy); color: #7ee2b8; font-weight: 800; }
.cert-data { min-width: 0; display: grid; }
.cert-data strong { color: var(--ink); font-size: .94rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cert-data span { font-size: .8rem; color: var(--muted); font-family: var(--mono); }
.cert-active { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--brand-soft); border: 1.5px solid #bfe8d4; margin-bottom: 18px; }
.cert-active .btn { margin-left: auto; }
.empty { padding: 18px; text-align: center; color: var(--muted); font-size: .92rem; background: var(--bg-soft); border-radius: 12px; }

.agent-box { text-align: center; padding: 6px 4px 4px; }
.agent-box .card-ico { margin: 0 auto 12px; width: 52px; height: 52px; }
.agent-box h3 { margin-bottom: 6px; }
.agent-box p { font-size: .95rem; margin-bottom: 16px; }
.agent-box ol { text-align: left; font-size: .9rem; margin: 16px 0 0; padding-left: 20px; color: var(--text); }
.agent-box ol li { margin: 4px 0; }

/* Progresso */
.progress { margin-top: 14px; }
.progress-track { height: 8px; border-radius: 999px; background: var(--bg-soft-2); overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--brand), #34d399); border-radius: 999px; transition: width .3s; }
.progress p { font-size: .85rem; color: var(--muted); margin: 8px 0 0; }
.spin { display: inline-block; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -3px; }
.spin-lg { width: 34px; height: 34px; border-width: 3px; color: var(--brand); }
@keyframes spin { to { transform: rotate(360deg); } }

.success { text-align: center; padding: 6px 0 2px; }
.success-ico { width: 56px; height: 56px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-700); display: grid; place-items: center; margin: 0 auto 12px; }
.success h3 { margin-bottom: 4px; }
.success .key { font-family: var(--mono); font-size: .8rem; color: var(--muted); word-break: break-all; margin-bottom: 16px; }

/* Dropzone + lista de arquivos */
.dropzone { position: relative; display: grid; place-items: center; text-align: center; gap: 6px; padding: 34px 20px; border: 2px dashed var(--line-2); border-radius: var(--radius); background: var(--bg-soft); transition: border-color .15s, background .15s; }
.dropzone.over { border-color: var(--brand); background: var(--brand-soft); }
.dropzone h3 { margin: 6px 0 0; font-size: 1.1rem; }
.dropzone p { margin: 0 0 10px; color: var(--muted); font-size: .9rem; }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone input[type=file]:disabled { cursor: not-allowed; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 0 10px; }
.toolbar-count { font-size: .9rem; color: var(--muted); font-weight: 600; }
.toolbar-count .ok { color: var(--brand-700); }
.toolbar-count .err { color: var(--err); }
.toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.file-list { display: grid; gap: 6px; max-height: 420px; overflow-y: auto; }
.file { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.file.is-ok { border-color: #bfe8d4; }
.file.is-err { border-color: #f6caca; background: #fffafa; }
.file-ico { color: var(--muted); flex: none; }
.file.is-ok .file-ico { color: var(--brand); }
.file-data { min-width: 0; flex: 1; display: grid; }
.file-name { font-size: .9rem; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-status { font-size: .8rem; color: var(--muted); }
.file-status.ok { color: var(--brand-700); }
.file-status.err { color: var(--err); }
.file-actions { display: flex; gap: 6px; flex: none; }

/* ---------- Preços ---------- */
.pricing { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: stretch; }
@media (max-width: 1080px) { .pricing { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .pricing { grid-template-columns: 1fr; } }
.plan { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px 22px; box-shadow: var(--shadow-sm); }
.plan h3 { font-size: 1.2rem; margin-bottom: 4px; }
.plan .for { font-size: .9rem; color: var(--muted); min-height: 3em; margin-bottom: 14px; }
.plan .price { display: flex; align-items: baseline; gap: 4px; color: var(--ink); margin-bottom: 4px; }
.plan .price small { font-size: 1rem; font-weight: 700; }
.plan .price strong { font-size: 2.3rem; font-weight: 800; letter-spacing: -.03em; }
.plan .price span { color: var(--muted); font-weight: 600; }
.plan .per { font-size: .85rem; color: var(--brand-700); font-weight: 700; margin-bottom: 18px; }
.plan .check-list { flex: 1; font-size: .94rem; }
.plan-featured { border: 2px solid var(--brand); box-shadow: var(--shadow-lg); }
.plan-featured::before { content: "Mais escolhido"; position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff; font-size: .75rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; white-space: nowrap; }
.guarantee { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; margin-top: 26px; color: var(--ink-2); font-weight: 600; font-size: .93rem; list-style: none; padding: 0; }
.guarantee li::before { content: "✓ "; color: var(--brand); font-weight: 800; }

.compare { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: .95rem; }
.compare th, .compare td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: center; }
.compare th:first-child, .compare td:first-child { text-align: left; color: var(--ink-2); }
.compare thead th { background: var(--bg-soft); color: var(--ink); }
.compare thead th.hl { background: var(--brand); color: #fff; }
.compare td.hl { background: #f3fbf7; font-weight: 700; color: var(--brand-700); }
.compare tr:last-child td { border-bottom: 0; }

/* ---------- Auth ---------- */
.auth-wrap { min-height: calc(100vh - var(--header-h)); display: grid; place-items: start center; padding: 40px 20px 60px; background:
    radial-gradient(700px 300px at 50% -60px, rgba(14,159,110,.10), transparent 70%), var(--bg-soft); }
.auth-card { width: 100%; max-width: 480px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 30px; }
.auth-card.wide { max-width: 640px; }
.auth-card h1 { font-size: 1.6rem; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); margin-bottom: 22px; }
.auth-foot { text-align: center; font-size: .93rem; color: var(--muted); margin: 18px 0 0; }
.auth-aside { width: 100%; max-width: 480px; margin-top: 16px; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 18px; font-size: .86rem; color: var(--muted); list-style: none; padding: 0; }
.auth-aside li::before { content: "🔒 "; }
.order-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; background: var(--bg-soft); margin-bottom: 18px; }
.order-box .row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.order-box .total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; font-weight: 800; color: var(--ink); }
.auth-header .container { justify-content: space-between; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #94a3b8; padding: 56px 0 28px; margin-top: 0; }
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.footer-grid h2 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .93rem; }
.site-footer .brand { color: #fff; }
.site-footer .brand b { color: #7ee2b8; }
.footer-about { font-size: .93rem; margin: 14px 0 0; max-width: 340px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid rgba(148, 163, 184, .18); margin-top: 40px; padding-top: 20px; font-size: .85rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Cookie bar ---------- */
.cookie-bar { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 200; max-width: 760px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); font-size: .9rem; }
.cookie-bar p { margin: 0; flex: 1; min-width: 240px; }
.cookie-bar .actions { flex: none; }
.cookie-bar[hidden] { display: none; }

/* ---------- Blazor ---------- */
#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000; padding: 12px 20px; background: #fff7e6; border-top: 1px solid #f6d9a8; color: #7c3d06; box-shadow: 0 -4px 16px rgba(0,0,0,.08); }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 16px; top: 10px; }
.blazor-error-boundary { background: var(--err-soft); color: #8e1c1c; padding: 1rem; border-radius: 12px; }
.blazor-error-boundary::after { content: "Ocorreu um erro inesperado. Recarregue a página."; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 80px 0; }
.notfound .code { font-size: 5rem; font-weight: 800; color: var(--brand); letter-spacing: -.04em; line-height: 1; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .site-footer, .cookie-bar, .cta-band, .pro-strip { display: none !important; } }

/* ---------- Blocos de conteúdo dos guias (DANFE, Rejeições) ---------- */
.guide .guide-block { margin: 0 0 2.6em; }
.guide .guide-head h2 { margin-top: 0; margin-bottom: .3em; }
.guide .lead-sm { color: var(--muted); font-size: 1rem; margin-bottom: 1.2em; }
.req-grid, .query-grid, .compare-grid, .steps-grid { display: grid; gap: 12px; margin: 1em 0 1.4em; }
.req-grid { grid-template-columns: repeat(2, 1fr); }
.query-grid { grid-template-columns: repeat(3, 1fr); }
.compare-grid { grid-template-columns: repeat(2, 1fr); }
.steps-grid { grid-template-columns: repeat(2, 1fr); counter-reset: g; }
@media (max-width: 760px) { .req-grid, .query-grid, .compare-grid, .steps-grid { grid-template-columns: 1fr; } }
.req-item, .query-card, .compare-card, .step-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; font-size: .95rem; }
.req-item { display: flex; gap: 12px; align-items: flex-start; }
.req-icon { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--bg-soft); font-size: 1.1rem; }
.req-item strong, .query-card strong, .compare-card > strong, .step-item strong { display: block; color: var(--ink); margin-bottom: 4px; }
.req-item p, .query-card p, .step-item p { margin: 0; color: var(--text); }
.query-tag, .compare-tag { display: inline-block; font-family: var(--mono); font-size: .76rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; margin-bottom: 8px; background: var(--bg-soft-2); color: var(--ink-2); }
.tag-b { background: var(--info-soft); color: #1e3a8a; }
.tag-g { background: var(--brand-soft); color: var(--brand-700); }
.tag-y { background: var(--warn-soft); color: var(--warn); }
.compare-list { margin: 8px 0 0; padding-left: 1.1em; }
.compare-xml { border-top: 3px solid var(--link); }
.compare-danfe { border-top: 3px solid var(--brand); }
.step-item { display: flex; gap: 12px; align-items: flex-start; }
.step-num { flex: none; width: 30px; height: 30px; border-radius: 9px; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .9rem; }
.callout-cta > div { flex: 1; min-width: 220px; }
.callout-cta p, .callout-cta span { margin: 2px 0 0; display: block; font-size: .95rem; }

.table-section { margin: 1.6em 0; }
.table-group-title { font-size: .82rem !important; text-transform: uppercase; letter-spacing: .06em; padding: 8px 12px; border-radius: 8px; margin: 1.4em 0 .6em !important; }
.table-group-title.ok { background: var(--brand-soft); color: var(--brand-700); }
.table-group-title.warn { background: var(--warn-soft); color: var(--warn); }
.table-group-title.err { background: var(--err-soft); color: var(--err); }
.rej-table { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.rej-row { display: grid; grid-template-columns: 76px 1.3fr 1fr; gap: 14px; padding: 12px 14px; border-top: 1px solid var(--line); font-size: .93rem; align-items: start; scroll-margin-top: calc(var(--header-h) + 20px); }
.rej-row:first-child { border-top: 0; }
.rej-row.header { background: var(--bg-soft); font-weight: 700; color: var(--ink); font-size: .82rem; }
.rej-row.hl, .rej-row:target { background: #fffbea; box-shadow: inset 4px 0 0 var(--warn); }
.rej-code { font-family: var(--mono); font-weight: 800; font-size: 1rem; }
.rej-row.err .rej-code { color: var(--err); }
.rej-row.warn .rej-code { color: var(--warn); }
.rej-row.ok .rej-code { color: var(--ok); }
.rej-desc strong { color: var(--ink); display: block; }
.rej-desc p { margin: 2px 0 0; color: var(--muted); font-size: .88rem; }
.rej-action { color: var(--text); }
@media (max-width: 640px) {
    .rej-row { grid-template-columns: 60px 1fr; }
    .rej-row .rej-action { grid-column: 2; font-size: .88rem; }
    .rej-row.header span:last-child { display: none; }
}

/* ---------- Logo oficial (coração + XML) ---------- */
.brand-mark { width: 44px; height: 44px; object-fit: contain; }
.site-footer .brand-mark { background: #fff; border-radius: 12px; padding: 4px; width: 48px; height: 48px; }
