/*
 * Alberta Foundation Repair — Article Design System
 * ===================================================
 * Philosophy: Goethe Color Psychology + BioGeometry Sacred Mathematics
 * 
 * GOETHE CUSTOMER JOURNEY ARC (down the page):
 *   Phase 1 — GROUNDING  : Blue  (#002D5A) → Calms fear, establishes trust
 *   Phase 2 — CLARITY    : Gold  (#C48F0A) → Illuminates understanding
 *   Phase 3 — RESOLUTION : Green (#2E7D5E) → Healing, "there is a solution"
 *   Phase 4 — ACTION     : Orange(#F05A00) → Enthusiasm, energy, conversion
 *
 * SACRED MATHEMATICS:
 *   φ (golden ratio)   = 1.618
 *   φ² (phi squared)   = 2.618
 *   Golden angle       = 137.5° (logarithmic spiral, φ-based)
 *   BioGeometry Modulor: 16, 19, 28, 34, 43, 54, 68, 72, 83, 89, 99
 *   Fibonacci spacing  : 5, 8, 13, 21, 34, 55, 89, 144
 *
 * TYPOGRAPHY:
 *   Line height: φ = 1.618 (golden ratio — optimal readability)
 *   Type scale : musical fourth intervals × 1.333
 *   Gradient angle: 137.5° (the exact golden angle from nature)
 */

/* ============================================================
   CSS CUSTOM PROPERTIES — THE FULL SYSTEM
   ============================================================ */

:root {
  /* Brand Colors */
  --afr-navy:        #002D5A;   /* Primary — Goethe: trust, depth, calming */
  --afr-navy-mid:    #1B4E7A;   /* Lighter navy variant */
  --afr-navy-light:  #234E7A20; /* Navy at 12% opacity — subtle tints */
  --afr-orange:      #F05A00;   /* Primary action — Goethe: enthusiasm, warmth */
  --afr-orange-deep: #B84500;   /* Hover/dark orange */
  --afr-orange-soft: #F05A0015; /* Orange at 8% opacity */

  /* Goethe Palette — Phase Colors */
  --afr-gold:        #C48F0A;   /* Phase 2 — Clarity, solar intelligence */
  --afr-gold-light:  #C48F0A18; /* Gold at 10% opacity */
  --afr-gold-warm:   #F5C842;   /* Bright gold for highlights */
  --afr-green:       #2E7D5E;   /* Phase 3 — Healing, resolution */
  --afr-green-light: #2E7D5E15; /* Green at 8% opacity */
  --afr-green-bright:#3DAA7E;   /* Brighter green for accents */

  /* Neutrals — Warm whites to match AFR's professional tone */
  --afr-white:       #FFFFFF;
  --afr-cream:       #FEFAF4;   /* Warm white — Goethe: openness, receptivity */
  --afr-pearl:       #F2EDE5;   /* Alt background — warm pearl */
  --afr-sand:        #DDD8D0;   /* Border color */
  --afr-stone:       #7A7570;   /* Muted text */
  --afr-charcoal:    #1A1A1A;   /* Body text */

  /* Typography — Golden Ratio Scale */
  --font-heading:    'Montserrat', 'Inter', sans-serif;
  --font-body:       'Inter', 'Segoe UI', sans-serif;
  --line-body:       1.618;     /* φ — golden ratio line height */
  --line-heading:    1.25;      /* Tight for headings */
  --line-relaxed:    1.75;      /* Lists and callouts */

  /* Type Scale — Musical Fourth × 1.333 */
  --text-xs:   0.75rem;     /* 12px */
  --text-sm:   0.875rem;    /* 14px */
  --text-base: 1rem;        /* 16px */
  --text-lg:   1.125rem;    /* 18px */
  --text-xl:   1.333rem;    /* 21px — golden fourth */
  --text-2xl:  1.618rem;    /* 26px — φ */
  --text-3xl:  2rem;        /* 32px */
  --text-4xl:  2.618rem;    /* 42px — φ² */

  /* Fibonacci Spacing Scale (px) */
  --space-5:   5px;
  --space-8:   8px;
  --space-13:  13px;
  --space-21:  21px;
  --space-34:  34px;
  --space-55:  55px;
  --space-89:  89px;
  --space-144: 144px;

  /* BioGeometry Modulor Spacing (px) — harmonic proportions */
  --bg-16:  16px;
  --bg-19:  19px;
  --bg-28:  28px;
  --bg-34:  34px;
  --bg-43:  43px;
  --bg-54:  54px;
  --bg-68:  68px;
  --bg-83:  83px;
  --bg-89:  89px;
  --bg-99:  99px;

  /* Border Radii — Fibonacci */
  --radius-sm: 5px;
  --radius-md: 8px;
  --radius-lg: 13px;
  --radius-xl: 21px;

  /* Golden Angle — used in gradients for sacred geometry harmony */
  --golden-angle: 137.5deg;
  --golden-angle-alt: 222.5deg; /* 360 - 137.5 = complement */

  /* Shadows — hierarchical depth */
  --shadow-sm:  0 2px 8px rgba(0, 45, 90, 0.08);
  --shadow-md:  0 4px 16px rgba(0, 45, 90, 0.12);
  --shadow-lg:  0 8px 34px rgba(0, 45, 90, 0.16);
  --shadow-glow-orange: 0 4px 21px rgba(240, 90, 0, 0.25);
  --shadow-glow-gold:   0 4px 21px rgba(196, 143, 10, 0.20);
}

