/* ════════════════════════════════════════
   Deviceflow Guide — Canonical CSS
   Dual-purpose: web (flowing) + print (paginated 8.5×11")

   Design principles:
   - NO borders around boxes/cards
   - NO background colors on cards
   - Light separating rules ONLY between items
   - Design tokens switch between screen/print scales
   ════════════════════════════════════════ */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Fraunces:wght@700;800&display=block');

/* ════════════════════════════════════
   1. Design Tokens
   Default values = web scale.
   Print overrides reassign tokens below.
   ════════════════════════════════════ */
.guide-content {
  /* ── Colors ── */
  --primary: #0066cc;
  --primary-dark: #004999;
  --primary-light: #e6f0ff;
  --accent: #00a3e0;
  --success: #059669;
  --success-light: #dcfce7;
  --warning: #d97706;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;

  /* ── Font families ── */
  --font-body:
    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Fraunces', Georgia, serif;

  /* ── Type scale ── */
  --text-section-title: 1.75rem;
  --text-cover-title: 2.6rem;
  --text-body: 1rem;
  --text-body-lg: 1.125rem;
  --text-component-title: 0.95rem;
  --text-component-body: 0.875rem;
  --text-label: 0.85rem;
  --text-source: 0.8rem;
  --text-caption: 0.75rem;
  --text-tag: 0.7rem;
  --text-small: 0.65rem;
  --text-tiny: 0.55rem;

  /* ── Stat number scale ── */
  --stat-hero: 5rem;
  --stat-lg: 2.5rem;
  --stat-md: 1.2rem;

  /* ── Spacing ── */
  --pad-page: 1.5rem;
  --pad-header: 2.5rem 1.5rem 0.75rem;
  --gap-section: 1.25rem;
  --gap-grid: 1.5rem;
}

/* ── Print token overrides ── */
@media print {
  .guide-content {
    /* System fonts ONLY during print — Google variable fonts (Inter, Fraunces)
       get rasterized by Chrome's Save-as-PDF pipeline, killing the text layer.
       Avoid `-apple-system` / `BlinkMacSystemFont` here too — they resolve to
       San Francisco on macOS, which Chrome won't embed (Apple license)
       and rasterizes instead. Verdana + Georgia produce a copyable PDF. */
    --font-body: Verdana, Geneva, Tahoma, sans-serif;
    --font-display: Georgia, 'Times New Roman', Times, serif;
    --text-section-title: 1.5rem;
    --text-cover-title: 2.6rem;
    --text-body: 11pt;
    --text-body-lg: 12pt;
    --text-component-title: 10pt;
    --text-component-body: 9.5pt;
    --text-label: 8.5pt;
    --text-source: 8.5pt;
    --text-caption: 8.5pt;
    --text-tag: 7.5pt;
    --text-small: 7.5pt;
    --text-tiny: 6.5pt;
    --stat-hero: 3rem;
    --stat-lg: 1.4rem;
    --stat-md: 1.2rem;
    --pad-page: 0.25in 0.65in 0.2in;
    --pad-header: 0.35in 0.65in 0.15in;
    --gap-section: 0.2in;
    --gap-grid: 0.15in;
  }
}

/* ── Screen font override: use site font stack ── */
@media screen {
  .guide-content {
    --font-display:
      ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji',
      'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
  }
}

/* ════════════════════════════════════
   2. Scoped Reset & Base Styles
   ════════════════════════════════════ */
.guide-content * {
  box-sizing: border-box;
}

.guide-content {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--gray-900);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.guide-content h1,
.guide-content h2,
.guide-content h3,
.guide-content h4,
.guide-content h5,
.guide-content h6 {
  font-family: var(--font-display);
  line-height: 1.25;
  font-weight: 700;
}

.guide-content p {
  margin: 0;
}

.guide-content a {
  color: inherit;
  text-decoration: none;
}

/* ════════════════════════════════════
   3. Shared Typography Patterns
   Reusable type treatments for stat values,
   labels, source citations, and tags.
   ════════════════════════════════════ */

/* Stat values — large accent numbers (always Fraunces, even on screen) */
.guide-content .stat-strip-value,
.guide-content .stat-num,
.guide-content .breakdown-value,
.guide-content .research-stat {
  font-family: 'Fraunces', Georgia, serif;
  font-size: var(--stat-lg);
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.2;
}

.guide-content .stat-num.red {
  color: #dc2626;
}

/* Stat labels — text below numbers */
.guide-content .stat-strip-label,
.guide-content .stat-label,
.guide-content .breakdown-label,
.guide-content .big-number-note {
  font-size: var(--text-label);
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.3;
}

/* Source/citation text */
.guide-content .stat-strip-source,
.guide-content .research-source {
  font-size: var(--text-source);
  color: var(--gray-400);
}

.guide-content .stat-strip-source a,
.guide-content .research-source a {
  color: var(--gray-400);
  text-decoration: none;
}

/* Tags — small uppercase labels (base class) */
.guide-content .guide-tag {
  display: inline-block;
  font-size: var(--text-tag);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  background: transparent;
  border: none;
}

/* ════════════════════════════════════
   4. Page Layout System
   ════════════════════════════════════ */

.guide-content .page {
  max-width: 48rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ════════════════════════════════════
   5. Cover Page
   ════════════════════════════════════ */

.guide-content .cover {
  background: linear-gradient(145deg, #003d7a 0%, #023480 50%, #001233 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0;
  position: relative;
  min-height: 45vh;
  max-width: none;
  border-radius: 0;
}

.guide-content .cover::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 55%;
  height: 100%;
  background: radial-gradient(
    ellipse at top right,
    rgba(0, 163, 224, 0.15) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.guide-content .cover-top {
  padding: 0.6in 0.65in 0;
  position: relative;
  z-index: 1;
}

.guide-content .cover-logo img {
  height: 28px;
  filter: brightness(0) invert(1);
}

.guide-content .cover-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 0.65in;
  position: relative;
  z-index: 1;
}

.guide-content .cover-body h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: var(--text-cover-title);
  font-weight: 700;
  color: #fff;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
  max-width: 80%;
}

.guide-content .cover-body .subtitle {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.55;
  max-width: 70%;
}

.guide-content .cover-meta {
  padding: 0 0.65in 0.6in;
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.guide-content .cover-meta .audience-tag {
  font-size: var(--text-tag);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  border: 1px solid rgba(0, 163, 224, 0.4);
  padding: 0.3rem 0.65rem;
  border-radius: 4px;
  background: transparent;
}

.guide-content .cover-meta .url {
  font-size: var(--text-caption);
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

/* ════════════════════════════════════
   6. Per-Page Header & Footer (print-only)
   ════════════════════════════════════ */

.guide-content .header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
}

.guide-content .logo img {
  display: block;
  height: 20px;
}

.guide-content .tagline {
  font-size: var(--text-tag);
  color: var(--gray-500);
  font-weight: 500;
  letter-spacing: 0.03em;
}

.guide-content .guide-footer {
  padding: 0.15in 0.65in;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--gray-100);
  margin-top: auto;
}

.guide-content .guide-footer p {
  font-size: var(--text-small);
  color: var(--gray-400);
}

.guide-content .guide-footer .page-num {
  font-weight: 600;
  color: var(--gray-500);
}

/* ════════════════════════════════════
   7. TOC Page
   ════════════════════════════════════ */

.guide-content .toc-header {
  padding: 2.5rem 1.5rem 1rem;
}

.guide-content .toc-header h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: var(--text-section-title);
  font-weight: 700;
  color: var(--gray-900);
}

.guide-content .toc-body {
  flex: 1;
  padding: 0 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.guide-content .toc-item {
  display: flex;
  align-items: baseline;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-100);
}

.guide-content .toc-item:last-child {
  border-bottom: none;
}

