/* ==========================================================================
   Calculador Online — sistema de design
   Direção: editorial financeiro. Papel quente, tinta, verde-esmeralda e latão.
   Tipografia: Fraunces (títulos e números) + Inter (interface e texto).
   ========================================================================== */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-wght-italic.woff2") format("woff2");
  font-weight: 100 900; font-style: italic; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: light dark;
  --paper: #F7F4EE;
  --paper-2: #EFEBE2;
  --surface: #FFFFFF;
  --ink: #15181D;
  --ink-2: #3A4049;
  --mute: #626873;
  --line: #E5E0D4;
  --line-2: #D3CCBC;

  --accent: #0E5A48;
  --accent-2: #0A4636;
  --accent-soft: #E2EEE8;
  --on-accent: #FFFFFF;

  --brass: #A8782A;
  --brass-text: #86601B;
  --brass-soft: #F4ECD8;

  --bad: #B3321F;

  --panel: #0F2B24;
  --panel-ink: #EAF3EE;
  --panel-mute: #A5BDB3;
  --panel-line: rgba(234, 243, 238, .14);
  --panel-neg: #FFB3A1;
  --panel-brass: #E2BE7A;

  --shadow: 0 1px 2px rgba(21, 24, 29, .05), 0 18px 40px -20px rgba(21, 24, 29, .22);
  --r: 12px;
  --r-lg: 20px;

  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0D1210;
    --paper-2: #131B18;
    --surface: #151E1B;
    --ink: #EDF0EB;
    --ink-2: #C5CCC6;
    --mute: #98A39C;
    --line: #24302B;
    --line-2: #34443D;

    --accent: #4FC79C;
    --accent-2: #7BE0BA;
    --accent-soft: #14291F;
    --on-accent: #052018;

    --brass: #D8B26A;
    --brass-text: #D8B26A;
    --brass-soft: #2A2517;

    --bad: #FF9A86;

    --panel: #12261F;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 40px -20px rgba(0, 0, 0, .6);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img, svg, video { max-width: 100%; }
a { color: var(--accent); text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-2); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -.015em; line-height: 1.12; margin: 0; text-wrap: balance; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums lining-nums; }
[hidden] { display: none !important; }

.wrap {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: max(22px, env(safe-area-inset-left), env(safe-area-inset-right));
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 10px; text-decoration: none; font-weight: 600; }
.skip:focus { top: 12px; }

.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Cabeçalho ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--paper) 84%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; flex: none; box-shadow: 0 0 0 1px var(--line-2); }
.brand-name { font: 500 1.3rem/1 var(--serif); letter-spacing: -.02em; }
.brand-name em { font-style: italic; font-weight: 400; color: var(--accent); margin-left: .18em; }

.nav { display: flex; align-items: center; gap: 2px; }
.nav a { padding: 9px 15px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-size: .94rem; font-weight: 500; transition: background .2s, color .2s; }
.nav a:hover { background: var(--paper-2); color: var(--ink); }
.nav a[aria-current] { color: var(--accent); background: var(--accent-soft); }
.nav-toggle { display: none; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); color: var(--ink); cursor: pointer; }
.nav-toggle .i-close { display: none; }
.nav-toggle[aria-expanded="true"] .i-open { display: none; }
.nav-toggle[aria-expanded="true"] .i-close { display: block; }

