/*!*******************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./src/styles/report.css ***!
  \*******************************************************************************************************************************************************************************************************************************************************************/
/*
 * Perfila — estilos del informe (dueño: agente D).
 * Markdown del análisis (.prose-bruma), tablas, bloques para copiar, tarjetas del
 * análisis detallado y la impresión (Ctrl+P). Importado desde MarkdownBody.tsx.
 * Componentes en @layer components (las utilidades de Tailwind les ganan);
 * @media print fuera del layer para que gane siempre.
 */

@layer components {
  /* ── Markdown del informe ──────────────────────────────────────────── */
  .prose-bruma {
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink-2);
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 0;
  }
  .prose-bruma h1,
  .prose-bruma h2,
  .prose-bruma h3 {
    letter-spacing: -0.02em;
    font-weight: 600;
    margin-top: 1.75em;
    margin-bottom: 0.65em;
    color: var(--foreground);
    line-height: 1.3;
    text-wrap: balance;
  }
  .prose-bruma h1:first-child,
  .prose-bruma h2:first-child,
  .prose-bruma h3:first-child {
    margin-top: 0;
  }
  .prose-bruma h1 { font-size: 1.5rem; }
  .prose-bruma h2 { font-size: 1.25rem; }
  .prose-bruma h3 { font-size: 1.1rem; }
  .prose-bruma h4,
  .prose-bruma h5,
  .prose-bruma h6 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--foreground);
    margin: 1.6em 0 0.55em;
    letter-spacing: -0.01em;
    line-height: 1.35;
  }
  .prose-bruma p { margin: 0.85em 0; line-height: 1.65; }

  /* R4: el preflight de Tailwind deja list-style:none → se pierden viñetas y numeración. */
  .prose-bruma ul,
  .prose-bruma ol {
    margin: 0.85em 0;
    padding-left: 1.4em;
  }
  .prose-bruma ul { list-style: disc; }
  .prose-bruma ol { list-style: decimal; }
  .prose-bruma ul ul,
  .prose-bruma ol ul { list-style: circle; }
  .prose-bruma ol ol { list-style: lower-alpha; }
  .prose-bruma li { margin: 0.4em 0; line-height: 1.65; padding-left: 0.15em; }
  .prose-bruma li::marker {
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    font-size: 0.92em;
  }
  .prose-bruma li > p { margin: 0.25em 0; }

  .prose-bruma strong { color: var(--foreground); font-weight: 600; }
  .prose-bruma a {
    color: var(--accent-ink);
    text-decoration: underline;
    text-underline-offset: 2px;
  }
  .prose-bruma hr {
    border: none;
    border-top: 1px solid var(--line);
    margin: 1.5em 0;
  }
  .prose-bruma blockquote {
    margin: 1em 0;
    padding: 0.6em 1em;
    border-left: 3px solid var(--accent);
    background: var(--accent-soft);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
  }

  /* Tablas: la envoltura scrollea en mobile y es enfocable (A8). */
  .results-table-wrap {
    width: 100%;
    margin: 1.25em 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
  }
  .prose-bruma table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.94rem;
    line-height: 1.55;
    table-layout: auto;
    min-width: 520px;
  }
  @media (min-width: 768px) {
    .prose-bruma table { min-width: 0; }
  }
  .prose-bruma th,
  .prose-bruma td {
    border-bottom: 1px solid var(--line);
    padding: 10px 14px;
    text-align: left;
    vertical-align: top;
  }
  .prose-bruma tr:last-child td { border-bottom: 0; }
  .prose-bruma th {
    background: var(--surface-2);
    font-size: var(--text-2sm);
    font-weight: 500;
    color: var(--muted);
    white-space: nowrap;
  }
  .prose-bruma th:first-child,
  .prose-bruma td:first-child {
    width: 18%;
    min-width: 7rem;
    white-space: nowrap;
  }
  .prose-bruma th:not(:first-child):not(:last-child),
  .prose-bruma td:not(:first-child):not(:last-child) {
    width: 1%;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
  }
  .prose-bruma th:last-child,
  .prose-bruma td:last-child {
    width: auto;
    min-width: 14rem;
  }
  /* A9: code inline corta a 320 px. */
  .prose-bruma code {
    background: var(--surface-2);
    padding: 0.12em 0.4em;
    border-radius: var(--radius-sm);
    font-size: 0.92em;
    font-family: inherit;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .prose-bruma > *,
  .prose-bruma .results-table-wrap {
    max-width: 100%;
  }

  /* ── Bloque para copiar (R3) ───────────────────────────────────────── */
  .copy-block {
    position: relative;
    margin: 0.4em 0 1.2em;
    padding: 16px 18px;
    padding-right: 112px;
    /* Pozo, no tarjeta: vive dentro de la card del texto (sin borde → sin card-en-card). */
    border: 0;
    background: var(--surface-2);
    border-radius: var(--radius-lg);
    max-width: 100%;
  }
  .copy-block-text {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.65;
    color: var(--foreground);
  }
  .copy-block-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 44px;
    font-size: var(--text-2sm);
    font-weight: 500;
    padding: 6px 14px;
    border-radius: var(--radius-md);
    background: var(--surface);
    border: 1px solid var(--control);
    color: var(--foreground);
    cursor: pointer;
    transition: background-color var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out);
  }
  .copy-block-btn:hover {
    border-color: var(--foreground);
    background: var(--surface-2);
  }
  .copy-block-btn[data-copied="true"] {
    border-color: var(--accent);
    color: var(--accent-ink);
    background: var(--accent-soft);
  }
  .copy-block-meta {
    margin-top: 0.5rem;
    text-align: right;
    font-size: var(--text-xs);
    font-variant-numeric: tabular-nums;
    color: var(--muted);
  }
  .copy-block-meta[data-over="true"] { color: var(--danger); }
  /* Mobile: botón abajo y a lo ancho (alcanzable con el pulgar). */
  @media (max-width: 639px) {
    .copy-block { padding: 14px 14px 66px; }
    .copy-block-btn {
      top: auto;
      bottom: 10px;
      left: 10px;
      right: 10px;
    }
  }

  /* ── Tarjetas del análisis detallado (R1) ──────────────────────────── */
  .report-prose .prose-bruma {
    font-size: 15.5px;
    line-height: 1.7;
  }
  .report-prose .prose-bruma h1,
  .report-prose .prose-bruma h2,
  .report-prose .prose-bruma h3,
  .report-prose .prose-bruma h4,
  .report-prose .prose-bruma h5,
  .report-prose .prose-bruma h6 {
    letter-spacing: -0.02em;
    margin-top: 1.15em;
    margin-bottom: 0.45em;
  }
  .report-prose .prose-bruma h4,
  .report-prose .prose-bruma h5,
  .report-prose .prose-bruma h6 {
    font-size: 0.95em;
    font-weight: 600;
    color: var(--accent-ink);
    margin-top: 1.35em;
  }
  .report-prose .prose-bruma p { margin: 0.55em 0; }
  .report-prose .prose-bruma ul,
  .report-prose .prose-bruma ol {
    margin: 0.6em 0 0.8em;
    padding-left: 1.3em;
  }
  .report-prose .prose-bruma li { margin: 0.35em 0; }
  .report-prose .prose-bruma > :first-child { margin-top: 0; }

  .report-details > summary { list-style: none; }
  .report-details > summary::-webkit-details-marker { display: none; }
  .report-details[open] > summary .report-details-icon { transform: rotate(45deg); }
  .report-details-icon { transition: transform var(--dur-2) var(--ease-out); }

  /* Fila de sección: en mobile el comentario se pliega; desde sm siempre visible. */
  @media (min-width: 640px) {
    .section-row > .section-row-comment { display: block !important; }
    .section-row .section-row-toggle { display: none; }
  }

  /* Chips del índice mobile: sin barra de scroll visible. */
  .toc-chips { scrollbar-width: none; }
  .toc-chips::-webkit-scrollbar { display: none; }

  /* ── Tipografía fina del informe ──────────────────────────────────── */
  /* Escala vertical única del markdown: 0.5 / 0.75 / 1.25 / 1.75 em. */
  .prose-bruma p,
  .prose-bruma li,
  .prose-bruma blockquote {
    text-wrap: pretty;
    hanging-punctuation: first allow-end;
  }
  .prose-bruma td,
  .prose-bruma th,
  .prose-bruma .num,
  .prose-bruma li::marker {
    font-variant-numeric: tabular-nums;
  }
  /* Análisis detallado: ancho de línea legible (~75 caracteres medidos); tablas y bloques a todo el ancho. */
  .report-prose .prose-bruma > :is(p, ul, ol, blockquote, h4, hr) {
    max-width: 34rem;
  }
  .report-prose .prose-bruma > :is(p, ul, ol, blockquote) + :is(p, ul, ol, blockquote) {
    margin-top: 0.75em;
  }
  .report-prose .prose-bruma > h4 + :is(p, ul, ol) {
    margin-top: 0.5em;
  }
  .report-prose .prose-bruma blockquote > :first-child { margin-top: 0; }
  .report-prose .prose-bruma blockquote > :last-child { margin-bottom: 0; }
  .quote-hang {
    hanging-punctuation: first;
  }

  /* ── Copiar: ancho estable + ícono copiar → check ─────────────────── */
  .copy-label {
    display: inline-grid;
  }
  .copy-label > * {
    grid-area: 1 / 1;
    text-align: center;
  }
  .copy-label > [data-ghost] {
    visibility: hidden;
  }
  .copy-icon {
    width: 1rem;
    height: 1rem;
    flex: none;
  }

  /* ── Textos listos: aplicado + opciones ───────────────────────────── */
  .proposed-dim {
    transition: opacity var(--dur-2) var(--ease-out);
  }
  article[data-done="true"] .proposed-dim {
    opacity: 0.6;
  }
  .applied-check {
    transition:
      opacity var(--dur-2) var(--ease-out),
      transform var(--dur-2) var(--ease-out);
  }
  article:not([data-done="true"]) .applied-check {
    opacity: 0;
    transform: scale(0.6);
  }
  /* Todas las opciones apiladas en la misma celda: el alto es el de la más larga
     (nada salta al cambiar) y el cambio es un crossfade corto. */
  .option-stack {
    display: grid;
  }
  .option-stack > * {
    grid-area: 1 / 1;
    min-width: 0;
    transition: opacity var(--dur-2) var(--ease-out);
  }
  .option-stack > [data-active="false"] {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition:
      opacity var(--dur-2) var(--ease-out),
      visibility 0s linear var(--dur-2);
  }
  .option-btn {
    transition:
      background-color var(--dur-2) var(--ease-out),
      border-color var(--dur-2) var(--ease-out),
      color var(--dur-2) var(--ease-out),
      transform var(--dur-1) var(--ease-out);
  }
  .option-btn:active {
    transform: scale(0.97);
  }

  /* Comentario de sección (mobile): alto animado, fuera del árbol a11y cuando está cerrado. */
  .section-row-collapse[data-open="false"] > * {
    visibility: hidden;
    transition: visibility 0s linear var(--dur-2);
  }
  @media (min-width: 640px) {
    .section-row-collapse {
      grid-template-rows: 1fr !important;
    }
    .section-row-collapse > * {
      visibility: visible !important;
    }
  }

  /* ── Índice: indicador que se desliza ─────────────────────────────── */
  .toc-indicator {
    transition:
      transform var(--dur-2) var(--ease-out),
      opacity var(--dur-2) var(--ease-out);
    transform-origin: top;
  }
  .toc-chip {
    transition:
      background-color var(--dur-2) var(--ease-out),
      border-color var(--dur-2) var(--ease-out),
      color var(--dur-2) var(--ease-out);
  }

  /* ── /reportes ────────────────────────────────────────────────────── */
  .spark path {
    stroke-dasharray: var(--len);
  }
  html.js .spark:not([data-revealed="true"]) path {
    stroke-dashoffset: var(--len);
  }
  .spark[data-revealed="true"] path {
    animation: draw var(--dur-4) var(--ease-out) 120ms both;
  }
  .report-row {
    transition: background-color var(--dur-1) var(--ease-out);
  }
  @media (hover: hover) {
    .report-row:hover {
      background: var(--surface-2);
    }
  }
  .undo-toast {
    transition:
      opacity var(--dur-2) var(--ease-out),
      transform var(--dur-2) var(--ease-out);
  }
  .undo-toast[data-shown="false"] {
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
  }
  @keyframes countdown {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
  }
  .undo-countdown {
    transform-origin: left;
    animation: countdown var(--undo-ms, 5000ms) linear both;
  }
}