.guide-content .toc-num {
  font-size: var(--text-label);
  font-weight: 700;
  color: var(--primary);
  width: 2rem;
  flex-shrink: 0;
  font-family: 'Fraunces', Georgia, serif;
}

.guide-content .toc-label {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gray-900);
  flex: 1;
}

.guide-content .toc-desc {
  font-size: var(--text-component-body);
  color: var(--gray-500);
  margin-top: 0.2rem;
}

.guide-content .toc-page {
  font-size: 0.72rem;
  color: var(--gray-500);
  font-weight: 600;
  min-width: 1.2rem;
  text-align: right;
}

.guide-content .toc-item-wrap {
  flex: 1;
}

/* ════════════════════════════════════
   8. Content Pages — Section Headers & Body
   ════════════════════════════════════ */

.guide-content .content-header {
  padding: var(--pad-header);
  border-bottom: 2px solid var(--primary);
}

.guide-content .content-header .section-num {
  font-size: var(--text-caption);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.guide-content .content-header h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: var(--text-section-title);
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.2;
}

.guide-content .content-body {
  flex: 1;
  padding: var(--pad-page);
  display: flex;
  flex-direction: column;
  gap: var(--gap-section);
}

.guide-content .content-body h2 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.08in;
}

.guide-content .content-body h3 {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 0.05in;
}

.guide-content .content-body p {
  font-size: var(--text-body);
  color: var(--gray-700);
  line-height: 1.7;
}

.guide-content .content-body p + p {
  margin-top: 0.5rem;
}

.guide-content .content-note {
  font-size: var(--text-component-body);
  color: var(--gray-700);
  margin-top: 1.1rem;
  margin-bottom: 0.25rem;
  padding: 0.9rem 1.15rem;
  border-left: 3px solid var(--primary, #0066cc);
  background: var(--gray-50, #f8fafc);
  border-radius: 0 4px 4px 0;
  font-style: italic;
  line-height: 1.55;
}

.guide-content .content-note strong,
.guide-content .content-note b {
  font-style: normal;
  color: var(--gray-900);
}

/* Continued-section header — smaller/secondary on pages that continue a section */
.guide-content .content-header.continued .section-num {
  opacity: 0.55;
}

.guide-content .content-header.continued .section-num::after {
  content: ' · cont.';
  font-size: 0.55em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  opacity: 0.85;
}

.guide-content .content-header.continued h1 {
  font-size: 1.55rem;
  color: var(--gray-700);
}

/* ════════════════════════════════════
   9. Horizontal Stat Strip
   4-column stat display with values, labels, sources.
   ════════════════════════════════════ */

.guide-content .stat-strip {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 0;
  background: transparent;
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
}

.guide-content .stat-strip-item,
.guide-content .stat-item {
  background: transparent;
  padding: 0.6rem 0.9rem;
  text-align: center;
  border-right: 1px solid var(--gray-100);
  flex: 0 1 auto;
  min-width: 150px;
  max-width: 240px;
}

.guide-content .stat-strip-item:last-child,
.guide-content .stat-item:last-child {
  border-right: none;
}

.guide-content .stat-strip-label {
  margin-top: 0.08rem;
}

.guide-content .stat-strip-source {
  margin-top: 0.12rem;
}

/* ════════════════════════════════════
   10. Hero Stat (Big Number + Breakdown)
   Centered large number with label and sub-grid.
   ════════════════════════════════════ */

.guide-content .big-number-section {
  text-align: center;
  padding: 2rem 1.5rem;
}

.guide-content .big-number-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.15in;
}

.guide-content .big-number {
  font-family: 'Fraunces', Georgia, serif;
  font-size: var(--stat-hero);
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1;
  margin-bottom: 0.1in;
  letter-spacing: -0.02em;
}

.guide-content .big-number-note {
  margin-bottom: 0.2in;
}

.guide-content .big-number-breakdown {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.1in;
}

.guide-content .breakdown-item {
  width: calc(33.333% - 0.08in);
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0.3rem 0.4rem;
  text-align: center;
}

.guide-content .breakdown-label {
  margin-top: 0.05rem;
}

/* ════════════════════════════════════
   11. Card Grid
   Reusable grid + card pattern.
   .card-grid: 2-col grid (add .cols-3 for 3-col)
   .info-card: filled card (gray bg, rounded)
   ════════════════════════════════════ */

.guide-content .card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.12in;
  margin-top: 0.1in;
}

.guide-content .card-grid.cols-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.guide-content .info-card {
  background: var(--gray-100);
  border-radius: 8px;
  padding: 0.4rem 0.55rem;
}

.guide-content .info-card h3,
.guide-content .info-card h4 {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0 0 0.06rem;
}

.guide-content .info-card p {
  font-size: 0.7rem;
  color: var(--gray-600);
  line-height: 1.45;
  margin: 0;
}

/* Role shift variant — colored before/after text */
.guide-content .info-card .role-before {
  font-size: 0.65rem;
  color: #dc2626;
  line-height: 1.4;
  margin: 0 0 0.06rem;
}

.guide-content .info-card .role-after {
  font-size: 0.65rem;
  color: var(--success);
  line-height: 1.4;
  margin: 0;
}

/* ════════════════════════════════════
   12. Tiered Card Grid (2-col, with tags)
   Cards with colored tier tags (visible/hidden/critical).
   ════════════════════════════════════ */

.guide-content .cost-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.guide-content .cost-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0.75rem 0;
}

.guide-content .cost-card h3 {
  font-size: var(--text-component-title);
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.25rem;
}

.guide-content .cost-card p {
  font-size: var(--text-component-body);
  color: var(--gray-600);
  line-height: 1.55;
}

.guide-content .cost-card .guide-tag {
  margin-bottom: 0.35rem;
}

.guide-content .cost-card.tier-visible .guide-tag {
  background: rgba(0, 102, 204, 0.1);
  color: var(--primary);
}

.guide-content .cost-card.tier-hidden .guide-tag {
  background: rgba(217, 119, 6, 0.1);
  color: var(--warning);
}

.guide-content .cost-card.tier-critical .guide-tag {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

/* ════════════════════════════════════
   13. Blockquote
   Pull quote with attribution.
   ════════════════════════════════════ */

.guide-content .quote-section {
  padding: 2rem 1.5rem;
}

.guide-content .quote-mark {
  font-size: 2.5rem;
  color: var(--primary);
  opacity: 0.3;
  line-height: 1;
  margin-bottom: 0.1rem;
}

.guide-content .quote-text {
  font-size: var(--text-body-lg);
  color: var(--gray-900);
  font-style: italic;
  line-height: 1.6;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.guide-content .quote-attribution {
  font-size: var(--text-component-body);
  color: var(--gray-500);
}

/* ════════════════════════════════════
   14. Comparison Panel (Before/After, Yours/Ours)
   Two-column side-by-side with colored headings.
   Used by: reframe (coordination-tax), raci (order-to-cash)
   ════════════════════════════════════ */

.guide-content .comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-grid);
}

.guide-content .comparison-col {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 1rem;
}

.guide-content .comparison-col h4,
.guide-content .comparison-col h3 {
  font-size: var(--text-component-title);
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 2px solid var(--gray-200);
}

.guide-content .comparison-col ul {
  list-style: disc;
  padding: 0 0 0 0.65rem;
  margin: 0;
}

.guide-content .comparison-col li {
  font-size: var(--text-component-body);
  color: var(--gray-700);
  line-height: 1.55;
  padding: 0.15rem 0;
}

.guide-content .comparison-col li::marker {
  color: var(--gray-400);
  font-size: 0.5rem;
}

/* Color variants — negative (red) */
.guide-content .comparison-col.negative {
  background: rgba(220, 38, 38, 0.02);
}

.guide-content .comparison-col.negative h4,
.guide-content .comparison-col.negative h3 {
  color: #dc2626;
  border-bottom-color: #fca5a5;
}

