:root {
  --ground: #0f1c2b;
  --raised: #13263a;
  --raised-2: #1a3350;
  --navy: #1f3a5f;
  --teal: #2e6f8e;
  --green: #3f7d5c;
  --amber: #d98e4a;
  --ink: #f2f6f8;
  --muted: #b3c4d0;
  --faint: #8fa3b1;
  --line: rgba(242, 246, 248, 0.14);
  --font: "Outfit", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --gutter: clamp(1.1rem, 5vw, 4rem);
}
* { box-sizing: border-box; }
html { background: var(--ground); }
body {
  margin: 0; background: var(--ground); color: var(--ink); font-family: var(--font);
  font-size: 1.0625rem; line-height: 1.55; -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--amber); color: #1b1206; padding: .5rem 1rem; border-radius: 6px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem var(--gutter); max-width: 1180px; margin: 0 auto; }
.logo { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; }
.logo svg { border-radius: 7px; }
.logo b { font-weight: 800; font-size: 1.08rem; letter-spacing: -.02em; }
.logo i { font-style: normal; color: var(--amber); }
.logo small { color: var(--faint); font-size: .9rem; margin-left: .15rem; }
.top__right { display: flex; align-items: center; gap: 1rem; }
.langs { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.langs a { padding: .3rem .7rem; border-radius: 999px; font-size: .85rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.langs a[aria-current="page"] { background: var(--navy); color: var(--ink); }
.top__site { font-size: .92rem; color: var(--muted); text-decoration: none; }
.top__site:hover { color: var(--ink); }

/* hero = calculator */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; padding-top: clamp(1.5rem, 4vw, 3.5rem); padding-bottom: clamp(3rem, 6vw, 5rem); }
.intro h1 { margin: 0 0 .8rem; font-size: clamp(2rem, 4.4vw, 3.3rem); line-height: 1.04; letter-spacing: -.035em; font-weight: 800; text-wrap: balance; max-width: 15ch; }
.intro p { margin: 0 0 2rem; color: var(--muted); max-width: 46ch; }

.fs { border: 0; margin: 0; padding: 1.4rem 0; border-top: 1px solid var(--line); }
.fs legend { padding: 0; margin-bottom: .9rem; font-weight: 700; font-size: 1rem; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.field label, .field .lab { display: block; font-size: .88rem; font-weight: 600; color: var(--muted); margin-bottom: .35rem; }
.field label small { font-weight: 400; color: var(--faint); }
.stepper { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr) 2.6rem; height: 3rem; border: 1.5px solid var(--line); border-radius: 8px; background: var(--ground); overflow: hidden; }
.stepper:focus-within { border-color: var(--amber); }
.stepper input { width: 100%; border: 0; background: transparent; color: var(--ink); text-align: center; font: 500 1.15rem var(--mono); -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { outline: none; }
.pv-step { border: 0; background: transparent; color: var(--muted); font: 400 1.35rem var(--font); cursor: pointer; }
.pv-step:hover { color: var(--ink); background: var(--raised); }
.input { width: 100%; height: 3rem; padding: 0 .9rem; border: 1.5px solid var(--line); border-radius: 8px; background: var(--ground); color: var(--ink); font: 500 1.05rem var(--mono); }
.input:focus { outline: none; border-color: var(--amber); }
.input:disabled, .stepper input:disabled { opacity: .45; }
.field[hidden] { display: none; }

/* choice tiles (cenário, comida) */
.choices { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: .6rem; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span { display: block; height: 100%; padding: .75rem .9rem; border: 1.5px solid var(--line); border-radius: 8px; transition: border-color .2s ease, background .2s ease; }
.choice b { display: block; font-weight: 600; font-size: .98rem; }
.choice small { display: block; color: var(--faint); font-size: .82rem; line-height: 1.35; margin-top: .15rem; }
.choice input:checked + span { border-color: var(--teal); background: var(--navy); }
.choice input:focus-visible + span { outline: 2px solid var(--amber); outline-offset: 2px; }
.choice:hover span { border-color: rgba(242, 246, 248, .35); }

.presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin-bottom: .9rem; }
.pv-preset { height: 2.8rem; border: 1.5px solid var(--line); border-radius: 8px; background: transparent; color: var(--muted); font: 600 .95rem var(--font); cursor: pointer; }
.pv-preset:hover:not(:disabled) { color: var(--ink); }
.pv-preset[aria-pressed="true"] { background: var(--navy); border-color: var(--teal); color: var(--ink); }
.pv-preset:disabled { opacity: .4; cursor: not-allowed; }
.note { margin: .75rem 0 0; font-size: .9rem; color: var(--amber); }
.note[hidden] { display: none; }

/* results panel */
.result { position: sticky; top: 1rem; background: var(--raised); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.result__hero { padding: clamp(1.4rem, 3vw, 2rem); background: linear-gradient(180deg, var(--raised-2), var(--raised)); border-bottom: 1px solid var(--line); }
.result__num { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.result__num strong { font: 500 clamp(3.2rem, 7vw, 4.6rem)/1 var(--mono); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.result__num span { color: var(--muted); font-size: 1rem; }
.result__sub { margin: .5rem 0 0; color: var(--muted); font-size: .95rem; }
.result__sub b { color: var(--ink); font-weight: 600; }
.jugs { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 1.1rem; min-height: 30px; align-items: flex-end; }
.jugs svg { width: 18px; height: 27px; fill: none; stroke: var(--amber); stroke-width: 1.6; animation: jug .45s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 18ms); }
.jugs svg path { fill: rgba(217, 142, 74, .22); }
@keyframes jug { from { opacity: 0; transform: translateY(6px); } }
.jugs__more { font: 500 .85rem var(--mono); color: var(--amber); margin-left: .25rem; }

#pv-out { padding: .4rem clamp(1.4rem, 3vw, 2rem) 1.4rem; }
.pv-group { padding-top: 1.1rem; }
.pv-group h3 { margin: 0 0 .3rem; font-size: .9rem; font-weight: 700; color: var(--amber); }
.pv-group dl { margin: 0; }
.pv-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.pv-line dt { font-weight: 500; }
.pv-line dd { margin: 0; font: 500 1.05rem var(--mono); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pv-line small { grid-column: 1 / -1; color: var(--faint); font-size: .82rem; }
.pv-group--pack { margin-top: 1rem; padding: 1rem; border-radius: 10px; background: rgba(63, 125, 92, .14); border: 1px solid rgba(63, 125, 92, .5); }
.pv-group--pack.is-heavy { background: rgba(217, 142, 74, .1); border-color: rgba(217, 142, 74, .55); }
.pv-group--pack p { margin: .7rem 0 0; font-size: .9rem; color: var(--muted); }
.pv-group--pack .pv-line:last-child { border-bottom: 0; }
.pv-tip { margin: 1rem 0 0; font-size: .9rem; color: var(--muted); padding-left: .8rem; border-left: 2px solid var(--teal); }
.pv-empty { margin: 1.4rem 0; color: var(--muted); }
.result__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; align-items: center; padding: 1rem clamp(1.4rem, 3vw, 2rem); border-top: 1px solid var(--line); font-size: .82rem; color: var(--faint); }
.linkbtn { border: 0; background: none; color: var(--ink); font: 600 .9rem var(--font); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 0; }

/* sections after the tool */
.band { padding: clamp(3rem, 7vw, 5.5rem) 0; border-top: 1px solid var(--line); }
.band--raised { background: var(--raised); }
.h2 { margin: 0 0 .8rem; font-size: clamp(1.6rem, 3.2vw, 2.3rem); line-height: 1.1; letter-spacing: -.03em; font-weight: 800; text-wrap: balance; max-width: 22ch; }
.lead { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.lead p { color: var(--muted); max-width: 44ch; margin: 0; }
.leadform .row { display: flex; gap: .5rem; flex-wrap: wrap; }
.leadform .input { flex: 1; min-width: 220px; font-family: var(--font); }
.btn-send { height: 3rem; padding: 0 1.4rem; border: 0; border-radius: 8px; background: var(--amber); color: #1b1206; font: 700 1rem var(--font); cursor: pointer; }
.btn-send:hover { filter: brightness(1.07); }
.btn-send:disabled { opacity: .65; cursor: progress; }
.check { display: flex; gap: .6rem; align-items: flex-start; margin-top: .9rem; font-size: .92rem; color: var(--muted); }
.check input { margin-top: .25rem; accent-color: var(--amber); width: 1.05rem; height: 1.05rem; }
.legal { font-size: .8rem; color: var(--faint); margin: .8rem 0 0; }
.status { min-height: 1.4em; margin: .6rem 0 0; font-size: .92rem; }
.status[data-kind="ok"] { color: #7fc79f; }
.status[data-kind="error"] { color: #f0a46a; }
.hp { position: absolute; left: -9999px; }

.next { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 2rem; border-top: 1px solid var(--line); }
.next article { padding: 1.4rem 1.5rem 1.4rem 0; }
.next article + article { padding-left: 1.5rem; border-left: 1px solid var(--line); }
.next h3 { margin: 0 0 .4rem; font-size: 1.1rem; }
.next p { margin: 0 0 1rem; color: var(--muted); font-size: .95rem; }
.next a { font-weight: 700; color: var(--amber); text-underline-offset: 4px; }

.ad { display: none; }
.ads-on .ad { display: block; min-height: 280px; margin: 0 auto; max-width: 970px; }
.ad__label { font-size: .72rem; color: var(--faint); text-align: center; margin-bottom: .3rem; }

.theme { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(1.5rem, 4vw, 4rem); }
.theme__month { color: var(--amber); font-weight: 600; margin: 0 0 .6rem; }
.theme p { color: var(--muted); margin: 0 0 1.2rem; }
.theme a.more { font-weight: 700; color: var(--ink); text-underline-offset: 4px; }

.method dl { display: grid; grid-template-columns: 11rem minmax(0, 1fr); margin: 1.5rem 0; }
.method dt, .method dd { padding: .9rem 0; border-top: 1px solid var(--line); margin: 0; }
.method dt { font-weight: 700; }
.method dd { color: var(--muted); }
.method .src { font-size: .88rem; color: var(--faint); max-width: 70ch; }

.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { padding: 1.1rem 0; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--amber); font-size: 1.3rem; line-height: 1; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 1.2rem; color: var(--muted); max-width: 70ch; }

.foot { padding: 2.5rem 0 3rem; border-top: 1px solid var(--line); font-size: .9rem; color: var(--faint); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; }
.foot strong { color: var(--ink); font-weight: 600; }
.foot a { color: var(--muted); }

/* article pages (tema, privacidade) */
.article { max-width: 70ch; padding-top: clamp(1.5rem, 4vw, 3rem); padding-bottom: 4rem; }
.article h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1.08; letter-spacing: -.03em; margin: .4rem 0 1rem; text-wrap: balance; }
.article h2 { font-size: 1.35rem; margin: 2.2rem 0 .6rem; letter-spacing: -.02em; }
.article p, .article li { color: var(--muted); }
.article li { margin-bottom: .4rem; }
.article .src { font-size: .88rem; border-top: 1px solid var(--line); margin-top: 2.5rem; padding-top: 1rem; }
.cta-calc { display: inline-block; margin-top: 1.5rem; padding: .85rem 1.3rem; border-radius: 8px; background: var(--amber); color: #1b1206; font-weight: 700; text-decoration: none; }
.archive { list-style: none; padding: 0; }

.mbar { display: none; }
@media (max-width: 900px) {
  .mbar { position: fixed; z-index: 20; left: .75rem; right: .75rem; bottom: .75rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .85rem 1.1rem; border-radius: 12px; background: var(--amber); color: #1b1206; text-decoration: none; box-shadow: 0 10px 30px rgba(0,0,0,.35); transition: opacity .2s ease, transform .2s ease; }
  .mbar b { font: 500 1rem var(--mono); }
  .mbar span { font-weight: 700; font-size: .95rem; }
  .mbar.is-off { opacity: 0; transform: translateY(1rem); pointer-events: none; }

  .calc, .lead, .theme { grid-template-columns: minmax(0, 1fr); }
  .result { position: static; }
  .next { grid-template-columns: minmax(0, 1fr); }
  .next article, .next article + article { padding: 1.2rem 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .method dl { grid-template-columns: minmax(0, 1fr); }
  .method dd { border-top: 0; padding-top: 0; }
  .top__site { display: none; }
}
@media (max-width: 520px) {
  .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .choices { grid-template-columns: minmax(0, 1fr) !important; }
}
@media (prefers-reduced-motion: reduce) {
  .jugs svg { animation: none; }
  * { transition: none !important; }
}
