/* Margem Certa — design system do site público */
:root {
  --bg: #f7f8f5;
  --surface: #ffffff;
  --ink: #14201b;
  --ink-2: #44534c;
  --ink-3: #6f7d76;
  --line: #dfe5e0;
  --brand: #0f6b4f;
  --brand-2: #0b5440;
  --brand-soft: #e4f2ec;
  --accent: #e8a33d;
  --accent-soft: #fcf1df;
  --danger: #b3372b;
  --danger-soft: #fbe9e6;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 32, 27, .06), 0 6px 24px rgba(20, 32, 27, .06);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 17px; }
a { color: var(--brand); }
a:hover { color: var(--brand-2); }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

/* header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); text-decoration: none; letter-spacing: -.02em; font-size: 19px; }
.logo-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--brand); display: grid; place-items: center; color: #fff; font-size: 15px; font-weight: 800; }
.nav { display: flex; gap: 20px; font-size: 15px; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--brand); }
@media (max-width: 720px) { .nav { gap: 12px; font-size: 14px; } .nav .hide-sm { display: none; } }

/* hero */
.hero { padding: 64px 0 40px; }
.hero h1 { font-size: clamp(30px, 5vw, 48px); line-height: 1.1; letter-spacing: -.03em; margin: 0 0 16px; max-width: 760px; }
.hero p.lead { font-size: 19px; color: var(--ink-2); max-width: 640px; margin: 0 0 28px; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); margin-bottom: 12px; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 10px; font-weight: 700; font-size: 16px; text-decoration: none; border: 1px solid transparent; cursor: pointer; font-family: inherit; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); color: #fff; }
.btn-ghost { background: transparent; color: var(--brand); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); }
.btn-accent { background: var(--accent); color: #241703; }
.btn-accent:hover { filter: brightness(.95); color: #241703; }

/* cards */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
a.card { text-decoration: none; color: inherit; display: block; transition: transform .15s, border-color .15s; }
a.card:hover { transform: translateY(-2px); border-color: var(--brand); }
.card h3 { margin: 8px 0 6px; font-size: 20px; letter-spacing: -.01em; }
.card p { margin: 0; color: var(--ink-2); font-size: 15px; }
.card .icon { width: 42px; height: 42px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 20px; }
.section { padding: 40px 0; }
.section h2 { font-size: 28px; letter-spacing: -.02em; margin: 0 0 8px; }
.section .sub { color: var(--ink-2); margin: 0 0 24px; }

/* tool layout */
.tool-head { padding: 40px 0 16px; }
.tool-head h1 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -.03em; line-height: 1.15; margin: 0 0 10px; }
.tool-head p { color: var(--ink-2); margin: 0; max-width: 700px; }
.tool { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; align-items: start; padding: 16px 0 32px; }
@media (max-width: 880px) { .tool { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.panel h2 { font-size: 18px; margin: 0 0 16px; letter-spacing: -.01em; }
.panel h2 small { font-weight: 500; color: var(--ink-3); font-size: 14px; }
.result-panel { position: sticky; top: 84px; }
@media (max-width: 880px) { .result-panel { position: static; } }
fieldset { border: 0; padding: 0; margin: 0 0 20px; }
legend { font-weight: 700; font-size: 15px; margin-bottom: 10px; color: var(--ink); }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 13px; color: var(--ink-3); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .row-3 { grid-template-columns: 1fr 1fr; } }
input[type="number"], input[type="text"], select {
  width: 100%; padding: 11px 12px; font-size: 16px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font-family: inherit;
}
input:focus, select:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.input-prefix { position: relative; }
.input-prefix span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: 15px; pointer-events: none; }
.input-prefix input { padding-left: 38px; }
.input-suffix { position: relative; }
.input-suffix span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: 15px; pointer-events: none; }
.input-suffix input { padding-right: 38px; }