/* Color variants — positive (green) */
.guide-content .comparison-col.positive {
  background: rgba(5, 150, 105, 0.02);
}

.guide-content .comparison-col.positive h4,
.guide-content .comparison-col.positive h3 {
  color: var(--success);
  border-bottom-color: #86efac;
}

/* Color variants — primary (blue) */
.guide-content .comparison-col.primary {
  background: rgba(0, 102, 204, 0.03);
}

.guide-content .comparison-col.primary h4,
.guide-content .comparison-col.primary h3 {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ════════════════════════════════════
   15. Numbered Card Grid
   ════════════════════════════════════ */

.guide-content .audit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-section);
}

.guide-content .audit-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0.75rem 0;
  display: flex;
  gap: 0.75rem;
}

.guide-content .audit-num {
  font-family: 'Fraunces', Georgia, serif;
  font-size: var(--stat-md);
  font-weight: 800;
  color: var(--primary);
  flex-shrink: 0;
  width: 1.5rem;
  text-align: center;
}

.guide-content .audit-text {
  flex: 1;
}

.guide-content .audit-card strong {
  display: block;
  font-size: var(--text-component-title);
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.25rem;
}

.guide-content .audit-card p {
  font-size: var(--text-component-body);
  color: var(--gray-600);
  line-height: 1.55;
  margin: 0;
}

/* ════════════════════════════════════
   16. Measure List
   ════════════════════════════════════ */

.guide-content .measure-list {
  display: flex;
  flex-direction: column;
  gap: 0.15in;
}

.guide-content .measure-item {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0.4rem 0;
}

.guide-content .measure-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.2rem;
  margin-bottom: 0.08rem;
}

.guide-content .measure-item-name {
  font-size: var(--text-component-title);
  font-weight: 700;
  color: var(--gray-900);
}

.guide-content .measure-item-formula {
  font-size: var(--text-source);
  color: var(--gray-500);
  font-style: italic;
  text-align: right;
}

.guide-content .measure-item-desc {
  font-size: var(--text-component-body);
  color: var(--gray-600);
  line-height: 1.55;
  margin-bottom: 0.25rem;
}

.guide-content .measure-item-example {
  font-size: var(--text-source);
  color: var(--primary);
  font-weight: 600;
}

/* Two-column measure layout */
.guide-content .measure-list-2col .measure-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--gray-100);
}

.guide-content .measure-list-2col .measure-item:last-child {
  border-bottom: none;
}

.guide-content .measure-list-2col .measure-item-left {
  display: flex;
  flex-direction: column;
}

.guide-content .measure-list-2col .measure-item-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.guide-content .measure-list-2col .measure-item-name {
  font-size: var(--text-component-title);
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.15rem;
}

.guide-content .measure-list-2col .measure-item-desc {
  font-size: var(--text-component-body);
  color: var(--gray-600);
  line-height: 1.55;
  margin-bottom: 0;
}

.guide-content .measure-list-2col .measure-item-formula {
  font-size: var(--text-source);
  color: var(--gray-500);
  font-style: italic;
  text-align: left;
  margin-bottom: 0.25rem;
}

.guide-content .measure-list-2col .measure-item-example {
  font-size: var(--text-source);
  color: var(--primary);
  font-weight: 600;
}

/* ════════════════════════════════════
   17. Research/Source Grid
   ════════════════════════════════════ */

.guide-content .research-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--gap-grid);
}

.guide-content .research-card {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--gray-100);
  border-radius: 0;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
}

.guide-content .research-card h4 {
  font-size: var(--text-label);
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.25rem;
}

.guide-content .research-card p {
  font-size: var(--text-source);
  color: var(--gray-600);
  line-height: 1.55;
  margin-bottom: 0.35rem;
  flex: 1;
}

/* ════════════════════════════════════
   18. Sources Section
   ════════════════════════════════════ */

.guide-content .sources-section {
  font-size: var(--text-source);
  color: var(--gray-700);
  line-height: 1.55;
}

.guide-content .sources-section h3 {
  font-size: var(--text-body);
  font-weight: 700;
  color: var(--gray-900);
  margin-top: 1.4rem;
  margin-bottom: 0.55rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--gray-100);
}

.guide-content .sources-section h3:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.guide-content .sources-section ol {
  margin: 0 0 0.75rem 0;
  padding-left: 1.2rem;
  list-style-type: decimal;
}

.guide-content .sources-section li {
  margin-bottom: 0.4rem;
}

.guide-content .sources-section a {
  color: var(--primary);
  text-decoration: none;
}

/* ════════════════════════════════════
   19. Border-Left Card List
   ════════════════════════════════════ */

.guide-content .order-type-section {
  display: flex;
  flex-direction: column;
  gap: 0.18in;
}

.guide-content .ot-card {
  border-left: 3px solid var(--gray-300);
  padding-left: 0.18in;
}

.guide-content .ot-card.consignment {
  border-left-color: var(--primary);
}

.guide-content .ot-card.billonly {
  border-left-color: var(--warning);
}

.guide-content .ot-card .guide-tag {
  margin-bottom: 0.04in;
}

.guide-content .guide-tag.stock {
  background: var(--success-light);
  color: var(--success);
}

.guide-content .guide-tag.consignment {
  background: var(--primary-light);
  color: var(--primary);
}

.guide-content .guide-tag.billonly {
  background: #fef3c7;
  color: var(--warning);
}

.guide-content .ot-card h3 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0.04in 0 0.05in;
}

.guide-content .content-body p.ot-pain {
  font-size: 0.8em;
  color: var(--gray-600);
  line-height: 1.5;
  margin: 0 0 0.06in;
}

.guide-content .content-body .ot-breaks h4 {
  font-size: 0.8em;
  font-weight: 700;
  color: #dc2626;
  margin: 0;
  display: inline;
}

.guide-content .content-body .ot-breaks p {
  font-size: 0.8em;
  color: var(--gray-600);
  line-height: 1.5;
  margin: 0;
  display: inline;
}

/* ════════════════════════════════════
   20. Side-by-Side Step Comparison
   ════════════════════════════════════ */

.guide-content .flow-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.2in;
  margin: 0.1in 0 0.15in;
}

.guide-content .flow-col {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0.4rem 0.55rem;
  display: flex;
  flex-direction: column;
}

.guide-content .flow-col.before,
.guide-content .col-before {
  background: rgba(220, 38, 38, 0.02);
}

.guide-content .flow-col.after,
.guide-content .col-after {
  background: rgba(5, 150, 105, 0.02);
}

.guide-content .flow-col h3 {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0 0 0.08in;
  padding-bottom: 0.05in;
  border-bottom: 2px solid var(--gray-200);
}

.guide-content .flow-col.before h3 {
  border-bottom-color: #fca5a5;
}

.guide-content .flow-col.after h3 {
  border-bottom-color: #86efac;
}

.guide-content .flow-steps {
  display: flex;
  flex-direction: column;
  gap: 0.04in;
}

.guide-content .flow-step {
  display: flex;
  align-items: center;
  gap: 0.08in;
}

.guide-content .flow-step-num {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gray-200);
  color: var(--gray-600);
  font-size: 0.55rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.guide-content .flow-col.after .flow-step-num {
  background: var(--primary-light);
  color: var(--primary);
}

.guide-content .flow-step-text {
  font-size: 0.65rem;
  color: var(--gray-700);
  line-height: 1.4;
}

.guide-content .flow-step-text strong {
  color: var(--primary);
}

.guide-content .flow-summary {
  margin-top: 0.08in;
  padding-top: 0.06in;
  border-top: 1px solid var(--gray-200);
  display: flex;
  gap: 0.06in;
  align-items: baseline;
}

.guide-content .flow-summary-label {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--gray-500);
}

