:root {
  --guide-ink: #102033;
  --guide-muted: #5c7086;
  --guide-primary: #0f7f9f;
  --guide-primary-dark: #0b5268;
  --guide-accent: #ff8b5e;
  --guide-surface: #ffffff;
  --guide-soft: #eef7fa;
  --guide-border: #d5e7ef;
}

* { box-sizing: border-box; }
body.guide-body {
  margin: 0;
  font-family: 'Manrope', 'Segoe UI', sans-serif;
  color: var(--guide-ink);
  background: #f4f8fb;
}
.guide-container {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}
.guide-hero {
  color: #fff;
  background: linear-gradient(135deg, #0d4458, #1188ad 62%, #62bed1);
}
.guide-hero__inner { padding: 42px 0 34px; }
.guide-logo {
  display: block;
  width: 168px;
  max-width: 60vw;
  padding: 12px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 20px 56px rgba(11, 40, 52, 0.22);
}
.guide-eyebrow {
  margin: 22px 0 8px;
  color: #0f9f9b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.guide-hero .guide-eyebrow { color: #bdebf5; }
.guide-hero h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
}
.guide-lead {
  max-width: 760px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.65;
}
.guide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.guide-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  background: #fff;
  color: #0b5268;
  font-weight: 800;
  text-decoration: none;
}
.guide-button--secondary {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.32);
}
.guide-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 30px 0 0;
}
.guide-meta div {
  min-width: 160px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
}
.guide-meta dt {
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.guide-meta dd {
  margin: 4px 0 0;
  font-weight: 800;
}
.guide-main { padding: 34px 0 64px; }
.guide-section {
  margin: 0 0 28px;
  padding: 28px;
  border: 1px solid var(--guide-border);
  border-radius: 18px;
  background: var(--guide-surface);
  box-shadow: 0 18px 48px rgba(15, 39, 56, 0.08);
}
.guide-section h2 {
  margin: 0 0 12px;
  font-size: clamp(24px, 3vw, 34px);
}
.guide-section p {
  color: var(--guide-muted);
  line-height: 1.65;
}
.guide-section,
.guide-section * {
  min-width: 0;
}
.guide-section a {
  overflow-wrap: anywhere;
  word-break: normal;
}
.guide-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.guide-grid article,
.guide-feature-list article {
  padding: 18px;
  border: 1px solid var(--guide-border);
  border-radius: 14px;
  background: #f8fcfd;
  overflow: hidden;
}
.guide-grid article p,
.guide-feature-list article p {
  overflow-wrap: anywhere;
}
.guide-grid strong,
.guide-feature-list h3 {
  display: block;
  margin: 0 0 8px;
  color: var(--guide-primary-dark);
  font-size: 17px;
}
.guide-feature-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.guide-shot-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: center;
  gap: 30px;
}
.guide-shot-row--reverse {
  grid-template-columns: 310px minmax(0, 1fr);
}
.guide-phone-shot {
  margin: 0;
  justify-self: center;
}
.guide-phone-shot img {
  width: min(300px, 72vw);
  border-radius: 28px;
  border: 10px solid #102033;
  box-shadow: 0 22px 60px rgba(15, 39, 56, 0.24);
}
.guide-browser-shot img {
  width: 100%;
  display: block;
  margin-top: 18px;
  border: 1px solid var(--guide-border);
  border-radius: 14px;
  box-shadow: 0 18px 42px rgba(15, 39, 56, 0.14);
}
.guide-checklist {
  margin: 0;
  padding-left: 20px;
  color: var(--guide-muted);
  line-height: 1.8;
}

@media (max-width: 900px) {
  .guide-grid,
  .guide-feature-list,
  .guide-shot-row,
  .guide-shot-row--reverse {
    grid-template-columns: 1fr;
  }
}

