/* ========== Housing Guide — Print-First Stylesheet ========== */
/* Municipal Affordable Housing Strategy Guide — Nova Scotia */
/* Helio Urban Development | 2026 Edition */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Brand */
  --navy: #1B2A4A;
  --navy-light: #243558;
  --navy-dark: #111D33;
  --gold: #D4A84B;
  --gold-light: #E5C57A;
  --gold-dark: #B8923F;

  /* Data palette */
  --teal: #0E7C6B;
  --teal-light: #12A38D;
  --coral: #E05C4D;
  --coral-light: #E8796D;

  /* Neutrals */
  --white: #FFFFFF;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;

  /* Viability */
  --viable: #22c55e;
  --nearly-viable: #84cc16;
  --challenging: #f59e0b;
  --difficult: #ef4444;

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
}

/* ---------- Print Page Setup ---------- */
@page {
  size: letter;
  margin: 0;
}

@media print {
  html, body {
    font-size: 10.5pt;
    line-height: 1.5;
    color: var(--navy);
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .no-print, .guide-nav, .guide-toolbar {
    display: none !important;
  }

  a {
    color: var(--navy);
    text-decoration: none;
  }

  .page-break {
    page-break-before: always;
    break-before: page;
  }

  h1, h2, h3 {
    page-break-after: avoid;
    break-after: avoid;
  }

  .exhibit, .callout, .data-table, figure, table {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .exhibit {
    margin-top: 0.5em;
  }

  /* Page numbers via CSS counters */
  body {
    counter-reset: page-num;
  }

  .page-break {
    counter-increment: page-num;
  }
}

/* ---------- Base Reset & Typography ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--navy);
  background: #E5E7EB;
  line-height: 1.65;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.25;
  color: var(--navy);
}

h1 { font-size: 2.25rem; margin-bottom: 1rem; font-weight: 700; }
h2 { font-size: 1.75rem; margin-top: 2.5rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.35rem; margin-top: 1.75rem; margin-bottom: 0.5rem; }
h4 { font-size: 1.1rem; margin-top: 1.25rem; margin-bottom: 0.4rem; }

p {
  margin-bottom: 0.85rem;
}

strong { font-weight: 600; }

a {
  color: var(--teal);
  text-decoration: underline;
  text-decoration-color: var(--teal-light);
  text-underline-offset: 2px;
}

a:hover { color: var(--teal-light); }

/* ---------- Document Container ---------- */
.guide-document {
  max-width: 9.5in;
  margin: 0 auto;
  padding: 1rem 0;
  background: transparent;
}

/* ---------- Page Sheets (screen) ---------- */
.guide-page {
  width: 8.5in;
  min-height: 11in;
  margin: 0 auto 1.5rem;
  padding: 0.75in 0.85in;
  background: var(--white);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

/* Cover page — full bleed navy */
.guide-page--cover {
  padding: 0;
  overflow: hidden;
}

.guide-page--cover .cover-page {
  margin: 0;
  min-height: 11in;
}

/* Part header pages — allow full-width header */
.guide-page--part {
  padding: 0;
}

.guide-page--part .part-header {
  margin: 0;
  min-height: 11in;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Back cover — full bleed navy */
.guide-page--back {
  padding: 0;
}

.guide-page--back .back-cover {
  margin: 0;
  min-height: 11in;
}

@media print {
  body {
    background: var(--white);
  }

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

  /* Each page carries its own padding — @page margin is 0 */
  .guide-page {
    width: 8.5in;
    min-height: 11in;
    margin: 0;
    padding: 0.85in 0.85in;
    background: var(--white);
    box-shadow: none;
    border-radius: 0;
    page-break-after: always;
    break-after: page;
    overflow: hidden;
    box-sizing: border-box;
  }

  .guide-page:last-child {
    page-break-after: auto;
    break-after: auto;
  }

  /* Full-bleed pages: no padding, child fills entire sheet */
  .guide-page--cover {
    padding: 0;
  }

  .guide-page--cover .cover-page {
    width: 8.5in;
    min-height: 11in;
    margin: 0;
    padding: 2in 1.25in 1.5in;
    box-sizing: border-box;
  }

  .guide-page--part {
    padding: 0;
  }

  .guide-page--part .part-header {
    width: 8.5in;
    min-height: 11in;
    margin: 0;
    padding: 3rem 2rem;
    box-sizing: border-box;
  }

  .guide-page--back {
    padding: 0;
  }

  .guide-page--back .back-cover {
    width: 8.5in;
    min-height: 11in;
    margin: 0;
    box-sizing: border-box;
  }
}

/* ---------- Cover Page ---------- */
.cover-page {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 10in;
  background: linear-gradient(160deg, var(--navy-dark) 0%, var(--navy) 60%, var(--navy-light) 100%);
  color: var(--white);
  padding: 2in 1.25in 1.5in;
  position: relative;
  overflow: hidden;
}

.cover-page::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(212, 168, 75, 0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.cover-page::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--gold);
}

.cover-logo {
  width: 180px;
  margin-bottom: 2rem;
}

.cover-logo svg {
  width: 100%;
  height: auto;
}

.cover-edition {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--gold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.cover-title {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 0.75rem;
  max-width: 500px;
  color: var(--white);
}

.cover-subtitle {
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--gray-300);
  max-width: 420px;
  line-height: 1.5;
  margin-bottom: 2rem;
}

.cover-meta {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--gray-400);
}

.cover-meta strong {
  color: var(--white);
}

/* ---------- About Page ---------- */
.about-page {
  padding: 1rem 0;
}

.about-page .about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.about-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-left: 4px solid var(--gold);
  border-radius: 6px;
  padding: 1rem 1.25rem;
}

.about-card h4 {
  font-size: 0.95rem;
  margin-top: 0;
  margin-bottom: 0.35rem;
  color: var(--navy);
}

.about-card p {
  font-size: 0.9rem;
  color: var(--gray-600);
  margin: 0;
}

/* ---------- Table of Contents ---------- */
.toc {
  padding: 1rem 0;
}

.toc h2 {
  margin-top: 0;
}

.toc-part {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--gold-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.toc-list {
  list-style: none;
  padding: 0;
}

.toc-list li {
  display: flex;
  align-items: baseline;
  padding: 0.3rem 0;
  border-bottom: 1px dotted var(--gray-200);
}

.toc-list li a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 500;
  flex-shrink: 0;
}

.toc-list li a:hover {
  color: var(--teal);
}

.toc-list li .toc-dots {
  flex: 1;
  border-bottom: 1px dotted var(--gray-300);
  margin: 0 0.5rem;
  min-width: 2rem;
}

.toc-list li .toc-page {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--gray-500);
  flex-shrink: 0;
}

