/* NIE Experts Spain — shared doc page styles (Node AI hub system) */
:root {
  --bg-primary: #000000;
  --bg-card: #0A0A0A;
  --bg-card-alt: #080808;
  --border: #262626;
  --text-primary: #FAFAFA;
  --text-secondary: #A3A3A3;
  --text-muted: #737373;
  --accent: #FAFAFA;
  --font-sans: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { background: #000000; }
body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
.container { max-width: 800px; margin: 0 auto; padding: 0 24px; }

.back-link {
  position: fixed; top: 20px; left: 24px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase;
  z-index: 100; color: var(--text-muted); text-decoration: none;
  transition: color 150ms;
}
.back-link:hover { color: var(--text-primary); }
@media print { .back-link { display: none; } }

/* Cover */
.cover {
  min-height: 100vh; display: flex; flex-direction: column;
  padding: 80px 0 60px; page-break-after: always;
}
.cover .logo { width: 72px; height: 72px; flex-shrink: 0; }
.cover .logo svg { width: 100%; height: 100%; }
.cover .cover-spacer { flex: 1.2; }
.cover .eyebrow {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--text-muted); margin-bottom: 16px;
}
.cover h1 {
  font-size: 52px; font-weight: 700; letter-spacing: -0.03em;
  line-height: 1.12;
}
.cover .lede {
  font-size: 17px; color: var(--text-secondary);
  line-height: 1.7; margin-top: 20px; max-width: 620px;
}
.cover .cover-bottom { flex: 2; display: flex; flex-direction: column; justify-content: flex-end; }
.cover .meta-block { margin-bottom: 20px; }
.cover .meta-block:last-child { margin-bottom: 0; }
.cover .meta-label { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.cover .meta-value { font-size: 15px; color: var(--text-secondary); }

/* Sections */
section { padding: 48px 0; }
.section-label {
  font-family: var(--font-mono); font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--text-muted); margin-bottom: 12px;
}
.section-header { page-break-after: avoid; }
.section-title {
  font-size: 32px; font-weight: 700; letter-spacing: -0.02em;
  margin-bottom: 28px;
}
h3 {
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-muted); margin-top: 40px; margin-bottom: 16px;
  font-family: var(--font-mono);
}
h4 { font-size: 17px; font-weight: 600; color: var(--text-primary); margin-top: 24px; margin-bottom: 12px; }
p { color: var(--text-secondary); margin-bottom: 16px; line-height: 1.8; }
p strong { color: var(--text-primary); font-weight: 600; }
a.inline { color: var(--text-primary); text-decoration: underline; text-underline-offset: 3px; }

ul { list-style: none; padding: 0; margin-bottom: 24px; }
ul li {
  position: relative; padding-left: 20px; margin-bottom: 10px;
  color: var(--text-secondary); line-height: 1.7;
}
ul li::before {
  content: ''; position: absolute; left: 0; top: 10px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted);
}
ul li strong { color: var(--text-primary); font-weight: 600; }

ol.num-list { list-style: none; padding: 0; margin: 0 0 24px; counter-reset: n; }
ol.num-list > li {
  counter-increment: n;
  position: relative; padding-left: 32px; margin-bottom: 14px;
  color: var(--text-secondary); line-height: 1.8;
}
ol.num-list > li::before {
  content: counter(n) ".";
  position: absolute; left: 0; top: 0;
  font-family: var(--font-mono); font-size: 13px; font-weight: 600;
  color: var(--text-muted);
}
ol.num-list > li strong { color: var(--text-primary); font-weight: 600; }

/* Tables */
.data-table {
  width: 100%; border-collapse: collapse; margin: 16px 0 24px;
  background: var(--bg-card-alt); border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden; font-size: 14px;
}
.data-table thead th {
  background: var(--bg-card); font-family: var(--font-mono);
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--text-primary);
  text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.data-table tbody td {
  padding: 14px 16px; color: var(--text-secondary);
  border-bottom: 1px solid var(--border); vertical-align: top; line-height: 1.6;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody td strong { color: var(--text-primary); font-weight: 600; }
.data-table td.mono, .data-table th.mono { font-family: var(--font-mono); white-space: nowrap; }

/* Callout */
.callout {
  background: var(--bg-card); border: 1px solid var(--text-muted);
  border-radius: 12px; padding: 24px 28px; margin: 24px 0;
}
.callout .callout-eyebrow {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--text-primary); margin-bottom: 12px;
}
.callout p { margin-bottom: 12px; }
.callout p:last-child { margin-bottom: 0; }

/* Priority tags */
.tag {
  display: inline-block; padding: 2px 8px; font-family: var(--font-mono);
  font-size: 10px; font-weight: 600; letter-spacing: 0.08em;
  border-radius: 4px; text-transform: uppercase; vertical-align: middle;
}
.tag-p0 { background: rgba(255,255,255,0.10); color: #FAFAFA; border: 1px solid rgba(255,255,255,0.25); }
.tag-p1 { background: rgba(255,255,255,0.05); color: #A3A3A3; border: 1px solid rgba(255,255,255,0.12); }
.tag-p2 { background: transparent; color: #737373; border: 1px solid rgba(255,255,255,0.08); }

/* Phase / step cards */
.phase {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 22px 24px; margin-bottom: 12px;
}
.phase.rec { border-color: rgba(255,255,255,0.28); }
.phase .phase-top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.phase .phase-name { font-size: 16px; font-weight: 600; color: var(--text-primary); }
.phase .phase-when {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  color: var(--text-muted); text-transform: uppercase; white-space: nowrap;
}
.phase .phase-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.7; margin: 0; }

/* Divider */
.rule { border: none; height: 1px; background: var(--border); margin: 40px 0; }

.footer { padding: 48px 0 40px; text-align: center; }
.footer p { font-size: 12px; color: var(--text-muted); font-family: var(--font-mono); letter-spacing: 0.08em; }

@page { margin: 0; }
@media print {
  .cover { min-height: 100vh; page-break-after: always; }
  section { padding: 48px 0 32px; page-break-before: always; break-before: always; }
  .section-label, .section-title, .section-header { page-break-after: avoid; }
  .callout, .data-table, .phase { page-break-inside: avoid; break-inside: avoid; }
}
@media (max-width: 640px) {
  .cover h1 { font-size: 36px; }
  .cover .lede { font-size: 15px; }
  .section-title { font-size: 24px; }
  .data-table { font-size: 13px; }
  .data-table thead th, .data-table tbody td { padding: 12px 12px; }
}
