  :root {
    --ink: #12243A;
    --muted: #4B5D72;
    --paper: #F5F7FA;
    --surface: #FFFFFF;
    --tint: #E9EFF6;
    --line: #D3DBE5;
    --brand: #1B4B82;
    --accent: #FFB000;
    --on-accent: #12243A;
    --ok: #1E7A4F;
    --ok-bg: #DDF1E6;
    --warn: #8A5A00;
    --warn-bg: #FFEFC7;
    --bad: #A82F21;
    --bad-bg: #FBE0DB;
    --wa: #17803F;

    --font-head: "Bricolage Grotesque", "Trebuchet MS", "Segoe UI", sans-serif;
    --font-body: "Public Sans", "Segoe UI", Roboto, Arial, sans-serif;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --ink: #E8EEF5;
      --muted: #A5B4C6;
      --paper: #0E1A29;
      --surface: #15263A;
      --tint: #1B2F46;
      --line: #2A3F57;
      --brand: #86B6EA;
      --accent: #FFB92E;
      --on-accent: #12243A;
      --ok: #55CB92;
      --ok-bg: #16392B;
      --warn: #F0B94F;
      --warn-bg: #3B2D0C;
      --bad: #F58C7D;
      --bad-bg: #421C17;
    }
  }
  :root[data-theme="dark"] {
    --ink: #E8EEF5;
    --muted: #A5B4C6;
    --paper: #0E1A29;
    --surface: #15263A;
    --tint: #1B2F46;
    --line: #2A3F57;
    --brand: #86B6EA;
    --accent: #FFB92E;
    --on-accent: #12243A;
    --ok: #55CB92;
    --ok-bg: #16392B;
    --warn: #F0B94F;
    --warn-bg: #3B2D0C;
    --bad: #F58C7D;
    --bad-bg: #421C17;
  }

  html { scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 72px); scroll-behavior: smooth; }
  *, *::before, *::after { box-sizing: border-box; }
  body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
  }
  h1, h2, h3 { font-family: var(--font-head); line-height: 1.08; margin: 0; letter-spacing: -0.015em; }
  h1 { font-size: clamp(2.3rem, 7.2vw, 4rem); font-weight: 700; }
  h2 { font-size: clamp(1.75rem, 4.6vw, 2.6rem); font-weight: 700; }
  h3 { font-size: 1.15rem; font-weight: 650; letter-spacing: -0.005em; line-height: 1.25; }
  p { margin: 0; }
  a { color: var(--brand); }
  :focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

  .skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: 8px; font-weight: 600; text-decoration: none; }
  .skip:focus { top: 12px; }

  .wrap { width: 100%; max-width: 1080px; margin-inline: auto; padding-inline: max(20px, env(safe-area-inset-left, 0px)); }
  .sec { padding-block: 64px; }
  .sec-tint { background: var(--tint); }
  .lead { color: var(--muted); max-width: 60ch; margin-top: 14px; }

  /* Buttons */
  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font: 600 1rem/1 var(--font-body);
    padding: 16px 22px; border-radius: 10px; border: 2px solid transparent;
    text-decoration: none; cursor: pointer; min-height: 52px;
  }
  .btn-primary { background: var(--accent); color: var(--on-accent); }
  .btn-primary:hover { filter: brightness(1.05); }
  .btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
  .btn-ghost:hover { border-color: var(--ink); }
  .btn-sm { padding: 10px 16px; min-height: 44px; font-size: .95rem; }

  /* Header */
  .top {
    position: sticky; top: 0; z-index: 20;
    padding-top: env(safe-area-inset-top, 0px);
    background: color-mix(in srgb, var(--paper) 92%, transparent);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
  }
  .top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
  .logo { display: flex; align-items: center; gap: 10px; white-space: nowrap; font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; color: var(--ink); text-decoration: none; }
  .logo svg { width: 28px; height: 28px; flex: none; }
  .top nav { display: none; gap: 26px; }
  .top nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; white-space: nowrap; }
  .top nav a:hover { text-decoration: underline; }
  /* Marca longa: o menu só cabe a partir daqui; abaixo, o CTA do hero e o botão fixo bastam */
  @media (min-width: 1040px) { .top nav { display: flex; } }
  @media (max-width: 519px) { .top .btn-sm { display: none; } .top .wrap { justify-content: flex-start; } }
  @media (max-width: 360px) { .logo { font-size: 1.1rem; } }

  /* Hero */
  .hero {
    position: relative; padding-block: 48px 64px;
    background-image:
      linear-gradient(var(--line) 1px, transparent 1px),
      linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 36px 36px;
    background-position: -1px -1px;
  }
  .hero::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(to bottom, transparent 55%, var(--paper) 100%);
  }
  .hero .wrap { position: relative; z-index: 1; display: grid; gap: 36px; }
  @media (min-width: 900px) { .hero .wrap { grid-template-columns: 1.05fr 1fr; align-items: center; gap: 56px; } .hero { padding-block: 72px 88px; } }
  .hero p.sub { margin-top: 20px; color: var(--muted); font-size: 1.08rem; max-width: 52ch; }
  .hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
  @media (max-width: 520px) { .hero .actions .btn { width: 100%; } }
  .hero .who { margin-top: 20px; font-size: .92rem; color: var(--muted); }

  /* Painel de vencimentos */
  .panel {
    background: var(--surface); border: 1.5px solid var(--ink); border-radius: 14px;
    box-shadow: 8px 8px 0 var(--accent); overflow: hidden;
  }
  .panel-head { padding: 16px 18px 14px; border-bottom: 1.5px solid var(--ink); }
  .panel-head h3 { font-size: 1.05rem; }
  .seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 12px; background: var(--tint); padding: 4px; border-radius: 10px; }
  .seg button {
    font: 600 .92rem/1.2 var(--font-body); padding: 11px 8px; border: 0; border-radius: 7px;
    background: transparent; color: var(--muted); cursor: pointer; min-height: 44px;
  }
  .seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
  .rows { list-style: none; margin: 0; padding: 0; transition: opacity .18s ease; }
  .rows.fading { opacity: 0; }
  .rows li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--line); }
  .rows .name { font-weight: 600; line-height: 1.3; }
  .rows .det { display: block; font-size: .85rem; color: var(--muted); font-weight: 400; margin-top: 2px; }
  .chip { flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
  .chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
  .chip.ok { color: var(--ok); background: var(--ok-bg); }
  .chip.warn { color: var(--warn); background: var(--warn-bg); }
  .chip.bad { color: var(--bad); background: var(--bad-bg); }
  .panel-foot { padding: 14px 18px; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
  .panel-foot strong { font-family: var(--font-head); font-size: 1.05rem; }
  .panel-foot small { color: var(--muted); font-size: .8rem; }
  @media (prefers-reduced-motion: reduce) { .rows { transition: none; } html { scroll-behavior: auto; } }

  /* Dores */
  .pains { list-style: none; margin: 32px 0 0; padding: 0; border-top: 1.5px solid var(--ink); }
  .pains li { display: grid; gap: 4px; padding: 20px 0; border-bottom: 1px solid var(--line); }
  .pains p { color: var(--muted); max-width: 60ch; }
  @media (min-width: 800px) { .pains li { grid-template-columns: 1fr 1.4fr; gap: 32px; align-items: baseline; } }

  /* Passos */
  .steps { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 28px; }
  .steps li { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-content: start; }
  .steps .n { font-family: var(--font-head); font-weight: 700; font-size: 2.6rem; line-height: 1; color: var(--brand); }
  .steps p { color: var(--muted); margin-top: 6px; }
  @media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 36px; } .steps li { grid-template-columns: 1fr; } }

  /* Tabelas */
  .scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 28px; border: 1.5px solid var(--ink); border-radius: 12px; background: var(--surface); }
  table { width: 100%; border-collapse: collapse; min-width: 560px; }
  th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
  thead th { font-family: var(--font-head); font-size: 1.05rem; border-bottom: 1.5px solid var(--ink); }
  tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
  tbody th { font-weight: 600; }
  td.c, th.c { text-align: center; }
  .hl { background: var(--tint); }
  .note { font-size: .88rem; color: var(--muted); margin-top: 12px; max-width: 70ch; }
  .split { display: grid; gap: 8px; }
  /* sem isso a tabela (min-width) estica a coluna do grid e a página ganha rolagem horizontal no celular */
  .split > *, .form-grid > *, .hero .wrap > * { min-width: 0; }
  @media (min-width: 900px) { .split { grid-template-columns: 0.8fr 1.2fr; gap: 56px; align-items: start; } .split .scroll { margin-top: 0; } }
  .list-plain { margin: 22px 0 0; padding-left: 1.1em; color: var(--muted); }
  .list-plain li { margin-bottom: 8px; }
  .list-plain strong { color: var(--ink); }

  /* Plataforma */
  .feat { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1.5px solid var(--ink); }
  .feat li { padding: 16px 0; border-bottom: 1px solid var(--line); }
  .feat p { color: var(--muted); margin-top: 4px; max-width: 46ch; }
  @media (min-width: 800px) { .feat { display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; } }
  .app { margin-top: 36px; background: var(--surface); border: 1.5px solid var(--ink); border-radius: 14px; overflow: hidden; box-shadow: 8px 8px 0 var(--accent); }
  .app-bar { display: flex; justify-content: space-between; align-items: center; gap: 4px 16px; flex-wrap: wrap; padding: 12px 18px; background: var(--ink); color: var(--paper); }
  .app-bar b { font-family: var(--font-head); font-size: 1.05rem; }
  .app-bar span { font-size: .85rem; opacity: .85; }
  .kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 14px 14px 0; }
  @media (min-width: 700px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
  .kpi { text-align: left; font: inherit; color: var(--ink); background: var(--paper); border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; min-height: 68px; display: grid; gap: 2px; align-content: center; }
  .kpi b { font-family: var(--font-head); font-size: 1.7rem; line-height: 1; }
  .kpi span { font-size: .85rem; color: var(--muted); line-height: 1.25; }
  .kpi[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
  .kpi.bad b { color: var(--bad); }
  .kpi.warn b { color: var(--warn); }
  .kpi.ok b { color: var(--ok); }
  .tabs { display: flex; gap: 4px; padding: 0 14px; margin-top: 14px; border-bottom: 1.5px solid var(--ink); overflow-x: auto; }
  .tabs button { flex: none; font: 600 .95rem/1 var(--font-body); padding: 14px 14px 12px; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1.5px; background: transparent; color: var(--muted); cursor: pointer; min-height: 46px; }
  .tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
  .alert { margin: 14px; padding: 12px 14px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); font-size: .92rem; font-weight: 500; line-height: 1.45; }
  .items { list-style: none; margin: 0; padding: 0; }
  .items > li { padding: 16px 18px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
  .items > li:first-child { border-top: 0; }
  .it-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
  .it-head b { font-weight: 650; line-height: 1.3; }
  .it-head .when { flex: none; font-size: .9rem; color: var(--muted); font-weight: 500; }
  .f3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 16px; }
  .f3 small { display: block; color: var(--muted); font-size: .78rem; }
  .f3 span { font-size: .92rem; font-weight: 500; line-height: 1.35; display: block; }
  .f3 .rel { font-size: .82rem; font-weight: 600; color: var(--muted); }
  .f3 .rel.bad { color: var(--bad); }
  .f3 .rel.warn { color: var(--warn); }
  .obs { color: var(--muted); font-size: .88rem; }
  .items > li.ag { grid-template-columns: 56px 1fr auto; align-items: center; gap: 14px; }
  .dt { text-align: center; border: 1.5px solid var(--line); border-radius: 8px; padding: 6px 0; }
  .dt b { display: block; font-family: var(--font-head); font-size: 1.3rem; line-height: 1; }
  .dt small { color: var(--muted); font-size: .78rem; }
  .ag .obs { margin-top: 2px; }
  .empty { padding: 24px 18px; color: var(--muted); }
  @media (max-width: 480px) { .items > li.ag { grid-template-columns: 56px 1fr; } .items > li.ag .chip { grid-column: 2; justify-self: start; } }

  /* Isca */
  .bait { display: grid; gap: 20px; background: var(--ink); color: var(--paper); border-radius: 16px; padding: 30px 24px; }
  .bait h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); }
  .bait p { color: color-mix(in srgb, var(--paper) 78%, transparent); max-width: 54ch; margin-top: 10px; }
  @media (min-width: 860px) { .bait { grid-template-columns: 1fr auto; align-items: center; padding: 40px; gap: 40px; } }

  /* Formulário */
  .form-grid { display: grid; gap: 32px; }
  @media (min-width: 900px) { .form-grid { grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; } }
  form { background: var(--surface); border: 1.5px solid var(--ink); border-radius: 14px; padding: 24px 20px; display: grid; gap: 16px; }
  label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
  input, select {
    font: 400 16px/1.3 var(--font-body); color: var(--ink); background: var(--paper);
    border: 1.5px solid var(--line); border-radius: 8px; padding: 13px 12px; min-height: 48px; width: 100%;
  }
  input:focus, select:focus { border-color: var(--brand); }
  .row2 { display: grid; gap: 16px; }
  @media (min-width: 520px) { .row2 { grid-template-columns: 1fr 1fr; } }
  .fine { font-size: .85rem; color: var(--muted); }
  #done { display: none; }
  #done.show { display: grid; gap: 14px; }
  #done h3 { font-size: 1.3rem; }

  /* FAQ */
  .faq { margin-top: 28px; border-top: 1.5px solid var(--ink); }
  details { border-bottom: 1px solid var(--line); }
  summary { cursor: pointer; list-style: none; padding: 18px 36px 18px 0; font-weight: 600; position: relative; }
  summary::-webkit-details-marker { display: none; }
  summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; font-weight: 400; color: var(--brand); }
  details[open] summary::after { content: "\2212"; }
  details p { color: var(--muted); padding: 0 0 20px; max-width: 64ch; }

  /* Footer */
  footer { padding-block: 40px calc(110px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
  footer .wrap { display: grid; gap: 8px; }
  footer p { max-width: 78ch; }

  /* WhatsApp fixo */
  .wa {
    position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: 0; z-index: 30;
    margin-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    display: inline-flex; align-items: center; gap: 10px;
    background: var(--wa); color: #fff; text-decoration: none; font-weight: 600;
    padding: 14px 18px; border-radius: 999px; min-height: 52px;
    box-shadow: 0 6px 18px rgba(0,0,0,.28);
  }
  .wa:hover { filter: brightness(1.08); }
  .wa svg { width: 22px; height: 22px; fill: currentColor; }
  /* Só o ícone em tela pequena: o botão com texto cobria o que estava embaixo dele (ex.: o seletor do painel) */
  @media (max-width: 520px) { .wa { padding: 0; width: 56px; height: 56px; justify-content: center; } .wa span { display: none; } }
