/* Site público do Cifra Via (cifravia.com.br): estático, sem script de terceiros, sem fonte remota. */
:root {
  --bg: #f6f4fb; --surface: #ffffff; --surface-2: #f1eefa; --border: #e5e1f1;
  --text: #1b1630; --muted: #544e6e; --subtle: #6c6686;
  --primary: #6d38e0; --primary-strong: #5a28c6; --primary-fg: #ffffff; --primary-surface: #efe9ff;
  --income: #0f8a7e; --expense: #c4473a;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0c1b; --surface: #1a162c; --surface-2: #25203d; --border: #302a4c;
    --text: #f5f3fc; --muted: #c0bad8; --subtle: #9891b6;
    --primary: #aa90ff; --primary-strong: #beaaff; --primary-fg: #160e30; --primary-surface: #342866;
    --income: #4fd1c0; --expense: #ff8a7a;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--primary); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
header.top { border-bottom: 1px solid var(--border); background: var(--surface); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; flex-wrap: wrap; }
.brand { font-weight: 800; font-size: 1.15rem; color: var(--text); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
/* Bloco 10.8 — marca (pacote aprovado): horizontal no desktop, compacta no celular, variante pelo tema; altura fixa = sem deslocamento */
.brand img { display: block; height: 32px; width: auto; }
@media (max-width: 599px) { .brand img { height: 28px; } }
.foot-brand { display: flex; flex-direction: column; gap: 6px; }
.foot-logo img { display: block; width: 248px; max-width: 100%; height: auto; }
nav.main { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
nav.main a { color: var(--muted); text-decoration: none; padding: 8px 10px; border-radius: 8px; font-size: .95rem; }
nav.main a:hover, nav.main a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 10px; font-weight: 650; text-decoration: none; border: 1px solid transparent; }
.btn-primary { background: var(--primary); color: var(--primary-fg); }
.btn-primary:hover { background: var(--primary-strong); }
.btn-ghost { border-color: var(--border); color: var(--text); background: var(--surface); }
nav.main .btn { padding: 0 14px; min-height: 40px; color: var(--primary-fg); }
.hero { padding: 44px 0 32px; }
.hero-sm { padding-bottom: 12px; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.12; margin: 0 0 14px; letter-spacing: -.02em; max-width: 14em; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 36em; margin: 0 0 24px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.note { color: var(--subtle); font-size: .9rem; }
section { padding: 32px 0; }
h2 { font-size: 1.5rem; margin: 0 0 12px; letter-spacing: -.01em; }
h3 { font-size: 1.05rem; margin: 0 0 6px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px; min-width: 0; }
.card p { margin: 0; color: var(--muted); }
.kpi { font-variant-numeric: tabular-nums; font-weight: 750; font-size: 1.6rem; }
.pos { color: var(--income); } .neg { color: var(--expense); }
.tag { display: inline-block; font-size: .78rem; padding: 2px 8px; border-radius: 999px; background: var(--primary-surface); color: var(--text); }
.bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; align-items: end; height: 120px; margin-top: 12px; }
.bars div { background: var(--primary); border-radius: 6px 6px 0 0; opacity: .85; }
.bars span { display: block; text-align: center; font-size: .75rem; color: var(--subtle); }
table.plans { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
table.plans th, table.plans td { padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: left; }
table.plans thead th { background: var(--surface-2); }
table.plans td.c, table.plans th.c { text-align: center; }
.scroll { overflow-x: auto; }
footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 24px 0; color: var(--subtle); font-size: .9rem; }
footer .wrap { display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 650; }
@media (prefers-reduced-motion: no-preference) { .btn { transition: background .15s; } }

/* Bloco 8.7 — landing */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hero-grid { display: grid; gap: 32px; align-items: center; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); } }
.shot { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 8px; box-shadow: 0 18px 40px -24px rgba(40, 20, 90, .45); min-width: 0; }
.shot img { display: block; width: 100%; height: auto; border-radius: 10px; }
.shot figcaption { font-size: .82rem; color: var(--subtle); padding: 8px 6px 2px; }
.shots { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.feature { display: grid; gap: 24px; align-items: center; grid-template-columns: minmax(0, 1fr); padding: 24px 0; }
@media (min-width: 860px) { .feature { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .feature.rev > :first-child { order: 2; } }
.feature ul { margin: 8px 0 0; padding-left: 1.1em; color: var(--muted); }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.steps .card::before { counter-increment: s; content: counter(s); display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 999px; background: var(--primary-surface); color: var(--text); font-weight: 750; margin-bottom: 8px; }
/* Bloco 10.3 — Gratuito × Pro compactos. Seletor Anual/Mensal: rádios + combinador de irmãos (~), sem :has()
   nem script; fica acima dos cartões (sobre o Pro no desktop) e os cartões alinham as regiões por subgrid. */
.plans-block { display: grid; gap: 12px 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 720px) {
  .plans-block { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plans-block .seg-row { grid-column: 2; grid-row: 1; }
  .plans-block .plan-free { grid-column: 1; grid-row: 2 / span 4; }
  .plans-block .plan-pro { grid-column: 2; grid-row: 2 / span 4; }
  .plans-block .plans-note { grid-column: 1 / -1; }
}
.seg-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.seg-label { font-size: .88rem; color: var(--subtle); font-weight: 600; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); flex: 1 1 220px; max-width: 320px; }
.seg label { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 12px; border-radius: 999px; color: var(--muted); font-weight: 700; cursor: pointer; text-align: center; }
.plans-block input[value="anual"]:checked ~ .seg-row label[for$="-anual"],
.plans-block input[value="mensal"]:checked ~ .seg-row label[for$="-mensal"] { background: var(--primary); color: var(--primary-fg); box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.plans-block input[value="anual"]:focus-visible ~ .seg-row label[for$="-anual"],
.plans-block input[value="mensal"]:focus-visible ~ .seg-row label[for$="-mensal"] { outline: 3px solid var(--primary); outline-offset: 3px; }
.plan { display: grid; grid-template-rows: subgrid; grid-row: span 4; gap: 14px; align-content: start; }
.plan.plan-pro { border: 2px solid var(--primary); }
.plan-head h3 { font-size: 1.2rem; font-weight: 750; margin: 0 0 2px; }
.plan-head p, .plan-price p { margin: 0; }
.plan ul { margin: 0; padding-left: 1.1em; color: var(--muted); }
.plan ul li + li { margin-top: 4px; }
.plan-cta { display: flex; flex-direction: column; gap: 6px; align-self: end; }
.plan-cta .btn { align-self: stretch; text-align: center; }
.opts { display: grid; }
.opt, .opt[hidden] { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 6px; }
.plans-block input[value="anual"]:checked ~ .plan-pro .opt-mensal,
.plans-block input[value="mensal"]:checked ~ .plan-pro .opt-anual { visibility: hidden; }
.badge { display: inline-block; font-size: .8rem; font-weight: 650; padding: 2px 10px; border-radius: 999px; background: var(--primary-surface); color: var(--text); }
.benefits { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.limits { margin: 14px 0 0; max-width: 48em; }
details.compare summary, details summary { min-height: 28px; }
table.plans tr.group th { background: var(--surface-2); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--subtle); padding-top: 8px; padding-bottom: 8px; }
details .scroll { margin-top: 12px; }
details ul { margin: 10px 0 0; padding-left: 1.1em; color: var(--muted); }
details ul li + li { margin-top: 6px; }
details p { margin: 10px 0 0; color: var(--muted); }
.price { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.price small { font-size: .95rem; font-weight: 500; color: var(--muted); }
p.small { font-size: .88rem; color: var(--subtle); }
.callout { background: var(--primary-surface); border-radius: 12px; padding: 14px 16px; }
.steps li { list-style: none; }
.steps li::marker { content: ""; }
.hero .shot { max-width: 560px; justify-self: end; }
.feature .shot { max-width: 520px; }
.feature .shot.shot-narrow { max-width: 340px; justify-self: center; }
.callout p { margin: 0; }
.callout { margin: 0 0 16px; }
table.plans caption { caption-side: bottom; text-align: left; padding: 10px 0; }
footer nav a { color: var(--subtle); }
@media (max-width: 899px) { .hero .shot { justify-self: stretch; max-width: none; } }
/* Bloco 10.12 — Termos e Privacidade */
.legal { max-width: 46em; margin: 0 auto; padding: 32px 0 48px; }
.legal h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 8px; letter-spacing: -.02em; }
.legal .legal-meta { color: var(--subtle); margin: 0 0 24px; }
.legal h2 { font-size: 1.3rem; margin: 32px 0 10px; scroll-margin-top: 16px; }
.legal h3 { font-size: 1.08rem; margin: 22px 0 8px; }
.legal p, .legal li { color: var(--text); }
.legal p { margin: 0 0 12px; }
.legal ul { margin: 0 0 14px; padding-left: 1.3em; }
.legal li { margin: 0 0 6px; }
.legal a { color: var(--primary); overflow-wrap: anywhere; }
.legal code { font-size: .9em; background: var(--surface-2); padding: 1px 5px; border-radius: 6px; }
.legal-table { overflow-x: auto; margin: 0 0 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.legal-table table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.legal-table th, .legal-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.legal-table tr:last-child th, .legal-table tr:last-child td { border-bottom: 0; }
.legal-table thead th { background: var(--surface-2); font-weight: 700; }
.legal-table tbody th { font-weight: 600; }
