/* =========================================================
   Roda da Vida Online — folha de estilo única do site
   Sem framework, sem build. Editar direto.
   ========================================================= */

:root {
    --bg: #0b0716;
    --bg-2: #140b2b;
    --panel: rgba(255, 255, 255, 0.045);
    --panel-strong: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.10);
    --border-strong: rgba(255, 255, 255, 0.18);
    --text: #e7e3f4;
    --text-dim: #a89fc4;
    --text-faint: #7d75a0;
    --brand: #a78bfa;
    --brand-strong: #8b5cf6;
    --brand-deep: #6d28d9;
    --accent: #38bdf8;
    --ok: #34d399;
    --warn: #fbbf24;
    --bad: #f87171;
    --radius: 16px;
    --radius-lg: 24px;
    --shadow: 0 18px 50px rgba(0, 0, 0, .45);
    --maxw: 1180px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    background-image:
        radial-gradient(ellipse 80% 60% at 80% -10%, rgba(109, 40, 217, .55), transparent 60%),
        radial-gradient(ellipse 70% 50% at 0% 0%, rgba(56, 189, 248, .18), transparent 55%);
    background-repeat: no-repeat;
    background-attachment: fixed;
    line-height: 1.65;
    font-size: 17px;
    min-height: 100vh;
    overflow-x: hidden;
}

::selection { background: rgba(139, 92, 246, .4); }

img, canvas, svg { max-width: 100%; display: block; }