/* ============================================================
   BASE ARTICLE TYPOGRAPHY
   ============================================================ */

.afr-article-body,
.entry-content,
article .post-content {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--line-body); /* φ = 1.618 */
  color: var(--afr-charcoal);
  max-width: 780px;
}

.afr-article-body h2,
.entry-content h2 {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 800;
  line-height: var(--line-heading);
  color: var(--afr-navy);
  margin-top: var(--space-55);
  margin-bottom: var(--space-21);
  letter-spacing: -0.02em;
}

.afr-article-body h3,
.entry-content h3 {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: var(--line-heading);
  color: var(--afr-navy);
  margin-top: var(--space-34);
  margin-bottom: var(--space-13);
}

.afr-article-body p,
.entry-content p {
  margin-bottom: var(--space-21);
  line-height: var(--line-body);
}

.afr-article-body a {
  color: var(--afr-navy-mid);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.afr-article-body a:hover {
  color: var(--afr-orange);
}

/* ============================================================
   PHASE 1: GROUNDING — BLUE (Quick Answer Box)
   Goethe: Blue = calming, depth, trust
   Homeowner arrives scared. Blue grounds and reassures.
   ============================================================ */

.afr-quick-answer {
  background: linear-gradient(var(--golden-angle), #FEFCFA 0%, #EEF4FB 100%);
  border-left: 5px solid var(--afr-navy);
  border-radius: var(--radius-md);
  padding: var(--bg-28) var(--bg-34);
  margin-bottom: var(--space-34);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.afr-quick-answer::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: var(--bg-89);
  height: var(--bg-89);
  background: radial-gradient(circle at center,
    rgba(0, 45, 90, 0.06) 0%,
    transparent 70%);
  border-radius: 50%;
}

.afr-quick-answer p {
  font-size: var(--text-lg);
  line-height: var(--line-relaxed);
  color: var(--afr-charcoal);
  margin: 0;
}

.afr-quick-answer strong {
  color: var(--afr-navy);
  font-weight: 700;
}

/* ============================================================
   TABLE OF CONTENTS
   Functional, clean — respects the reader's time
   ============================================================ */

.afr-toc {
  background: var(--afr-cream);
  border: 1px solid var(--afr-sand);
  border-radius: var(--radius-lg);
  padding: var(--bg-28) var(--bg-34);
  margin-bottom: var(--space-34);
  box-shadow: var(--shadow-sm);
}

.afr-toc h3 {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--afr-stone);
  margin: 0 0 var(--space-13) 0;
}

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

.afr-toc li {
  border-bottom: 1px solid var(--afr-sand);
  padding: var(--space-8) 0;
}

.afr-toc li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.afr-toc a {
  color: var(--afr-navy-mid);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: var(--space-8);
  transition: color 0.2s ease, transform 0.2s ease;
}

.afr-toc a::before {
  content: '';
  display: inline-block;
  width: var(--space-5);
  height: var(--space-5);
  background: var(--afr-orange);
  border-radius: 50%;
  flex-shrink: 0;
}

.afr-toc a:hover {
  color: var(--afr-orange);
  transform: translateX(var(--space-5));
}

/* ============================================================
   PHASE 1 (continued): GROUNDING — Edmonton Context Box
   Blue family — local relevance anchors trust
   ============================================================ */

.afr-edmonton-box {
  background: linear-gradient(var(--golden-angle),
    rgba(0, 45, 90, 0.04) 0%,
    rgba(27, 78, 122, 0.07) 100%);
  border-left: 4px solid var(--afr-navy-mid);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--bg-28) var(--bg-34);
  margin: var(--space-34) 0;
  position: relative;
}

