/**
 * PAL Neighbourhood Guide — Stylesheet
 * Property Around London
 * Based on Prototype F design system
 * Version: 1.0.0
 */

/* ============================================================
   0. DESIGN TOKENS
   ============================================================ */
:root {
  /* PAL Palette */
  --pal-navy:   #1a2332;
  --pal-green:  #2d5f3f;
  --pal-cream:  #f8f6f1;
  --pal-red:    #c44536;
  --pal-blue:   #4a7c8c;
  --pal-gold:   #d4a574;

  /* Derived */
  --pal-navy-dark: #243044;
  --pal-green-light: rgba(45,95,63,0.08);
  --pal-blue-light:  rgba(74,124,140,0.15);
  --pal-gold-light:  rgba(212,165,116,0.12);
  --pal-red-light:   rgba(196,69,54,0.08);

  /* Typography */
  --font-display: 'Spectral', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Borders & Shadows */
  --border-subtle:  1px solid rgba(26,35,50,0.04);
  --border-light:   1px solid rgba(26,35,50,0.06);
  --shadow-sm:   0 1px 3px rgba(26,35,50,0.02);
  --shadow-md:   0 4px 8px rgba(26,35,50,0.03), 0 16px 40px rgba(26,35,50,0.06);
  --shadow-lg:   0 2px 4px rgba(26,35,50,0.03), 0 8px 20px rgba(26,35,50,0.05);
  --shadow-xl:   0 4px 8px rgba(26,35,50,0.08), 0 12px 28px rgba(26,35,50,0.12);

  /* Easing */
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);

  /* Section Anchor Colours */
  --anchor-executive:  var(--pal-navy);
  --anchor-prices:     var(--pal-gold);
  --anchor-schools:    var(--pal-green);
  --anchor-transport:  var(--pal-blue);
  --anchor-crime:      var(--pal-red);
  --anchor-council:    var(--pal-navy);
  --anchor-community:  var(--pal-green);
  --anchor-verdict:    var(--pal-gold);
}

/* ============================================================
   1. BASE RESET & GLOBAL
   ============================================================ */
.pal-guide * { margin: 0; padding: 0; box-sizing: border-box; }
.pal-guide { scroll-behavior: smooth; }
.pal-guide {
  font-family: var(--font-body);
  font-size: 16px !important;
  color: #2c3e50;
  background: var(--pal-cream);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Section intro/body text */
.pal-section-text {
  font-size: 0.92rem !important;
  color: #6c757d !important;
  line-height: 1.8 !important;
  margin-bottom: 1rem !important;
}
.pal-section-text p {
  font-size: 0.92rem !important;
  color: #6c757d !important;
  line-height: 1.8 !important;
  margin-bottom: 0.75rem !important;
}
.pal-section-text strong {
  color: #2c3e50 !important;
}

/* Grain texture overlay */
.pal-guide.grain::before {
  content: ''; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 9999; opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ============================================================
   2. NAVIGATION
   ============================================================ */
.pal-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0.9rem 2rem;
  background: rgba(248,246,241,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(26,35,50,0.05);
  display: flex; align-items: center; justify-content: space-between;
}
.pal-nav-logo {
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  color: var(--pal-navy); text-decoration: none;
}
.pal-nav-logo:hover { color: var(--pal-green); }
.pal-breadcrumb {
  font-size: 0.78rem; color: #95a5a6;
  display: flex; gap: 0.4rem; align-items: center;
}
.pal-breadcrumb a {
  color: #6c757d; text-decoration: none; transition: color 0.2s;
}
.pal-breadcrumb a:hover { color: var(--pal-green); }
.pal-breadcrumb a:focus-visible { outline: 2px solid var(--pal-green); outline-offset: 2px; }
.pal-breadcrumb-sep { color: #d0d0d0; }
.pal-breadcrumb-current { color: #2c3e50; font-weight: 500; }

/* ============================================================
   3. HERO
   ============================================================ */
.pal-hero {
  position: relative; min-height: 60vh;
  display: flex; align-items: flex-end;
  overflow: hidden; margin-top: 50px;
}
.pal-hero-img { position: absolute; inset: 0; }
.pal-hero-img img {
  width: 100%; height: 100%; object-fit: cover;
  filter: brightness(0.5) saturate(1.1);
}
.pal-hero-img::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(26,35,50,0.85) 0%, rgba(26,35,50,0.2) 60%, transparent 100%);
}
.pal-hero-img::before {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: rgba(45,95,63,0.08); mix-blend-mode: multiply;
}
.pal-hero-content {
  position: relative; z-index: 2;
  padding: 3rem 3rem 2.5rem; max-width: 800px;
}
.pal-hero-badges { display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.pal-h-badge {
  padding: 0.3rem 0.8rem; border-radius: 9999px;
  font-size: 0.68rem; font-weight: 600;
}
.pal-h-badge--zone { background: rgba(74,124,140,0.8); color: white; }
.pal-h-badge--borough {
  background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.1);
}
.pal-h-badge--rating { background: rgba(45,95,63,0.8); color: white; }
.pal-h-badge--price { background: rgba(212,165,116,0.8); color: white; }
.pal-h-badge--read {
  background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.5);
  border: 1px solid rgba(255,255,255,0.06);
}
.pal-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 600; color: white;
  line-height: 1.08; letter-spacing: -0.03em; margin-bottom: 0.75rem;
}
.pal-hero h1 .pal-postcode {
  font-size: 0.45em; font-weight: 500; vertical-align: middle;
  background: rgba(255,255,255,0.12); padding: 0.15em 0.5em; border-radius: 6px;
  margin-left: 0.5rem; letter-spacing: 0.02em;
}
.pal-hero-sub {
  font-size: 1.05rem; color: rgba(255,255,255,0.55); line-height: 1.7; max-width: 500px;
}
.pal-hero-updated {
  margin-top: 1rem; font-size: 0.72rem; color: rgba(255,255,255,0.3);
  display: flex; align-items: center; gap: 0.4rem;
}
.pal-hero-updated .dot {
  width: 5px; height: 5px; border-radius: 50%; background: var(--pal-green);
}