.toc-sub {
  padding-left: 1.5rem;
}

.toc-sub li {
  font-size: 0.95rem;
}

.toc-sub li a {
  font-weight: 400;
}

/* ---------- Part Headers ---------- */
.part-header {
  background: var(--navy);
  color: var(--white);
  padding: 2.5rem 2rem;
  text-align: center;
  position: relative;
}

.part-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gold);
}

.part-number {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--gold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.5rem;
}

.part-header h1 {
  color: var(--white);
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.part-header p {
  color: var(--gray-300);
  font-size: 1.05rem;
  max-width: 500px;
  margin: 0 auto;
}

/* ---------- Chapter Headings ---------- */
.chapter-header {
  margin-top: 2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--gold);
}

.chapter-number {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--gold-dark);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.25rem;
}

/* ---------- Exhibits ---------- */
.exhibit {
  margin: 1.5rem 0;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  overflow: hidden;
}

.exhibit-header {
  background: var(--navy);
  color: var(--white);
  padding: 0.6rem 1rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.exhibit-number {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gold);
  background: rgba(212, 168, 75, 0.15);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  flex-shrink: 0;
}

.exhibit-body {
  padding: 1.25rem;
  background: var(--white);
}

.exhibit-source {
  padding: 0.4rem 1rem;
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
  font-size: 0.75rem;
  color: var(--gray-500);
  font-style: italic;
}

/* ---------- Chart Containers ---------- */
.chart-container {
  position: relative;
  width: 100%;
  max-height: 350px;
}

.chart-container canvas {
  max-height: 350px;
}

/* ---------- Data Tables ---------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 0.5rem 0;
}

.data-table thead th {
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 600;
  padding: 0.6rem 0.75rem;
  text-align: left;
  font-size: 0.85rem;
  white-space: nowrap;
}

.data-table tbody td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--gray-200);
  vertical-align: top;
}

.data-table tbody tr:nth-child(even) {
  background: var(--gray-50);
}

.data-table tbody tr:hover {
  background: rgba(212, 168, 75, 0.06);
}

.data-table .num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-align: right;
  white-space: nowrap;
}

.data-table .highlight {
  color: var(--teal);
  font-weight: 600;
}

.data-table .gap {
  color: var(--coral);
  font-weight: 600;
}

.data-table .label {
  font-weight: 500;
}

.data-table tfoot td {
  border-top: 2px solid var(--navy);
  font-weight: 600;
  padding-top: 0.6rem;
}

/* ---------- Callout Boxes ---------- */
.callout {
  background: var(--gray-50);
  border-left: 4px solid var(--gold);
  border-radius: 0 6px 6px 0;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
}

