:root {
  --night: #23255e;
  --night-2: #2f3275;
  --sun: #f2b530;
  --bg: #f6f6fb;
  --paper: #ffffff;
  --ink: #1a1b3a;
  --muted: #5a5c7a;
  --line: #dcdcea;
  --ok: #2e7d5b;
  --warn: #b26b00;
  --bad: #b4232c;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'Figtree', system-ui, sans-serif;
  --w: 1080px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.6 var(--body); -webkit-text-size-adjust: 100%; }
a { color: var(--night-2); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--night); color: #fff; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--w); margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.05; letter-spacing: -0.02em; margin: 0 0 .45em; font-weight: 750; }
h1 { font-size: clamp(2.1rem, 5.4vw, 3.9rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 36em; margin: 0 0 1.4rem; }
label { display: grid; gap: 6px; font-weight: 600; font-size: .98rem; }
input, select { font: 500 1.05rem var(--body); color: var(--ink); background: var(--paper); border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 12px; width: 100%; min-height: 48px; }
input:focus, select:focus { outline: none; border-color: var(--night-2); box-shadow: 0 0 0 3px rgba(242, 181, 48, .5); }
.money { display: flex; align-items: center; background: var(--paper); border: 1.5px solid var(--line); border-radius: 10px; }
.money:focus-within { border-color: var(--night-2); box-shadow: 0 0 0 3px rgba(242, 181, 48, .5); }
.money span { padding-left: 12px; color: var(--muted); }
.money input { border: 0; box-shadow: none; font-variant-numeric: tabular-nums; }
.help { color: var(--muted); font-size: .92rem; margin: 0; }

/* Topo */
.top { background: var(--night); color: #fff; }
.top-in { display: flex; justify-content: space-between; align-items: center; min-height: 64px; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font: 750 1.25rem var(--display); letter-spacing: -0.02em; }
.nav { display: flex; gap: 2px; }
.nav a { color: #e4e4f5; text-decoration: none; padding: 8px 12px; border-radius: 999px; font-weight: 600; }
.nav a:hover, .nav a[aria-current] { background: var(--night-2); color: #fff; }

/* Hero com régua */
.hero { background: var(--night); color: #fff; padding: 40px 0 64px; }
.hero h1 { max-width: 15em; }
.hero .lede { color: #c9cae6; }
.gauge { margin-top: 28px; }
.gauge-form { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 24px; align-items: end; }
.gauge-form label { color: #fff; }
.slider { -webkit-appearance: none; appearance: none; background: transparent; padding: 0; border: 0; min-height: 48px; }
.slider::-webkit-slider-runnable-track { height: 6px; background: #4a4d93; border-radius: 3px; }
.slider::-moz-range-track { height: 6px; background: #4a4d93; border-radius: 3px; }
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: var(--sun); margin-top: -10px; border: 3px solid var(--night); }
.slider::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--sun); border: 3px solid var(--night); }
.slider:focus-visible { outline: 3px solid var(--sun); }
.ruler { margin-top: 26px; padding-bottom: 54px; }
.ruler-track { position: relative; height: 44px; background: repeating-linear-gradient(90deg, #3a3d85 0 1px, transparent 1px calc(100% / 22)), #2b2e6d; border-radius: 6px; }
.ruler-fill { position: absolute; inset: 0 auto 0 0; background: var(--sun); border-radius: 6px 0 0 6px; transition: width .25s ease-out, background-color .25s; }
.gauge[data-state="excesso_ate_20"] .ruler-fill { background: #f08a24; }
.gauge[data-state="excesso_acima_20"] .ruler-fill { background: #e5484d; }
.mark { position: absolute; top: -6px; bottom: -6px; width: 0; border-left: 2px solid #fff; }
.mark b { position: absolute; top: 58px; left: 0; transform: translateX(-50%); white-space: nowrap; text-align: center; color: #fff; font-size: .9rem; font-weight: 700; line-height: 1.2; }
.mark small { display: block; color: #c9cae6; font-weight: 500; font-size: .8rem; }
.m97 { border-left-style: dashed; }
.gauge-out { font-size: 1.15rem; max-width: 40em; margin: 6px 0 12px; }
.gauge-out strong { color: var(--sun); }
.gauge-link { color: #fff; font-weight: 600; }

/* Faixa de preços */
.prices { padding-top: 48px; padding-bottom: 24px; }
.sub { color: var(--muted); margin: 0 0 14px; }
.price-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin: 18px 0; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.price-strip div { padding: 20px 18px; border-left: 1px solid var(--line); }
.price-strip div:first-child { border-left: 0; }
.price-strip dt { color: var(--muted); font-weight: 600; font-size: .95rem; }
.price-strip dd { margin: 4px 0 0; font: 800 clamp(1.6rem, 3vw, 2.2rem)/1.1 var(--display); color: var(--night); font-variant-numeric: tabular-nums; }
.price-strip small { display: block; font: 500 .9rem var(--body); color: var(--muted); }

/* Destaque */
.flash { margin-top: 32px; }
.flash > div { background: var(--sun); color: var(--ink); border-radius: 14px; padding: 26px 28px; }
.flash-tag { font-weight: 700; margin: 0 0 6px; }
.flash h2 a { color: var(--ink); text-decoration: none; }
.flash h2 a:hover { text-decoration: underline; }
.flash p { margin: 0; max-width: 46em; }

/* Guias */
.guides { padding-top: 48px; padding-bottom: 56px; }
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.post-list li { border-top: 1px solid var(--line); }
.post-list a { display: grid; gap: 4px; padding: 18px 0; color: var(--ink); text-decoration: none; }
.pl-title { font: 700 1.2rem/1.25 var(--display); color: var(--night); letter-spacing: -0.01em; }
.post-list a:hover .pl-title { text-decoration: underline; }
.pl-desc { color: var(--muted); }
.post-list time { font-size: .85rem; color: var(--muted); }

/* Ferramentas */
.tool-page { padding-top: 24px; padding-bottom: 56px; }
.crumbs { font-size: .92rem; color: var(--muted); margin-bottom: 14px; }
.tool-box { display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: 28px; align-items: start; margin-top: 12px; }
#calc { display: grid; gap: 16px; }
.choices { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; }
.choices legend { font-weight: 700; margin-bottom: 10px; }
.choice { display: flex; gap: 12px; align-items: flex-start; background: var(--paper); border: 1.5px solid var(--line); border-radius: 12px; padding: 14px; cursor: pointer; font-weight: 400; }
.choice input { width: 20px; min-height: 20px; margin-top: 3px; accent-color: var(--night); }
.choice:has(input:checked) { border-color: var(--night); box-shadow: inset 0 0 0 1px var(--night); }
.choice b { display: block; }
.choice small { color: var(--muted); }
.receipt { background: var(--paper); border-radius: 14px; border: 1px solid var(--line); padding: 24px; border-top: 6px solid var(--sun); }
.receipt.state-ok { border-top-color: var(--ok); }
.receipt.state-warn { border-top-color: var(--warn); }
.receipt.state-bad { border-top-color: var(--bad); }
.r-title { font: 750 1.3rem var(--display); margin: 0 0 8px; }
.state-ok .r-title { color: var(--ok); } .state-warn .r-title { color: var(--warn); } .state-bad .r-title { color: var(--bad); }
.r-big { font: 800 3rem/1 var(--display); color: var(--night); margin: 6px 0 18px; font-variant-numeric: tabular-nums; }
.r-big small { display: block; font: 500 1rem var(--body); color: var(--muted); margin-top: 6px; }
.receipt table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.receipt td { padding: 10px 0; border-top: 1px solid var(--line); }
.receipt td:last-child { text-align: right; font-weight: 700; white-space: nowrap; padding-left: 12px; }
.receipt tr.tot td { border-top: 2px solid var(--ink); }
.r-note, .r-text { color: var(--muted); margin: 14px 0 0; }
.r-text { color: var(--ink); margin: 0 0 14px; }
.meter { position: relative; height: 14px; background: #ececf5; border-radius: 7px; margin: 14px 0 16px; }
.meter span { position: absolute; inset: 0 auto 0 0; border-radius: 7px; background: var(--ok); }
.state-warn .meter span { background: var(--warn); } .state-bad .meter span { background: var(--bad); }
.meter i { position: absolute; top: -5px; bottom: -5px; border-left: 2px solid var(--ink); }
.meter i.t20 { border-left-style: dashed; }
.how { margin-top: 48px; border-top: 1px solid var(--line); padding-top: 28px; }
.more ul { padding-left: 1.2em; }

/* Artigo */
.article { max-width: 740px; padding-top: 28px; padding-bottom: 56px; }
.article-head { margin-bottom: 24px; }
.byline { color: var(--muted); font-size: .95rem; margin: 0; }
.prose { font-size: 1.1rem; line-height: 1.7; }
.prose h2 { margin: 1.7em 0 .5em; }
.prose p, .prose ul, .prose ol { margin: 0 0 1em; max-width: 38em; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2em 0; background: var(--paper); border-radius: 10px; overflow: hidden; font-size: 1rem; font-variant-numeric: tabular-nums; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.prose th { background: #ececf5; font-weight: 700; }
.prose blockquote { margin: 1.2em 0; padding: 14px 18px; background: #fff6df; border-radius: 10px; }
.tool-callout { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--night); color: #fff; border-radius: 14px; padding: 18px 20px; margin-bottom: 28px; }
.tool-callout p { margin: 0; max-width: 30em; }
.btn { background: var(--sun); color: var(--ink); text-decoration: none; font-weight: 700; padding: 11px 18px; border-radius: 999px; display: inline-block; }
.btn:hover { background: #ffc849; }
.sources { margin-top: 32px; font-size: .97rem; }
.sources h2 { font-size: 1.2rem; }
.disclaimer { color: var(--muted); font-size: .95rem; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 24px; }
.contact-pending { background: #fff6df; padding: 12px 14px; border-radius: 10px; }
.list-page { padding-top: 32px; padding-bottom: 56px; }

/* Rodapé */
.foot { background: var(--ink); color: #c9cae6; padding: 40px 0 24px; }
.foot-in { display: grid; gap: 10px; }
.foot-brand { color: #fff; font: 750 1.3rem var(--display); margin: 0; }
.foot p { margin: 0; max-width: 40em; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 8px 0; }
.foot a { color: #fff; }
.foot-copy { font-size: .85rem; color: #9496bd; }

@media (max-width: 820px) {
  .gauge-form, .tool-box, .post-list.two { grid-template-columns: 1fr; }
  .price-strip { grid-template-columns: 1fr 1fr; }
  .price-strip div:nth-child(3) { border-left: 0; }
  .price-strip div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 520px) { .mark b { transform: translateX(-100%); padding-right: 6px; text-align: right; } .m97 b { top: 92px; } .ruler { padding-bottom: 96px; } }
@media (prefers-reduced-motion: reduce) { .ruler-fill { transition: none; } }