/* ---------- Botões, chips, rótulos ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 24px; border-radius: 12px; border: 1px solid transparent;
  font: 600 .98rem/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: transform .15s, background .2s, box-shadow .2s, border-color .2s, color .2s;
}
.btn .i { width: 18px; height: 18px; transition: transform .2s; }
.btn:hover .i { transform: translateX(3px); }
.btn-primary {
  background: var(--accent); color: var(--on-accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 12px 24px -12px color-mix(in srgb, var(--accent) 80%, transparent);
}
.btn-primary:hover { background: var(--accent-2); color: var(--on-accent); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--surface); border-color: var(--ink-2); color: var(--ink); }
.btn-block { width: 100%; }
.btn-light { background: var(--panel-ink); color: #0F2B24; }
.btn-light:hover { background: #fff; color: #0F2B24; transform: translateY(-1px); }

.eyebrow { font: 600 .76rem/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--brass-text); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--ink-2); font: 600 .88rem/1 var(--sans); cursor: pointer; transition: all .2s; }
.chip:hover { border-color: var(--ink-2); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tag { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font: 600 .72rem/1.2 var(--sans); letter-spacing: .04em; }
.tag.brass { background: var(--brass-soft); color: var(--brass-text); }

.ico { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }

/* ---------- Home: hero ---------- */
.hero { position: relative; isolation: isolate; padding: clamp(44px, 8vw, 96px) 0 clamp(48px, 7vw, 88px); }
.hero::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 100%; z-index: -1;
  background:
    radial-gradient(720px 380px at 84% 8%, color-mix(in srgb, var(--accent) 15%, transparent), transparent 70%),
    radial-gradient(520px 320px at 4% 96%, color-mix(in srgb, var(--brass) 13%, transparent), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero h1 { font-weight: 400; font-size: clamp(2.7rem, 6.2vw, 4.9rem); line-height: 1.02; letter-spacing: -.03em; margin: 18px 0 24px; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero .lede { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--ink-2); max-width: 52ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 34px 0 0; padding: 0; list-style: none; color: var(--mute); font-size: .9rem; font-weight: 500; }
.hero-facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts .i { width: 18px; height: 18px; color: var(--accent); }

/* Cartão de exemplo (livro-razão) */
.sample { position: relative; padding: 30px; border-radius: 24px; background: var(--panel); color: var(--panel-ink); box-shadow: 0 30px 60px -30px rgba(8, 30, 24, .55); transform: rotate(1.2deg); }
.sample::after { content: ""; position: absolute; inset: 10px -10px -10px 10px; z-index: -1; border-radius: 24px; border: 1px solid var(--line-2); }
.sample-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sample .res-total { margin-bottom: 18px; }
.sample-foot { margin-top: 18px; font-size: .78rem; color: var(--panel-mute); line-height: 1.5; }

/* ---------- Seções ---------- */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 34px; }
.sec-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); margin-top: 10px; }
.sec-head p { color: var(--mute); max-width: 46ch; margin-top: 12px; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; }
.link-arrow .i { width: 18px; height: 18px; transition: transform .2s; }
.link-arrow:hover .i { transform: translateX(3px); }

/* Bento de calculadoras */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.tool-card {
  position: relative; display: flex; flex-direction: column; gap: 16px; grid-column: span 3;
  padding: 26px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface);
  color: var(--ink); text-decoration: none; transition: transform .25s, border-color .25s, box-shadow .25s;
}
.tool-card:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: var(--shadow); color: var(--ink); }
.tool-card .tag { align-self: flex-start; }
.tool-card h3 { font-size: 1.4rem; }
.tool-card p { color: var(--mute); font-size: .95rem; line-height: 1.55; }
.tool-card .go-row { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 6px; }
.tool-card .go-row .i { width: 20px; height: 20px; color: var(--accent); transition: transform .2s; }
.tool-card:hover .go-row .i { transform: translateX(4px); }
.tool-card.featured { grid-column: span 6; grid-row: span 2; padding: 34px; background: var(--panel); border-color: transparent; color: var(--panel-ink); overflow: hidden; }
.tool-card.featured:hover { color: var(--panel-ink); }
.tool-card.featured .ico { background: rgba(255, 255, 255, .09); color: var(--panel-brass); width: 56px; height: 56px; border-radius: 16px; }
.tool-card.featured h3 { font-size: clamp(2rem, 3.4vw, 2.7rem); font-weight: 400; }
.tool-card.featured p { color: var(--panel-mute); font-size: 1.05rem; max-width: 40ch; }
.tool-card.featured .go-row .i { color: var(--panel-brass); }
.tool-card.featured::after { content: ""; position: absolute; right: -60px; bottom: -60px; width: 240px; height: 240px; border-radius: 50%; border: 1px solid var(--panel-line); box-shadow: 0 0 0 36px rgba(255, 255, 255, .02), 0 0 0 72px rgba(255, 255, 255, .015); pointer-events: none; }
.tool-card.featured .tag { background: rgba(255, 255, 255, .1); color: var(--panel-brass); }
.tool-card.wide { grid-column: span 4; }

