:root {
  --bg: #edf1f5;
  --paper: #ffffff;
  --ink: #142233;
  --muted: #4f6278;
  --line: #d2dbe4;
  --line-2: #e3e9ef;
  --slate: #16263a;
  --slate-2: #1f3349;
  --slate-3: #2c4460;
  --on-dark: #e8eef5;
  --on-dark-mute: #9fb2c6;
  --mint: #48d8a8;
  --mint-ink: #0a7552;
  --mint-soft: #ddf3ea;
  --inv: #6d87a5;
  --neg: #a63d3a;
  --sans: 'Schibsted Grotesk', system-ui, sans-serif;
  --serif: 'Newsreader', Georgia, serif;
  --w: 1140px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.55 var(--sans); overflow-x: hidden; }
a { color: var(--mint-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--mint-ink); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--w); margin: 0 auto; padding: 0 24px; }
h1, h2, h3 { font-family: var(--sans); line-height: 1.08; letter-spacing: -0.025em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2.05rem, 4.8vw, 3.6rem); }
h1 em { font: italic 400 1.04em/1 var(--serif); letter-spacing: -0.01em; color: var(--mint-ink); }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); }
h3 { font-size: 1.15rem; }
.lede { font: 400 1.2rem/1.5 var(--serif); color: var(--muted); max-width: 36em; margin: 0 0 1.6rem; }
.num, table { font-variant-numeric: lining-nums; }

/* Topo */
.top { background: var(--paper); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--slate); text-decoration: none; font-weight: 750; font-size: 1.22rem; letter-spacing: -0.02em; }
.brand i { font: italic 400 1.08em var(--serif); color: var(--mint-ink); }
.nav { display: flex; gap: 2px; }
.nav a { color: var(--ink); text-decoration: none; padding: 8px 12px; font-weight: 550; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--line); }
.nav a[aria-current] { border-bottom-color: var(--mint-ink); color: var(--slate); }