.guide-content .flow-summary-val {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--gray-900);
}

.guide-content .flow-col.before .flow-summary-val {
  color: #dc2626;
}

.guide-content .flow-col.after .flow-summary-val {
  color: var(--success);
}

/* ════════════════════════════════════
   21. Timeline / Phases
   ════════════════════════════════════ */

.guide-content .impl-phases {
  display: flex;
  flex-direction: column;
  gap: 0.12in;
  margin-top: 0.1in;
}

.guide-content .impl-phase {
  padding-left: 0.15in;
  border-left: 3px solid var(--primary);
}

.guide-content .impl-phase.phase-2 {
  border-left-color: var(--accent);
}

.guide-content .impl-phase.phase-3 {
  border-left-color: var(--success);
}

.guide-content .impl-phase .guide-tag {
  margin-bottom: 0.02in;
  color: var(--primary);
}

.guide-content .impl-phase.phase-2 .guide-tag {
  color: var(--accent);
}

.guide-content .impl-phase.phase-3 .guide-tag {
  color: var(--success);
}

.guide-content .impl-phase h3 {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0 0 0.04in;
}

.guide-content .impl-phase ul {
  margin: 0;
  padding-left: 1.1em;
}

.guide-content .impl-phase li {
  font-size: 0.65rem;
  color: var(--gray-600);
  line-height: 1.5;
}

/* ════════════════════════════════════
   22. Key-Value Item Grid
   ════════════════════════════════════ */

.guide-content .compliance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.12in;
  margin-top: 0.1in;
}

.guide-content .compliance-item {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0.35rem 0;
  display: block;
  border-bottom: 1px solid var(--gray-100);
}

.guide-content .compliance-item h4 {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0 0 0.03in;
}

.guide-content .compliance-item p {
  font-size: 0.63rem;
  color: var(--gray-600);
  line-height: 1.45;
  margin: 0;
}

/* Section 23 — removed, consolidated into Section 14 (Comparison Panel) */

/* ════════════════════════════════════
   24. Flow Diagram + Vertical List
   ════════════════════════════════════ */

.guide-content .integ-diagram {
  display: flex;
  align-items: center;
  gap: 0.15in;
  padding: 0.2in 0;
}

.guide-content .integ-box {
  background: transparent;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  padding: 0.35rem 0.5rem;
  text-align: center;
  min-width: 0;
  flex: 1;
}

.guide-content .integ-box h4 {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.04rem;
}

.guide-content .integ-box p {
  font-size: 0.58rem;
  color: var(--gray-500);
  line-height: 1.35;
}

.guide-content .integ-box.center-box {
  background: linear-gradient(
    145deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  border-color: var(--primary-dark);
}

.guide-content .integ-box.center-box h4 {
  color: var(--white);
}

.guide-content .integ-box.center-box p {
  color: rgba(255, 255, 255, 0.8);
}

.guide-content .integ-box.center-box .integ-logo {
  height: 18px;
  filter: brightness(0) invert(1);
  margin-bottom: 0.08rem;
}

.guide-content .integ-arrow {
  text-align: center;
  color: var(--gray-300);
  font-size: 1rem;
  flex-shrink: 0;
}

.guide-content .integ-list {
  display: flex;
  flex-direction: column;
  gap: 0.08in;
  margin-top: 0.08in;
}

.guide-content .integ-item {
  padding-bottom: 0.08in;
  border-bottom: 1px solid var(--gray-200);
}

.guide-content .integ-item h4 {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.08in;
}

.guide-content .integ-item p {
  font-size: 0.65rem;
  color: var(--gray-600);
  line-height: 1.45;
  margin: 0.02in 0 0;
}

.guide-content .integ-item:last-child {
  border-bottom: none;
}

.guide-content .guide-tag.warning {
  background: #fef3c7;
  color: var(--warning);
}

.guide-content .guide-tag.success {
  background: var(--success-light);
  color: var(--success);
}

/* ════════════════════════════════════
   25. Data Table
   ════════════════════════════════════ */

.guide-content .roi-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.65rem;
  margin-top: 0.1in;
}

.guide-content .roi-table thead th {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.06in 0.1in;
  text-align: left;
  border-bottom: 2px solid var(--gray-200);
}

.guide-content .roi-table thead th.col-before {
  color: var(--gray-400);
}

.guide-content .roi-table thead th.col-after {
  color: var(--primary);
}

.guide-content .roi-table tbody td {
  padding: 0.05in 0.1in;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
  vertical-align: top;
}

.guide-content .roi-table tbody td:first-child {
  font-weight: 600;
  color: var(--gray-900);
}

.guide-content .roi-table .highlight-cell {
  color: var(--primary);
  font-weight: 600;
}

.guide-content .roi-table .savings-amount {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--success);
}

/* ════════════════════════════════════
   26. Call-to-Action Page
   ════════════════════════════════════ */

.guide-content .cta-page-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3rem 1.5rem;
  text-align: center;
}

.guide-content .cta-page-body h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.2;
  margin-bottom: 1rem;
  max-width: 80%;
}

.guide-content .cta-page-body .cta-sub {
  font-size: var(--text-body);
  color: var(--gray-500);
  margin-bottom: 2.5rem;
  max-width: 65%;
  line-height: 1.6;
}

.guide-content .cta-contact-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.guide-content .cta-contact-block span {
  font-size: var(--text-label);
  font-weight: 600;
  color: var(--primary);
}

.guide-content .cta-contact-block .contact-phone {
  color: var(--gray-500);
  font-weight: 500;
}

.guide-content .cta-contact-block .contact-url,
.guide-content .cta-contact-block .url-line {
  color: var(--gray-500);
  font-weight: 500;
}

/* CTA Steps */
.guide-content .cta-steps {
  display: flex;
  gap: 0.3in;
  margin-bottom: 0.45in;
}

.guide-content .cta-step {
  text-align: center;
  max-width: 2in;
}

.guide-content .cta-step-num {
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-caption);
  font-weight: 700;
  margin-bottom: 0.25rem;
  font-family: 'Fraunces', Georgia, serif;
}

.guide-content .cta-step h4 {
  font-size: var(--text-component-title);
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.25rem;
}

.guide-content .cta-step p {
  font-size: var(--text-source);
  color: var(--gray-500);
  line-height: 1.55;
}

/* ════════════════════════════════════
   27. Definition List (Glossary)
   ════════════════════════════════════ */

.guide-content .glossary-header {
  background: var(--gray-100);
  padding: 0.35in 0.65in 0.15in;
}

.guide-content .glossary-header h1 {
  font-family: var(--font-display);
  font-size: var(--text-section-title);
  font-weight: 700;
  color: var(--gray-900);
  margin: 0;
}

.guide-content .glossary-header p {
  font-size: var(--text-body);
  color: var(--gray-500);
  margin: 0.08in 0 0;
}

.guide-content .glossary-body {
  flex: 1;
  padding: 0.1in 0.65in 0.3in;
  columns: 2;
  column-gap: 0.3in;
}

.guide-content .glossary-entry {
  break-inside: avoid;
  margin: 0 0 0.12in;
  padding-bottom: 0.1in;
  border-bottom: 1px solid var(--gray-200);
}

.guide-content .glossary-entry dt {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0 0 0.03in;
}

.guide-content .glossary-entry dd {
  font-size: 0.68rem;
  color: var(--gray-600);
  line-height: 1.45;
  margin: 0;
}

/* ════════════════════════════════════
   28. Highlight Banner
   ════════════════════════════════════ */

.guide-content .proof-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.15in;
  background: var(--primary);
  color: white;
  border-radius: 10px;
  padding: 0.2in 0.25in;
  margin: 0.15in 0;
}

.guide-content .proof-banner-icon {
  flex-shrink: 0;
  margin-top: 0.02in;
}

.guide-content .proof-banner-icon svg {
  stroke: var(--success) !important;
}