/* Confiança */
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.trust-item { padding-top: 22px; border-top: 2px solid var(--ink); }
.trust-item .i { width: 26px; height: 26px; color: var(--accent); margin-bottom: 16px; }
.trust-item h3 { font-size: 1.35rem; margin-bottom: 8px; }
.trust-item p { color: var(--mute); font-size: .97rem; }

/* Lista editorial de guias */
.guide-list { border-top: 1px solid var(--ink); }
.guide {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 22px; align-items: baseline;
  padding: 24px 6px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none;
  transition: background .2s, padding .2s;
}
.guide:hover { background: color-mix(in srgb, var(--accent-soft) 55%, transparent); padding-inline: 16px; color: var(--ink); }
.guide .n { font: 400 1rem var(--serif); color: var(--brass-text); font-variant-numeric: tabular-nums; }
.guide h3 { font-size: clamp(1.15rem, 2vw, 1.45rem); transition: color .2s; }
.guide:hover h3 { color: var(--accent); }
.guide p { margin-top: 6px; color: var(--mute); font-size: .95rem; max-width: 70ch; }
.guide .meta { font-size: .82rem; color: var(--mute); white-space: nowrap; display: flex; align-items: center; gap: 12px; }
.guide .meta .i { width: 18px; height: 18px; color: var(--accent); transition: transform .2s; }
.guide:hover .meta .i { transform: translateX(4px); }

/* Faixa final */
.band { padding: clamp(36px, 5vw, 60px); border-radius: 28px; background: var(--panel); color: var(--panel-ink); display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; position: relative; overflow: hidden; }
.band::before { content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--panel-brass) 22%, transparent), transparent 70%); }
.band h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 400; max-width: 22ch; position: relative; }
.band h2 em { font-style: italic; color: var(--panel-brass); }
.band .btn { position: relative; }

/* ---------- Cabeçalho de página, migalhas ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 4px 0; list-style: none; margin: 0; padding: 26px 0 0; font-size: .86rem; color: var(--mute); }
.crumbs a { color: var(--mute); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs li + li::before { content: "/"; margin: 0 9px; opacity: .45; }
.crumbs li[aria-current] { color: var(--ink-2); }
.page-head { padding: 26px 0 44px; }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.7rem); font-weight: 400; letter-spacing: -.028em; line-height: 1.04; margin-top: 14px; max-width: 20ch; }
.page-head.wide h1 { max-width: 26ch; }
.page-head .lede { font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--ink-2); max-width: 62ch; margin-top: 18px; }
.meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.meta-line .sep { opacity: .4; }
.meta-line .t { display: inline-flex; align-items: center; gap: 6px; color: var(--mute); font: 500 .84rem var(--sans); letter-spacing: 0; text-transform: none; }
.meta-line .t .i { width: 16px; height: 16px; }

/* ---------- Ferramenta (calculadora) ---------- */
.tool { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 28px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 30px; box-shadow: var(--shadow); }
.panel > h2 { font-size: 1.4rem; margin-bottom: 22px; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 16px; }
.grid + .grid, .field + .grid, .grid + .field { margin-top: 20px; }
.full { grid-column: 1 / -1; }
.field { min-width: 0; }
label, .lbl { display: block; font: 600 .84rem/1.3 var(--sans); color: var(--ink-2); margin-bottom: 9px; }
.hint { margin-top: 8px; font-size: .8rem; color: var(--mute); line-height: 1.45; }