/* Formulários */
label { display: grid; gap: 6px; font-weight: 600; font-size: .94rem; color: var(--ink); }
label small { font-weight: 400; color: var(--muted); }
.field { display: flex; align-items: center; background: var(--paper); border: 1.5px solid var(--line); border-radius: 4px; min-height: 48px; }
.field:focus-within { border-color: var(--slate-3); box-shadow: 0 0 0 3px var(--mint-soft); }
.field > span { padding: 0 12px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.money > span:first-child { padding-right: 0; }
input, select { font: 500 1.06rem var(--sans); color: var(--ink); }
.field input { border: 0; background: transparent; padding: 11px 12px; width: 100%; min-width: 0; outline: none; }
select { background: var(--paper); border: 1.5px solid var(--line); border-radius: 4px; padding: 0 34px 0 12px; min-height: 48px; appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 21px, calc(100% - 12px) 21px; background-size: 5px 5px; background-repeat: no-repeat; }
select:focus { border-color: var(--slate-3); box-shadow: 0 0 0 3px var(--mint-soft); outline: none; }
.pair { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.help { font-size: .87rem; color: var(--muted); margin: 0; font-weight: 400; line-height: 1.45; }

/* Hero e calculadora de juros */
.hero { padding: 48px 0 40px; }
.hero h1 { max-width: 13em; }
.jc { display: grid; grid-template-columns: minmax(250px, 300px) 1fr; gap: 28px 32px; align-items: start; }
.jc-form { display: grid; gap: 16px; padding-top: 4px; }
.jc > *, .cmp > *, .meta > * { min-width: 0; }
.ledger { grid-column: 1 / -1; }

.statement { background: var(--slate); color: var(--on-dark); border-radius: 4px; padding: 22px 24px 18px; border-top: 3px solid var(--mint); }
.st-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 16px; flex-wrap: wrap; border-bottom: 1px solid var(--slate-3); padding-bottom: 12px; }
.st-head p { margin: 0; }
.st-when { font-weight: 700; font-size: 1.05rem; color: #fff; }
.st-rate { color: var(--on-dark-mute); font-size: .9rem; }
.st-figs { display: grid; grid-template-columns: 1fr 1fr 1.25fr; margin: 16px 0 6px; }
.st-figs div { padding: 0 16px; border-left: 1px solid var(--slate-3); min-width: 0; }
.st-figs div:first-child { padding-left: 0; border-left: 0; }
.st-figs dt { font-size: .84rem; color: var(--on-dark-mute); }
.st-figs dd { margin: 2px 0 0; font-weight: 650; font-size: clamp(1.1rem, 2.1vw, 1.45rem); letter-spacing: -0.02em; color: #fff; white-space: nowrap; }
.st-figs .f-jur dd { color: var(--mint); }
.st-figs .f-jur[data-share]::after { content: attr(data-share); display: block; font-size: .78rem; color: var(--on-dark-mute); margin-top: 2px; }
.st-figs .f-tot dd { font-size: clamp(1.45rem, 3vw, 2.15rem); font-weight: 750; }
.chart { margin: 8px 0 0; min-height: 210px; touch-action: pan-y; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; cursor: crosshair; }
.chart .g { stroke: var(--slate-3); stroke-width: 1; stroke-dasharray: 2 4; }
.chart .axis { stroke: var(--slate-3); }
.chart text { fill: var(--on-dark-mute); font: 500 12px var(--sans); }
.chart .a-inv { fill: var(--inv); opacity: .55; }
.chart .a-juros { fill: var(--mint); opacity: .9; }
.chart .l-tot { fill: none; stroke: #b9f5df; stroke-width: 2; stroke-linejoin: round; }
.chart .cursor { stroke: #fff; stroke-width: 1; opacity: .5; }
.chart .dot-tot { fill: #fff; stroke: var(--slate); stroke-width: 2.5; }
.chart .dot-inv { fill: var(--inv); stroke: var(--slate); stroke-width: 2; }
.st-legend { display: flex; gap: 18px; font-size: .84rem; color: var(--on-dark-mute); margin: 6px 0 10px; }
.st-legend span::before { content: ''; display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.k-inv::before { background: var(--inv); opacity: .8; }
.k-jur::before { background: var(--mint); }
.scrub { color: var(--on-dark); font-weight: 500; font-size: .9rem; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: center; border-top: 1px solid var(--slate-3); padding-top: 12px; }
.scrub output { font-weight: 700; color: #fff; justify-self: start; }
.scrub input { grid-column: 1 / -1; width: 100%; accent-color: var(--mint); min-height: 32px; background: transparent; }
.scrub input:focus-visible { outline-color: var(--mint); }

.ledger-h { margin-top: 8px; }
.table-scroll { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 4px; }
.table-scroll:focus-visible { outline-offset: 0; }
.ledger-t { width: 100%; border-collapse: collapse; font-size: .95rem; }
.ledger-t th, .ledger-t td { padding: 10px 14px; text-align: right; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.ledger-t thead th { font-size: .82rem; font-weight: 600; color: var(--muted); border-bottom: 1.5px solid var(--ink); background: var(--paper); }
.ledger-t th:first-child { text-align: left; }
.ledger-t tbody th { font-weight: 600; }
.ledger-t .pos { color: var(--mint-ink); }
.ledger-t .bal { font-weight: 700; }
.ledger-t tr.sel { background: var(--mint-soft); }
.ledger-t tbody tr:last-child td, .ledger-t tbody tr:last-child th { border-bottom: 0; }
.ledger-more { margin: 12px 0 0; font-size: .95rem; }

/* Blocos da home */
.block { padding-top: 40px; padding-bottom: 40px; border-top: 1px solid var(--line); }
.today { display: grid; grid-template-columns: 1fr 2fr; gap: 12px 40px; align-items: start; }
.today-head p { color: var(--muted); margin: 0; font-size: .95rem; max-width: 26em; }
.rates { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; border-top: 1.5px solid var(--ink); }
.rates div { padding: 12px 14px 4px 0; }
.rates dt { font-size: .86rem; color: var(--muted); }
.rates dd { margin: 0; font-weight: 700; font-size: 1.6rem; letter-spacing: -0.02em; white-space: nowrap; }
.rates small { font-size: .8rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.today-cta { grid-column: 2; margin: 0; font-weight: 600; }

.tool-index, .post-list { list-style: none; margin: 0; padding: 0; }
.tool-index { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 28px; }
.tool-index li { border-top: 1.5px solid var(--ink); }
.tool-index a { display: grid; gap: 6px; padding: 14px 0 18px; text-decoration: none; color: var(--ink); }
.ti-n { font-weight: 700; font-size: .95rem; color: var(--mint-ink); font-variant-numeric: tabular-nums; }
.ti-name { font-weight: 700; font-size: 1.18rem; letter-spacing: -0.015em; line-height: 1.2; }
.tool-index a:hover .ti-name { text-decoration: underline; text-decoration-color: var(--mint-ink); text-underline-offset: 4px; }
.ti-desc { color: var(--muted); font: 1rem/1.45 var(--serif); }
.post-list li { border-bottom: 1px solid var(--line); }
.post-list a { display: grid; gap: 3px; padding: 16px 0; text-decoration: none; color: var(--ink); }
.pl-title { font-weight: 700; font-size: 1.13rem; letter-spacing: -0.01em; }
.post-list a:hover .pl-title { color: var(--mint-ink); }
.pl-desc { font-family: var(--serif); color: var(--muted); max-width: 46em; font-size: 1.04rem; }
.post-list time { font-size: .84rem; color: var(--muted); }

/* Páginas de ferramenta */
.tool-page { padding-top: 26px; padding-bottom: 48px; }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 16px; }
.tool-head h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); max-width: 18em; }
.how { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); max-width: 760px; }
.more { margin-top: 28px; }
.more h2 { font-size: 1.15rem; }
.more ul { padding-left: 1.2em; margin: 0; }
.more li { margin: 6px 0; }

/* Comparador */
.cmp { display: grid; grid-template-columns: minmax(270px, 340px) 1fr; gap: 32px; align-items: start; }
.cmp-form { display: grid; gap: 20px; }
.cmp-main { display: grid; gap: 16px; }
.cmp-rates { border: 0; border-top: 1.5px solid var(--ink); padding: 12px 0 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cmp-rates legend { font-weight: 700; padding: 0; float: left; width: 100%; margin-bottom: 4px; grid-column: 1 / -1; }
.cmp-rates legend small { display: block; font-weight: 400; color: var(--muted); font-size: .85rem; }
.cmp-rates label { font-size: .88rem; align-content: space-between; }
.cmp-rates label small { font-size: .78rem; }
.cmp-rates .field { min-height: 44px; }
.cmp-rates .field > span { font-size: .85rem; padding: 0 10px 0 0; }
.cmp-rates .field input { padding: 9px 8px 9px 10px; }
.cmp-out { background: var(--slate); color: var(--on-dark); border-radius: 4px; padding: 20px 24px; border-top: 3px solid var(--mint); }
.cmp-head p { margin: 0 0 6px; font-weight: 700; color: #fff; font-size: 1.05rem; }
.cmp-head span { display: block; font-weight: 400; font-size: .88rem; color: var(--on-dark-mute); }
.rank { list-style: none; margin: 10px 0 0; padding: 0; }
.rank li { padding: 14px 0; border-top: 1px solid var(--slate-3); }
.rk-top { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: baseline; }
.rk-name { font-weight: 700; color: #fff; font-size: 1.05rem; }
.rk-tag { font-size: .8rem; color: var(--on-dark-mute); }
.rk-val { font-weight: 750; font-size: 1.3rem; letter-spacing: -0.02em; color: #fff; }
.best .rk-val { color: var(--mint); }
.bar { height: 10px; background: var(--slate-2); border-radius: 2px; margin: 8px 0 6px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--inv); border-radius: 2px; }
.best .bar span { background: var(--mint); }
.rk-note { margin: 0; font-size: .86rem; color: var(--on-dark-mute); }
.rk-break { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0 0; }
.rk-break dt { font-size: .76rem; color: var(--on-dark-mute); }
.rk-break dd { margin: 0; font-size: .92rem; white-space: nowrap; }
.cmp-eq { margin: 6px 0 10px; padding: 12px 14px; background: var(--slate-2); border-radius: 3px; font-size: .95rem; }
.cmp-eq b { color: var(--mint); }
.cmp-warn { margin: 0 0 10px; padding-left: 1.1em; font-size: .9rem; color: var(--on-dark); }
.cmp-warn li { margin: 4px 0; }
.cmp-out .help { color: var(--on-dark-mute); }

/* Meta */
.meta { display: grid; grid-template-columns: minmax(250px, 320px) 1fr; gap: 32px; align-items: start; }
.goal .st-when { color: var(--on-dark-mute); font-weight: 500; margin: 0; }
.goal-big { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 750; letter-spacing: -0.035em; color: var(--mint); margin: 2px 0 4px; line-height: 1.05; }
.goal-big small { font-size: .38em; letter-spacing: 0; color: var(--on-dark); font-weight: 500; }
.goal-txt { margin: 0 0 14px; color: var(--on-dark); max-width: 34em; }
.split { display: flex; height: 12px; border-radius: 2px; overflow: hidden; background: var(--slate-2); }
.s-inv { background: var(--inv); }
.s-jur { background: var(--mint); }

/* Artigo */
.article { max-width: 780px; padding-top: 28px; padding-bottom: 56px; }
.article-head { border-bottom: 1.5px solid var(--ink); padding-bottom: 18px; margin-bottom: 28px; }
.article-head h1 { font-size: clamp(1.9rem, 4.2vw, 2.8rem); }
.byline { font-size: .9rem; color: var(--muted); margin: 0; }
.prose { font: 400 1.14rem/1.68 var(--serif); }
.prose h2 { margin: 1.8em 0 .5em; }
.prose h3 { margin: 1.5em 0 .4em; }
.prose p, .prose ul, .prose ol { margin: 0 0 1em; max-width: 40em; }
.prose li { margin: .3em 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.3em 0; font: .96rem/1.4 var(--sans); background: var(--paper); border-top: 1.5px solid var(--ink); }
.prose th, .prose td { border-bottom: 1px solid var(--line-2); padding: 9px 12px; text-align: left; vertical-align: top; }
.prose th { color: var(--muted); font-weight: 600; font-size: .84rem; }
.prose td:not(:first-child), .prose th:not(:first-child) { text-align: right; }
.prose blockquote { margin: 1.2em 0; padding: 12px 18px; border-left: 3px solid var(--mint-ink); background: var(--paper); font-family: var(--sans); font-size: 1rem; }
.prose blockquote p { margin: 0; }
.prose code { font: .92em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--line-2); padding: 1px 5px; border-radius: 3px; }
.prose strong { font-weight: 650; }
.tool-callout { display: flex; gap: 14px 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--slate); color: var(--on-dark); padding: 16px 18px; border-radius: 4px; margin-bottom: 28px; border-left: 3px solid var(--mint); }
.tool-callout p { margin: 0; max-width: 32em; }
.btn { display: inline-block; background: var(--mint); color: var(--slate); text-decoration: none; padding: 11px 16px; border-radius: 3px; font-weight: 700; }
.btn:hover { background: #7fe6c3; }
.btn:focus-visible { outline-color: #fff; }
.sources { margin-top: 36px; font-size: .95rem; }
.sources h2 { font-size: 1.15rem; }
.sources li { margin: 4px 0; }
.disclaimer { font: .94rem/1.5 var(--serif); color: var(--muted); border-top: 1px solid var(--line); padding-top: 14px; margin-top: 28px; }
.contact-pending { background: var(--paper); border-left: 3px solid var(--mint-ink); padding: 12px 14px; }
.list-page { padding-top: 32px; padding-bottom: 56px; }

/* Rodapé */
.foot { background: var(--slate); color: var(--on-dark-mute); margin-top: 32px; padding: 40px 0 20px; }
.foot a { color: var(--on-dark); }
.foot-in { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; }
.foot-in p { max-width: 34em; margin: 0 0 8px; }
.foot-brand { font-size: 1.2rem; font-weight: 750; color: #fff; letter-spacing: -0.02em; }
.foot-brand i { font: italic 400 1.08em var(--serif); color: var(--mint); }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; align-content: start; }
.foot-copy { font-size: .84rem; margin-top: 24px; }

@media (max-width: 900px) {
  .jc, .cmp, .meta, .today, .foot-in { grid-template-columns: 1fr; }
  .today-cta { grid-column: 1; }
  .tool-index { grid-template-columns: 1fr; }
  .rates { grid-template-columns: repeat(2, 1fr); }
  .jc-form { grid-template-columns: 1fr 1fr; gap: 14px; }
  .jc-form .help { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .top-in { flex-wrap: wrap; gap: 0; min-height: 0; padding-top: 12px; }
  .brand { padding-bottom: 4px; }
  .nav { width: calc(100% + 32px); margin: 0 -16px; padding: 0 8px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; padding: 10px 10px 9px; }
  .hero { padding: 26px 0 28px; }
  .lede { font-size: 1.08rem; margin-bottom: 1.2rem; }
  .jc-form { grid-template-columns: 1fr; }
  .jc-form .pair { grid-template-columns: 1fr 112px; }
  .statement, .cmp-out { padding: 16px 16px 14px; margin: 0 -16px; border-radius: 0; }
  .st-figs { grid-template-columns: 1fr 1fr; gap: 12px 0; }
  .st-figs .f-tot { grid-column: 1 / -1; order: -1; padding: 0 0 10px; border-left: 0; border-bottom: 1px solid var(--slate-3); }
  .st-figs .f-inv { padding-left: 0; border-left: 0; }
  .st-figs .f-tot dd { font-size: 2.1rem; }
  .ledger-t th, .ledger-t td { padding: 9px 10px; font-size: .9rem; }
  .table-scroll { margin: 0 -16px; border-radius: 0; border-left: 0; border-right: 0; }
  .block { padding-top: 30px; padding-bottom: 30px; }
  .rates dd { font-size: 1.35rem; }
  .cmp-rates { grid-template-columns: 1fr 1fr; }
  .rk-top { grid-template-columns: 1fr auto; }
  .rk-tag { grid-row: 2; grid-column: 1; }
  .rk-val { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
  .rk-break { grid-template-columns: 1fr 1fr; }
  .prose { font-size: 1.06rem; }
  .prose table { display: block; overflow-x: auto; }
  .prose th, .prose td { padding: 8px 9px; }
  .foot-in { gap: 18px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