.callout-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--gold-dark);
  margin-bottom: 0.35rem;
}

.callout p {
  font-size: 0.92rem;
  margin-bottom: 0.35rem;
  color: var(--gray-700);
}

.callout p:last-child {
  margin-bottom: 0;
}

.callout.callout--teal {
  border-left-color: var(--teal);
}

.callout.callout--teal .callout-title {
  color: var(--teal);
}

.callout.callout--coral {
  border-left-color: var(--coral);
}

.callout.callout--coral .callout-title {
  color: var(--coral);
}

.callout.callout--navy {
  background: var(--navy);
  color: var(--white);
  border-left-color: var(--gold);
}

.callout.callout--navy .callout-title {
  color: var(--gold);
}

.callout.callout--navy p {
  color: var(--gray-300);
}

/* ---------- Key Stat Callouts ---------- */
.stat-row {
  display: flex;
  gap: 1rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.stat-card {
  flex: 1;
  min-width: 140px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-top: 3px solid var(--gold);
  border-radius: 0 0 6px 6px;
  padding: 0.75rem 1rem;
  text-align: center;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
}

.stat-value.teal { color: var(--teal); }
.stat-value.coral { color: var(--coral); }
.stat-value.gold { color: var(--gold-dark); }

.stat-label {
  font-size: 0.78rem;
  color: var(--gray-500);
  margin-top: 0.2rem;
  line-height: 1.3;
}

/* ---------- Flow Diagram (Market vs Affordable) ---------- */
.flow-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 1rem 0;
}

.flow-column {
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  overflow: hidden;
}

.flow-column.flow--market .flow-title {
  background: var(--gray-600);
}

.flow-column.flow--affordable .flow-title {
  background: var(--teal);
}

.flow-title {
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.6rem 1rem;
  text-align: center;
}

.flow-steps {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: center;
}

.flow-step {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-size: 0.88rem;
  font-weight: 500;
  text-align: center;
  width: 100%;
}

.flow-arrow {
  color: var(--gray-400);
  font-size: 1.1rem;
  line-height: 1;
}

.flow-column.flow--affordable .flow-step {
  border-color: rgba(14, 124, 107, 0.25);
}

/* ---------- Product Spread (2-page) ---------- */
.product-spread {
  margin: 1.5rem 0;
}

.product-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--gold);
  margin-bottom: 1rem;
}

.product-icon {
  width: 48px;
  height: 48px;
  background: var(--navy);
  color: var(--gold);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.product-name {
  font-size: 1.5rem;
  margin: 0;
}

.product-name small {
  display: block;
  font-size: 0.85rem;
  color: var(--gray-500);
  font-weight: 400;
}

.product-stats-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.product-stat {
  background: var(--navy);
  color: var(--white);
  border-radius: 4px;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.product-stat .ps-label {
  color: var(--gray-400);
}

.product-stat .ps-value {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--gold);
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.product-section h4 {
  font-size: 0.9rem;
  margin-top: 0;
  margin-bottom: 0.4rem;
  color: var(--gold-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.product-section ul {
  list-style: none;
  padding: 0;
  font-size: 0.88rem;
}

.product-section li {
  padding: 0.2rem 0;
  padding-left: 1rem;
  position: relative;
}

.product-section li::before {
  content: '\2022';
  position: absolute;
  left: 0;
  color: var(--gold);
}

.product-economics {
  margin-top: 1rem;
}

.product-economics .data-table {
  font-size: 0.85rem;
}

/* ---------- Funding Waterfall ---------- */
.waterfall-bar {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0.5rem 0;
}

.wf-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
}

.wf-label {
  width: 160px;
  flex-shrink: 0;
  text-align: right;
  font-weight: 500;
}

.wf-bar-track {
  flex: 1;
  background: var(--gray-100);
  border-radius: 4px;
  height: 24px;
  position: relative;
  overflow: hidden;
}

.wf-bar-fill {
  height: 100%;
  border-radius: 4px;
  display: flex;
  align-items: center;
  padding: 0 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--white);
}

.wf-bar-fill.fill--navy { background: var(--navy); }
.wf-bar-fill.fill--teal { background: var(--teal); }
.wf-bar-fill.fill--gold { background: var(--gold-dark); }
.wf-bar-fill.fill--coral { background: var(--coral); }
.wf-bar-fill.fill--green { background: var(--viable); }

.wf-value {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  width: 80px;
  flex-shrink: 0;
}

/* ---------- Viability Badge ---------- */
.viability-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
}

.viability-badge.vb--viable { background: rgba(34,197,94,0.12); color: var(--viable); }
.viability-badge.vb--nearly { background: rgba(132,204,22,0.12); color: var(--nearly-viable); }
.viability-badge.vb--challenging { background: rgba(245,158,11,0.12); color: var(--challenging); }
.viability-badge.vb--difficult { background: rgba(239,68,68,0.12); color: var(--difficult); }

/* ---------- Checklist ---------- */
.checklist {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0;
}

.checklist li {
  padding: 0.35rem 0 0.35rem 1.75rem;
  position: relative;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--gray-100);
}