input[type=text], input[type=number], input[type=date] {
  width: 100%; height: 52px; padding: 0 14px; font: 500 1.05rem var(--sans); font-variant-numeric: tabular-nums;
  color: var(--ink); background: var(--paper); border: 1px solid var(--line-2); border-radius: 12px;
  transition: border-color .15s, box-shadow .15s, background .15s; -webkit-appearance: none; appearance: none;
}
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input:hover { border-color: var(--mute); }
input:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
input::placeholder { color: var(--mute); opacity: .55; font-weight: 400; }
input[type=date] { min-height: 52px; }

.moeda { position: relative; display: block; }
.moeda::before { content: "R$"; position: absolute; left: 15px; top: 50%; transform: translateY(-50%); font: 600 .88rem var(--sans); color: var(--mute); pointer-events: none; }
.moeda input { padding-left: 46px; }

.seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 14px; }
.seg button { flex: 1 1 auto; min-height: 42px; padding: 8px 14px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); font: 600 .88rem/1.2 var(--sans); cursor: pointer; transition: background .2s, color .2s, box-shadow .2s; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--surface); color: var(--accent); box-shadow: 0 1px 2px rgba(0, 0, 0, .1), 0 0 0 1px var(--line-2); }
.seg.lg { margin-bottom: 26px; }

.go { margin-top: 28px; }
.err { color: var(--bad); font-weight: 600; font-size: .92rem; margin-top: 14px; min-height: 1.2em; }

/* Resultado */
.result { position: sticky; top: 92px; background: var(--panel); color: var(--panel-ink); border-radius: var(--r-lg); padding: 32px; box-shadow: 0 30px 60px -30px rgba(8, 30, 24, .5); min-height: 280px; }
.empty { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 8px 0; }
.empty .ico { background: rgba(255, 255, 255, .08); color: var(--panel-brass); }
.empty h2 { font-size: 1.5rem; font-weight: 400; }
.empty p { color: var(--panel-mute); font-size: .95rem; max-width: 34ch; }
.res-label { font: 600 .76rem/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--panel-brass); }
.res-total { display: block; font: 400 clamp(2.5rem, 5vw, 3.5rem)/1.05 var(--serif); letter-spacing: -.025em; margin: 10px 0 24px; font-variant-numeric: tabular-nums lining-nums; overflow-wrap: anywhere; }
.ledger .row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-top: 1px solid var(--panel-line); font-size: .94rem; opacity: 0; transform: translateY(6px); animation: rise .4s forwards; }
.ledger .row span { color: var(--panel-mute); flex: 1; min-width: 0; }
.ledger .row b { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ledger .row.neg b { color: var(--panel-neg); }
.ledger .row.sum { border-top: 1px solid var(--panel-ink); }
.obs { margin: 22px 0 0; padding: 14px 16px; border-radius: 12px; background: rgba(255, 255, 255, .06); border-left: 3px solid var(--panel-brass); color: var(--panel-mute); font-size: .87rem; line-height: 1.6; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Conteúdo (artigos e textos) ---------- */
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(40px, 6vw, 84px); align-items: start; }
.content-layout.solo { grid-template-columns: minmax(0, 1fr); }
.prose { font-size: 1.07rem; line-height: 1.78; color: var(--ink-2); max-width: 68ch; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { font-size: clamp(1.6rem, 3vw, 2rem); color: var(--ink); margin-top: 2.5em; scroll-margin-top: 96px; }
.prose > h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.28rem; color: var(--ink); margin-top: 1.8em; }
.prose h2 + *, .prose h3 + * { margin-top: .7em; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .55em 0; padding-left: .2em; }
.prose li::marker { color: var(--brass); }
.prose a { font-weight: 500; }
.prose small { color: var(--mute); }
.prose code { font: 500 .9em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--paper-2); padding: .15em .4em; border-radius: 6px; color: var(--ink); }
.prose .cta { display: inline-flex; }
.prose.legal h2 { font-size: 1.45rem; margin-top: 2.1em; }
.prose.legal { font-size: 1.02rem; }
.disclaimer { margin-top: 2.4em; padding: 16px 18px; border-radius: 14px; background: var(--paper-2); border: 1px solid var(--line); color: var(--mute); font-size: .9rem; line-height: 1.6; }