@media print {
  @page {
    size: A4;
    margin: 12mm;
  }
  body.guide-body {
    background: #fff;
    font-size: 10.5px;
  }
  .guide-actions { display: none; }
  .guide-container { width: 100%; }
  .guide-hero {
    color: var(--guide-ink);
    background: #fff !important;
    border-bottom: 3px solid var(--guide-primary-dark);
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .guide-hero__inner { padding: 0 0 10mm; }
  .guide-logo {
    width: 120px;
    padding: 6px 10px;
    border: 1px solid var(--guide-border);
    border-radius: 10px;
    box-shadow: none;
  }
  .guide-hero .guide-eyebrow { color: var(--guide-primary); }
  .guide-hero h1 {
    max-width: none;
    margin-top: 5mm;
    color: var(--guide-ink);
    font-size: 26px;
    line-height: 1.14;
  }
  .guide-lead {
    max-width: none;
    margin-top: 4mm;
    color: var(--guide-muted);
    font-size: 11px;
    line-height: 1.45;
  }
  .guide-meta {
    gap: 8px;
    margin-top: 7mm;
  }
  .guide-meta div {
    min-width: 0;
    padding: 7px 9px;
    border-color: var(--guide-border);
    border-radius: 8px;
    background: #f8fcfd;
  }
  .guide-meta dt {
    color: var(--guide-muted);
    font-size: 8px;
  }
  .guide-meta dd {
    color: var(--guide-ink);
    font-size: 10px;
  }
  .guide-main { padding: 8mm 0 0; }
  .guide-section {
    margin-bottom: 5mm;
    padding: 5mm;
    border-radius: 10px;
    box-shadow: none;
    break-inside: auto;
    page-break-inside: auto;
  }
  .guide-section h2 {
    margin-bottom: 4mm;
    font-size: 18px;
    line-height: 1.2;
    break-after: avoid;
    page-break-after: avoid;
  }
  .guide-section p {
    line-height: 1.45;
  }
  .guide-eyebrow {
    margin: 0 0 3mm;
    font-size: 8px;
    letter-spacing: 0.12em;
    break-after: avoid;
    page-break-after: avoid;
  }
  .guide-grid,
  .guide-feature-list {
    gap: 7px;
  }
  .guide-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .guide-feature-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .guide-grid article,
  .guide-feature-list article {
    padding: 8px;
    border-radius: 8px;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .guide-grid strong,
  .guide-feature-list h3 {
    margin-bottom: 4px;
    font-size: 11px;
  }
  .guide-checklist {
    line-height: 1.45;
  }
  .guide-shot-row,
  .guide-shot-row--reverse {
    grid-template-columns: 1fr 36mm;
    gap: 8mm;
  }
  .guide-shot-row--reverse {
    grid-template-columns: 36mm 1fr;
  }
  .guide-phone-shot img {
    width: 36mm;
    max-width: 36mm;
    max-height: 98mm;
    border-width: 4px;
    border-radius: 12px;
  }
  .guide-browser-shot img {
    max-height: 92mm;
    object-fit: contain;
    object-position: top center;
    border-radius: 8px;
  }
  .guide-browser-shot--compact img {
    max-height: 70mm;
  }
  .guide-browser-shot,
  .guide-shot-row,
  .guide-shot-row--reverse {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .guide-print-page-start {
    break-before: page;
    page-break-before: always;
    break-inside: auto !important;
    page-break-inside: auto !important;
  }
  /* Seção maior que uma página: continua na página atual em vez de deixar a anterior em branco. */
  .guide-print-flow {
    break-inside: auto !important;
    page-break-inside: auto !important;
  }
  .guide-print-avoid {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .guide-browser-shot img,
  .guide-phone-shot img {
    box-shadow: none;
  }
}

@media print {
  .guide-operational-flow {
    overflow: visible;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }
  /* A section that fits on one page moves whole instead of orphaning its title. */
  .guide-section {
    break-inside: avoid-page;
  }
}

/* Guia de APR, PT e RDS: passo a passo ilustrado, avisos e tabelas. */
.guide-toc {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 18px;
  margin: 12px 0 0;
  padding-left: 22px;
  color: var(--guide-muted);
  line-height: 1.6;
}
.guide-toc a { color: var(--guide-primary-dark); font-weight: 700; text-decoration: none; }
.guide-callout {
  margin: 16px 0;
  padding: 14px 18px;
  border: 1px solid var(--guide-border);
  border-left: 6px solid var(--guide-primary);
  border-radius: 12px;
  background: var(--guide-soft);
  color: var(--guide-ink);
  line-height: 1.6;
}
.guide-callout > strong:first-child { display: block; margin-bottom: 4px; }
.guide-callout p { margin: 4px 0 0; color: var(--guide-ink); }
.guide-callout ul { margin: 6px 0 0; padding-left: 20px; }
.guide-callout--danger { border-left-color: #c0392b; background: #fdf0ee; border-color: #f2c7c0; }
.guide-callout--warning { border-left-color: #d98a00; background: #fff7e6; border-color: #f3dfb1; }
.guide-callout--ok { border-left-color: #1f8a5b; background: #ecf8f1; border-color: #c3e6d2; }
.guide-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
  margin: 18px 0 6px;
}
.guide-gallery figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.guide-gallery img {
  display: block;
  width: 100%;
  max-width: 230px;
  height: auto;
  border: 6px solid #102033;
  border-radius: 20px;
  box-shadow: 0 14px 34px rgba(15, 39, 56, 0.18);
}
.guide-gallery figcaption,
.guide-browser-shot figcaption {
  margin-top: 8px;
  color: var(--guide-muted);
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
}
.guide-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  margin-right: 6px;
  border-radius: 999px;
  background: var(--guide-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.guide-browser-shot { margin: 0; }
.guide-table {
  width: 100%;
  margin: 14px 0;
  border-collapse: collapse;
  color: var(--guide-ink);
  font-size: 15px;
}
.guide-table th,
.guide-table td {
  padding: 9px 12px;
  border: 1px solid var(--guide-border);
  text-align: left;
  vertical-align: top;
  line-height: 1.5;
}
.guide-table th { background: var(--guide-soft); color: var(--guide-primary-dark); }
.guide-faq dt { margin-top: 14px; color: var(--guide-ink); font-weight: 800; }
.guide-faq dd { margin: 4px 0 0; color: var(--guide-muted); line-height: 1.6; }
.guide-section h3 { margin: 22px 0 8px; color: var(--guide-primary-dark); font-size: 19px; }

@media (max-width: 900px) {
  .guide-toc { grid-template-columns: 1fr; }
  .guide-table { font-size: 14px; }
}

@media print {
  .guide-toc { grid-template-columns: repeat(3, minmax(0, 1fr)); line-height: 1.4; }
  .guide-callout {
    margin: 3mm 0;
    padding: 3mm 4mm;
    border-radius: 6px;
    break-inside: avoid;
    page-break-inside: avoid;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .guide-gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4mm;
    margin: 3mm 0;
  }
  .guide-gallery figure { break-inside: avoid; page-break-inside: avoid; }
  .guide-gallery img {
    max-width: 38mm;
    border-width: 3px;
    border-radius: 10px;
    box-shadow: none;
  }
  .guide-gallery figcaption,
  .guide-browser-shot figcaption { font-size: 8.5px; margin-top: 2mm; }
  .guide-browser-shot { break-inside: avoid; page-break-inside: avoid; }
  .guide-step-number { min-width: 14px; height: 14px; font-size: 8px; margin-right: 3px; }
  .guide-table { font-size: 9.5px; margin: 3mm 0; }
  .guide-table th, .guide-table td { padding: 1.6mm 2.4mm; }
  .guide-table tr { break-inside: avoid; page-break-inside: avoid; }
  .guide-faq dt { margin-top: 3mm; break-after: avoid; page-break-after: avoid; }
  .guide-faq dd { break-inside: avoid; page-break-inside: avoid; }
  .guide-section h3 { margin: 4mm 0 2mm; font-size: 13px; break-after: avoid; page-break-after: avoid; }
  .guide-apr .guide-section { break-inside: auto; page-break-inside: auto; }
}

/* Painel de decisao da PT: captura estreita, exibida no tamanho real e centralizada. */
.guide-decision-shot img {
  width: auto;
  max-width: min(340px, 100%);
  margin-left: auto;
  margin-right: auto;
}

/* Secao com duas capturas: ambas cabem na mesma pagina impressa. */
@media print {
  .guide-dual-shot img {
    max-height: 64mm;
  }
}
