/* ── Paleta (misma que style.css) ── */
:root {
  --bg:        #1e1e1e;
  --bg-alt:    #252526;
  --bg-hover:  #2a2d2e;
  --border:    #3c3c3c;
  --text:      #d4d4d4;
  --text-muted:#858585;
  --accent:    #007acc;
  --accent-2:  #a4d7fa;
  --warning:   #ffc24a;
  --error:     #f44747;
}

/* ── General ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; font-size: 11pt; color: var(--text); background: var(--bg); padding: 1.5rem; }
h1 { font-size: 22pt; text-align: center; margin-bottom: 0.2em; color: var(--accent);}
h2 { font-size: 18pt; margin: 1.2em 0 0.4em; border-bottom: 2px solid var(--accent); padding-bottom: 0.2em; color: var(--accent); font-weight: bold;}
h3 { font-size: 15pt; margin: 0.9em 0 0.3em; color: var(--accent); font-weight: bold;}
p, li { margin: 0.3em 0; line-height: 1.5; }
ul { padding-left: 1.4em; }
a { color: var(--accent); }
blockquote { border-left: 3px solid var(--border); padding-left: 0.8em; color: var(--text-muted); margin: 0.5em 0; font-style: italic; }

/* ── Tablas ── */
table { width: 100%; border-collapse: collapse; margin: 0.5em 0; font-size: 10pt; }
th { background: var(--border); color: var(--text-muted); padding: 5px 8px; text-align: left; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
td { padding: 4px 8px; vertical-align: top; border-bottom: 1px solid var(--border); }
tr:nth-child(even) td { background: var(--bg-alt); }

/* ── Secciones / tarjetas ── */
.card { border: 1px solid var(--border); border-radius: 6px; background: var(--bg-alt); padding: 0.8em 1em; margin-bottom: 1.2em; }
.card-title { font-size: 14pt; font-weight: bold; margin-bottom: 0.5em; color: var(--accent-2); }
.tag { display: inline-block; font-size: 8pt; background: var(--accent-2); color: var(--bg); border-radius: 3px; padding: 1px 6px; margin-bottom: 0.6em; vertical-align: middle; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.warn { background: #2a2005; border-left: 4px solid var(--warning); padding: 0.4em 0.8em; margin: 0.6em 0; font-size: 10pt; color: var(--warning); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.p-alta td { background: #2a1010 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.p-alta td:first-child { font-weight: bold; color: var(--error); }
.p-media td { background: #2a2005 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.p-media td:first-child { font-weight: bold; color: var(--warning); }
.mnemonic { background: #0d2137; border-left: 4px solid var(--accent); padding: 0.4em 0.8em; margin: 0.6em 0; font-size: 10pt; color: var(--text); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
hr.divider { border: none; border-top: 1px dashed var(--border); margin: 0.8em 0; }

/* ── Cabecera del documento ── */
.doc-header { text-align: center; margin-bottom: 1.5em; padding-bottom: 0.8em; border-bottom: 3px double var(--border); }
.doc-header p { font-size: 10pt; color: var(--text-muted); margin-top: 0.3em; }

/* ── Print ── */
@media print {
  body { background: #fff; color: #111; padding: 0.8cm 1cm; font-size: 10pt; }
  h1, h2 { color: #111; }
  h3 { color: #444; }
  .card { background: #fff; border-color: #ccc; break-inside: avoid; page-break-inside: avoid; }
  .page-break { page-break-before: always; }
  a { color: inherit; text-decoration: none; }
  th { background: #5d6d7e; color: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tag { background: #5d6d7e; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  td { border-bottom-color: #ddd; }
  tr:nth-child(even) td { background: #f5f5f5; }
  .p-alta td { background: #fde8e8 !important; }
  .p-alta td:first-child { color: #a00; }
  .p-media td { background: #fef6e4 !important; }
  .p-media td:first-child { color: #8a6000; }
  .warn { background: #fff3cd; border-color: #f0ad4e; color: #6a4800; }
  .mnemonic { background: #e8f4fd; border-color: #3498db; color: #111; }
}