a { color: var(--brand); text-decoration: none; }
a:hover { color: #c4b5fd; text-decoration: underline; }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0d0820; }
::-webkit-scrollbar-thumb { background: #322a52; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #463b6f; }

/* ─── Layout ─── */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 999;
    background: var(--brand-strong); color: #fff; padding: 10px 18px; border-radius: 0 0 12px 0;
}
.skip-link:focus { left: 0; }

/* ─── Cabeçalho ─── */
.site-header {
    position: sticky; top: 0; z-index: 60;
    background: rgba(11, 7, 22, .78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}
.site-header .wrap {
    height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.14rem; color: #fff; }
.logo:hover { text-decoration: none; color: #fff; }
.logo-mark {
    width: 34px; height: 34px; border-radius: 10px; flex: 0 0 34px;
    background: conic-gradient(from 200deg, #8b5cf6, #38bdf8, #34d399, #fbbf24, #8b5cf6);
    display: grid; place-items: center;
}
.logo-mark::after { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); }
.logo span { color: var(--brand); }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
    color: var(--text-dim); font-size: .93rem; font-weight: 500;
    padding: 8px 12px; border-radius: 10px; white-space: nowrap;
}
.nav a:hover { color: #fff; background: var(--panel-strong); text-decoration: none; }
.nav a[aria-current="page"] { color: #fff; background: rgba(139, 92, 246, .22); }

.nav-toggle {
    display: none; background: var(--panel-strong); border: 1px solid var(--border);
    color: var(--text); width: 42px; height: 38px; border-radius: 10px; cursor: pointer;
    font-size: 1.15rem; line-height: 1;
}

@media (max-width: 900px) {
    .nav-toggle { display: block; }
    .nav {
        position: absolute; top: 64px; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 2px;
        background: #120c26; border-bottom: 1px solid var(--border);
        padding: 10px 16px 16px; display: none;
    }
    .nav.open { display: flex; }
    .nav a { padding: 12px 14px; font-size: 1rem; }
}

/* ─── Tipografia ─── */
h1, h2, h3, h4 { color: #fff; line-height: 1.25; font-weight: 700; letter-spacing: -.02em; }
h1 { font-size: clamp(1.85rem, 4.4vw, 2.85rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.95rem); margin-top: 2.4em; margin-bottom: .6em; }
h3 { font-size: 1.18rem; margin-top: 1.9em; margin-bottom: .45em; }
h4 { font-size: 1.02rem; margin-top: 1.4em; margin-bottom: .3em; }
p { margin-bottom: 1.05em; color: var(--text-dim); }
strong { color: #efeafd; font-weight: 600; }

.lead { font-size: 1.12rem; color: #c9c1e4; }

ul, ol { margin: 0 0 1.2em 1.35em; color: var(--text-dim); }
li { margin-bottom: .5em; }
li::marker { color: var(--brand); }

blockquote {
    border-left: 3px solid var(--brand-strong);
    padding: 4px 0 4px 18px; margin: 1.4em 0; color: #c9c1e4; font-style: italic;
}

hr { border: 0; border-top: 1px solid var(--border); margin: 2.5em 0; }

/* ─── Painéis ─── */
.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 26px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.panel-tight { padding: 18px; border-radius: var(--radius); }

.callout {
    border: 1px solid rgba(139, 92, 246, .35);
    background: rgba(139, 92, 246, .10);
    border-radius: var(--radius);
    padding: 18px 20px;
    margin: 1.6em 0;
}
.callout h3, .callout h4 { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }

/* ─── Botões ─── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font: inherit; font-size: .95rem; font-weight: 600;
    padding: 11px 20px; border-radius: 12px; border: 1px solid transparent;
    cursor: pointer; transition: transform .12s ease, background .18s ease, border-color .18s ease;
    text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
    background: linear-gradient(135deg, var(--brand-strong), var(--brand-deep));
    color: #fff; box-shadow: 0 10px 26px rgba(109, 40, 217, .38);
}
.btn-primary:hover { color: #fff; background: linear-gradient(135deg, #9b71ff, #7c33e8); }
.btn-ghost { background: var(--panel-strong); border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, .13); color: #fff; }
.btn-sm { padding: 8px 14px; font-size: .86rem; border-radius: 10px; }
.btn-block { width: 100%; }

/* ─── Hero ─── */
.hero { padding: 46px 0 6px; text-align: center; }
.hero h1 { margin-bottom: .45em; }
.hero .lead { max-width: 760px; margin: 0 auto 1.4em; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 8px; }
.badge {
    font-size: .8rem; font-weight: 600; color: var(--text-dim);
    background: var(--panel-strong); border: 1px solid var(--border);
    padding: 5px 12px; border-radius: 999px;
}
.badge b { color: var(--brand); font-weight: 700; }

/* ─── Ferramenta ─── */
.tool-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
    gap: 24px;
    align-items: start;
}
@media (max-width: 940px) { .tool-grid { grid-template-columns: 1fr; } }

.wheel-box { position: relative; }
.wheel-stage {
    aspect-ratio: 1 / 1;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    position: relative;
}
#wheel { width: 100%; height: 100%; cursor: crosshair; touch-action: manipulation; border-radius: 50%; }

.wheel-toolbar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }

.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.summary-item {
    background: rgba(0, 0, 0, .25); border: 1px solid var(--border);
    border-radius: 12px; padding: 12px 10px; text-align: center;
}
.summary-item .k { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-faint); }
.summary-item .v { font-size: 1.32rem; font-weight: 700; color: #fff; margin-top: 2px; line-height: 1.2; }
.summary-item .v.small { font-size: .98rem; }
@media (max-width: 480px) { .summary { grid-template-columns: 1fr; } }

/* Lista de áreas */
.areas-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.areas-head h2 { margin: 0; font-size: 1.2rem; }

.area {
    background: rgba(0, 0, 0, .22); border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 13px; padding: 12px 14px; margin-bottom: 10px;
    transition: border-color .18s ease;
}
.area:hover { border-color: rgba(167, 139, 250, .35); }
.area-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.area-dot { width: 11px; height: 11px; border-radius: 3px; flex: 0 0 11px; }
.area-name {
    flex: 1; min-width: 0; background: transparent; border: none; outline: none;
    color: var(--text); font: inherit; font-size: .95rem; font-weight: 600; padding: 2px 0;
    border-bottom: 1px dashed transparent;
}
.area-name:focus { border-bottom-color: var(--brand); }
.area-del {
    background: transparent; border: none; color: var(--text-faint); cursor: pointer;
    padding: 4px 6px; border-radius: 8px; font-size: 1rem; line-height: 1;
}
.area-del:hover { color: var(--bad); background: rgba(248, 113, 113, .12); }
.area-bottom { display: flex; align-items: center; gap: 12px; }
.area-val { font-weight: 700; font-size: .95rem; min-width: 2.4ch; text-align: right; }
.v-bad { color: var(--bad); }
.v-mid { color: var(--warn); }
.v-good { color: var(--ok); }

input[type=range] {
    -webkit-appearance: none; appearance: none;
    width: 100%; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .12);
    outline: none; cursor: pointer;
}
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--brand); border: 2px solid #fff; cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .45);
}
input[type=range]::-moz-range-thumb {
    width: 16px; height: 16px; border-radius: 50%;
    background: var(--brand); border: 2px solid #fff; cursor: pointer;
}
input[type=range]:focus-visible { box-shadow: 0 0 0 3px rgba(167, 139, 250, .35); }

/* Modelos prontos */
.presets { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.preset {
    font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer;
    background: var(--panel-strong); border: 1px solid var(--border);
    color: var(--text-dim); padding: 6px 13px; border-radius: 999px;
}
.preset:hover { color: #fff; border-color: var(--brand); background: rgba(139, 92, 246, .18); }
.preset[aria-pressed="true"] { color: #fff; background: rgba(139, 92, 246, .3); border-color: var(--brand); }

/* Diagnóstico */
.diag { margin-top: 18px; }
.diag-row {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 12px 0; border-top: 1px solid var(--border);
}
.diag-row:first-child { border-top: none; }
.diag-icon { flex: 0 0 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: .8rem; }
.diag-row p { margin: 0; font-size: .93rem; }

/* ─── Conteúdo editorial ─── */
.article { max-width: 780px; margin: 0 auto; }
.article-meta { color: var(--text-faint); font-size: .88rem; margin-bottom: 1.6em; }

.toc {
    background: rgba(0, 0, 0, .25); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px 22px; margin: 1.8em 0 2.4em;
}
.toc strong { display: block; margin-bottom: .5em; color: #fff; font-size: .95rem; }
.toc ol { margin-bottom: 0; }
.toc a { color: var(--text-dim); }
.toc a:hover { color: var(--brand); }

/* Tabela */
.table-scroll { overflow-x: auto; margin: 1.5em 0; }
table { border-collapse: collapse; width: 100%; min-width: 480px; font-size: .93rem; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); }
th { color: #fff; font-weight: 600; background: rgba(255, 255, 255, .04); }
td { color: var(--text-dim); }
tbody tr:hover td { background: rgba(255, 255, 255, .025); }

/* Cartões */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin: 1.6em 0; }
.card {
    background: var(--panel); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px;
}
.card h3 { margin-top: 0; font-size: 1.05rem; }
.card p { font-size: .93rem; margin-bottom: 0; }
.card-link { display: block; }
.card-link:hover { text-decoration: none; border-color: var(--brand); background: var(--panel-strong); }
.card-link:hover h3 { color: var(--brand); }

/* FAQ */
.faq { margin: 1.6em 0; }
.faq details {
    border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--panel); margin-bottom: 10px; overflow: hidden;
}
.faq summary {
    cursor: pointer; padding: 16px 20px; font-weight: 600; color: #fff;
    list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--brand); font-size: 1.3rem; font-weight: 400; line-height: 1; }
.faq details[open] summary::after { content: '\2212'; }
.faq details > div { padding: 0 20px 18px; }
.faq details > div p:last-child { margin-bottom: 0; }

/* ─── Anúncios ─── */
.ad {
    margin: 30px auto;
    text-align: center;
    min-height: 0;
    overflow: hidden;
}
.ad:empty { display: none; }
.ad-label {
    display: block; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
    color: var(--text-faint); margin-bottom: 6px;
}
.ad-side { position: sticky; top: 84px; }
@media (max-width: 1100px) { .ad-side-wrap { display: none; } }

/* ─── Rodapé ─── */
.site-footer {
    margin-top: 72px; border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, .28); padding: 46px 0 32px;
}
.footer-grid {
    display: grid; grid-template-columns: 1.4fr repeat(2, 1fr); gap: 32px; margin-bottom: 34px;
}
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; gap: 24px; } }
.site-footer h4 { margin: 0 0 .7em; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-faint); }
.site-footer ul { list-style: none; margin: 0; }
.site-footer li { margin-bottom: .45em; }
.site-footer a { color: var(--text-dim); font-size: .93rem; }
.site-footer a:hover { color: var(--brand); }
.site-footer p { font-size: .92rem; }
.footer-bottom {
    border-top: 1px solid var(--border); padding-top: 22px;
    display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
    color: var(--text-faint); font-size: .86rem;
}