.faq { margin-top: 1.2em; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 2px; font: 500 1.12rem/1.35 var(--serif); color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .i { width: 20px; height: 20px; color: var(--accent); transition: transform .25s; }
.faq details[open] summary .i { transform: rotate(180deg); }
.faq .a { padding: 0 2px 20px; color: var(--ink-2); font-size: 1rem; line-height: 1.7; }
.faq .a p + p { margin-top: .8em; }

.toc { position: sticky; top: 96px; font-size: .92rem; }
.toc-title { font: 600 .74rem/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); margin-bottom: 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 7px 0 7px 16px; margin-left: -1px; border-left: 2px solid transparent; color: var(--mute); text-decoration: none; line-height: 1.4; transition: color .2s, border-color .2s; }
.toc a:hover { color: var(--ink); }
.toc a.on { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
.side-card { margin-top: 30px; padding: 22px; border-radius: 18px; background: var(--panel); color: var(--panel-ink); }
.side-card .res-label { display: block; margin-bottom: 8px; }
.side-card strong { display: block; font: 400 1.35rem/1.2 var(--serif); margin-bottom: 16px; }
.side-card .btn { min-height: 44px; font-size: .9rem; padding: 0 18px; width: 100%; }

.cta-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 2.6em; padding: 26px 28px; border-radius: 20px; background: var(--panel); color: var(--panel-ink); }
.cta-card .res-label { display: block; margin-bottom: 6px; }
.cta-card strong { font: 400 1.5rem/1.2 var(--serif); }

/* ---------- Relacionados ---------- */
.related { margin-top: clamp(56px, 8vw, 96px); padding-top: 40px; border-top: 1px solid var(--line); padding-bottom: 8px; }
.related h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 24px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.mini-card { display: flex; flex-direction: column; gap: 10px; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); text-decoration: none; transition: transform .25s, border-color .25s, box-shadow .25s; }
.mini-card:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: var(--shadow); color: var(--ink); }
.mini-card h3 { font-size: 1.15rem; line-height: 1.25; }
.mini-card p { color: var(--mute); font-size: .9rem; line-height: 1.5; }
.mini-card .meta { margin-top: auto; padding-top: 6px; font-size: .8rem; color: var(--mute); }

.contact-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 48px; }
.contact-card { padding: 26px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); display: flex; flex-direction: column; gap: 10px; }
.contact-card h2 { font-size: 1.3rem; }
.contact-card p { color: var(--mute); font-size: .95rem; }
.contact-card a.mail { font: 500 1.05rem var(--sans); color: var(--accent); word-break: break-all; }

/* ---------- Rodapé ---------- */
.site-footer { margin-top: clamp(56px, 8vw, 104px); border-top: 1px solid var(--line); background: var(--paper-2); padding: 56px 0 calc(34px + env(safe-area-inset-bottom, 0px)); }
.foot-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 40px; }
.foot-grid h2 { font: 600 .74rem/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); margin-bottom: 16px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot-grid a { color: var(--ink-2); text-decoration: none; font-size: .95rem; }
.foot-grid a:hover { color: var(--accent); text-decoration: underline; }
.foot-brand p { color: var(--mute); font-size: .92rem; max-width: 38ch; margin-top: 16px; line-height: 1.6; }
.foot-base { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; color: var(--mute); font-size: .84rem; }

