/* Each subject has a consistent color in menus, cards and reading sections. */
:root{--paper:#f4f6fc;--ink:#183049;--muted:#52657a;--line:#d9e2ed;--green:#255fb4;--soft:#eaf1fb;--surface:#fff;--radius:20px}
html[data-theme=dark]{--paper:#101827;--ink:#edf3ff;--muted:#bdcbe0;--line:#344158;--green:#8cb9ff;--soft:#1c2940;--surface:#182338}
body{background:var(--paper)}.topbar{border-bottom:3px solid #4e8ed7;background:var(--surface)}.brand-symbol{background:linear-gradient(135deg,#2466a9,#6951aa);color:#fff}.brand-symbol span{color:#fff}.sidebar{background:var(--surface);border-right:1px solid var(--line)}
[data-tone]{--topic:#255fb4;--tint:#eff4ff;--edge:#c6d8f0}
[data-tone=cadastros]{--topic:#6b43a6;--tint:#f5f0fc;--edge:#ddcff0}
[data-tone=financeiro]{--topic:#177247;--tint:#edf8f1;--edge:#bde3ce}
[data-tone=relatorios]{--topic:#a34715;--tint:#fff4ea;--edge:#efd3b6}
[data-tone=comunicacao]{--topic:#ad3264;--tint:#fdf0f5;--edge:#f2cbda}
[data-tone=servicos]{--topic:#126d7c;--tint:#ecf7f9;--edge:#c2e2e7}
[data-tone=configuracoes]{--topic:#685722;--tint:#faf7e6;--edge:#e4d8ad}
html[data-theme=dark] [data-tone]{--topic:#9bc3ff;--tint:#1e324b;--edge:#365273}
html[data-theme=dark] [data-tone=cadastros]{--topic:#d0b3ff;--tint:#2b2742;--edge:#564971}
html[data-theme=dark] [data-tone=financeiro]{--topic:#8fe0b5;--tint:#1e3535;--edge:#355f51}
html[data-theme=dark] [data-tone=relatorios]{--topic:#ffc397;--tint:#352e2e;--edge:#6d5543}
html[data-theme=dark] [data-tone=comunicacao]{--topic:#ffb1cf;--tint:#362939;--edge:#6e4a63}
html[data-theme=dark] [data-tone=servicos]{--topic:#87dce8;--tint:#1e3540;--edge:#355c6a}
html[data-theme=dark] [data-tone=configuracoes]{--topic:#edd791;--tint:#32322c;--edge:#5c563d}
.nav-group{margin:12px 0;border:1px solid var(--edge);border-left:4px solid var(--topic);border-radius:12px;overflow:hidden}.nav-group summary{background:var(--tint);color:var(--topic)!important;padding:13px 10px;text-transform:none;font-size:16px;letter-spacing:0}.nav-group summary b{font-weight:650;flex:1}.nav-group summary .nav-subject-icon{font-size:19px;width:24px;flex:none}.nav-group summary .nav-count{background:var(--surface);border:1px solid var(--edge);border-radius:6px;padding:1px 6px;color:var(--topic)}.nav-link{margin:3px 5px;padding:10px;color:var(--muted)}.nav-link:before{background:var(--topic);border-color:var(--topic);border-radius:50%;width:5px;height:5px}.nav-link:hover,.nav-link.active,html[data-theme=dark] .nav-link.active{background:var(--tint);color:var(--topic);box-shadow:inset 3px 0 var(--topic)}
.topic-card{border-top:4px solid var(--topic);box-shadow:0 5px 15px #16355308}.topic-card .icon{background:var(--tint);color:var(--topic);width:42px;height:42px;font-size:23px;margin-bottom:12px}.topic-card:hover{border-color:var(--topic);box-shadow:0 8px 25px #142b4717}.topic-card h3{color:var(--ink);line-height:1.4}.subject-label{font-size:12px;font-weight:700;color:var(--topic);letter-spacing:.5px;text-transform:uppercase;margin-bottom:9px}.topic-card small span{color:var(--topic)}
.hero{border-radius:24px;background:linear-gradient(125deg,#eff5ff 0%,#f8f4fc 55%,#edf9f7 100%);padding:34px;gap:28px;margin-bottom:26px;border:1px solid var(--line)}.hero h1{font-size:clamp(34px,3.6vw,56px);letter-spacing:-1.8px}.hero h1 em{font-family:inherit;font-weight:750;font-style:normal;color:#3566af}.hero-badge{background:#dff4eb;color:#195f43}.hero-actions .primary{background:#255fb4;border-color:#255fb4;color:white}.stats-row{gap:12px;border:0;padding:0;display:grid;grid-template-columns:repeat(3,1fr)}.stats-row>div{padding:18px;background:var(--surface);border:1px solid var(--line);border-radius:15px;border-top:3px solid #496fc1}.stats-row>div:nth-child(2){border-top-color:#8d62be}.stats-row>div:nth-child(3){border-top-color:#1e9765}.stats-row strong{font-size:35px;color:#355c9c}
.profile-card{border-top:4px solid #7d52b6}.profile-card.admin{border-top:4px solid #286cba}.profile-card .tag{background:#f2e9fd;color:#634091;border-color:#cbb8e5}.profile-card.admin .tag{background:#e4efff;color:#26588f;border-color:#b5cbea}.profile-card.selected,.profile-card:hover{background:#eee7f9;color:#302746;border-color:#a185c2}.profile-card.admin.selected,.profile-card.admin:hover{background:#e5effe;color:#173e6b;border-color:#749aca}.profile-card.selected p,.profile-card:hover p{color:#53637a}.profile-card.selected .tag{background:#654592;color:white}.profile-card.admin.selected .tag{background:#286cba;color:white}.profile-card .watermark{color:#6d50a61a}.profile-card.admin .watermark{color:#3566af1a}
.article-head{border-left:5px solid var(--topic);background:var(--tint);padding:24px;border-radius:0 18px 18px 0;margin-bottom:24px}.article-head .eyebrow{color:var(--topic)}.article-head h1{font-size:clamp(32px,3vw,45px);margin:15px 0}.article-head p{margin:0 0 18px}.article-nav{border:1px solid var(--line);border-radius:12px;background:var(--surface);padding:12px;display:flex;flex-wrap:wrap;position:static;gap:8px}.article-nav a{padding:8px 12px;border-radius:8px;background:#eff4fd;color:#25568d;font-weight:650}.article-nav a:nth-child(2){background:#f3eefa;color:#684391}.article-nav a:nth-child(3){background:#ebf8f2;color:#216846}.article-nav a:nth-child(4){background:#fff4eb;color:#96501d}.article-nav a:nth-child(5){background:#fceef5;color:#a33364}.article-nav a:hover{outline:2px solid currentColor;outline-offset:1px}
.article-section{scroll-margin-top:110px}.article-section>h2{padding:12px 16px;border-radius:9px;border-left:4px solid #356dbc;background:#eff4fd;color:#204c85;font-size:25px}.article-section#campos>h2{background:#ebf7f0;border-color:#257954;color:#1a6243}.article-section#acoes>h2{background:#fff4ea;border-color:#b76a2d;color:#884514}.step-item{scroll-margin-top:110px;border:1px solid var(--line);border-left:3px solid #5f83ca;padding:22px;border-radius:12px;background:var(--surface);margin-bottom:15px}.step-number{background:#e5edfc;color:#315b9e;width:36px;height:36px}.step-item:nth-child(3n+2){border-left-color:#8d63b7}.step-item:nth-child(3n+2) .step-number{background:#eee6f8;color:#7149a4}.step-item:nth-child(3n+3){border-left-color:#338b67}.step-item:nth-child(3n+3) .step-number{background:#e6f4ec;color:#28714f}.field-group{border-left:4px solid #31916a}.field-group summary{background:#eef8f3;color:#235f47;padding:18px}.field-row:nth-child(even){background:#f5f9f7}.action-card{border-top:3px solid #c38a52}.action-card h3{color:#8f511f}.tip{border-left:4px solid #b28326;background:#fdf8ea;color:#725416}.example-card{background:#f8effb;border:1px solid #decaed;color:#6b4385}.example-card p{color:var(--ink)}.small-example{border-left:3px solid #805aad}.favorites-help{margin:12px 0 0;color:var(--muted);font-size:14px}.favorites-link{display:block;padding:12px 13px;border-radius:9px;border:1px solid var(--line);margin:10px 0;color:#7c4b99;font-size:15px;font-weight:650}.side-index a:hover{background:var(--soft);color:var(--green);border-radius:5px}.side-index a{padding:8px}.guide-companion{background:var(--tint);border-color:var(--edge)}
html[data-theme=dark] .hero{background:linear-gradient(125deg,#1b2c46,#29233c,#1a323a)}html[data-theme=dark] .hero h1 em{color:#788fc3}html[data-theme=dark] .stats-row strong{color:#7e98c3}html[data-theme=dark] .profile-card:hover,html[data-theme=dark] .profile-card.selected{background:#2c2943;color:#eee6ff}html[data-theme=dark] .profile-card.admin:hover,html[data-theme=dark] .profile-card.admin.selected{background:#203551;color:#edf4ff}html[data-theme=dark] .profile-card p,html[data-theme=dark] .profile-card:hover p{color:#c3cee0}html[data-theme=dark] .profile-card .tag{background:#3b2d50;color:#d9bfff}html[data-theme=dark] .profile-card.admin .tag{background:#274261;color:#b5d6ff}html[data-theme=dark] .article-nav{background:var(--surface)}html[data-theme=dark] .article-nav a{background:#223653;color:#b6d5ff}html[data-theme=dark] .article-nav a:nth-child(2){background:#322b4b;color:#d5baff}html[data-theme=dark] .article-nav a:nth-child(3){background:#223c39;color:#a1e2bd}html[data-theme=dark] .article-nav a:nth-child(4){background:#3b302d;color:#ffd0a6}html[data-theme=dark] .article-nav a:nth-child(5){background:#3a2a3c;color:#ffc2df}html[data-theme=dark] .article-section>h2{background:#203551;color:#c2dcff}html[data-theme=dark] .article-section#campos>h2,html[data-theme=dark] .field-group summary{background:#203936;color:#b1e9c7}html[data-theme=dark] .article-section#acoes>h2{background:#382f2a;color:#ffd3ad}html[data-theme=dark] .step-number{background:#2c4164;color:#c0d8ff}html[data-theme=dark] .step-item:nth-child(3n+2) .step-number{background:#3d3153;color:#dfc6ff}html[data-theme=dark] .step-item:nth-child(3n+3) .step-number{background:#284838;color:#b9eccb}html[data-theme=dark] .field-row:nth-child(even){background:#1e2e30}html[data-theme=dark] .action-card h3{color:#ffd1a8}html[data-theme=dark] .tip{background:#323029;color:#efdb9d}html[data-theme=dark] .example-card{background:#2e2940;border-color:#5d4b70}html[data-theme=dark] .favorites-link{color:#dcbdff}html[data-theme=dark] .guide-companion{background:var(--tint)}
@media(max-width:1200px){.hero{padding:25px}.hero h1{font-size:38px}.hero-actions{gap:10px}}@media(max-width:850px){.hero{grid-template-columns:1fr}.hero-art{max-width:540px;margin:15px auto}.article-section,.step-item{scroll-margin-top:130px}}@media(max-width:580px){.hero{padding:20px}.hero h1{font-size:34px}.stats-row{grid-template-columns:1fr}.stats-row>div{padding:12px}.article-head{padding:18px}.article-nav a{font-size:14px}.step-item{padding:16px}.article-section>h2{font-size:23px}.article-nav{gap:6px}.profile-card{padding:23px}}@media print{.hero,.article-head,.article-section>h2,.field-group summary,.step-item,.example-card{background:white!important;color:#183049!important;box-shadow:none!important}.favorites-help{display:none}}
.statement-source-notice{margin:20px 0;padding:18px 22px;border:1px solid #e5cf95;border-left:4px solid #a77b22;border-radius:12px;background:#fdf8ea;color:#624b20}.statement-source-notice strong{display:block;font-size:17px}.statement-source-notice p{margin:8px 0 0;line-height:1.65}html[data-theme=dark] .statement-source-notice{background:#323029;border-color:#6d5b36;color:#efdb9d}@media print{.statement-source-notice{break-inside:avoid;background:white;color:#183049}}
