/* ==========================================================================
   Cor-E Dark — bloques específicos de /personaldata (public/css/personaldata-dark.css)
   Namespace .pd-* — solo carga en paginaActual === 'personaldata' (cabecera.ejs).
   Tokens y componentes genéricos .hm-* viven en dark-base.css, cargado antes
   — incluidos .hm-wrap, .hm-kicker, .hm-link-arrow, .hm-reveal, .hm-page-hero,
   .hm-line-head y .hm-cta-btn, reutilizados sin cambios.
   Ver prompt/personaldataNew.md §5 para la especificación original.
   ========================================================================== */

.pd-hero-meta {
  font-size: var(--fs-sm);
  color: var(--tx-3);
  margin: -12px 0 32px;
}
.pd-hero-meta time { font-variant-numeric: tabular-nums; }

/* ==========================================================================
   §5.1 — Una sola sección, no trece (hallazgo R). Los .pd-section están
   anidados dentro de .pd-body, así que .hm-line:nth-of-type(even) no los
   alcanza — el documento no puede parpadear entre superficies.
   ========================================================================== */
.pd-doc {
  background: var(--dk-canvas);
  padding-block: var(--rhythm);
  content-visibility: auto;
  contain-intrinsic-size: auto 3000px;
}
.pd-doc-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: clamp(40px, 6vw, 96px);
}
@media (max-width: 991.98px) {
  .pd-doc-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ==========================================================================
   §5.2 — .pd-toc: índice pegajoso, por debajo del navbar (hallazgo S).
   Columna lateral, no barra superior: nunca compite en z-index con el
   navbar. --nav-h vive en dark-base.css (§5.5, compartido con /services).
   ========================================================================== */
.pd-toc {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  max-height: calc(100vh - var(--nav-h) - 48px);
  overflow-y: auto;
}
.pd-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pd-toc-list li { margin: 0; }
.pd-toc-list a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 0 8px 12px;
  border-left: 2px solid transparent;
  color: var(--tx-3);
  text-decoration: none;
  font-size: var(--fs-sm);
  line-height: 1.4;
  min-height: 44px;
  transition: color var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease);
}
.pd-toc-list a:hover,
.pd-toc-list a:focus-visible {
  color: var(--tx-1);
}
.pd-toc-list a[aria-current="true"] {
  color: var(--tx-1);
  border-left-color: var(--ac-yellow);
}
.pd-toc-num {
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-xs);
  color: var(--tx-3);
  flex: none;
}

/* Índice de escritorio oculto en móvil; <details> nativo lo reemplaza */
.pd-toc-mobile { display: none; }
@media (max-width: 991.98px) {
  .pd-toc > nav { display: none; }
  .pd-toc { position: static; max-height: none; overflow: visible; }
  .pd-toc-mobile {
    display: block;
    border: 1px solid var(--dk-line);
    padding: 4px clamp(20px, 4vw, 28px);
    margin-bottom: clamp(32px, 5vw, 48px);
  }
  .pd-toc-mobile summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-block: 16px;
    min-height: 44px;
    color: var(--tx-1);
    font-weight: 600;
    cursor: pointer;
    list-style: none;
  }
  .pd-toc-mobile summary::-webkit-details-marker { display: none; }
  .pd-toc-mobile summary i { color: var(--tx-3); transition: transform var(--dur-2) var(--ease); }
  .pd-toc-mobile[open] summary i { transform: rotate(180deg); }
  .pd-toc-mobile .pd-toc-list { padding-bottom: 8px; }
}

/* ==========================================================================
   §5.3 — .pd-prose y tipografía de documento largo (hallazgos T y U).
   Medida 68ch, no 62ch — excepción razonada, ver prompt §12.4.
   ========================================================================== */
.pd-prose { max-width: 68ch; }
.pd-prose p {
  color: var(--tx-2);
  line-height: 1.7;
  margin: 0 0 18px;
}
.pd-prose p:last-child { margin-bottom: 0; }
.pd-prose strong { color: var(--tx-1); font-weight: 600; }