.afr-edmonton-box::after {
  content: 'Edmonton';
  position: absolute;
  top: var(--bg-16);
  right: var(--bg-19);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--afr-navy);
  opacity: 0.25;
}

.afr-edmonton-box h3 {
  color: var(--afr-navy);
  font-size: var(--text-lg);
  margin: 0 0 var(--space-13) 0;
}

.afr-edmonton-box p:last-child {
  margin-bottom: 0;
}

/* ============================================================
   PHASE 2: CLARITY — GOLD (Technical Box)
   Goethe: Yellow/Gold = intelligence, clarity, solar energy
   "Now you understand what is happening"
   ============================================================ */

.afr-technical-box {
  background: linear-gradient(var(--golden-angle),
    #FFFBF0 0%,
    #FFF5D6 100%);
  border: 1px solid rgba(196, 143, 10, 0.25);
  border-top: 3px solid var(--afr-gold);
  border-radius: var(--radius-md);
  padding: var(--bg-28) var(--bg-34);
  margin: var(--space-34) 0;
  box-shadow: var(--shadow-glow-gold);
  position: relative;
  overflow: hidden;
}

.afr-technical-box::before {
  content: '';
  position: absolute;
  bottom: -var(--bg-43);
  right: -var(--bg-43);
  width: var(--bg-99);
  height: var(--bg-99);
  background: radial-gradient(circle,
    rgba(196, 143, 10, 0.08) 0%,
    transparent 70%);
  border-radius: 50%;
}

.afr-technical-box h3 {
  color: #7A5800;
  font-size: var(--text-lg);
  margin: 0 0 var(--space-13) 0;
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.afr-technical-box h3::before {
  content: '⚙';
  font-size: 1.2em;
  opacity: 0.7;
}

.afr-technical-box p:last-child {
  margin-bottom: 0;
}

/* ============================================================
   PHASE 3: RESOLUTION — GREEN (Tip/Guide Boxes)
   Goethe: Green = healing, balance, useful
   "There is a solution to your problem"
   ============================================================ */

.afr-tip-box {
  background: linear-gradient(var(--golden-angle),
    rgba(46, 125, 94, 0.04) 0%,
    rgba(61, 170, 126, 0.08) 100%);
  border-left: 4px solid var(--afr-green);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--bg-28) var(--bg-34);
  margin: var(--space-34) 0;
}

.afr-tip-box h3 {
  color: var(--afr-green);
  font-size: var(--text-lg);
  margin: 0 0 var(--space-13) 0;
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.afr-tip-box h3::before {
  content: '✓';
  font-size: 1em;
  font-weight: 900;
}

.afr-tip-box p:last-child,
.afr-tip-box ul:last-child {
  margin-bottom: 0;
}

.afr-guide-box {
  background: linear-gradient(var(--golden-angle),
    #F2FAF7 0%,
    #E8F5EF 100%);
  border: 1px solid rgba(46, 125, 94, 0.2);
  border-radius: var(--radius-lg);
  padding: var(--bg-28) var(--bg-34);
  margin: var(--space-34) 0;
}

.afr-guide-box h3 {
  color: var(--afr-green);
  font-size: var(--text-lg);
  margin: 0 0 var(--space-13) 0;
}

.afr-guide-box ul {
  padding-left: var(--space-21);
  line-height: var(--line-relaxed);
  margin-bottom: 0;
}

.afr-guide-box li {
  margin-bottom: var(--space-8);
}

.afr-guide-box li:last-child {
  margin-bottom: 0;
}

/* ============================================================
   PHASE 4: ACTION — ORANGE (Expert Quote + Warning + CTA)
   Goethe: Orange = enthusiasm, warmth, energy
   Brand color drives final conversion
   ============================================================ */

.afr-expert-quote {
  background: linear-gradient(var(--golden-angle),
    var(--afr-navy) 0%,
    #003A73 100%);
  border-left: 5px solid var(--afr-orange);
  border-radius: var(--radius-md);
  padding: var(--bg-28) var(--bg-34);
  margin: var(--space-34) 0;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

/* Golden angle spiral pattern — sacred geometry background */
.afr-expert-quote::before {
  content: '';
  position: absolute;
  top: -var(--bg-34);
  right: -var(--bg-34);
  width: var(--bg-99);
  height: var(--bg-99);
  border: 2px solid rgba(240, 90, 0, 0.15);
  border-radius: 50%;
}

.afr-expert-quote::after {
  content: '"';
  position: absolute;
  bottom: -10px;
  right: var(--bg-28);
  font-size: 120px;
  line-height: 1;
  color: rgba(240, 90, 0, 0.12);
  font-family: Georgia, serif;
  font-weight: 900;
}

.afr-expert-quote p {
  color: #FFFFFF;
  font-size: var(--text-lg);
  line-height: var(--line-relaxed);
  margin: 0;
  position: relative;
  z-index: 1;
}

.afr-expert-quote strong {
  color: var(--afr-orange);
  font-weight: 700;
}

/* Warning Box — Orange signal (Phase 4 energy) */
.afr-warning-box {
  background: linear-gradient(var(--golden-angle),
    rgba(240, 90, 0, 0.05) 0%,
    rgba(240, 90, 0, 0.10) 100%);
  border: 1px solid rgba(240, 90, 0, 0.30);
  border-top: 3px solid var(--afr-orange);
  border-radius: var(--radius-md);
  padding: var(--bg-28) var(--bg-34);
  margin: var(--space-34) 0;
}

.afr-warning-box h3 {
  color: var(--afr-orange-deep);
  font-size: var(--text-lg);
  margin: 0 0 var(--space-13) 0;
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.afr-warning-box h3::before {
  content: '⚠';
  font-size: 1.1em;
}

.afr-warning-box p:last-child {
  margin-bottom: 0;
}

/* ============================================================
   FAQ SECTION
   ============================================================ */

.afr-faq-section {
  margin: var(--space-55) 0;
}

.afr-faq-section > h2 {
  font-size: var(--text-3xl);
  color: var(--afr-navy);
  margin-bottom: var(--space-34);
}

.afr-faq-item {
  border-bottom: 1px solid var(--afr-sand);
  padding: var(--space-21) 0;
}

.afr-faq-item:last-child {
  border-bottom: none;
}

.afr-faq-item h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--afr-navy);
  margin: 0 0 var(--space-13) 0;
  line-height: var(--line-heading);
  padding-left: var(--bg-28);
  position: relative;
}

.afr-faq-item h3::before {
  content: 'Q';
  position: absolute;
  left: 0;
  top: 0;
  font-size: var(--text-xs);
  font-weight: 900;
  color: var(--afr-orange);
  letter-spacing: 0.05em;
  margin-top: 2px;
}

.afr-faq-item p {
  font-size: var(--text-base);
  line-height: var(--line-body);
  color: var(--afr-charcoal);
  margin: 0;
  padding-left: var(--bg-28);
}

/* ============================================================
   SOURCES / CITATIONS
   ============================================================ */

.afr-sources {
  background: var(--afr-pearl);
  border-radius: var(--radius-lg);
  padding: var(--bg-28) var(--bg-34);
  margin: var(--space-34) 0;
}

.afr-sources h2 {
  font-size: var(--text-xl);
  color: var(--afr-navy);
  margin: 0 0 var(--space-21) 0;
}

.afr-sources ol {
  padding-left: var(--space-21);
  margin: 0;
}

.afr-sources li {
  font-size: var(--text-sm);
  color: var(--afr-stone);
  line-height: var(--line-relaxed);
  margin-bottom: var(--space-8);
}

.afr-sources a {
  color: var(--afr-navy-mid);
  word-break: break-all;
}

/* ============================================================
   CTA SECTION — Full Phase 4 Energy (Orange)
   Sacred geometry gradient at golden angle
   ============================================================ */

.afr-cta-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-13);
  margin-top: var(--space-21);
  align-items: center;
}

.afr-cta-btn {
  display: inline-block;
  padding: var(--bg-16) var(--bg-43);
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.afr-cta-primary {
  background: linear-gradient(var(--golden-angle), var(--afr-orange) 0%, #E85200 100%);
  color: #FFFFFF;
  box-shadow: var(--shadow-glow-orange);
  border: none;
}

.afr-cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 34px rgba(240, 90, 0, 0.40);
  color: #FFFFFF;
  text-decoration: none;
}

.afr-cta-secondary {
  background: transparent;
  color: var(--afr-navy);
  border: 2px solid var(--afr-navy);
}

.afr-cta-secondary:hover {
  background: var(--afr-navy);
  color: #FFFFFF;
  transform: translateY(-2px);
  text-decoration: none;
}

/* Full-width CTA section wrapper (optional) */
.afr-cta-section {
  background: linear-gradient(var(--golden-angle),
    var(--afr-navy) 0%,
    #003A73 55%,
    #1B4E7A 100%);
  border-radius: var(--radius-xl);
  padding: var(--bg-54) var(--bg-54);
  margin: var(--space-55) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

/* Fibonacci spiral rings — sacred geometry background */
.afr-cta-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 300px;
  border: 1px solid rgba(240, 90, 0, 0.10);
  border-radius: 50%;
}

.afr-cta-section::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  border: 1px solid rgba(240, 90, 0, 0.08);
  border-radius: 50%;
}

.afr-cta-section h2 {
  color: #FFFFFF;
  font-size: var(--text-4xl);
  margin: 0 0 var(--space-13) 0;
  position: relative;
  z-index: 1;
}

.afr-cta-section p {
  color: rgba(255, 255, 255, 0.80);
  font-size: var(--text-lg);
  margin-bottom: var(--space-34);
  position: relative;
  z-index: 1;
}

.afr-cta-section .afr-cta-wrap {
  justify-content: center;
  position: relative;
  z-index: 1;
}

.afr-cta-section .afr-cta-secondary {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.50);
}

.afr-cta-section .afr-cta-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  border-color: #FFFFFF;
}

/* ============================================================
   HOWTO SECTION
   ============================================================ */

.afr-howto {
  margin: var(--space-34) 0;
}

.afr-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-13);
  margin-top: var(--space-21);
}

