:root {
  color-scheme: light;
  --ink: #19382e;
  --muted: #718078;
  --soft: #f4f5ef;
  --paper: #ffffff;
  --line: #e7ece6;
  --green: #31845d;
  --green-dark: #246b4a;
  --green-pale: #eaf5ed;
  --orange: #c47a3a;
  --orange-pale: #fff3e8;
  --red: #b75b51;
  --shadow: 0 18px 45px rgba(31, 65, 47, .055);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--soft);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: radial-gradient(ellipse at 7% 14%, rgba(225,238,225,.55), transparent 30rem), var(--soft); }
button, input, select { font: inherit; }
button { cursor: pointer; }
.topbar { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(5vw, calc((100vw - 1240px) / 2)); border-bottom: 1px solid rgba(219,228,218,.75); background: rgba(255,255,255,.72); }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-size: 19px; font-weight: 850; letter-spacing: -1px; text-decoration: none; }
.brand-mark { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 10px 10px 10px 3px; background: var(--green); color: #fff; font-size: 20px; font-weight: 850; }
.brand-period { color: #72a875; }
.header-tools { display: flex; align-items: center; gap: 17px; }
.home-link { color: var(--green-dark); font-size: 11px; font-weight: 750; text-decoration: none; white-space: nowrap; }
.local-tag { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.local-dot { width: 7px; height: 7px; border-radius: 50%; background: #74ad7e; box-shadow: 0 0 0 3px #e8f2e8; }
.page-shell { width: min(1140px, calc(100% - 42px)); margin: 0 auto; }
.intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 35px; padding: 49px 0 24px; }
.eyebrow { margin: 0 0 8px; color: var(--green); font-size: 9px; font-weight: 800; letter-spacing: 1.6px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-size: clamp(29px, 4vw, 42px); line-height: 1.12; letter-spacing: -1.8px; }
h1 span { color: #608c6c; }
.intro-copy { max-width: 600px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.intro-note { display: flex; align-items: center; gap: 11px; max-width: 260px; padding: 12px 15px; border: 1px solid #dfe9dc; border-radius: 14px; background: rgba(255,255,255,.66); }
.intro-note p { margin: 0; color: #5e7165; font-size: 10px; line-height: 1.5; }
.note-icon { display: grid; flex: 0 0 auto; width: 29px; height: 29px; place-items: center; border-radius: 9px; background: #e8f3e8; color: var(--green); font-weight: 850; }
.example-banner { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 14px; padding: 13px 16px; border: 1px solid #d4e4d4; border-radius: 12px; background: #edf6ed; color: #315a41; }
.example-banner[hidden] { display: none; }
.example-banner div { display: grid; gap: 3px; }
.example-banner strong { font-size: 11px; }
.example-banner span { color: #627466; font-size: 10px; }
.example-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 8px 16px; }
.example-mode .saved-bar { display: none; }
button:disabled { cursor: not-allowed; opacity: .55; }
.text-button { border: 0; background: transparent; color: var(--green-dark); font-size: 10px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.saved-bar { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.8); }
.saved-copy { display: flex; align-items: center; gap: 9px; margin-right: auto; }
.saved-icon { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 9px; background: var(--green-pale); color: var(--green); }
.saved-copy strong, .saved-copy span { display: block; }
.saved-copy strong { font-size: 10px; }
.saved-copy span { margin-top: 2px; color: var(--muted); font-size: 9px; }
.saved-select-wrap select { max-width: 215px; height: 34px; padding: 0 9px; border: 1px solid #e1e8e1; border-radius: 8px; background: #fff; color: #52655a; font-size: 10px; }
.button { display: inline-flex; min-height: 35px; align-items: center; justify-content: center; padding: 0 11px; border: 1px solid #dce6dc; border-radius: 8px; background: #fff; color: var(--green-dark); font-size: 10px; font-weight: 750; }
.button:hover { background: #f2f8f1; }
.button-primary { min-height: 43px; border-color: var(--green); background: var(--green); color: #fff; font-size: 11px; }
.button-primary:hover { background: var(--green-dark); color: #fff; }
.calculator-layout { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(300px, .88fr); align-items: start; gap: 15px; }
.form-column { display: grid; gap: 13px; }
.card, .results-card, .method-card, .next-step-card { border: 1px solid var(--line); border-radius: 16px; background: var(--paper); box-shadow: var(--shadow); }
.card { padding: 19px 20px 16px; }
.section-heading { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 15px; }
.section-number { display: grid; flex: 0 0 auto; width: 27px; height: 27px; place-items: center; border: 1px solid #d6e5d5; border-radius: 9px; background: #f0f6ee; color: var(--green-dark); font-size: 10px; font-weight: 850; }
.section-heading h2 { margin: 1px 0 2px; font-size: 14px; letter-spacing: -.3px; }
.section-heading p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 12px; }
.field { display: block; min-width: 0; margin-bottom: 12px; }
.field > span:first-child { display: block; margin: 0 0 5px; color: #42574b; font-size: 10px; font-weight: 700; }
.field input { width: 100%; height: 38px; padding: 0 10px; outline: 0; border: 1px solid #e1e8e1; border-radius: 8px; background: #fcfdfb; color: var(--ink); font-size: 11px; transition: border-color .16s, box-shadow .16s; }
.field input:focus, .saved-select-wrap select:focus { border-color: #88b492; box-shadow: 0 0 0 3px rgba(90,153,105,.12); }
.field input[aria-invalid="true"] { border-color: var(--red); background: #fff8f7; }
.field input::placeholder { color: #a5b0a8; }
.field small { display: block; margin-top: 5px; color: #859188; font-size: 9px; line-height: 1.4; }
.input-suffix, .currency-input { display: flex; height: 38px; align-items: center; overflow: hidden; border: 1px solid #e1e8e1; border-radius: 8px; background: #fcfdfb; color: #738279; font-size: 10px; }
.input-suffix:focus-within, .currency-input:focus-within { border-color: #88b492; box-shadow: 0 0 0 3px rgba(90,153,105,.12); }
.input-suffix input, .currency-input input { height: 36px; border: 0; box-shadow: none; background: transparent; }
.input-suffix input:focus, .currency-input input:focus { box-shadow: none; }
.input-suffix > span:last-child { padding: 0 10px 0 2px; color: #7d8b82; font-size: 9px; }
.currency-input > span { padding-left: 10px; color: #7d8b82; font-size: 9px; }
.allocation-box { margin: 3px 0 0; padding: 13px 14px 1px; border: 1px solid #e6ece3; border-radius: 11px; background: #f8faf6; }
.allocation-title { margin: 0 0 4px; color: #405b4a; font-size: 10px; font-weight: 800; }
.allocation-copy { max-width: 620px; margin: 0 0 11px; color: #76837a; font-size: 9px; line-height: 1.45; }
.recurring-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 0 0 12px; padding: 9px 10px; border: 1px solid #e4ece1; border-radius: 9px; background: #fff; }
.recurring-summary span { color: #68786d; font-size: 9px; }
.recurring-summary strong { color: var(--green-dark); font-size: 10px; }
.recurring-summary a { margin-left: auto; color: var(--green-dark); font-size: 8px; font-weight: 800; text-decoration: none; }
.recurring-summary a:hover { text-decoration: underline; text-underline-offset: 3px; }
.save-button { width: 100%; }
.form-feedback { min-height: 14px; margin: 7px 0 0; color: var(--green-dark); font-size: 9px; }
.form-feedback.is-error { color: var(--red); }
.results-column { display: grid; gap: 12px; }
.results-card { padding: 21px; }
.results-card .eyebrow { margin-bottom: 4px; }
.results-card h2 { margin-bottom: 2px; font-size: 19px; letter-spacing: -.5px; }
.service-label { overflow: hidden; margin: 0; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.price-result { display: grid; gap: 3px; margin: 17px 0 12px; padding: 14px; border-radius: 12px; background: linear-gradient(135deg,#edf6ed,#f8faf5); }
.price-result > span { color: #5c7564; font-size: 9px; font-weight: 750; }
.price-result strong { color: var(--green-dark); font-size: clamp(28px,4vw,38px); line-height: 1; letter-spacing: -1.5px; }
.price-result small { color: #78877d; font-size: 9px; }
.breakdown { display: grid; gap: 0; margin: 0; }
.breakdown > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #eef1eb; }
.breakdown dt, .breakdown dd { margin: 0; font-size: 9px; }
.breakdown dt { color: #65756b; }
.breakdown dd { color: #385444; font-weight: 750; white-space: nowrap; }
.breakdown .breakdown-total { margin-top: 2px; border-bottom-color: #dbe7db; }
.breakdown-total dt, .breakdown-total dd { color: var(--ink); font-size: 10px; font-weight: 850; }
.breakdown .breakdown-profit { border-bottom: 0; }
.breakdown-profit dt, .breakdown-profit dd { color: var(--green-dark); font-weight: 850; }
.calculation-status { margin: 7px 0 0; color: #78877d; font-size: 9px; line-height: 1.5; }
.calculation-status.is-error { color: var(--red); }
.method-card { display: flex; gap: 10px; padding: 14px; box-shadow: none; }
.method-icon { display: grid; flex: 0 0 auto; width: 22px; height: 22px; place-items: center; border-radius: 8px; background: #edf4eb; color: var(--green-dark); font-size: 10px; font-weight: 850; }
.method-card h3, .next-step-card h3 { margin: 0 0 5px; font-size: 11px; }
.method-card p { margin: 0 0 6px; color: #78857c; font-size: 9px; line-height: 1.5; }
.method-card p:last-child { margin-bottom: 0; }
.next-step-card { padding: 15px; background: #fffefa; box-shadow: none; }
.next-step-card .eyebrow { margin-bottom: 5px; }
.next-step-card p:not(.eyebrow) { margin: 0 0 9px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.next-step-card a { color: var(--green-dark); font-size: 9px; font-weight: 850; text-decoration: none; }
.next-step-card a:hover { text-decoration: underline; text-underline-offset: 3px; }
.privacy-note { margin: 0; padding: 0 3px; color: #88948c; font-size: 9px; line-height: 1.5; }
.offline-note { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 19px 0 0; padding: 18px 20px; border: 1px solid #e5e6dd; border-radius: 14px; background: #f1f0e9; }
.offline-note .eyebrow { margin-bottom: 4px; color: #78826f; }
.offline-note h2 { margin: 0 0 3px; font-size: 12px; }
.offline-note p:not(.eyebrow) { margin: 0; color: #7d877f; font-size: 9px; }
.offline-note a { flex: 0 0 auto; color: #52695a; font-size: 9px; font-weight: 800; text-decoration: none; }
.offline-note a:hover { text-decoration: underline; text-underline-offset: 3px; }
.page-footer { display: flex; justify-content: space-between; gap: 18px; padding: 19px 2px 27px; color: #89958d; font-size: 9px; }
.page-footer > span:first-child { color: #58715f; font-size: 11px; font-weight: 850; }
.page-footer a { color: #205b46; font-weight: 750; text-decoration: none; }
.page-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 820px) {
  .calculator-layout { grid-template-columns: 1fr; }
  .results-column { grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; }
  .results-card { grid-row: span 3; }
  .privacy-note { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .topbar { height: 62px; padding: 0 16px; }
  .header-tools { gap: 10px; }
  .local-tag { font-size: 9px; }
  .page-shell { width: min(100% - 28px, 520px); }
  .intro { align-items: flex-start; flex-direction: column; gap: 14px; padding: 34px 0 18px; }
  h1 { font-size: 30px; letter-spacing: -1.3px; }
  .intro-copy { font-size: 11px; }
  .intro-note { max-width: none; }
  .saved-bar { flex-wrap: wrap; }
  .saved-copy { flex: 1 1 100%; }
  .saved-select-wrap { flex: 1 1 100%; }
  .saved-select-wrap select { width: 100%; max-width: none; }
  .field-grid { grid-template-columns: 1fr; gap: 0; }
  .card { padding: 16px 15px 12px; }
  .results-column { grid-template-columns: 1fr; }
  .results-card { grid-row: auto; padding: 17px; }
  .offline-note { align-items: flex-start; flex-direction: column; }
  .page-footer { flex-direction: column; }
}

/* As decisões de custo e a referência precisam ser legíveis durante o preenchimento. */
.field > span:first-child { font-size: 12px; }
.field input { height: 44px; font-size: 14px; }
.input-suffix, .currency-input { height: 44px; }
.input-suffix input, .currency-input input { height: 42px; }
.field small, .allocation-copy, .recurring-summary span, .recurring-summary a { font-size: 11px; }
.section-heading h2 { font-size: 16px; }
.section-heading p, .allocation-title { font-size: 12px; }
.breakdown dt, .breakdown dd { font-size: 12px; }
.breakdown-total dt, .breakdown-total dd { font-size: 13px; }
.price-result > span, .price-result small, .calculation-status { font-size: 12px; }
.form-feedback { font-size: 12px; line-height: 1.45; }
.result-jump { display: inline-block; margin-top: 9px; color: var(--green-dark); font-size: 12px; font-weight: 750; text-underline-offset: 3px; }
.results-card { scroll-margin-top: 18px; }
@media (max-width: 600px) {
  .intro-copy, .intro-note p { font-size: 13px; }
  .example-banner strong, .example-banner span, .text-button { font-size: 12px; }
  .button-primary { font-size: 13px; }
  .saved-select-wrap select { height: 44px; font-size: 14px; }
  .breakdown { gap: 2px; }
  .field input, .saved-select-wrap select { font-size: 16px; }
}
button:focus-visible, a:focus-visible { outline: 3px solid #73ad83; outline-offset: 3px; }