.checklist li::before {
  content: '\2610';
  position: absolute;
  left: 0;
  color: var(--gold-dark);
  font-size: 1.1rem;
}

/* ---------- Gantt Timeline ---------- */
.gantt {
  margin: 1rem 0;
}

.gantt-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.gantt-label {
  width: 160px;
  flex-shrink: 0;
  font-size: 0.85rem;
  font-weight: 500;
  text-align: right;
}

.gantt-track {
  flex: 1;
  height: 28px;
  position: relative;
  background: var(--gray-100);
  border-radius: 4px;
}

.gantt-bar {
  position: absolute;
  top: 2px;
  bottom: 2px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  padding: 0 0.5rem;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
}

/* ---------- Matrix / Responsibility Table ---------- */
.matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.matrix-table th {
  background: var(--navy);
  color: var(--white);
  padding: 0.5rem 0.65rem;
  font-weight: 600;
  text-align: center;
}

.matrix-table th:first-child {
  text-align: left;
}

.matrix-table td {
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--gray-200);
  text-align: center;
  vertical-align: top;
}

.matrix-table td:first-child {
  text-align: left;
  font-weight: 500;
  background: var(--gray-50);
}

.matrix-check {
  color: var(--teal);
  font-weight: 700;
}

.matrix-primary {
  color: var(--navy);
  font-weight: 700;
}

/* ---------- Program Eligibility Flags ---------- */
.program-flags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.pflag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  border: 1px solid;
}

.pflag--yes {
  background: rgba(14, 124, 107, 0.1);
  color: var(--teal);
  border-color: rgba(14, 124, 107, 0.3);
}

.pflag--no {
  background: var(--gray-100);
  color: var(--gray-400);
  border-color: var(--gray-200);
}

/* ---------- Glossary ---------- */
.glossary-list {
  columns: 2;
  column-gap: 2rem;
}

.glossary-term {
  break-inside: avoid;
  margin-bottom: 0.75rem;
}

.glossary-term dt {
  font-weight: 600;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--navy);
}

.glossary-term dd {
  font-size: 0.88rem;
  color: var(--gray-600);
  margin-left: 0;
}

/* ---------- Back Cover ---------- */
.back-cover {
  background: var(--navy);
  color: var(--white);
  padding: 3rem 2rem;
  text-align: center;
  min-height: 6in;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.back-cover h2 {
  color: var(--white);
  margin-top: 0;
}

.back-cover .gold-line {
  width: 60px;
  height: 3px;
  background: var(--gold);
  margin: 1rem auto;
}

.back-cover p {
  color: var(--gray-300);
  max-width: 400px;
}

.back-cover .cta-url {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--gold);
  margin-top: 1.5rem;
  font-weight: 600;
}

/* ---------- Screen-only Navigation ---------- */
.guide-toolbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--navy);
  color: var(--white);
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.guide-toolbar a {
  color: var(--gold);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
}

.guide-toolbar .toolbar-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
}

.guide-toolbar .btn-print {
  background: var(--gold);
  color: var(--navy);
  border: none;
  padding: 0.35rem 1rem;
  border-radius: 4px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}

.guide-toolbar .btn-print:hover {
  background: var(--gold-light);
}

@media print {
  .guide-toolbar {
    display: none;
  }
}

/* Screen offset for fixed toolbar */
@media screen {
  .guide-document {
    padding-top: calc(1rem + 44px);
  }
}

/* ---------- Responsive (tablet/mobile) ---------- */
@media (max-width: 768px) {
  .guide-document {
    padding: 0.5rem 0;
  }

  .guide-page {
    width: auto;
    min-height: auto;
    margin: 0 0 0.75rem;
    padding: 1.25rem 1rem;
    border-radius: 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  }

  .guide-page--cover .cover-page {
    min-height: auto;
    padding: 2rem 1.25rem;
  }

  .guide-page--part .part-header {
    min-height: auto;
  }

  .guide-page--back .back-cover {
    min-height: auto;
  }

  .cover-title {
    font-size: 1.75rem;
  }

  .stat-row {
    flex-direction: column;
  }

  .product-grid, .flow-compare, .about-grid {
    grid-template-columns: 1fr;
  }

  .glossary-list {
    columns: 1;
  }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.4rem; }
  h3 { font-size: 1.15rem; }
}