.afr-step {
  background: var(--afr-cream);
  border-radius: var(--radius-md);
  padding: var(--bg-19) var(--bg-28);
  border-left: 4px solid var(--afr-orange);
  position: relative;
  counter-increment: step-counter;
}

.afr-steps {
  counter-reset: step-counter;
}

.afr-step h3 {
  font-size: var(--text-lg);
  color: var(--afr-navy);
  margin: 0 0 var(--space-8) 0;
  padding-left: var(--bg-43);
  position: relative;
}

.afr-step h3::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: var(--bg-28);
  height: var(--bg-28);
  background: linear-gradient(var(--golden-angle), var(--afr-orange), #E85200);
  color: #FFFFFF;
  border-radius: 50%;
  font-size: var(--text-sm);
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1;
}

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

/* ============================================================
   COMPARISON CARDS
   ============================================================ */

.afr-compare-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-21);
  margin: var(--space-34) 0;
}

.afr-compare-card {
  background: var(--afr-cream);
  border-radius: var(--radius-lg);
  padding: var(--bg-28) var(--bg-28);
  border: 1px solid var(--afr-sand);
}

.afr-compare-card.afr-card-navy {
  background: linear-gradient(var(--golden-angle), var(--afr-navy) 0%, #003A73 100%);
  color: #FFFFFF;
  border: none;
}

.afr-compare-card.afr-card-orange {
  background: linear-gradient(var(--golden-angle), var(--afr-orange) 0%, #E85200 100%);
  color: #FFFFFF;
  border: none;
}

/* ============================================================
   RELATED ARTICLES
   ============================================================ */

.afr-related {
  border-top: 2px solid var(--afr-sand);
  padding-top: var(--space-34);
  margin-top: var(--space-55);
}

.afr-related h2 {
  font-size: var(--text-xl);
  color: var(--afr-navy);
  margin-bottom: var(--space-21);
}

.afr-related ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-8);
}