.items { display: grid; gap: 8px; margin-bottom: 10px; }
.item-row { display: grid; grid-template-columns: 1fr 130px 36px; gap: 8px; }
.item-row button { border: 1px solid var(--line); background: #fff; border-radius: 9px; cursor: pointer; color: var(--ink-3); font-size: 18px; }
.item-row button:hover { color: var(--danger); border-color: var(--danger); }
.link-btn { background: none; border: 0; color: var(--brand); font-weight: 700; cursor: pointer; padding: 4px 0; font-size: 15px; font-family: inherit; }

.presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; font-size: 14px; cursor: pointer; font-family: inherit; color: var(--ink-2); }
.chip:hover, .chip.active { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }

.big-number { font-size: 44px; font-weight: 800; letter-spacing: -.03em; color: var(--brand); line-height: 1.1; font-variant-numeric: tabular-nums; }
.big-label { font-size: 14px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.kv:last-child { border-bottom: 0; }
.kv span:last-child { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.bar { height: 14px; border-radius: 7px; overflow: hidden; display: flex; background: var(--line); margin: 14px 0 8px; }
.bar i { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--ink-2); }
.legend b { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.alert { border-radius: 10px; padding: 12px 14px; font-size: 14px; margin-top: 14px; }
.alert-warn { background: var(--accent-soft); color: #6b4708; }
.alert-danger { background: var(--danger-soft); color: var(--danger); }
.alert-ok { background: var(--brand-soft); color: var(--brand-2); }

/* offer box */
.offer { background: linear-gradient(135deg, #0f6b4f, #0b4a39); color: #fff; border-radius: var(--radius); padding: 28px; display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; margin: 8px 0 32px; }
.offer h3 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.01em; }
.offer p { margin: 0; color: #cfe6dc; font-size: 15px; }
.offer .tag { display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; background: rgba(255,255,255,.12); padding: 3px 8px; border-radius: 6px; margin-bottom: 8px; }
@media (max-width: 720px) { .offer { grid-template-columns: 1fr; } }

/* prose */
.prose { max-width: 760px; }
.prose h2 { font-size: 25px; letter-spacing: -.02em; margin: 36px 0 10px; line-height: 1.25; }
.prose h3 { font-size: 20px; margin: 28px 0 8px; }
.prose p, .prose li { color: #26332d; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 16px 0; background: var(--surface); }
.prose th, .prose td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.prose th { background: var(--brand-soft); }
.prose code { font-family: var(--mono); background: var(--brand-soft); padding: 1px 6px; border-radius: 5px; font-size: .9em; }
.formula { font-family: var(--mono); background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand); padding: 14px 16px; border-radius: 8px; font-size: 15px; overflow-x: auto; }
.disclosure { font-size: 13px; color: var(--ink-3); border-top: 1px solid var(--line); padding-top: 12px; margin-top: 24px; }
.updated { font-size: 14px; color: var(--ink-3); }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; margin-bottom: 10px; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { margin: 10px 0 0; color: var(--ink-2); }

/* footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 32px 0; margin-top: 48px; font-size: 14px; color: var(--ink-3); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer a { color: var(--ink-2); text-decoration: none; margin-right: 16px; }
.site-footer a:hover { color: var(--brand); }

/* pricing / sales page */
.price-box { text-align: center; }
.price-box .price { font-size: 52px; font-weight: 800; letter-spacing: -.03em; color: var(--ink); }
.price-box .price small { font-size: 20px; color: var(--ink-3); font-weight: 600; }
.checklist { list-style: none; padding: 0; margin: 16px 0; }
.checklist li { padding: 6px 0 6px 30px; position: relative; }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.screens { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.sheet-preview { font-family: var(--mono); font-size: 12.5px; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.sheet-preview .t { background: var(--brand); color: #fff; padding: 8px 12px; font-weight: 700; font-family: var(--font); font-size: 13px; }
.sheet-preview table { width: 100%; border-collapse: collapse; }
.sheet-preview td { border-top: 1px solid var(--line); padding: 6px 10px; }
.sheet-preview td:last-child { text-align: right; }
.sheet-preview tr.total td { font-weight: 800; background: var(--brand-soft); }
.muted { color: var(--ink-3); }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media print { .site-header, .site-footer, .offer, .no-print { display: none !important; } body { background: #fff; } .tool { grid-template-columns: 1fr; } }
