/* =========================================================
   Entre Bits — Design System
   Leve (sem framework), tema claro/escuro, mobile-first.
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
    --ink: #0b1b33;
    --ink-2: #33415c;
    --muted: #64748b;
    --bg: #f7f8fb;
    --surface: #ffffff;
    --surface-2: #eef2f8;
    --line: #e2e8f0;
    --primary: #1060cc;
    --primary-ink: #ffffff;
    --primary-soft: #e3effc;
    --accent: #17b7d0;
    --accent-soft: #dcf6fa;
    --warn: #e8a317;
    --danger: #e5484d;
    --wa: #25d366;
    --grad: linear-gradient(120deg, #0d4fbf 0%, #1a8fd8 50%, #24e2e9 100%);
    --shadow-sm: 0 1px 2px rgba(11, 27, 51, .06);
    --shadow: 0 8px 24px -8px rgba(11, 27, 51, .14);
    --shadow-lg: 0 24px 60px -20px rgba(11, 27, 51, .28);
    --radius: 14px;
    --radius-sm: 10px;
    --container: 1180px;
    --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, "JetBrains Mono", "Cascadia Code", "SFMono-Regular", Menlo, Consolas, monospace;
    --bit-eye: #24e2e9;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --ink: #e8eefb; --ink-2: #b8c4da; --muted: #8a99b4; --bg: #0a1424; --surface: #101d33; --surface-2: #15253f;
        --line: #1f3150; --primary: #4b98f5; --primary-soft: #132c4f; --accent-soft: #0c3440;
        --shadow: 0 8px 24px -8px rgba(0, 0, 0, .5); --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .7);
        color-scheme: dark;
    }
}
:root[data-theme="dark"] {
    --ink: #e8eefb; --ink-2: #b8c4da; --muted: #8a99b4; --bg: #0a1424; --surface: #101d33; --surface-2: #15253f;
    --line: #1f3150; --primary: #4b98f5; --primary-soft: #132c4f; --accent-soft: #0c3440;
    --shadow: 0 8px 24px -8px rgba(0, 0, 0, .5); --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .7);
    color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); font-weight: 800; }
h2, .h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; }
h3, .h3 { font-size: 1.25rem; font-weight: 700; }
.h4 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 1em; }
code, kbd, pre { font-family: var(--mono); font-size: .92em; }
kbd { background: var(--surface-2); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 0 .4em; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--primary); color: #fff; }

.container { width: min(100% - 32px, var(--container)); margin-inline: auto; }
.narrow { max-width: 820px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -60px; background: var(--primary); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 12px; }
.hp { position: absolute; left: -9999px; }

/* ---------- Botões ---------- */
.btn { --b: var(--surface); display: inline-flex; align-items: center; justify-content: center; gap: .5em; font: inherit; font-weight: 600; font-size: .95rem; padding: .7em 1.2em; border-radius: 999px; border: 1px solid transparent; cursor: pointer; text-decoration: none !important; transition: transform .15s, box-shadow .15s, background .15s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--primary); color: var(--primary-ink); box-shadow: 0 6px 18px -6px color-mix(in srgb, var(--primary) 70%, transparent); }
.btn--primary:hover { background: color-mix(in srgb, var(--primary) 88%, #000); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: var(--surface-2); }
.btn--light { background: #fff; color: #0b1b33; }
.btn--wa { background: var(--wa); color: #06361b; }
.btn--wa:hover { background: #1fbe5a; }
.btn--danger { background: var(--danger); color: #fff; }
.btn--sm { padding: .45em .9em; font-size: .85rem; }
.btn--lg { padding: .9em 1.5em; font-size: 1rem; }
.btn[disabled] { opacity: .6; cursor: progress; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); }
.link-btn { background: none; border: 0; padding: 0; color: var(--primary); font: inherit; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.is-scrolled { border-color: var(--line); }
.site-header__inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none !important; }
.brand__name { font-size: 1.25rem; font-weight: 500; letter-spacing: -.03em; }
.brand__name b { font-weight: 800; background: linear-gradient(120deg, #1060cc, #1fc4dd); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { display: flex; align-items: center; justify-content: space-between; flex: 1; }
.nav__list { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav__list > li { display: flex; align-items: center; }
/* <a> e <button> com a mesma caixa: evita o item “Ferramentas” desalinhado */
.nav__list > li > a, .nav__trigger { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; margin: 0; border-radius: 8px; color: var(--ink-2); font: 500 .95rem/1 var(--font); background: none; border: 0; cursor: pointer; vertical-align: middle; }
.nav__list > li > a:hover, .nav__trigger:hover, .nav__list a[aria-current] { color: var(--ink); background: var(--surface-2); text-decoration: none; }
.nav__dropdown { position: relative; }
.nav__menu { position: absolute; top: calc(100% + 8px); left: -12px; width: 600px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; list-style: none; padding: 8px; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: .18s; }
.nav__dropdown.is-open .nav__menu, .nav__dropdown:focus-within .nav__menu { opacity: 1; visibility: visible; transform: none; }
@media (hover: hover) { .nav__dropdown:hover .nav__menu { opacity: 1; visibility: visible; transform: none; } }
.nav__menu a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--ink); }
.nav__menu a:hover { background: var(--surface-2); text-decoration: none; }
.nav__menu small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.35; }
.nav__all { color: var(--primary) !important; font-weight: 600; font-size: .9rem; }
.nav__menu--single { width: 380px; grid-template-columns: 1fr; }
.nav__trigger.is-current { color: var(--ink); background: var(--surface-2); }
.footer-title--spaced { margin-top: 22px; }
.nav__menu li:last-child { grid-column: 1 / -1; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.nav__actions { display: flex; align-items: center; gap: 8px; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 8px; }

@media (max-width: 1100px) {
    .nav-toggle { display: block; }
    .nav { position: fixed; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch; gap: 16px; padding: 16px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg); max-height: calc(100dvh - 68px); overflow: auto; transform: translateY(-120%); transition: transform .25s; }
    .nav.is-open { transform: none; }
    .nav__list { flex-direction: column; }
    .nav__list > li { display: block; }
    .nav__list > li > a, .nav__trigger { width: 100%; justify-content: flex-start; height: 44px; }
    .nav__trigger { justify-content: space-between; }
    .nav__menu { position: static; width: auto; grid-template-columns: 1fr; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 8px; display: none; }
    .nav__dropdown.is-open .nav__menu { display: grid; }
    .nav__actions { flex-wrap: wrap; }
}

/* ---------- Seções ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section--tight { padding: 32px 0 48px; }
.section--alt { background: var(--surface); border-block: 1px solid var(--line); }
.section__head { max-width: 680px; margin-bottom: 36px; }
.section__head--row { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.section__head--row > div { max-width: 680px; }
.section__head p:last-child { color: var(--ink-2); margin: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); margin-bottom: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.dot--live { animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px transparent; } }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--ink-2); max-width: 640px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 8vw, 110px); }
.hero__bg { position: absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(600px 380px at 85% 10%, color-mix(in srgb, var(--primary) 22%, transparent), transparent 70%),
        radial-gradient(520px 340px at 70% 90%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%),
        linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 32px,
        linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 32px 100%;
    mask-image: radial-gradient(ellipse at 70% 40%, #000 30%, transparent 75%); opacity: .9; }
.hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0; }
.hero__proof { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; padding: 0; margin: 0; color: var(--muted); font-size: .9rem; }
.hero__proof li::before { content: "✓"; color: var(--accent); font-weight: 800; margin-right: 6px; }
.hero__visual { position: relative; min-height: 360px; }
.console { background: #0b1b33; color: #cfe0ff; border-radius: 18px; box-shadow: var(--shadow-lg); border: 1px solid #1d3355; overflow: hidden; transform: rotate(-1.5deg); }
.console__bar { display: flex; align-items: center; gap: 6px; padding: 12px 14px; background: #0e2240; font: 12px var(--mono); color: #8aa3cc; }
.console__bar i { width: 10px; height: 10px; border-radius: 50%; background: #35507a; }
.console__bar i:first-child { background: #ff5f57; } .console__bar i:nth-child(2) { background: #febc2e; } .console__bar i:nth-child(3) { background: #28c840; }
.console__bar span { margin-left: 10px; }
.console__body { margin: 0; padding: 22px; font-size: .9rem; line-height: 1.7; white-space: pre-wrap; }
.c-k { color: #7aa2ff; font-weight: 700; } .c-s { color: #ffd479; } .c-c { color: #6c84a8; } .c-ok { color: #3ee0bd; } .c-up { color: #7aa2ff; }
.chip { display: inline-block; padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: .82rem; font-weight: 600; }
.chip--float { position: absolute; animation: float 6s ease-in-out infinite; }
.chip--a { top: -14px; right: 6%; } .chip--b { bottom: 22%; left: -6%; animation-delay: -2s; } .chip--c { bottom: -14px; right: 12%; animation-delay: -4s; }
@keyframes float { 50% { transform: translateY(-8px); } }
@media (max-width: 900px) { .hero__grid { grid-template-columns: 1fr; } .hero__visual { min-height: 0; margin-top: 12px; } .chip--b { left: 0; } }

/* ---------- Sobre / pilares ---------- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.benefits { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.benefits li { display: flex; gap: 14px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.benefits p { margin: 0; color: var(--muted); font-size: .92rem; }
.benefits__icon { font-size: 1.4rem; }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 48px; }
.pillar { padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); position: relative; overflow: hidden; }
.pillar::after { content: ""; position: absolute; inset: auto 0 0 0; height: 3px; background: var(--grad); }
.pillar__n { font: 800 2rem var(--mono); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pillar p { color: var(--muted); margin: 0; }
@media (max-width: 860px) { .about, .pillars { grid-template-columns: 1fr; } }

/* ---------- Cards ---------- */
.cards { display: grid; gap: 18px; }
.cards--4 { grid-template-columns: repeat(4, 1fr); }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1000px) { .cards--4 { grid-template-columns: repeat(2, 1fr); } .cards--3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .cards--4, .cards--3 { grid-template-columns: 1fr; } }
.card { padding: 26px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); transition: transform .2s, box-shadow .2s, border-color .2s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); }
.card p { color: var(--muted); margin: 0; font-size: .95rem; }
.card__icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; background: var(--primary-soft); color: var(--primary); margin-bottom: 18px; }

/* ---------- Tool tiles ---------- */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.tool-grid--big { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.tool-grid--compact { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.tool-tile { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--ink); transition: .2s; }
.tool-tile:hover { text-decoration: none; border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-2px); }
.tool-tile > span:not(.tool-tile__icon):not(.tool-tile__go) { color: var(--muted); font-size: .88rem; line-height: 1.45; }
.tool-tile__go { position: absolute; top: 18px; right: 18px; color: var(--muted); transition: .2s; }
.tool-tile:hover .tool-tile__go { color: var(--primary); transform: translateX(3px); }
.tool-tile__icon { width: 40px; height: 40px; border-radius: 11px; background: var(--grad); margin-bottom: 8px; -webkit-mask: none; position: relative; }
.tool-tile__icon::after { content: ""; position: absolute; inset: 9px; background: #fff; -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
.tool-tile__icon--key { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 14a4 4 0 1 1 3.9-5H22v3h-2v3h-3v-3h-6.1A4 4 0 0 1 7 14Zm0-2a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z'/%3E%3C/svg%3E"); }
.tool-tile__icon--database { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2c4.4 0 8 1.3 8 3v14c0 1.7-3.6 3-8 3s-8-1.3-8-3V5c0-1.7 3.6-3 8-3Zm6 9.5C16.5 12.4 14.3 13 12 13s-4.5-.6-6-1.5V14c0 .5 2.3 1.5 6 1.5s6-1 6-1.5Zm0-5C16.5 7.4 14.3 8 12 8s-4.5-.6-6-1.5V9c0 .5 2.3 1.5 6 1.5S18 9.5 18 9Z'/%3E%3C/svg%3E"); }
.tool-tile__icon--braces { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 3H7a3 3 0 0 0-3 3v3a2 2 0 0 1-2 2v2a2 2 0 0 1 2 2v3a3 3 0 0 0 3 3h1v-2H7a1 1 0 0 1-1-1v-3a4 4 0 0 0-1.3-3A4 4 0 0 0 6 9V6a1 1 0 0 1 1-1h1Zm8 0h1a3 3 0 0 1 3 3v3a2 2 0 0 0 2 2v2a2 2 0 0 0-2 2v3a3 3 0 0 1-3 3h-1v-2h1a1 1 0 0 0 1-1v-3a4 4 0 0 1 1.3-3A4 4 0 0 1 18 9V6a1 1 0 0 0-1-1h-1Z'/%3E%3C/svg%3E"); }
.tool-tile__icon--code { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m8.6 16.6-4.6-4.6 4.6-4.6L7.2 6 1.2 12l6 6Zm6.8 0 4.6-4.6-4.6-4.6L16.8 6l6 6-6 6Z'/%3E%3C/svg%3E"); }
.tool-tile__icon--lock { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a5 5 0 0 1 5 5v3h1a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h1V7a5 5 0 0 1 5-5Zm0 2a3 3 0 0 0-3 3v3h6V7a3 3 0 0 0-3-3Z'/%3E%3C/svg%3E"); }

.tool-tile__icon--text { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 5h16v3h-2V7h-5v10h2v2H9v-2h2V7H6v1H4Z'/%3E%3C/svg%3E"); }
.tool-tile__icon--swap { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 4 2 9l5 5v-4h9V8H7Zm10 6v4H8v2h9v4l5-5Z'/%3E%3C/svg%3E"); }
.tool-tile__icon--diff { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 3h8v18H3Zm2 2v14h4V5Zm8-2h8v18h-8Zm3 4v2h-2v2h2v2h2v-2h2V9h-2V7Zm-2 8v2h6v-2Z'/%3E%3C/svg%3E"); }
.tool-tile__icon--receipt { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 2h14v20l-2.3-1.5L14.3 22 12 20.5 9.7 22l-2.4-1.5L5 22Zm3 5v2h8V7Zm0 4v2h8v-2Zm0 4v2h5v-2Z'/%3E%3C/svg%3E"); }

/* ---------- Notícias / Radar ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.news-grid--radar { grid-template-columns: repeat(2, 1fr); }
.news-grid__ad { grid-column: 1 / -1; }
@media (max-width: 960px) { .news-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .news-grid, .news-grid--radar { grid-template-columns: 1fr; } }
.news-card { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: .2s; }
.news-card:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); box-shadow: var(--shadow); }
.news-card h3 { font-size: 1.02rem; line-height: 1.35; margin: 0; }
.news-card h3 a { color: var(--ink); }
.news-card p { color: var(--muted); font-size: .9rem; margin: 0; }
.news-card__meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.news-card__foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; padding-top: 6px; }
.news-card__actions { display: inline-flex; align-items: center; gap: 10px; }
.news-stat { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; color: var(--muted); }
.share-wa { color: #128c4a; display: inline-flex; }
.like-btn { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: 600 .8rem var(--font); cursor: pointer; transition: .15s; min-height: 28px; }
.like-btn svg { fill: none; stroke: currentColor; stroke-width: 2; }
.like-btn:hover { color: #e5484d; border-color: #f3b5b7; }
.like-btn.is-liked { color: #e5484d; border-color: #f3b5b7; background: #fff0f0; }
.like-btn.is-liked svg { fill: currentColor; }
:root[data-theme="dark"] .like-btn.is-liked { background: #3a1517; border-color: #6b2a2d; }
.like-btn.pop svg { animation: pop .4s ease; }
@keyframes pop { 40% { transform: scale(1.4); } }
.trending__list { margin: 0; padding-left: 1.3em; display: grid; gap: 10px; }
.trending__list li::marker { font-weight: 800; color: var(--primary); }
.trending__list a { display: block; color: var(--ink); font-size: .9rem; line-height: 1.35; font-weight: 600; }
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.seg__item { padding: 7px 14px; border-radius: 9px; white-space: nowrap; color: var(--ink-2); font-size: .9rem; font-weight: 600; }
.seg__item:hover { text-decoration: none; color: var(--ink); }
.seg__item.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.auth .seg { display: flex; } .auth .seg__item { flex: 1; text-align: center; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .02em; background: var(--surface-2); color: var(--ink-2); }
.badge--senior { background: #e0f2ec; color: #0a7a5a; } .badge--erp { background: var(--primary-soft); color: var(--primary); }
.badge--ia { background: #f1e8ff; color: #7c3aed; } .badge--seguranca { background: #ffe9ea; color: #c4262c; }
.badge--processos { background: #fff4dc; color: #a66a00; } .badge--fiscal { background: #e8f4ff; color: #1b6cb3; }
.badge--bit { background: var(--grad); color: #fff; }
:root[data-theme="dark"] .badge:not(.badge--bit) { filter: brightness(.85) saturate(1.2); }
.digest { padding: 22px 24px; border-radius: var(--radius); margin-bottom: 22px; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box; border: 1.5px solid transparent; box-shadow: var(--shadow); }
.digest header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; color: var(--muted); font-size: .85rem; }
.digest__body { line-height: 1.7; }
.radar { display: grid; grid-template-columns: 1fr 300px; gap: 28px; align-items: start; }
.radar__side { display: grid; gap: 16px; position: sticky; top: 90px; }
@media (max-width: 960px) { .radar { grid-template-columns: 1fr; } .radar__side { position: static; } }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip-link { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: .88rem; font-weight: 500; }
.chip-link small { color: var(--muted); margin-left: 4px; }
.chip-link:hover { text-decoration: none; border-color: var(--primary); }
.chip-link.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip-link.is-active small { color: inherit; opacity: .7; }
.search { display: flex; gap: 8px; margin-top: 18px; max-width: 620px; }
.search input { flex: 1; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 28px; }
.empty { padding: 28px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }

.article-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--ink); transition: .2s; }
.article-card:hover { text-decoration: none; box-shadow: var(--shadow); transform: translateY(-3px); border-color: color-mix(in srgb, var(--primary) 35%, var(--line)); }
.article-card__media { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.article-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.article-card:hover .article-card__media img { transform: scale(1.04); }
.article-card__ph { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 1.4rem; color: #fff; background: radial-gradient(260px 120px at 80% 0, rgba(16,96,204,.6), transparent), radial-gradient(240px 120px at 0 100%, rgba(36,226,233,.45), transparent), #0b1b33; letter-spacing: -.03em; }
.article-card__ph b { font-weight: 800; }
.article-card__cat { position: absolute; left: 12px; top: 12px; background: rgba(255,255,255,.92); color: #0b1b33; }
.article-card__body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1; }
.article-card__meta { font-size: .78rem; color: var(--muted); }
.article-card h3 { font-size: 1.02rem; line-height: 1.35; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.article-card p { color: var(--muted); font-size: .88rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.article-card__more { margin-top: auto; padding-top: 6px; font-size: .86rem; font-weight: 600; color: var(--primary); }

/* ---------- CTA / Contato ---------- */
.cta-band { padding: 0 0 clamp(48px, 7vw, 80px); }
.cta-band__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: clamp(28px, 4vw, 48px); border-radius: 22px; background: radial-gradient(500px 200px at 90% 0, rgba(16, 96, 204, .55), transparent), radial-gradient(400px 200px at 0 100%, rgba(36, 226, 233, .3), transparent), #0b1b33; color: #fff; }
.cta-band__inner h2 { color: #fff; margin-bottom: .3em; }
.cta-band__inner p { color: #c3d1ea; margin: 0; }
.cta-band__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.contact { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: start; }
.contact__list { list-style: none; padding: 0; display: grid; gap: 12px; }
.contact__list li { display: flex; gap: 10px; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }

/* ---------- Formulários ---------- */
.form { display: grid; gap: 16px; }
.form.card { background: var(--surface); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form__row { grid-template-columns: 1fr; } }
label { display: grid; gap: 6px; font-size: .9rem; font-weight: 600; color: var(--ink-2); }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]), select, textarea {
    width: 100%; font: inherit; font-weight: 400; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .7em .85em; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent); }
textarea { resize: vertical; min-height: 120px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; color: var(--ink-2); cursor: pointer; }
.check input { margin-top: .3em; width: 18px; height: 18px; accent-color: var(--primary); flex: none; }
.form__status { margin: 0; min-height: 1.4em; font-size: .92rem; }
.form__status.is-ok { color: #0a8a64; } .form__status.is-error { color: var(--danger); }
.alert { margin: 16px 0 0; padding: 12px 16px; border-radius: var(--radius-sm); font-weight: 500; }
.alert--success { background: var(--accent-soft); color: #0a6b51; } .alert--error { background: #ffe9ea; color: #b42328; }
:root[data-theme="dark"] .alert--success { color: #5fe6c4; } :root[data-theme="dark"] .alert--error { background: #3a1517; color: #ff9da0; }
.note { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--primary-soft); color: var(--ink-2); font-size: .9rem; margin: 0; }

/* ---------- Ferramentas ---------- */
.tool-hero { padding: 40px 0 8px; }
.tool-hero h1 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 14px; display: flex; gap: 6px; flex-wrap: wrap; }
.breadcrumb a { color: var(--muted); }
.privacy-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: #0a7a5a; font-size: .82rem; font-weight: 600; }
:root[data-theme="dark"] .privacy-pill { color: #5fe6c4; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.panel--accent { background: var(--accent-soft); border-color: transparent; }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.panel__head h1, .panel__head h2 { margin: 0; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; padding: 14px 16px; }
.toolbar__group { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.toolbar__group--end { margin-left: auto; }
.field-inline { display: flex; align-items: center; gap: 8px; font-size: .85rem; }
.field-inline select { width: auto; padding: .45em .6em; }
.toolbar .check { align-items: center; font-size: .88rem; }
.toolbar .check input { margin: 0; }
.editors { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 860px) { .editors { grid-template-columns: 1fr; } .toolbar__group--end { margin-left: 0; } }
.editor { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.editor__head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.editor__area { border: 0 !important; border-radius: 0 !important; background: var(--surface) !important; min-height: 420px; font-family: var(--mono) !important; font-size: .88rem !important; line-height: 1.6; tab-size: 4; white-space: pre; overflow: auto; box-shadow: none !important; }
.editor__area.is-error { background: color-mix(in srgb, var(--danger) 6%, var(--surface)) !important; }
.tool-status { margin: 12px 2px 0; font-size: .92rem; min-height: 1.4em; }
.tool-status.is-ok { color: #0a8a64; } .tool-status.is-error { color: var(--danger); font-family: var(--mono); }
.file-btn { cursor: pointer; }
.tool-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 0 16px; align-items: start; }
.tool-layout > .panel:first-child { grid-column: 1 / -1; }
@media (max-width: 860px) { .tool-layout { grid-template-columns: 1fr; } }
.pw-output { display: flex; align-items: center; gap: 14px; padding: 6px 0 16px; }
.pw-output__value { flex: 1; font: 600 clamp(1.1rem, 2.4vw, 1.6rem) var(--mono); word-break: break-all; letter-spacing: .02em; }
.pw-output__actions { display: flex; gap: 8px; }
.meter__bar { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.meter__bar span { display: block; height: 100%; width: 0; border-radius: inherit; transition: width .3s, background .3s; }
.meter__label { margin: 8px 0 0; font-size: .9rem; color: var(--muted); }
.options { display: grid; gap: 16px; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 480px) { .checks { grid-template-columns: 1fr; } }
.range input { width: 100%; accent-color: var(--primary); }
.pw-list { margin: 0; padding-left: 1.4em; font-family: var(--mono); font-size: .9rem; display: grid; gap: 6px; max-height: 320px; overflow: auto; }
.pw-list li { word-break: break-all; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.pw-list li:hover { background: var(--surface-2); }

/* Compartilhamento */
.share-layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 0 16px; align-items: start; }
.share-layout .how { grid-row: span 2; grid-column: 2; grid-row-start: 1; }
@media (max-width: 860px) { .share-layout { grid-template-columns: 1fr; } .share-layout .how { grid-column: auto; grid-row: auto; } }
.steps { padding-left: 1.2em; display: grid; gap: 10px; color: var(--ink-2); font-size: .94rem; }
.copy-field { display: flex; gap: 8px; margin: 14px 0; }
.copy-field input { font-family: var(--mono) !important; font-size: .85rem !important; }
.share-result__actions, .row-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.row-actions--center { justify-content: center; }
.big-icon { font-size: 3rem; margin-bottom: 8px; }
.inline-field { max-width: 320px; margin: 0 auto 16px; text-align: left; }
.secret { white-space: pre-wrap; word-break: break-word; background: var(--surface-2); border-radius: var(--radius-sm); padding: 18px; margin: 0 0 12px; max-height: 420px; overflow: auto; }

/* Conta */
.auth { max-width: 460px; }
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.dash-head__actions { display: flex; gap: 10px; align-items: center; }
.btn--logout svg { flex: none; }
.btn--logout:hover { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; align-items: start; }
@media (max-width: 760px) { .dash-grid { grid-template-columns: 1fr; } }
input:disabled { opacity: .7; cursor: not-allowed; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.stat span { display: block; font: 800 1.8rem var(--mono); }
.stat small { color: var(--muted); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tag { padding: 2px 10px; border-radius: 99px; font-size: .78rem; font-weight: 700; }
.tag--ok { background: var(--accent-soft); color: #0a7a5a; } .tag--muted { background: var(--surface-2); color: var(--muted); } .tag--warn { background: #fff4dc; color: #a66a00; }
.danger { border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.danger summary { cursor: pointer; color: var(--danger); }
@media (max-width: 680px) {
    .table thead { display: none; }
    .table tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
    .table td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 4px 0; }
    .table td[data-th]::before { content: attr(data-th); font-weight: 600; color: var(--muted); }
}

/* Texto/legal */
.prose { max-width: 820px; color: var(--ink-2); }
.prose h2 { margin-top: 0; }
.prose li { margin-bottom: 6px; }
.legal h2 { font-size: 1.35rem; margin-top: 2em; }
.legal .table { font-size: .88rem; }
.toc { font-size: .92rem; }
.toc ol { margin: 8px 0 0; padding-left: 1.3em; columns: 2; }
@media (max-width: 560px) { .toc ol { columns: 1; } }
.error-code { font: 800 5rem var(--mono); margin: 0; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Anúncios (altura reservada evita CLS) ---------- */
.ad-slot { margin: 24px auto; text-align: center; min-height: 120px; }
.ad-slot--infeed { min-height: 160px; margin: 0; }
.ad-slot--side { min-height: 600px; margin: 0; }
.ad-slot__label { display: block; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.ad-slot__placeholder { display: grid; place-items: center; min-height: 100px; border: 1px dashed var(--line); border-radius: var(--radius-sm); color: var(--muted); font-size: .85rem; }
.sticky-ad { position: sticky; top: 90px; }
@media (max-width: 960px) { .ad-slot--side { min-height: 250px; } }


.debug-note { color: var(--danger); font-family: var(--mono); }

/* ---------- Seletor de idioma ---------- */
.lang__btn { height: 38px; border: 1px solid var(--line) !important; border-radius: 999px !important; padding: 0 12px !important; font-size: .82rem !important; font-weight: 700 !important; gap: 6px; }
.nav__menu--lang { width: 180px; left: auto; right: 0; grid-template-columns: 1fr; }
.nav__menu--lang li:last-child { grid-column: auto; border-top: 0; margin-top: 0; padding-top: 0; }
.nav__menu--lang a[aria-current] { background: var(--primary-soft); }
@media (max-width: 1100px) { .lang { width: 100%; } .nav__menu--lang { width: auto; } }

/* ---------- Newsletter ---------- */
.newsletter { border-radius: var(--radius); }
.newsletter__title { font-size: 1.1rem; margin-bottom: 4px; }
.newsletter__copy p { color: var(--ink-2); font-size: .92rem; margin: 0 0 10px; }
.newsletter__fields { display: grid; gap: 10px; }
.newsletter__row { display: flex; gap: 8px; }
.newsletter__row input { flex: 1; min-width: 0; }
.newsletter--card { background: var(--surface); border: 1px solid var(--line); padding: 20px; }
.newsletter--band { display: grid; grid-template-columns: 1fr 1.1fr; gap: 24px; align-items: center; padding: clamp(20px, 3vw, 32px); background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box; border: 1.5px solid transparent; box-shadow: var(--shadow); }
@media (max-width: 760px) { .newsletter--band { grid-template-columns: 1fr; } }
.checklist { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; color: var(--ink-2); }
.checklist li::before { content: "✓"; color: var(--accent); font-weight: 800; margin-right: 8px; }
.cf-turnstile { min-height: 65px; }

/* ---------- Auth ---------- */
.form__inline { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.otp { font: 700 1.6rem var(--mono) !important; letter-spacing: .5em; text-align: center; }

/* ---------- Manipulador de textos ---------- */
.text-actions { display: grid; gap: 12px; }
.text-actions__group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.text-actions__label { width: 100%; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.text-actions .check { align-items: center; margin-left: 4px; }
.text-actions .check input { margin: 0; }
.find summary { cursor: pointer; }
.find__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; align-items: end; }
.find__opts { display: flex; gap: 14px; flex-wrap: wrap; }
.find__opts .check input { margin: 0; }
@media (max-width: 680px) { .find__grid { grid-template-columns: 1fr; } }
.text-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 14px 0 0; }
.text-stats div { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); }
.text-stats dt { font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.text-stats dd { margin: 2px 0 0; font: 700 1.2rem var(--mono); }
.editor__head .toolbar__group { gap: 6px; }

/* ---------- Conversor ---------- */
.tool-status.is-warn { color: #a66a00; }
.alert--warn { background: #fff4dc; color: #7a4f00; }
:root[data-theme="dark"] .alert--warn { background: #3a2c10; color: #f3c56b; }
.invalid-box ul { margin: 6px 0 0; padding-left: 1.2em; font: .85rem var(--mono); max-height: 180px; overflow: auto; }
.table-wrap--preview { max-height: 460px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.table--data { font-size: .84rem; }
.table--data th { position: sticky; top: 0; background: var(--surface-2); z-index: 1; text-transform: none; letter-spacing: 0; font-size: .8rem; color: var(--ink-2); }
.table--data td { white-space: pre-wrap; max-width: 320px; }
.table--data tr.is-invalid td { background: color-mix(in srgb, var(--danger) 10%, transparent); }
.table--data td.extra { color: var(--danger); font-style: italic; }
.field-inline input { width: auto; padding: .4em .6em; }
@media (max-width: 680px) { .table--data thead { display: table-header-group; } .table--data tr { display: table-row; } .table--data td { display: table-cell; } }

/* ---------- Diff ---------- */
.editor__area--short { min-height: 260px; }
.diff-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0 10px; min-height: 28px; }
.diff-summary .is-error { color: var(--danger); }
.d-badge { padding: 3px 10px; border-radius: 99px; font-size: .82rem; font-weight: 700; }
.d-badge--add { background: #dcfaf0; color: #0a7a5a; } .d-badge--del { background: #ffe9ea; color: #b42328; } .d-badge--mod { background: #fff4dc; color: #a66a00; } .d-badge--eq { background: var(--accent-soft); color: #0a7a5a; }
.diff-view { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); max-height: 70vh; }
.diff-view:empty { display: none; }
.diff { width: 100%; border-collapse: collapse; font: .83rem/1.55 var(--mono); table-layout: fixed; }
.diff col.c-num { width: 52px; } .diff col.c-sign { width: 22px; }
.diff td { padding: 0 8px; vertical-align: top; }
.d-num { color: var(--muted); text-align: right; user-select: none; background: var(--surface-2); border-right: 1px solid var(--line); }
.d-code { white-space: pre-wrap; word-break: break-word; }
.d-sign { text-align: center; font-weight: 700; user-select: none; }
.d-del { background: #fff0f0; } .d-add { background: #ecfdf5; } .d-empty { background: repeating-linear-gradient(-45deg, transparent 0 6px, var(--surface-2) 6px 7px); }
.d-del del { background: #ffc9cb; text-decoration: none; border-radius: 3px; } .d-add ins { background: #a8f0d4; text-decoration: none; border-radius: 3px; }
:root[data-theme="dark"] .d-del { background: #3a1517; } :root[data-theme="dark"] .d-add { background: #0f3330; }
:root[data-theme="dark"] .d-del del { background: #7a2a2e; } :root[data-theme="dark"] .d-add ins { background: #1c6b58; }
.d-skip td { text-align: center; color: var(--muted); background: var(--surface-2); font-family: var(--font); font-size: .8rem; padding: 4px; }
@media (max-width: 760px) { .diff--split col.c-num { width: 34px; } .diff { font-size: .75rem; } }

/* ---------- Chave NF-e ---------- */
.nfe-input { font: 600 1.05rem/1.5 var(--mono) !important; letter-spacing: .04em; min-height: 70px !important; margin-top: 8px; }
.nfe-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.nfe-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.nfe-card__head h2 { margin: 0; }
.key-blocks { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 18px; }
.kb { display: inline-flex; flex-direction: column; align-items: center; padding: 6px 8px; border-radius: 8px; border: 1px solid transparent; }
.kb b { font: 700 1rem var(--mono); letter-spacing: .06em; }
.kb small { font-size: .66rem; opacity: .75; }
.kb-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: middle; }
.kb--0 { background: #e6eeff; color: #1f4fd1; } .kb--1 { background: #dcfaf2; color: #0a7a5a; } .kb--2 { background: #f1e8ff; color: #6d28d9; }
.kb--3 { background: #fff4dc; color: #8a5800; } .kb--4 { background: #ffe9ea; color: #b42328; } .kb--5 { background: #e8f4ff; color: #1b6cb3; }
.kb--6 { background: #eef2f8; color: #33415c; } .kb--7 { background: #fde8f3; color: #a3266b; } .kb--8 { background: #e9f8e3; color: #3c7a12; } .kb--9 { background: #fff0e0; color: #a64b00; }
:root[data-theme="dark"] .kb { filter: brightness(.8) saturate(1.3); }
.nfe-card td.is-bad, .table td.is-bad { color: var(--danger); font-weight: 600; } .nfe-card td.is-good, .table td.is-good { color: #0a8a64; }
.nfe-checks { color: var(--danger); font-size: .9rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 56px 0 24px; font-size: .92rem; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1.25fr 1.15fr 1fr; gap: 28px; }
@media (max-width: 1100px) { .site-footer__grid { grid-template-columns: repeat(3, 1fr); } .site-footer__grid > div:first-child { grid-column: 1 / -1; } }
@media (max-width: 860px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .site-footer__grid { grid-template-columns: 1fr; } }
.brand--footer { margin-bottom: 12px; }
.footer-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-links a, .footer-links .link-btn { color: var(--ink-2); font-size: .92rem; }
.social { display: flex; gap: 10px; margin-top: 18px; }
.social a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); color: var(--ink-2); }
.social a:hover { color: var(--primary); border-color: var(--primary); }
.site-footer__bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 36px; padding-top: 20px; }
.site-footer__bottom p { margin: 0; }

/* ---------- Consentimento ---------- */
.consent { position: fixed; inset: auto 16px 16px 16px; z-index: 90; display: flex; justify-content: center; pointer-events: none; }
.consent__box { pointer-events: auto; width: min(100%, 760px); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 22px 24px; animation: rise .3s ease-out; max-height: 80dvh; overflow: auto; }
.consent__title { font-size: 1.1rem; margin-bottom: 6px; }
.consent p { font-size: .92rem; color: var(--ink-2); }
.consent__actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.consent__prefs { display: grid; gap: 4px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-weight: 400; }
.switch-row small { display: block; color: var(--muted); font-size: .84rem; }
.switch-row input { appearance: none; width: 44px; height: 26px; border-radius: 99px; background: var(--line); position: relative; cursor: pointer; transition: .2s; flex: none; }
.switch-row input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: var(--shadow-sm); }
.switch-row input:checked { background: var(--primary); }
.switch-row input:checked::after { left: 21px; }
.switch-row input:disabled { opacity: .6; cursor: not-allowed; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@media (max-width: 560px) { .consent { inset: auto 8px 8px 8px; } .consent__actions .btn { flex: 1; } }

/* ---------- Bit ---------- */
.bit { position: fixed; right: 18px; bottom: 18px; z-index: 80; }
.bit__launcher { display: flex; align-items: center; gap: 10px; padding: 8px 18px 8px 8px; border-radius: 999px; border: 0; cursor: pointer; background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lg); font: 600 .92rem var(--font); transition: transform .2s; }
.bit__launcher:hover { transform: translateY(-2px); }
.bit__avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--grad); color: #0b1b33; }
.bit__avatar--sm { width: 34px; height: 34px; flex: none; }
.bit.is-open .bit__launcher { display: none; }
.bit__panel { position: absolute; right: 0; bottom: 0; width: min(390px, calc(100vw - 24px)); height: min(600px, calc(100dvh - 100px)); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden; animation: rise .25s ease-out; }
.bit__head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; border-bottom: 1px solid var(--line); }
.bit__head div { flex: 1; line-height: 1.2; }
.bit__head small { display: block; color: var(--muted); font-size: .76rem; }
.bit__wa { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 99px; background: var(--wa); color: #06361b; font-size: .78rem; font-weight: 700; }
.bit__wa:hover { text-decoration: none; filter: brightness(.95); }
.bit__messages { flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.msg { max-width: 86%; padding: 10px 14px; border-radius: 16px; font-size: .92rem; line-height: 1.5; word-wrap: break-word; }
.msg p { margin: 0 0 .5em; } .msg p:last-child { margin: 0; }
.msg ul { margin: .3em 0; padding-left: 1.2em; }
.msg--bot { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; align-self: flex-start; }
.msg--user { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.msg--user a { color: #fff; text-decoration: underline; }
.msg--typing span { display: inline-block; width: 6px; height: 6px; margin: 0 2px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.msg--typing span:nth-child(2) { animation-delay: .2s; } .msg--typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: .2; } }
.bit__suggestions { display: flex; gap: 6px; padding: 8px 12px 0; flex-wrap: wrap; background: var(--bg); }
.bit__suggestions button { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 99px; padding: 5px 11px; font: .8rem var(--font); cursor: pointer; }
.bit__suggestions button:hover { border-color: var(--primary); color: var(--primary); }
.bit__form { display: flex; gap: 8px; padding: 10px 12px; background: var(--bg); }
.bit__form textarea { min-height: 42px !important; max-height: 120px; resize: none; padding: .6em .85em !important; border-radius: 22px !important; }
.bit__send { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--primary); color: #fff; display: grid; place-items: center; cursor: pointer; }
.bit__disclaimer { margin: 0; padding: 0 14px 10px; font-size: .72rem; color: var(--muted); background: var(--bg); }
@media (max-width: 520px) {
    .bit { right: 12px; bottom: 12px; }
    .bit__launcher-text { display: none; }
    .bit__launcher { padding: 6px; }
    .bit__panel { position: fixed; inset: auto 8px 8px 8px; width: auto; height: calc(100dvh - 90px); }
}
body.consent-open .bit { bottom: 210px; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 99px; font-size: .9rem; font-weight: 600; opacity: 0; transition: .25s; z-index: 120; pointer-events: none; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Animação de entrada ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    .reveal { opacity: 1; transform: none; }
}

@media print { .site-header, .site-footer, .bit, .consent, .ad-slot { display: none !important; } }


/* =========================================================
   v2.2 — Diagnósticos (ROI, maturidade, SoD)
   ========================================================= */
.tool-tile__icon--roi { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 3h2v16h16v2H3Zm4 11 4-4 3 3 5-6 1.5 1.3L14 16l-3-3-2.6 2.6Z'/%3E%3C/svg%3E"); }
.tool-tile__icon--maturity { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 20h3v-6H4Zm6.5 0h3V9h-3ZM17 20h3V4h-3Z'/%3E%3C/svg%3E"); }
.tool-tile__icon--sod { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2 4 5v6c0 5 3.4 9.7 8 11 4.6-1.3 8-6 8-11V5Zm-1 5h2v6h-2Zm0 8h2v2h-2Z'/%3E%3C/svg%3E"); }

.diag-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .diag-cards { grid-template-columns: 1fr; } }
.diag-card { display: flex; flex-direction: column; gap: 8px; padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--ink); transition: .2s; position: relative; overflow: hidden; }
.diag-card::after { content: ""; position: absolute; inset: auto 0 0 0; height: 3px; background: var(--grad); }
.diag-card:hover { text-decoration: none; box-shadow: var(--shadow); transform: translateY(-3px); border-color: var(--primary); }
.diag-card h2, .diag-card h3 { margin: 4px 0 0; font-size: 1.15rem; }
.diag-card p { color: var(--muted); font-size: .92rem; margin: 0; }
.diag-card__go { margin-top: auto; padding-top: 8px; font-weight: 700; color: var(--primary); font-size: .9rem; }

.diag-cta { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box; border: 1.5px solid transparent; }
.diag-cta h2 { margin: 0 0 4px; }
.diag-cta p { margin: 0; }

.kpis { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.kpis > .kpi { flex: 1 1 150px; }
.kpis > .kpi--hero { flex-basis: 100%; }
.kpis--4 > .kpi { flex-basis: 200px; }
.kpi { padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kpi small { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; }
.kpi strong { font: 800 1.25rem var(--mono); color: var(--ink); overflow-wrap: anywhere; }
.kpi strong small { text-transform: none; letter-spacing: 0; font-weight: 600; }
.kpi span { font-size: .8rem; color: var(--muted); }
.kpi--hero { background: linear-gradient(120deg, #0d4fbf, #1a8fd8 60%, #1fc4dd); border: 0; color: #fff; }
.kpi--hero small, .kpi--hero span, .kpi--hero strong { color: #fff; }
.kpi--hero strong { font-size: 2.2rem; }
.kpi--hero.is-negative { background: linear-gradient(120deg, #8a1c22, #c4262c); }
.kpi--alert { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.kpi--alert strong { color: var(--danger); }
.kpi--ok strong { color: #0a8a64; }

/* ROI */
.roi__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .roi__grid { grid-template-columns: 1fr; } }
.roi__results { position: sticky; top: 84px; }
@media (max-width: 1000px) { .roi__results { position: static; } }
.roi__form fieldset { border: 1px solid var(--line); display: grid; gap: 14px; }
.roi__form legend { padding: 0 6px; margin-left: -6px; }
.form__row--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 560px) { .form__row--3 { grid-template-columns: 1fr; } }
.money { position: relative; display: block; }
.money::before { content: "R$"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .85rem; font-weight: 600; pointer-events: none; }
.money input { padding-left: 2.4em !important; }
label small.muted { font-weight: 400; }
.benefit { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 14px; background: var(--bg); }
.benefit[open] { padding-bottom: 14px; }
.benefit summary { cursor: pointer; padding: 12px 0; font-weight: 700; display: flex; justify-content: space-between; gap: 12px; }
.benefit summary output { font: 600 .85rem var(--mono); color: #0a8a64; }
.chart-panel .panel__head { flex-wrap: wrap; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: .8rem; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { display: inline-block; width: 18px; height: 0; border-top: 2px solid; }
.lg--real { border-color: var(--primary); border-top-width: 3px; }
.lg--pess { border-color: var(--muted); border-top-style: dashed; }
.lg--otim { border-color: var(--ink-2); border-top-style: dotted; border-top-width: 3px; }
.chart { position: relative; }
.roi-chart { width: 100%; height: auto; display: block; overflow: visible; }
.c-grid { stroke: var(--line); stroke-width: 1; }
.c-zero { stroke: var(--ink-2); stroke-width: 1; }
.c-axis { fill: var(--muted); font: 11px var(--font); }
.c-line { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.c-line--real { stroke: var(--primary); stroke-width: 3; }
.c-line--pess { stroke: var(--muted); stroke-dasharray: 6 5; }
.c-line--otim { stroke: var(--ink-2); stroke-dasharray: 2 4; stroke-linecap: round; }
.c-label { font: 600 11px var(--font); fill: var(--ink-2); }
.c-label--real { fill: var(--ink); font-weight: 800; }
.c-pb { stroke: #0a8a64; stroke-dasharray: 3 3; }
.c-cross { stroke: var(--ink-2); stroke-width: 1; }
.c-dot { fill: var(--primary); stroke: var(--surface); stroke-width: 2; }
.c-tip { position: absolute; top: 8px; width: 200px; padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: .8rem; display: grid; gap: 3px; pointer-events: none; z-index: 2; }
.c-tip span { display: flex; align-items: center; gap: 6px; color: var(--ink-2); font-family: var(--mono); font-size: .76rem; }
.table tr.is-strong td { font-weight: 700; background: var(--primary-soft); }

/* Maturidade */
.mat-progress { padding: 14px 18px; }
.mat-steps { display: flex; flex-wrap: wrap; gap: 6px 16px; list-style: none; margin: 0 0 10px; padding: 0; font-size: .82rem; color: var(--muted); counter-reset: s; }
.mat-steps li { counter-increment: s; }
.mat-steps li::before { content: counter(s); display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-2); margin-right: 6px; font-size: .72rem; font-weight: 700; }
.mat-steps li.is-done { color: var(--ink-2); } .mat-steps li.is-done::before { content: "✓"; background: var(--accent-soft); color: #087a8c; }
.mat-steps li.is-current { color: var(--ink); font-weight: 700; } .mat-steps li.is-current::before { background: var(--primary); color: #fff; }
.mat-bar { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.mat-bar span { display: block; height: 100%; width: 0; background: var(--grad); transition: width .3s; }
.mat-step h2 { margin-bottom: 4px; }
.mat-q { border: 0; padding: 16px 0; margin: 0; border-bottom: 1px solid var(--line); }
.mat-q:last-of-type { border-bottom: 0; }
.mat-q legend { font-weight: 600; color: var(--ink); padding: 0; margin-bottom: 10px; line-height: 1.45; }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
@media (max-width: 680px) { .scale { grid-template-columns: 1fr; } }
.scale__opt { display: block; cursor: pointer; font-weight: 500; }
.scale__opt input { position: absolute; opacity: 0; pointer-events: none; }
.scale__opt span { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border: 1px solid var(--line); border-radius: 10px; text-align: center; font-size: .8rem; color: var(--ink-2); background: var(--bg); transition: .15s; height: 100%; }
.scale__opt span b { font: 800 1.05rem var(--mono); color: var(--ink); }
@media (max-width: 680px) { .scale__opt span { flex-direction: row; gap: 10px; justify-content: flex-start; padding: 10px 12px; } }
.scale__opt:hover span { border-color: var(--primary); }
.scale__opt input:checked + span { border-color: var(--primary); background: var(--primary-soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--primary); }
.scale__opt input:focus-visible + span { outline: 3px solid var(--primary); outline-offset: 2px; }
.mat-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 16px; }
.mat-nav .is-error { color: var(--danger); }
.mat-hero { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.mat-hero p { margin-bottom: 6px; }
.mat-rank { color: var(--ink-2); }
.g-track { fill: none; stroke: var(--surface-2); stroke-width: 12; }
.g-val { fill: none; stroke: var(--primary); stroke-width: 12; stroke-linecap: round; transition: stroke-dashoffset .8s ease; }
.g-num { font: 800 38px var(--mono); fill: var(--ink); }
.g-sub { font: 12px var(--font); fill: var(--muted); }
.mat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; align-items: start; }
@media (max-width: 900px) { .mat-grid { grid-template-columns: 1fr; } }
.radar-chart svg { width: 100%; max-height: 340px; display: block; overflow: visible; }
.r-grid { fill: none; stroke: var(--line); stroke-width: 1; }
.r-you { fill: color-mix(in srgb, var(--primary) 16%, transparent); stroke: var(--primary); stroke-width: 2; stroke-linejoin: round; }
.r-avg { fill: none; stroke: var(--muted); stroke-width: 2; stroke-dasharray: 5 4; }
.r-dot { fill: var(--primary); stroke: var(--surface); stroke-width: 2; }
.r-label { font: 600 11px var(--font); fill: var(--ink-2); }
.r-val { font-family: var(--mono); fill: var(--ink); font-weight: 800; }
.dim-rank { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; counter-reset: d; }
.dim-rank li { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name score" "bar lvl"; gap: 4px 12px; align-items: center; }
.dim-name { grid-area: name; font-weight: 600; font-size: .92rem; }
.dim-rank b { grid-area: score; font-family: var(--mono); text-align: right; }
.dim-rank small { grid-area: lvl; text-align: right; }
.dim-bar { grid-area: bar; position: relative; height: 10px; border-radius: 99px; background: var(--surface-2); }
.dim-bar > span { display: block; height: 100%; border-radius: 99px; background: var(--primary); }
.dim-bar i { position: absolute; top: -3px; width: 2px; height: 16px; background: var(--ink); border-radius: 1px; }
.actions-list { display: grid; gap: 10px; }
.action-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; background: var(--bg); }
.action-card header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.action-n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 800; font-size: .85rem; }
.action-card ul { margin: 0; padding-left: 1.2em; color: var(--ink-2); font-size: .92rem; display: grid; gap: 4px; }
.attention { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .92rem; color: var(--ink-2); }

/* SoD */
.sod__inputs { display: grid; grid-template-columns: 1.4fr 1fr; gap: 0 16px; }
@media (max-width: 860px) { .sod__inputs { grid-template-columns: 1fr; } }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 16px; border: 2px dashed var(--line); border-radius: var(--radius); cursor: pointer; text-align: center; font-weight: 400; color: var(--ink-2); transition: .15s; margin-bottom: 8px; }
.dropzone:hover, .dropzone.is-over { border-color: var(--primary); background: var(--primary-soft); }
.dropzone small { color: #0a8a64; font-weight: 600; }
.editor__area--paste { min-height: 140px !important; border: 1px solid var(--line) !important; border-radius: var(--radius-sm) !important; margin-top: 8px; }
.risk { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .74rem; font-weight: 800; white-space: nowrap; }
.risk::before { margin-right: 4px; }
.risk--alto { background: #ffe9ea; color: #b42328; } .risk--alto::before { content: "▲"; }
.risk--medio { background: #fff4dc; color: #8a5800; } .risk--medio::before { content: "●"; }
.risk--baixo { background: var(--surface-2); color: var(--ink-2); } .risk--baixo::before { content: "▼"; }
:root[data-theme="dark"] .risk--alto { background: #3a1517; color: #ff9da0; }
:root[data-theme="dark"] .risk--medio { background: #3a2c10; color: #f3c56b; }
.sod-user { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 8px; background: var(--bg); }
.sod-user summary { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; }
.sod-user[open] summary { border-bottom: 1px solid var(--line); }
.sod-user .table-wrap { padding: 4px 8px 8px; }
.sod-rules summary { cursor: pointer; }
.sod-rules .table { font-size: .84rem; }
[data-by-user] + * { margin-top: 0; }
.panel__head { flex-wrap: wrap; }
.panel__head .row-actions { align-items: center; }
.panel__head .row-actions select, .panel__head .row-actions input { width: auto !important; max-width: 220px; padding: .4em .7em !important; font-size: .85rem; }

@media print {
    .site-header, .site-footer, .bit, .consent, .ad-slot, .tool-hero .privacy-pill, .roi__presets, .mat-nav, .row-actions, .diag-cta .row-actions, details.sod-rules, .sod__inputs, .toolbar { display: none !important; }
    .roi__grid { grid-template-columns: 1fr 1fr; }
    .panel, .kpi { box-shadow: none; break-inside: avoid; }
    body { background: #fff; }
}

/* ---------- Tema escuro automático (segue o sistema) ---------- */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .like-btn.is-liked { background: #3a1517; border-color: #6b2a2d; }
    :root:not([data-theme="light"]) .badge:not(.badge--bit) { filter: brightness(.85) saturate(1.2); }
    :root:not([data-theme="light"]) .alert--success { color: #5fe6c4; }
    :root:not([data-theme="light"]) .alert--error { background: #3a1517; color: #ff9da0; }
    :root:not([data-theme="light"]) .privacy-pill { color: #5fe6c4; }
    :root:not([data-theme="light"]) .alert--warn { background: #3a2c10; color: #f3c56b; }
    :root:not([data-theme="light"]) .d-del { background: #3a1517; }
    :root:not([data-theme="light"]) .d-add { background: #0f3330; }
    :root:not([data-theme="light"]) .d-del del { background: #7a2a2e; }
    :root:not([data-theme="light"]) .d-add ins { background: #1c6b58; }
    :root:not([data-theme="light"]) .kb { filter: brightness(.8) saturate(1.3); }
    :root:not([data-theme="light"]) .risk--alto { background: #3a1517; color: #ff9da0; }
    :root:not([data-theme="light"]) .risk--medio { background: #3a2c10; color: #f3c56b; }
}

/* ---------- Notificações (sininho) ---------- */
.notif { position: relative; margin-left: -12px; }
.notif__btn { position: relative; }
.notif__badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: .7rem; font-weight: 700; line-height: 18px; text-align: center; border: 2px solid var(--surface); }
.notif__panel { position: absolute; top: calc(100% + 10px); right: 0; width: 380px; max-height: min(70vh, 520px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 60; overflow: hidden; }
.notif__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.notif__list { list-style: none; margin: 0; padding: 6px; overflow: auto; }
.notif__item { display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; align-items: start; padding: 10px; border-radius: 10px; }
.notif__item + .notif__item { margin-top: 2px; }
.notif__item.is-unread { background: var(--primary-soft); }
.notif__icon { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--primary); font-size: .95rem; }
.notif__body { min-width: 0; }
.notif__title { display: block; font-weight: 600; color: var(--ink); font-size: .92rem; line-height: 1.35; text-decoration: none; }
a.notif__title:hover { text-decoration: underline; }
.notif__text { margin: 2px 0 0; color: var(--ink-2); font-size: .85rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.notif__meta { display: block; margin-top: 4px; color: var(--muted); font-size: .76rem; }
.notif__mark { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.notif__mark:hover { color: var(--primary); border-color: var(--primary); }
.notif__empty { padding: 28px 16px; text-align: center; color: var(--muted); font-size: .9rem; }
@media (max-width: 1100px) {
    .notif { order: 2; margin-left: auto; }
    .site-header__inner:has(.notif) .nav-toggle { order: 3; margin-left: 0; }
    .notif__panel { position: fixed; top: 72px; left: 12px; right: 12px; width: auto; }
}

/* ---------- Área do usuário (v2.5) ---------- */
.avatar { --size: 28px; width: var(--size); height: var(--size); flex: 0 0 var(--size); border-radius: 50%; display: inline-grid; place-items: center; overflow: hidden; background: var(--grad); color: #fff; font-weight: 700; font-size: calc(var(--size) * .4); line-height: 1; letter-spacing: .02em; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.btn--account { gap: 8px; padding-left: 5px; }
.dash-head__who { display: flex; align-items: center; gap: 16px; }
.dash-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.dash-nav a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: .85rem; font-weight: 600; }
.dash-nav a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.panel { scroll-margin-top: 84px; }
.panel__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.panel__head .h4 { margin: 0; }
.fav-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-top: 8px; }
.fav-card { padding-right: 48px; }
.fav-card__link { color: var(--ink); }
.fav-card__link::after { content: ""; position: absolute; inset: 0; } /* card inteiro clicável */
.fav-card__remove { position: absolute; top: 12px; right: 12px; z-index: 1; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: #e8a317; font-size: 1.05rem; cursor: pointer; }
.fav-card__remove:hover { border-color: var(--danger); color: var(--danger); }
.fav-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.fav-btn svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.fav-btn:hover { border-color: #e8a317; color: var(--ink); }
.fav-btn[aria-pressed="true"] { border-color: #e8a317; background: color-mix(in srgb, #e8a317 12%, var(--surface)); color: var(--ink); }
.fav-btn[aria-pressed="true"] svg { fill: #e8a317; stroke: #e8a317; }
.tool-hero__meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tool-hero__meta .privacy-pill { margin: 0; }
.tool-hero .fav-btn { margin-top: 8px; }
.tool-hero__meta .fav-btn { margin-top: 0; }
.history { list-style: none; margin: 8px 0 12px; padding: 0; }
.history li { display: grid; grid-template-columns: 110px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.history li:last-child { border-bottom: 0; }
.history__body { display: flex; flex-direction: column; min-width: 0; }
.history__body .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history__kind { justify-self: start; }
@media (max-width: 600px) { .history li { grid-template-columns: 1fr auto; } .history__kind { display: none; } }
.avatar-edit { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 14px; }
.avatar-edit__form { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.avatar-edit__pick { position: relative; overflow: hidden; cursor: pointer; }
.avatar-edit__pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.theme-pick { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.theme-pick legend { font-weight: 600; margin-bottom: 6px; font-size: .92rem; }
.report-status { margin: 8px 0 0; color: var(--ink-2); }
.report-status:empty { display: none; }
.report-status.is-ok { color: #0a8f6f; }
.report-status.is-error { color: var(--danger); }

/* ---------- Área do usuário (v2.6) ---------- */
.dash-col { display: flex; flex-direction: column; }
.panel__head { margin-bottom: 10px; flex-wrap: wrap; }
.avatar-edit__label { font-weight: 600; font-size: .9rem; margin: 0 0 8px; }
.avatar-presets { display: grid; grid-template-columns: repeat(6, 44px); gap: 8px; margin-bottom: 12px; }
.avatar-presets__opt { position: relative; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; }
.avatar-presets__opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.avatar-presets__opt img { width: 44px; height: 44px; border-radius: 50%; display: block; border: 2px solid transparent; transition: transform .15s, border-color .15s; }
.avatar-presets__opt:hover img { transform: scale(1.08); }
.avatar-presets__opt input:checked + img { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.avatar-presets__opt input:focus-visible + img { outline: 2px solid var(--primary); outline-offset: 2px; }
.avatar-edit__upload { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 4px; }
.avatar-edit__upload .avatar-edit__form { margin: 0; }
@media (max-width: 420px) { .avatar-presets { grid-template-columns: repeat(4, 44px); } .avatar-edit { flex-direction: column; } }
.pw-change { margin: 16px 0 0; }
.pw-change > summary { list-style: none; display: inline-flex; }
.pw-change > summary::-webkit-details-marker { display: none; }
.pw-change[open] > summary { margin-bottom: 12px; }
.profile-data { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.profile-data__title { font-weight: 600; font-size: .9rem; margin: 0 0 8px; }
