/* Bomba Esperta — mostrador de bomba de combustível: grafite, vermelho-combustível e visor de LCD */
:root {
  --bg: #e9eaeb;
  --paper: #fbfbfa;
  --ink: #1c1e21;
  --muted: #565b63;
  --line: #c9ccd1;
  --line-2: #dfe1e4;
  --graphite: #2a2d32;
  --graphite-2: #353940;
  --graphite-3: #4b5058;
  --on-dark: #e9eaeb;
  --on-dark-muted: #aeb3ba;
  --red: #c41e17;
  --red-deep: #9a150f;
  --red-light: #ff7468;
  --red-tint: #f6e1df;
  --lcd: #c9d3bd;
  --lcd-2: #bcc7af;
  --lcd-ink: #17200f;
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --text: 'Barlow', system-ui, sans-serif;
  --w: 1160px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.55 var(--text); overflow-x: hidden; }
a { color: var(--red-deep); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--red); 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(--display); line-height: 1.02; margin: 0 0 .45em; letter-spacing: -.005em; }
h1 { font-size: clamp(2.3rem, 5.4vw, 3.9rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.15rem); font-weight: 700; }
h3 { font-size: 1.35rem; font-weight: 700; }
.lede { font-size: 1.18rem; line-height: 1.5; color: var(--muted); max-width: 38em; margin: 0 0 1.4rem; }