/* Obligatorio: sin esto Bootstrap pinta los <a> de #0d6efd, que sobre
   --dk-canvas da 4.42:1 y falla AA (hallazgo T). */
.pd-prose a,
.pd-identity a {
  color: var(--ac-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pd-prose a:hover,
.pd-prose a:focus-visible,
.pd-identity a:hover,
.pd-identity a:focus-visible {
  color: var(--ac-yellow);
}

.pd-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  max-width: 68ch;
}
.pd-list li {
  position: relative;
  padding-left: 22px;
  color: var(--tx-2);
  line-height: 1.65;
  margin-bottom: 10px;
}
.pd-list li::before {
  content: '\2013';
  position: absolute;
  left: 0;
  color: var(--tx-3);
}
.pd-list li:last-child { margin-bottom: 0; }
.pd-list code {
  color: var(--tx-1);
  background: var(--dk-surface);
  padding: 1px 6px;
  font-size: 0.9em;
}

.pd-list--compact {
  columns: 1;
  column-gap: clamp(32px, 4vw, 64px);
}
@media (min-width: 768px) {
  .pd-list--compact { columns: 2; }
}

.pd-defs,
.pd-identity {
  margin: 0;
  max-width: 68ch;
}
.pd-defs dt,
.pd-identity dt {
  color: var(--tx-1);
  font-size: var(--fs-sm);
  font-weight: 600;
  margin: 0 0 4px;
}
.pd-defs dd,
.pd-identity dd {
  color: var(--tx-2);
  margin: 0 0 16px;
  line-height: 1.65;
}
.pd-defs dd:last-child,
.pd-identity dd:last-child { margin-bottom: 0; }

.pd-section {
  padding-block: clamp(32px, 4vw, 48px);
  border-top: 1px solid var(--dk-line);
}
.pd-section:first-child { border-top: 0; padding-top: 0; }
.pd-section h2 {
  font-size: var(--fs-h3);
  font-weight: 600;
  color: var(--tx-1);
  letter-spacing: -0.01em;
  margin: 0 0 20px;
}
.pd-section .hm-link-arrow { margin-top: 8px; }

.pd-num {
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-xs);
  color: var(--tx-3);
  margin: 0 0 8px;
}

/* ==========================================================================
   Panel de acción (§4.6) — sobre --dk-surface-2, id="exercise"
   ========================================================================== */
.pd-exercise {
  background: var(--dk-surface-2);
  padding-block: var(--rhythm);
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}

.pd-actions {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}
.pd-action {
  display: flex;
  flex-direction: column;
  background: var(--dk-surface);
  border: 1px solid var(--dk-line);
  padding: clamp(24px, 2.6vw, 36px);
  transition: border-color var(--dur-2) var(--ease);
}
.pd-action:hover { border-color: var(--dk-line-strong); }
.pd-action-icon {
  font-size: 1.5rem;
  color: var(--ac-blue);
  margin-bottom: 16px;
}
.pd-action h3 {
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--tx-1);
  margin: 0 0 8px;
}
.pd-action p,
.pd-action address {
  color: var(--tx-2);
  font-style: normal;
  line-height: 1.6;
  margin: 0;
}
.pd-action .hm-cta-btn {
  margin-top: 16px;
  align-self: flex-start;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
@media (max-width: 991.98px) {
  .pd-actions { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767.98px) {
  .pd-actions { grid-template-columns: 1fr; }
}

/* Bloque de aviso legal (plazos, retención, escalamiento a la SIC) — no se
   renderiza hasta que el negocio apruebe el anexo §11. Estilo reservado para
   cuando exista contenido real que mostrar. */
.pd-note {
  border-left: 2px solid var(--ac-blue);
  padding-left: 20px;
  color: var(--tx-2);
  margin-top: clamp(32px, 4vw, 48px);
  max-width: 68ch;
}