/* ── Revelación del resultado (solo la primera vez en la sesión) ──── */
/* Fuera de @layer: tiene que ganarle a .reveal de globals.css (sin layer). */
@keyframes rv-fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
@keyframes rv-grow {
  from {
    transform: scaleX(0);
  }
}
.rv-bar {
  transform-origin: left;
}
[data-reveal="play"] .rv-verdict {
  animation: rv-fade-up var(--dur-3) var(--ease-out) 400ms both;
}
[data-reveal="play"] .rv-bar-now {
  animation: rv-grow 700ms var(--ease-out) 550ms both;
}
[data-reveal="play"] .rv-bar-next {
  animation: rv-grow 800ms var(--ease-out) 700ms both;
}
/* Listas (prioridades, filas por sección): `.reveal` global + barras que crecen con el
   stagger de su fila. Mientras el anillo y el veredicto aterrizan (--rv-hold), las listas
   ya visibles esperan; lo que entra después al hacer scroll no espera. Transiciones (no
   animaciones): el delay se captura al empezar, así que levantar el hold no las altera. */
[data-reveal-early] {
  --rv-hold: 600ms;
}
[data-reveal="play"] .reveal > * {
  transition-delay: calc(var(--i, 0) * 40ms + var(--rv-hold, 0ms));
}
[data-reveal="play"] .reveal .rv-bar {
  transition: transform 600ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 40ms + 120ms + var(--rv-hold, 0ms));
}
html.js [data-reveal="play"] .reveal:not([data-revealed="true"]) .rv-bar {
  transform: scaleX(0);
}