/* ---------- Aviso de cookies ---------- */
#cookie {
  position: fixed; left: max(16px, env(safe-area-inset-left)); bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: min(440px, calc(100% - 32px)); z-index: 60; padding: 22px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); border-radius: 18px;
  box-shadow: 0 24px 60px -16px rgba(0, 0, 0, .35); animation: rise .4s forwards; opacity: 0; transform: translateY(8px);
}
#cookie p { margin: 0 0 16px; font-size: .9rem; line-height: 1.55; color: var(--ink-2); }
#cookie .bt { display: flex; gap: 10px; }
#cookie button { flex: 1; min-height: 44px; border-radius: 11px; font: 600 .92rem var(--sans); cursor: pointer; border: 1px solid var(--line-2); transition: background .2s, transform .15s; }
#cookie .ok { background: var(--accent); color: var(--on-accent); border-color: transparent; }
#cookie .ok:hover { background: var(--accent-2); }
#cookie .no { background: transparent; color: var(--ink); }
#cookie .no:hover { background: var(--paper-2); }

/* ---------- Responsivo ---------- */
@media (max-width: 1020px) {
  .content-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .sample { max-width: 460px; transform: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .tool { grid-template-columns: minmax(0, 1fr); }
  .result { position: static; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .tool-card, .tool-card.wide { grid-column: span 1; }
  .tool-card.featured { grid-column: 1 / -1; grid-row: auto; }
  .trust { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 820px) {
  .js .nav-toggle { display: inline-grid; }
  .js .nav { position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 2px; padding: 12px 22px 22px; background: var(--paper); border-bottom: 1px solid var(--line); display: none; }
  .js .nav.open { display: flex; }
  .js .nav a { padding: 14px 12px; border-radius: 10px; font-size: 1.02rem; }
  .bar { flex-wrap: wrap; padding-block: 8px; }
  .nav { flex-wrap: wrap; }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .panel, .result { padding: 22px; }
  .guide { grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding-inline: 2px; }
  .guide .meta { grid-column: 2; }
  .foot-grid { grid-template-columns: 1fr; gap: 32px; }
  .sample { padding: 22px; }
  .cta-card { padding: 22px; }
  #cookie { left: 12px; right: 12px; width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .ledger .row { opacity: 1; transform: none; }
}

@media print {
  .site-header, .site-footer, #cookie, .toc, .related, .cta-card, .nav-toggle { display: none !important; }
  body { background: #fff; color: #000; }
  .result { background: #fff; color: #000; border: 1px solid #999; box-shadow: none; }
  .res-label, .ledger .row span, .obs { color: #333; }
}

/* ---------- Investimentos: simulador, faixa e pilares ---------- */
.tool-card.banner { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 14px 22px; padding: 22px 28px; }
.tool-card.banner p { flex: 1; min-width: 240px; }
.tool-card.banner .go-row { margin-top: 0; padding-top: 0; }
.tool-card.banner h3 { font-size: 1.35rem; }
.info-box { margin: 12px 0 0; padding: 14px 16px; border-radius: 12px; background: var(--brass-soft); border-left: 3px solid var(--brass); color: var(--ink-2); font-size: .88rem; line-height: 1.55; }
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pillar { display: flex; flex-direction: column; gap: 12px; padding: 30px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: var(--ink); text-decoration: none; transition: transform .25s, border-color .25s, box-shadow .25s; }
.pillar:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: var(--shadow); color: var(--ink); }
.pillar .tag { align-self: flex-start; }
.pillar h3 { font-size: 1.55rem; }
.pillar p { color: var(--mute); max-width: 44ch; }
.pillar ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 10px 0 0; padding: 0; }
.pillar li { padding: 6px 13px; border: 1px solid var(--line-2); border-radius: 999px; font-size: .84rem; font-weight: 500; color: var(--ink-2); }
@media (max-width: 900px) { .pillars { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .tool-card.banner { flex-direction: column; align-items: flex-start; } }
