/* Guía de integración imprimible (layouts/print). Todo va bajo .guide-page para no afectar al panel */

.guide-page {
  background: var(--bg-soft);
  color: var(--fg);
  font: 15px/1.6 var(--font);
  margin: 0;
}

.guide-toolbar {
  align-items: center;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 24px;
  position: sticky;
  top: 0;
  z-index: 1;
}

.guide-toolbar .back-link {
  margin: 0;
}

.guide-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.guide {
  background: var(--surface);
  box-shadow: var(--shadow);
  margin: 24px auto;
  max-width: 960px;
  padding: 48px 56px;
}

.guide h1,
.guide h2,
.guide h3 {
  color: var(--nav-bg);
  line-height: 1.25;
}

.guide h2 {
  border-bottom: 2px solid var(--accent);
  font-size: 1.45rem;
  margin: 40px 0 16px;
  padding-bottom: 6px;
}

.guide h3 {
  font-size: 1.1rem;
  margin: 24px 0 8px;
}

.guide code {
  background: var(--bg-soft);
  border-radius: var(--radius);
  font: .88em var(--mono);
  padding: 1px 4px;
  word-break: break-word;
}

.guide table {
  border-collapse: collapse;
  font-size: .9rem;
  margin: 12px 0 16px;
  width: 100%;
}

.guide th,
.guide td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.guide thead th {
  background: var(--bg-soft);
  font-weight: 500;
}

.guide__cover {
  border-bottom: 4px solid var(--accent);
  margin-bottom: 32px;
  padding-bottom: 32px;
}

.guide__cover .brand {
  background: var(--nav-bg);
  border-radius: var(--radius);
  color: var(--nav-fg);
  display: inline-flex;
  padding: 12px 18px;
}

.guide__cover h1 {
  font-size: 2.4rem;
  margin: 32px 0 4px;
}

.guide__client {
  font-size: 1.3rem;
  margin: 0;
}

.guide__meta {
  color: var(--muted);
  margin: 4px 0 0;
}

.guide__toc ol {
  columns: 2;
  margin: 0;
}

.guide__toc a {
  color: var(--accent);
  text-decoration: none;
}

.guide__fields {
  table-layout: fixed;
}

.guide__fields th:nth-child(1) { width: 15%; }
.guide__fields th:nth-child(2) { width: 12%; }
.guide__fields th:nth-child(3) { width: 12%; }
.guide__fields th:nth-child(4) { width: 19%; }
.guide__fields th:nth-child(6) { width: 15%; }

.guide__fields td:first-child code {
  white-space: nowrap;
  word-break: normal;
}

.guide__fields td:last-child code {
  word-break: break-all;
}

.guide__facts th {
  background: var(--bg-soft);
  font-weight: 500;
  width: 32%;
}

.guide__code {
  background: var(--nav-bg);
  border-radius: var(--radius);
  color: #e4e9f0;
  margin: 12px 0 16px;
  overflow-x: auto;
  padding: 14px 16px;
}

.guide__code code {
  background: none;
  color: inherit;
  font-size: .84rem;
  padding: 0;
  white-space: pre;
  word-break: normal;
}

.guide__note {
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  padding: 12px 16px;
}

.guide__checklist li::marker {
  content: "☐  ";
}

@media (max-width: 700px) {
  .guide {
    margin: 0;
    padding: 24px 16px;
  }

  .guide__toc ol {
    columns: 1;
  }

  .guide__fields,
  .guide table {
    display: block;
    overflow-x: auto;
  }
}

@media print {
  @page {
    margin: 16mm 14mm;
    size: A4;
  }

  .guide-page {
    background: #fff;
    font-size: 11pt;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .guide-toolbar {
    display: none;
  }

  .guide {
    box-shadow: none;
    margin: 0;
    max-width: none;
    padding: 0;
  }

  .guide__cover {
    padding-top: 18vh;
  }

  .guide__toc {
    break-after: page;
  }

  .guide h2,
  .guide h3 {
    break-after: avoid;
  }

  .guide table,
  .guide__code {
    break-inside: avoid;
  }

  .guide__code {
    white-space: pre-wrap;
  }

  .guide__code code {
    white-space: pre-wrap;
  }

  .guide a {
    color: inherit;
  }
}
