/* MULTO1-25 — Estilo académico para carpeta compartida (sin dependencias externas) */
:root {
  --bg: #faf9f7;
  --paper: #ffffff;
  --ink: #1a1a1a;
  --muted: #4a4a4a;
  --accent: #1e3a5f;
  --accent-light: #e8eef4;
  --border: #d4cfc7;
  --tag-norm: #2c5282;
  --tag-acad: #553c9a;
  --tag-int: #276749;
  --tag-diag: #c05621;
  --sidebar-w: 268px;
  --shell-border: #c5d0dc;
  --shell-nav-active: #1e3a5f;
  --shell-nav-hover: #f0f4f8;
  --font-serif: Georgia, "Times New Roman", Times, serif;
  --font-sans: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

.layout {
  display: flex;
  align-items: stretch;
  min-height: 100vh;
}

.page-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg);
}

.shell-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: #f7f9fb;
  border-right: 1px solid var(--shell-border);
  color: var(--ink);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.shell-brand {
  padding: 1.35rem 1.15rem 1rem;
  border-bottom: 1px solid var(--shell-border);
  background: var(--paper);
}

.shell-brand-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.shell-brand-link:hover .shell-brand-title {
  color: var(--accent);
}

.shell-brand-kicker {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.shell-brand-title {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.28rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.shell-brand-sub {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.shell-brand-org {
  margin: 0.65rem 0 0;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.4;
}

.shell-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.85rem 0.65rem 0.5rem;
}

.shell-nav-group {
  margin-bottom: 0.85rem;
}

.shell-nav-heading {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7c8f;
  padding: 0 0.55rem 0.4rem;
}

.shell-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.shell-nav-link {
  display: block;
  padding: 0.5rem 0.65rem;
  margin-bottom: 2px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #2d3e50;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.shell-nav-link:hover {
  background: var(--shell-nav-hover);
  color: var(--shell-nav-active);
}

.shell-nav-link.is-active {
  background: #e8eef4;
  color: var(--shell-nav-active);
  border-left-color: var(--accent);
  font-weight: 600;
}

.shell-sidebar-foot {
  padding: 0.85rem 1.15rem 1.1rem;
  border-top: 1px solid var(--shell-border);
  background: var(--paper);
}

.shell-sidebar-meta {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--muted);
}

.shell-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--paper);
  padding: 1.25rem 2.5rem 1.5rem;
}

.shell-footer-inner {
  max-width: 920px;
}

.shell-footer-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
}

.shell-footer-meta {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
}

.shell-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin-bottom: 0.65rem;
  font-size: 0.85rem;
}

.shell-footer-links a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.shell-footer-links a:hover {
  text-decoration: underline;
}

.shell-footer-note {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  font-style: italic;
}

.shell-footer-credit {
  margin: 0.75rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.shell-footer-credit a {
  color: inherit;
  text-decoration: none;
}

.shell-footer-credit a:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .shell-sidebar {
    width: 100%;
    height: auto;
    position: relative;
    max-height: none;
  }
  .shell-nav { max-height: 16rem; }
  .shell-footer { padding: 1rem 1.25rem; }
}

.main {
  flex: 1;
  padding: 2rem 2.5rem 2rem;
  max-width: 920px;
  width: 100%;
}

.main h1, .main h2, .main h3 {
  font-family: var(--font-serif);
  color: var(--accent);
}

.main h1 { font-size: 1.75rem; margin-top: 0; border-bottom: 2px solid var(--border); padding-bottom: 0.5rem; }
.main h2 { font-size: 1.35rem; margin-top: 2rem; }
.main h3 { font-size: 1.1rem; margin-top: 1.5rem; }

.meta-bar {
  background: var(--accent-light);
  border-left: 4px solid var(--accent);
  padding: 0.85rem 1rem;
  margin: 1rem 0 1.5rem;
  font-size: 0.9rem;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin: 1rem 0;
  background: var(--paper);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

table.data th, table.data td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.65rem;
  text-align: left;
  vertical-align: top;
}

table.data th {
  background: var(--accent-light);
  font-weight: 600;
}

.tag {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  margin: 0.1rem;
  font-weight: 600;
}