.afr-related li a {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  color: var(--afr-navy-mid);
  text-decoration: none;
  font-weight: 500;
  padding: var(--space-8) 0;
  border-bottom: 1px solid var(--afr-sand);
  transition: color 0.2s ease;
}

.afr-related li:last-child a {
  border-bottom: none;
}

.afr-related li a::before {
  content: '→';
  color: var(--afr-orange);
  font-weight: 900;
  flex-shrink: 0;
}

.afr-related li a:hover {
  color: var(--afr-orange);
}

/* ============================================================
   TABLES (Responsive)
   ============================================================ */

/* ============================================================
   TABLES — Universal scroll on ALL tables, no wrapper needed.
   display:block + overflow-x:auto makes the TABLE itself scroll.
   Works on bare wp-cli deployed tables, afr-table-wrap, and
   any table injected by Kadence blocks or CF7.
   ============================================================ */

.afr-table-wrap {
  width: 100%;
  margin: var(--space-34) 0;
}

/* Universal — every table in content scrolls horizontally */
.entry-content table,
.post-content table,
.afr-table-wrap table,
article table,
.wp-block-table table {
  display: block;            /* makes the table itself the scroll container */
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
  font-size: var(--text-sm);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  scrollbar-width: thin;
  scrollbar-color: var(--afr-orange) var(--afr-sand);
}