.guide-content .proof-banner h3 {
  font-size: 0.78rem;
  font-weight: 700;
  color: white;
  margin: 0 0 0.04in;
}

.guide-content .proof-banner p {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.5;
  margin: 0;
}

/* ════════════════════════════════════
   Contact & Footer
   ════════════════════════════════════ */

.guide-content .contact-item {
  display: flex;
  gap: 0.2rem;
  padding: 0.15rem 0;
  font-size: 0.72rem;
  color: var(--gray-700);
}

/* Dark footer — last page bottom bar */
.guide-content .footer {
  background: var(--gray-900);
  color: var(--white);
  padding: 2rem 1.5rem;
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
}

.guide-content .footer-left h3 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.06rem;
}

.guide-content .footer-left p {
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.6);
}

.guide-content .footer-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.08rem;
}

.guide-content .footer-contact .contact-item {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.62rem;
  gap: 0.2rem;
}

.guide-content .footer-contact .contact-item svg {
  width: 12px;
  height: 12px;
  stroke: rgba(255, 255, 255, 0.5);
}

/* ════════════════════════════════════
   Screen-Only Overrides
   Hide print elements, dark bands,
   page continuation, TOC hover.
   ════════════════════════════════════ */

@media screen {
  /* Hide print-only elements */
  .guide-content .header,
  .guide-content .guide-footer,
  .guide-content .toc-page,
  .guide-content .cover-top,
  .guide-content .cover-meta .url,
  .guide-content .print-only-page {
    display: none;
  }

  /* Constrain cover content on wide screens */
  .guide-content .cover-body,
  .guide-content .cover-meta {
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  /* Page continuation — seamless flow across print page boundaries */
  .guide-content .page-continues .content-body {
    padding-bottom: 0;
  }

  .guide-content .page-continues .measure-list-2col .measure-item:last-child {
    border-bottom: 1px solid var(--gray-100);
  }

  .guide-content .page-continuation .content-body {
    padding-top: 0;
  }

  /* ── Results Highlight: dark background sections (02, 06) ── */
  .guide-content .results-highlight {
    background: var(--gray-900);
    position: relative;
  }

  .guide-content .results-highlight::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100%;
    background: var(--gray-900);
    z-index: -1;
  }

  .guide-content .content-header.results-highlight-header {
    background: var(--gray-900);
    position: relative;
    border-bottom-color: rgba(255, 255, 255, 1);
  }

  .guide-content .results-highlight-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100%;
    background: var(--gray-900);
    z-index: -1;
  }

  /* Dark section text colors */
  .guide-content .content-header.results-highlight-header .section-num {
    color: rgba(255, 255, 255, 0.5);
  }

  .guide-content .content-header.results-highlight-header h1 {
    color: var(--white);
  }

  .guide-content .results-highlight p,
  .guide-content .results-highlight .quote-text,
  .guide-content .results-highlight .big-number-note,
  .guide-content .results-highlight .breakdown-label,
  .guide-content .results-highlight .research-card p,
  .guide-content .results-highlight .research-source,
  .guide-content .results-highlight .research-source a,
  .guide-content .results-highlight .quote-attribution {
    color: rgba(255, 255, 255, 0.7);
  }

  .guide-content .results-highlight .big-number,
  .guide-content .results-highlight .breakdown-value,
  .guide-content .results-highlight .research-stat {
    color: var(--white);
  }

  .guide-content .results-highlight h2,
  .guide-content .results-highlight h3,
  .guide-content .results-highlight h4,
  .guide-content .results-highlight strong,
  .guide-content .results-highlight .research-card h4,
  .guide-content .results-highlight .quote-mark {
    color: var(--white);
  }

  .guide-content .results-highlight .quote-mark {
    opacity: 0.5;
  }

  .guide-content .results-highlight .research-card {
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }

  /* Research grid — 2 columns on web */
  .guide-content .results-highlight .research-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* ── TOC hover ── */
  .guide-content a.toc-item {
    transition: background 0.15s ease;
  }

  .guide-content a.toc-item:hover {
    background: var(--gray-100);
    border-radius: 0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
  }

  /* ════════════════════════════════════
     Dark Mode
     Override design tokens + targeted fixes
     ════════════════════════════════════ */

  .dark .guide-content {
    --gray-100: #1f2937;
    --gray-200: #374151;
    --gray-300: #4b5563;
    --gray-400: #9ca3af;
    --gray-500: #9ca3af;
    --gray-600: #d1d5db;
    --gray-700: #e5e7eb;
    --gray-800: #f3f4f6;
    --gray-900: #f9fafb;
    --white: #ffffff;
    --primary: #4d94ff;
    --primary-dark: #6aa8ff;
    --primary-light: rgba(77, 148, 255, 0.15);
    --accent: #38bdf8;
    --success: #34d399;
    --success-light: rgba(52, 211, 153, 0.15);
    --warning: #fbbf24;
  }

  /* Logo invert for dark mode (non-cover logos are dark by default) */
  .dark .guide-content .logo img {
    filter: brightness(0) invert(1);
  }

  /* TOC hover */
  .dark .guide-content a.toc-item:hover {
    background: var(--gray-100);
  }

  /* Info cards */
  .dark .guide-content .info-card {
    background: var(--gray-100);
  }

  /* Tier tag backgrounds */
  .dark .guide-content .cost-card.tier-visible .guide-tag {
    background: rgba(77, 148, 255, 0.15);
  }

  .dark .guide-content .cost-card.tier-hidden .guide-tag {
    background: rgba(251, 191, 36, 0.15);
  }

  .dark .guide-content .cost-card.tier-critical .guide-tag {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
  }

  /* Red/green text in dark mode needs brighter variants */
  .dark .guide-content .info-card .role-before,
  .dark .guide-content .flow-col.before .flow-summary-val {
    color: #f87171;
  }

  /* Hardcoded red (#dc2626) overrides */
  .dark .guide-content .cost-card.tier-critical .guide-tag {
    color: #f87171;
  }

  /* Before/after flow columns */
  .dark .guide-content .flow-col.before h3 {
    color: #f87171;
    border-bottom-color: rgba(248, 113, 113, 0.4);
  }

  .dark .guide-content .flow-col.after h3 {
    color: var(--success);
    border-bottom-color: rgba(52, 211, 153, 0.4);
  }

  .dark .guide-content .flow-col.before .flow-step-num {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
  }

  /* Callout/tag backgrounds */
  .dark .guide-content .tag-green {
    background: rgba(52, 211, 153, 0.15);
    color: var(--success);
  }

  .dark .guide-content .tag-blue {
    background: rgba(77, 148, 255, 0.15);
    color: var(--primary);
  }

  .dark .guide-content .tag-amber {
    background: rgba(251, 191, 36, 0.15);
    color: var(--warning);
  }

  /* Stat strip borders */
  .dark .guide-content .stat-strip-item,
  .dark .guide-content .stat-item {
    border-right-color: var(--gray-200);
  }

  /* Results highlight — must stay dark in dark mode (token flip would make it light) */
  .dark .guide-content .results-highlight,
  .dark .guide-content .results-highlight::before,
  .dark .guide-content .content-header.results-highlight-header,
  .dark .guide-content .results-highlight-header::before {
    background: #111827 !important;
  }

  /* Footer at bottom of guide — must stay dark */
  .dark .guide-content .footer {
    background: #111827;
  }

  /* Cite links */
  .dark .guide-content .cite {
    color: var(--primary);
  }

  /* Separator lines */
  .dark .guide-content .toc-item {
    border-bottom-color: var(--gray-200);
  }

  .dark .guide-content .guide-footer {
    border-top-color: var(--gray-200);
  }

  .dark .guide-content .header {
    border-bottom-color: var(--gray-200);
  }

  .dark .guide-content .content-header {
    border-bottom-color: var(--gray-200);
  }

  /* Measure list items */
  .dark .guide-content .measure-item {
    border-bottom-color: var(--gray-200);
  }

  .dark .guide-content .page-continues .measure-list-2col .measure-item:last-child {
    border-bottom-color: var(--gray-200);
  }

  /* Flow summary border */
  .dark .guide-content .flow-summary {
    border-top-color: var(--gray-200);
  }
}

