.jcp-par { display: flex; gap: 10px; align-items: stretch; }
.jcp-par input { flex: 1 1 auto; min-width: 0; }
.jcp-par .segment-selector { flex: 0 0 auto; margin: 0; }
.jcp-rotulo { display: block; font-weight: 600; margin-bottom: 8px; color: var(--text-color, #1d1d1f); }
#jcp-tipo { max-width: 320px; }

.jcp-detalhes { scroll-margin-top: 90px; }
.jcp-alternador { display: inline-flex; gap: 4px; padding: 4px; background: #eef1f5; border-radius: 10px; margin: 0 0 18px; }
.jcp-aba { border: 0; background: transparent; font: inherit; font-weight: 600; color: #3a3a3c; padding: 8px 18px; border-radius: 8px; cursor: pointer; }
.jcp-aba.active { background: #fff; color: #0071e3; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.jcp-aba:focus-visible { outline: 2px solid #0071e3; outline-offset: 2px; }

.jcp-legenda { display: flex; flex-wrap: wrap; gap: 18px; margin: 0 0 8px; font-size: .92rem; color: #3a3a3c; }
.jcp-leg::before { content: ""; display: inline-block; width: 18px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 8px; }
.jcp-leg--total::before { background: #0071e3; }
.jcp-leg--inv::before { background: #1d1d1f; }
.jcp-grafico svg { display: block; width: 100%; height: auto; }
.jcp-g-grade { stroke: #e5e5ea; stroke-width: 1; }
.jcp-g-rot { fill: #6e6e73; font-size: 12px; font-family: inherit; }
.jcp-g-total { fill: none; stroke: #0071e3; stroke-width: 3; stroke-linejoin: round; }
.jcp-g-inv { fill: none; stroke: #1d1d1f; stroke-width: 2; stroke-dasharray: 6 5; stroke-linejoin: round; }
.jcp-g-ponto { fill: #0071e3; }
.jcp-g-eixo { font-weight: 600; }

.jcp-tabela-rolagem { overflow-x: auto; max-height: 560px; overflow-y: auto; border: 1px solid #e5e5ea; border-radius: 10px; }
.jcp-tabela { width: 100%; border-collapse: collapse; font-size: .95rem; font-variant-numeric: tabular-nums; }
.jcp-tabela th, .jcp-tabela td { padding: 9px 12px; text-align: right; border-bottom: 1px solid #eceff3; white-space: nowrap; color: #1d1d1f; }
.jcp-tabela th:first-child, .jcp-tabela td:first-child { text-align: left; }
.jcp-tabela thead th { position: sticky; top: 0; background: #f5f5f7; font-weight: 700; }
.jcp-tabela tbody tr:last-child td { font-weight: 700; border-bottom: 0; }
.jcp-tabela--texto { max-width: 520px; margin: 8px 0 6px; border: 1px solid #e5e5ea; }
.jcp-tabela--texto tbody tr:last-child td { font-weight: 400; }
.jcp-legenda-tabela { font-size: .9rem; color: #6e6e73; }
.jcp-formula { font-size: 1.15rem; }
#jcp-nota { margin-top: 14px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }

.cm-editorial { font-size: 1rem; line-height: 1.7; }
.cm-editorial h2 { font-size: 1.45rem; color: #003c87; margin: 0 0 14px; font-weight: 800; }
.cm-editorial h3 { font-size: 1.15rem; color: #1a1a1a; margin: 26px 0 10px; font-weight: 700; }
.cm-editorial p { margin: 0 0 14px; color: #2d3748; }
.cm-editorial ul { margin: 0 0 16px; padding-left: 22px; color: #2d3748; }
.cm-editorial ul li { margin-bottom: 8px; }
.cm-editorial a { color: #003c87; text-decoration: underline; }
.cyh-faq-section { margin: 32px 0; }
.cyh-faq-section h2 { font-size: 1.4rem; margin-bottom: 18px; color: #003c87; }
.cyh-faq-item { padding: 16px 20px; margin: 10px 0; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; }
.cyh-faq-item summary { font-weight: 600; cursor: pointer; color: #1a1a1a; }
.cyh-faq-item[open] summary { margin-bottom: 12px; color: #003c87; }
.cyh-faq-answer { color: #1a1a1a; line-height: 1.6; }

@media (max-width: 600px) {
    .jcp-par { flex-direction: column; }
    .jcp-par .segment-selector { width: 100%; }
    .jcp-tabela { font-size: .86rem; }
    .jcp-tabela th, .jcp-tabela td { padding: 8px; }
}

body.dark-mode .jcp-alternador { background: #2c2c2e; }
body.dark-mode .jcp-aba { color: #d1d1d6; }
body.dark-mode .jcp-aba.active { background: #1c1c1e; color: #64b5ff; }
body.dark-mode .jcp-legenda, body.dark-mode .jcp-rotulo { color: #d1d1d6; }
body.dark-mode .jcp-leg--inv::before { background: #f2f2f7; }
body.dark-mode .jcp-g-grade { stroke: #3a3a3c; }
body.dark-mode .jcp-g-rot { fill: #aeaeb2; }
body.dark-mode .jcp-g-total { stroke: #64b5ff; }
body.dark-mode .jcp-g-ponto { fill: #64b5ff; }
body.dark-mode .jcp-g-inv { stroke: #f2f2f7; }
body.dark-mode .jcp-tabela-rolagem, body.dark-mode .jcp-tabela--texto { border-color: #3a3a3c; }
body.dark-mode .jcp-tabela th, body.dark-mode .jcp-tabela td { color: #e8e8e8; border-color: #3a3a3c; }
body.dark-mode .jcp-tabela thead th { background: #2c2c2e; }
body.dark-mode .cm-editorial h2, body.dark-mode .cyh-faq-section h2 { color: #64b5ff; }
body.dark-mode .cm-editorial h3 { color: #e8e8e8; }
body.dark-mode .cm-editorial p, body.dark-mode .cm-editorial ul li { color: #cbd5e0; }
body.dark-mode .cm-editorial a { color: #64b5ff; }
body.dark-mode .cyh-faq-item { background: #1a1a1a; border-color: #2d3748; }
body.dark-mode .cyh-faq-item summary, body.dark-mode .cyh-faq-answer { color: #e8e8e8; }

@media print {
    .jcp-alternador, .jcp-legenda-tabela { display: none !important; }
    #jcp-painel-grafico, #jcp-painel-tabela { display: block !important; }
    .jcp-tabela-rolagem { max-height: none; overflow: visible; border: 0; }
    .jcp-tabela thead th { position: static; }
    .jcp-g-total { stroke: #0071e3 !important; }
    .jcp-g-inv { stroke: #1d1d1f !important; }
    .jcp-g-rot { fill: #333 !important; }
    .jcp-tabela th, .jcp-tabela td { color: #000 !important; }
}