.tag-normativa { background: #bee3f8; color: var(--tag-norm); }
.tag-academico { background: #e9d8fd; color: var(--tag-acad); }
.tag-internacional { background: #c6f6d5; color: var(--tag-int); }
.tag-institucional { background: #feebc8; color: var(--tag-diag); }
.tag-metodologia { background: #e2e8f0; color: #2d3748; }
.tag-diagnostico { background: #fed7d7; color: #9b2c2c; }
.tag-prensa { background: #edf2f7; color: #4a5568; }

.relevancia-obligatoria { color: #9b2c2c; font-weight: 700; }
.relevancia-alta { color: #c05621; font-weight: 600; }
.relevancia-media { color: var(--muted); }

.cite-original {
  font-style: italic;
  color: var(--muted);
  border-left: 3px solid var(--border);
  padding-left: 1rem;
  margin: 0.75rem 0;
  font-size: 0.92rem;
}

.cite-es {
  margin: 0.5rem 0 1rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.25rem 0;
  padding: 1rem;
  background: var(--paper);
  border: 1px solid var(--border);
}

.filters label {
  font-size: 0.8rem;
  font-weight: 600;
  display: block;
  margin-bottom: 0.2rem;
}

.filters select, .filters input {
  font-size: 0.88rem;
  padding: 0.35rem 0.5rem;
  min-width: 140px;
}

#catalog-count {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.source-card {
  background: var(--paper);
  border: 1px solid var(--border);
  margin-bottom: 0.85rem;
  padding: 1rem 1.15rem;
  border-radius: 2px;
}

.source-card.hidden { display: none; }

.source-card header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.source-card .id {
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 700;
}

.source-card h3 {
  margin: 0.25rem 0 0.5rem;
  font-size: 1rem;
  font-family: var(--font-serif);
  color: var(--ink);
}

.source-card .titulo-original {
  font-size: 0.88rem;
  color: var(--muted);
  font-style: italic;
}

.source-card details {
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

.source-card summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
}

.toc {
  background: var(--paper);
  border: 1px solid var(--border);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.toc ol { margin: 0.5rem 0 0; padding-left: 1.25rem; }
.toc a { color: var(--accent); }

.footnote {
  display: none;
}

abbr[title] {
  text-decoration: underline dotted;
  cursor: help;
}

.source-card.fuente-highlight {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
  background: #fffbe6;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0 0.75rem;
}

.btn-download,
.btn-outline {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  text-decoration: none;
}

.btn-download {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
}

.btn-download:hover { background: #152a45; }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-outline:hover { background: var(--accent-light); }

.link-status {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.45rem;
  border-radius: 3px;
}
.link-ok { background: #c6f6d5; color: #22543d; }
.link-warn { background: #feebc8; color: #7b341e; }
.link-bad { background: #fed7d7; color: #9b2c2c; }

.dim-tag-catalog {
  background: #e8f1fa;
  color: #0d3b66;
  border: 1px solid #b8d4eb;
  cursor: help;
}

.cite-box {
  background: var(--paper);
  border: 1px solid var(--border);
  padding: 1rem 1.25rem;
  margin: 1rem 0 1.5rem;
}
.cite-block {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0.5rem 0 1rem;
  padding-left: 1rem;
  border-left: 3px solid var(--border);
}

.doc-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.doc-header strong { color: var(--ink); }
.doc-header .doc-type {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--accent);
  margin: 0 0 0.35rem;
  font-weight: 600;
}
.doc-header .doc-meta { margin: 0; line-height: 1.5; }

.informe-lead {
  font-size: 1.08rem;
  line-height: 1.65;
  border-left: 4px solid var(--accent);
  padding-left: 1.1rem;
  margin: 1.5rem 0 2rem;
}
.main.toc-content p { text-align: justify; hyphens: auto; }

.toc-content p { margin: 0.65rem 0; }
.toc-content li { margin: 0.35rem 0 0.35rem 1.25rem; }

.print-only { display: none; }
@media print {
  .shell-sidebar, .shell-footer, .filters, .no-print { display: none !important; }
  .layout { display: block; }
  .page-column { display: block; }
  .main { max-width: 100%; padding: 0; }
}