/* ════════════════════════════════════
   Print Overrides
   Layout, pagination, and element
   visibility for 8.5×11" output.
   ════════════════════════════════════ */

@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Preserve PDF text-layer integrity for copy/paste.
     Chrome's print-to-PDF pipeline loses the ToUnicode CMAP on variable
     web fonts when ligatures or feature-settings are active. Turning them
     off keeps the PDF glyph sequence 1:1 with the source characters. */
  .guide-content,
  .guide-content * {
    font-variant-ligatures: none !important;
    font-feature-settings:
      'liga' 0,
      'clig' 0,
      'dlig' 0,
      'hlig' 0,
      'calt' 0 !important;
    -webkit-font-feature-settings:
      'liga' 0,
      'clig' 0,
      'dlig' 0,
      'hlig' 0,
      'calt' 0 !important;
    text-rendering: optimizeSpeed !important;
  }

  /* Catch-all: every element inside the guide gets Verdana for body in print.
     Headings override this rule below to use Georgia. Without this, any
     element hardcoding Inter or -apple-system bypasses --font-body and
     Chrome rasterizes it (San Francisco can't be embedded on macOS). */
  .guide-content,
  .guide-content *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) {
    font-family: Verdana, Geneva, Tahoma, sans-serif !important;
  }

  /* Force every hardcoded Fraunces reference to fall back to Georgia in print.
     Required because most stat numbers and section titles bypass the
     --font-display variable and hardcode the font stack inline. */
  .guide-content .stat-strip-value,
  .guide-content .stat-num,
  .guide-content .breakdown-value,
  .guide-content .research-stat,
  .guide-content .cover-body h1,
  .guide-content .toc-num,
  .guide-content .section-num,
  .guide-content .glossary-term,
  .guide-content .content-header h2,
  .guide-content .stat-grid-num,
  .guide-content .big-number-value,
  .guide-content h1,
  .guide-content h2,
  .guide-content h3,
  .guide-content h4,
  .guide-content h5,
  .guide-content h6 {
    font-family: Georgia, 'Times New Roman', Times, serif !important;
  }

  /* Named page rule is in global.css (@page guide) since it loads later.
     The .page elements use page: guide to opt in. */

  body:has(.guide-content) {
    height: auto !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    background: white !important;
  }

  /* Hide site navbar, footer, and non-guide content (incl. astro-island wrappers) */
  body:has(.guide-content) main > *:not(.guide-content),
  body:has(.guide-content) main > astro-island,
  body:has(.guide-content) main > astro-island > * {
    display: none !important;
  }

  .guide-content {
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    background: white !important;
    font-size: 16px !important;
    page: guide;
  }

  /* Restore paginated layout */
  .guide-content .page {
    width: 8.5in !important;
    height: 11in !important;
    max-width: none !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    page-break-after: always;
    page-break-inside: avoid;
    box-shadow: none !important;
    border-radius: 0 !important;
    border: none !important;
  }

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

  /* Show per-page headers and footers */
  .guide-content .header {
    display: flex !important;
    padding: 0.35in 0.65in 0.2rem !important;
    border-bottom: none !important;
  }

  /* Header logos — subtle, left-aligned with content */
  .guide-content .header .logo img {
    height: 16px !important;
    opacity: 0.35 !important;
  }

  .guide-content .guide-footer {
    display: flex !important;
    padding: 0.15in 0.65in !important;
    border-top: 1px solid #e5e7eb !important;
    font-family: Verdana, Geneva, Tahoma, sans-serif !important;
  }

  .guide-content .toc-page {
    display: block !important;
  }

  /* Print-scale section header */
  .guide-content .content-header .section-num {
    font-size: 0.65rem !important;
    margin-bottom: 0.1rem !important;
  }

  /* Print body text line-height */
  .guide-content .content-body p {
    line-height: 1.55 !important;
  }

  /* TOC print sizes */
  .guide-content .toc-header {
    padding: 0.5in 0.65in 0.25in !important;
  }

  .guide-content .toc-header h1 {
    font-size: 1.6rem !important;
  }

  .guide-content .toc-body {
    padding: 0 0.65in !important;
  }

  .guide-content .toc-item {
    padding: 0.55rem 0 !important;
  }

  .guide-content .toc-num {
    font-size: 0.7rem !important;
    width: 1.8rem !important;
  }

  .guide-content .toc-label {
    font-size: 0.88rem !important;
  }

  .guide-content .toc-desc {
    font-size: 0.72rem !important;
  }

  /* Cost cards */
  .guide-content .cost-grid {
    gap: 0.15in !important;
  }

  .guide-content .cost-card {
    padding: 0.45rem 0.6rem !important;
  }

  .guide-content .cost-card h3 {
    margin-bottom: 0.05rem !important;
  }

  .guide-content .guide-tag {
    font-size: 7.5pt !important;
    padding: 0.1rem 0.3rem !important;
    margin-bottom: 0.08rem !important;
  }

  /* Big number */
  .guide-content .big-number-section {
    padding: 0.4in 0.65in !important;
  }

  /* Quote */
  .guide-content .quote-section {
    padding: 0.35in 0.65in !important;
  }

  .guide-content .quote-text {
    font-size: 0.88rem !important;
    margin-bottom: 0.15rem !important;
  }

  .guide-content .quote-attribution {
    font-size: 0.68rem !important;
  }

  /* Comparison panel */
  .guide-content .comparison-grid {
    gap: 0.2in !important;
  }

  .guide-content .comparison-col {
    padding: 0.4rem 0.55rem !important;
  }

  .guide-content .comparison-col h4,
  .guide-content .comparison-col h3 {
    font-size: 10pt !important;
    margin-bottom: 0.12rem !important;
  }

  .guide-content .comparison-col li {
    font-size: 9.5pt !important;
    line-height: 1.45 !important;
    padding: 0.05rem 0 !important;
  }

  /* Audit */
  .guide-content .audit-grid {
    gap: 0.15in !important;
  }

  .guide-content .audit-card {
    padding: 0.4rem 0.55rem !important;
    gap: 0.2rem !important;
  }

  .guide-content .audit-card strong {
    font-size: 10pt !important;
    margin-bottom: 0.03rem !important;
  }

  .guide-content .audit-card p {
    font-size: 9.5pt !important;
    line-height: 1.45 !important;
  }

  /* Measure list */
  .guide-content .measure-item-name {
    font-size: 8.5pt !important;
  }

  .guide-content .measure-item-formula {
    font-size: 7pt !important;
  }

  .guide-content .measure-item-desc {
    font-size: 8pt !important;
    line-height: 1.35 !important;
    margin-bottom: 0.04rem !important;
  }

  .guide-content .measure-item-example {
    font-size: 7pt !important;
  }

  .guide-content .measure-list-2col .measure-item {
    gap: 0.25in !important;
    padding: 0.15rem 0 !important;
  }

  .guide-content .measure-list-2col .measure-item-name {
    font-size: 8.5pt !important;
    margin-bottom: 0.02rem !important;
  }

  .guide-content .measure-list-2col .measure-item-desc {
    font-size: 7.5pt !important;
  }

  .guide-content .measure-list-2col .measure-item-formula {
    font-size: 7pt !important;
    margin-bottom: 0.04rem !important;
  }

  .guide-content .measure-list-2col .measure-item-example {
    font-size: 7pt !important;
  }

  /* #6: Research grid — 2 columns in print */
  .guide-content .research-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.15in !important;
  }

  .guide-content .research-card {
    padding: 0.4rem 0.45rem !important;
  }

  .guide-content .research-card h4 {
    font-size: 9.5pt !important;
    margin-bottom: 0.04rem !important;
  }

  .guide-content .research-card p {
    font-size: 9pt !important;
    line-height: 1.4 !important;
    margin-bottom: 0.06rem !important;
  }

  .guide-content .research-source {
    font-size: 7.5pt !important;
  }

  /* #7: Sources — 1pt smaller than body */
  .guide-content .sources-section {
    font-size: 0.875rem !important;
    line-height: 1.35 !important;
  }

  .guide-content .sources-section h3 {
    font-size: 0.95rem !important;
    margin-top: 0.7rem !important;
    margin-bottom: 0.25rem !important;
    padding-top: 0.4rem !important;
    border-top: 1px solid #e5e7eb !important;
  }

  .guide-content .sources-section h3:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
    border-top: none !important;
  }

  .guide-content .sources-section ol {
    list-style-type: decimal !important;
    padding-left: 1.2rem !important;
    margin-bottom: 0.35rem !important;
  }

  .guide-content .sources-section li {
    margin-bottom: 0.02rem !important;
    font-size: 7.5pt !important;
  }

  /* CTA page */
  .guide-content .page:has(.cta-page-body) {
    min-height: 11in !important;
  }

  .guide-content .cta-page-body {
    padding: 0.5in 0.65in !important;
  }

  .guide-content .cta-page-body h1 {
    font-size: 1.8rem !important;
    margin-bottom: 0.3rem !important;
  }

  .guide-content .cta-page-body .cta-sub {
    font-size: 0.88rem !important;
    margin-bottom: 0.45in !important;
  }

  .guide-content .cta-step h4 {
    font-size: 0.75rem !important;
    margin-bottom: 0.08rem !important;
  }

  .guide-content .cta-step p {
    font-size: 0.65rem !important;
  }

  /* Restore cover elements hidden on screen */
  .guide-content .cover-top {
    display: block !important;
  }

  .guide-content .cover-meta .url {
    display: inline !important;
  }

  .guide-content .print-only-page {
    display: flex !important;
  }

  /* #1: Cover — full page, NO guide-footer (cover has none in HTML) */
  .guide-content .cover {
    background: linear-gradient(
      145deg,
      #0066cc 0%,
      #004999 60%,
      #002b5c 100%
    ) !important;
    color: #fff !important;
    height: 11in !important;
    min-height: 11in !important;
    max-width: none !important;
    justify-content: space-between !important;
  }

  .guide-content .cover::before {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    width: 55% !important;
    height: 100% !important;
    background: radial-gradient(
      ellipse at top right,
      rgba(0, 163, 224, 0.15) 0%,
      transparent 70%
    ) !important;
    pointer-events: none !important;
  }

  /* #2: Cover logo — left-aligned with title */
  .guide-content .cover-logo img {
    height: 22px !important;
    filter: brightness(0) invert(1) !important;
  }

  .guide-content .cover-top {
    padding: 0.5in 0.65in 0 !important;
    text-align: left !important;
  }

  .guide-content .cover-logo {
    display: flex !important;
    justify-content: flex-start !important;
  }

  .guide-content .cover-body h1 {
    color: #fff !important;
    font-size: 2.4rem !important;
  }

  .guide-content .cover-body .subtitle {
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 1rem !important;
  }

  /* #3: Cover meta — stays on title page */
  .guide-content .cover-meta {
    padding: 0 0.65in 0.5in !important;
  }

  .guide-content .cover-meta .audience-tag {
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
    background: rgba(255, 255, 255, 0.2) !important;
    font-weight: 500 !important;
  }

  .guide-content .cover-meta .url {
    color: rgba(255, 255, 255, 0.6) !important;
  }

  /* Remove all shadows */
  .guide-content .page,
  .guide-content .info-card,
  .guide-content .cost-card,
  .guide-content .audit-card,
  .guide-content .research-card,
  .guide-content .comparison-col,
  .guide-content .integ-box {
    box-shadow: none !important;
  }

  .guide-content .info-card,
  .guide-content .cost-card,
  .guide-content .audit-card,
  .guide-content .research-card,
  .guide-content .comparison-col,
  .guide-content .ot-card {
    border: none !important;
    border-radius: 0 !important;
  }

  /* Branded integration box */
  .guide-content .integ-box.center-box {
    background: #0066cc !important;
    border-color: #004999 !important;
  }

  .guide-content .integ-box.center-box h4,
  .guide-content .integ-box.center-box p {
    color: #fff !important;
  }

  /* ── Print color preservation ──
     Restore all guide-specific colors that the standalone HTML shows */

  /* Headers and footers */
  .guide-content .tagline {
    color: #6b7280 !important;
  }

  .guide-content .guide-footer p {
    color: #9ca3af !important;
    font-size: 0.6rem !important;
    font-family: Verdana, Geneva, Tahoma, sans-serif !important;
  }

  .guide-content .guide-footer .page-num {
    color: #6b7280 !important;
    font-size: 0.6rem !important;
    font-family: Verdana, Geneva, Tahoma, sans-serif !important;
  }

  .guide-content .logo img {
    filter: none !important;
  }

  /* Section headers */
  .guide-content .content-header {
    border-bottom: 2px solid #0066cc !important;
  }

  .guide-content .content-header .section-num {
    color: #0066cc !important;
  }

  .guide-content .content-header h1 {
    color: #111827 !important;
  }

  /* Body text */
  .guide-content .content-body p {
    color: #374151 !important;
  }

  .guide-content .content-note {
    color: #374151 !important;
    background: #f8fafc !important;
    border-left: 3px solid #0066cc !important;
    padding: 0.55rem 0.75rem !important;
    border-radius: 0 3px 3px 0 !important;
    font-style: italic !important;
  }

  /* Stat strip */
  .guide-content .stat-strip-value {
    color: #0066cc !important;
  }

  .guide-content .stat-strip-label {
    color: #6b7280 !important;
  }

  .guide-content .stat-strip-source,
  .guide-content .stat-strip-source a {
    color: #9ca3af !important;
  }

  /* Cost cards */
  .guide-content .cost-card h3 {
    color: #111827 !important;
  }

  .guide-content .cost-card p {
    color: #4b5563 !important;
  }

  .guide-content .cost-card.tier-visible .guide-tag {
    background: rgba(0, 102, 204, 0.1) !important;
    color: #0066cc !important;
  }

  .guide-content .cost-card.tier-hidden .guide-tag {
    background: rgba(217, 119, 6, 0.1) !important;
    color: #d97706 !important;
  }

  .guide-content .cost-card.tier-critical .guide-tag {
    background: rgba(220, 38, 38, 0.1) !important;
    color: #dc2626 !important;
  }

  /* Big number */
  .guide-content .big-number {
    color: #0066cc !important;
  }

  .guide-content .big-number-note {
    color: #4b5563 !important;
  }

  .guide-content .breakdown-value {
    color: #0066cc !important;
  }

  .guide-content .breakdown-label {
    color: #4b5563 !important;
  }

  /* Quote */
  .guide-content .quote-mark {
    color: #0066cc !important;
    opacity: 0.3 !important;
  }

  .guide-content .quote-text {
    color: #111827 !important;
  }

  .guide-content .quote-attribution {
    color: #6b7280 !important;
  }

  /* Comparison panel */
  .guide-content .comparison-col.negative {
    background: rgba(220, 38, 38, 0.02) !important;
  }

  .guide-content .comparison-col.positive {
    background: rgba(5, 150, 105, 0.02) !important;
  }

  .guide-content .comparison-col.primary {
    background: rgba(0, 102, 204, 0.03) !important;
  }

  .guide-content .comparison-col.negative h4,
  .guide-content .comparison-col.negative h3 {
    color: #dc2626 !important;
  }

  .guide-content .comparison-col.positive h4,
  .guide-content .comparison-col.positive h3 {
    color: #059669 !important;
  }

  .guide-content .comparison-col.primary h4,
  .guide-content .comparison-col.primary h3 {
    color: #0066cc !important;
  }

  .guide-content .comparison-col li {
    color: #374151 !important;
  }

  /* Audit */
  .guide-content .audit-num {
    color: #0066cc !important;
  }

  .guide-content .audit-card strong {
    color: #111827 !important;
  }

  .guide-content .audit-card p {
    color: #4b5563 !important;
  }

  /* Proof banner */
  .guide-content .proof-banner {
    background: #0066cc !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .guide-content .proof-banner h3 {
    color: #fff !important;
  }

  .guide-content .proof-banner p {
    color: rgba(255, 255, 255, 0.9) !important;
  }

  .guide-content .proof-banner-icon svg {
    stroke: #fff !important;
  }

  /* Measure list */
  .guide-content .measure-item-name {
    color: #111827 !important;
  }

  .guide-content .measure-item-formula {
    color: #6b7280 !important;
  }

  .guide-content .measure-item-desc {
    color: #4b5563 !important;
  }

  .guide-content .measure-item-example {
    color: #0066cc !important;
  }

  /* Research grid */
  .guide-content .research-stat {
    color: #0066cc !important;
  }

  .guide-content .research-card h4 {
    color: #111827 !important;
  }

  .guide-content .research-card p {
    color: #4b5563 !important;
  }

  .guide-content .research-source,
  .guide-content .research-source a {
    color: #6b7280 !important;
  }

  .guide-content .research-card {
    border-bottom: 1px solid #f3f4f6 !important;
  }

  /* Sources */
  .guide-content .sources-section {
    color: #374151 !important;
  }

  .guide-content .sources-section h3 {
    color: #111827 !important;
  }

  .guide-content .sources-section a {
    color: #111827 !important;
    text-decoration: none !important;
  }

  /* TOC */
  .guide-content .toc-header h1 {
    color: #111827 !important;
  }

  .guide-content .toc-num {
    color: #0066cc !important;
  }

  .guide-content .toc-label {
    color: #111827 !important;
  }

  .guide-content .toc-desc {
    color: #6b7280 !important;
  }

  .guide-content .toc-page {
    color: #6b7280 !important;
  }

  .guide-content .toc-item {
    border-bottom: 1px solid #f3f4f6 !important;
  }

  /* CTA page */
  .guide-content .cta-page-body h1 {
    color: #111827 !important;
  }

  .guide-content .cta-page-body .cta-sub {
    color: #6b7280 !important;
  }

  .guide-content .cta-contact-block span {
    color: #0066cc !important;
  }

  .guide-content .cta-contact-block .contact-phone,
  .guide-content .cta-contact-block .contact-url {
    color: #6b7280 !important;
  }

  .guide-content .cta-step-num {
    background: #0066cc !important;
    color: #fff !important;
  }

  .guide-content .cta-step h4 {
    color: #111827 !important;
  }

  .guide-content .cta-step p {
    color: #6b7280 !important;
  }

  /* Cite links */
  .guide-content .cite {
    color: #0066cc !important;
  }

  /* Dark footer — full bleed on last page */
  .guide-content .footer {
    background: #111827 !important;
    color: #fff !important;
    padding: 0.4in 0.65in !important;
    margin-top: auto !important;
    max-width: none !important;
    width: 8.5in !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .guide-content .footer .footer-logo {
    height: 22px !important;
    filter: brightness(0) invert(1) !important;
    margin-bottom: 0.15in !important;
  }

  .guide-content .footer h3,
  .guide-content .footer p,
  .guide-content .footer .contact-item {
    color: #fff !important;
  }

  .guide-content .footer-left p {
    color: rgba(255, 255, 255, 0.6) !important;
  }

  .guide-content .footer-contact .contact-item {
    color: rgba(255, 255, 255, 0.7) !important;
  }

  .guide-content .footer-contact .contact-item svg {
    stroke: rgba(255, 255, 255, 0.5) !important;
  }
}