/* Reduced motion: todo visible y estático desde el primer frame. */
@media (prefers-reduced-motion: reduce) {
  [data-reveal="play"] :is(.rv-verdict, .rv-bar, .rv-bar-now, .rv-bar-next),
  .spark path,
  .undo-countdown {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    stroke-dashoffset: 0 !important;
  }
}

/* ── Impresión (R10) — fuera de layer: gana siempre ─────────────────── */
@media print {
  @page {
    size: A4;
    margin: 16mm 14mm;
  }
  html,
  body {
    background: #fff !important;
  }
  .paper-grid::before,
  .hero-grid::before {
    background: none !important;
  }
  .fade-up,
  .reveal > *,
  .roll,
  :is(.rv-verdict, .rv-bar, .rv-bar-now, .rv-bar-next),
  .proposed-dim {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .spark path,
  .draw {
    animation: none !important;
    stroke-dashoffset: 0 !important;
  }
  /* Solo la opción elegida se imprime. */
  .option-stack > [data-active="false"],
  .undo-toast {
    display: none !important;
  }
  .section-row-collapse {
    grid-template-rows: 1fr !important;
  }
  .section-row-collapse > * {
    visibility: visible !important;
  }
  .print-hidden,
  header.site-nav,
  body > header,
  footer,
  .skip-link,
  .copy-block-btn,
  .section-row-toggle,
  nav[data-report-toc] {
    display: none !important;
  }
  main {
    padding-top: 0 !important;
  }
  #resultados {
    max-width: none !important;
    padding: 0 !important;
  }
  #resultados .report-grid {
    display: block !important;
  }
  #resultados section,
  #resultados article,
  .copy-block,
  details {
    break-inside: avoid-page;
  }
  #resultados h1,
  #resultados h2,
  #resultados h3 {
    break-after: avoid-page;
  }
  .section-row > .section-row-comment {
    display: block !important;
  }
  .copy-block {
    padding: 12px 14px !important;
    border-left-width: 2px;
  }
  a[href^="#"] {
    text-decoration: none;
    color: inherit;
  }
  * {
    box-shadow: none !important;
  }
}