/* ============================================================
   4. EXECUTIVE SUMMARY
   ============================================================ */
.pal-exec {
  max-width: 1100px; margin: -2rem auto 0; padding: 0 2rem;
  position: relative; z-index: 3;
}
.pal-exec-card {
  background: white; border-radius: 18px; padding: 2.5rem;
  border: var(--border-subtle);
  box-shadow: var(--shadow-md);
}
.pal-exec-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 2rem; padding-bottom: 1rem;
  border-bottom: 3px solid var(--anchor-executive);
}
.pal-exec-header h2 {
  font-family: var(--font-display); font-size: 1.3rem; font-weight: 600;
  color: var(--pal-navy);
}
.pal-verdict-badge {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.85rem; font-weight: 600; color: var(--pal-gold);
}

/* Stat grid */
.pal-stat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem;
  margin-bottom: 2rem;
}
.pal-stat-box {
  text-align: center; padding: 1.25rem 0.75rem;
  background: var(--pal-cream); border-radius: 12px;
  transition: transform 0.3s var(--ease-bounce);
}
.pal-stat-box:hover { transform: translateY(-2px); }
.pal-stat-icon { font-size: 1.4rem; margin-bottom: 0.4rem; }
.pal-stat-val {
  font-family: var(--font-mono); font-size: 1.4rem; font-weight: 600;
  color: var(--pal-navy); letter-spacing: -0.02em;
}
.pal-stat-lbl { font-size: 0.7rem; color: #95a5a6; margin-top: 0.1rem; }

/* Two-column exec narrative */
.pal-exec-narrative {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2rem;
  margin-bottom: 2rem;
}
.pal-exec-narrative-col h3 {
  font-family: var(--font-display); font-size: 1rem; font-weight: 600;
  color: var(--pal-navy); margin-bottom: 0.75rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.pal-exec-narrative-col p {
  font-size: 0.9rem; color: #6c757d; line-height: 1.8;
}

/* Key strengths / considerations */
.pal-exec-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;
}
.pal-exec-col h3 {
  font-family: var(--font-display); font-size: 1rem; font-weight: 600;
  color: var(--pal-navy); margin-bottom: 0.75rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.pal-exec-col ul { list-style: none !important; padding-left: 0 !important; margin: 0 !important; }
.pal-exec-col li {
  font-size: 0.88rem !important; color: #6c757d !important; line-height: 1.7 !important;
  padding: 0.35rem 0 0.35rem 1.5rem !important; position: relative !important;
  list-style: none !important;
}
.pal-exec-col li::before {
  content: '' !important; position: absolute !important; left: 0 !important; top: 0.85em !important;
  width: 7px !important; height: 7px !important; border-radius: 50% !important;
}
.pal-exec-col li p { margin: 0 !important; }
.pal-exec-col li strong { font-weight: 600; }
.pal-strengths li::before { background: var(--pal-green); }
.pal-considerations li::before { background: var(--pal-red); }

/* ============================================================
   5. MAIN LAYOUT (content + sidebar)
   ============================================================ */
.pal-guide-layout {
  max-width: 1100px; margin: 0 auto; padding: 3rem 2rem;
  display: grid; grid-template-columns: 1fr 280px; gap: 3rem;
}

/* ============================================================
   6. TABLE OF CONTENTS (sticky sidebar)
   ============================================================ */
.pal-toc {
  position: sticky; top: 75px; align-self: start;
  background: white; border-radius: 14px; padding: 1.5rem;
  border: var(--border-subtle); box-shadow: var(--shadow-sm);
}
.pal-toc h3 {
  font-family: var(--font-display); font-size: 0.9rem; font-weight: 600;
  color: var(--pal-navy); margin-bottom: 1rem;
}
.pal-toc ul { list-style: none; }
.pal-toc li { margin-bottom: 0.3rem; }
.pal-toc a {
  font-size: 0.8rem; color: #95a5a6; text-decoration: none;
  padding: 0.4rem 0.75rem; display: block; border-radius: 8px;
  border-left: 2px solid transparent;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.pal-toc a:hover { color: #2c3e50; background: rgba(45,95,63,0.04); }
.pal-toc a:focus-visible { outline: 2px solid var(--pal-green); outline-offset: 1px; }
.pal-toc a.active {
  color: var(--pal-green); font-weight: 500;
  border-left-color: var(--pal-green); background: rgba(45,95,63,0.04);
}

/* Sidebar widgets */
.pal-sidebar-widget {
  background: white; border-radius: 14px; padding: 1.5rem;
  border: var(--border-subtle); margin-top: 1.5rem;
}
.pal-sidebar-widget h3 {
  font-family: var(--font-display); font-size: 0.95rem; font-weight: 600;
  color: var(--pal-navy); margin-bottom: 0.5rem;
}
.pal-sidebar-widget p { font-size: 0.85rem; color: #6c757d; line-height: 1.5; }

/* Ad placeholder */
.pal-ad-placeholder {
  text-align: center; padding: 2rem 1rem; margin-top: 1.5rem;
  border: 1px dashed rgba(26,35,50,0.08); border-radius: 12px;
  font-size: 0.65rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: #b0b0b0;
}
.pal-ad-placeholder--inline {
  margin: 2rem 0; padding: 1.5rem;
}

/* Valuation CTA */
.pal-valuation-cta {
  background: white; border-radius: 14px; padding: 1.5rem;
  border: 2px solid rgba(45,95,63,0.12); margin-top: 1.5rem; text-align: center;
}
.pal-valuation-cta h3 {
  font-family: var(--font-display); font-size: 1rem; font-weight: 600;
  color: var(--pal-navy); margin-bottom: 0.3rem;
}
.pal-valuation-cta p {
  font-size: 0.8rem; color: #6c757d; margin-bottom: 1rem;
}
.pal-valuation-cta .pal-btn {
  display: block; width: 100%;
}

/* ============================================================
   7. CONTENT SECTIONS — COMMON
   ============================================================ */
.pal-section { margin-bottom: 3rem; scroll-margin-top: 5rem; }
.pal-section-title {
  font-family: var(--font-display) !important; font-size: 1.5rem !important; font-weight: 600 !important;
  color: var(--pal-navy) !important; letter-spacing: -0.02em; margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.pal-section-title .pal-section-icon {
  font-size: 1.1rem; opacity: 0.8;
}
.pal-section p {
  font-size: 0.92rem !important; color: #6c757d !important; line-height: 1.8 !important; margin-bottom: 1rem !important;
}
.pal-section p strong { color: #2c3e50 !important; }

/* Section colour anchors (border-bottom on heading) */
.pal-section--executive .pal-section-title  { border-bottom: 3px solid var(--anchor-executive); }
.pal-section--prices .pal-section-title     { border-bottom: 3px solid var(--anchor-prices); }
.pal-section--schools .pal-section-title    { border-bottom: 3px solid var(--anchor-schools); }
.pal-section--transport .pal-section-title  { border-bottom: 3px solid var(--anchor-transport); }
.pal-section--crime .pal-section-title      { border-bottom: 3px solid var(--anchor-crime); }
.pal-section--council .pal-section-title    { border-bottom: 3px solid var(--anchor-council); }
.pal-section--community .pal-section-title  { border-bottom: 3px solid var(--anchor-community); }
.pal-section--verdict .pal-section-title    { border-bottom: 3px solid var(--anchor-verdict); }

/* Section photo */
.pal-section-photo {
  width: 100%; height: 240px; border-radius: 12px; overflow: hidden;
  margin-bottom: 1.5rem; position: relative;
}
.pal-section-photo img {
  width: 100%; height: 100%; object-fit: cover; filter: saturate(1.05);
}
.pal-section-photo::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(26,35,50,0.2), transparent 40%);
}
.pal-section-photo-caption {
  position: absolute; bottom: 0.75rem; left: 1rem; z-index: 2;
  font-size: 0.68rem; color: rgba(255,255,255,0.7); font-style: italic;
}

/* Source citations */
.pal-source {
  font-size: 0.72rem; color: #b0b0b0; margin-top: 1rem; font-style: italic;
}

/* ============================================================
   8. PROPERTY PRICES
   ============================================================ */
.pal-price-hero {
  background: white; border-radius: 14px; padding: 2rem; text-align: center;
  border: var(--border-subtle); margin-bottom: 1.5rem;
  border-top: 4px solid var(--pal-gold);
}
.pal-price-hero .pal-price-val {
  font-family: var(--font-mono); font-size: 2.2rem; font-weight: 600;
  color: var(--pal-navy); letter-spacing: -0.03em;
}
.pal-price-hero .pal-price-lbl {
  font-size: 0.8rem; color: #95a5a6; margin-top: 0.25rem;
}

.pal-price-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.5rem 0;
}
.pal-price-card {
  background: white; border-radius: 12px; padding: 1.5rem;
  border: var(--border-subtle); text-align: center;
  transition: transform 0.3s var(--ease-bounce), border-color 0.3s;
}
.pal-price-card:hover { transform: translateY(-2px); border-color: rgba(45,95,63,0.12); }
.pal-price-type {
  font-size: 0.75rem; font-weight: 600; color: #95a5a6;
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.5rem;
}
.pal-price-val {
  font-family: var(--font-mono); font-size: 1.5rem; font-weight: 600;
  color: var(--pal-navy); letter-spacing: -0.02em;
}
.pal-price-range {
  font-size: 0.72rem; color: #95a5a6; margin-top: 0.4rem;
  display: flex; justify-content: space-between;
}
.pal-price-source { font-size: 0.65rem; color: #b0b0b0; margin-top: 0.4rem; }

/* Budget buys */
.pal-budget-list { margin: 1.5rem 0; }
.pal-budget-item {
  display: flex; gap: 1.5rem; padding: 1rem 0;
  border-bottom: 1px solid rgba(26,35,50,0.04);
}
.pal-budget-item:last-child { border-bottom: none; }
.pal-budget-price {
  font-family: var(--font-mono); font-size: 1rem; font-weight: 600;
  color: var(--pal-gold); min-width: 80px; white-space: nowrap;
}
.pal-budget-desc {
  font-size: 0.88rem; color: #6c757d; line-height: 1.7;
}

/* ============================================================
   9. SCHOOLS
   ============================================================ */
/* Summary cards */
.pal-school-summary-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.5rem 0;
}
.pal-school-summary-card {
  border-radius: 12px; padding: 1.25rem 1.5rem; color: white;
}
.pal-school-summary-card--primary { background: var(--pal-red); }
.pal-school-summary-card--secondary { background: var(--pal-blue); }
.pal-school-summary-card h4 {
  font-size: 0.85rem; font-weight: 600; display: flex; align-items: center; gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.pal-school-summary-card .pal-school-count {
  font-size: 0.8rem; opacity: 0.9; display: flex; align-items: center; gap: 0.4rem;
}
.pal-school-count-dot {
  width: 8px; height: 8px; border-radius: 50; display: inline-block;
}
.pal-school-count-dot--outstanding { background: #d4a574; }
.pal-school-count-dot--good { background: rgba(255,255,255,0.5); }

/* Interactive map */
.pal-map-section { margin: 1.5rem 0; }
.pal-map-container {
  width: 100%; height: 420px; border-radius: 14px; overflow: hidden;
  border: var(--border-light); box-shadow: var(--shadow-lg);
}
#palSchoolMap { width: 100%; height: 100%; }

.pal-map-filter-bar { display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.pal-map-filter-btn {
  padding: 0.4rem 0.9rem; border-radius: 9999px;
  font-size: 0.75rem; font-weight: 600;
  border: 1px solid rgba(26,35,50,0.1); background: white; color: #6c757d;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}
.pal-map-filter-btn:hover { border-color: rgba(45,95,63,0.3); color: var(--pal-green); }
.pal-map-filter-btn:focus-visible { outline: 2px solid var(--pal-green); outline-offset: 2px; }
.pal-map-filter-btn.active { background: var(--pal-green); color: white; border-color: var(--pal-green); }
.pal-map-filter-btn--primary.active { background: #c0392b; border-color: #c0392b; }
.pal-map-filter-btn--secondary.active { background: #2980b9; border-color: #2980b9; }
.pal-map-filter-btn--independent.active { background: var(--pal-gold); border-color: var(--pal-gold); color: #1a2332; }
.pal-map-filter-btn:active { transform: scale(0.96); }

.pal-map-legend { display: flex; gap: 1.2rem; margin-top: 1rem; flex-wrap: wrap; align-items: center; }
.pal-legend-item { display: flex; align-items: center; gap: 0.35rem; font-size: 0.78rem; color: #6c757d; }
.pal-legend-divider { color: #ddd; font-size: 0.9rem; gap: 0; }
.pal-legend-dot { width: 10px; height: 10px; border-radius: 50%; }
.pal-legend-dot--primary { background: #c0392b; }
.pal-legend-dot--secondary { background: #2980b9; }
.pal-legend-dot--independent { background: var(--pal-gold); }
.pal-legend-star { color: #2d5f3f; font-size: 0.85rem; line-height: 1; }
.pal-legend-circle { color: #6c757d; font-size: 0.6rem; line-height: 1; }

/* Map marker icons */
.pal-marker-icon { background: none !important; border: none !important; }
.pal-map-marker--dot {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2.5px solid white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.pal-map-marker--star {
  font-size: 22px; line-height: 1;
  text-shadow: 0 0 3px white, 0 2px 4px rgba(0,0,0,0.3);
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.25));
}

/* School cards */
/* ── Two-column school listing ── */
.pal-school-columns {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin: 1.5rem 0;
}
@media (max-width: 768px) {
  .pal-school-columns { grid-template-columns: 1fr; }
}
.pal-school-column {
  border-radius: 14px; padding: 1.5rem; min-height: 120px;
}
.pal-school-column--primary {
  background: linear-gradient(160deg, rgba(192,57,43,0.08) 0%, rgba(255,255,255,0.95) 60%, #fff 100%);
  border: 1px solid rgba(192,57,43,0.12);
}
.pal-school-column--secondary {
  background: linear-gradient(160deg, rgba(41,128,185,0.08) 0%, rgba(255,255,255,0.95) 60%, #fff 100%);
  border: 1px solid rgba(41,128,185,0.12);
}
.pal-school-column-header {
  display: flex; align-items: center; gap: 0.5rem;
  margin-bottom: 1rem; padding-bottom: 0.75rem;
  border-bottom: 2px solid rgba(0,0,0,0.06);
}
.pal-school-column--primary .pal-school-column-header { border-bottom-color: rgba(192,57,43,0.2); }
.pal-school-column--secondary .pal-school-column-header { border-bottom-color: rgba(41,128,185,0.2); }
.pal-school-column-header h4 {
  font-family: var(--font-display); font-size: 1rem; font-weight: 700;
  color: var(--pal-navy); margin: 0;
}
.pal-school-column--primary .pal-school-column-header h4 { color: #c0392b; }
.pal-school-column--secondary .pal-school-column-header h4 { color: #2980b9; }
.pal-school-column-count {
  font-size: 0.7rem; font-weight: 600; padding: 0.15rem 0.5rem;
  border-radius: 9999px; color: white; margin-left: auto;
}
.pal-school-column--primary .pal-school-column-count { background: #c0392b; }
.pal-school-column--secondary .pal-school-column-count { background: #2980b9; }

.pal-school-column-list { display: flex; flex-direction: column; gap: 0.6rem; }
.pal-school-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.7rem 0.9rem; border-radius: 10px;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(0,0,0,0.04);
  transition: transform 0.2s var(--ease-bounce), box-shadow 0.2s;
  cursor: pointer;
}
.pal-school-row:hover { transform: translateX(3px); box-shadow: 0 3px 12px rgba(26,35,50,0.06); }
.pal-school-row-info h5 {
  font-family: var(--font-display); font-size: 0.88rem; font-weight: 600;
  color: var(--pal-navy); margin: 0 0 0.15rem;
}
.pal-school-row-meta { font-size: 0.72rem; color: #95a5a6; }
.pal-ofsted-badge {
  padding: 0.25rem 0.65rem; border-radius: 9999px;
  font-size: 0.65rem; font-weight: 600; white-space: nowrap; color: white;
  flex-shrink: 0;
}
.pal-ofsted-outstanding { background: var(--pal-green); }
.pal-ofsted-good { background: var(--pal-blue); }
.pal-ofsted-excellent { background: var(--pal-gold); }
.pal-ofsted-ri { background: #95a5a6; }
.pal-school-column-empty {
  text-align: center; padding: 1.5rem; color: #b0b8c4;
  font-size: 0.85rem; font-style: italic;
}

/* Custom Leaflet popup styling */
.pal-guide .leaflet-popup-content-wrapper {
  border-radius: 12px !important;
  box-shadow: var(--shadow-xl) !important;
  border: var(--border-light) !important;
  font-family: var(--font-body) !important;
}
.pal-guide .leaflet-popup-content { margin: 14px 16px !important; }
.pal-school-popup-name {
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem;
  color: var(--pal-navy); margin-bottom: 0.25rem;
}
.pal-school-popup-meta { font-size: 0.75rem; color: #95a5a6; line-height: 1.5; }
.pal-school-popup-badge {
  display: inline-block; padding: 0.15rem 0.5rem; border-radius: 6px;
  font-size: 0.65rem; font-weight: 600; margin-top: 0.35rem; color: white;
}

/* ============================================================
   10. TRANSPORT & COMMUTE
   ============================================================ */
.pal-station-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.5rem 0;
}
.pal-station-grid--single { grid-template-columns: 1fr; }
.pal-station-card {
  background: var(--pal-navy); border-radius: 12px; padding: 1.5rem;
  color: white;
}
.pal-station-card--train {
  background: linear-gradient(135deg, #2d5f3f, #3a7a50);
}
.pal-station-label {
  font-size: 0.65rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: rgba(255,255,255,0.5);
  display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem;
}
.pal-station-name {
  font-family: var(--font-display); font-size: 1.2rem; font-weight: 600;
  margin-bottom: 0.4rem;
}
.pal-station-line {
  font-size: 0.85rem; color: rgba(255,255,255,0.6); margin-bottom: 0.75rem;
}
.pal-transport-lines { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.5rem; }
.pal-line-badge {
  padding: 0.2rem 0.6rem; border-radius: 6px;
  font-size: 0.65rem; font-weight: 600; color: white;
}
.pal-zone-badge {
  background: rgba(74,124,140,0.15); color: var(--pal-blue);
  padding: 0.25rem 0.6rem; border-radius: 6px;
  font-size: 0.72rem; font-weight: 600;
}

/* Commute time cards */
.pal-commute-heading {
  font-family: var(--font-display); font-size: 1.1rem; font-weight: 600;
  color: var(--pal-navy); margin: 2rem 0 1rem;
}
.pal-commute-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; margin: 1rem 0;
}
.pal-commute-card {
  background: white; border-radius: 12px; padding: 1.25rem 1rem;
  border: var(--border-subtle); text-align: center;
  transition: transform 0.25s var(--ease-bounce);
  position: relative; overflow: hidden;
}
.pal-commute-card:hover { transform: translateY(-2px); }
.pal-commute-time {
  font-family: var(--font-mono); font-size: 1.4rem; font-weight: 600;
  color: var(--pal-navy); margin-bottom: 0.2rem;
}
.pal-commute-dest {
  font-size: 0.78rem; color: #6c757d; font-weight: 500; margin-bottom: 0.15rem;
}
.pal-commute-route {
  font-size: 0.65rem; color: #b0b0b0;
}
.pal-commute-line-bar {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 5px; border-radius: 0 0 12px 12px;
}

/* ============================================================
   11. CRIME & SAFETY
   ============================================================ */
.pal-crime-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.5rem 0;
}
.pal-crime-card {
  background: white; border-radius: 12px; padding: 1.5rem;
  border: var(--border-subtle); text-align: center;
}
.pal-crime-card-icon {
  font-size: 1.5rem; margin-bottom: 0.5rem; opacity: 0.6;
}
.pal-crime-card-label {
  font-size: 0.65rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: #95a5a6; margin-bottom: 0.3rem;
}
.pal-crime-card-value {
  font-family: var(--font-mono); font-size: 1.5rem; font-weight: 600;
  color: var(--pal-navy);
}
.pal-crime-card-context {
  font-size: 0.75rem; color: #95a5a6; margin-top: 0.2rem;
}
.pal-crime-profile {
  background: var(--pal-cream); border-radius: 12px; padding: 1.25rem 1.5rem;
  margin: 1.5rem 0; border-left: 4px solid var(--pal-red);
}
.pal-crime-profile h4 {
  font-family: var(--font-display); font-size: 0.95rem; font-weight: 600;
  color: var(--pal-navy); margin-bottom: 0.5rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.pal-crime-profile p { font-size: 0.88rem; color: #6c757d; line-height: 1.7; }

/* ============================================================
   12. COUNCIL FEES
   ============================================================ */
.pal-council-authority {
  font-size: 0.9rem; color: #6c757d; margin-bottom: 1.5rem;
}
.pal-council-authority strong { color: var(--pal-navy); }

.pal-council-table {
  width: 100%; border-collapse: collapse; margin: 1rem 0;
  background: white; border-radius: 12px; overflow: hidden;
  border: var(--border-subtle);
}
.pal-council-table th {
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; color: #95a5a6; padding: 1rem;
  background: var(--pal-cream); text-align: center;
  border-bottom: var(--border-light);
}
.pal-council-table td {
  font-family: var(--font-mono); font-size: 1rem; font-weight: 600;
  color: var(--pal-navy); padding: 1rem; text-align: center;
}

.pal-parking-section { margin-top: 1.5rem; }
.pal-parking-section h4 {
  font-family: var(--font-display); font-size: 1.05rem; font-weight: 600;
  color: var(--pal-navy); margin-bottom: 1rem;
}
.pal-parking-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
}
.pal-parking-item {
  font-size: 0.88rem; color: #6c757d;
}
.pal-parking-item strong {
  display: block; color: var(--pal-navy); margin-bottom: 0.1rem;
}
.pal-cpz-info {
  margin-top: 1rem; font-size: 0.88rem; color: #6c757d;
}
.pal-cpz-info strong { color: var(--pal-navy); }

/* ============================================================
   13. COMMUNITY CHARACTER
   ============================================================ */
.pal-community-sub {
  margin-bottom: 2.5rem;
}
.pal-community-sub h3 {
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 600;
  color: var(--pal-navy); margin-bottom: 1rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.pal-community-content {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-bottom: 1rem;
}
.pal-community-text { font-size: 0.9rem; color: #6c757d; line-height: 1.8; }
.pal-community-text strong { color: #2c3e50; }
.pal-community-photo {
  width: 100%; height: 250px; border-radius: 12px; overflow: hidden;
  position: relative;
}
.pal-community-photo img {
  width: 100%; height: 100%; object-fit: cover; filter: saturate(1.05);
}
.pal-community-photo::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(26,35,50,0.25), transparent 40%);
}
.pal-community-photo-caption {
  position: absolute; bottom: 0.75rem; left: 1rem; z-index: 2;
  font-size: 0.68rem; color: rgba(255,255,255,0.8); font-style: italic;
  background: rgba(26,35,50,0.4); padding: 0.2rem 0.6rem; border-radius: 6px;
}

/* ============================================================
   14. EDITORIAL VERDICT (dark card)
   ============================================================ */
.pal-verdict {
  background: linear-gradient(135deg, #1a2332, #2d3e50);
  border-radius: 16px; padding: 2.5rem; color: white;
  margin: 2rem 0; position: relative; overflow: hidden;
}
.pal-verdict::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 80%, rgba(45,95,63,0.1), transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(212,165,116,0.07), transparent 50%);
}
.pal-verdict > * { position: relative; z-index: 2; }
.pal-verdict h2 {
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 600;
  margin-bottom: 0.25rem; border: none; padding: 0;
}
.pal-verdict-stars {
  color: var(--pal-gold); font-size: 1.1rem; letter-spacing: 3px; margin-bottom: 0.5rem;
}
.pal-verdict-ratings {
  display: flex; gap: 2rem; margin-bottom: 1.5rem; flex-wrap: wrap;
}
.pal-verdict-rating-item {
  font-size: 0.85rem; color: rgba(248,246,241,0.6);
}
.pal-verdict-rating-item span {
  color: var(--pal-gold); font-weight: 600;
}
.pal-verdict-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 1.5rem;
}
.pal-verdict-col h3 {
  font-size: 0.78rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; margin-bottom: 0.75rem; color: rgba(248,246,241,0.45);
}
.pal-verdict-col ul { list-style: none; }
.pal-verdict-col li {
  font-size: 0.88rem; line-height: 1.7; color: rgba(248,246,241,0.8);
  padding-left: 1.25rem; position: relative;
}
.pal-verdict-col li::before {
  content: ''; position: absolute; left: 0; top: 0.65rem;
  width: 6px; height: 6px; border-radius: 50%;
}
.pal-v-ideal li::before { background: var(--pal-green); }
.pal-v-not li::before { background: var(--pal-red); }

.pal-verdict-narrative {
  padding: 1.5rem 0; border-top: 1px solid rgba(255,255,255,0.06);
}
.pal-verdict-narrative h4 {
  font-family: var(--font-display); font-size: 1.05rem; font-weight: 600;
  color: rgba(248,246,241,0.85); margin-bottom: 0.5rem;
}
.pal-verdict-narrative p {
  font-size: 0.9rem !important; line-height: 1.8 !important; color: rgba(248,246,241,0.7) !important;
}
.pal-verdict strong, .pal-verdict b {
  color: #fff !important; font-weight: 600 !important;
}
.pal-verdict-narrative p strong,
.pal-verdict-narrative div strong,
.pal-verdict-rec p strong {
  color: #fff !important; font-weight: 600 !important;
}
.pal-verdict-narrative div { font-size: 0.9rem !important; line-height: 1.8 !important; color: rgba(248,246,241,0.7) !important; }
.pal-verdict-col p, .pal-verdict-col div { color: rgba(248,246,241,0.8) !important; font-size: 0.88rem !important; line-height: 1.7 !important; }
.pal-verdict-col li { font-size: 0.88rem !important; }

.pal-verdict-rec {
  padding-top: 1.5rem; border-top: 2px solid var(--pal-gold);
  margin-top: 0.5rem;
}
.pal-verdict-rec h4 {
  font-size: 0.85rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--pal-gold); margin-bottom: 0.75rem;
}
.pal-verdict-rec p {
  font-size: 1rem; line-height: 1.8; color: rgba(248,246,241,0.9);
}

/* ============================================================
   15. CTA & NEWSLETTER
   ============================================================ */
.pal-cta {
  background: white; border-radius: 14px; padding: 2rem;
  border: var(--border-subtle); text-align: center; margin-top: 2rem;
}
.pal-cta h3 {
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 600;
  color: var(--pal-navy); margin-bottom: 0.5rem;
}
.pal-cta p { font-size: 0.85rem; color: #95a5a6; margin-bottom: 1.25rem; line-height: 1.6; }
.pal-cta-form {
  display: flex; max-width: 400px; margin: 0 auto;
  background: var(--pal-cream); border-radius: 10px; padding: 0.3rem;
}
.pal-cta-form input {
  flex: 1; background: transparent; border: none; outline: none;
  padding: 0.6rem 0.8rem; font-size: 0.85rem; font-family: var(--font-body);
  color: #2c3e50;
}
.pal-cta-form input::placeholder { color: #b0b0b0; }
.pal-cta-form button {
  background: var(--pal-green); color: white; border: none;
  padding: 0.6rem 1.2rem; border-radius: 8px; font-weight: 600; font-size: 0.8rem;
  cursor: pointer; white-space: nowrap;
  transition: transform 0.2s var(--ease-bounce);
}
.pal-cta-form button:hover { transform: scale(1.04); }
.pal-cta-form button:active { transform: scale(0.97); }
.pal-cta-form button:focus-visible { outline: 2px solid var(--pal-gold); outline-offset: 2px; }
.pal-cta-small { font-size: 0.72rem; color: #b0b0b0; margin-top: 0.75rem; }

/* Affiliate CTA banner */
.pal-affiliate-cta {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--pal-green); border-radius: 12px; padding: 1.25rem 2rem;
  margin: 1.5rem 0; color: white; flex-wrap: wrap; gap: 1rem;
}
.pal-affiliate-cta-text h4 {
  font-family: var(--font-display); font-size: 1rem; font-weight: 600;
  margin-bottom: 0.2rem;
}
.pal-affiliate-cta-text p {
  font-size: 0.8rem; color: rgba(255,255,255,0.7); margin: 0;
}
.pal-affiliate-cta .pal-btn--outline {
  background: transparent; color: white; border: 1.5px solid rgba(255,255,255,0.4);
  padding: 0.5rem 1.2rem; border-radius: 8px; font-weight: 600; font-size: 0.8rem;
  cursor: pointer; text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}
.pal-affiliate-cta .pal-btn--outline:hover {
  background: rgba(255,255,255,0.1); border-color: white;
}

/* ============================================================
   16. FEATURED LOCAL SERVICES
   ============================================================ */
.pal-services-heading {
  text-align: center; margin-bottom: 0.3rem;
  font-family: var(--font-display); font-size: 1.1rem; font-weight: 600;
  color: var(--pal-navy);
}
.pal-services-sub {
  text-align: center; font-size: 0.8rem; color: #95a5a6; margin-bottom: 1.5rem;
}
.pal-services-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 0.75rem;
}
.pal-service-card {
  background: white; border-radius: 12px; padding: 1.5rem;
  border: var(--border-subtle); text-align: center;
  transition: transform 0.25s var(--ease-bounce);
}
.pal-service-card:hover { transform: translateY(-3px); }
.pal-service-icon { font-size: 1.5rem; margin-bottom: 0.75rem; color: var(--pal-green); }
.pal-service-title {
  font-family: var(--font-display); font-size: 0.95rem; font-weight: 600;
  color: var(--pal-navy); margin-bottom: 0.3rem;
}
.pal-service-desc { font-size: 0.78rem; color: #95a5a6; margin-bottom: 1rem; }
.pal-service-link {
  font-size: 0.8rem; font-weight: 600; color: var(--pal-green);
  text-decoration: none; transition: color 0.2s;
}
.pal-service-link:hover { color: var(--pal-navy); }
.pal-services-disclaimer {
  text-align: center; font-size: 0.68rem; color: #b0b0b0; font-style: italic;
}

/* ============================================================
   17. BUTTONS
   ============================================================ */
.pal-btn {
  display: inline-block; padding: 0.7rem 1.5rem; border-radius: 8px;
  font-weight: 600; font-size: 0.85rem; text-decoration: none; text-align: center;
  cursor: pointer; border: none;
  transition: transform 0.2s var(--ease-bounce), box-shadow 0.2s;
}
.pal-btn:hover { transform: translateY(-1px); }
.pal-btn:active { transform: translateY(0); }
.pal-btn--green { background: var(--pal-green); color: white; }
.pal-btn--green:hover { box-shadow: 0 4px 12px rgba(45,95,63,0.2); }
.pal-btn--navy { background: var(--pal-navy); color: white; }

/* ============================================================
   18. FOOTER
   ============================================================ */
.pal-guide-footer {
  background: var(--pal-navy); color: rgba(248,246,241,0.4);
  padding: 2.5rem 2rem; font-size: 0.8rem; margin-top: 3rem;
}
.pal-guide-footer a {
  color: rgba(248,246,241,0.6); text-decoration: none; transition: color 0.2s;
}
.pal-guide-footer a:hover { color: var(--pal-gold); }
.pal-footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
}
.pal-footer-logo {
  font-family: var(--font-display); font-weight: 600;
  color: rgba(248,246,241,0.8); font-size: 1rem;
}
.pal-footer-links { display: flex; gap: 1.5rem; }

/* ============================================================
   19. SCROLL REVEAL ANIMATION
   ============================================================ */
.pal-reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.6s var(--ease-smooth), transform 0.6s var(--ease-smooth);
}
.pal-reveal.visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   20. RESPONSIVE (max-width: 900px)
   ============================================================ */
@media (max-width: 900px) {
  .pal-guide-layout { grid-template-columns: 1fr; }
  .pal-guide-sidebar { display: none; }
  .pal-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .pal-price-grid { grid-template-columns: 1fr; }
  .pal-station-grid { grid-template-columns: 1fr; }
  .pal-commute-grid { grid-template-columns: repeat(2, 1fr); }
  .pal-exec-grid,
  .pal-exec-narrative,
  .pal-verdict-grid { grid-template-columns: 1fr; }
  .pal-crime-grid { grid-template-columns: 1fr; }
  .pal-parking-grid { grid-template-columns: 1fr; }
  .pal-services-grid { grid-template-columns: 1fr; }
  .pal-school-summary-grid { grid-template-columns: 1fr; }
  .pal-community-content { grid-template-columns: 1fr; }
  .pal-hero-content { padding: 2rem 1.5rem; }
  .pal-exec { padding: 0 1rem; }
  .pal-guide-layout { padding: 2rem 1rem; }
  .pal-breadcrumb { display: none; }
  .pal-map-container { height: 320px; }
  .pal-affiliate-cta { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .pal-commute-grid { grid-template-columns: 1fr; }
  .pal-stat-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   21. REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   22. PRINT
   ============================================================ */
@media print {
  .pal-nav, .pal-guide-sidebar, .pal-affiliate-cta,
  .pal-ad-placeholder, .pal-valuation-cta, .pal-services,
  .pal-cta, .pal-guide.grain::before { display: none !important; }
  .pal-hero { min-height: auto; margin-top: 0; }
  .pal-guide-layout { display: block; }
  .pal-reveal { opacity: 1 !important; transform: none !important; }
  .pal-section { break-inside: avoid; }
}