/* Scroll indicator — thin orange bar below scrollable tables */
.entry-content table::-webkit-scrollbar,
.post-content table::-webkit-scrollbar,
.afr-table-wrap table::-webkit-scrollbar,
article table::-webkit-scrollbar {
  height: 4px;
}

.entry-content table::-webkit-scrollbar-track,
.afr-table-wrap table::-webkit-scrollbar-track {
  background: var(--afr-sand);
  border-radius: 2px;
}

.entry-content table::-webkit-scrollbar-thumb,
.afr-table-wrap table::-webkit-scrollbar-thumb {
  background: var(--afr-orange);
  border-radius: 2px;
}

.entry-content th,
.post-content th,
.afr-table-wrap th,
article th {
  background: var(--afr-navy);
  color: #FFFFFF;
  padding: var(--bg-16) var(--bg-19);
  text-align: left;
  font-weight: 700;
  font-size: var(--text-sm);
  white-space: nowrap;         /* keeps headers on one line while data scrolls */
}

.entry-content td,
.post-content td,
.afr-table-wrap td,
article td {
  padding: var(--bg-13) var(--bg-19);
  border-bottom: 1px solid var(--afr-sand);
  color: var(--afr-charcoal);
  vertical-align: top;
}

.entry-content tr:last-child td,
.afr-table-wrap tr:last-child td,
article tr:last-child td {
  border-bottom: none;
}

