/* ReservaCalc — estilos compartilhados */

  :root {
    --bg: #fbfaf7;
    --surface: #ffffff;
    --ink: #0f1419;
    --ink-2: #3a4047;
    --ink-3: #6b7280;
    --line: #e3e1db;
    --line-2: #d0cdc4;
    --gold: #c8932b;
    --gold-soft: #fdf6e3;
    --pink: #e3007a;
    --blue: #1e5fa8;
    --green: #1f7a45;
    --red: #c0392b;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
  body {
    font-family: 'IBM Plex Sans', system-ui, sans-serif;
    background: var(--bg); color: var(--ink); line-height: 1.5;
    -webkit-font-smoothing: antialiased;
  }

  /* Skip link — acessibilidade (Google valoriza) */
  .skip-link {
    position: absolute; left: -9999px; top: 0;
    background: var(--ink); color: #fff; padding: 12px 20px;
    text-decoration: none; z-index: 999;
  }
  .skip-link:focus { left: 12px; top: 12px; }

  .container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

  /* HEADER */
  header.site-header {
    background: rgba(255,255,255,0.92); border-bottom: 1px solid var(--line);
    padding: 16px 0; position: sticky; top: 0; z-index: 50;
    backdrop-filter: blur(8px);
  }
  .head-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
  .brand {
    display: flex; align-items: center; gap: 10px;
    font-family: 'IBM Plex Serif', serif;
    font-weight: 700; font-size: 19px; letter-spacing: -0.01em;
    text-decoration: none; color: var(--ink);
  }
  .brand .dot {
    width: 10px; height: 10px; background: var(--gold);
    border-radius: 50%; box-shadow: 0 0 0 4px var(--gold-soft);
  }
  .pill {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px; background: var(--gold-soft); color: var(--gold);
    padding: 4px 10px; border-radius: 100px; font-weight: 600;
  }

  /* Breadcrumb */
  .breadcrumb {
    padding: 14px 0 0;
    font-size: 12px; color: var(--ink-3);
  }
  .breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
  .breadcrumb li::after { content: '›'; margin-left: 6px; color: var(--line-2); }
  .breadcrumb li:last-child::after { content: ''; }
  .breadcrumb a {
    color: var(--ink-3); text-decoration: none;
  }
  .breadcrumb a:hover { color: var(--gold); }

  /* HERO */
  .hero { padding: 32px 0 32px; border-bottom: 1px solid var(--line); }
  .hero h1 {
    font-family: 'IBM Plex Serif', serif;
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 600; line-height: 1.05;
    letter-spacing: -0.02em; margin-bottom: 16px; max-width: 880px;
  }
  .hero h1 em { font-style: italic; color: var(--gold); font-weight: 600; }
  .hero .lede { font-size: 17px; color: var(--ink-2); max-width: 720px; line-height: 1.55; }
  .hero .lede strong { color: var(--ink); font-weight: 600; }
  .hero-meta {
    display: flex; gap: 16px; margin-top: 16px;
    font-size: 12px; color: var(--ink-3);
    font-family: 'IBM Plex Mono', monospace;
  }
  .hero-meta time::before { content: '◷ '; }
  .hero-meta span.read::before { content: '◔ '; }

  /* ANCHOR LINKS (table of contents) — bom para SEO */
  .toc {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 12px; padding: 18px 22px; margin: 24px 0;
  }
  .toc-title {
    font-size: 11px; font-family: 'IBM Plex Mono', monospace;
    letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--ink-3); font-weight: 600; margin-bottom: 10px;
  }
  .toc ol {
    list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px;
    counter-reset: toc-counter;
  }
  .toc li {
    counter-increment: toc-counter; font-size: 14px;
  }
  .toc li::before {
    content: counter(toc-counter, decimal-leading-zero) ' ';
    font-family: 'IBM Plex Mono', monospace;
    color: var(--gold); font-weight: 600; margin-right: 4px;
  }
  .toc a {
    color: var(--ink-2); text-decoration: none; font-weight: 500;
  }
  .toc a:hover { color: var(--gold); }

  /* LAYOUT */
  .layout {
    display: grid; grid-template-columns: 380px 1fr;
    gap: 32px; padding: 28px 0 48px; align-items: start;
  }
  .panel {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 16px; padding: 24px;
    box-shadow: 0 1px 2px rgba(15,20,25,0.04);
    position: sticky; top: 80px;
  }
  .panel-title {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--ink-3); font-weight: 600; margin-bottom: 4px;
  }
  .panel h2 {
    font-family: 'IBM Plex Serif', serif;
    font-size: 22px; font-weight: 600;
    letter-spacing: -0.01em; margin-bottom: 20px;
  }
  .field { margin-bottom: 18px; }
  .field-label {
    display: flex; justify-content: space-between; align-items: baseline;
    font-size: 13px; font-weight: 500; color: var(--ink-2); margin-bottom: 6px;
  }
  .field-hint { font-size: 11px; color: var(--ink-3); font-family: 'IBM Plex Mono', monospace; }

  .num-input {
    position: relative; display: flex; align-items: center;
    background: var(--bg); border: 1.5px solid var(--line);
    border-radius: 10px; transition: all 0.15s; overflow: hidden;
  }
  .num-input:focus-within {
    border-color: var(--ink); background: var(--surface);
    box-shadow: 0 0 0 4px rgba(15,20,25,0.06);
  }
  .num-input .prefix {
    padding: 12px 4px 12px 14px;
    color: var(--ink-3); font-weight: 500; font-size: 15px; user-select: none;
  }
  .num-input .suffix {
    padding: 12px 14px 12px 4px;
    color: var(--ink-3); font-size: 14px; user-select: none;
  }
  .num-input input {
    flex: 1; border: none; background: transparent;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 18px; font-weight: 600; color: var(--ink);
    padding: 12px 4px; outline: none; width: 100%; min-width: 0;
    font-variant-numeric: tabular-nums;
  }
  .num-input input::-webkit-outer-spin-button,
  .num-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
  .num-input input[type=number] { -moz-appearance: textfield; }

  .step-btns { display: flex; flex-direction: column; border-left: 1px solid var(--line); }
  .step-btns button {
    background: transparent; border: none; color: var(--ink-3);
    cursor: pointer; padding: 0 10px; font-size: 10px; flex: 1;
    transition: background 0.1s;
  }
  .step-btns button:first-child { border-bottom: 1px solid var(--line); }
  .step-btns button:hover { background: var(--line); color: var(--ink); }

  .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
  .chip {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px; font-weight: 500;
    padding: 5px 10px; border: 1px solid var(--line);
    background: var(--surface); color: var(--ink-2);
    border-radius: 6px; cursor: pointer; transition: all 0.12s;
  }
  .chip:hover { border-color: var(--ink-3); color: var(--ink); }
  .chip.active { background: var(--ink); color: var(--surface); border-color: var(--ink); }

  .field-divider { height: 1px; background: var(--line); margin: 20px -24px 20px; }

  details.advanced summary {
    cursor: pointer; list-style: none;
    font-size: 13px; font-weight: 500; color: var(--ink-2);
    display: flex; align-items: center; gap: 6px;
    padding: 8px 0; user-select: none;
  }
  details.advanced summary::-webkit-details-marker { display: none; }
  details.advanced summary::before {
    content: '+'; display: inline-flex; align-items: center; justify-content: center;
    width: 16px; height: 16px; background: var(--line); color: var(--ink);
    border-radius: 4px; font-weight: 700; font-size: 11px;
  }
  details.advanced[open] summary::before { content: '−'; }
  details.advanced > div { padding-top: 12px; }

  .results { display: flex; flex-direction: column; gap: 28px; }

  .winner-banner {
    background: var(--ink); color: var(--surface);
    border-radius: 16px; padding: 28px 28px 24px;
    position: relative; overflow: hidden;
  }
  .winner-banner::before {
    content: ''; position: absolute;
    top: -40%; right: -10%; width: 300px; height: 300px;
    background: radial-gradient(circle, var(--gold) 0%, transparent 60%);
    opacity: 0.18;
  }
  .winner-banner .tag {
    display: inline-block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--gold); background: rgba(200,147,43,0.15);
    padding: 4px 10px; border-radius: 100px; margin-bottom: 12px; font-weight: 600;
  }
  .winner-banner .title {
    font-family: 'IBM Plex Serif', serif;
    font-size: 30px; font-weight: 600; line-height: 1.1;
    letter-spacing: -0.01em; margin-bottom: 4px;
  }
  .winner-banner .title em { color: var(--gold); font-style: italic; }
  .winner-banner .subtitle { font-size: 14px; color: rgba(255,255,255,0.65); margin-bottom: 18px; }
  .winner-stats {
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px;
    padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.12);
    position: relative; z-index: 2;
  }
  .winner-stat .k {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
    color: rgba(255,255,255,0.55); margin-bottom: 6px;
  }
  .winner-stat .v {
    font-size: 22px; font-weight: 600; letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
  }
  .winner-stat .v.plus { color: #6dd49a; }
  .winner-stat .v small {
    font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.45); margin-left: 2px;
  }

  .cards-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .invest-card {
    background: var(--surface); border: 1.5px solid var(--line);
    border-radius: 14px; padding: 22px; transition: all 0.2s; position: relative;
  }
  .invest-card[data-key="tesouro"] { border-top: 3px solid var(--gold); }
  .invest-card[data-key="caixinha"] { border-top: 3px solid var(--pink); }
  .invest-card[data-key="cdb"] { border-top: 3px solid var(--green); }
  .invest-card[data-key="poupanca"] { border-top: 3px solid var(--blue); }
  .ic-head {
    display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 4px;
  }
  .ic-name { font-family: 'IBM Plex Serif', serif; font-size: 17px; font-weight: 600; }
  .ic-sub { font-size: 12px; color: var(--ink-3); margin-bottom: 18px; }
  .ic-rank {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px; font-weight: 600; color: var(--ink-3);
    background: var(--bg); padding: 3px 7px; border-radius: 4px;
  }
  .invest-card[data-rank="1"] .ic-rank { background: var(--ink); color: var(--gold); }
  .ic-total-label {
    font-size: 11px; color: var(--ink-3); margin-bottom: 2px;
    font-family: 'IBM Plex Mono', monospace;
    letter-spacing: 0.05em; text-transform: uppercase;
  }
  .ic-total {
    font-size: 28px; font-weight: 600; letter-spacing: -0.015em;
    margin-bottom: 14px; font-variant-numeric: tabular-nums;
  }
  .ic-total .currency {
    color: var(--ink-3); font-size: 16px; margin-right: 3px; font-weight: 500;
  }
  .ic-breakdown {
    display: flex; flex-direction: column; gap: 8px;
    padding-top: 14px; border-top: 1px dashed var(--line-2);
  }
  .ic-row { display: flex; justify-content: space-between; font-size: 13px; }
  .ic-row .k { color: var(--ink-3); }
  .ic-row .v { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
  .ic-row.gain .v { color: var(--green); }
  .ic-row.cost .v { color: var(--red); }
  .ic-note {
    margin-top: 14px; font-size: 12px; color: var(--ink-3);
    line-height: 1.45; padding-top: 12px; border-top: 1px dashed var(--line-2);
  }

  .chart-section, .compare-section {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 16px; padding: 24px;
  }
  .section-head {
    display: flex; justify-content: space-between; align-items: flex-end;
    margin-bottom: 20px; flex-wrap: wrap; gap: 12px;
  }
  .section-head h3 {
    font-family: 'IBM Plex Serif', serif;
    font-size: 20px; font-weight: 600; letter-spacing: -0.01em;
  }
  .section-head p { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
  .legend { display: flex; gap: 16px; flex-wrap: wrap; }
  .legend-item {
    display: flex; align-items: center; gap: 7px;
    font-size: 12px; font-weight: 500; color: var(--ink-2);
  }
  .legend-swatch { width: 14px; height: 3px; border-radius: 2px; }
  svg.chart { width: 100%; height: auto; display: block; }

  .bars { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
  .bar-row {
    display: grid; grid-template-columns: 180px 1fr 150px;
    gap: 20px; align-items: center;
  }
  .bar-name { font-size: 14px; font-weight: 600; color: var(--ink); }
  .bar-name .s {
    display: block; font-size: 11px; color: var(--ink-3);
    font-weight: 500; margin-top: 2px;
  }
  .bar-track {
    height: 28px; background: var(--bg);
    border-radius: 8px; overflow: hidden; position: relative;
  }
  .bar-fill {
    height: 100%; border-radius: 8px;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    background: var(--ink);
  }
  .bar-fill[data-key="tesouro"] { background: var(--gold); }
  .bar-fill[data-key="caixinha"] { background: var(--pink); }
  .bar-fill[data-key="cdb"] { background: var(--green); }
  .bar-fill[data-key="poupanca"] { background: var(--blue); }
  .bar-amount {
    font-size: 16px; font-weight: 600;
    text-align: right; font-variant-numeric: tabular-nums;
  }
  .bar-amount .s {
    display: block; font-size: 11px; color: var(--ink-3);
    font-weight: 500; margin-top: 1px;
  }
  .bar-amount.neg { color: var(--red); }

  /* ============================================================
     SLOTS DE GOOGLE ADSENSE
     - .ad-slot: container padrão com label "Publicidade"
     - posicionados em locais de alto CTR sem prejudicar UX
     ============================================================ */
  .ad-slot {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 12px; padding: 16px;
    margin: 28px 0; min-height: 100px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    position: relative;
  }
  .ad-slot::before {
    content: 'Publicidade';
    position: absolute; top: 6px; left: 12px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 9px; letter-spacing: 0.15em;
    color: var(--ink-3); font-weight: 600;
  }
  .ad-slot-placeholder {
    color: var(--ink-3); font-size: 12px;
    font-family: 'IBM Plex Mono', monospace;
    border: 1.5px dashed var(--line-2);
    width: 100%; min-height: 90px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px; margin-top: 14px;
  }
  /* Ad sticky no sidebar (mais valioso) */
  .ad-sidebar {
    margin-top: 16px;
    min-height: 250px;
  }
  .ad-sidebar .ad-slot-placeholder { min-height: 240px; }
  /* Ad horizontal in-content (também muito valioso) */
  .ad-leaderboard {
    min-height: 110px;
  }
  .ad-leaderboard .ad-slot-placeholder { min-height: 90px; max-height: 90px; }

  /* ============================================================
     SEO CONTENT — texto rico (Google precisa de texto)
     ============================================================ */
  .seo-content {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 16px; padding: 36px 40px; margin-top: 28px;
  }
  .seo-content h2 {
    font-family: 'IBM Plex Serif', serif;
    font-size: 28px; font-weight: 600;
    letter-spacing: -0.015em; margin-bottom: 16px;
    scroll-margin-top: 80px;
  }
  .seo-content h2 + p { margin-top: 0; }
  .seo-content h3 {
    font-family: 'IBM Plex Serif', serif;
    font-size: 20px; font-weight: 600;
    margin: 28px 0 10px;
    scroll-margin-top: 80px;
  }
  .seo-content p {
    font-size: 16px; line-height: 1.7;
    color: var(--ink-2); margin-bottom: 14px;
  }
  .seo-content p strong { color: var(--ink); font-weight: 600; }
  .seo-content ul, .seo-content ol {
    margin: 12px 0 18px 22px;
  }
  .seo-content li {
    font-size: 16px; line-height: 1.7;
    color: var(--ink-2); margin-bottom: 6px;
  }
  .seo-content li strong { color: var(--ink); font-weight: 600; }
  .seo-content table {
    width: 100%; border-collapse: collapse;
    margin: 16px 0 24px; font-size: 14px;
  }
  .seo-content table th, .seo-content table td {
    padding: 10px 12px; text-align: left;
    border-bottom: 1px solid var(--line);
  }
  .seo-content table th {
    background: var(--bg); font-weight: 600;
    font-size: 12px; text-transform: uppercase;
    letter-spacing: 0.04em; color: var(--ink-2);
  }
  .seo-content .callout {
    background: var(--gold-soft); border-left: 3px solid var(--gold);
    padding: 16px 20px; border-radius: 0 8px 8px 0;
    margin: 20px 0;
  }
  .seo-content .callout strong { color: var(--ink); }
  .seo-content .callout p { margin: 0; color: var(--ink-2); }

  /* FAQ accordion */
  .faq-list { margin-top: 12px; }
  details.faq {
    border-bottom: 1px solid var(--line); padding: 4px 0;
  }
  details.faq:last-child { border-bottom: none; }
  details.faq summary {
    cursor: pointer; list-style: none;
    padding: 18px 32px 18px 0;
    font-family: 'IBM Plex Serif', serif;
    font-size: 17px; font-weight: 600;
    color: var(--ink); position: relative;
  }
  details.faq summary::-webkit-details-marker { display: none; }
  details.faq summary::after {
    content: '+'; position: absolute; right: 4px; top: 14px;
    font-size: 24px; color: var(--gold); font-weight: 400;
    transition: transform 0.2s;
  }
  details.faq[open] summary::after { content: '−'; }
  details.faq[open] summary { color: var(--gold); }
  details.faq > p, details.faq > div {
    padding: 0 0 20px;
    font-size: 15px; line-height: 1.7; color: var(--ink-2);
  }

  /* Related links — internal linking ajuda SEO */
  .related {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 16px; padding: 28px 32px; margin-top: 28px;
  }
  .related h2 {
    font-family: 'IBM Plex Serif', serif;
    font-size: 22px; font-weight: 600; margin-bottom: 16px;
  }
  .related-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  }
  .related-card {
    display: block; padding: 18px 20px;
    border: 1px solid var(--line); border-radius: 10px;
    text-decoration: none; color: var(--ink);
    transition: all 0.15s;
  }
  .related-card:hover {
    border-color: var(--gold); background: var(--gold-soft);
  }
  .related-card .rcat {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--gold); font-weight: 600; margin-bottom: 6px;
  }
  .related-card h3 {
    font-family: 'IBM Plex Serif', serif;
    font-size: 16px; font-weight: 600; margin-bottom: 4px;
  }
  .related-card p { font-size: 13px; color: var(--ink-3); }

  footer.foot {
    padding: 32px 0 48px; text-align: center;
    font-size: 13px; color: var(--ink-3);
    border-top: 1px solid var(--line); margin-top: 32px;
  }
  footer.foot nav {
    display: flex; gap: 18px; justify-content: center; flex-wrap: wrap;
    margin-bottom: 14px;
  }
  footer.foot nav a {
    color: var(--ink-2); text-decoration: none; font-size: 13px;
  }
  footer.foot nav a:hover { color: var(--gold); }
  footer.foot .disclaim {
    font-size: 11px; color: var(--ink-3); max-width: 700px;
    margin: 14px auto 0; line-height: 1.55;
  }

  @media (max-width: 1100px) {
    .cards-grid { grid-template-columns: repeat(2, 1fr); }
  }
  @media (max-width: 980px) {
    .layout { grid-template-columns: 1fr; }
    .panel { position: static; }
    .cards-grid { grid-template-columns: repeat(2, 1fr); }
    .winner-stats { grid-template-columns: 1fr; gap: 12px; }
    .bar-row { grid-template-columns: 1fr; gap: 6px; }
    .bar-amount { text-align: left; }
    .related-grid { grid-template-columns: 1fr; }
    .seo-content { padding: 28px 24px; }
  }
  @media (max-width: 520px) {
    .container { padding: 0 16px; }
    .layout { padding: 24px 0 48px; gap: 20px; }
    .panel { padding: 20px; }
    .cards-grid { grid-template-columns: 1fr; }
  }

  @keyframes slideUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .invest-card, .winner-banner, .chart-section, .compare-section {
    animation: slideUp 0.4s ease-out both;
  }


/* ==========================================================================
   SUÍTE RESERVACALC — componentes adicionados às calculadoras
   ========================================================================== */

a { color: inherit; }
.seo-content a, .prose a { color: var(--blue); text-underline-offset: 2px; }
.seo-content a:hover, .prose a:hover { color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Navegação principal */
.site-nav { display: flex; gap: 2px; align-items: center; }
.site-nav a {
  font-size: 14px; font-weight: 500; color: var(--ink-2); text-decoration: none;
  padding: 7px 11px; border-radius: 8px; white-space: nowrap;
}
.site-nav a:hover { background: var(--gold-soft); color: var(--ink); }
.site-nav a[aria-current="page"] { background: var(--ink); color: var(--surface); }
@media (max-width: 1020px) {
  header.site-header { padding: 12px 0 0; }
  .head-row { flex-wrap: wrap; row-gap: 6px; }
  .site-nav {
    order: 3; width: calc(100% + 48px); margin: 0 -24px; padding: 4px 24px 10px;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .site-nav::-webkit-scrollbar { display: none; }
}
@media (max-width: 520px) {
  .site-nav { width: calc(100% + 32px); margin: 0 -16px; padding: 4px 16px 10px; }
}

/* Grupo de opções exclusivas */
.seg {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 1px;
  background: var(--line); border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden;
}
.seg.rows { grid-auto-flow: row; grid-template-columns: 1fr 1fr; }
.seg button {
  font: inherit; font-size: 13px; font-weight: 500; line-height: 1.25;
  padding: 10px 8px; border: 0; background: var(--bg); color: var(--ink-2); cursor: pointer;
}
.seg button:hover { background: var(--surface); color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--surface); font-weight: 600; }

/* Select e data dentro do campo padrão */
.num-input select, .num-input input[type="date"] {
  flex: 1; border: 0; background: transparent; outline: none; min-width: 0; width: 100%;
  font-family: 'IBM Plex Sans', sans-serif; font-size: 16px; font-weight: 600; color: var(--ink);
  padding: 12px 14px; -webkit-appearance: none; appearance: none;
}
.num-input select { cursor: pointer; padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.field-help { font-size: 12px; color: var(--ink-3); margin-top: 6px; line-height: 1.45; }

/* Checkbox em linha */
.check-row { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14px; color: var(--ink-2); }
.check-row input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--ink); flex: none; }

/* Contador +/- */
.stepper { display: flex; align-items: stretch; background: var(--bg); border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; }
.stepper button { width: 46px; border: 0; background: transparent; font-size: 18px; color: var(--ink-2); cursor: pointer; }
.stepper button:hover { background: var(--line); color: var(--ink); }
.stepper output { flex: 1; text-align: center; font-size: 18px; font-weight: 600; padding: 11px 0; font-variant-numeric: tabular-nums; }

/* Folha de cálculo (estilo holerite) */
.sheet { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.sheet table { width: 100%; border-collapse: collapse; font-size: 14px; }
.sheet th {
  text-align: left; font-size: 12px; color: var(--ink-3); font-weight: 600;
  padding: 0 0 10px; border-bottom: 1px solid var(--line-2);
}
.sheet th.v { text-align: right; }
.sheet td { padding: 11px 0; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink); }
.sheet td .s { display: block; font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.sheet td.v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; padding-left: 12px; }
.sheet tr.minus td.v { color: var(--red); }
.sheet tr.plus td.v { color: var(--green); }
.sheet tr.info td { color: var(--ink-3); font-size: 13px; }
.sheet tr.info td.v { color: var(--ink-3); font-weight: 500; }
.sheet tr.total td { border-bottom: 0; border-top: 2px solid var(--ink); font-weight: 700; font-size: 16px; padding-top: 14px; }
.sheet tr.total td.v { color: var(--ink); }
.sheet .table-scroll { overflow-x: auto; }

/* Barra empilhada */
.stack { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--bg); margin: 4px 0 12px; }
.stack i { display: block; height: 100%; transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.stack-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12px; color: var(--ink-2); }
.stack-legend span { display: inline-flex; align-items: center; gap: 6px; }
.stack-legend b { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* Dois cartões lado a lado */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.invest-card[data-key="clt"] { border-top: 3px solid var(--blue); }
.invest-card[data-key="pj"] { border-top: 3px solid var(--gold); }
.invest-card[data-key="neutro"] { border-top: 3px solid var(--ink); }
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Caixa de veredito */
.verdict {
  border-left: 3px solid var(--line-2); background: var(--bg);
  padding: 14px 18px; border-radius: 0 10px 10px 0; font-size: 15px; line-height: 1.55; color: var(--ink-2);
}
.verdict strong { color: var(--ink); }
.verdict.good { border-left-color: var(--green); }
.verdict.bad { border-left-color: var(--red); }
.verdict.gold { border-left-color: var(--gold); background: var(--gold-soft); }

.warn-line { color: var(--red); font-size: 13px; margin-top: 10px; }
.winner-banner .title .big { font-variant-numeric: tabular-nums; }
.winner-stat .v.minus { color: #f19a8f; }

/* Home: grade de ferramentas */
.tool-group { margin-top: 36px; }
.tool-group > h2 { font-family: 'IBM Plex Serif', serif; font-size: 24px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 4px; }
.tool-group > p { color: var(--ink-3); font-size: 15px; margin-bottom: 16px; max-width: 640px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.tool-card {
  display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; padding: 22px;
  transition: border-color 0.15s, background 0.15s;
}
.tool-card:hover { border-color: var(--gold); background: var(--gold-soft); }
.tool-card h3 { font-family: 'IBM Plex Serif', serif; font-size: 19px; font-weight: 600; line-height: 1.2; }
.tool-card p { font-size: 14px; color: var(--ink-2); line-height: 1.55; }
.tool-card .go { margin-top: auto; padding-top: 6px; font-size: 13px; font-weight: 600; color: var(--gold); }
.tool-card[data-key="invest"] { border-top: 3px solid var(--gold); }
.tool-card[data-key="credito"] { border-top: 3px solid var(--green); }
.tool-card[data-key="trabalho"] { border-top: 3px solid var(--blue); }

/* Páginas institucionais */
.prose-wrap { max-width: 780px; }
.prose { padding: 8px 0 24px; }
.prose h2 { font-family: 'IBM Plex Serif', serif; font-size: 24px; font-weight: 600; margin: 32px 0 10px; letter-spacing: -0.01em; }
.prose h3 { font-family: 'IBM Plex Serif', serif; font-size: 18px; font-weight: 600; margin: 22px 0 8px; }
.prose p, .prose li { font-size: 16px; line-height: 1.75; color: var(--ink-2); }
.prose p { margin-bottom: 14px; }
.prose ul { margin: 8px 0 16px 22px; }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--ink); }

footer.foot .tools-line { display: flex; gap: 6px 18px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
footer.foot .tools-line a { color: var(--ink-3); text-decoration: none; font-size: 13px; }
footer.foot .tools-line a:hover { color: var(--gold); }

@media (max-width: 980px) {
  .duo, .mini-grid { grid-template-columns: 1fr; }
  .sheet { padding: 20px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.sheet .section-head, .compare-section .section-head { margin-bottom: 16px; }
.sheet + .sheet { margin-top: 0; }
.cmp-table th.v, .cmp-table td.v { width: 32%; }

/* Correções de layout: itens de grid não podem estourar a largura */
.layout { grid-template-columns: 380px minmax(0, 1fr); }
.layout > *, .results > *, .duo > *, .mini-grid > * { min-width: 0; }
@media (max-width: 980px) { .layout { grid-template-columns: minmax(0, 1fr); } }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.seo-content .table-scroll table { min-width: 520px; }
/* A coluna de resultados tem no máximo ~740px: 4 cartões lado a lado não cabem */
.cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 520px) {
  .cards-grid { grid-template-columns: minmax(0, 1fr); }
  .chart-section, .compare-section, .sheet { padding: 18px 16px; }
  .cmp-table { font-size: 13px; }
}
.tool-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.tool-card .tcat { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.tool-card[data-key="invest"] .tcat { color: var(--gold); }
.tool-card[data-key="credito"] .tcat { color: var(--green); }
.tool-card[data-key="trabalho"] .tcat { color: var(--blue); }
.ic-row { gap: 10px; }
.ic-row .v { white-space: nowrap; }

/* ==========================================================================
   Menu por categorias
   ========================================================================== */
.site-nav { gap: 2px; }
.nav-group { position: relative; }
.nav-group > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 500; color: var(--ink-2); padding: 7px 11px; border-radius: 8px; white-space: nowrap; user-select: none;
}
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary::after {
  content: ''; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg); transition: transform .15s;
}
.nav-group[open] > summary::after { transform: translateY(1px) rotate(225deg); }
.nav-group > summary:hover, .nav-group[open] > summary { background: var(--gold-soft); color: var(--ink); }
.nav-group.current > summary { background: var(--ink); color: var(--surface); }
.nav-panel {
  position: absolute; right: 0; top: calc(100% + 8px); width: 330px; z-index: 70;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 6px;
  box-shadow: 0 14px 36px rgba(15, 20, 25, .14);
}
.nav-panel a { display: block; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--ink); white-space: normal; }
.nav-panel a:hover, .nav-panel a[aria-current="page"] { background: var(--gold-soft); }
.nav-panel a strong { display: block; font-size: 14px; font-weight: 600; }
.nav-panel a span { display: block; font-size: 12.5px; color: var(--ink-3); line-height: 1.4; margin-top: 2px; }
@media (max-width: 1020px) {
  .head-row { position: relative; }
  .site-nav { overflow: visible; flex-wrap: wrap; }
  .nav-group { position: static; }
  .nav-group > summary, .site-nav > a { font-size: 13.5px; padding: 7px 9px; }
  .nav-panel { left: 0; right: 0; width: auto; top: 100%; }
}
@media (max-width: 380px) {
  .nav-group > summary, .site-nav > a { font-size: 13px; padding: 7px 7px; gap: 5px; }
}

/* ==========================================================================
   Barra de ações (compartilhar / PDF) e próximos passos
   ========================================================================== */
.tool-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: -12px; }
.tool-actions .act {
  display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: 13px; font-weight: 600;
  color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 12px; cursor: pointer;
}
.tool-actions .act:hover { border-color: var(--gold); color: var(--ink); background: var(--gold-soft); }
.tool-actions .act-msg { font-size: 13px; color: var(--green); font-weight: 500; }
.next-box { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px; }
.next-box h3 { font-family: 'IBM Plex Serif', serif; font-size: 18px; font-weight: 600; margin-bottom: 12px; }
.next-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.next-card {
  display: block; text-decoration: none; color: var(--ink); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; transition: border-color .15s, background .15s;
}
.next-card:hover { border-color: var(--gold); background: var(--gold-soft); }
.next-card strong { display: block; font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.next-card strong::after { content: ' →'; color: var(--gold); }
.next-card span { display: block; font-size: 13px; color: var(--ink-3); line-height: 1.45; }
.print-head { display: none; }

/* Barras de comparação reaproveitadas fora da página de investimentos */
.bars.compact { margin-top: 4px; }
.bars.compact .bar-row { grid-template-columns: 170px 1fr 150px; }
@media (max-width: 980px) { .bars.compact .bar-row { grid-template-columns: 1fr; } }

/* Tabela com rolagem limitada (evolução ano a ano) */
.scroll-y { max-height: 360px; overflow-y: auto; }
.sheet table thead th { position: sticky; top: 0; background: var(--surface); }

/* ==========================================================================
   Glossário
   ========================================================================== */
.gloss-index { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 28px; }
.gloss-index a {
  font-size: 13px; text-decoration: none; color: var(--ink-2); border: 1px solid var(--line);
  background: var(--surface); padding: 5px 10px; border-radius: 6px;
}
.gloss-index a:hover { border-color: var(--gold); color: var(--ink); }
.term { padding: 18px 0; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.term:target { background: var(--gold-soft); margin: 0 -16px; padding: 18px 16px; border-radius: 10px; }
.prose .term h2 { margin: 0 0 6px; font-size: 21px; }
.prose .term p { margin-bottom: 8px; }
.term .see { font-size: 14px; font-weight: 600; }

/* ==========================================================================
   Impressão / Salvar em PDF
   ========================================================================== */
@media print {
  @page { margin: 12mm; }
  html, body { background: #fff !important; }
  header.site-header, .breadcrumb, .toc, .seo-content, .related, footer.foot, .ad-slot, .tool-actions,
  .next-box, .skip-link, .hero .lede, .hero-meta, .step-btns, .field-help, .stepper button, #brutoChips, #prazoChips { display: none !important; }
  .print-head { display: block; font-size: 11px; color: #3a4047; margin: 0 0 10px; word-break: break-all; }
  .hero { padding: 0 0 8px; border: 0; }
  .hero h1 { font-size: 24px; margin: 0; }
  .layout { display: block !important; padding: 0 !important; }
  .panel { position: static !important; box-shadow: none; margin-bottom: 14px; break-inside: avoid; }
  .results { gap: 14px; }
  .winner-banner, .bar-fill, .stack i, .dot, .legend-swatch { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sheet, .invest-card, .chart-section, .compare-section, .winner-banner { break-inside: avoid; box-shadow: none; }
  * { animation: none !important; transition: none !important; }
}
.nav-panel a[aria-current="page"] { color: var(--ink); }
@media (max-width: 440px) {
  .site-nav { gap: 0; }
  .nav-group > summary, .site-nav > a { font-size: 13px; padding: 7px 7px; gap: 5px; }
  .nav-group > summary::after { width: 5px; height: 5px; }
}

[hidden] { display: none !important; }