/* ════════════════════════════════════
   Mobile Responsive Overrides
   Stack grids to single columns on small screens.
   ════════════════════════════════════ */
@media screen and (max-width: 768px) {
  /* 1. Add padding above title on cover */
  .guide-content .cover-body {
    padding-top: 2rem;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .guide-content .cover-body h1 {
    max-width: 100%;
  }

  .guide-content .cover-body .subtitle {
    max-width: 100%;
  }

  .guide-content .cover-meta {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  /* 2. Glossary — single column */
  .guide-content .glossary-body {
    columns: 1;
  }

  /* 3. Stat strip — wrap to 2 per row on mobile (was grid, now flex) */
  .guide-content .stat-strip {
    flex-wrap: wrap;
    justify-content: center;
  }

  .guide-content .stat-strip-item,
  .guide-content .stat-item {
    flex: 1 1 45%;
    min-width: 140px;
    max-width: none;
  }

  .guide-content .stat-strip-item:nth-child(2),
  .guide-content .stat-item:nth-child(2) {
    border-right: none;
  }

  /* 4. Audit grid — single column */
  .guide-content .audit-grid {
    grid-template-columns: 1fr;
  }

  /* 5. Flow comparison (before/after) — single column */
  .guide-content .flow-comparison {
    grid-template-columns: 1fr;
  }

  /* 6 & 7. Card grids — single column (including cols-3) */
  .guide-content .card-grid,
  .guide-content .card-grid.cols-3 {
    grid-template-columns: 1fr;
  }

  /* 8. Comparison grid — single column */
  .guide-content .comparison-grid {
    grid-template-columns: 1fr;
  }

  /* 9. Compliance grid — single column */
  .guide-content .compliance-grid {
    grid-template-columns: 1fr;
  }

  /* 10. Integration diagram (How data flows) — vertical */
  .guide-content .integ-diagram {
    flex-direction: column;
  }

  .guide-content .integ-arrow {
    transform: rotate(90deg);
  }

  /* 11. Cost grid — single column */
  .guide-content .cost-grid {
    grid-template-columns: 1fr;
  }

  /* 12. Measure list 2-col — stack to single column */
  .guide-content .measure-list-2col .measure-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  /* 13. Research grid — single column */
  .guide-content .research-grid,
  .guide-content .results-highlight .research-grid {
    grid-template-columns: 1fr;
  }

  /* 14. Big number — scale down for mobile */
  .guide-content .big-number {
    font-size: 2.75rem;
  }

  /* 15. Breakdown items — 2 columns instead of 3, smaller text */
  .guide-content .breakdown-item {
    width: calc(50% - 0.06in);
  }

  .guide-content .breakdown-value {
    font-size: 1.5rem;
  }

  /* 16. Stat strip values — scale down */
  .guide-content .stat-strip-value,
  .guide-content .stat-value {
    font-size: 1.5rem;
  }

  /* 17. Footer — stack vertically */
  .guide-content .footer {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }

  .guide-content .footer-contact {
    align-items: center;
  }

  /* 18. TOC — tighter padding */
  .guide-content .toc-header {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .guide-content .toc-body {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  /* 19. Quote section — less padding */
  .guide-content .quote-section {
    padding: 1.5rem 1.25rem;
  }

  /* 20. Why grid — single column */
  .guide-content .why-grid {
    grid-template-columns: 1fr;
  }

  /* General padding adjustments */
  .guide-content .content-body {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .guide-content .content-header {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .guide-content .glossary-header {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .guide-content .glossary-body {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  /* Big number section — less padding */
  .guide-content .big-number-section {
    padding: 1.5rem 1.25rem;
  }
}