/* ─── Aviso (toast) ─── */
.toast {
    position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px);
    background: #1b1235; border: 1px solid var(--border-strong); color: #fff;
    padding: 13px 22px; border-radius: 13px; box-shadow: var(--shadow);
    font-size: .93rem; font-weight: 500; z-index: 200;
    opacity: 0; pointer-events: none; transition: opacity .22s ease, transform .22s ease;
    max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { border-color: rgba(52, 211, 153, .5); }
.toast.err { border-color: rgba(248, 113, 113, .5); }

/* ─── Utilitários ─── */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 22px; }
.mb-0 { margin-bottom: 0; }
.muted { color: var(--text-faint); font-size: .9rem; }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.cta-band {
    background: linear-gradient(135deg, rgba(109, 40, 217, .35), rgba(56, 189, 248, .15));
    border: 1px solid rgba(167, 139, 250, .3);
    border-radius: var(--radius-lg); padding: 30px; text-align: center; margin: 2.6em 0;
}
.cta-band h2 { margin-top: 0; }
.cta-band p { max-width: 560px; margin-left: auto; margin-right: auto; }

/* ─── Impressão ─── */
@media print {
    body { background: #fff !important; color: #111; font-size: 12pt; }
    .site-header, .site-footer, .ad, .wheel-toolbar, .presets, .areas-head button,
    .nav, .toast, .no-print { display: none !important; }
    .panel, .card { border: 1px solid #ccc; box-shadow: none; background: #fff; }
    h1, h2, h3, h4 { color: #111; }
    p, li, td { color: #333; }
    a { color: #111; text-decoration: none; }
    .tool-grid { grid-template-columns: 1fr; }
}