.entry-content tr:nth-child(even),
.afr-table-wrap tr:nth-child(even),
article tr:nth-child(even) {
  background: var(--afr-cream);
}

/* Mobile: ensure min-width so cells do not collapse to nothing */
@media (max-width: 680px) {
  .entry-content table,
  .post-content table,
  .afr-table-wrap table,
  article table {
    font-size: var(--text-xs);
  }

  .entry-content th,
  .afr-table-wrap th,
  article th {
    padding: var(--space-8) var(--space-13);
  }

  .entry-content td,
  .afr-table-wrap td,
  article td {
    padding: var(--space-8) var(--space-13);
  }
}

/* ============================================================
   MOBILE — Responsive at Fibonacci breakpoint (544px ≈ 34rem)
   ============================================================ */

@media (max-width: 680px) {
  .afr-quick-answer,
  .afr-edmonton-box,
  .afr-technical-box,
  .afr-tip-box,
  .afr-guide-box,
  .afr-warning-box,
  .afr-expert-quote {
    padding: var(--bg-19) var(--bg-28);
  }

  .afr-compare-cards {
    grid-template-columns: 1fr;
  }

  .afr-cta-wrap {
    flex-direction: column;
    align-items: stretch;
  }

  .afr-cta-btn {
    text-align: center;
    padding: var(--bg-19) var(--bg-34);
  }

  .afr-cta-section {
    padding: var(--bg-43) var(--bg-28);
  }

  .afr-cta-section h2 {
    font-size: var(--text-3xl);
  }

  .afr-step h3 {
    padding-left: var(--bg-34);
  }

  .afr-article-body h2,
  .entry-content h2 {
    font-size: var(--text-2xl);
    margin-top: var(--space-34);
  }
}

/* ============================================================
   PRINT — clean output for homeowners saving the page
   ============================================================ */

@media print {
  .afr-cta-wrap,
  .afr-cta-section,
  .afr-related {
    display: none;
  }

  .afr-quick-answer,
  .afr-technical-box,
  .afr-tip-box,
  .afr-edmonton-box {
    border: 1px solid #000;
    box-shadow: none;
  }
}

/* ============================================================
   PREFERS-REDUCED-MOTION — accessibility
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .afr-cta-btn,
  .afr-toc a,
  .afr-related li a {
    transition: none;
  }
  .afr-cta-primary:hover,
  .afr-cta-secondary:hover {
    transform: none;
  }
}

/* AFR category pill on banner hero (added 2026-04-22) */
.single .entry-header .entry-taxonomies,
.loop-entry .entry-header .entry-taxonomies {
  margin-bottom: 1rem;
}
.single .entry-header .category-links,
.loop-entry .entry-header .category-links {
  display: inline-block;
}
.single .entry-header .category-links a,
.loop-entry .entry-header .category-links a {
  display: inline-block;
  background: #E85200;
  color: #FEFCFA !important;
  padding: 0.35em 0.9em;
  border-radius: 999px;
  font-size: 0.72em;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 45, 90, 0.35);
  transition: background 0.15s ease;
}
.single .entry-header .category-links a:hover,
.loop-entry .entry-header .category-links a:hover {
  background: #B84500;
  color: #FEFCFA !important;
}
