/* Cuadro de cuentas del PGC: una sola página organizada por grupos contables */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.cc-intro .lead { font-size: var(--fs-md); line-height: 1.6; color: var(--site-gris-texto); margin: 0 0 10px; }
.cc-hint { font-size: var(--fs-md); color: var(--site-azul-marino); margin: 0 0 22px; }

.cc-model-filter { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 22px; }
.cc-model-filter-label { font-size: var(--fs-sm); font-weight: 700; color: var(--site-azul-marino); }
.cc-model-btn { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1.5px solid #ccd5e0; color: var(--site-azul-marino); font-family: var(--font-body); font-weight: 700; font-size: var(--fs-sm); padding: 7px 16px; border-radius: 20px; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.cc-model-btn:hover { border-color: var(--site-azul-acento, #1a6bc8); }
.cc-model-btn[aria-pressed="true"] { background: var(--site-azul-marino); border-color: var(--site-azul-marino); color: #fff; }
.cc-model-btn[aria-pressed="true"] .cc-model-dot { box-shadow: 0 0 0 2px rgba(255, 255, 255, .5); }
.cc-model-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.cc-model-dot-g { background: #8a97a3; }
.cc-model-dot-p { background: #e58a1a; }
.cc-model-filter-hint { font-size: var(--fs-xs); color: var(--site-gris-texto); font-style: italic; }

.cc-leg-hint { font-size: var(--fs-sm); color: var(--site-gris-texto); font-style: italic; margin: 0 0 10px; }
.cc-legend { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }
.cc-leg { display: flex; gap: 12px; align-items: flex-start; background: #fff; border-radius: 10px; padding: 14px 16px; border: 1px solid var(--site-borde); border-top: 4px solid var(--c); }
.cc-leg i { width: 14px; height: 14px; border-radius: 4px; background: var(--c); flex: none; margin-top: 3px; }
.cc-leg b { display: block; color: var(--site-azul-marino); font-size: var(--fs-base); margin-bottom: 8px; }
.cc-leg-groups { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.cc-leg-groups a { display: flex; gap: 6px; align-items: center; font-size: var(--fs-sm); font-weight: 600; color: var(--c); line-height: 1.3; text-decoration: none; border-radius: 20px; padding: 5px 10px 5px 8px; background: var(--t, #eef3fa); border: 1px solid transparent; transition: background .15s, color .15s, box-shadow .15s; }
.cc-leg-groups a::after { content: '\2192'; margin-left: 2px; opacity: 0; transition: opacity .15s, margin-left .15s; }
.cc-leg-groups a:hover, .cc-leg-groups a:focus-visible { background: var(--c); color: #fff; outline: none; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
.cc-leg-groups a:hover::after, .cc-leg-groups a:focus-visible::after { opacity: 1; margin-left: 4px; }
.cc-leg-groups a:hover .cc-leg-num, .cc-leg-groups a:focus-visible .cc-leg-num { color: #fff; }
.cc-leg-num { font-family: Menlo, Consolas, monospace; font-weight: 700; color: var(--c); flex: none; }

.cc-tools { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.cc-search { position: relative; display: flex; align-items: center; flex: 1 1 620px; max-width: 780px; border: 1.5px solid #ccd5e0; border-radius: 8px; background: #fff; }
.cc-search:focus-within { border-color: var(--site-azul-acento, #1a6bc8); }
.cc-search i { margin-left: 14px; color: #8a9aaa; flex: none; }
.cc-search input { flex: 1 1 auto; min-width: 0; padding: 12px 10px; border: none; border-radius: 8px; font-size: var(--fs-md); font-family: var(--font-body); background: transparent; color: var(--site-azul-marino); outline: none; }
.cc-count { flex: none; font-size: var(--fs-sm); font-weight: 700; color: var(--site-azul-acento, #1a6bc8); white-space: nowrap; padding: 5px 12px; margin: 0 6px 0 8px; background: #e7f1fb; border-radius: 20px; }

.cc-group { margin-bottom: 14px; scroll-margin-top: 70px; }
.cc-gh { display: flex; align-items: center; gap: 16px; background: var(--c); color: #fff; border-radius: 12px 12px 0 0; padding: 14px 20px; cursor: help; }
.cc-gn { font-size: 40px; font-weight: 800; line-height: 1; min-width: 34px; text-align: center; }
.cc-gt { flex: 1; }
.cc-gt h2 { color: #fff; font-size: var(--fs-xl); margin: 0; line-height: 1.15; }
.cc-gt p { margin: 3px 0 0; font-size: var(--fs-sm); opacity: .92; }
.cc-tag { background: rgba(255, 255, 255, .24); font-size: var(--fs-sm); font-weight: 700; padding: 4px 12px; border-radius: 20px; white-space: nowrap; cursor: help; }
.cc-gh-top { flex: none; display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .24); border: none; color: #fff; font-size: 13px; cursor: pointer !important; transition: background .15s; }
.cc-gh-top:hover, .cc-gh-top:focus-visible { background: rgba(255, 255, 255, .42); outline: none; }
.cc-grid { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px; background: var(--t); border: 1px solid var(--t2); border-top: 0; border-radius: 0 0 12px 12px; padding: 16px; }
.cc-col { display: flex; flex-direction: column; gap: 14px; flex: 1 1 300px; min-width: 0; }
.cc-grid > .cc-sg { flex: 1 1 300px; min-width: 280px; }
.cc-sg { background: #fff; border: 1px solid var(--t2); border-radius: 8px; overflow: hidden; }
.cc-sg h3 { background: var(--t2); color: #12202f; font-size: var(--fs-md); line-height: 1.3; margin: 0; padding: 8px 12px; display: flex; gap: 10px; }
.cc-sg h3 span { font-family: Menlo, Consolas, monospace; color: var(--c); flex: none; }
.cc-sg ul { list-style: none; margin: 0; padding: 4px 0; }
.cc-sg li { display: flex; gap: 10px; font-size: var(--fs-sm); line-height: 1.4; padding: 3px 12px; color: #2a3948; cursor: pointer; }
.cc-sg li:nth-child(even) { background: var(--t); }
.cc-sg li:hover, .cc-sg li:focus-visible { background: var(--t2); outline: none; }
.cc-sg li b { font-family: Menlo, Consolas, monospace; color: var(--c); min-width: 34px; flex: none; }
.cc-sg li[data-model]::after { flex: none; align-self: center; margin-left: auto; font-size: 9px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: 2px 7px; border-radius: 8px; }
.cc-sg li[data-model="G"]::after { content: 'General'; background: #e7e9ec; color: #55606b; }
.cc-sg li[data-model="P"]::after { content: 'PYMES'; background: #fceadb; color: #a85d0f; }
.cc-sg li[hidden], .cc-sg[hidden], .cc-group[hidden] { display: none; }
.cc-empty { text-align: center; padding: 30px 0; color: var(--site-gris-texto); }
.cc-source { font-size: var(--fs-xs); color: var(--site-gris-texto); line-height: 1.55; margin: 8px 0 0; }

/* ── Modal de detalle de cuenta ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0, 24, 56, .58); display: none; align-items: center; justify-content: center; z-index: 1000; padding: 16px; }
.modal-overlay.open { display: flex; }
.cc-modal-box { background: #fff; border-radius: 10px; width: 100%; max-width: 720px; max-height: 85vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 8px 40px rgba(0, 0, 0, .28); }
.cc-modal-box .modal-head { background: var(--c, var(--site-azul-marino)); color: #fff; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: none; }
.cc-modal-headtext { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.cc-modal-num { font-family: Menlo, Consolas, monospace; font-size: var(--fs-lg); font-weight: 800; flex: none; }
.cc-modal-box .modal-head-title { font-size: var(--fs-md); font-weight: 700; overflow-wrap: anywhere; }
.cc-modal-box .modal-close { background: none; border: none; color: #fff; font-size: 26px; cursor: pointer; padding: 0 4px; line-height: 1; flex: none; }
.cc-modal-box .modal-body { padding: 18px 20px 22px; overflow-y: auto; }
.cc-modal-desc p { margin: 0 0 10px; font-size: var(--fs-md); line-height: 1.55; color: #2a3948; overflow-wrap: anywhere; }
.cc-mov-compartida { margin: 0 0 12px; font-size: var(--fs-xs); font-style: italic; color: var(--site-gris-texto); }
.cc-model-note { margin: 0 0 12px; font-size: var(--fs-xs); font-weight: 700; padding: 6px 10px; border-radius: 6px; }
.cc-model-note-g { background: #eef1f5; color: #55606b; }
.cc-model-note-p { background: #fceadb; color: #a85d0f; }
.cc-mov-h { margin: 14px 0 8px; font-size: var(--fs-base); color: var(--site-azul-marino); }
.cc-mov-list { list-style: none; margin: 0; padding: 0; }
.cc-mov-list li { font-size: var(--fs-sm); line-height: 1.5; padding: 5px 0 5px 16px; border-top: 1px solid var(--site-borde); position: relative; overflow-wrap: anywhere; }
.cc-mov-list li:first-child { border-top: 0; }
.cc-mov-list li::before { content: '\2022'; position: absolute; left: 2px; color: var(--c, var(--site-azul-acento)); }
.cc-mov-list li.cc-mov-sub { padding-left: 30px; color: var(--site-gris-texto); }
.cc-mov-list li.cc-mov-sub::before { left: 16px; content: '\2013'; }
@media (max-width: 480px) {
  .cc-modal-num { font-size: var(--fs-base); }
  .cc-modal-box .modal-head-title { font-size: var(--fs-sm); }
}

/* ── Vista previa al pasar el ratón sobre una cuenta ── */
.cc-popover {
  position: fixed; top: 0; left: 0; z-index: 900;
  width: 360px; max-width: calc(100vw - 16px); max-height: 60vh; overflow-y: auto;
  background: #fff; border-radius: 10px; border-top: 4px solid var(--c, var(--site-azul-marino));
  box-shadow: 0 10px 34px rgba(0, 0, 0, .24); padding: 14px 16px;
  visibility: hidden; opacity: 0; pointer-events: none;
}
.cc-popover.visible { visibility: visible; opacity: 1; pointer-events: auto; }
.cc-popover-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.cc-popover-num { font-family: Menlo, Consolas, monospace; font-weight: 800; color: var(--c, var(--site-azul-acento)); flex: none; }
.cc-popover-head span:last-child { font-weight: 700; color: var(--site-azul-marino); font-size: var(--fs-base); }
.cc-popover .cc-modal-desc p { font-size: var(--fs-sm); margin: 0 0 8px; }
.cc-popover .cc-mov-h { font-size: var(--fs-sm); margin: 10px 0 6px; }
.cc-popover .cc-mov-list li { font-size: var(--fs-xs); padding: 4px 0 4px 14px; }
.cc-popover .cc-mov-list li.cc-mov-sub { padding-left: 26px; }
.cc-popover .cc-mov-compartida { font-size: var(--fs-xs); margin: 0 0 8px; }
@media (hover: none) {
  .cc-popover { display: none !important; }
}

/* ── Tooltip genérico (cabeceras de grupo y etiquetas de estado contable) ── */
.cc-tooltip {
  position: fixed; top: 0; left: 0; z-index: 950;
  max-width: 320px; background: var(--site-azul-marino); color: #fff;
  font-size: var(--fs-sm); line-height: 1.45; padding: 10px 13px; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
  visibility: hidden; opacity: 0; pointer-events: none;
}
.cc-tooltip.visible { visibility: visible; opacity: 1; }

@media (max-width: 800px) {
  .cc-legend { grid-template-columns: 1fr; }
  .cc-gh { flex-wrap: wrap; }
  .cc-gn { font-size: 30px; }
  .cc-grid { padding: 10px; }
}
@media print {
  .site-header, .hero, .cta-band, .site-footer, .cookie-banner, .cc-tools { display: none !important; }
  .cc-grid { gap: 6px; padding: 6px; }
  .cc-col { gap: 6px; }
  .cc-sg, .cc-gh { break-inside: avoid; }
  .cc-sg li { font-size: 8px; padding: 1px 6px; }
  .cc-sg h3 { font-size: 9px; padding: 4px 6px; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