/* Topo: faixa grafite com friso vermelho, como a carenagem da bomba */
.top { background: var(--graphite); color: var(--on-dark); border-top: 6px solid var(--red); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--on-dark); text-decoration: none; font: 700 1.7rem/1 var(--display); }
.brand b, .foot-brand b { color: var(--red-light); font-weight: 800; }
.brand svg { color: var(--on-dark); }
.nav { display: flex; gap: 2px; }
.nav a { color: var(--on-dark); text-decoration: none; padding: 8px 12px; font-weight: 600; border-bottom: 3px solid transparent; }
.nav a:hover { border-bottom-color: var(--graphite-3); }
.nav a[aria-current] { border-bottom-color: var(--red-light); color: #fff; }
.nav a:focus-visible, .brand:focus-visible { outline-color: var(--red-light); }

/* Hero da home */
.pump-hero { background: var(--graphite); color: var(--on-dark); padding: 34px 0 40px; }
.pump-hero .lede { color: var(--on-dark-muted); }
.pump-hero h1 { max-width: 15em; }
.pump-hero > .wrap > .help { color: var(--on-dark-muted); }
.hero-copy a { color: var(--red-light); }
.hero-copy { margin-bottom: 18px; }
.help { font-size: .9rem; color: var(--muted); margin: 10px 0 0; }

/* A bomba: carenagem grafite com a parte de cima vermelha */
.pump { background: var(--graphite-2); border: 1px solid #1a1c1f; border-top: 10px solid var(--red); padding: 0 14px 14px; border-radius: 3px; }
.pump-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 10px 4px; font-size: .9rem; color: var(--on-dark-muted); }
.pump-head span:first-child { color: var(--on-dark); font-weight: 600; }
.tool-grid { display: grid; grid-template-columns: minmax(300px, .92fr) 1.08fr; gap: 14px; align-items: start; }
.tool-page .pump { margin-top: 8px; }

/* Formulário */
.panel { display: grid; gap: 16px; background: var(--paper); padding: 20px; border-radius: 2px; color: var(--ink); min-width: 0; }
label { display: grid; gap: 6px; align-content: start; font-weight: 600; font-size: .98rem; }
label small, .check small { font-weight: 400; color: var(--muted); display: block; font-size: .86rem; line-height: 1.35; }
input, select { font: 500 1.08rem var(--text); color: var(--ink); background: #fff; border: 1.5px solid #a9aeb5; border-radius: 2px; padding: 10px 12px; width: 100%; min-height: 48px; font-variant-numeric: tabular-nums; }
input:focus, select:focus { border-color: var(--red); outline: none; box-shadow: 0 0 0 3px var(--red-tint); }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; min-height: 0; margin: 2px 0 0; accent-color: var(--red); flex: none; }
.affix { display: flex; align-items: stretch; }
.affix > span { display: flex; align-items: center; padding: 0 10px; background: var(--line-2); border: 1.5px solid #a9aeb5; border-right: 0; font-weight: 600; color: var(--muted); font-size: .95rem; white-space: nowrap; }
.affix.suf > span { border-right: 1.5px solid #a9aeb5; border-left: 0; }
.affix input { min-width: 0; }
fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 12px; min-width: 0; }
legend { font-weight: 700; padding: 0; margin-bottom: 8px; font-size: 1rem; font-family: var(--display); font-size: 1.2rem; }
.pair { grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line-2); padding-top: 12px; }
.pair legend { float: left; width: 100%; grid-column: 1 / -1; }
.span2 { grid-column: 1 / -1; margin: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; cursor: pointer; }
.seg-ctl { grid-template-columns: 1fr 1fr; gap: 0; }
.seg-ctl legend { grid-column: 1 / -1; }
.seg-ctl label { display: block; position: relative; }
.seg-ctl input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seg-ctl span { display: block; text-align: center; padding: 11px 8px; border: 1.5px solid #a9aeb5; font-weight: 600; background: #fff; }
.seg-ctl label + label span { border-left: 0; }
.seg-ctl input:checked + span { background: var(--graphite); border-color: var(--graphite); color: #fff; box-shadow: inset 0 -4px 0 var(--red); }
.seg-ctl input:focus-visible + span { outline: 3px solid var(--red); outline-offset: 2px; }
.quick-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: -6px; }
.quick-btns button { font: 600 .92rem var(--text); color: var(--ink); background: #fff; border: 1.5px solid var(--line); padding: 6px 10px; border-radius: 2px; cursor: pointer; min-height: 40px; }
.quick-btns button small { color: var(--muted); font-weight: 500; }
.quick-btns button:hover { border-color: var(--red); }
.fill-row { display: grid; grid-template-columns: 28px 1fr 1fr; gap: 10px; align-items: end; }
.fill-row + .fill-row { border-top: 1px dashed var(--line); padding-top: 10px; }
.fill-n { font: 700 1.3rem/48px var(--display); text-align: center; background: var(--graphite); color: #fff; height: 48px; }
.add { justify-self: start; font: 600 .95rem var(--text); color: var(--red-deep); background: transparent; border: 1.5px dashed var(--red); padding: 8px 14px; cursor: pointer; min-height: 44px; }
.add:hover { background: var(--red-tint); }
[hidden] { display: none !important; }

/* Resultado */
.result-col { min-width: 0; }
.readout { display: grid; gap: 12px; color: var(--ink); }
.verdict { margin: 0; background: var(--red); color: #fff; padding: 16px 18px 14px; border-radius: 2px; display: grid; gap: 2px; }
.verdict .v-pre { font-weight: 500; font-size: 1rem; color: #ffe4e1; }
.verdict strong { font: 800 clamp(2rem, 4.6vw, 3.1rem)/.95 var(--display); letter-spacing: .01em; }
.verdict.tie { background: var(--graphite-3); }
.lcd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lcd { background: var(--lcd); color: var(--lcd-ink); padding: 10px 14px 12px; border-radius: 2px; box-shadow: inset 0 0 0 3px var(--lcd-2), inset 0 6px 14px rgba(0,0,0,.08); display: grid; gap: 4px; min-width: 0; }
.lcd-l { font-weight: 700; font-size: .92rem; }
.lcd-s { font-size: .86rem; line-height: 1.35; color: #34402b; }
.seg-wrap { display: flex; align-items: flex-end; gap: 6px; min-width: 0; }
.seg { display: inline-block; height: 2.3rem; }
.lcd.big .seg { height: 3.3rem; }
.seg svg { height: 100%; width: auto; display: block; max-width: 100%; }
.seg .on { fill: var(--lcd-ink); }
.seg .off { fill: var(--lcd-ink); opacity: .07; }
.seg-cur, .seg-unit { font: 700 1.05rem/1 var(--display); padding-bottom: 2px; }
.pump-rows { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pump-rows > div { background: var(--paper); padding: 10px 14px; border-left: 5px solid var(--graphite-3); border-radius: 2px; }
.pump-rows > div.win { border-left-color: var(--red); }
.pump-rows dt { font: 700 1.3rem/1.1 var(--display); }
.pump-rows dd { margin: 2px 0 0; font-size: .93rem; color: var(--muted); }
.pump-rows .pr-k { color: var(--ink); font-weight: 600; }
.gauge { margin: 0; background: var(--paper); padding: 14px 14px 12px; border-radius: 2px; }
.g-track { position: relative; height: 16px; background: var(--line-2); }
.g-eth { position: absolute; left: 0; top: 0; bottom: 0; background: var(--red-tint); border-right: 3px solid var(--red); }
.g-70 { position: absolute; top: -5px; bottom: -5px; border-left: 2px dashed var(--graphite-3); }
.g-needle { position: absolute; top: -8px; width: 0; height: 32px; border-left: 4px solid var(--graphite); transform: translateX(-2px); }
.g-scale { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }
.gauge figcaption { display: grid; gap: 4px; margin-top: 8px; font-size: .93rem; color: var(--ink); }
.k { display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px; }
.k-needle { background: var(--graphite); width: 4px; }
.k-eth { background: var(--red-tint); border-right: 3px solid var(--red); }
.rule { margin: 0; background: var(--paper); padding: 10px 14px; border-radius: 2px; font-size: .95rem; }
.rule.miss { border-left: 5px solid var(--red); }
.err { color: var(--red-deep); background: var(--paper); padding: 14px; margin: 0; font-weight: 600; }
.bill { width: 100%; border-collapse: collapse; background: var(--paper); font-size: .95rem; }
.bill caption { text-align: left; font: 700 1.15rem var(--display); padding: 10px 14px 4px; background: var(--paper); }
.bill th, .bill td { padding: 8px 14px; border-top: 1px solid var(--line-2); text-align: left; font-variant-numeric: tabular-nums; }
.bill td:last-child { text-align: right; white-space: nowrap; font-weight: 600; }
.bill td:nth-child(2) { color: var(--muted); }
.bill .tot th, .bill .tot td:last-child { font-weight: 800; }
.bill .tot { border-top: 2px solid var(--ink); }

/* Blocos */
.block { padding: 44px 24px 4px; }
.block-head p { color: var(--muted); max-width: 46em; margin: 0 0 16px; }
.note { font-size: .93rem; color: var(--muted); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; background: var(--paper); border: 1px solid var(--line); max-width: 100%; }
.prices { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; min-width: 560px; }
.prices caption { text-align: left; padding: 10px 14px; color: var(--muted); font-size: .9rem; }
.prices th, .prices td { padding: 8px 14px; border-top: 1px solid var(--line-2); text-align: right; white-space: nowrap; }
.prices th:first-child, .prices thead th:first-child { text-align: left; }
.prices thead th { background: var(--graphite); color: var(--on-dark); font-weight: 600; border: 0; }
.prices tbody th { font-weight: 600; }
.tag { display: inline-block; min-width: 76px; text-align: center; padding: 2px 8px; font-weight: 700; font-size: .88rem; }
.tag.etanol { background: var(--red); color: #fff; }
.tag.gasolina { background: var(--graphite-3); color: #fff; }
.tag.empate { background: var(--line); }
.tool-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tool-list a { display: grid; gap: 6px; height: 100%; padding: 16px 18px 18px; background: var(--paper); border-top: 5px solid var(--graphite); color: var(--ink); text-decoration: none; }
.tool-list a:hover { border-top-color: var(--red); }
.tl-n { font: 800 1.1rem var(--display); color: var(--red-deep); }
.tl-name { font: 700 1.4rem/1.05 var(--display); }
.tl-desc { color: var(--muted); font-size: .95rem; }
.post-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.post-list li { border-top: 1px solid var(--line); }
.post-list a { display: grid; gap: 4px; padding: 14px 0 16px; color: var(--ink); text-decoration: none; }
.post-list a:hover .pl-title { color: var(--red-deep); text-decoration: underline; }
.pl-title { font: 700 1.3rem/1.1 var(--display); }
.pl-desc { color: var(--muted); font-size: .95rem; }
.post-list time { font-size: .84rem; color: var(--muted); }
.list-page { padding-top: 36px; padding-bottom: 32px; }

/* Ferramenta e artigo */
.tool-page { padding-top: 22px; padding-bottom: 32px; }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 14px; }
.tool-head h1 { max-width: 17em; }
.how { margin-top: 36px; max-width: 46em; }
.more { margin-top: 30px; }
.more ul { padding-left: 1.1em; }
.more li { margin: 6px 0; }
.article { padding-top: 26px; padding-bottom: 40px; max-width: 800px; }
.article-head h1 { font-size: clamp(2.1rem, 4.6vw, 3.2rem); }
.byline { font-size: .92rem; color: var(--muted); }
.tool-callout { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; background: var(--graphite); color: var(--on-dark); padding: 16px 18px; border-top: 5px solid var(--red); margin: 18px 0 26px; }
.tool-callout p { margin: 0; flex: 1 1 260px; }
.btn { display: inline-block; background: var(--red); color: #fff; text-decoration: none; font-weight: 700; padding: 11px 16px; min-height: 44px; }
.btn:hover { background: var(--red-deep); color: #fff; }
.tool-callout .btn:focus-visible { outline-color: var(--red-light); }
.prose { font-size: 1.07rem; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.3em; }
.prose p, .prose li { max-width: 40em; }
.prose table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; border-collapse: collapse; margin: 1.2em 0; font-size: .95rem; font-variant-numeric: tabular-nums; max-width: 100%; }
.prose th, .prose td { padding: 8px 12px; border: 1px solid var(--line); text-align: left; background: var(--paper); }
.prose thead th { background: var(--graphite); color: var(--on-dark); border-color: var(--graphite); white-space: nowrap; }
.prose blockquote { margin: 1.2em 0; padding: 10px 16px; border-left: 5px solid var(--red); background: var(--paper); }
.prose code { font-size: .95em; background: var(--line-2); padding: 1px 4px; }
.sources { margin-top: 30px; font-size: .95rem; border-top: 1px solid var(--line); padding-top: 14px; }
.sources h2 { font-size: 1.4rem; }
.sources a { overflow-wrap: anywhere; }
.disclaimer { font-size: .9rem; color: var(--muted); border-left: 4px solid var(--line); padding-left: 12px; }
.contact-pending { background: var(--paper); padding: 10px 14px; border-left: 4px solid var(--graphite-3); }

/* Rodapé */
.foot { margin-top: 56px; background: var(--graphite); color: var(--on-dark-muted); padding: 30px 0 18px; border-top: 6px solid var(--red); font-size: .95rem; }
.foot-in { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; }
.foot-brand { display: flex; align-items: center; gap: 8px; font: 700 1.4rem var(--display); color: var(--on-dark); margin: 0 0 6px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; align-content: start; }
.foot a { color: var(--on-dark); }
.foot a:focus-visible { outline-color: var(--red-light); }
.foot-copy { font-size: .85rem; margin-top: 18px; }

@media (max-width: 900px) {
  .tool-grid { grid-template-columns: 1fr; }
  .tool-list { grid-template-columns: 1fr; }
  .post-list { grid-template-columns: 1fr; }
  .foot-in { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .block { padding: 34px 16px 0; }
  .top-in { flex-direction: column; align-items: flex-start; gap: 4px; padding-top: 10px; }
  .nav { width: calc(100% + 32px); margin: 0 -16px; padding: 0 10px 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; padding: 8px 10px; }
  .pump { padding: 0 8px 8px; margin: 0 -8px; }
  .panel { padding: 16px 14px; }
  .lcd-grid, .pump-rows { grid-template-columns: 1fr; }
  .seg { height: 2.1rem; }
  .lcd.big .seg { height: 2.7rem; }
  .pair { grid-template-columns: 1fr 1fr; gap: 10px; }
  .fill-row { grid-template-columns: 24px 1fr 1fr; gap: 8px; }
  .fill-row label { font-size: .9rem; }
}
@media (max-width: 360px) {
  .pair { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
